:root {
  color-scheme: light;
  --navy: #12223f;
  --navy-soft: #1a3158;
  --blue: #2867e8;
  --blue-dark: #174dbd;
  --cyan: #27b5d6;
  --ink: #172033;
  --muted: #69758c;
  --line: #dce3ee;
  --wash: #f3f6fa;
  --paper: #fff;
  --danger: #c43b3b;
  --success: #168052;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .16em; }
.brand-mark { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(255,255,255,.36); border-radius: 17px; background: rgba(255,255,255,.12); color: #fff; font-size: 21px; font-weight: 900; letter-spacing: -.06em; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; }

.login-page { min-height: 100vh; background: var(--paper); }
.login-layout { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(430px, .95fr); min-height: 100vh; }
.login-intro { position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: clamp(48px, 8vw, 112px); color: #fff; background: linear-gradient(145deg, #10203c 0%, #173466 62%, #2059aa 100%); }
.login-intro::before, .login-intro::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-intro::before { width: 520px; height: 520px; right: -220px; top: -160px; }
.login-intro::after { width: 280px; height: 280px; right: 40px; bottom: -130px; }
.login-intro > * { position: relative; z-index: 1; }
.login-intro .eyebrow { margin-top: 54px; color: #7bdcf0; }
.login-intro h1 { margin: 0; font-size: clamp(44px, 5.4vw, 78px); line-height: 1.08; letter-spacing: -.055em; }
.intro-copy { max-width: 520px; margin: 28px 0; color: #cbd8ee; font-size: 19px; line-height: 1.75; }
.intro-points { display: flex; flex-wrap: wrap; gap: 10px; }
.intro-points span { padding: 8px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #dbe7fa; font-size: 13px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 7vw, 100px); background: #fbfcfe; }
.login-card { width: min(440px, 100%); margin: auto; }
.login-card-head { margin-bottom: 38px; }
.login-card-head h2 { margin: 0 0 10px; font-size: 34px; letter-spacing: -.03em; }
.login-card-head > p:last-child { margin: 0; color: var(--muted); }
.form-field { display: grid; gap: 8px; margin-top: 20px; }
.form-field > span { font-size: 14px; font-weight: 750; }
.form-field input { width: 100%; min-height: 54px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #fff; color: var(--ink); font-size: 16px; transition: .18s; }
.form-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(40,103,232,.11); }
.password-field { position: relative; }
.password-field input { padding-right: 68px; }
.text-button { position: absolute; right: 12px; top: 50%; padding: 6px; transform: translateY(-50%); border: 0; color: var(--blue); background: transparent; font-weight: 700; }
.primary-button { width: 100%; min-height: 54px; margin-top: 18px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); font-weight: 800; box-shadow: 0 10px 22px rgba(40,103,232,.2); }
.primary-button:disabled { cursor: wait; opacity: .58; }
.form-message { min-height: 22px; margin-top: 14px; color: var(--danger); font-size: 14px; font-weight: 700; }
.security-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-panel footer { color: #97a0af; font-size: 12px; text-align: center; }

.admin-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 250px; padding: 24px 17px 18px; color: #fff; background: var(--navy); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 5px; }
.sidebar-brand strong, .sidebar-brand span, .sidebar-user strong, .sidebar-user span { display: block; }
.sidebar-brand strong { font-size: 17px; }
.sidebar-brand span { margin-top: 3px; color: #8999b6; font-size: 11px; letter-spacing: .08em; }
.sidebar-nav { display: grid; gap: 3px; margin-top: 32px; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: #b9c5d8; text-decoration: none; font-size: 14px; font-weight: 700; }
.sidebar-nav a span { color: #667795; font-size: 10px; letter-spacing: .1em; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-nav a.active span { color: #66cee6; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 9px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.user-avatar { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 12px; background: #285eb4; font-weight: 850; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user span { margin-top: 3px; color: #7889a6; font-size: 10px; }
.admin-main { grid-column: 2; min-width: 0; padding: 0 34px 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 22px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.current-date { margin-right: 8px; color: var(--muted); font-size: 13px; }
.secondary-button, .icon-button { border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 700; }
.secondary-button { padding: 9px 13px; }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; font-size: 21px; }
.mobile-only { display: none; }
.warning-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 22px; padding: 13px 16px; border: 1px solid #f0d38b; border-radius: 11px; color: #77530b; background: #fff9e9; font-weight: 700; }
.warning-banner button { border: 0; color: var(--blue); background: transparent; font-weight: 800; }
.page-section { margin-top: 26px; }
.welcome-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 28px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); }
.welcome-card .eyebrow { color: #67d0e7; }
.welcome-card h2 { margin: 0 0 8px; font-size: 27px; }
.welcome-card p:last-child { margin: 0; color: #bdcae0; }
.status-pill { padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #cfe8f2; font-size: 12px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-top: 18px; }
.metric-grid article, .content-card { padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 26px rgba(33,50,82,.04); }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); }
.metric-grid strong { display: block; margin: 13px 0 6px; font-size: 34px; }
.metric-grid small { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.foundation-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.content-card h3 { margin: 0 0 16px; }
.content-card ul { display: grid; gap: 12px; padding: 0; list-style: none; }
.content-card li::before { content: "○"; margin-right: 9px; color: #93a0b4; }
.content-card li.done::before { content: "✓"; color: var(--success); font-weight: 900; }
.content-card dl { display: grid; gap: 13px; margin: 0; }
.content-card dl div { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.content-card dt { color: var(--muted); }
.content-card dd { margin: 0; font-weight: 750; }
.empty-module { display: grid; min-height: 500px; place-items: center; align-content: center; padding: 40px; border: 1px dashed #b9c5d5; border-radius: 16px; background: #fff; text-align: center; }
.empty-module span { color: #d9e0ea; font-size: 72px; font-weight: 900; }
.empty-module h2 { margin: 0; font-size: 28px; }
.empty-module p { max-width: 520px; color: var(--muted); }
.loading-screen { display: grid; min-height: 100vh; place-items: center; align-content: center; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid #dce5f2; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { width: min(500px,calc(100% - 30px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 80px rgba(11,28,55,.25); }
.modal::backdrop { background: rgba(9,20,40,.55); }
.modal form { padding: 25px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.modal-head h2 { margin: 0; }
.modal form > p { color: var(--muted); line-height: 1.6; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 310px; padding: 38px 28px; }
  .login-intro .eyebrow { margin-top: 24px; }
  .login-intro h1 { font-size: 44px; }
  .login-panel { min-height: 600px; padding: 50px 24px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar-open .sidebar { transform: translateX(0); box-shadow: 20px 0 50px rgba(10,25,50,.25); }
  .admin-shell { display: block; }
  .admin-main { padding: 0 18px 40px; }
  .mobile-only { display: grid; }
  .topbar { min-height: 82px; }
  .current-date { display: none; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .topbar-actions .secondary-button { padding: 8px; font-size: 12px; }
  .topbar h1 { font-size: 22px; }
  .foundation-grid { grid-template-columns: 1fr; }
  .welcome-card { align-items: start; flex-direction: column; }
  .warning-banner { align-items: start; flex-direction: column; }
}

