/* ============================================================
   KODILA — Poslovno-informacijski sistem
   Design tokens + base + components
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Brand — vinsko rdeča */
  --brand:        oklch(0.45 0.13 21);
  --brand-strong: oklch(0.39 0.13 21);
  --brand-soft:   oklch(0.96 0.022 21);
  --brand-contrast: #ffffff;

  /* Warm neutrals — light */
  --bg:        oklch(0.984 0.004 80);
  --surface:   #ffffff;
  --surface-2: oklch(0.975 0.005 80);
  --surface-3: oklch(0.962 0.006 80);
  --border:    oklch(0.916 0.006 75);
  --border-strong: oklch(0.86 0.008 75);
  --text:      oklch(0.255 0.012 55);
  --text-muted: oklch(0.53 0.012 60);
  --text-faint: oklch(0.68 0.01 65);

  /* Semantic */
  --success: oklch(0.55 0.11 150);
  --success-soft: oklch(0.95 0.03 150);
  --warning: oklch(0.66 0.12 65);
  --warning-soft: oklch(0.95 0.04 75);
  --danger:  oklch(0.55 0.16 28);
  --danger-soft: oklch(0.95 0.035 28);
  --info:    oklch(0.55 0.10 245);
  --info-soft: oklch(0.95 0.03 245);

  /* Radii / shadow / spacing */
  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px oklch(0.4 0.02 60 / 0.06), 0 1px 3px oklch(0.4 0.02 60 / 0.05);
  --shadow-md: 0 2px 6px oklch(0.4 0.02 60 / 0.07), 0 6px 16px oklch(0.4 0.02 60 / 0.08);
  --shadow-lg: 0 8px 24px oklch(0.35 0.02 60 / 0.12), 0 18px 48px oklch(0.35 0.02 60 / 0.10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --topbar-h: 60px;
}

