/* =========================================================================
   POLAC POSTGRADUATE SCHOOL — DESIGN SYSTEM
   Adapted from the DICID UI reference (template/dicid-ui-template.html):
   Nigerian green / gold / navy identity, Inter + JetBrains Mono type,
   token-driven components. Domain content (classification banners, threat
   pills, subscriber/call-record demo data) was not carried over — only the
   underlying tokens, typography and component classes.
   ========================================================================= */

:root {
  /* — Page surfaces — */
  --base: 242 245 249;
  --surface: 255 255 255;
  --surface-2: 248 250 252;
  --surface-3: 238 242 247;
  --line: 223 229 237;

  /* — Ink — */
  --ink: 15 23 42;
  --ink-muted: 71 85 105;
  --ink-faint: 122 137 158;

  /* — POLAC identity palette (Nigerian green / gold / navy) — */
  --polac-green: #006B3F;
  --polac-green2: #00874F;
  --polac-green3: #00A360;
  --polac-green-ink: #006038;

  --polac-navy: #1B2A4A;
  --polac-navy2: #22345A;

  --polac-gold: #C9A84C;
  --polac-gold2: #E0C270;
  --polac-gold-ink: #7A5E12;

  --polac-danger: #DC2626;
  --polac-warning: #F59E0B;
  --polac-info: #0EA5E9;
  --polac-success: #10B981;

  /* — Shadows — */
  --shadow-card: 0 1px 2px rgb(16 24 40 / 0.06), 0 1px 3px rgb(16 24 40 / 0.10);
  --shadow-pop: 0 16px 40px -12px rgb(15 23 42 / 0.22), 0 4px 12px -4px rgb(15 23 42 / 0.10);
  --shadow-glow-green: 0 0 0 1px rgb(0 107 63 / 0.30), 0 6px 18px -6px rgb(0 107 63 / 0.28);
  --shadow-glow-gold: 0 0 0 1px rgb(201 168 76 / 0.45), 0 6px 18px -6px rgb(201 168 76 / 0.35);

  /* — Typography — */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;     --sp-10: 2.5rem; --sp-12: 3rem;
  --sp-16: 4rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-color: rgb(var(--line)); }
html, body { height: 100%; }
body {
  background: rgb(var(--base));
  color: rgb(var(--ink));
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.02em; }

.scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgb(var(--line)) transparent; }
.scrollbar-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgb(var(--line)); border-radius: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgb(var(--ink-faint)); }

.ff-data { font-family: var(--font-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* =========================================================================
   LAYOUT UTILITIES
   ========================================================================= */
.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--sp-4); }
.container-narrow { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 var(--sp-4); }

.flex-row { display: flex; align-items: center; gap: var(--sp-2); }
.flex-wrap { flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: rgb(var(--ink-muted)); }
.text-faint { color: rgb(var(--ink-faint)); }
.text-success { color: var(--polac-success); }
.text-danger { color: var(--polac-danger); }
.text-gold { color: var(--polac-gold-ink); }
.w-full { width: 100%; }
.hidden { display: none !important; }

.mt-1{margin-top:var(--sp-1)} .mt-2{margin-top:var(--sp-2)} .mt-3{margin-top:var(--sp-3)} .mt-4{margin-top:var(--sp-4)} .mt-6{margin-top:var(--sp-6)} .mt-8{margin-top:var(--sp-8)}
.mb-1{margin-bottom:var(--sp-1)} .mb-2{margin-bottom:var(--sp-2)} .mb-3{margin-bottom:var(--sp-3)} .mb-4{margin-bottom:var(--sp-4)} .mb-6{margin-bottom:var(--sp-6)} .mb-8{margin-bottom:var(--sp-8)}

/* =========================================================================
   COMPONENTS
   ========================================================================= */

/* Card */
.card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-header { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid rgb(var(--line)); }
.card-title { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.025em; color: rgb(var(--ink)); }
.card-body { padding: var(--sp-4); }
.card-body + .card-body { border-top: 1px solid rgb(var(--line)); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  border-radius: var(--radius-md); font-weight: 600; font-size: var(--text-sm);
  height: 2.25rem; padding: 0 var(--sp-4); border: none; cursor: pointer;
  white-space: nowrap; transition: all 0.15s ease; font-family: var(--font-sans);
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--polac-green); outline-offset: 2px; }

