/* =====================================================================
   Vikura POS — design system
   All colours come from the tokens below. Pages never hard-code colours.
   ===================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f7f9f9;
  --surface-3: #edf2f1;
  --border: #dfe6e4;
  --border-strong: #c7d2cf;
  --text: #152320;
  --text-2: #4a5b57;
  --text-3: #7a8a86;

  --primary: #0b7a75;
  --primary-hover: #09625e;
  --primary-soft: #e2f2ef;
  --primary-text: #07605b;
  --on-primary: #ffffff;
  --focus: rgba(11, 122, 117, .28);

  --success: #1e8a5a;  --success-soft: #e0f3e9;
  --warning: #b26b00;  --warning-soft: #fbf0d9;
  --danger:  #c0364a;  --danger-soft:  #fbe6e9;
  --info:    #2c6db0;  --info-soft:    #e2edf9;
  --violet:  #6a4fc2;  --violet-soft:  #eee9fb;

  --sidebar-bg: #0c2a28;
  --sidebar-text: #a9c2be;
  --sidebar-text-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active: rgba(94, 214, 202, .14);
  --sidebar-accent: #5ed6ca;
  --sidebar-border: rgba(255, 255, 255, .07);

  --shadow-sm: 0 1px 2px rgba(15, 42, 38, .06);
  --shadow-md: 0 1px 2px rgba(15, 42, 38, .05), 0 6px 18px -8px rgba(15, 42, 38, .14);
  --shadow-lg: 0 24px 60px -16px rgba(10, 30, 28, .35), 0 2px 6px rgba(10, 30, 28, .08);
  --overlay: rgba(9, 22, 20, .45);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 60px;
  --chart-grid: rgba(21, 35, 32, .07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1211;
    --surface: #111b1a;
    --surface-2: #15201f;
    --surface-3: #1b2826;
    --border: #22302e;
    --border-strong: #31423f;
    --text: #e3eeec;
    --text-2: #a8b9b5;
    --text-3: #7c8e8a;
    --primary: #2bb3a8;
    --primary-hover: #42c5ba;
    --primary-soft: rgba(43, 179, 168, .14);
    --primary-text: #67d6cc;
    --on-primary: #04201e;
    --focus: rgba(43, 179, 168, .35);
    --success: #3dbb83;  --success-soft: rgba(61, 187, 131, .14);
    --warning: #e0a63a;  --warning-soft: rgba(224, 166, 58, .14);
    --danger:  #f06b7e;  --danger-soft:  rgba(240, 107, 126, .14);
    --info:    #6aa6e8;  --info-soft:    rgba(106, 166, 232, .14);
    --violet:  #a993f0;  --violet-soft:  rgba(169, 147, 240, .14);
    --sidebar-bg: #071010;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
    --overlay: rgba(0, 0, 0, .6);
    --chart-grid: rgba(227, 238, 236, .07);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1211;
  --surface: #111b1a;
  --surface-2: #15201f;
  --surface-3: #1b2826;
  --border: #22302e;
  --border-strong: #31423f;
  --text: #e3eeec;
  --text-2: #a8b9b5;
  --text-3: #7c8e8a;
  --primary: #2bb3a8;
  --primary-hover: #42c5ba;
  --primary-soft: rgba(43, 179, 168, .14);
  --primary-text: #67d6cc;
  --on-primary: #04201e;
  --focus: rgba(43, 179, 168, .35);
  --success: #3dbb83;  --success-soft: rgba(61, 187, 131, .14);
  --warning: #e0a63a;  --warning-soft: rgba(224, 166, 58, .14);
  --danger:  #f06b7e;  --danger-soft:  rgba(240, 107, 126, .14);
  --info:    #6aa6e8;  --info-soft:    rgba(106, 166, 232, .14);
  --violet:  #a993f0;  --violet-soft:  rgba(169, 147, 240, .14);
  --sidebar-bg: #071010;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
  --overlay: rgba(0, 0, 0, .6);
  --chart-grid: rgba(227, 238, 236, .07);
}

/* ------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
.theme-ready body, .theme-ready .sidebar, .theme-ready .card, .theme-ready .topbar {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
h4 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 .75em; }
small, .small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
img { max-width: 100%; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  background: var(--surface); color: var(--text-2); font-size: 11px; line-height: 1.5;
}
::selection { background: var(--primary-soft); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num, .money, td.num, th.num { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary-text); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 30px; height: 30px; stroke-width: 1.6; }

/* ------------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  transition: width .2s ease, transform .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h); padding: 0 18px;
  border-bottom: 1px solid var(--sidebar-border);
  color: var(--sidebar-text-strong); font-weight: 750; font-size: 16px; letter-spacing: -.01em;
  overflow: hidden; white-space: nowrap;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--sidebar-accent); color: #062421;
  font-weight: 800; font-size: 15px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.brand-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--sidebar-text); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-section { margin-top: 14px; }
.nav-section:first-child { margin-top: 0; }
.nav-heading { padding: 6px 12px; font-size: 11.5px; font-weight: 600; color: rgba(169, 194, 190, .6); white-space: nowrap; overflow: hidden; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 1px 0;
  border-radius: 9px;
  color: var(--sidebar-text); font-weight: 550; font-size: 13.5px;
  white-space: nowrap; overflow: hidden;
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); text-decoration: none; }
.nav-link.active { background: var(--sidebar-active); color: var(--sidebar-text-strong); }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sidebar-accent); }
.nav-link .icon { width: 19px; height: 19px; }
.nav-link .nav-badge { margin-left: auto; }
.nav-badge { min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; }
.sidebar-foot { padding: 12px 10px; border-top: 1px solid var(--sidebar-border); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; transition: margin-left .2s ease; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--surface); } }
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.breadcrumbs a { color: var(--text-3); }
.breadcrumbs .sep { opacity: .6; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.content { padding: 24px; flex: 1; width: 100%; max-width: 1480px; }
.content-wide { max-width: none; }

.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
.sidebar-collapsed .nav-link span, .sidebar-collapsed .nav-heading, .sidebar-collapsed .brand-text, .sidebar-collapsed .nav-link .nav-badge { display: none; }
.sidebar-collapsed .nav-heading { height: 1px; padding: 0; margin: 10px 8px; background: var(--sidebar-border); }
.sidebar-collapsed .nav-link { justify-content: center; padding: 10px; }

.mobile-only { display: none !important; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { font-size: 20px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 16px; }
.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)); }
.grid-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.gap-sm { gap: 6px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.w-100 { width: 100%; }

/* ------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 16px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card-flush .card-body { padding: 0; }

/* KPI tiles: a quiet number with its change; colour only for the delta. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.kpi-label .icon { color: var(--text-3); width: 16px; height: 16px; }
.kpi-value { margin-top: 10px; font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-foot { margin-top: 6px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 20px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.delta.flat { color: var(--text-3); background: var(--surface-3); }

/* ------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 650; font-size: 13.5px; line-height: 1;
  cursor: pointer; white-space: nowrap; user-select: none;
  text-decoration: none !important;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn-danger:hover { background: var(--danger); filter: brightness(1.07); }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; --btn-bd: var(--success); }
.btn-success:hover { background: var(--success); filter: brightness(1.07); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-text); --btn-bd: transparent; }
.btn-soft:hover { background: var(--primary-soft); filter: brightness(.97); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn-xl { height: 58px; padding: 0 24px; font-size: 17px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.btn-group .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* segmented control (period filters, tabs) */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented a, .segmented button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 13px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.segmented a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button {
  border: 0; background: none; font: inherit; cursor: pointer;
  padding: 10px 14px; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--primary-text); border-bottom-color: var(--primary); }