[data-theme="dark"] {
  --brand:        oklch(0.62 0.14 23);
  --brand-strong: oklch(0.68 0.14 23);
  --brand-soft:   oklch(0.30 0.05 21);
  --brand-contrast: oklch(0.16 0.01 40);

  --bg:        oklch(0.175 0.006 60);
  --surface:   oklch(0.214 0.006 60);
  --surface-2: oklch(0.245 0.007 60);
  --surface-3: oklch(0.275 0.008 60);
  --border:    oklch(0.315 0.008 62);
  --border-strong: oklch(0.40 0.01 62);
  --text:      oklch(0.94 0.005 80);
  --text-muted: oklch(0.72 0.01 70);
  --text-faint: oklch(0.58 0.01 68);

  --success: oklch(0.72 0.12 150);
  --success-soft: oklch(0.30 0.05 150);
  --warning: oklch(0.78 0.12 75);
  --warning-soft: oklch(0.32 0.05 75);
  --danger:  oklch(0.68 0.15 28);
  --danger-soft: oklch(0.32 0.06 28);
  --info:    oklch(0.70 0.10 245);
  --info-soft: oklch(0.30 0.05 245);

  --shadow-sm: 0 1px 2px #00000040;
  --shadow-md: 0 2px 8px #00000050, 0 8px 20px #00000040;
  --shadow-lg: 0 10px 30px #00000060, 0 20px 56px #00000050;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}
#root { height: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand-soft); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: padding-box; border: 3px solid transparent; }

/* ---------- Typography helpers ---------- */
.h-page { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.h-sec  { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px; font-weight: 540;
  white-space: nowrap;
  transition: background .12s, border-color .12s, transform .04s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; flex: none; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: var(--brand-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-icon { width: 36px; padding: 0; justify-content: center; }
.btn-icon.btn-sm { width: 30px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 560; color: var(--text-muted); }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, textarea.input {
  height: 38px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.input::placeholder { color: var(--text-faint); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--text-muted);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: color-mix(in oklch, var(--warning), black 18%); }
.badge.dng { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
[data-theme="dark"] .badge.warn { color: var(--warning); }

/* ============================================================
   TOPBAR + SHELL
   ============================================================ */
.shell { display: flex; flex-direction: column; height: 100%; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 30;
}
.brand-mark {
  display: flex; align-items: center; gap: 11px; padding-right: 8px;
  margin-right: 6px;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: var(--brand-contrast);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: -0.04em;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; line-height: 1; }
.brand-sub { font-size: 10.5px; color: var(--text-faint); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }

.topnav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.topnav a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  height: 38px; padding: 0 13px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 540; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.topnav a .ico { width: 17px; height: 17px; opacity: .8; }
.topnav a:hover { background: var(--surface-2); color: var(--text); }
.topnav a.active { background: var(--brand-soft); color: var(--brand-strong); }
.topnav a.active .ico { opacity: 1; }
.topnav a.locked { opacity: .55; }

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

.topsearch {
  display: flex; align-items: center; gap: 8px;
  height: 36px; width: 210px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text-faint);
}
.topsearch input { border: none; background: none; outline: none; color: var(--text); width: 100%; }
.topsearch kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 2px 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 5px; color: var(--text-faint);
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: var(--brand-contrast); display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}

/* content area */
.content { flex: 1; overflow: auto; }
.page { max-width: 1320px; margin: 0 auto; padding: 26px 30px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head .grow { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 7px; }
.crumbs .sep { opacity: .5; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.kpi-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi-ico .ico { width: 17px; height: 17px; }
.kpi-label { font-size: 12.5px; font-weight: 560; color: var(--text-muted); }
.kpi-val { font-size: 27px; font-weight: 760; letter-spacing: -0.02em; line-height: 1; }
.kpi-val .cur { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 9px; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-spark { position: absolute; right: 0; bottom: 0; width: 88px; height: 40px; opacity: .9; }

.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }

/* App launcher */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.app-tile {
  display: flex; flex-direction: column; gap: 11px;
  padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); text-align: left;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  position: relative;
}
.app-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.app-tile.locked { opacity: .62; }
.app-tile.locked:hover { transform: none; box-shadow: var(--shadow-sm); }
.app-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.app-ico .ico { width: 22px; height: 22px; }
.app-name { font-weight: 640; font-size: 14.5px; }
.app-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.app-lock { position: absolute; top: 14px; right: 14px; }

/* Activity feed */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.feed-dot .ico { width: 15px; height: 15px; }
.feed-txt { font-size: 13px; line-height: 1.4; }
.feed-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ============================================================
   TOOLBAR (grid)
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.gridsearch {
  display: flex; align-items: center; gap: 8px;
  height: 36px; width: 260px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); color: var(--text-faint);
}
.gridsearch input { border: none; background: none; outline: none; color: var(--text); width: 100%; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button { height: 28px; padding: 0 12px; border: none; background: transparent; border-radius: 6px; font-size: 12.5px; font-weight: 540; color: var(--text-muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* dropdown */
.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.dd-menu.left { right: auto; left: 0; }
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: 7px;
  font-size: 13px; color: var(--text); text-align: left;
}
.dd-item:hover { background: var(--surface-2); }
.dd-item .ico { width: 16px; height: 16px; opacity: .8; }
.dd-sep { height: 1px; background: var(--border); margin: 5px 2px; }
.dd-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 8px 10px 5px; }
.dd-check { margin-left: auto; width: 16px; height: 16px; }
.colrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.colrow:hover { background: var(--surface-2); }
.colrow input { accent-color: var(--brand); width: 15px; height: 15px; }

/* counter pill */
.count-pill { font-size: 12.5px; color: var(--text-muted); }
.count-pill b { color: var(--text); font-weight: 650; }

/* ============================================================
   AG GRID — quartz theming
   ============================================================ */
.grid-wrap { height: calc(100vh - 250px); min-height: 420px; }
.ag-theme-kodila {
  --ag-font-family: var(--font) !important;
  --ag-font-size: 13px !important;
  --ag-background-color: var(--surface) !important;
  --ag-foreground-color: var(--text) !important;
  --ag-secondary-foreground-color: var(--text) !important;
  --ag-data-color: var(--text) !important;
  --ag-disabled-foreground-color: var(--text-faint) !important;
  --ag-header-background-color: var(--surface-2) !important;
  --ag-header-foreground-color: var(--text-muted) !important;
  --ag-border-color: var(--border) !important;
  --ag-row-border-color: var(--border) !important;
  --ag-secondary-border-color: var(--border) !important;
  --ag-odd-row-background-color: var(--surface) !important;
  --ag-row-hover-color: var(--brand-soft) !important;
  --ag-column-hover-color: var(--surface-2) !important;
  --ag-selected-row-background-color: var(--brand-soft) !important;
  --ag-range-selection-background-color: var(--brand-soft) !important;
  --ag-active-color: var(--brand) !important;
  --ag-checkbox-background-color: var(--surface) !important;
  --ag-checkbox-checked-color: var(--brand) !important;
  --ag-checkbox-unchecked-color: var(--text-faint) !important;
  --ag-checkbox-indeterminate-color: var(--brand) !important;
  --ag-input-border-color: var(--border) !important;
  --ag-input-focus-border-color: var(--brand) !important;
  --ag-input-disabled-background-color: var(--surface-2) !important;
  --ag-input-disabled-border-color: var(--border) !important;
  --ag-control-panel-background-color: var(--surface) !important;
  --ag-tooltip-background-color: var(--surface-3) !important;
  --ag-panel-background-color: var(--surface) !important;
  --ag-panel-border-color: var(--border) !important;
  --ag-menu-background-color: var(--surface) !important;
  --ag-menu-border-color: var(--border) !important;
  --ag-icon-font-color: var(--text-muted) !important;
  --ag-chip-background-color: var(--surface-2) !important;
  --ag-chip-border-color: var(--border) !important;
  --ag-modal-overlay-background-color: color-mix(in oklch, var(--bg), transparent 34%) !important;
  --ag-header-column-resize-handle-color: var(--border-strong) !important;
  --ag-header-column-separator-color: var(--border) !important;
  --ag-wrapper-border-radius: var(--r-lg);
  --ag-borders: solid 1px;
  --ag-border-radius: 7px;
  --ag-cell-horizontal-padding: 14px;
  --ag-header-height: 44px;
  --ag-row-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ag-theme-kodila .ag-header-cell-text { font-weight: 600; letter-spacing: .01em; }
.ag-theme-kodila .ag-row { font-size: 13px; }
.ag-theme-kodila .ag-cell { display: flex; align-items: center; }
.ag-theme-kodila .ag-cell-wrapper { width: 100%; }

/* cell renderers */
.cell-mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }
.cell-strong { font-weight: 600; }
.cell-num { font-family: var(--mono); font-feature-settings: "tnum"; }
.cell-thumb {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  background: var(--surface-3); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 13px;
}
.cell-with-thumb { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   DRAWER / MODAL
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.2 0.01 60 / 0.42);
  backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
  animation: fade .18s ease;
}
.overlay.center { align-items: center; justify-content: center; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  width: 560px; max-width: 94vw; height: 100%;
  background: var(--bg); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slidein .22s cubic-bezier(.2,.8,.2,1);
}
.drawer.wide { width: 820px; }
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } }
.drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.drawer-head .grow { flex: 1; }
.drawer-title { font-size: 17px; font-weight: 680; letter-spacing: -0.01em; }
.drawer-body { flex: 1; overflow: auto; padding: 22px; }
.drawer-foot {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface);
}
.drawer-foot .grow { flex: 1; }