.btn-primary { background: var(--polac-green); color: white; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }
.btn-primary:hover { background: var(--polac-green2); }
.btn-gold { background: var(--polac-gold); color: var(--polac-navy); box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }
.btn-gold:hover { background: var(--polac-gold2); }
.btn-danger { background: var(--polac-danger); color: white; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }
.btn-danger:hover { background: #EF4444; }
.btn-outline { background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--line)); }
.btn-outline:hover { background: rgb(var(--surface-3)); }
.btn-ghost { background: transparent; color: rgb(var(--ink-muted)); }
.btn-ghost:hover { background: rgb(var(--surface-3)); color: rgb(var(--ink)); }
.btn-subtle { background: rgb(0 107 63 / 0.1); color: var(--polac-green-ink); box-shadow: inset 0 0 0 1px rgb(0 107 63 / 0.25); }
.btn-subtle:hover { background: rgb(0 107 63 / 0.2); }

.btn-xs { height: 1.75rem; padding: 0 0.625rem; font-size: var(--text-2xs); }
.btn-sm { height: 2rem; padding: 0 var(--sp-3); font-size: var(--text-xs); }
.btn-lg { height: 2.75rem; padding: 0 var(--sp-6); font-size: var(--text-base); }
.btn-icon { height: 2.25rem; width: 2.25rem; padding: 0; }
.btn-icon-sm { height: 2rem; width: 2rem; padding: 0; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; border-radius: var(--radius-sm);
  padding: 0.1875rem 0.5rem; font-size: var(--text-2xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; box-shadow: inset 0 0 0 1px currentColor;
}
.badge-green  { background: rgb(0 107 63 / 0.1);  color: var(--polac-green-ink); box-shadow: inset 0 0 0 1px rgb(0 107 63 / 0.25); }
.badge-gold   { background: rgb(201 168 76 / 0.16); color: var(--polac-gold-ink);  box-shadow: inset 0 0 0 1px rgb(201 168 76 / 0.4); }
.badge-red    { background: rgb(220 38 38 / 0.1);  color: #B91C1C; box-shadow: inset 0 0 0 1px rgb(220 38 38 / 0.25); }
.badge-amber  { background: rgb(245 158 11 / 0.14); color: #B45309; box-shadow: inset 0 0 0 1px rgb(245 158 11 / 0.3); }
.badge-blue   { background: rgb(14 165 233 / 0.1); color: #0369A1; box-shadow: inset 0 0 0 1px rgb(14 165 233 / 0.25); }
.badge-violet { background: rgb(139 92 246 / 0.1); color: #6D28D9; box-shadow: inset 0 0 0 1px rgb(139 92 246 / 0.25); }
.badge-slate  { background: rgb(var(--surface-3)); color: rgb(var(--ink-muted)); box-shadow: inset 0 0 0 1px rgb(var(--line)); }

.status-dot { position: relative; display: inline-flex; width: 0.5rem; height: 0.5rem; flex-shrink: 0; }
.status-dot::before { content: ''; position: absolute; inset: 0; border-radius: 9999px; animation: pulse-ring 2s cubic-bezier(0,0,.2,1) infinite; }
.status-dot::after { content: ''; position: relative; display: inline-flex; width: 0.5rem; height: 0.5rem; border-radius: 9999px; }
.status-dot.green::before { background: #10B981; } .status-dot.green::after  { background: #10B981; }
.status-dot.amber::before { background: #F59E0B; } .status-dot.amber::after  { background: #F59E0B; }
.status-dot.red::before   { background: #EF4444; } .status-dot.red::after    { background: #EF4444; }
.status-dot.slate::before { animation: none; background: transparent; } .status-dot.slate::after  { background: #64748B; }

/* Forms */
.form-group { margin-bottom: var(--sp-4); }
.form-label { display: block; font-size: var(--text-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(var(--ink-faint)); margin-bottom: 6px; }
.form-hint { font-size: var(--text-xs); color: rgb(var(--ink-faint)); margin-top: 4px; }
.form-error { font-size: var(--text-xs); color: var(--polac-danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-4); }

.input, .select, textarea.input {
  height: 2.25rem; width: 100%; border-radius: var(--radius-md); border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-2)); padding: 0 var(--sp-3); font-size: var(--text-sm);
  color: rgb(var(--ink)); font-family: var(--font-sans); transition: border-color 0.15s;
}
textarea.input { height: auto; padding: var(--sp-3); resize: vertical; min-height: 5.5rem; }
.input::placeholder, textarea.input::placeholder { color: rgb(var(--ink-faint)); }
.input:hover, .select:hover, textarea.input:hover { border-color: rgb(var(--ink-faint) / 0.5); }
.input:focus, .select:focus, textarea.input:focus { outline: 2px solid var(--polac-green); outline-offset: 1px; border-color: transparent; }
.input:disabled, .select:disabled { background: rgb(var(--surface-3)); color: rgb(var(--ink-faint)); cursor: not-allowed; }

.select {
  appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 16px;
}

.form-check { display: flex; align-items: center; gap: var(--sp-2); }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 1rem; height: 1rem; accent-color: var(--polac-green); cursor: pointer; }
.form-check label { font-size: var(--text-sm); color: rgb(var(--ink-muted)); cursor: pointer; }

.toggle { position: relative; width: 2.25rem; height: 1.25rem; border-radius: 9999px; background: rgb(var(--surface-3)); box-shadow: inset 0 0 0 1px rgb(var(--line)); cursor: pointer; border: none; transition: background 0.2s; flex-shrink: 0; }
.toggle.active { background: var(--polac-green); box-shadow: none; }
.toggle::after { content: ''; position: absolute; top: 0.125rem; left: 0.125rem; width: 1rem; height: 1rem; border-radius: 9999px; background: white; box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); transition: transform 0.2s; }
.toggle.active::after { transform: translateX(1rem); }

/* Alerts (flash messages) */
.alert { display: flex; align-items: flex-start; gap: var(--sp-3); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); font-size: var(--text-sm); border: 1px solid transparent; margin-bottom: var(--sp-3); }
.alert-success { background: rgb(16 185 129 / 0.08); border-color: rgb(16 185 129 / 0.3); color: #047857; }
.alert-error, .alert-danger { background: rgb(220 38 38 / 0.08); border-color: rgb(220 38 38 / 0.3); color: #B91C1C; }
.alert-warning { background: rgb(245 158 11 / 0.1); border-color: rgb(245 158 11 / 0.3); color: #B45309; }
.alert-info { background: rgb(14 165 233 / 0.08); border-color: rgb(14 165 233 / 0.3); color: #0369A1; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; font-size: var(--text-lg); line-height: 1; }
.alert-close:hover { opacity: 1; }

/* Table */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.data-table thead { background: rgb(var(--surface-2)); }
.data-table th { padding: var(--sp-3); text-align: left; font-weight: 600; color: rgb(var(--ink-muted)); border-bottom: 1px solid rgb(var(--line)); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.data-table td { padding: var(--sp-3); border-bottom: 1px solid rgb(var(--line) / 0.6); color: rgb(var(--ink-muted)); vertical-align: middle; }
.data-table tbody tr:nth-child(odd) { background: rgb(var(--surface-2) / 0.6); }
.data-table tbody tr:hover { background: rgb(var(--surface-3)); }
.data-table .empty-row td { text-align: center; padding: var(--sp-8); color: rgb(var(--ink-faint)); }

/* Stat cards */
.stat-card { padding: var(--sp-4); transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.stat-card .label { font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(var(--ink-faint)); }
.stat-card .value { margin-top: var(--sp-2); font-size: var(--text-2xl); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-card .icon-box { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); background: rgb(0 107 63 / 0.1); color: var(--polac-green-ink); box-shadow: inset 0 0 0 1px rgb(0 107 63 / 0.2); }
.stat-green  { background: linear-gradient(135deg, var(--polac-green), var(--polac-green2)); color: white; border-color: transparent; }
.stat-navy   { background: linear-gradient(135deg, var(--polac-navy), var(--polac-navy2));   color: white; border-color: transparent; }
.stat-gold   { background: linear-gradient(135deg, var(--polac-gold), #B08F35);             color: var(--polac-navy); border-color: transparent; }
.stat-danger { background: linear-gradient(135deg, var(--polac-danger), #9F1239);           color: white; border-color: transparent; }

/* Sidebar */
.sidebar { width: 16rem; background: rgb(var(--surface)); border-right: 1px solid rgb(var(--line)); display: flex; flex-direction: column; flex-shrink: 0; height: 100%; overflow-y: auto; transition: transform 0.2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: var(--sp-3); height: 3.5rem; padding: 0 var(--sp-4); border-bottom: 1px solid rgb(var(--line)); flex-shrink: 0; }
.sidebar-brand img { height: 28px; width: auto; }
.sidebar-brand .title { font-size: var(--text-base); font-weight: 800; letter-spacing: -0.02em; }
.sidebar-brand .sub { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--polac-gold-ink); margin-top: 2px; }
.sidebar-section-label { padding: var(--sp-2) var(--sp-2) var(--sp-1); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: rgb(var(--ink-faint)); }
.sidebar-item { position: relative; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0.625rem; border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 600; color: rgb(var(--ink-muted)); cursor: pointer; text-decoration: none; transition: all 0.15s; margin-bottom: 2px; }
.sidebar-item:hover { background: rgb(var(--surface-3)); color: rgb(var(--ink)); }
.sidebar-item.active { background: rgb(0 107 63 / 0.12); color: var(--polac-green-ink); }
.sidebar-item.active::before { content: ''; position: absolute; left: -0.5rem; top: 0.375rem; bottom: 0.375rem; width: 2px; border-radius: 0 2px 2px 0; background: var(--polac-green3); }
.sidebar-item svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--sp-3); height: 3.5rem; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--surface) / 0.92); backdrop-filter: blur(12px); padding: 0 var(--sp-4); flex-shrink: 0; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9999px; background: linear-gradient(135deg, var(--polac-green), var(--polac-navy)); color: white; font-size: var(--text-2xs); font-weight: 700; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15); flex-shrink: 0; }
.sidebar-toggle { display: none; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 14rem; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); z-index: 40; overflow: hidden; padding: var(--sp-2); }
.dropdown-menu.show { display: block; animation: fade-up 0.15s ease both; }
.dropdown-header { padding: var(--sp-2) var(--sp-2) var(--sp-1); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(var(--ink-faint)); }
.dropdown-item { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2); border-radius: var(--radius-md); font-size: var(--text-sm); color: rgb(var(--ink-muted)); text-decoration: none; background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font-sans); }
.dropdown-item:hover { background: rgb(var(--surface-3)); color: rgb(var(--ink)); }
.dropdown-divider { height: 1px; background: rgb(var(--line)); margin: var(--sp-2) 0; }

/* Modal */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgb(15 23 42 / 0.5); z-index: 100; align-items: center; justify-content: center; padding: var(--sp-4); }
.modal-backdrop.show { display: flex; }
.modal-card { background: rgb(var(--surface)); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); width: 100%; max-width: 28rem; animation: fade-up 0.2s ease both; }
.modal-card .card-header { justify-content: space-between; }
.modal-close { background: none; border: none; cursor: pointer; color: rgb(var(--ink-faint)); font-size: var(--text-xl); line-height: 1; }

/* Accordion */
.accordion-item { border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); margin-bottom: var(--sp-3); overflow: hidden; }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--sp-4); background: rgb(var(--surface)); border: none; cursor: pointer; font-size: var(--text-sm); font-weight: 600; text-align: left; font-family: var(--font-sans); color: rgb(var(--ink)); }
.accordion-trigger .chev { transition: transform 0.2s; }
.accordion-item.open .accordion-trigger .chev { transform: rotate(180deg); }
.accordion-panel { display: none; padding: 0 var(--sp-4) var(--sp-4); font-size: var(--text-sm); color: rgb(var(--ink-muted)); }
.accordion-item.open .accordion-panel { display: block; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-1); margin-top: var(--sp-4); flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 0.5rem; border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 600; text-decoration: none; color: rgb(var(--ink-muted)); border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.pagination a:hover { background: rgb(var(--surface-3)); }
.pagination .active span { background: var(--polac-green); color: white; border-color: var(--polac-green); }
.pagination .disabled span { opacity: 0.4; }

/* Page header / breadcrumb */
.page-header { margin-bottom: var(--sp-6); }
.page-header h1 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
.page-header .subtitle { margin-top: var(--sp-1); font-size: var(--text-xs); color: rgb(var(--ink-muted)); }
.breadcrumb { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--text-2xs); margin-bottom: var(--sp-2); }
.breadcrumb a { color: rgb(var(--ink-faint)); text-decoration: none; }
.breadcrumb a:hover { color: var(--polac-green-ink); }
.breadcrumb .sep { color: rgb(var(--ink-faint) / 0.6); }