/* ------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.field .req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 12px; color: var(--text-3); }
.field-error { font-size: 12px; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a8a86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select[multiple] { height: auto; min-height: 120px; padding: 6px; background-image: none; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); }
.input-sm, .select-sm { height: 34px; font-size: 13px; }
.input-lg { height: 48px; font-size: 16px; }
input[type="color"].input { padding: 4px; width: 56px; }
input[type="file"].input { padding: 7px 10px; height: auto; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0; flex: 1; min-width: 0; }
.input-group > :first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group > :last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.input-group > * + * { margin-left: -1px; }
.input-addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-3); font-weight: 600; font-size: 13px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 38px; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; color: var(--text); user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s ease; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { box-shadow: 0 0 0 3px var(--focus); outline: none; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }

fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; margin: 0; }
legend { padding: 0 6px; font-weight: 700; font-size: 13.5px; }

/* ------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 650; font-size: 12.5px; color: var(--text-3);
  padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; }
.table-compact td { padding: 8px 12px; }
.table-compact th { padding: 8px 12px; }
.card > .table-wrap .table th:first-child { border-top-left-radius: 0; }
.cell-title { font-weight: 650; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); }
.thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--surface-3); display: inline-grid; place-items: center; color: var(--text-3); flex: none; font-weight: 700; font-size: 13px; }
.with-thumb { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* ------------------------------------------------------------- badges & status */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 20px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-info    { background: var(--info-soft);    color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-violet  { background: var(--violet-soft);  color: var(--violet); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid transparent; font-size: 13.5px; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert p { color: var(--text); margin: 2px 0 0; }

/* ------------------------------------------------------------- empty, skeleton, progress */
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto 16px; color: var(--text-3); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.3s infinite; }
:root[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--primary); animation: spin .7s linear infinite; display: inline-block; }
.loading-center { display: grid; place-items: center; padding: 40px; }

