/* ============================================================
   GCTU JOB PORTAL — DESIGN SYSTEM
   Editorial · Navy & Amber · Confident, institutional, modern
   ============================================================ */

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

:root {
  --navy:        #0a2540;
  --navy-700:    #143864;
  --navy-50:     #eef3fb;
  --amber:       #f5a623;
  --amber-dark:  #c47e08;
  --cream:       #fbf7ef;
  --cream-dark:  #f0e9d8;
  --ink:         #1c1c1c;
  --ink-soft:    #4a4a4a;
  --ink-muted:   #7a7a7a;
  --line:        #e6dfcc;
  --line-soft:   #f0ead9;
  --white:       #ffffff;
  --success:     #16a34a;
  --danger:      #dc2626;
  --warning:     #f59e0b;
  --info:        #3b82f6;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  --radius:    14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10,37,64,.06), 0 1px 3px rgba(10,37,64,.04);
  --shadow:    0 4px 14px rgba(10,37,64,.08);
  --shadow-lg: 0 20px 50px rgba(10,37,64,.14);

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--amber-dark); }

h1,h2,h3,h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h3 { font-size: 1.2rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--amber-dark);
  display: inline-block;
}

/* =================== LAYOUT =================== */
.container { width: min(1180px, 92%); margin: 0 auto; }
.container--narrow { width: min(820px, 92%); margin: 0 auto; }