.modal {
  width: 440px; max-width: 92vw;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* form layout */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .col-2 { grid-column: span 2; }
.form-sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 6px 0 2px; grid-column: span 2; display: flex; align-items: center; gap: 8px; }
.form-sec-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* line items table */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.lines th.r, .lines td.r { text-align: right; }
.lines td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lines tr:last-child td { border-bottom: none; }
.lines .input, .lines .select { height: 34px; }
.lines .cell-num { white-space: nowrap; }
.line-del { color: var(--text-faint); width: 28px; height: 28px; border-radius: 6px; border: none; background: none; display: grid; place-items: center; }
.line-del:hover { background: var(--danger-soft); color: var(--danger); }

.totbox { display: flex; flex-direction: column; gap: 8px; width: 280px; margin-left: auto; margin-top: 14px; }
.totrow { display: flex; justify-content: space-between; font-size: 13.5px; }
.totrow.grand { font-size: 17px; font-weight: 720; padding-top: 10px; border-top: 1px solid var(--border-strong); }
.totrow .mono { color: var(--text); }

/* status select look */
.statline { display: flex; align-items: center; gap: 8px; }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--text); color: var(--bg);
  border-radius: 999px; font-size: 13px; font-weight: 540;
  box-shadow: var(--shadow-lg); animation: pop .2s;
}
.toast .ico { width: 16px; height: 16px; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap { min-height: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.login-aside {
  position: relative; overflow: hidden;
  background:
    radial-gradient(110% 80% at 80% -10%, oklch(0.5 0.14 25 / .5), transparent 60%),
    linear-gradient(155deg, var(--brand-strong), oklch(0.26 0.07 24));
  color: #fff;
  padding: 54px 56px; display: flex; flex-direction: column;
}
.login-aside .lg-brand { display: flex; align-items: center; gap: 13px; }
.login-aside .brand-logo { background: #fff; color: var(--brand-strong); }
.lg-logo-card {
  display: inline-flex; align-items: center; background: #fff; padding: 16px 22px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: fit-content;
}
.lg-logo-card img { display: block; height: 56px; width: auto; }
.login-aside .lg-mid { margin-top: auto; }
.login-aside h1 { font-size: 38px; line-height: 1.08; font-weight: 760; letter-spacing: -0.025em; margin: 0 0 16px; max-width: 460px; }
.login-aside p { font-size: 15px; line-height: 1.6; color: oklch(0.92 0.02 30 / .85); max-width: 420px; margin: 0; }
.login-aside .lg-foot { margin-top: auto; padding-top: 40px; font-size: 12.5px; color: #ffffffaa; display: flex; gap: 18px; }
.lg-links { display: flex; flex-direction: column; gap: 8px; margin-top: 26px; max-width: 360px; }
.lg-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  background: #ffffff14; border: 1px solid #ffffff26; border-radius: var(--r-md);
  color: #fff; font-size: 13.5px; font-weight: 540; transition: background .15s;
}
.lg-link:hover { background: #ffffff22; }
.lg-link.disabled { opacity: .65; cursor: default; }
.lg-link-url { margin-left: auto; color: #ffffffa0; font-size: 12px; font-family: var(--mono); }
.lg-texture { position: absolute; inset: 0; opacity: .12; pointer-events: none; }

.login-main { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; font-weight: 720; letter-spacing: -0.02em; margin: 0 0 6px; }
.login-card .sub { color: var(--text-muted); margin: 0 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.check input { accent-color: var(--brand); width: 15px; height: 15px; }
.link { color: var(--brand-strong); font-weight: 560; }
.input-pw { position: relative; }
.input-pw .toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.demo-hint { margin-top: 22px; padding: 11px 13px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--r-md); font-size: 12px; color: var(--text-muted); }
.demo-hint b { color: var(--text); }

@media (max-width: 900px) {
  .login-aside { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
}

/* utility */
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.mt-6 { margin-top: 6px; } .mt-10 { margin-top: 10px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.hide { display: none !important; }
.empty-state { display: grid; place-items: center; padding: 50px; text-align: center; color: var(--text-muted); }