/* ------------------------------------------------------------- dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.dropdown.open .dropdown-menu { display: block; animation: pop .12s ease-out; }
.dropdown-menu.left { left: 0; right: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 8px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 550; text-align: left; cursor: pointer;
}
.dropdown-item:hover { background: var(--surface-3); text-decoration: none; }
.dropdown-item .icon { color: var(--text-3); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger .icon { color: var(--danger); }
.dropdown-item.active { color: var(--primary-text); background: var(--primary-soft); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown-header { padding: 8px 10px 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 30px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text); font: inherit; }
.user-chip:hover { background: var(--surface-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 12.5px; background: var(--primary-soft); color: var(--primary-text); flex: none; }
.user-chip .meta { text-align: left; line-height: 1.2; }
.user-chip .meta b { display: block; font-size: 13px; }
.user-chip .meta small { color: var(--text-3); font-size: 11.5px; }
.branch-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.branch-pill:hover { background: var(--surface-3); }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: inline; }

.notif-list { max-height: 360px; overflow-y: auto; width: 320px; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; color: var(--text); }
.notif-item:hover { background: var(--surface-3); text-decoration: none; }
.notif-item .ni-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.notif-item b { display: block; font-size: 13px; }
.notif-item small { color: var(--text-3); }

/* ------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .15s ease;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
}
.modal-backdrop.show .modal { transform: none; }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 1040px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.confirm-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-icon.primary { background: var(--primary-soft); color: var(--primary-text); }
body.modal-open { overflow: hidden; }

/* ------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease-out;
}
.toast.hide { animation: toast-out .2s ease-in forwards; }
.toast .t-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast .t-icon .icon { width: 16px; height: 16px; }
.toast.success .t-icon { background: var(--success-soft); color: var(--success); }
.toast.error .t-icon { background: var(--danger-soft); color: var(--danger); }
.toast.warning .t-icon { background: var(--warning-soft); color: var(--warning); }
.toast.info .t-icon { background: var(--info-soft); color: var(--info); }
.toast .t-body { flex: 1; font-size: 13.5px; font-weight: 550; padding-top: 4px; }
.toast .t-close { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.toast .t-close:hover { background: var(--surface-3); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ------------------------------------------------------------- pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--text-3); }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 600;
  color: var(--text-2); border: 1px solid var(--border);
}
.pager-links a:hover { background: var(--surface-3); text-decoration: none; }
.pager-links .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pager-links .disabled { opacity: .4; }

/* ------------------------------------------------------------- misc components */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--text-3); font-weight: 600; }
.dl dd { margin: 0; font-weight: 600; }
.totals { margin-left: auto; width: min(360px, 100%); }
.totals .t-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.totals .t-row.grand { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 17px; font-weight: 750; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--surface-3); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.legend-list { display: flex; flex-direction: column; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-row .grow { flex: 1; }
.rank { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.perm-group { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.perm-group h4 { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.perm-group .check { display: flex; padding: 5px 0; font-size: 13px; }
.sensitive-tag { font-size: 11px; color: var(--warning); font-weight: 700; margin-left: 4px; }
.stat-inline { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-inline div b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat-inline div small { color: var(--text-3); }
.kbd-hint { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; color: var(--text-3); }

/* ------------------------------------------------------------- auth & installer */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-aside {
  position: relative; overflow: hidden;
  background: var(--sidebar-bg); color: #d6e6e3;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside h2 { color: #fff; font-size: 30px; font-weight: 750; letter-spacing: -.02em; max-width: 440px; line-height: 1.2; }
.auth-aside p { color: #a9c2be; max-width: 420px; font-size: 15px; margin-top: 14px; }
.auth-receipt {
  width: 290px; margin: 40px 0; padding: 22px 22px 26px; background: #fbfdfc; color: #1a2b28; border-radius: 6px;
  font-size: 12.5px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transform: rotate(-3deg);
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 97%, #000 100%) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle 6px at 50% 100%, transparent 97%, #000 100%) 0 0 / 16px 100% repeat-x;
}
.auth-receipt .r-line { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.auth-receipt .r-total { border-top: 1px dashed #9db3af; margin-top: 8px; padding-top: 8px; font-weight: 800; font-size: 15px; }
.auth-receipt .r-head { text-align: center; font-weight: 800; margin-bottom: 10px; font-size: 14px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .lead { color: var(--text-2); margin-bottom: 26px; }
.auth-card form .field + .field { margin-top: 16px; }
.auth-foot { margin-top: 26px; color: var(--text-3); font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; }

.install-shell { max-width: 880px; margin: 0 auto; padding: 32px 20px 60px; }
.install-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.install-brand .brand-mark { background: var(--primary); color: var(--on-primary); }
.steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.steps .step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 30px; font-size: 12.5px; font-weight: 650; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); }
.steps .step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; }
.steps .step.done { color: var(--success); }
.steps .step.done b { background: var(--success-soft); }
.steps .step.current { color: var(--primary-text); border-color: var(--primary); }
.steps .step.current b { background: var(--primary); color: var(--on-primary); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.check-list li:last-child { border-bottom: 0; }
.check-list .ok { color: var(--success); }
.check-list .bad { color: var(--danger); }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-card { position: relative; display: block; cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; }
.mode-card .mc { display: block; border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 16px; height: 100%; background: var(--surface); transition: border-color .15s ease; }
.mode-card .mc .icon { display: block; color: var(--primary-text); margin-bottom: 10px; }
.mode-card .mc b { display: block; margin-bottom: 4px; }
.mode-card .mc small { color: var(--text-3); }
.mode-card input:checked + .mc { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.mode-card input:focus-visible + .mc { box-shadow: 0 0 0 3px var(--focus); }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { text-align: center; max-width: 440px; }
.error-code { font-size: 64px; font-weight: 800; letter-spacing: -.04em; color: var(--primary); line-height: 1; margin-bottom: 12px; }
.error-card p { color: var(--text-2); margin: 10px 0 22px; }

/* ------------------------------------------------------------- mobile bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: none; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; border-radius: 10px; border: 0; background: none; font: inherit;
  color: var(--text-3); font-size: 11px; font-weight: 650; cursor: pointer;
}
.bottom-nav a.active { color: var(--primary-text); }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav .icon { width: 21px; height: 21px; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 39; background: var(--overlay); display: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .grid-main-side { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: 280px; box-shadow: var(--shadow-lg); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .sidebar-overlay { display: block; }
  .main, .sidebar-collapsed .main { margin-left: 0; }
  .sidebar-collapsed .sidebar { width: 280px; }
  .sidebar-collapsed .nav-link span, .sidebar-collapsed .brand-text, .sidebar-collapsed .nav-link .nav-badge { display: initial; }
  .sidebar-collapsed .nav-heading { display: block; height: auto; padding: 6px 12px; margin: 0; background: none; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; padding: 9px 12px; }
  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .mode-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .content { padding: 16px; }
  .has-bottom-nav .content { padding-bottom: 90px; }
  .has-bottom-nav .bottom-nav { display: flex; }
  .has-bottom-nav .toasts { bottom: 84px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .card-head { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .page-head { align-items: stretch; }
  .page-head h2 { font-size: 18px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .filters .field, .filters .grow { min-width: 0; flex: 1 1 140px; }
  .user-chip .meta, .branch-pill .label { display: none; }
  .breadcrumbs { display: none; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .toasts { right: 16px; left: 16px; width: auto; }
  .input, .select { height: 44px; font-size: 16px; }
  .btn { height: 42px; }
  .btn-sm { height: 34px; }

  /* Tables become stacked cards */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table-cards tbody tr:hover td { background: none; }
  .table-cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-weight: 600; color: var(--text-3); font-size: 12.5px; text-align: left; flex: none; }
  .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { display: none; }
  .table-cards td.primary-cell { display: block; text-align: left; padding-bottom: 6px; }
  .table-cards td.primary-cell::before { display: none; }
  .table-cards td.actions { width: 100%; justify-content: flex-end; padding-top: 8px; }
  .table-cards tfoot { display: block; }
  .table-cards tfoot tr { display: flex; justify-content: space-between; }
  .table-cards tfoot td { width: auto; }
  .notif-list { width: calc(100vw - 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* File inputs follow the theme */
input[type=file]::file-selector-button { margin-right: 10px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2, var(--surface)); color: var(--text); font: inherit; cursor: pointer; }
input[type=file]::-webkit-file-upload-button { margin-right: 10px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2, var(--surface)); color: var(--text); font: inherit; cursor: pointer; }
