/* ╔══════════════════════════════════════════════════════════════╗
   ║  OKLA · OHP COMMAND NETWORK — royal-blue glass theme          ║
   ╚══════════════════════════════════════════════════════════════╝ */
:root {
  --navy-900: #04152e;
  --navy-800: #07294f;
  --navy-700: #0c3868;
  --navy-600: #155a9e;
  --line:     rgba(150, 190, 255, 0.14);
  --line-2:   rgba(150, 190, 255, 0.26);

  --gold:     #f3c34e;
  --gold-2:   #ffdd88;
  --blue:     #2f80e0;
  --cyan:     #4fd6ff;
  --red:      #ff5566;
  --green:    #46e08c;

  --text:   #eaf0ff;
  --ink:    #eaf0ff;
  --muted:  #93a0bd;
  --faint:  #5d6a87;

  --glass:   rgba(13, 38, 74, 0.55);
  --glass-2: rgba(16, 46, 88, 0.72);
  --surface: var(--glass);

  --radius: 16px;
  --r: 14px;
  --r-sm: 10px;
  --shadow:    0 24px 60px -20px rgba(0,0,0,0.7);
  --shadow-sm: 0 10px 28px -16px rgba(0,0,0,0.6);
  --glow-gold: 0 0 24px rgba(243,195,78,0.45);
  --glow-blue: 0 0 28px rgba(47,128,224,0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --green-bg: rgba(70,224,140,0.16);
  --red-bg:   rgba(255,85,102,0.16);
  --amber-bg: rgba(243,195,78,0.16);
  --slate-bg: rgba(150,190,255,0.12);
  --primary:  var(--blue);
  --primary-50: rgba(47,128,224,0.14);
  --primary-700: #bcd0ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--text);
  background:
    radial-gradient(120% 90% at 12% 0%, #0a3a6b 0%, transparent 55%),
    linear-gradient(150deg, #072a52 0%, #04152e 55%, #061a36 100%);
  background-color: #04152e;
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; font-size: 14px;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(243,195,78,0.3); }

/* ── Animated background layers ───────────────────────────────── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; display: block; }
.bg-aurora {
  position: fixed; inset: -20%; z-index: -1;
  background:
    radial-gradient(42% 52% at 16% 20%, rgba(33,118,214,0.34), transparent 60%),
    radial-gradient(40% 48% at 84% 26%, rgba(79,214,255,0.18), transparent 60%),
    radial-gradient(54% 54% at 50% 98%, rgba(243,195,78,0.16), transparent 60%);
  filter: blur(44px); animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora { 0% { transform: translate3d(-2%,-1%,0) scale(1.05);} 100% { transform: translate3d(3%,2%,0) scale(1.15);} }
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%); opacity: .5;
}
.bg-scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(79,214,255,0) 50%, rgba(79,214,255,0.025) 50%); background-size: 100% 4px;
  mix-blend-mode: overlay; opacity: .4;
}

.glass, .card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: var(--shadow);
}

/* ════════════════════ LOGIN ════════════════════════════════════ */
.landing { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 92vw); padding: 38px 34px 28px; text-align: center; position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(150%); box-shadow: var(--shadow);
  animation: rise .8s cubic-bezier(.16,1,.3,1) both;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: -60%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.07), transparent);
  animation: sheen 6s ease-in-out infinite; pointer-events: none;
}
@keyframes sheen { 0%,100% { left: -60%; } 55% { left: 120%; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

.ohp-badge {
  width: 116px; height: auto; display: block; margin: 0 auto 18px;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5)) drop-shadow(0 0 18px rgba(243,195,78,0.28));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-8px);} }

.brand-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin-bottom: 7px; font-weight: 700; }
.brand-title { font-size: 27px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 5px; }
.brand-sub { color: var(--muted); font-size: 13px; margin: 0 0 2px; }
.brand-agency { color: var(--faint); font-size: 11px; margin: 0; }
.brand-motto { font-family: var(--mono); font-size: 10px; letter-spacing: 2.5px; color: var(--faint); text-transform: uppercase; margin: 18px 0; font-weight: 700; }

