/* ═══════════════════════════════════════════════════════════════
   FIJI MINISTRY OF ENVIRONMENT — FORMS PORTAL v3
   Cormorant Garamond + Outfit · Navy/Teal · White Background
   Mobile-first · PWA-ready · Production-grade
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─── */
:root {
  --navy:        #0B2D4E;
  --navy-mid:    #153D63;
  --blue:        #1B6CA8;
  --blue-soft:   #EAF3FB;
  --teal:        #0D8C7E;
  --teal-soft:   #E5F5F3;
  --gold:        #B8860B;
  --gold-soft:   #FBF3DC;
  --coral:       #C94F36;
  --coral-soft:  #FCEAE7;
  --green:       #1A7A4A;
  --green-soft:  #E8F7EE;

  --bg:          #F7F9FC;
  --surface:     #FFFFFF;
  --border:      #DDE4EE;
  --border-mid:  #C7D2E0;
  --muted:       #7A8FA6;
  --body:        #2C3E50;
  --heading:     #0B2D4E;

  --shadow-xs:   0 1px 2px rgba(11,45,78,.04);
  --shadow-sm:   0 2px 8px rgba(11,45,78,.06), 0 1px 2px rgba(11,45,78,.04);
  --shadow:      0 4px 20px rgba(11,45,78,.08), 0 2px 6px rgba(11,45,78,.04);
  --shadow-lg:   0 12px 40px rgba(11,45,78,.12), 0 4px 12px rgba(11,45,78,.06);

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --ease: cubic-bezier(.4,0,.2,1);
  --t:    .18s;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--body);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); line-height: 1.2; }

/* ═══════════════════════════════════════════
   TOP NAV
═══════════════════════════════════════════ */
.topnav {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  height: 60px;
  display: flex; align-items: center;
  padding: 0 clamp(16px, 4vw, 40px);
  gap: 12px;
}
.topnav-brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex: 1;
}
.topnav-emblem {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(11,45,78,.25);
}
.topnav-emblem svg { color: white; }
.topnav-name {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--navy); display: block; letter-spacing: .01em;
}
.topnav-sub { font-size: 10.5px; color: var(--muted); display: block; letter-spacing: .02em; }
.topnav-actions { display: flex; align-items: center; gap: 8px; }
.topnav-chip {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  color: var(--muted); background: var(--bg); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
  display: none;
}
@media (min-width: 640px) { .topnav-chip { display: block; } }
.btn-nav-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 7px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: white;
  cursor: pointer; text-decoration: none;
  transition: all var(--t) var(--ease);
}
.btn-nav-back:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }

/* ═══════════════════════════════════════════
   FORM HERO BANNER
═══════════════════════════════════════════ */
.form-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.form-hero-inner {
  max-width: 1100px; margin: 0 auto;
  padding: clamp(24px,4vw,40px) clamp(16px,4vw,40px) 0;
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 18px;
}
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border-mid); }
.hero-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-chip {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  color: var(--blue); background: var(--blue-soft);
  border: 1px solid rgba(27,108,168,.18);
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .08em; text-transform: uppercase;
  display: inline-block; margin-bottom: 8px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(20px,4vw,28px);
  font-weight: 700; color: var(--navy); margin-bottom: 6px;
}
.hero-desc { font-size: 13px; color: var(--muted); max-width: 520px; line-height: 1.6; }
.hero-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; color: var(--teal);
  background: var(--teal-soft); border: 1px solid rgba(13,140,126,.2);
  padding: 6px 14px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.75)} }

/* ─── TAB BAR ─── */
.tabbar {
  display: flex; overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--border); margin-top: 4px;
  -webkit-overflow-scrolling: touch;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 18px; font-size: 12.5px; font-weight: 500; color: var(--muted);
  border: none; background: transparent; cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap; flex-shrink: 0;
  transition: all var(--t) var(--ease);
}
.tabbar-btn:hover { color: var(--body); background: var(--bg); }
.tabbar-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabbar-btn.done { color: var(--teal); }
.tab-num {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  background: var(--bg); color: var(--muted); transition: all var(--t) var(--ease);
}
.tabbar-btn.active .tab-num { background: var(--blue); color: white; }
.tabbar-btn.done .tab-num { background: var(--teal); color: white; }

/* ═══════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════ */
.form-body {
  max-width: 1100px; margin: 28px auto;
  padding: 0 clamp(12px,3vw,40px);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px; align-items: start;
}
@media (max-width: 860px) {
  .form-body { grid-template-columns: 1fr; }
  .form-sidebar { display: none; }
}

/* ═══════════════════════════════════════════
   FORM PANEL
═══════════════════════════════════════════ */
.form-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .22s var(--ease); }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ─── Section Label ─── */
.pane-header { padding: 28px 32px 0; }
@media (max-width: 600px) { .pane-header { padding: 20px 18px 0; } }
.pane-eyebrow {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px;
}
.pane-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.pane-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pane-divider { height: 1px; background: var(--border); margin: 18px 32px 0; }
@media (max-width: 600px) { .pane-divider { margin: 14px 18px 0; } }

