/* =====================================================================
   Hearing Aid Service Platform — Design System
   Premium minimal: hairlines, quiet surfaces, one accent, tabular numbers.
   ===================================================================== */

:root {
  /* Neutrals */
  --bg:            #F5F6F8;
  --surface:       #FFFFFF;
  --surface-2:     #FAFBFC;
  --surface-3:     #F1F3F6;
  --line:          #E6E9EF;
  --line-strong:   #D6DBE4;

  /* Ink */
  --ink:           #0E1726;
  --ink-2:         #475569;
  --ink-3:         #7A8699;

  /* Accent — teal clinical */
  --brand:         #0E7C74;
  --brand-600:     #0B6963;
  --brand-700:     #095551;
  --brand-soft:    #E6F4F2;
  --brand-ring:    rgba(14, 124, 116, .18);

  /* Semantic */
  --ok:            #15803D;
  --ok-soft:       #E7F5EC;
  --warn:          #B45309;
  --warn-soft:     #FDF3E3;
  --danger:        #B42318;
  --danger-soft:   #FDECEA;
  --info:          #1D4ED8;
  --info-soft:     #E8EEFD;

  /* Elevation */
  --shadow-xs:     0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm:     0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md:     0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg:     0 24px 48px -12px rgba(16, 24, 40, .18);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sidebar-w: 262px;
  --topbar-h:  62px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg:            #0B0F16;
  --surface:       #121821;
  --surface-2:     #161D28;
  --surface-3:     #1C2430;
  --line:          #232C3A;
  --line-strong:   #2E394A;

  --ink:           #E8EDF4;
  --ink-2:         #A3AFC0;
  --ink-3:         #7A8699;

  --brand:         #2DD4BF;
  --brand-600:     #14B8A6;
  --brand-700:     #0D9488;
  --brand-soft:    #10241F;
  --brand-ring:    rgba(45, 212, 191, .22);

  --ok:            #4ADE80;
  --ok-soft:       #10241A;
  --warn:          #FBBF24;
  --warn-soft:     #241C0D;
  --danger:        #F87171;
  --danger-soft:   #2A1514;
  --info:          #93B4FF;
  --info-soft:     #111A2E;

  --shadow-xs:     0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md:     0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg:     0 24px 48px -12px rgba(0, 0, 0, .6);
}

/* --------------------------------------------------------------- base */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.014em;
  margin: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

hr { border-color: var(--line); opacity: 1; }

.num, td.num, .table td.num, .table th.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.text-muted, .muted { color: var(--ink-3) !important; }
.text-dim { color: var(--ink-2); }

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------ layout */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.brand-text span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 10px 20px;
  scrollbar-width: thin;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.nav-section {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 16px 10px 6px;
}
.nav-section:first-child { padding-top: 4px; }

.nav-link-x {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: background .13s, color .13s;
}
.nav-link-x i { font-size: 16px; width: 18px; text-align: center; color: var(--ink-3); transition: color .13s; }
.nav-link-x:hover { background: var(--surface-3); color: var(--ink); }
.nav-link-x:hover i { color: var(--ink-2); }
.nav-link-x.active { background: var(--brand-soft); color: var(--brand-700); font-weight: 600; }
.nav-link-x.active i { color: var(--brand); }
.nav-link-x.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
[data-theme="dark"] .nav-link-x.active { color: var(--brand); }

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.nav-link-x.active .nav-badge { background: var(--brand); color: #fff; }
.nav-badge.hot { background: var(--danger-soft); color: var(--danger); }

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 10px;
  flex: 0 0 auto;
}

/* main */

.main {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.page-title { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.page-sub { font-size: 12px; color: var(--ink-3); }

.content { padding: 22px; flex: 1 1 auto; }
@media (min-width: 1600px) { .content { padding: 26px 34px; } }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-grid;
  place-items: center;
  transition: all .13s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-strong); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-700);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -.02em;
  flex: 0 0 auto;
}
[data-theme="dark"] .avatar { color: var(--brand); }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }

