/* ==========================================================================
   Victory School — Login System
   Palette: Ink Navy #0F2A44, Field Green #234B3E, Victory Gold #C9A227,
            Parchment #F6F1E4, Ink #1C1B18, Crimson (errors) #8C2F30
   Type: "Fraunces" (display, institutional serif) + "Inter" (body/UI)
         + "IBM Plex Mono" (admission/staff numbers, meta labels)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --navy: #0F2A44;
  --navy-deep: #0A1E33;
  --green: #234B3E;
  --gold: #C9A227;
  --gold-soft: #E4C765;
  --parchment: #F6F1E4;
  --ink: #1C1B18;
  --ink-soft: #55524A;
  --crimson: #8C2F30;
  --line: rgba(28, 27, 24, 0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 14px;
  --shadow-card: 0 30px 60px -25px rgba(10, 30, 51, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
}

.screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---------- Left panel: institutional identity ---------- */

.identity-panel {
  position: relative;
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(201, 162, 39, 0.16), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--parchment);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  margin: 0px;
   

}

.identity-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 88px);
  pointer-events: none;
  justify-content: space-between;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 23px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.crest-wrap {
  margin: auto 0;
  position: center;
  z-index: 1;
}

.crest svg { display: block; 
}

.crest-line {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.6s ease forwards 0.2s;
}

.crest-line.delay {
  animation-delay: 0.55s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.motto {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  max-width: 460px;
}

.motto em {
  font-style: italic;
  color: var(--gold-soft);
}

.tagline {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(246, 241, 228, 0.72);
  max-width: 420px;
  line-height: 1.6;
}

.identity-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(246, 241, 228, 0.55);
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(246, 241, 228, 0.16);
  padding-top: 18px;
}

/* ---------- Right panel: the form ---------- */

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--parchment);
}

.card {
  width: 100%;
  max-width: 400px;
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 10px;
}

.card h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--navy);
}

.card p.sub {
  margin: 0 0 32px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}

.field .hint {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 44px 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 75, 62, 0.15);
}

.input-wrap input.invalid {
  border-color: var(--crimson);
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  padding: 6px 8px;
  border-radius: 6px;
}

.toggle-visibility:hover { color: var(--navy); background: rgba(15,42,68,0.06); }

.field-error {
  min-height: 16px;
  font-size: 12.5px;
  color: var(--crimson);
  margin-top: 6px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--parchment);
  background: var(--navy);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: scale(0.99); }

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert-error {
  background: rgba(140, 47, 48, 0.09);
  border: 1px solid rgba(140, 47, 48, 0.25);
  color: var(--crimson);
}

.alert-success {
  background: rgba(35, 75, 62, 0.09);
  border: 1px solid rgba(35, 75, 62, 0.25);
  color: var(--green);
}

.form-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.form-foot a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.form-foot a:hover { text-decoration: underline; }

/* ---------- Dashboards (shared shell) ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--navy);
  color: var(--parchment);
}

.topbar .brand-name { color: var(--gold-soft); }

.topbar .who {
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar .badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.logout-link {
  color: rgba(246, 241, 228, 0.75);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(246, 241, 228, 0.25);
  padding: 7px 14px;
  border-radius: 8px;
}

.logout-link:hover { color: var(--parchment); border-color: rgba(246,241,228,0.5); }

.dash-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 32px;
}

.dash-body h1 {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--navy);
  margin: 0 0 6px;
}

.dash-body .sub { color: var(--ink-soft); margin: 0 0 32px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--navy);
  margin-top: 6px;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .screen { grid-template-columns: 1fr; }
  .identity-panel { padding: 40px 28px; min-height: 260px; }
  .motto { font-size: 26px; }
  .form-panel { padding: 40px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .crest-line { animation: none; stroke-dashoffset: 0; }
}