/* ─── Legal Notice ─── */
.legal-alert {
  margin: 24px 32px 0;
  padding: 14px 18px; border-radius: var(--r-sm);
  background: var(--gold-soft); border: 1px solid rgba(184,134,11,.2);
  border-left: 3px solid var(--gold);
  display: flex; gap: 12px; align-items: flex-start;
}
@media (max-width: 600px) { .legal-alert { margin: 16px 18px 0; } }
.legal-alert-icon { color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.legal-alert-title { font-size: 10.5px; font-weight: 700; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.legal-alert-text { font-size: 12.5px; color: #7A5C00; line-height: 1.65; }

/* ─── Sub-section header ─── */
.fg { padding: 22px 32px; }
@media (max-width: 600px) { .fg { padding: 16px 18px; } }
.fg + .fg { padding-top: 0; }
.sub-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.sub-head-letter {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--navy); color: white; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
}
.sub-head-title { font-size: 13px; font-weight: 600; color: var(--heading); }
.sub-head-tag {
  margin-left: auto; font-family: var(--font-mono); font-size: 9.5px;
  color: var(--muted); background: var(--bg); padding: 2px 7px;
  border-radius: 4px;
}

/* ─── FIELD GRID ─── */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-1 { grid-template-columns: 1fr; }
.col-full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 641px) and (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ─── FIELD GROUP ─── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 12px; font-weight: 600; color: var(--heading);
  letter-spacing: .02em; display: flex; align-items: center; gap: 4px;
}
.req { color: var(--coral); }
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ─── INPUTS ─── */
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], input[type="url"],
select, textarea {
  font-family: var(--font-body); font-size: 13.5px; color: var(--body);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 9px 12px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  outline: none; width: 100%;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,108,168,.1);
}
input::placeholder, textarea::placeholder { color: var(--muted); font-weight: 300; }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
input[readonly] { background: var(--bg); color: var(--muted); cursor: default; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A8FA6' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px; cursor: pointer;
}

/* ─── RADIO / CHECK CARDS ─── */
.option-group { display: flex; flex-direction: column; gap: 8px; }
.option-group.row { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.option-card {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 10px 13px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); transition: all var(--t) var(--ease);
  background: white;
}
.option-card:hover { border-color: var(--blue); background: var(--blue-soft); }
.option-card input[type="radio"], .option-card input[type="checkbox"] {
  width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px;
  accent-color: var(--blue); border: none; padding: 0;
  background: none; box-shadow: none; cursor: pointer;
}
.option-card input[type="checkbox"] { accent-color: var(--teal); }
.option-card span { font-size: 13px; color: var(--body); }
.option-card .sub-text { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }

