/* UOWD Autumn 2026 New Student Guide — stylesheet
   English/number typeface: AbuDhabiBasis (Light/Regular/Bold)
   Chinese: system sans-serif stack for clarity */

@font-face {
  font-family: 'AbuDhabiBasis';
  src: url('/assets/fonts/AbuDhabiBasis-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AbuDhabiBasis';
  src: url('/assets/fonts/AbuDhabiBasis-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AbuDhabiBasis';
  src: url('/assets/fonts/AbuDhabiBasis-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-950: #0a1a30;
  --navy-900: #0e2340;
  --navy-800: #14314f;
  --navy-700: #1c3f60;
  --navy-100: #e7edf5;
  --navy-50: #f3f6fa;
  --gold: #b9853a;
  --gold-dark: #93641f;
  --paper: #f7f5ef;
  --paper-card: #ffffff;
  --ink: #182634;
  --ink-soft: #43505d;
  --line: #dfe3ea;
  --green: #1f7a5c;
  --amber: #b8860b;
  --blue: #2a5c9a;
  --orange: #c0632a;
  --red: #c0392b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 10px rgba(14, 35, 64, 0.07), 0 1px 2px rgba(14, 35, 64, 0.06);
  --shadow-lift: 0 8px 24px rgba(14, 35, 64, 0.12);
  --font-latin: 'AbuDhabiBasis', 'Segoe UI', system-ui, sans-serif;
  --font-zh: 'AbuDhabiBasis', -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-zh);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-zh); font-weight: 700; color: var(--navy-900); margin: 0 0 .5em; letter-spacing: -0.01em; }
a { color: var(--navy-800); }
button { font-family: inherit; }
.en, .mono-en { font-family: var(--font-latin); }

img, video { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Layout shell ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 14px 24px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.sidebar-brand img { width: 100%; max-width: 190px; background: #fff; border-radius: 8px; padding: 6px 8px; }
.sidebar-search { margin: 0 4px 14px; }
.sidebar-search input {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 13.5px;
}
.sidebar-search input::placeholder { color: rgba(255,255,255,.55); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.82); text-decoration: none; font-size: 14.5px; cursor: pointer;
  min-height: 44px; align-items: center;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--gold); color: #241a08; font-weight: 700; }
.nav-item .en-tag { font-size: 11px; opacity: .7; font-family: var(--font-latin); }

.sidebar-foot { margin-top: 18px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 12px; color: rgba(255,255,255,.7); }
.sidebar-foot button { width: 100%; margin-top: 8px; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }

.topbar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  background: var(--navy-900); color: #fff; padding: 12px 16px;
  align-items: center; justify-content: space-between;
}
.topbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.topbar-brand img { height: 28px; }
.hamburger { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 16px; min-width: 44px; min-height: 44px; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,20,35,.55); z-index: 40; display: none; }
.drawer-backdrop.open { display: block; }

.main { flex: 1; min-width: 0; }
.main-inner { max-width: 1240px; margin: 0 auto; padding: 28px 32px 80px; }

