/* ==========================================================
   Student Information Management System — design tokens
   Palette: deep academic navy + gold seal accent
   Type: Fraunces (display) / Inter (body) / Noto Sans Sinhala & Tamil
   ========================================================== */

:root {
  --navy:        #082D5B;
  --navy-deep:   #061F45;
  --gold:        #F7BD21;
  --gold-active: #D99B00;
  --gold-soft:   #FFF0B8;
  --bg:          #F7F8FB;
  --surface:     #FFFFFF;
  --text:        #1F2933;
  --muted:       #6B7785;
  --success:     #2F855A;
  --danger:      #C0392B;
  --border:      #E4E8EF;

  --font-display: 'Fraunces', 'Noto Sans Sinhala', 'Noto Sans Tamil', serif;
  --font-body:    'Inter', 'Noto Sans Sinhala', 'Noto Sans Tamil', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(16,26,46,0.04), 0 8px 24px rgba(16,26,46,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--navy-deep);
  background-image: linear-gradient(160deg, #24365c 0%, #101a2e 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}
@media (max-width: 760px) {
  /* Fixed backgrounds can jank/repaint on mobile Safari; scroll is smoother. */
  body { background-attachment: scroll; }
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(16, 26, 46, 0.42);
  z-index: 0;
  pointer-events: none;
}
.sim-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------------- Glass panel base (used by cards, topbar, nav) ---------------- */
.glass {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
  }
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------------- Topbar ---------------- */
.sim-topbar {
  background: rgba(27, 42, 74, 0.72);
  border-bottom: 1px solid rgba(212, 169, 77, 0.55);
  box-shadow: 0 1px 0 rgba(212,169,77,0.55), 0 8px 32px rgba(16,26,46,0.25);
  position: sticky;
  top: 0;
  z-index: 50;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .sim-topbar {
    background: rgba(27, 42, 74, 0.52);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
  }
}
.sim-topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sim-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  flex-shrink: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.sim-brand__mark { display: flex; flex-shrink: 0; }
.sim-brand__logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  background: #fff;
}
.sim-brand__text {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 68vw;
  line-height: 1.15;
}
@media (max-width: 560px) {
  .sim-brand__text { max-width: 58vw; font-size: 14px; }
}

.sim-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sim-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.sim-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sim-nav a.is-active { background: var(--gold-active); color: #fff; font-weight: 600; }
.sim-nav a.sim-nav__soon { opacity: 0.45; cursor: default; }
.sim-nav a.sim-nav__soon:hover { background: none; color: rgba(255,255,255,0.75); }

.sim-lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 3px;
  margin-left: 8px;
}
.sim-lang-toggle a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.sim-lang-toggle a.is-active { background: #fff; color: var(--navy); font-weight: 600; }

.sim-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.sim-nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
}

/* ---------------- Main / setup page ---------------- */
.sim-main {
  flex: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.setup-layout {
  max-width: 640px;
  margin: 0 auto;
}

.setup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.setup-eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.setup-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  color: white;
  margin: 0 0 10px;
  line-height: 1.15;
}
.setup-subtitle {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 52ch;
}

.setup-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .setup-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
  }
}
@media (max-width: 560px) {
  .setup-card { padding: 24px 18px; border-radius: var(--radius-md); }
}

/* ---- Seal-style logo uploader (signature element) ---- */
.seal-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.seal-frame {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-conic-gradient(from 0deg, var(--gold-soft) 0deg 6deg, transparent 6deg 18deg);
  background-size: 100% 100%;
  cursor: pointer;
  overflow: hidden;
}
.seal-frame__inner {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--gold-soft);
}
.seal-frame__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.seal-frame__inner svg { width: 42px; height: 42px; opacity: 0.85; }

.seal-actions { text-align: center; }
.seal-actions button {
  background: none;
  border: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  padding: 6px 4px;
  border-bottom: 1px solid transparent;
}
.seal-actions button:hover { border-bottom-color: var(--navy); }
.seal-hint {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ---- Background image uploader ---- */
.bg-upload { margin-bottom: 30px; }
.field-label-standalone {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 10px;
}
.bg-upload__row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.bg-upload__preview {
  width: 120px;
  height: 76px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  flex-shrink: 0;
}
.bg-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.bg-upload__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* ---- Form ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
}
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 7px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--gold);
  background: #fff;
  outline: none;
}
.field input.has-error { border-color: var(--danger); }
.field-error {
  display: block;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 5px;
  min-height: 15px;
}
.field-hint {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.alert {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #EAF6EF; color: var(--success); border: 1px solid #C7E8D3; }
.alert-error { background: #FBEAE8; color: var(--danger); border: 1px solid #F3CFC9; }

/* ---- Roadmap footer note on setup page ---- */
.roadmap {
  margin-top: 40px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: #FBFCFE;
}
.roadmap h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--navy-deep);
  margin: 0 0 12px;
}
.roadmap ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* ---------------- Footer ---------------- */
.sim-footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

/* ==========================================================
   Dashboard, tables, forms, badges — shared across admin pages
   ========================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0 36px;
}
@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .stat-card {
    background: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
}
.stat-card--warn { border-color: var(--gold); }
.stat-card__value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--navy-deep);
}
.stat-card__label { color: var(--muted); font-size: 13px; }

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 760px) {
  .quick-links { grid-template-columns: repeat(2, 1fr); }
}
.quick-link {
  background: rgba(27, 42, 74, 0.6);
  border: 1px solid rgba(212,169,77,0.35);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.1s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .quick-link {
    background: rgba(27, 42, 74, 0.42);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
}
.quick-link:hover { background: rgba(16, 26, 46, 0.6); }
.quick-link:active { transform: translateY(1px); }
.quick-link__icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}

/* ---------------- Page toolbar (title + primary action) ---------------- */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy-deep);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-secondary:hover { border-color: var(--navy); }