/* ─── FILE UPLOAD ─── */
.upload-area {
  border: 2px dashed var(--border-mid); border-radius: var(--r);
  padding: 24px 20px; text-align: center; cursor: pointer;
  transition: all var(--t) var(--ease); background: var(--bg);
  position: relative; overflow: hidden;
}
.upload-area:hover, .upload-area.over { border-color: var(--blue); background: var(--blue-soft); }
.upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  cursor: pointer; border: none; background: none; padding: 0; box-shadow: none;
}
.upload-icon-wrap {
  width: 42px; height: 42px; margin: 0 auto 10px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs); transition: border-color var(--t) var(--ease);
}
.upload-area:hover .upload-icon-wrap { border-color: var(--blue); }
.upload-title { font-size: 13px; font-weight: 600; color: var(--body); margin-bottom: 3px; }
.upload-title em { color: var(--blue); font-style: normal; text-decoration: underline; }
.upload-sub { font-size: 11.5px; color: var(--muted); }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.file-entry {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; background: white;
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.file-entry-icon {
  width: 30px; height: 30px; background: var(--blue-soft);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--blue);
}
.file-entry-name {
  flex: 1; font-size: 12.5px; font-weight: 500; color: var(--body);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-entry-size { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
.file-entry-del {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 3px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; transition: all var(--t) var(--ease);
}
.file-entry-del:hover { color: var(--coral); background: var(--coral-soft); }

/* ─── CHECKLIST ─── */
.cl-wrap { padding: 24px 32px; }
@media (max-width: 600px) { .cl-wrap { padding: 16px 18px; } }
.cl-progress-bar-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  padding: 12px 16px; background: var(--bg); border-radius: var(--r);
  border: 1px solid var(--border);
}
.cl-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cl-bar-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width .4s var(--ease);
}
.cl-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.cl-list { display: flex; flex-direction: column; gap: 9px; }
.cl-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer;
  transition: all var(--t) var(--ease); background: white;
}
.cl-card:hover { border-color: var(--teal); background: var(--teal-soft); }
.cl-card.checked { border-color: var(--teal); background: var(--teal-soft); }
.cl-card input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--teal); border: none; padding: 0; background: none; box-shadow: none;
}
.cl-card-title { font-size: 12.5px; font-weight: 600; color: var(--heading); line-height: 1.4; margin-bottom: 2px; }
.cl-card.checked .cl-card-title { color: var(--teal); }
.cl-card-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ─── DECLARATION ─── */
.decl-box {
  margin: 24px 32px 20px;
  padding: 20px 22px; background: var(--navy);
  border-radius: var(--r); color: rgba(255,255,255,.82);
  font-size: 13px; line-height: 1.75;
}
@media (max-width: 600px) { .decl-box { margin: 16px 18px 14px; } }
.decl-box h4 {
  font-family: var(--font-display); color: white; font-size: 14px;
  font-weight: 600; margin-bottom: 10px;
}
.decl-box ul { padding-left: 18px; }
.decl-box li { margin-bottom: 7px; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 32px 22px; }
@media (max-width: 600px) { .sig-grid { grid-template-columns: 1fr; padding: 0 18px 16px; } }
.sig-block {
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 16px; background: var(--bg);
}
.sig-block-label {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.sig-line { height: 42px; border-bottom: 1.5px solid var(--border-mid); margin-bottom: 13px; }

/* ─── OFFICES ─── */
.offices-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 0 32px 28px; }
@media (max-width: 700px) { .offices-grid { grid-template-columns: 1fr; } }
.office-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 16px;
}
.office-name { font-size: 11.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.office-detail { font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ─── FOOTER NAV ─── */
.pane-footer {
  border-top: 1px solid var(--border); padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: var(--bg); flex-wrap: wrap;
}
@media (max-width: 600px) { .pane-footer { padding: 14px 18px; } }
.pane-footer-left, .pane-footer-right { display: flex; gap: 9px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 18px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  border: none; border-radius: var(--r-sm); cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition: all var(--t) var(--ease); line-height: 1;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 2px 8px rgba(27,108,168,.28); }
.btn-primary:hover { background: #155C92; box-shadow: 0 4px 14px rgba(27,108,168,.38); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: white; color: var(--body); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { color: var(--body); background: var(--bg); }
.btn-save { background: var(--teal-soft); color: var(--teal); border: 1.5px solid rgba(13,140,126,.22); }
.btn-save:hover { background: var(--teal); color: white; }
.btn-submit {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  color: white; padding: 11px 26px;
  box-shadow: 0 4px 16px rgba(13,140,126,.3);
}
.btn-submit:hover { box-shadow: 0 6px 22px rgba(13,140,126,.4); transform: translateY(-1px); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.form-sidebar { display: flex; flex-direction: column; gap: 16px; }
.scard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-xs);
}
.scard-title {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.scard-title svg { color: var(--blue); }
/* Progress steps */
.step-list { display: flex; flex-direction: column; gap: 3px; }
.step-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--t) var(--ease);
}
.step-item:hover { background: var(--bg); }
.step-item.active { background: var(--blue-soft); }
.step-item.done {}
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); background: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9.5px; color: var(--muted);
  transition: all var(--t) var(--ease);
}
.step-item.active .step-dot { border-color: var(--blue); background: var(--blue); color: white; }
.step-item.done .step-dot { border-color: var(--teal); background: var(--teal); color: white; }
.step-label { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.step-item.active .step-label { color: var(--blue); font-weight: 600; }
.step-item.done .step-label { color: var(--teal); }
/* Save indicator */
.save-ind {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  padding: 9px 12px; background: var(--bg); border-radius: var(--r-sm);
  border: 1px solid var(--border); font-size: 11.5px; color: var(--muted);
}
.save-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.save-dot.saving { background: var(--gold); animation: blink 1s infinite; }
/* Info boxes */
.info-card {
  padding: 12px 13px; background: var(--blue-soft);
  border: 1px solid rgba(27,108,168,.14); border-radius: var(--r-sm);
  font-size: 12px; color: var(--navy); line-height: 1.65;
}
.info-card strong { display: block; font-size: 11.5px; margin-bottom: 3px; }
.info-card + .info-card { margin-top: 8px; }
/* Office entries */
.office-entry-sm { padding: 10px 0; border-bottom: 1px solid var(--border); }
.office-entry-sm:last-child { border-bottom: none; padding-bottom: 0; }
.office-name-sm { font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.office-detail-sm { font-size: 11px; color: var(--muted); line-height: 1.65; }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast-shelf {
  position: fixed; bottom: 24px; right: 20px;
  display: flex; flex-direction: column; gap: 9px; z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 17px; background: white;
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); font-size: 13px;
  font-weight: 500; color: var(--body);
  min-width: 240px; max-width: 320px;
  pointer-events: all;
  animation: toastIn .28s var(--ease) both;
}
.toast.success { border-left: 3px solid var(--teal); }
.toast.info { border-left: 3px solid var(--blue); }
@keyframes toastIn { from{transform:translateX(110%);opacity:0} to{transform:translateX(0);opacity:1} }

/* ═══════════════════════════════════════════
   PORTAL / DASHBOARD
═══════════════════════════════════════════ */
.portal-banner {
  background: linear-gradient(125deg, var(--navy) 0%, var(--navy-mid) 50%, #1B5E8A 100%);
  padding: clamp(48px,8vw,80px) clamp(20px,5vw,60px);
  position: relative; overflow: hidden;
}
.portal-banner::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,140,126,.18) 0%, transparent 70%);
  pointer-events: none;
}
.portal-banner::after {
  content: '';
  position: absolute; bottom: -60px; left: 10%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(27,108,168,.12) 0%, transparent 70%);
  pointer-events: none;
}
.portal-banner-inner {
  max-width: 800px; margin: 0 auto; text-align: center; position: relative;
}
.portal-crest {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
}
.portal-title {
  font-family: var(--font-display); font-size: clamp(26px,5vw,40px);
  font-weight: 700; color: white; margin-bottom: 10px; line-height: 1.2;
}
.portal-subtitle { font-size: clamp(13px,2vw,15px); color: rgba(255,255,255,.65); margin-bottom: 26px; line-height: 1.65; }
.portal-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.portal-tag {
  font-size: 11.5px; color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  padding: 5px 13px; border-radius: 20px;
}
/* Stats bar */
.stats-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 0 clamp(20px,5vw,60px);
}
.stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr);
  border-left: 1px solid var(--border);
}
@media (max-width: 640px) { .stats-inner { grid-template-columns: repeat(2,1fr); } }
.stat {
  padding: 18px 20px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.stat-num {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--navy);
  line-height: 1;
}
.stat-label { font-size: 11.5px; color: var(--muted); }
/* Portal body */
.portal-body { max-width: 1100px; margin: 40px auto; padding: 0 clamp(16px,4vw,40px); }
.section-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.section-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; margin-bottom: 44px; }

