/* School — Student Management shared stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --primary:       #F97316;
  --primary-50:    #FFF7ED;
  --primary-100:   #FFEDD5;
  --primary-700:   #EA580C;
  --secondary:     #1E3A8A;
  --secondary-50:  #EFF6FF;
  --secondary-100: #DBEAFE;
  --success:       #10B981;
  --success-50:    #ECFDF5;
  --success-700:   #047857;
  --warning:       #F59E0B;
  --warning-50:    #FFFBEB;
  --warning-700:   #B45309;
  --danger:        #EF4444;
  --danger-50:     #FEF2F2;
  --danger-700:    #B91C1C;
  --purple:        #8B5CF6;
  --purple-50:     #F5F3FF;
  --purple-700:    #6D28D9;

  --bg:            #FFFFFF;
  --surface:       #F8FAFC;
  --surface-2:     #F1F5F9;
  --fg:            #0F172A;
  --fg-2:          #334155;
  --muted:         #64748B;
  --border:        #E2E8F0;
  --border-soft:   #F1F5F9;

  --sidebar-w:     240px;
  --header-h:      64px;
  --r-sm:          6px;
  --r:             12px;
  --r-lg:          16px;

  --sh-xs:         0 1px 2px rgba(0,0,0,.06);
  --sh-sm:         0 2px 6px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --sh:            0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --sh-md:         0 8px 28px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);

  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --mono:          'SF Mono','Cascadia Code',ui-monospace,Menlo,monospace;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0F172A;
    --surface:      #1E293B;
    --surface-2:    #273549;
    --fg:           #F1F5F9;
    --fg-2:         #CBD5E1;
    --muted:        #94A3B8;
    --border:       #334155;
    --border-soft:  #1E293B;
    --primary-50:   rgba(249,115,22,.14);
    --primary-100:  rgba(249,115,22,.22);
    --success-50:   rgba(16,185,129,.14);
    --warning-50:   rgba(245,158,11,.14);
    --danger-50:    rgba(239,68,68,.14);
    --purple-50:    rgba(139,92,246,.14);
  }
}

/* ─── Base ───────────────────────────────────────────────────── */
html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

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

/* ─── App shell ──────────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.brand-logo {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-text-main {
  font-size: 14px; font-weight: 700;
  color: var(--fg); letter-spacing: -.02em;
}

.brand-text-sub {
  font-size: 11px; color: var(--muted); font-weight: 500;
}

.nav-section { padding: 10px 10px 0; }

.nav-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: 8px 8px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: var(--r-sm);
  color: var(--fg-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .12s; margin-bottom: 1px;
}

.nav-item:hover { background: var(--surface); color: var(--fg); }

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary);
}

.nav-item.active .ni { color: var(--primary); }

.ni {
  width: 16px; height: 16px;
  flex-shrink: 0; color: var(--muted);
}

.nav-badge {
  margin-left: auto;
  background: var(--primary-50); color: var(--primary);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 9999px;
}

.nav-badge.new {
  background: var(--danger-50); color: var(--danger-700);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: 12px 10px;
}

/* ─── Main content ───────────────────────────────────────────── */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* ─── Header ─────────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px; flex-shrink: 0;
}

.header-crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
}
.header-crumb .crumb-active { color: var(--fg); font-weight: 600; }

.header-search {
  flex: 1; max-width: 380px; margin: 0 auto; position: relative;
}

.header-search input {
  width: 100%; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0 12px 0 36px;
  font-size: 13.5px; color: var(--fg); font-family: var(--font);
  outline: none; transition: all .15s;
}
.header-search input:focus {
  background: var(--bg); border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.header-search input::placeholder { color: var(--muted); }

.search-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}

.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); transition: all .12s;
  position: relative;
}
.icon-btn:hover { background: var(--surface); color: var(--fg); }

.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%;
  border: 1.5px solid var(--bg);
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}

/* ─── Page ───────────────────────────────────────────────────── */
.page {
  flex: 1; overflow-y: auto; padding: 24px;
}

.pg-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 24px; gap: 12px;
}

.pg-title { font-size: 22px; font-weight: 800; color: var(--fg); letter-spacing: -.03em; }
.pg-sub   { font-size: 13px; color: var(--muted); margin-top: 3px; }

.pg-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 36px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; font-family: var(--font);
  cursor: pointer; border: none; transition: all .12s;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); }
