* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Cairo", "Tajawal", "Tahoma", sans-serif;
  background: linear-gradient(135deg, #eef8f3 0%, #f8fbff 44%, #eaf4fb 100%);
  color: #14213d;
}

a {
  color: inherit;
}

.d-none {
  display: none !important;
}

.parent-auth-page {
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow-x: hidden;
}

.parent-auth-page::before,
.parent-auth-page::after {
  content: "";
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.34;
  filter: blur(2px);
}

.parent-auth-page::before {
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, rgba(45, 134, 83, 0.34), transparent 68%);
}

.parent-auth-page::after {
  left: -130px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(201, 149, 42, 0.28), transparent 68%);
}

.parent-login {
  width: min(1080px, 100%);
  min-height: min(680px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.parent-login-card,
.parent-card,
.parent-sidebar,
.parent-navbar,
.child-strip {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  border-radius: 18px;
}

.parent-login-card {
  width: 100%;
  padding: clamp(26px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: #163923;
  text-decoration: none;
  margin-bottom: 28px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2d8653, #155934);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(45, 134, 83, 0.26);
}

.login-brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.3;
}

.login-brand small {
  display: block;
  color: #c9952a;
  font-size: 0.78rem;
  font-weight: 800;
}

.login-copy {
  margin-bottom: 24px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  margin-bottom: 14px;
  color: #2d8653;
  background: #e8f5ee;
  border: 1px solid rgba(45, 134, 83, 0.14);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.login-copy h1 {
  margin: 0 0 10px;
  color: #14251b;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 900;
  line-height: 1.18;
}

.login-copy p {
  margin: 0;
  color: #60766a;
  font-size: 0.98rem;
  line-height: 1.9;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form .remember-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #60766a;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.login-form .remember-login input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2d8653;
  cursor: pointer;
}

.form-label {
  color: #263b2d;
  font-size: 0.9rem;
  font-weight: 800;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -6px;
}

.forgot-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2d8653;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #155934;
  text-decoration: underline;
}

.forgot-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(12, 35, 22, 0.45);
  backdrop-filter: blur(8px);
}

.forgot-modal.open {
  display: grid;
}

.forgot-dialog {
  width: min(440px, 100%);
  position: relative;
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.forgot-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef8f3;
  color: #155934;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.forgot-dialog h2 {
  margin: 0 0 8px;
  color: #14251b;
  font-size: 1.55rem;
  font-weight: 900;
}

.forgot-dialog p {
  margin: 0 0 18px;
  color: #60766a;
  font-size: 0.92rem;
  line-height: 1.8;
}

.forgot-message {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.forgot-message.success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.forgot-message.error {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 18px;
}

.input-wrap {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(45, 134, 83, 0.14);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrap:focus-within {
  background: #fff;
  border-color: #2d8653;
  box-shadow: 0 0 0 4px rgba(45, 134, 83, 0.11);
}

.input-wrap span {
  flex: 0 0 auto;
  opacity: 0.75;
}

.form-control {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #14251b;
  font: inherit;
  font-weight: 700;
}

.form-control::placeholder {
  color: #95a69a;
  font-weight: 600;
}

.btn {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.w-100 {
  width: 100%;
}

.btn-primary {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(135deg, #2d8653, #155934);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(45, 134, 83, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 20px 40px rgba(45, 134, 83, 0.32);
}

.login-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.login-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  color: #6b7c72;
  font-size: 0.86rem;
  font-weight: 700;
}

.login-help a {
  color: #2d8653;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.parent-login-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 560px;
  padding: clamp(28px, 5vw, 52px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(21, 89, 52, 0.96), rgba(45, 134, 83, 0.9) 55%, rgba(58, 134, 200, 0.88)),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.2), transparent 26%);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(21, 89, 52, 0.22);
}

.parent-login-panel::before {
  content: "🌙";
  position: absolute;
  top: 34px;
  left: 38px;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  font-size: 2.2rem;
}

.parent-login-panel::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -110px;
  width: 310px;
  height: 310px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.panel-badge {
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #f6d47a;
  font-size: 0.84rem;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.parent-login-panel h2 {
  max-width: 430px;
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.18;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.parent-login-panel ul {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.parent-login-panel li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
  font-weight: 800;
}

.parent-login-panel li span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #155934;
  background: #f6d47a;
  border-radius: 50%;
  font-weight: 900;
}

.parent-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  gap: 18px;
  padding: 18px;
}

.parent-sidebar {
  padding: 18px;
}

.parent-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.parent-navbar,
.child-strip,
.parent-card {
  padding: 16px;
}

.parent-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #1f2937;
  text-decoration: none;
  margin-bottom: 6px;
}

.parent-menu a.active,
.parent-menu a:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

@media (max-width: 900px) {
  .parent-shell {
    grid-template-columns: 1fr;
  }

  .parent-login {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .parent-login-panel {
    min-height: auto;
    order: -1;
    padding-top: 120px;
  }
}

@media (max-width: 560px) {
  .parent-auth-page {
    padding: 16px;
    place-items: start center;
  }

  .parent-login-card,
  .parent-login-panel {
    border-radius: 20px;
  }

  .parent-login-card {
    padding: 24px 18px;
  }

  .login-brand {
    margin-bottom: 22px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .login-copy h1,
  .parent-login-panel h2 {
    font-size: 2rem;
  }

  .login-help {
    align-items: flex-start;
    flex-direction: column;
  }

  .parent-login-panel {
    padding: 110px 22px 28px;
  }
}