/* ------------------------------------------------------------- cards */

.card-x {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.card-x-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-x-head h2, .card-x-head h3 { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.card-x-body { padding: 18px; }
.card-x-body.tight { padding: 0; }
.card-x-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* KPI tiles */

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .16s, transform .16s;
}
.kpi:hover { box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.kpi-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 15px;
  background: var(--surface-3);
  color: var(--ink-2);
  flex: 0 0 auto;
}
.kpi-icon.brand  { background: var(--brand-soft);  color: var(--brand); }
.kpi-icon.ok     { background: var(--ok-soft);     color: var(--ok); }
.kpi-icon.warn   { background: var(--warn-soft);   color: var(--warn); }
.kpi-icon.danger { background: var(--danger-soft); color: var(--danger); }
.kpi-icon.info   { background: var(--info-soft);   color: var(--info); }
.kpi-value {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-foot { font-size: 12px; color: var(--ink-3); margin-top: auto; }
.kpi-delta { font-weight: 600; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }

/* ------------------------------------------------------------ badges */

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.st-slate  { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.st-green  { background: var(--ok-soft);   color: var(--ok); }
.st-teal   { background: var(--brand-soft);color: var(--brand-700); }
.st-blue   { background: var(--info-soft); color: var(--info); }
.st-indigo { background: #EEEAFB; color: #5B34C9; }
.st-amber  { background: var(--warn-soft); color: var(--warn); }
.st-orange { background: #FEF0E6; color: #C2410C; }
.st-red    { background: var(--danger-soft);color: var(--danger); }
[data-theme="dark"] .st-teal   { color: var(--brand); }
[data-theme="dark"] .st-indigo { background: #1B1630; color: #C4B5FD; }
[data-theme="dark"] .st-orange { background: #2A1A10; color: #FDBA74; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

.pill-priority {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 650;
  padding: 1px 8px; border-radius: 6px;
  background: var(--warn-soft); color: var(--warn);
}

/* ------------------------------------------------------------ tables */

.table-x { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.table-x thead th {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  white-space: nowrap;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-x tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .1s; }
.table-x tbody tr:hover { background: var(--surface-2); }
.table-x .t-strong { font-weight: 600; letter-spacing: -.01em; }
.table-x .t-sub { font-size: 11.5px; color: var(--ink-3); }
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.table-wrap.scroll-y { max-height: 420px; overflow-y: auto; }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions .btn { padding: 3px 8px; font-size: 12px; }

.empty-state { padding: 46px 20px; text-align: center; color: var(--ink-3); }
.empty-state i { font-size: 34px; opacity: .35; display: block; margin-bottom: 10px; }
.empty-state p { margin: 0 0 4px; font-weight: 600; color: var(--ink-2); }
.empty-state small { font-size: 12.5px; }

/* ------------------------------------------------------------- forms */

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
  letter-spacing: -.005em;
}
.form-label .req { color: var(--danger); }

.form-control, .form-select {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .13s, box-shadow .13s;
  box-shadow: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
  background: var(--surface);
  color: var(--ink);
}
.form-control::placeholder { color: var(--ink-3); opacity: .8; }
.form-control:disabled, .form-control[readonly], .form-select:disabled {
  background: var(--surface-3);
  color: var(--ink-2);
}
textarea.form-control { min-height: 80px; resize: vertical; }
.form-text { font-size: 11.5px; color: var(--ink-3); }
.form-check-input { border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-ring); border-color: var(--brand); }
.form-check-label { font-size: 13.5px; color: var(--ink-2); }
.input-group-text {
  background: var(--surface-3);
  border-color: var(--line-strong);
  color: var(--ink-3);
  font-size: 12.5px;
}

.field-grid { display: grid; gap: 14px; }
.fieldset-title {
  font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* ------------------------------------------------------------ buttons */

.btn {
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 550;
  padding: 7.5px 14px;
  letter-spacing: -.005em;
  transition: all .13s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}
.btn:focus-visible { box-shadow: 0 0 0 3px var(--brand-ring); }
.btn i { font-size: 14px; }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-xs); }
.btn-brand:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
[data-theme="dark"] .btn-brand { color: #06201E; font-weight: 600; }
[data-theme="dark"] .btn-brand:hover { color: #06201E; }

.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-strong); }

.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-3); color: var(--ink); }

.btn-danger-soft { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 4.5px 10px; font-size: 12.5px; }
.btn-lg { padding: 10px 18px; font-size: 14.5px; }

.btn-group-x { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------- filter bar */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.toolbar .spacer { flex: 1 1 auto; }

.search-box { position: relative; min-width: 220px; }
.search-box i {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 14px; pointer-events: none;
}
.search-box .form-control { padding-left: 33px; }

.seg {
  display: inline-flex;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.seg a {
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}
.seg a:hover { color: var(--ink); }
.seg a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

/* --------------------------------------------------------- timeline */

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.tl-item.done::before { border-color: var(--brand); background: var(--brand); }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-meta { font-size: 11.5px; color: var(--ink-3); }
.tl-note { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

/* stepper */

.stepper { display: flex; flex-wrap: wrap; gap: 6px; }
.step {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  background: var(--surface-3); color: var(--ink-3);
  border: 1px solid var(--line);
}
.step.done { background: var(--brand-soft); color: var(--brand-700); border-color: transparent; }
.step.current { background: var(--brand); color: #fff; border-color: transparent; box-shadow: var(--shadow-xs); }
[data-theme="dark"] .step.done { color: var(--brand); }
[data-theme="dark"] .step.current { color: #06201E; }

/* -------------------------------------------------------------- misc */

.alert { border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; padding: 11px 14px; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.alert-danger  { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert-warning { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.alert-info    { background: var(--info-soft); color: var(--info); border-color: transparent; }

.modal-content {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--line); padding: 15px 20px; }
.modal-title { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--line); padding: 13px 20px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-backdrop.show { opacity: .35; }

.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  background: var(--surface);
  padding: 5px;
  font-size: 13.5px;
}
.dropdown-item { border-radius: 6px; padding: 7px 11px; color: var(--ink-2); display: flex; align-items: center; gap: 9px; }
.dropdown-item:hover { background: var(--surface-3); color: var(--ink); }
.dropdown-item.text-danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown-header { font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 8px 11px 4px; }
.dropdown-divider { border-color: var(--line); margin: 5px 0; }

.pagination .page-link {
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  padding: 5px 10px;
  background: var(--surface);
}
.pagination .page-link:hover { background: var(--surface-3); color: var(--ink); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-item.disabled .page-link { color: var(--ink-3); background: var(--surface-2); }

.progress-thin { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress-thin > span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.progress-thin > span.warn { background: var(--warn); }
.progress-thin > span.danger { background: var(--danger); }

.divider-label {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  margin: 22px 0 12px;
}
.divider-label::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

.stat-line { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stat-line:last-child { border-bottom: 0; }
.stat-line dt { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.stat-line dd { margin: 0; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.def-list dt { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.def-list dd { font-size: 13.5px; margin-bottom: 13px; color: var(--ink); }

/* ------------------------------------------------------------- login */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 1.05fr .95fr; } }

.auth-side {
  display: none;
  background: linear-gradient(155deg, #0B5C57 0%, #0E7C74 45%, #14958A 100%);
  color: #fff;
  padding: 54px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 992px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side::after {
  content: "";
  position: absolute; right: -180px; bottom: -180px;
  width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.auth-side::before {
  content: "";
  position: absolute; right: -60px; top: -120px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.auth-side h1 { color: #fff; font-size: 30px; letter-spacing: -.03em; line-height: 1.25; }
.auth-side p { color: rgba(255, 255, 255, .82); font-size: 14.5px; max-width: 42ch; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; position: relative; z-index: 1; }
.auth-feature i { font-size: 17px; opacity: .9; margin-top: 1px; }
.auth-feature strong { display: block; font-size: 13.5px; font-weight: 600; }
.auth-feature span { font-size: 12.5px; color: rgba(255, 255, 255, .72); }

.auth-form { display: grid; place-items: center; padding: 34px 22px; }
.auth-card { width: 100%; max-width: 396px; }

/* ------------------------------------------------------------- print */

.print-only { display: none; }

@media print {
  .sidebar, .topbar, .no-print, .toolbar, .modal, .modal-backdrop { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; font-size: 12px; }
  .card-x { border: 0; box-shadow: none; }
  .print-only { display: block; }
  a { color: #000 !important; }
  @page { margin: 14mm; }
}

/* -------------------------------------------------------- responsive */

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(9, 14, 22, .42);
  z-index: 1035;
  backdrop-filter: blur(2px);
}

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
}

@media (max-width: 575.98px) {
  .kpi-value { font-size: 21px; }
  .toolbar > * { flex: 1 1 100%; }
  .toolbar .search-box { min-width: 0; }
  .toolbar .spacer { display: none; }
}

/* utility */
.gap-tight { gap: 6px; }
.w-fit { width: fit-content; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.cursor-pointer { cursor: pointer; }
.link-quiet { color: var(--ink); }
.link-quiet:hover { color: var(--brand); }

/* -------------------------------------------------- kërkimi global */

.global-search { position: relative; width: 300px; }
@media (max-width: 1200px) { .global-search { width: 210px; } }

.gs-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 380px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  padding: 5px;
  z-index: 1080;
}
.gs-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink);
}
.gs-item:hover, .gs-item.active { background: var(--surface-3); color: var(--ink); }
.gs-item i { font-size: 15px; color: var(--ink-3); width: 18px; text-align: center; flex: 0 0 auto; }
.gs-item .gs-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.gs-item .gs-sub { font-size: 11.5px; color: var(--ink-3); }
.gs-item .gs-type {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 0 0 auto;
}
.gs-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.gs-group { font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
            color: var(--ink-3); padding: 8px 10px 4px; }

/* ------------------------------------------------------------ workflow */

.wf { overflow: hidden; }

.wf-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.wf-state { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 320px; min-width: 0; }

.wf-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-top: 2px;
}

.wf-copy { min-width: 0; }
.wf-hint { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

.wf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.wf-actions form { margin: 0; }

.wf-steps {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  overflow-x: auto;
}
.wf-steps .stepper { flex-wrap: nowrap; min-width: min-content; }

.wf-notes { border-top: 1px solid var(--line); padding: 10px 18px; background: var(--surface-2); }
.wf-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  padding: 3px 0;
  line-height: 1.5;
}
.wf-note i { margin-top: 2px; flex: 0 0 auto; }
.wf-note.blocker { color: var(--danger); }
.wf-note.warn { color: var(--warn); }

.wf .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hapi i radhës brenda listave */
.next-step { display: inline-flex; align-items: center; gap: 5px; }
.next-step .btn { padding: 2px 9px; font-size: 11.5px; font-weight: 600; }

/* kutia e hapave të radhës në dashboard */
.inbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: var(--surface-2); color: var(--ink); }
.inbox-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 14px;
  flex: 0 0 auto;
}
.inbox-body { min-width: 0; flex: 1 1 auto; }
.inbox-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.inbox-sub { font-size: 11.5px; color: var(--ink-3); }
.inbox-cta { font-size: 11.5px; font-weight: 650; color: var(--brand); white-space: nowrap; flex: 0 0 auto; }

@media (max-width: 575.98px) {
  .wf-main { padding: 14px; }
  .wf-actions { margin-left: 0; width: 100%; }
  .wf-actions .btn { flex: 1 1 auto; justify-content: center; }
}