.chevrons { display: inline-flex; gap: 4px; align-items: center; justify-content: center; }
.chevrons i { width: 9px; height: 15px; display: block; background: var(--gold); clip-path: polygon(0 0,55% 0,100% 50%,55% 100%,0 100%,45% 50%); opacity: .9; }

.btn-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px; width: 100%;
  padding: 14px 18px; border: 0; border-radius: 11px; cursor: pointer; font-family: var(--font);
  font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, #5865F2, #4752c4); box-shadow: 0 10px 30px -8px rgba(88,101,242,0.7);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-discord:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 16px 38px -8px rgba(88,101,242,0.85); }
.btn-discord svg { width: 21px; height: 21px; }
.secure-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; color: var(--faint); font-size: 11px; }
.secure-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.login-error { margin-bottom: 16px; padding: 10px 13px; border-radius: 10px; font-size: 13px; background: var(--red-bg); border: 1px solid rgba(255,85,102,0.35); color: #ffb3bb; text-align: left; }

/* ════════════════════ APP SHELL ════════════════════════════════ */
.app { position: relative; z-index: 2; min-height: 100vh; display: flex; }
.sidebar {
  width: 244px; flex-shrink: 0; padding: 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(7,33,64,0.85), rgba(4,16,34,0.7)); backdrop-filter: blur(16px);
}
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 18px; border-bottom: 1px solid var(--line); }
.ohp-badge-mini { width: 34px; height: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.sb-brand b { font-size: 14px; letter-spacing: .3px; color: #fff; }
.sb-brand span { display: block; font-size: 9.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 1.5px; margin-top: 1px; }

#nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-section-label { font-size: 10px; font-family: var(--mono); letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; padding: 12px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .14s, color .14s, transform .14s; position: relative; }
.nav-item svg { width: 17px; height: 17px; opacity: .85; flex-shrink: 0; }
.nav-item:hover { background: rgba(150,190,255,0.07); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: linear-gradient(100deg, rgba(243,195,78,0.16), rgba(47,128,224,0.12)); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 16%; height: 68%; width: 3px; border-radius: 3px; background: var(--gold); box-shadow: var(--glow-gold); }
.nav-spacer { flex: 1; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,0.2); }
.sb-user img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--navy-700); }
.sb-user .nm { font-size: 12.5px; font-weight: 700; color: #fff; }
.sb-user .rk { font-size: 10.5px; color: var(--gold); font-family: var(--mono); margin-top: 1px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 26px; height: 62px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(7,25,52,0.5); backdrop-filter: blur(14px); }
.topbar h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.topbar .crumb { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1px; }
.btn-logout { padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: .14s; }
.btn-logout:hover { color: var(--red); border-color: rgba(255,85,102,0.4); }

#content { padding: 26px; }

/* ── Sections / stats ── */
.view { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }
.section-head { display: flex; align-items: center; gap: 13px; margin: 4px 0 15px; }
.section-head h2 { font-size: 15px; margin: 0; font-weight: 700; }
.section-head h2::before { content: '\00BB'; color: var(--gold); font-weight: 800; margin-right: 9px; }
.section-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .lbl { font-size: 11px; color: var(--muted); font-family: var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.stat .val { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-top: 5px; line-height: 1; }
.stat .spark { position: absolute; right: 16px; top: 16px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.stat .spark svg { width: 16px; height: 16px; }

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 11px; border: 1px solid var(--line); background: var(--glass); }
.search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 14px; font-family: var(--font); }
.search svg { width: 15px; height: 15px; color: var(--faint); }
.chip { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { background: linear-gradient(100deg, rgba(243,195,78,0.18), rgba(47,128,224,0.12)); color: #fff; border-color: rgba(243,195,78,0.4); }

/* ── Roster cards ── */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.member {
  padding: 15px 16px; cursor: pointer; display: flex; align-items: center; gap: 13px; position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-sm);
  backdrop-filter: blur(14px); transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .2s;
  animation: pop .5s cubic-bezier(.16,1,.3,1) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97);} to { opacity: 1; transform: none; } }