/* Footer */
.app-footer { margin-top: auto; border-top: 1px solid rgb(var(--line)); padding: 0.875rem var(--sp-4); text-align: center; font-size: var(--text-2xs); color: rgb(var(--ink-faint)); line-height: 1.6; }
.app-footer .brand-mark { font-weight: 700; letter-spacing: 0.08em; color: var(--polac-gold-ink); }

/* Steps (application wizard) */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: var(--sp-6); overflow-x: auto; }
.step { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.step .num { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 9999px; font-size: var(--text-xs); font-weight: 700; background: rgb(var(--surface-3)); color: rgb(var(--ink-faint)); flex-shrink: 0; }
.step.done .num { background: var(--polac-green); color: white; }
.step.active .num { background: var(--polac-gold); color: var(--polac-navy); }
.step .label { font-size: var(--text-2xs); font-weight: 600; color: rgb(var(--ink-faint)); white-space: nowrap; }
.step.active .label, .step.done .label { color: rgb(var(--ink)); }
.step-connector { width: 2rem; height: 1px; background: rgb(var(--line)); flex-shrink: 0; margin: 0 var(--sp-2); }

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes pulse-ring { 0% { transform: scale(0.85); opacity: 0.9; } 70% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes fade-up { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.animate-fade-up { animation: fade-up 0.35s cubic-bezier(.2,.7,.3,1) both; }

/* =========================================================================
   APP SHELL LAYOUT
   ========================================================================= */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-main { display: flex; flex: 1; overflow: hidden; }
.app-content-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-content { flex: 1; overflow-y: auto; padding: var(--sp-6); }

/* =========================================================================
   PUBLIC SITE (landing / marketing pages)
   ========================================================================= */
.public-nav { position: sticky; top: 0; z-index: 40; background: rgb(var(--surface) / 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgb(var(--line)); }
.public-nav .container { display: flex; align-items: center; height: 4rem; gap: var(--sp-6); }
.public-nav .brand { display: flex; align-items: center; gap: var(--sp-2); font-weight: 800; font-size: var(--text-base); letter-spacing: -0.02em; text-decoration: none; color: rgb(var(--ink)); }
.public-nav .brand img { height: 26px; }
.public-nav nav { display: flex; align-items: center; gap: var(--sp-6); margin-left: var(--sp-6); }
.public-nav nav a { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--ink-muted)); text-decoration: none; }
.public-nav nav a:hover { color: var(--polac-green-ink); }
.public-nav .actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

.hero {
  position: relative; overflow: hidden; min-height: 32rem; display: flex; align-items: center;
  padding: var(--sp-16) 0; background-color: var(--polac-navy);
  background-image:
    linear-gradient(100deg, rgb(10 20 35 / 0.92) 0%, rgb(10 20 35 / 0.78) 42%, rgb(10 20 35 / 0.55) 100%),
    url("../images/hero/campus-gate.b0f9982d3c8c.jpg");
  background-size: cover; background-position: center;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; color: white; margin-bottom: var(--sp-4); line-height: 1.15; }
.hero p.lead { font-size: var(--text-lg); color: rgb(255 255 255 / 0.85); max-width: 40rem; margin: 0 auto var(--sp-6); }
.hero .btn-hero-primary { background: white; color: var(--polac-green-ink); }
.hero .btn-hero-primary:hover { background: rgb(255 255 255 / 0.88); }
.hero .btn-hero-outline { background: transparent; color: white; border: 1px solid rgb(255 255 255 / 0.55); }
.hero .btn-hero-outline:hover { background: rgb(255 255 255 / 0.12); }

.public-section { padding: var(--sp-12) 0; }
.public-footer { background: var(--polac-navy); color: rgb(255 255 255 / 0.85); padding: var(--sp-10) 0 var(--sp-6); }
.public-footer h5 { color: white; font-size: var(--text-sm); margin-bottom: var(--sp-3); }
.public-footer a { color: rgb(255 255 255 / 0.7); text-decoration: none; font-size: var(--text-sm); line-height: 2; }
.public-footer a:hover { color: white; }
.public-footer .bottom { border-top: 1px solid rgb(255 255 255 / 0.12); margin-top: var(--sp-8); padding-top: var(--sp-4); font-size: var(--text-xs); color: rgb(255 255 255 / 0.55); }

.programme-card { display: flex; flex-direction: column; height: 100%; }
.programme-card .card-body { display: flex; flex-direction: column; flex: 1; }
.programme-card .spacer { flex: 1; }

@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); box-shadow: var(--shadow-pop); }
  .sidebar.show { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .public-nav nav { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .app-content { padding: var(--sp-4); }
  .form-row { grid-template-columns: 1fr; }
}