/* =================== TOPBAR =================== */
.topbar {
  background: var(--navy);
  color: var(--cream);
  padding: 8px 0;
  font-size: 12px;
  letter-spacing: .5px;
}
.topbar .container { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.topbar a { color: var(--cream); opacity: .8; }
.topbar a:hover { color: var(--amber); opacity: 1; }

/* =================== HEADER =================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--amber);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  opacity: .4;
}
.brand-text .brand-uni {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.brand-text .brand-portal {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.nav { display: flex; gap: 30px; align-items: center; }
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav a:hover, .nav a.active { color: var(--navy); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--amber);
}

/* =================== HERO =================== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(245,166,35,.12), transparent 60%),
    radial-gradient(ellipse 50% 70% at 10% 90%, rgba(10,37,64,.06), transparent 60%),
    var(--cream);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .4;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 30px; } }

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--amber-dark); font-style: italic; font-weight: 500; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 540px; margin-bottom: 30px; }
.hero-stats {
  display: flex; gap: 36px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stat .num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.hero-stat .lbl {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Editorial vertical line decoration */
.hero-art {
  position: relative;
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-art::before {
  content: '';
  position: absolute;
  top: -14px; left: 30px;
  height: 28px; width: 4px;
  background: var(--amber);
}
.hero-art-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--amber-dark);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-art h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
}
.hero-art ol {
  margin: 0; padding-left: 18px;
  font-size: 14px; color: var(--ink-soft);
}
.hero-art ol li { padding: 6px 0; }
.hero-art ol li::marker { color: var(--amber-dark); font-weight: 700; }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  border: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(10,37,64,.25);
}
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); color: var(--cream); box-shadow: 0 8px 20px rgba(10,37,64,.3); }
.btn-amber {
  background: var(--amber);
  color: var(--navy);
}
.btn-amber:hover { background: var(--amber-dark); color: var(--white); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.btn-soft {
  background: var(--cream-dark);
  color: var(--navy);
}
.btn-soft:hover { background: var(--amber); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* =================== SECTIONS =================== */
.section { padding: 80px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: 8px; }

/* =================== JOB CARDS =================== */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.job-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.job-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s var(--ease);
}
.job-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--cream-dark);
}
.job-card:hover::before { transform: scaleY(1); }
.job-card .ref {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 1.5px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.job-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.job-card h3 a { color: var(--navy); }
.job-card .dept {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.job-card .summary {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-card .meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--cream-dark);
  color: var(--navy);
  letter-spacing: .3px;
}
.chip.warn { background: #fef3c7; color: #92400e; }
.chip.success { background: #dcfce7; color: #15803d; }
.chip.danger  { background: #fee2e2; color: #991b1b; }
.job-card .footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line-soft); padding-top: 14px;
}
.job-card .closes {
  font-size: 12px; color: var(--ink-muted);
}
.job-card .closes strong { color: var(--ink); }

/* =================== JOB DETAIL =================== */
.job-detail {
  background: var(--white);
  border-radius: var(--radius);
  padding: 50px 60px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin: 40px auto;
  position: relative;
}
@media (max-width: 720px) { .job-detail { padding: 30px 24px; } }
.job-detail .ref-band {
  display: flex; gap: 16px; align-items: center;
  font-size: 12px; color: var(--ink-muted);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
}
.job-detail h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.job-detail .lede {
  font-size: 18px; color: var(--ink-soft);
  border-left: 3px solid var(--amber);
  padding-left: 18px;
  margin: 24px 0 30px;
  font-family: var(--serif);
  font-style: italic;
}
.job-detail .meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.meta-row .item .l { font-size: 11px; color: var(--ink-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.meta-row .item .v { font-size: 15px; color: var(--navy); font-weight: 600; font-family: var(--serif); }

.section-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-top: 32px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
}
.section-title::before {
  content: ''; height: 1.4em; width: 4px; background: var(--amber); border-radius: 2px;
}
.rich-list { padding-left: 18px; margin: 0; }
.rich-list li { padding: 6px 0; color: var(--ink-soft); }
.rich-list li::marker { color: var(--amber-dark); }

/* =================== WIZARD =================== */
.wizard {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  margin: 30px auto;
}
.wizard-head {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: var(--cream);
  padding: 30px 40px 20px;
  position: relative;
}
.wizard-head .eyebrow { color: var(--amber); }
.wizard-head h2 {
  color: var(--white);
  font-family: var(--serif);
  margin: 6px 0 0;
  font-size: 1.6rem;
}
.wizard-head .for-job {
  margin-top: 8px;
  font-size: 14px;
  color: var(--cream);
  opacity: .8;
}

.steps {
  display: flex;
  padding: 24px 40px;
  background: var(--navy-700);
  gap: 4px;
  overflow-x: auto;
}
.step {
  flex: 1;
  min-width: 100px;
  position: relative;
  text-align: center;
  padding: 8px 4px;
  opacity: .45;
  transition: opacity .25s var(--ease);
}
.step.active { opacity: 1; }
.step.done   { opacity: .85; }
.step .num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--cream);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  margin: 0 auto 8px;
  border: 1.5px solid rgba(245,166,35,.4);
  transition: all .25s var(--ease);
}
.step.active .num { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.step.done .num   { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.step .lbl {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--cream); font-weight: 500;
}

.wizard-body { padding: 40px 50px; }
@media (max-width: 720px) { .wizard-body { padding: 30px 24px; } .wizard-head, .steps { padding-left: 24px; padding-right: 24px; } }

.wizard-step { display: none; animation: fade .3s var(--ease); }
.wizard-step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wizard-step h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.wizard-step .hint {
  color: var(--ink-muted); font-size: 14px; margin-bottom: 24px;
}

.wizard-foot {
  border-top: 1px solid var(--line);
  padding: 22px 40px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--cream);
}
@media (max-width: 720px) { .wizard-foot { padding: 18px 24px; flex-wrap: wrap; gap: 12px; } }
.wizard-foot .progress-text { font-size: 13px; color: var(--ink-muted); }

/* =================== FORMS =================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 22px;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.col-span-2 { grid-column: span 2; }
@media (max-width: 600px) {
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: auto; }
}
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.field label .req { color: var(--danger); }
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  transition: all .15s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,166,35,.18);
}
.field .help { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.field .err  { font-size: 12px; color: var(--danger); margin-top: 4px; }

.file-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  background: var(--cream);
  transition: all .2s var(--ease);
  cursor: pointer;
  position: relative;
}
.file-drop:hover { border-color: var(--amber); background: var(--white); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .icon {
  width: 42px; height: 42px;
  margin: 0 auto 10px;
  background: var(--amber);
  color: var(--navy);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
}
.file-drop .title { font-weight: 600; color: var(--navy); font-family: var(--serif); }
.file-drop .sub   { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.file-drop.has-file { border-style: solid; border-color: var(--success); background: #f0fdf4; }

/* Repeater */
.repeater-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
}
.repeater-item .remove {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none;
  color: var(--danger); cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.repeater-add {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream-dark);
  color: var(--navy);
  border: 1px dashed var(--navy);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.repeater-add:hover { background: var(--amber); border-style: solid; }

/* Review */
.review-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 16px;
}
.review-card h4 {
  font-family: var(--serif);
  margin: 0 0 12px;
  color: var(--navy);
  display: flex; align-items: center; gap: 10px;
}
.review-card h4 .edit {
  font-size: 12px; color: var(--amber-dark); font-family: var(--sans);
  font-weight: 500; text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer; background: none; border: none; margin-left: auto;
}
.review-card dl { display: grid; grid-template-columns: 1fr 2fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.review-card dt { color: var(--ink-muted); }
.review-card dd { margin: 0; color: var(--ink); font-weight: 500; }

/* =================== ALERTS / FLASH =================== */
.flash {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 4px solid;
}
.flash--success { background: #f0fdf4; border-color: var(--success); color: #166534; }
.flash--error   { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.flash--info    { background: #eff6ff; border-color: var(--info);    color: #1e40af; }
.flash--warn    { background: #fefce8; border-color: var(--warning); color: #854d0e; }

/* =================== TABLES =================== */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.tbl th {
  background: var(--cream);
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-muted);
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--cream); }
.tbl .name { font-weight: 600; color: var(--navy); font-family: var(--serif); }
.tbl .muted { color: var(--ink-muted); font-size: 13px; }
.tbl .actions { display: flex; gap: 8px; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
}
.dot.unseen { background: var(--amber); box-shadow: 0 0 0 4px rgba(245,166,35,.2); }
.dot.seen { background: #cbd5e1; }

/* =================== ADMIN LAYOUT =================== */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
@media (max-width: 880px) { .admin-shell { grid-template-columns: 1fr; } .sidebar { display: none; } }
.sidebar {
  background: var(--navy);
  color: var(--cream);
  padding: 28px 0;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  padding: 0 24px 26px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 18px;
}
.sidebar .brand-mark { background: var(--amber); color: var(--navy); }
.sidebar .brand-mark::after { border-color: rgba(245,166,35,.4); }
.sidebar .brand-text .brand-uni { color: rgba(255,255,255,.5); }
.sidebar .brand-text .brand-portal { color: var(--cream); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 14px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s var(--ease);
}
.sidebar nav a:hover { background: rgba(255,255,255,.05); color: var(--cream); }
.sidebar nav a.active {
  background: var(--amber);
  color: var(--navy);
  font-weight: 600;
}
.sidebar nav a .ico { width: 18px; opacity: .8; }
.sidebar .who {
  margin-top: auto; padding: 20px 24px; font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 26px;
}
.sidebar .who .name { color: var(--cream); font-weight: 600; }
.sidebar .who .role { color: rgba(255,255,255,.5); }

.admin-main { padding: 40px 50px; max-width: 100%; overflow-x: auto; }
@media (max-width: 720px) { .admin-main { padding: 24px; } }

.admin-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 30px; flex-wrap: wrap; gap: 16px;
}
.admin-head h1 { font-size: 1.8rem; margin: 0; }
.admin-head .eyebrow { margin-bottom: 4px; }

/* Stat tiles */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 30px;
}
.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--amber);
  opacity: .08;
}
.stat .l { font-size: 11px; color: var(--ink-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.stat .v { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--navy); }
.stat .d { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* Card panel */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 1.2rem; }

/* Toolbar / filters */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap;
  align-items: center; margin-bottom: 18px;
}
.toolbar input, .toolbar select {
  font-family: var(--sans);
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 14px;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--amber); }