.btn-ghost   { background: var(--surface); color: var(--fg-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: transparent; color: var(--fg-2); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface); }
.btn-danger  { background: var(--danger-50); color: var(--danger-700); border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success-50); color: var(--success-700); border: 1px solid rgba(16,185,129,.2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 9999px;
  font-size: 12px; font-weight: 500;
}
.badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.badge-active    { background: var(--success-50); color: #065F46; }
.badge-active::before    { background: var(--success); }
.badge-inactive  { background: var(--surface-2); color: var(--muted); }
.badge-inactive::before  { background: var(--muted); }
.badge-graduated { background: var(--purple-50); color: var(--purple-700); }
.badge-graduated::before { background: var(--purple); }
.badge-pending   { background: var(--warning-50); color: var(--warning-700); }
.badge-pending::before   { background: var(--warning); }
.badge-danger    { background: var(--danger-50); color: var(--danger-700); }
.badge-danger::before    { background: var(--danger); }

/* ─── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-xs);
  position: relative; overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::before   { background: var(--primary); }
.stat-card.green::before  { background: var(--success); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.purple::before { background: var(--purple); }

.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon.blue   { background: var(--primary-50); color: var(--primary); }
.stat-icon.green  { background: var(--success-50); color: var(--success); }
.stat-icon.amber  { background: var(--warning-50); color: var(--warning); }
.stat-icon.purple { background: var(--purple-50);  color: var(--purple);  }

.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--fg); letter-spacing: -.04em; line-height: 1; }
.stat-delta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-delta.up   { color: var(--success-700); }
.stat-delta.down { color: var(--danger-700); }

/* ─── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 20px;
  margin-bottom: 16px;
}
.filter-bar-title {
  font-size: 13px; font-weight: 600; color: var(--fg);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr 1fr auto;
  gap: 10px; align-items: end;
}
.fg { display: flex; flex-direction: column; gap: 5px; }
.fg label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fg input, .fg select {
  height: 34px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0 10px; font-size: 13px; color: var(--fg);
  font-family: var(--font); outline: none; transition: all .12s;
}
.fg input:focus, .fg select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(249,115,22,.1);
  background: var(--bg);
}
.fg select { padding-right: 28px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ─── Table ──────────────────────────────────────────────────── */
.table-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-xs);
}

.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}

.tbl-count { font-size: 13px; color: var(--muted); }
.tbl-count strong { color: var(--fg); font-weight: 600; }

.tbl-actions { display: flex; align-items: center; gap: 8px; }

