:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #16203a;
  --muted: #64748b;
  --border: #e3e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --info-soft: #f5f3ff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 32, 58, 0.08), 0 6px 20px rgba(16, 32, 58, 0.06);
  --sidebar-w: 236px;
  --topbar-h: 58px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(9, 20, 55, 0.35);
  padding: 32px 28px;
}

.login-card .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.login-card .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  display: grid;
  place-items: center;
  letter-spacing: 1px;
}

.login-card h1 {
  font-size: 20px;
  margin: 6px 0 0;
}

.login-card .sub {
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ---------- App shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "brand topbar" "sidebar main";
  min-height: 100vh;
}

.brandbar {
  grid-area: brand;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brandbar .logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
}

.brandbar .name {
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 15px;
}

.brandbar .tag {
  font-size: 10.5px;
  color: #94a3b8;
  display: block;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.topbar {
  grid-area: topbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar .spacer {
  flex: 1;
}

.topbar .year-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.topbar .year-box select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text);
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.admin-chip .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 34px;
  cursor: pointer;
  font-size: 17px;
}

.sidebar {
  grid-area: sidebar;
  background: #0f172a;
  color: #cbd5e1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  z-index: 40;
}

.sidebar .nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #64748b;
  padding: 12px 12px 6px;
}

.sidebar a.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar a.nav-item .ico {
  width: 19px;
  text-align: center;
  font-size: 15px;
  opacity: 0.9;
}

.sidebar a.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.sidebar a.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.sidebar .nav-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay {
  display: none;
}

.main {
  grid-area: main;
  padding: 22px 24px 48px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.2px;
}