.member::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--blue)); opacity: .85; }
.member:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow), var(--glow-blue); }
.member .av { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--navy-700); flex-shrink: 0; border: 1px solid var(--line-2); }
.member .who { min-width: 0; flex: 1; }
.member .who .cs { font-family: var(--mono); font-size: 11px; color: var(--gold); letter-spacing: .5px; }
.member .who .nm { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .who .subline { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.member .rkrow { flex-shrink: 0; }
.rank-pill { padding: 4px 9px; border-radius: 7px; background: rgba(47,128,224,0.16); border: 1px solid rgba(47,128,224,0.32); color: #bcd0ff; font-weight: 700; font-size: 11px; font-family: var(--mono); letter-spacing: .5px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.badges { display: flex; gap: 4px; }
.cert { font-family: var(--mono); font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; letter-spacing: .4px; }
.cert.hsu { background: var(--green-bg); color: #7df0ad; }
.cert.teu { background: rgba(79,214,255,0.16); color: #8eeaff; }
.cert.swat { background: var(--red-bg); color: #ff9aa4; }
.ia-flag { font-family: var(--mono); font-size: 10.5px; }

/* ── Rank structure ── */
.rank-section { margin-bottom: 20px; }
.rank-section h3 { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--gold); text-transform: uppercase; margin: 0 0 10px; font-weight: 700; }
.rank-row { display: flex; align-items: center; gap: 14px; padding: 12px 15px; border-radius: 11px; border: 1px solid var(--line); background: var(--glass); margin-bottom: 8px; transition: .16s; }
.rank-row:hover { border-color: var(--line-2); transform: translateX(3px); }
.rank-row .abbr { font-family: var(--mono); font-weight: 800; color: var(--gold); width: 52px; font-size: 12px; }
.rank-row .nm { font-weight: 600; flex: 1; font-size: 13.5px; }
.rank-row .cnt { font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* ── Data tables ── */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--glass); backdrop-filter: blur(14px); }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data thead th { text-align: left; padding: 11px 14px; background: var(--glass-2); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); }
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(150,190,255,0.05); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.pill.green { background: var(--green-bg); color: #7df0ad; }
.pill.red { background: var(--red-bg); color: #ff9aa4; }
.pill.amber { background: var(--amber-bg); color: var(--gold-2); }
.pill.slate { background: var(--slate-bg); color: #b8c6e6; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* Compact regulation matrix marks */
.mk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-family: var(--mono); font-weight: 700; font-size: 11px; }
.mk.green { background: var(--green-bg); color: #7df0ad; }
.mk.red { background: var(--red-bg); color: #ff9aa4; }
.mk.slate { background: var(--slate-bg); color: #b8c6e6; }
table.data.matrix th, table.data.matrix td { padding: 8px 9px; white-space: nowrap; }
table.data.matrix thead th { font-size: 10px; letter-spacing: .2px; }
table.data.matrix tbody td:first-child { white-space: nowrap; }

/* ── Permissions (RBAC) ── */
.perm-admin { display: grid; grid-template-columns: 232px 1fr; gap: 16px; align-items: start; }
.role-list { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; backdrop-filter: blur(14px); }
.role-list-head { padding: 12px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gold); background: var(--glass-2); border-bottom: 1px solid var(--line); font-family: var(--mono); }
.role-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .12s; }
.role-item:last-child { border-bottom: 0; }
.role-item:hover { background: rgba(150,190,255,0.06); }
.role-item.active { background: linear-gradient(100deg, rgba(243,195,78,0.14), rgba(47,128,224,0.1)); box-shadow: inset 3px 0 0 var(--gold); }
.role-item .ab { font-family: var(--mono); font-weight: 800; font-size: 11px; color: var(--gold); width: 44px; }
.role-item .rn { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.role-item .ct { font-size: 11px; color: var(--faint); font-family: var(--mono); }

.perm-panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(14px); }
.perm-panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.perm-panel-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.perm-panel-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.perm-panel-head .admin-note { font-size: 11.5px; color: var(--faint); }
.perm-group { padding: 4px 20px 8px; }
.perm-group-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--gold); padding: 16px 0 4px; font-family: var(--mono); }
.perm-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm-group .perm-switch-row:last-child { border-bottom: 0; }
.psr-text b { font-size: 13.5px; font-weight: 600; color: var(--text); display: block; }
.psr-text small { font-size: 12px; color: var(--muted); }

.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--line-2); border-radius: 20px; transition: background .16s, box-shadow .16s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .16s; }
.switch input:checked + .track { background: linear-gradient(120deg, var(--gold), var(--gold-2)); box-shadow: var(--glow-gold); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .4; }

/* ── Citations ── */
.cite-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.cite-form { padding: 18px 20px; }
.cite-form h3 { margin: 0 0 3px; font-size: 16px; }
.cite-form .hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.cite-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.cite-stat { flex: 1; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; backdrop-filter: blur(12px); }
.cite-stat .n { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.cite-stat .l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-family: var(--mono); margin-top: 2px; }

/* ── Form fields ── */
.field { margin: 0 0 13px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); letter-spacing: .3px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--navy-800); color: var(--text); font-size: 13.5px; font-family: var(--font); transition: border-color .14s, box-shadow .14s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,128,224,0.2); }
.field textarea { resize: vertical; min-height: 64px; }
.field-row { display: flex; gap: 11px; }
.field-row .field { flex: 1; }

