:root {
  --navy: #0f3e71;
  --navy-dark: #0b2f57;
  --ice: #f4f9ff;
  --line: #c8d9ec;
  --text: #1e3550;
  --muted: #5f7692;
  --gold: #e6b12a;
  --danger-bg: #fff1f1;
  --danger-line: #efc6c6;
  --danger-text: #9d2b2b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #edf5fd 0%, #e7f1fb 100%);
}
.login-page {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}
.login-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(15, 62, 113, 0.18) 0%, rgba(15, 62, 113, 0.05) 45%, rgba(15, 62, 113, 0.1) 100%),
    url('img/login_kid.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  min-height: 100vh;
}
.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(15, 62, 113, 0.06) 0%, rgba(15, 62, 113, 0) 45%);
}
.hero-kid {
  display: none;
}
.hero-copy {
  position: absolute;
  top: 36px;
  left: 40px;
  max-width: 360px;
  z-index: 2;
}
.hero-copy h2 {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
}
.hero-copy p {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(10, 35, 65, 0.45);
}
.hero-copy h2 { color: #ffffff; text-shadow: 0 2px 14px rgba(10, 35, 65, 0.48); }
.login-panel {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
}
.panel-card {
  width: min(470px, 100%);
}
.brand {
  text-align: center;
  margin-bottom: 10px;
}
.brand img {
  width: min(210px, 70%);
  height: auto;
}
.panel-title {
  text-align: center;
  margin: 0;
  color: var(--navy);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 2.8vw, 2.4rem);
}
.panel-subtitle {
  text-align: center;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 600;
}
.alert {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-weight: 700;
}
.form {
  display: grid;
  gap: 8px;
}
.label {
  color: var(--navy-dark);
  font-weight: 800;
  font-size: 1rem;
}
.input {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f8ff;
  font-size: 1rem;
  padding: 10px 13px;
  color: var(--text);
}
.input:focus {
  outline: none;
  border-color: #86b2df;
  box-shadow: 0 0 0 3px rgba(47, 111, 174, 0.14);
}
.btn {
  margin-top: 4px;
  width: 100%;
  border: 0;
  min-height: 52px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a5e9f 0%, #0f3e71 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.switch-bar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dde9f6;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.55;
  font-size: 0.95rem;
}
.switch-bar a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}
.switch-bar a:hover { text-decoration: underline; }
.tip { margin-top: 8px; text-align: center; font-size: .78rem; color: #69809a; }
.role-badge {
  display: inline-block;
  margin: 0 auto 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #b8d1e8;
  background: #eef6ff;
  color: #1a4c7f;
  font-weight: 800;
  font-size: .82rem;
}
.mobile-kid-hero { display: none; }
@media (min-width: 761px) {
  html, body { height: 100%; overflow: hidden; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-page { height: auto; min-height: 100vh; }
  .login-hero { display: none; }
  .login-panel {
    min-height: 100vh;
    align-items: flex-start;
    padding: 0;
    background: #ffffff;
  }
  .panel-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .brand {
    margin: 0;
    padding: 8px 10px 4px;
    background: #ffffff;
  }
  .brand img { width: min(168px, 40.8vw); }
  .mobile-kid-hero { display: none; }
  .label { display: none; }
  .form {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-height: calc(100vh - 255px);
    padding: 220px 10px 10px;
    background:
      linear-gradient(140deg, transparent 0 72%, #0f3e71 72% 100%),
      url('img/login_kid.jpg') center 6% / 144% auto no-repeat;
  }
  .input {
    width: 80%;
    margin: 0 auto;
    background: #ffffff;
    border-color: #d4dbe5;
    border-radius: 10px;
    min-height: 42px;
    font-size: 0.92rem;
    padding: 8px 11px;
  }
  .btn {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    min-height: 42px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    background: #123f6f;
  }
  .alert {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .switch-bar {
    margin: 0;
    padding: 10px 10px;
    background: rgba(181, 205, 229, 0.72);
    color: #0f3e71;
    border-top: none;
    font-size: 0.85rem;
    line-height: 1.35;
  }
  .switch-bar a { color: #0f3e71; }
  .tip {
    margin: 0;
    padding: 6px 10px 8px;
    color: #0f3e71;
    font-size: 0.75rem;
    background: #0f3e71;
    color: #cfe1f2;
  }
  html, body { overflow: auto; }
}
@media (max-width: 640px) {
  .login-panel { padding: 18px 14px 22px; }
  .panel-title { font-size: 2rem; }
  .btn { font-size: 1.35rem; }
  .login-hero { min-height: 290px; }
  .hero-copy p { font-size: .95rem; }
}