.page-head .desc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.page-head .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Cards / stats ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card + .card {
  margin-top: 16px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.card .card-desc {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: -6px;
  margin-bottom: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-card .stat-ico {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 20px;
  opacity: 0.85;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.5px;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.stat-card.accent-blue {
  border-top: 3px solid var(--primary);
}
.stat-card.accent-green {
  border-top: 3px solid var(--success);
}
.stat-card.accent-amber {
  border-top: 3px solid var(--warning);
}
.stat-card.accent-red {
  border-top: 3px solid var(--danger);
}
.stat-card.accent-violet {
  border-top: 3px solid #7c3aed;
}
.stat-card.accent-teal {
  border-top: 3px solid #0d9488;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.grid-2 > .card {
  margin-top: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.field > label .req {
  color: var(--danger);
  margin-left: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
}

.field .err-msg {
  color: var(--danger);
  font-size: 12px;
  display: none;
}

.field.has-error .err-msg {
  display: block;
}

.field .hint {
  color: var(--muted);
  font-size: 11.5px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.span-2 {
  grid-column: span 2;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-title:first-child {
  margin-top: 0;
}

/* ---------- Table widget ---------- */
.table-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.table-toolbar .search {
  position: relative;
  flex: 1;
  min-width: 190px;
  max-width: 330px;
}

.table-toolbar .search input {
  width: 100%;
  padding: 8px 11px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--surface-2);
}

.table-toolbar .search input:focus {
  border-color: var(--primary);
  background: #fff;
}

.table-toolbar .search .search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.table-toolbar select.filter,
.table-toolbar input.filter {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  outline: none;
  font-size: 13px;
  max-width: 180px;
}

.table-toolbar .toolbar-end {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-scroll {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 640px;
}

table.data-table th,
table.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table th {
  background: var(--surface-2);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  user-select: none;
}

table.data-table th.sortable {
  cursor: pointer;
}

table.data-table th.sortable:hover {
  color: var(--primary);
}

table.data-table th .sort-ind {
  font-size: 10px;
  margin-left: 4px;
}

table.data-table tbody tr:hover {
  background: #f8faff;
}

table.data-table td.actions {
  white-space: nowrap;
  text-align: right;
}

table.data-table td.actions .btn {
  margin-left: 5px;
}

table.data-table .empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 10px !important;
}

.table-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  background: var(--surface);
}

.table-footer .pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-loading {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-blue {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.badge-green {
  background: var(--success-soft);
  color: var(--success);
}
.badge-amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge-red {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-gray {
  background: #f1f5f9;
  color: #475569;
}
.badge-violet {
  background: var(--info-soft);
  color: #6d28d9;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.4);
  animation: modal-in 0.18s ease-out;
}

.modal.modal-lg {
  max-width: 760px;
}

@keyframes modal-in {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 18px 20px;
  max-height: 66vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 14px 14px;
}

.confirm-msg {
  font-size: 14px;
  color: #334155;
  line-height: 1.55;
}

/* ---------- Toasts ---------- */
.toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: calc(100vw - 32px);
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
  display: flex;
  gap: 9px;
  align-items: center;
  animation: toast-in 0.2s ease-out;
  max-width: 420px;
}

.toast.success {
  background: #14532d;
}

.toast.error {
  background: #7f1d1d;
}

.toast.warning {
  background: #78350f;
}

@keyframes toast-in {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tabs button {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Detail helpers ---------- */
.detail-head {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-head .big-id {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 20px;
}

.kv .k {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  margin-bottom: 3px;
}

.kv .v {
  font-size: 14px;
  word-break: break-word;
}

.money-big {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.money-big.pending {
  color: var(--danger);
}

.money-big.paid {
  color: var(--success);
}

/* ---------- Documents ---------- */
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.doc-row .doc-name {
  font-weight: 600;
  flex: 1;
  min-width: 160px;
}

.doc-row .doc-meta {
  font-size: 12px;
  color: var(--muted);
  width: 100%;
  order: 5;
}

/* ---------- Follow-up rows ---------- */
.followup-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.timeline {
  border-left: 2px solid var(--border);
  margin-left: 6px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline .tl-item {
  position: relative;
}

.timeline .tl-item::before {
  content: "";
  position: absolute;
  left: -22.5px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.timeline .tl-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
}

.timeline .tl-comment {
  font-size: 13.5px;
  color: #334155;
  margin-top: 2px;
  white-space: pre-wrap;
}

/* ---------- Combobox (student search) ---------- */
.combo {
  position: relative;
}

.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow);
  max-height: 230px;
  overflow-y: auto;
  z-index: 60;
}

.combo-list .combo-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.combo-list .combo-item:hover,
.combo-list .combo-item.active {
  background: var(--primary-soft);
}

.combo-list .combo-item .sid {
  color: var(--muted);
  font-size: 12px;
}

.combo-list .combo-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Chart bars ---------- */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding-top: 10px;
}

.bars .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
}

.bars .bar {
  width: 100%;
  max-width: 42px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 5px 5px 0 0;
  min-height: 3px;
  transition: height 0.3s;
}

.bars .bar-label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mode-list .mode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding: 8px 11px;
  background: var(--surface-2);
  border-radius: 8px;
}

.mode-list .mode-row b {
  font-variant-numeric: tabular-nums;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
}

.activity-item .act-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}

.activity-item .act-main {
  flex: 1;
  min-width: 0;
}

.activity-item .act-sub {
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------- Misc ---------- */
.muted {
  color: var(--muted);
}

.text-right {
  text-align: right;
}

.nowrap {
  white-space: nowrap;
}

.mt-0 {
  margin-top: 0;
}

.mb-16 {
  margin-bottom: 16px;
}

.pager-info {
  font-variant-numeric: tabular-nums;
}

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

.empty-state .es-ico {
  font-size: 34px;
  margin-bottom: 8px;
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
  height: 14px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "main";
  }

  .brandbar {
    display: none;
  }

  .hamburger {
    display: inline-grid;
    place-items: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 200;
    padding-top: 18px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 150;
  }

  .main {
    padding: 16px 13px 40px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar .year-box .year-label {
    display: none;
  }

  .admin-chip .admin-name {
    display: none;
  }

  .followup-row {
    grid-template-columns: 1fr;
  }

  .page-head .actions {
    margin-left: 0;
    width: 100%;
  }

  .modal-overlay {
    padding: 14px;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
  }
}