.btn { padding: 10px 16px; border-radius: 10px; border: 0; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s; font-family: var(--font); }
.btn.primary { background: linear-gradient(120deg, var(--gold), var(--gold-2)); color: #1a1200; }
.btn.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-2); background: rgba(150,190,255,0.06); }
.btn.danger { background: transparent; border: 1px solid rgba(255,85,102,0.4); color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.block { width: 100%; }

/* ── Image upload + evidence ── */
.upload input[type=file] { display: none; }
.upload-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--navy-800); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: .14s; }
.upload-btn:hover { color: var(--text); border-color: var(--gold); }
.upload-preview { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.upload-preview:empty { display: none; }
.upload-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
.upload-preview .rm { margin-left: auto; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.upload-preview .rm:hover { color: var(--red); border-color: rgba(255,85,102,0.4); }
.evi { width: 38px; height: 38px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line-2); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.evi:hover { transform: scale(1.06); box-shadow: var(--glow-blue); }

/* ── Officers-involved multi-select ── */
.ms { position: relative; }
.ms-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--navy-800); min-height: 42px; }
.ms-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,128,224,0.2); }
.ms-input { flex: 1; min-width: 120px; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; font-family: var(--font); padding: 4px; }
.ms-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 7px; background: rgba(47,128,224,0.18); border: 1px solid rgba(47,128,224,0.32); color: #bcd0ff; font-size: 12px; font-weight: 600; }
.ms-chip .x { cursor: pointer; opacity: .7; font-size: 11px; }
.ms-chip .x:hover { opacity: 1; color: #fff; }
.ms-drop { position: absolute; top: 100%; left: 0; right: 0; margin-top: 5px; background: var(--glass-2); border: 1px solid var(--line-2); border-radius: 10px; backdrop-filter: blur(16px); box-shadow: var(--shadow); z-index: 30; max-height: 240px; overflow-y: auto; display: none; }
.ms-drop.open { display: block; }
.ms-opt { display: flex; align-items: center; gap: 9px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.ms-opt:last-child { border-bottom: 0; }
.ms-opt:hover { background: rgba(150,190,255,0.08); }
.ms-opt .cs { font-family: var(--mono); color: var(--gold); font-size: 11px; min-width: 40px; }
.ms-opt .rk { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.ms-empty { padding: 10px 12px; color: var(--faint); font-size: 12px; }

/* ── Reference pages ── */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
.ref-item { display: flex; gap: 11px; padding: 11px 14px; border: 1px solid var(--line); background: var(--glass); border-radius: var(--r-sm); align-items: center; transition: .15s; }
.ref-item:hover { border-color: var(--line-2); }
.ref-item .code { font-family: var(--mono); font-weight: 800; color: var(--gold); min-width: 48px; }
.uof-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--glass); }
.uof-row .lv { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-family: var(--mono); flex-shrink: 0; }

/* ── Locked / empty ── */
.locked { display: grid; place-items: center; padding: 64px 20px; text-align: center; color: var(--muted); }
.locked svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 13px; }
.empty { padding: 28px; text-align: center; color: var(--faint); font-size: 13px; }