/* Form Card */
.fcard {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 0; text-decoration: none;
  display: flex; flex-direction: column;
  transition: all var(--t) var(--ease);
  box-shadow: var(--shadow-xs); overflow: hidden;
}
.fcard:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-3px); }
.fcard-accent { height: 3px; background: var(--border); transition: background var(--t) var(--ease); }
.fcard:hover .fcard-accent { background: linear-gradient(90deg, var(--blue), var(--teal)); }
.fcard-body { padding: 20px 22px; flex: 1; }
.fcard-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px;
  border-radius: 20px; display: inline-block; margin-bottom: 10px;
}
.tag-blue { color: var(--blue); background: var(--blue-soft); border: 1px solid rgba(27,108,168,.15); }
.tag-teal { color: var(--teal); background: var(--teal-soft); border: 1px solid rgba(13,140,126,.18); }
.tag-gold { color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(184,134,11,.18); }
.fcard-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 7px; line-height: 1.35; }
.fcard-desc { font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 0; }
.fcard-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px; border-top: 1px solid var(--border); background: var(--bg);
}
.fcard-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.fcard-arrow {
  width: 26px; height: 26px; background: white;
  border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all var(--t) var(--ease);
}
.fcard:hover .fcard-arrow { background: var(--blue); border-color: var(--blue); color: white; }

/* Portal footer */
.portal-footer {
  border-top: 1px solid var(--border); padding: 28px 0; margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.portal-footer-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.portal-footer-sub { font-size: 12px; color: var(--muted); }
.portal-footer-ver { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

/* ═══════════════════════════════════════════
   MOBILE NAV (bottom bar for forms)
═══════════════════════════════════════════ */
.mobile-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: white; border-top: 1px solid var(--border);
  padding: 10px 16px 12px;
  box-shadow: 0 -4px 20px rgba(11,45,78,.08);
  align-items: center; justify-content: space-between; gap: 8px;
}
@media (max-width: 860px) { .mobile-bar { display: flex; } }
.mobile-bar .btn { flex: 1; justify-content: center; }
.mobile-save-text { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; }

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  .topnav, .tabbar, .pane-footer, .form-sidebar,
  .mobile-bar, .toast-shelf { display: none !important; }
  .form-body { grid-template-columns: 1fr !important; padding: 0 !important; }
  .form-panel { box-shadow: none !important; border: none !important; border-radius: 0 !important; }
  .tab-pane { display: block !important; }
  body { background: white !important; }
  .pane-header { padding: 16px 20px 0 !important; }
  .fg { padding: 14px 20px !important; }
}