/* ---------------- Cards / primitives ---------------- */
.card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1.4px solid transparent; white-space: nowrap;
}
.badge-confirmed { color: var(--green); background: #eaf6f1; border-color: #bfe4d5; }
.badge-pending { color: var(--amber); background: #fbf3e0; border-color: #efd99e; }
.badge-individual { color: var(--blue); background: #eaf1fa; border-color: #c3d8f0; }
.badge-volatile { color: var(--orange); background: #fcefe6; border-color: #f0c9a8; }
.badge-conflict { color: var(--red); background: #fff; border-color: var(--red); }

.last-verified { font-size: 12px; color: var(--ink-soft); }
.disclaimer-box {
  border-left: 3px solid var(--gold); background: var(--navy-50); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; color: var(--ink-soft);
}
.notice-box {
  border: 1.4px dashed var(--red); background: #fff6f5; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13.5px; color: #7a2318;
}
.warn-box {
  border: 1px solid #efd99e; background: #fbf3e0; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13.5px; color: #6b5312;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1.5px solid transparent; text-decoration: none; min-height: 44px;
}
.btn-primary { background: var(--gold); color: #241a08; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; min-height: 34px; }

table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-soft); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }

.external-link { display: inline-flex; align-items: center; gap: 4px; }
.external-link .dom { font-size: 11.5px; color: var(--ink-soft); font-family: var(--font-latin); }

.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.section-title h2 { margin: 0; }
.section-sub { color: var(--ink-soft); font-size: 13.5px; margin-top: -6px; margin-bottom: 16px; }

.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill-tab { padding: 7px 14px; border-radius: 999px; border: 1.4px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; min-height: 36px; }
.pill-tab.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

.timeline-item { display: grid; grid-template-columns: 108px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-date { font-family: var(--font-latin); font-weight: 700; color: var(--navy-800); font-size: 13.5px; }
.timeline-state { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.state-done { background: #eef1f4; color: #7a8492; }
.state-now { background: #eaf6f1; color: var(--green); }
.state-soon { background: #eaf1fa; color: var(--blue); }
.state-over { background: #f4f4f4; color: #9aa2ab; }
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
}

.checklist-group { margin-bottom: 18px; }
.checklist-progress { height: 8px; border-radius: 999px; background: var(--navy-50); overflow: hidden; margin: 6px 0 12px; }
.checklist-progress > div { height: 100%; background: var(--gold); }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold-dark); }
.check-row.done label { text-decoration: line-through; color: var(--ink-soft); }

.video-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.video-card video { width: 100%; display: block; background: #000; aspect-ratio: 16/9; }
.video-card .video-meta { padding: 12px 14px; }

.emergency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .emergency-grid { grid-template-columns: 1fr; } }
.emergency-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-sm); background: var(--navy-900); color: #fff; }
.emergency-tile a { color: #fff; font-size: 20px; font-weight: 700; font-family: var(--font-latin); text-decoration: none; }
.emergency-tile .label { font-size: 12.5px; color: rgba(255,255,255,.75); }

.hero {
  background: radial-gradient(circle at top right, var(--navy-700), var(--navy-950));
  color: #fff; border-radius: 20px; padding: 40px 34px; margin-bottom: 20px;
}
.hero .en-title { font-family: var(--font-latin); font-size: 14px; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }
.hero h1 { color: #fff; font-size: 30px; margin: 6px 0 4px; }
.hero .uni { color: rgba(255,255,255,.85); margin-bottom: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.status-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
@media (max-width: 860px) { .status-cards { grid-template-columns: 1fr; } }

.mistake-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .mistake-row { grid-template-columns: 1fr; } }

.subject-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.subject-filters select { padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 13.5px; min-height: 40px; }

footer.site-footer { background: var(--navy-950); color: rgba(255,255,255,.7); padding: 30px 32px; font-size: 12.5px; text-align: center; }
footer.site-footer img { max-width: 160px; background: #fff; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }

/* Auth gate pages */
.gate-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--navy-950), var(--navy-800)); padding: 24px; }
.gate-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow-lift); text-align: center; }
.gate-card img.logo { max-width: 230px; margin-bottom: 6px; }
.gate-card .brand-line { color: var(--ink-soft); font-size: 13px; margin-bottom: 22px; }
.gate-card h1 { font-size: 19px; }
.gate-form { text-align: left; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.gate-form label { font-size: 13px; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.gate-form input, .gate-form select {
  width: 100%; padding: 12px 13px; border-radius: 10px; border: 1.4px solid var(--line); font-size: 15px; min-height: 44px;
}
.dob-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; }
.gate-error { color: var(--red); font-size: 13px; min-height: 18px; text-align: left; }
.gate-note { font-size: 12px; color: var(--ink-soft); margin-top: 18px; text-align: left; }

/* Admin */
.admin-shell { max-width: 980px; margin: 0 auto; padding: 30px 20px 70px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-table input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.form-row input { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13.5px; }
.msg-ok { color: var(--green); font-size: 13px; }
.msg-err { color: var(--red); font-size: 13px; }

@media (max-width: 980px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .sidebar.drawer-open { display: flex; flex-direction: column; position: fixed; z-index: 50; height: 100vh; }
  .main-inner { padding: 20px 16px 60px; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 24px; }
}