/* =================== AUTH (LOGIN) =================== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--navy);
}
@media (max-width: 880px) { .auth-shell { grid-template-columns: 1fr; } .auth-art { display: none; } }
.auth-art {
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(245,166,35,.25), transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(245,166,35,.1), transparent 60%),
    var(--navy);
  color: var(--cream);
  padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 50px 50px;
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art .quote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
  font-style: italic;
  letter-spacing: -.01em;
}
.auth-art .quote .accent { color: var(--amber); }
.auth-art .meta { font-size: 13px; opacity: .7; letter-spacing: 1px; text-transform: uppercase; }

.auth-form-wrap {
  background: var(--cream);
  padding: 60px;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-form { max-width: 380px; width: 100%; }
.auth-form h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-form .sub { color: var(--ink-muted); margin-bottom: 28px; }

/* =================== FOOTER =================== */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .site-footer .container { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: var(--amber);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.site-footer p, .site-footer a { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.8; }
.site-footer a:hover { color: var(--amber); }
.site-footer .bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center; font-size: 12px; color: rgba(255,255,255,.5);
}

/* Utility */
.muted { color: var(--ink-muted); }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap { gap: 12px; }
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* Print */
@media print {
  .topbar, .site-header, .site-footer, .sidebar, .toolbar, .btn { display: none !important; }
  body { background: white; }
  .admin-main { padding: 0; }
}

