:root {
  --navy-950: #163d5c;
  --navy-900: #1c527b;
  --navy-800: #17689a;
  --blue-700: #137ec5;
  --blue-600: #2497dc;
  --blue-500: #51b6ea;
  --blue-100: #e5f6ff;
  --gold-500: #f4bd3f;
  --bg: #f1faff;
  --surface: #ffffff;
  --surface-soft: #f8fdff;
  --text: #20394c;
  --muted: #668294;
  --line: #d9edf7;
  --line-strong: #bedce9;
  --success: #16845f;
  --success-bg: #e8fbf3;
  --warning: #a96804;
  --warning-bg: #fff6da;
  --danger: #c5423a;
  --danger-bg: #fff1ef;
  --shadow-sm: 0 7px 20px rgba(27, 107, 158, .07);
  --shadow: 0 14px 34px rgba(27, 107, 158, .11);
  --radius-sm: 10px;
  --radius: 14px;
  --sidebar-width: 264px;
  --content-max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.sidebar-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(33, 147, 207, .25); outline-offset: 2px; }

/* ===== APP LAYOUT ===== */
.app-shell { min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 206, 82, .34), transparent 30%),
    radial-gradient(circle at 100% 80%, rgba(78, 190, 238, .22), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f3fbff 46%, #e8f7ff 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  z-index: 50;
  box-shadow: 8px 0 28px rgba(36, 132, 190, .10);
  border-right: 1px solid #d5edf8;
  overflow: hidden;
}
.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 16px 16px;
  border-bottom: 1px solid #d9edf7;
}