/* ── Modal ── */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(3,6,14,0.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(460px, 94vw); padding: 24px; background: var(--glass-2); border: 1px solid var(--line-2); border-radius: 16px; backdrop-filter: blur(22px); box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; animation: rise .3s cubic-bezier(.16,1,.3,1) both; }
.modal h3 { margin: 0 0 3px; font-size: 17px; }
.modal .modal-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

/* ── Toast ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); z-index: 80; padding: 12px 20px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--line-2); color: #fff; font-size: 14px; font-weight: 600; opacity: 0; transition: .3s; box-shadow: var(--shadow); backdrop-filter: blur(16px); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(70,224,140,0.5); }
.toast.err { border-color: rgba(255,85,102,0.5); }

/* ── Loader ── */
.boot { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--navy-900); transition: opacity .5s; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot .spin { width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ── Split Landing Layout ── */
@media (min-width: 901px) {
  .landing {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
    padding: 40px;
  }
}
@media (max-width: 900px) {
  .landing {
    display: flex;
    flex-direction: column-reverse;
    gap: 32px;
    padding: 24px;
    align-items: center;
  }
  .info-card {
    margin-top: 16px;
    width: 100%;
  }
}

.info-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow);
  text-align: left;
  animation: rise .8s cubic-bezier(.16,1,.3,1) both;
}
.info-header { margin-bottom: 12px; }
.info-badge { font-family: var(--mono); font-size: 10px; color: var(--gold); background: rgba(243,195,78,0.1); border: 1px solid rgba(243,195,78,0.3); padding: 4px 10px; border-radius: 20px; font-weight: 700; letter-spacing: 1.5px; }
.info-title { font-size: 28px; font-weight: 800; color: #fff; margin: 0 0 4px; letter-spacing: -0.5px; }
.info-subtitle { font-size: 14px; color: var(--muted); margin: 0 0 28px; }
.info-content { display: flex; flex-direction: column; gap: 24px; }
.info-block { display: flex; gap: 16px; align-items: flex-start; }
.info-block-icon { font-size: 20px; width: 42px; height: 42px; display: grid; place-items: center; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.info-block-text h3 { font-size: 14.5px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.info-block-text p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ── Department Selector Hub ── */
.app.hub-mode {
  display: block;
}
.app.hub-mode .sidebar { display: none !important; }
.app.hub-mode .topbar { display: none !important; }
.app.hub-mode #content { padding: 0 !important; }

.hub-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.hub-header { text-align: center; margin-bottom: 40px; }
.hub-header h1 { font-size: 32px; font-weight: 800; color: #fff; margin: 0 0 8px; letter-spacing: -0.5px; }
.hub-header p { font-size: 14px; color: var(--muted); margin: 0; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}
.hub-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.hub-card:not(.locked):hover {
  transform: translateY(-4px);
  border-color: rgba(243,195,78,0.4);
  box-shadow: var(--shadow), 0 10px 30px -10px rgba(243,195,78,0.15);
}
.hub-card.locked {
  opacity: 0.6;
}
.hub-card.locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  pointer-events: none;
}
.hub-logo-wrap {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}
.hub-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hub-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}
.hub-card:not(.locked) .hub-logo-placeholder {
  color: var(--gold);
  border-color: rgba(243,195,78,0.25);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.2), 0 0 15px rgba(243,195,78,0.08);
}
.hub-card-abbr {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 4px;
  font-weight: 700;
}
.hub-card.locked .hub-card-abbr {
  color: var(--muted);
}
.hub-card-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}
.hub-card-rank {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 20px;
}
.hub-card-rank strong {
  color: var(--text);
  font-weight: 700;
}
.hub-card.locked .hub-card-rank {
  color: var(--faint);
}
.hub-enter-btn {
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  background: linear-gradient(135deg, var(--gold), #d4a017);
  color: #111;
  box-shadow: 0 4px 15px -4px rgba(243,195,78,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hub-enter-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px -4px rgba(243,195,78,0.55);
}
.hub-lock-btn {
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: not-allowed;
}

/* ── Responsive ── */
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--glass); place-items: center; cursor: pointer; color: var(--muted); }
@media (max-width: 880px) {
  .sidebar { position: fixed; left: -260px; z-index: 60; transition: left .25s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .menu-btn { display: inline-grid; }
  #content { padding: 18px 16px 40px; }
  .perm-admin, .cite-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