.bulk-bar {
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--primary-50);
  border-bottom: 1px solid var(--primary-100);
  font-size: 13px; color: var(--primary);
}
.bulk-bar.show { display: flex; }
.bulk-bar strong { font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface); }
thead th {
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
thead th:first-child { padding-left: 16px; width: 40px; }
tbody tr {
  border-bottom: 1px solid var(--border-soft); transition: background .1s;
}
tbody tr:hover { background: var(--surface); }
tbody tr:last-child { border-bottom: none; }
tbody td {
  padding: 11px 14px; font-size: 13.5px;
  color: var(--fg-2); vertical-align: middle;
}
tbody td:first-child { padding-left: 16px; }

.stu-cell { display: flex; align-items: center; gap: 10px; }
.stu-av {
  width: 33px; height: 33px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.stu-name { font-weight: 600; color: var(--fg); font-size: 13.5px; }
.stu-id   { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.mono     { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.act-cell { display: flex; align-items: center; gap: 4px; }

input[type="checkbox"] {
  width: 15px; height: 15px;
  border-radius: 4px; cursor: pointer; accent-color: var(--primary);
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--muted);
}
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pg-btn {
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border);
  font-size: 13px; color: var(--fg-2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .12s; font-family: var(--font);
}
.pg-btn:hover   { background: var(--surface); }
.pg-btn.cur     { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; box-shadow: var(--sh-xs);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--fg); }

/* ─── Info rows ──────────────────────────────────────────────── */
.info-rows { display: flex; flex-direction: column; gap: 10px; }
.info-row  { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.info-row:last-child { border-bottom: none; }
.info-key  { width: 140px; flex-shrink: 0; font-size: 12.5px; color: var(--muted); font-weight: 500; padding-top: 1px; }
.info-val  { font-size: 13.5px; color: var(--fg); font-weight: 500; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-section { margin-bottom: 28px; }
.form-section-title {
  font-size: 13px; font-weight: 700; color: var(--fg);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  letter-spacing: -.01em;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.fg-full { grid-column: 1 / -1; }

.form-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--fg-2); margin-bottom: 5px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 0 12px; height: 38px;
  font-size: 13.5px; color: var(--fg); font-family: var(--font);
  outline: none; transition: all .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.form-textarea { height: auto; padding: 10px 12px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ─── Wizard ─────────────────────────────────────────────────── */
.wizard-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px; background: var(--bg); flex-shrink: 0;
}
.wizard-steps {
  display: flex; align-items: flex-start; gap: 0;
  overflow-x: auto; padding-bottom: 2px;
}
.wz-step {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  align-items: center; position: relative;
}
.wz-step::after {
  content: ''; position: absolute;
  top: 15px; left: calc(50% + 16px); right: calc(-50% + 16px);
  height: 2px; background: var(--border); z-index: 0;
}
.wz-step:last-child::after { display: none; }
.wz-step.done::after { background: var(--primary); }

.wz-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; position: relative; z-index: 1;
  border: 2px solid var(--border); background: var(--bg); color: var(--muted);
  transition: all .2s;
}
.wz-step.active .wz-dot {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 4px var(--primary-50);
}
.wz-step.done .wz-dot {
  background: var(--success); border-color: var(--success); color: #fff;
}
.wz-label {
  margin-top: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); text-align: center; white-space: nowrap;
}
.wz-step.active .wz-label { color: var(--primary); }
.wz-step.done   .wz-label { color: var(--fg-2); }

.wizard-body { flex: 1; overflow-y: auto; padding: 28px; }

.wizard-footer {
  border-top: 1px solid var(--border);
  padding: 16px 28px; background: var(--bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
}

/* ─── Dropzone ───────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--r);
  padding: 40px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--surface);
}
.dropzone:hover { border-color: var(--primary); background: var(--primary-50); }
.dz-icon { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--muted); }
.dz-title { font-size: 15px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.dz-sub   { font-size: 13px; color: var(--muted); }

/* ─── Profile ────────────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 20px; align-items: start;
}

.profile-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-xs); position: sticky; top: 0;
}

.profile-cover {
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.profile-av-wrap { padding: 0 20px; margin-top: -32px; }
.profile-av {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  background: var(--primary); box-shadow: var(--sh-sm);
}

.profile-info { padding: 10px 20px 16px; }
.profile-name { font-size: 17px; font-weight: 800; color: var(--fg); letter-spacing: -.03em; }
.profile-sub  { font-size: 12.5px; color: var(--muted); font-family: var(--mono); margin-bottom: 6px; }

.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

.profile-divider { height: 1px; background: var(--border-soft); margin: 12px 20px; }

.profile-meta { padding: 0 20px 16px; }
.pm-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; padding: 6px 0;
  font-size: 13px; border-bottom: 1px solid var(--border-soft);
}
.pm-row:last-child { border-bottom: none; }
.pm-key { color: var(--muted); font-weight: 500; }
.pm-val { color: var(--fg); font-weight: 600; text-align: right; }

.profile-actions { padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 8px; }

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex; border-bottom: 1px solid var(--border);
  gap: 0; margin-bottom: 20px; overflow-x: auto;
}
.tab {
  padding: 10px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .12s; user-select: none;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Charts (SVG) ───────────────────────────────────────────── */
.chart-wrap {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
}
.chart-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-title { font-size: 14px; font-weight: 700; color: var(--fg); }
.chart-legend { display: flex; gap: 12px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ─── Timeline ───────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 4px; bottom: 0;
  width: 2px; background: var(--border-soft);
}
.tl-item { position: relative; padding-bottom: 24px; }
.tl-dot {
  position: absolute; left: -28px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg); z-index: 1;
}
.tl-title { font-size: 13.5px; font-weight: 700; color: var(--fg); margin-bottom: 2px; }
.tl-desc  { font-size: 13px; color: var(--muted); }
.tl-time  { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ─── Summary row ────────────────────────────────────────────── */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.summary-card {
  background: var(--surface); border-radius: var(--r-sm);
  padding: 14px 16px; text-align: center;
}
.summary-card .s-val { font-size: 28px; font-weight: 800; color: var(--fg); letter-spacing: -.04em; }
.summary-card .s-lbl { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ─── File list ──────────────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface);
}
.doc-ico { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-name { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.doc-meta { font-size: 12px; color: var(--muted); }
.doc-acts { margin-left: auto; display: flex; gap: 6px; }

/* ─── Fee table ──────────────────────────────────────────────── */
.fee-summary {
  background: linear-gradient(135deg, var(--primary) 0%, #1E3A8A 100%);
  border-radius: var(--r); padding: 20px; color: #fff; margin-bottom: 16px;
}
.fee-summary .fs-label { font-size: 12px; font-weight: 500; opacity: .8; margin-bottom: 4px; }
.fee-summary .fs-amount { font-size: 32px; font-weight: 800; letter-spacing: -.04em; }
.fee-meta { display: flex; gap: 20px; margin-top: 12px; }
.fee-meta-item { font-size: 12px; opacity: .8; }
.fee-meta-item strong { display: block; font-size: 15px; font-weight: 700; opacity: 1; }

/* ─── Skeleton (loading) ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
}
@media (max-width: 1024px) {
  .filter-row { grid-template-columns: 1fr 1fr auto; }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -100%; z-index: 100; transition: left .25s; }
  .sidebar.open { left: 0; box-shadow: var(--sh-md); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