.sidebar-brand-copy { min-width: 0; }
.sidebar-brand strong { display: block; font-size: 1.06rem; letter-spacing: .7px; line-height: 1.1; }
.sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: #688596;
  font-size: .68rem;
  line-height: 1.35;
}
.sidebar-section-label {
  padding: 16px 18px 7px;
  color: #8aa6b5;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: 1.15px;
}
.sidebar-nav {
  padding: 3px 10px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #46687c;
  margin: 3px 0;
  font-size: .82rem;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link:hover { background: #e7f7ff; color: var(--blue-700); transform: translateX(2px); }
.nav-link.active {
  background: linear-gradient(135deg, #dff5ff 0%, #f1fbff 62%, #fff2bd 100%);
  color: #106fae;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(29, 139, 201, .13);
  border: 1px solid #c7eafb;
}
.nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf8fd;
  color: #4f7e98;
  font-size: .95rem;
}
 .nav-link.active .nav-icon { background: #ffffff; color: var(--blue-700); box-shadow: 0 3px 10px rgba(34,143,204,.10); }
.nav-label { min-width: 0; line-height: 1.25; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 16px;
  border-top: 1px solid #d9edf7;
  background: rgba(255,255,255,.72);
}
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #dff5ff, #fff0b8);
  border: 1px solid #c8e8f7;
  color: #176f9f;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.sidebar-user-copy { min-width: 0; }
.sidebar-user strong {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .77rem;
}
.sidebar-user span,
.sidebar-user small {
  display: block;
  color: #718c9c;
  font-size: .65rem;
  margin-top: 2px;
  line-height: 1.35;
}

.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(246,252,255,.98));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 14px rgba(30,122,177,.055);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { min-width: 0; }
.eyebrow {
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .55px;
  text-transform: uppercase;
}
.topbar h1 {
  margin: 3px 0 0;
  font-size: 1.25rem;
  color: var(--navy-950);
  line-height: 1.2;
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy-900);
  font-size: 1.18rem;
  align-items: center;
  justify-content: center;
}
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.role-pill {
  color: var(--blue-700);
  background: linear-gradient(135deg, #e0f5ff, #fff3c3);
  border: 1px solid #c8e4f4;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}
.content-area { flex: 1; padding: 22px 24px 34px; min-width: 0; }
.content-container { width: 100%; max-width: var(--content-max); margin: 0 auto; }
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.65);
  font-size: .68rem;
}
.sidebar-overlay { display: none; }

/* ===== PAGE STRUCTURE ===== */
.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-actions > div:first-child { min-width: 0; }
.page-actions h2 { margin: 0; font-size: 1.05rem; color: var(--navy-950); line-height: 1.25; }
.grid { display: grid; gap: 16px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== CARDS ===== */
.card {
  min-width: 0;
  background: linear-gradient(180deg, #ffffff, #fbfeff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  min-height: 56px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #edf2f6;
  background: linear-gradient(180deg, #ffffff, #f4fbff);
}
.card-header h2,
.card-header h3 { margin: 0; font-size: .93rem; color: var(--navy-950); line-height: 1.3; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid #edf2f6; background: #fbfcfd; }
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  min-height: 128px;
  border-top: 3px solid #8dd2f3;
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(64,181,235,.09);
  right: -32px;
  bottom: -38px;
}
.stat-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #e0f5ff, #fff3c3);
  font-size: 1.18rem;
}
.stat-label { color: var(--muted); font-size: .72rem; font-weight: 700; max-width: calc(100% - 50px); }
.stat-value { font-size: 1.9rem; line-height: 1.05; margin: 11px 0 6px; font-weight: 850; color: var(--navy-950); }
.stat-note { color: var(--muted); font-size: .68rem; line-height: 1.45; max-width: 85%; }
.document-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.document-card:hover { transform: translateY(-1px); border-color: #bdd6e8; box-shadow: var(--shadow); }
.document-card strong { display: block; font-size: .79rem; color: var(--navy-950); }
.document-card span { display: block; font-size: .68rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* ===== BUTTONS ===== */
.btn {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 13px;
  font-weight: 750;
  font-size: .76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(0,0,0,.08); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); }
.btn-success { color: #fff; background: var(--success); }
.btn-warning { color: #fff; background: #bb760d; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-outline { background: #fff; color: var(--blue-700); border-color: #c8dce9; }
.btn-outline:hover { background: #f6fbfe; }
.btn-muted { color: #425564; background: #edf2f6; border-color: #e2e9ef; }
.btn-sm { min-height: 32px; padding: 6px 9px; border-radius: 8px; font-size: .69rem; }

/* ===== TABLES ===== */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
  font-size: .74rem;
  line-height: 1.45;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #536675;
  background: #eef9ff;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .45px;
  font-weight: 800;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f0faff; }
td .btn + .btn { margin-left: 4px; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-warning { color: var(--warning); background: var(--warning-bg); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }
.badge-muted { color: #5f6f7c; background: #edf2f6; }
.badge-info { color: var(--blue-700); background: var(--blue-100); }

/* ===== FORMS ===== */
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; }
.form-group { margin-bottom: 14px; min-width: 0; }
.form-group label { display: block; color: #3e5364; font-size: .72rem; font-weight: 760; margin-bottom: 6px; }
.form-control {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-size: .78rem;
}
select.form-control { padding-right: 32px; }
.form-control:focus { border-color: #69acd5; box-shadow: 0 0 0 3px rgba(20,120,187,.10); }
.form-control::placeholder { color: #9aa8b3; }
textarea.form-control { min-height: 100px; resize: vertical; line-height: 1.5; }
.help { color: var(--muted); font-size: .66rem; margin-top: 5px; line-height: 1.45; }
.required::after { content: " *"; color: var(--danger); }
.search-box { min-width: 270px; max-width: 380px; }

/* ===== ALERTS ===== */
.alert {
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: .75rem;
  line-height: 1.45;
  transition: opacity .25s ease, transform .25s ease;
}
.alert button { border: 0; background: transparent; font-size: 1rem; color: inherit; padding: 0 2px; }
.alert-success { color: var(--success); background: var(--success-bg); border: 1px solid #c2e7d6; }
.alert-warning { color: var(--warning); background: var(--warning-bg); border: 1px solid #efd69c; }
.alert-danger { color: var(--danger); background: var(--danger-bg); border: 1px solid #f0c9c5; }
.alert-info { color: var(--blue-700); background: #ebf6fc; border: 1px solid #c7e4f4; }
.alert-leaving { opacity: 0; transform: translateY(-4px); }

/* ===== DETAIL / TIMELINE / PROGRESS ===== */
.empty-state { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-state .icon { font-size: 2rem; margin-bottom: 9px; }
.empty-state h3 { margin: 0 0 5px; color: var(--navy-950); font-size: .95rem; }
.empty-state p { margin: 0 auto 13px; max-width: 520px; font-size: .75rem; line-height: 1.6; }
.detail-list { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 9px 15px; font-size: .75rem; }
.detail-list dt { color: var(--muted); line-height: 1.45; }
.detail-list dd { margin: 0; font-weight: 650; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 17px 23px; border-left: 2px solid #dce8f1; margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-700); left: -6px; top: 3px; box-shadow: 0 0 0 4px #e7f2fa; }
.timeline strong { display: block; font-size: .74rem; color: var(--navy-950); }
.timeline span { display: block; font-size: .67rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.kpi-bar { height: 7px; background: #e8eef3; border-radius: 999px; overflow: hidden; }
.kpi-bar > span { display: block; height: 100%; background: linear-gradient(90deg,var(--blue-700),var(--blue-500)); }
.pill-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.pill-tabs a { padding: 6px 9px; border-radius: 999px; border: 1px solid #cedce6; color: #526574; background: #fff; font-size: .67rem; white-space: nowrap; }
.pill-tabs a:hover { border-color: #91bdd9; color: var(--blue-700); }
.pill-tabs a.active { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }
.progress-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 15px 0 0; overflow-x: auto; }
.step { min-width: 86px; text-align: center; font-size: .61rem; color: var(--muted); position: relative; line-height: 1.35; }
.step::before { content: ""; display: block; height: 6px; background: #e0e8ef; border-radius: 999px; margin-bottom: 7px; }
.step.done::before { background: var(--success); }
.step.current::before { background: var(--blue-700); box-shadow: 0 0 0 3px rgba(14,95,157,.10); }

/* ===== TYPOGRAPHY / UTILITIES ===== */
.muted { color: var(--muted); }
.text-sm { font-size: .72rem; }
.text-xs { font-size: .65rem; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ===== LOGIN ===== */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(67,185,235,.30), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(255,204,76,.28), transparent 26%),
    radial-gradient(circle at 84% 88%, rgba(94,211,183,.18), transparent 28%),
    linear-gradient(140deg,#eefaff,#ffffff 54%,#fff9e7);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell {
  width: min(1020px,100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(27, 117, 170, .18);
  border: 1px solid #d8edf7;
}
.login-hero {
  padding: 44px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,216,103,.38), transparent 26%),
    linear-gradient(150deg,#f3fbfe,#eef9fd);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-hero h1 { font-size: 2rem; line-height: 1.14; margin: 26px 0 14px; max-width: 500px; }
.login-hero p { color: rgba(255,255,255,.92); line-height: 1.7; max-width: 530px; font-size: .82rem; }
.login-badges { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin-top: 24px; }
.login-badge { border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.15); border-radius: 11px; padding: 10px 11px; font-size: .7rem; }
.login-form { padding: 48px 44px; align-self: center; }
.login-form h2 { margin: 0; color: var(--navy-950); font-size: 1.35rem; }
.login-form > p { color: var(--muted); font-size: .75rem; margin-bottom: 22px; }



/* ===== INSTALLER / ERROR ===== */
.install-page { min-height: 100vh; background: linear-gradient(180deg,#eefaff,#fffdf4); padding: 34px 18px; }
.install-card { max-width: 820px; margin: 0 auto; }
.install-head { text-align: center; margin-bottom: 22px; }
.install-progress { margin-top: 12px; }
.spinner { display:inline-block; width:18px; height:18px; border:2px solid #d8e3eb; border-top-color:var(--blue-700); border-radius:50%; animation:spin .75s linear infinite; vertical-align:middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.error-card { width: min(500px,100%); padding: 34px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); text-align: center; }
.brand-mark { width: 58px; height: 58px; border-radius: 15px; background: var(--blue-700); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; font-weight: 800; }
.print-only { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(25,80,112,.28);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main-content { margin-left: 0; width: 100%; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 11px 16px; min-height: 70px; }
  .content-area { padding: 18px 16px 28px; }
  .app-footer { padding: 13px 16px; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; max-width: 560px; }
  .login-hero { display: none; }
  .login-form { padding: 42px 36px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .top-actions .role-pill { display: none; }
  .top-actions .btn { padding-left: 9px; padding-right: 9px; }
  .content-area { padding: 15px 12px 24px; }
  .card-header { padding: 13px 14px; }
  .card-body { padding: 15px; }
  .stat-card { padding: 16px; }
  .page-actions { align-items: stretch; }
  .page-actions > .btn,
  .page-actions > .toolbar { width: 100%; }
  .page-actions > .toolbar .btn { flex: 1 1 auto; }
  .search-box { min-width: 0; width: 100%; max-width: none; }
  .card-header .search-box { flex: 1 1 100%; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 9px; }
  .pill-tabs { flex-wrap: nowrap; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .progress-steps { grid-template-columns: repeat(7, 96px) !important; }
  .app-footer { flex-direction: column; gap: 3px; }
}

@media (max-width: 480px) {
  .topbar h1 { font-size: 1.02rem; }
  .eyebrow { font-size: .58rem; }
  .top-actions .btn:first-of-type { display: none; }
  .login-page { padding: 14px; }
  .login-form { padding: 34px 24px; }
  .btn { white-space: normal; text-align: center; }
  .toolbar .btn { width: 100%; }
}

@media print {
  .sidebar, .topbar, .app-footer, .no-print, .sidebar-overlay { display: none !important; }
  .main-content { margin: 0; width: 100%; }
  .content-area { padding: 0; }
  .content-container { max-width: none; }
  .card { box-shadow: none; border-color: #bbb; }
  .print-only { display: block; }
}

/* ===== STUDENT GROUP PICKER ===== */
.student-picker-search-wrap { position: relative; }
.student-picker-count { position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:.75rem; color:var(--muted); background:#fff; padding-left:8px; }
.student-picker-results { display:none; margin-top:8px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 14px 30px rgba(15,55,85,.10); max-height:320px; overflow:auto; }
.student-picker-results.active { display:block; }
.student-picker-item { width:100%; border:0; border-bottom:1px solid #edf2f6; background:#fff; padding:11px 13px; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; cursor:pointer; }
.student-picker-item:last-child { border-bottom:0; }
.student-picker-item:hover { background:#f5f9fc; }
.student-picker-item span:first-child { display:flex; flex-direction:column; min-width:0; }
.student-picker-item strong { color:var(--text); }
.student-picker-item small { color:var(--muted); margin-top:2px; }
.student-picker-add { color:var(--blue-700); font-size:.78rem; font-weight:700; white-space:nowrap; }
.student-picker-empty { padding:14px; color:var(--muted); font-size:.86rem; }
.selected-students { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.selected-student-chip { display:flex; align-items:center; gap:10px; border:1px solid #cfe0eb; background:#f7fbfd; border-radius:11px; padding:8px 9px 8px 11px; }
.selected-student-chip > span { display:flex; flex-direction:column; }
.selected-student-chip strong { font-size:.84rem; }
.selected-student-chip small { color:var(--muted); font-size:.7rem; }
.selected-student-chip button { border:0; background:#e8eff4; color:#44545f; width:25px; height:25px; border-radius:8px; cursor:pointer; font-size:1rem; line-height:1; }
.selected-student-chip button:hover { background:#d9e5ec; }

/* ===== HUBIN QUEUE ===== */
.stat-link { display:block; color:inherit; }
.stat-link:hover { transform:translateY(-2px); border-color:#bdd6e8; box-shadow:var(--shadow); }
.hubin-queue-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.hubin-queue-card { min-width:0; display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:10px; padding:13px; border:1px solid var(--line); border-radius:12px; background:#fff; color:inherit; }
.hubin-queue-card:hover { border-color:#b9d4e6; background:#f8fbfd; }
.hubin-queue-card.priority { border-color:#f0c670; background:#fffaf0; }
.hubin-queue-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:#eef5f9; font-size:1.05rem; }
.hubin-queue-copy { min-width:0; }
.hubin-queue-copy strong { display:block; color:var(--navy-950); font-size:.78rem; line-height:1.3; }
.hubin-queue-copy small { display:block; color:var(--muted); font-size:.66rem; line-height:1.4; margin-top:3px; }
.hubin-queue-count { min-width:32px; height:32px; border-radius:10px; display:grid; place-items:center; padding:0 7px; background:var(--navy-950); color:#fff; font-size:.8rem; font-weight:800; }
@media (max-width:1180px){.hubin-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:680px){.hubin-queue-grid{grid-template-columns:1fr;}}

/* ===== HUBIN FILTERS ===== */
.hubin-filter-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.hubin-filter-chip { display:flex; flex-direction:column; gap:3px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:inherit; }
.hubin-filter-chip strong { color:var(--navy-950); font-size:.75rem; }
.hubin-filter-chip span { color:var(--muted); font-size:.64rem; }
.hubin-filter-chip:hover,.hubin-filter-chip.active { border-color:#95bfd9; background:#f3f9fc; }
@media(max-width:900px){.hubin-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.hubin-filter-row{grid-template-columns:1fr;}}


/* ===== V7 BRIGHT THEME REFINEMENTS ===== */
body {
  background:
    radial-gradient(circle at 95% 4%, rgba(255, 211, 91, .12), transparent 24%),
    radial-gradient(circle at 3% 96%, rgba(75, 190, 236, .10), transparent 26%),
    var(--bg);
}

.sidebar-brand strong { color: #176f9f; }
.nav-link.active::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-500);
  margin-left: auto;
  box-shadow: 0 0 0 4px rgba(244,189,63,.16);
}
.topbar { border-bottom-color: #d7edf7; }
.menu-toggle { background: #f7fcff; border-color: #cfe7f3; }
.role-pill {
  color: #0f76b7;
  background: linear-gradient(135deg,#e1f6ff,#fff4c9);
  border-color: #c9eaf7;
}
.content-area { position: relative; }
.card { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card:hover { border-color: #c6e5f4; }
.stat-card { background: linear-gradient(145deg,#ffffff 0%,#f4fbff 70%,#fff9e6 100%); }
.stat-card:nth-child(4n+2) { border-top-color: #76d6bd; }
.stat-card:nth-child(4n+3) { border-top-color: #f3ca63; }
.stat-card:nth-child(4n+4) { border-top-color: #a9bdf6; }
.stat-icon { box-shadow: inset 0 0 0 1px rgba(100,190,232,.12); }
.btn-primary {
  background: linear-gradient(135deg,#168ed2,#3ab1e8);
  box-shadow: 0 5px 13px rgba(28,145,207,.15);
}
.btn-primary:hover { box-shadow: 0 8px 18px rgba(28,145,207,.22); }
.btn-success { background: linear-gradient(135deg,#15966b,#35b98d); }
.btn-warning { background: linear-gradient(135deg,#e8a526,#f5c34f); color:#5a3c00; }
.btn-outline { background: #fbfeff; border-color:#bde1f2; }
.btn-muted { background:#edf8fc; border-color:#d8edf5; color:#486a7c; }
.form-control { background:#fcfeff; border-color:#c8e1ec; }
.form-control:focus { border-color:#55b6e2; box-shadow:0 0 0 4px rgba(56,171,224,.12); background:#fff; }
.table-wrap { border-radius: 10px; }
th { color:#3d6d88; background:linear-gradient(180deg,#eef9ff,#f7fcff); }
.badge-info { background:#e1f5ff; }
.badge-success { background:#e5fbf2; }
.badge-warning { background:#fff5d6; }
.alert-info { background:#eaf8ff; }
.timeline li { border-left-color:#cce7f4; }
.timeline li::before { background:#29a1db; box-shadow:0 0 0 4px #e0f5ff; }
.pill-tabs a { border-color:#c9e5f2; background:#fbfeff; }
.pill-tabs a.active { background:linear-gradient(135deg,#178ed0,#45b6e7); border-color:#178ed0; }
.student-picker-results { border-color:#cce7f3; box-shadow:0 14px 30px rgba(29,137,195,.12); }
.student-picker-item:hover { background:#edf9ff; }
.selected-student-chip { border-color:#bfe3f2; background:linear-gradient(135deg,#eefaff,#fff9e7); }
.hubin-queue-card { background:linear-gradient(135deg,#ffffff,#f8fdff); }
.hubin-queue-card:hover { background:#eefaff; border-color:#9fd4eb; }
.hubin-queue-card.priority { border-color:#f2cc65; background:linear-gradient(135deg,#fffdf5,#fff5cf); }
.hubin-queue-icon { background:linear-gradient(135deg,#e3f6ff,#fff3c2); }
.hubin-queue-count { background:linear-gradient(135deg,#1889c9,#39afe5); }
.hubin-filter-chip:hover,.hubin-filter-chip.active { border-color:#8acced; background:linear-gradient(135deg,#edf9ff,#fff9e8); }
.app-footer { background:rgba(250,254,255,.86); border-top-color:#d9edf7; }
.login-form { background:linear-gradient(180deg,#ffffff,#fbfeff); }
.install-head h1,.install-head h2 { color:var(--navy-950); }


/* ===== V9 LIGHT / NO-LOGO THEME ===== */
:root {
  --navy-950: #24485f;
  --navy-900: #315c75;
  --navy-800: #2d7197;
  --blue-700: #258fc9;
  --blue-600: #43a9d8;
  --blue-500: #70c3e7;
  --blue-100: #eef9fe;
  --gold-500: #f0c75e;
  --bg: #f8fbfd;
  --surface: #ffffff;
  --surface-soft: #fbfdfe;
  --text: #294657;
  --muted: #718896;
  --line: #e4eef3;
  --line-strong: #d2e3eb;
  --success: #2b8a70;
  --success-bg: #effaf6;
  --warning: #9b751f;
  --warning-bg: #fff9e9;
  --danger: #bd554e;
  --danger-bg: #fff4f3;
  --shadow-sm: 0 5px 18px rgba(57, 107, 134, .055);
  --shadow: 0 12px 30px rgba(57, 107, 134, .085);
}
body {
  background: linear-gradient(180deg, #fbfdfe 0%, #f6fafc 100%);
}
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e5eef3;
  box-shadow: 5px 0 22px rgba(54, 105, 132, .045);
}
.sidebar-brand {
  min-height: 86px;
  padding: 20px 18px;
  border-bottom-color: #edf3f6;
  background: linear-gradient(180deg,#ffffff,#fbfdfe);
}
.sidebar-brand-copy { width: 100%; }
.sidebar-brand strong {
  color: #257fae;
  font-size: 1.18rem;
  letter-spacing: .45px;
}
.sidebar-brand span { color: #7a909d; font-size: .7rem; max-width: 210px; }
.sidebar-section-label { color: #9aabb5; }
.nav-link { color: #587383; border: 1px solid transparent; }
.nav-link:hover { background: #f2faff; color: #2688bb; transform: none; }
.nav-link.active {
  background: #edf8fd;
  color: #217ead;
  border-color: #d7edf7;
  box-shadow: none;
}
.nav-link.active::after { background: #f0c75e; box-shadow: 0 0 0 4px rgba(240,199,94,.14); }
.nav-icon { background: #f3f8fa; color: #658392; }
.nav-link.active .nav-icon { background: #ffffff; color: #258fc9; box-shadow: none; }
.sidebar-user { background: #fbfdfe; border-top-color: #edf3f6; }
.avatar { background: #eef8fc; border-color: #dcecf3; color: #297fa9; }
.topbar {
  background: rgba(255,255,255,.97);
  border-bottom-color: #e6eef2;
  box-shadow: 0 2px 10px rgba(55,101,126,.035);
}
.topbar h1 { color: #294d63; }
.role-pill { color:#2b7fa8; background:#f0f9fd; border-color:#dbeef6; }
.content-area { padding-top: 26px; }
.card {
  background: #ffffff;
  border-color: #e3edf2;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: #d9e9f0; }
.card-header { background: #fcfeff; border-bottom-color: #eef3f5; }
.card-footer { background: #fcfeff; border-top-color: #eef3f5; }
.stat-card { background: #ffffff; border-top-width: 3px; }
.stat-card::after { background: rgba(83,177,218,.055); }
.stat-icon { background: #f1f9fc; box-shadow: none; }
.stat-card:nth-child(4n+2) .stat-icon { background:#effaf6; }
.stat-card:nth-child(4n+3) .stat-icon { background:#fff9ea; }
.stat-card:nth-child(4n+4) .stat-icon { background:#f3f3fc; }
.document-card { box-shadow:none; background:#fff; }
.btn { box-shadow:none; }
.btn:hover { box-shadow: 0 4px 12px rgba(52,103,130,.08); }
.btn-primary { background:#318fc0; box-shadow:none; }
.btn-primary:hover { background:#277fad; box-shadow:none; }
.btn-success { background:#36937a; }
.btn-warning { background:#f1c85f; color:#614c17; }
.btn-danger { background:#c45b55; }
.btn-outline { background:#fff; border-color:#d5e6ed; color:#2d83ad; }
.btn-outline:hover { background:#f7fbfd; }
.btn-muted { background:#f3f7f9; border-color:#e5edf1; color:#5f7480; }
th { color:#577382; background:#f5fafc; }
tbody tr:hover td { background:#f8fcfd; }
.form-control { background:#fff; border-color:#d6e5ec; }
.form-control:focus { border-color:#7cc5e3; box-shadow:0 0 0 4px rgba(88,178,217,.10); }
.alert-info { color:#337da2; background:#f0f9fd; border-color:#d7ecf5; }
.alert-success { background:#f0faf6; border-color:#d5eee4; }
.alert-warning { background:#fff9ea; border-color:#f2e5bd; }
.alert-danger { background:#fff5f4; border-color:#f0d8d5; }
.pill-tabs a { background:#fff; border-color:#dce9ef; }
.pill-tabs a.active { background:#318fc0; border-color:#318fc0; }
.hubin-queue-card { background:#fff; box-shadow:none; }
.hubin-queue-card:hover { background:#f8fcfd; border-color:#d0e6ef; }
.hubin-queue-card.priority { background:#fffaf0; border-color:#f0dfad; }
.hubin-queue-icon { background:#f4f9fb; }
.hubin-queue-count { background:#3a86aa; }
.hubin-filter-chip:hover,.hubin-filter-chip.active { background:#f4fafd; border-color:#cae4ef; }
.selected-student-chip { background:#f8fcfd; border-color:#d7eaf2; }
.app-footer { background:#fbfdfe; border-top-color:#e8f0f4; }

.login-page {
  background:
    radial-gradient(circle at 10% 8%, rgba(124,205,235,.14), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(247,214,126,.13), transparent 25%),
    linear-gradient(160deg,#fbfdfe 0%,#f4fbfe 52%,#fffdf7 100%);
}
.login-shell {
  border:1px solid #e2edf2;
  box-shadow:0 24px 65px rgba(60,110,136,.11);
}
.login-hero {
  color:#294657;
  background: linear-gradient(155deg,#f4fbfe 0%,#eff9fd 60%,#fffaf0 100%);
  border-right:1px solid #e4eef3;
}
.login-hero h1 { color:#28556f; }
.login-hero p { color:#627d8d; }
.login-hero small { color:#78909d; }
.login-badge {
  color:#4e6d7d;
  border-color:#d9eaf1;
  background:rgba(255,255,255,.72);
}
.login-form { background:#fff; }
.brand-text { display:flex; flex-direction:column; gap:4px; }
.brand-text strong { color:#287fa9; font-size:1rem; letter-spacing:.2px; }
.brand-text span { color:#7a909c; font-size:.7rem; }
.brand-text.compact { padding-bottom:4px; border-bottom:1px solid #edf3f6; }
.install-page { background:linear-gradient(180deg,#f8fcfe,#fffdf8); }
.install-head { padding-top:8px; }
.install-head h1 { margin-bottom:6px; }
.error-card { border:1px solid #e3edf2; box-shadow:var(--shadow); }
.error-kicker { color:#2d83ad; font-size:.72rem; font-weight:800; letter-spacing:.9px; text-transform:uppercase; margin-bottom:10px; }

@media (max-width:900px) {
  .login-form { background:#fff; }
}