/* ---------------- Filters bar ---------------- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .filters-bar {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
}
.filters-bar .field { min-width: 150px; flex: 1; margin-bottom: 0; }
.filters-bar .field label { margin-bottom: 6px; }
.filters-bar .field-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Data table ---------------- */
.table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  -webkit-overflow-scrolling: touch;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .table-wrap {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.data-table tbody tr:hover { background: #FAFBFD; }
.data-table td.wrap { white-space: normal; }
.table-photo {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
}
.table-actions { display: flex; gap: 6px; }
.table-actions a, .table-actions button {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy-deep);
  cursor: pointer;
}
.table-actions .danger { color: var(--danger); }
.table-actions a:hover, .table-actions button:hover { border-color: var(--navy); }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #EAF6EF; color: var(--success); }
.badge-muted { background: #EEF1F5; color: var(--muted); }
.badge-warn { background: var(--gold-soft); color: #8A6416; }
.badge-danger { background: #FBEAE8; color: var(--danger); }

.completion-bar {
  width: 84px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.completion-bar__fill { height: 100%; background: var(--gold); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--navy-deep);
  background: #fff;
}
.pagination a.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------- Wide layout (non setup-layout pages) ---------------- */
.wide-layout { max-width: 1180px; margin: 0 auto; }

/* ---------------- Student form sections ---------------- */
.form-section {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 30px;
  margin-bottom: 22px;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .form-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
  }
}
@media (max-width: 560px) { .form-section { padding: 20px 18px; } }
.form-section h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy-deep);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--gold);
  border-radius: 2px;
  display: inline-block;
}
.field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 74px;
}
.field textarea:focus { border-color: var(--gold); background: #fff; outline: none; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.toggle-row label { margin: 0; font-weight: 500; color: var(--text); font-size: 14px; }

/* ---------------- Photo capture ---------------- */
.photo-capture {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.photo-capture__preview {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.photo-capture__preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-capture__buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- ID cards ---------------- */
.id-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 20px;
  margin-top: 22px;
}
.id-card {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 340 / 214;
  background: linear-gradient(160deg, var(--navy) 60%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.id-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(212,169,77,0.15);
}
.id-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  margin-bottom: 12px;
}
.id-card__body { display: flex; flex-wrap: nowrap; gap: 10px; flex: 1; min-width: 0; z-index: 1; }
.id-card__photo {
  width: 64px; height: 64px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.id-card__info { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.id-card__name { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-card__meta { font-size: 11.5px; color: rgba(255,255,255,0.75); margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-card__qr { width: 52px; height: 52px; background: #fff; border-radius: 6px; padding: 4px; flex-shrink: 0; align-self: center; }
.id-card__qr canvas, .id-card__qr img { width: 100%; height: 100%; display: block; }
.id-card__footer {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  margin-top: 10px;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media print {
  .sim-topbar, .sim-footer, .page-toolbar, .filters-bar, .roadmap, .no-print { display: none !important; }
  body { background: #fff !important; background-image: none !important; }
  body::before { display: none !important; }
  .setup-card, .form-section, .stat-card, .table-wrap, .quick-link {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
  .id-card-grid { gap: 10px; }
  .id-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ---------------- Guest / parent view badge ---------------- */
.view-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  color: #8A6416;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ---------------- Mobile nav ---------------- */
.sim-nav-overlay {
  display: none;
}
@media (max-width: 860px) {
  .sim-topbar__inner { padding: 12px 16px; gap: 12px; }
  .sim-nav-toggle { display: flex; z-index: 60; }
  .sim-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: rgba(16, 26, 46, 0.94);
    flex-direction: column;
    align-items: stretch;
    padding: 84px 22px 24px;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-bottom: none;
    border-left: 1px solid rgba(212,169,77,0.4);
    z-index: 55;
    overflow-y: auto;
  }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .sim-nav {
      background: rgba(16, 26, 46, 0.78);
      backdrop-filter: blur(24px) saturate(160%);
      -webkit-backdrop-filter: blur(24px) saturate(160%);
    }
  }
  .sim-nav.is-open { transform: translateX(0); }
  .sim-nav a {
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .sim-lang-toggle { margin: 16px 0 0; width: 100%; justify-content: space-between; }
  .sim-lang-toggle a { flex: 1; text-align: center; }

  .sim-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 26, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 54;
  }
  .sim-nav-overlay.is-open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 480px) {
  .sim-main { padding: 28px 14px 48px; }
  .filters-bar .field { flex-basis: 100%; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .page-toolbar .btn-primary, .page-toolbar .btn-secondary { width: 100%; justify-content: center; }
  .id-card-grid { grid-template-columns: 1fr; }
}


/* VCC Enterprise branding */
.sim-brand__copy{display:flex;flex-direction:column;min-width:0}.sim-brand__copy small{font-family:var(--font-body);font-size:10.5px;font-weight:500;color:rgba(255,255,255,.78);margin-top:3px}.sim-nav__portal{background:#fff!important;color:var(--navy)!important;font-weight:700!important}.sim-nav__portal--gold{background:var(--gold)!important;color:#172033!important}.sim-topbar{background:linear-gradient(110deg,#061f45,#0a376d)!important}.sim-footer{background:#061f45!important;color:#fff!important;border-top:3px solid var(--gold)!important}.btn-primary{background:linear-gradient(135deg,#0b5fa5,#1976c5)!important}.setup-title{color:#fff!important}.setup-card,.stat-card,.table-card,.card{border-top:3px solid rgba(247,189,33,.9)}