/* ============================================================
   ADMIN — page heads, tables, cards, modals, detail view
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  margin: .15rem 0 .25rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.page-head .muted { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.page-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

.back-link {
  font-size: .82rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--navy); }

/* Buttons (additive helpers) */
.btn.btn-sm  { padding: .35rem .65rem; font-size: .82rem; }
.btn.full    { width: 100%; }

/* Toolbar */
.toolbar {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.4rem;
  flex-wrap: wrap;
}
.toolbar .field { display: flex; flex-direction: column; gap: .25rem; min-width: 9rem; }
.toolbar .field.grow { flex: 1 1 12rem; }
.toolbar .field label { font-size: .7rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.toolbar .field input,
.toolbar .field select {
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: .92rem;
  background: #fff;
}
.toolbar .field input:focus,
.toolbar .field select:focus { outline: 2px solid var(--amber); outline-offset: -1px; border-color: var(--amber); }

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.data-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}
.data-table tbody td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fdfcf6; }
.data-table .right, .data-table th.right { text-align: right; }
.cell-strong { font-weight: 600; color: var(--ink); }
.cell-sub    { font-size: .8rem; color: var(--ink-soft); margin-top: .15rem; }
.row-unseen .cell-strong { color: var(--navy); }
.row-unseen { background: rgba(245,166,35,.04); }

/* View dots */
.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot.unseen {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245,166,35,.18);
  animation: pulse 2s ease-out infinite;
}
.dot.seen { background: #cbd2d8; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,166,35,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(245,166,35,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
}

/* Empty state */
.empty-state {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--ink-soft);
}
.empty-icon { font-size: 2.5rem; color: var(--amber); margin-bottom: .8rem; }
.empty-state h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; color: var(--ink); margin: 0 0 .4rem; }

/* Chips */
.chip {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .04em;
  background: #f0eee5;
  color: var(--ink);
  border: 1px solid var(--line);
}
.chip.ok   { background: #e8f5ec; color: #1e6b3a; border-color: #cde5d4; }
.chip.bad  { background: #fbeaea; color: #8a2424; border-color: #f0c8c8; }
.chip.warn { background: #fff4e0; color: #8a5a00; border-color: #f0d9a8; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}
.card.narrow { max-width: 560px; }
.card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-title .muted { font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--ink-soft); font-weight: 400; }

/* Detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.4rem;
}
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }

/* Key-value list */
.kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1.4rem;
  margin: 0;
}
.kv > div            { display: contents; }
.kv > div.full       { grid-column: 1 / -1; display: block; }
.kv > div.full dt    { margin-bottom: .25rem; }
.kv dt {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0;
}
.kv dd {
  margin: 0;
  font-size: .94rem;
  color: var(--ink);
}
.kv.compact { grid-template-columns: 1fr; gap: .6rem; }
.kv.compact dt { font-size: .68rem; }
.kv.compact dd { font-size: .88rem; }

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.2rem;
  padding: .9rem 0;
  border-bottom: 1px dashed var(--line);
}
.timeline li:last-child { border-bottom: none; }
.t-year { font-size: .82rem; color: var(--ink-soft); padding-top: .15rem; font-variant-numeric: tabular-nums; }
.t-title { font-weight: 600; color: var(--navy); margin-bottom: .15rem; }
.t-sub   { font-size: .9rem; color: var(--ink); margin-bottom: .25rem; }
.t-meta  { font-size: .82rem; color: var(--ink-soft); }

/* Cover block */
.cover-block {
  background: #fafaf2;
  border-left: 3px solid var(--amber);
  padding: 1rem 1.1rem;
  border-radius: 0 6px 6px 0;
  font-size: .94rem;
  line-height: 1.6;
}

/* Referee cards */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.ref-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem 1rem;
  background: #fafaf7;
}
.ref-name { font-weight: 600; color: var(--navy); }
.ref-role { font-size: .82rem; color: var(--ink-soft); margin: .2rem 0 .4rem; }
.ref-contact { font-size: .85rem; }

/* Notes */
.note-form textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: .94rem;
  resize: vertical;
  min-height: 70px;
  margin-bottom: .6rem;
}
.note-form textarea:focus { outline: 2px solid var(--amber); outline-offset: -1px; border-color: var(--amber); }
.note-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.note-list li {
  padding: .85rem 0;
  border-top: 1px dashed var(--line);
}
.note-list li:first-child { border-top: none; padding-top: 0; }
.note-meta { font-size: .85rem; margin-bottom: .25rem; }
.note-body { font-size: .94rem; line-height: 1.55; }

/* Documents sidebar */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: .7rem;
  align-items: center;
  padding: .7rem 0;
  border-top: 1px dashed var(--line);
}
.doc-list li:first-child { border-top: none; padding-top: 0; }
.doc-ico { font-size: 1.2rem; }
.doc-name { font-weight: 600; font-size: .92rem; }
.doc-sub { font-size: .78rem; color: var(--ink-soft); margin-top: .1rem; }

/* Visibility */
.visibility-block {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: .75rem 0;
}
.visibility-block .dot { width: 12px; height: 12px; }
.small { font-size: .8rem; }
.viewer-list { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.viewer-row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .25rem 0;
  font-size: .85rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.4);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem 2rem;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-body {
  background: #fff;
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  animation: modalIn .22s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0;
  color: var(--navy);
}
.modal-x {
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
  padding: 0 .3rem;
}
.modal-x:hover { color: var(--ink); }
.modal-form { padding: 1.4rem; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: .6rem;
  padding-top: 1rem; margin-top: .6rem;
  border-top: 1px solid var(--line);
}

/* Two-column form grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-2 .field.full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* Vertical forms */
.vform .field { margin-bottom: 1rem; }
.vform input, .vform select, .vform textarea {
  width: 100%;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: .95rem;
}
.vform label { display: block; font-size: .78rem; color: var(--ink-soft); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .04em; }


/* ============================================================
   Patch: auth split-screen extras + timeline body class
   Used by admin/change-password.php (when must_change_password=1)
   ============================================================ */
.auth-body {
  background: var(--cream);
  margin: 0;
}
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: var(--cream);
}
.auth-mark {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--amber);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 24px;
}
.auth-quote {
  margin-top: auto;
}
.auth-quote p {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--cream);
  font-style: italic;
  margin: 0 0 .6rem;
}
.auth-quote small {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-footnote {
  margin-top: 1.8rem;
  font-size: .85rem;
  text-align: center;
}
.auth-footnote a { color: var(--ink-soft); }
.auth-footnote a:hover { color: var(--navy); }

/* timeline body class shorthand (alias if not already defined) */
.t-body { display: block; }

/* ============================================================
   Patch: application detail two-column layout
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }

@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* ============================================================
   GCTU logo replacement (replaces old .brand-mark circle)
   ============================================================ */
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* In the admin sidebar (navy background) the logo sits slightly smaller
   and next to the wordmark. */
.brand-logo--admin {
  height: 44px;
}

/* Mobile: scale the public header logo down a touch */
@media (max-width: 600px) {
  .brand-logo { height: 42px; }
  .brand-logo--admin { height: 38px; }
}
