:root {
  --bg: #0b141c;
  --panel: #111f2a;
  --panel-2: #152633;
  --panel-3: #0e1922;
  --ink: #eaf3f2;
  --muted: #8ca3a9;
  --line: rgba(151, 197, 184, 0.14);
  --line-strong: rgba(151, 197, 184, 0.26);
  --accent: #7de3bb;
  --accent-2: #4fd6a3;
  --accent-ink: #06231a;
  --accent-soft: rgba(125, 227, 187, 0.12);
  --green: #55e39b;
  --green-soft: rgba(85, 227, 155, 0.12);
  --amber: #f4b860;
  --amber-soft: rgba(244, 184, 96, 0.12);
  --red: #ff8080;
  --red-soft: rgba(255, 128, 128, 0.12);
  --blue: #6fb5ff;
  --blue-soft: rgba(111, 181, 255, 0.12);
  --violet: #b49cff;
  --violet-soft: rgba(180, 156, 255, 0.12);
  --sidebar: #08121a;
  --sidebar-ink: #a9bec2;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 78% -12%, rgba(125, 227, 187, 0.09), transparent 62%),
    radial-gradient(760px 420px at -10% 108%, rgba(111, 181, 255, 0.05), transparent 60%),
    var(--bg);
}

::selection { background: rgba(125, 227, 187, 0.28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a141c; }
::-webkit-scrollbar-thumb { background: #22343f; border-radius: 8px; border: 2px solid #0a141c; }
::-webkit-scrollbar-thumb:hover { background: #2f4756; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

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

/* ---------- Sidebar ---------- */
.sidebar {
  width: 248px;
  flex: none;
  background:
    radial-gradient(420px 260px at 50% -40px, rgba(125, 227, 187, 0.08), transparent 70%),
    var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(151, 197, 184, 0.08);
  z-index: 40;
}

.brand { display: flex; gap: 11px; align-items: center; padding: 0 6px 24px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #162934, #0a151d 70%);
  border: 1px solid rgba(125, 227, 187, 0.5);
  color: #f4faf8; display: grid; place-items: center;
  font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 4px rgba(125, 227, 187, 0.05), 0 8px 18px rgba(0, 0, 0, 0.4);
  flex: none;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name span {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.26em;
  color: #eaf3f2; text-transform: uppercase; margin-bottom: 2px;
}
.brand-name b {
  font-family: var(--display); font-size: 17px; font-weight: 700;
  letter-spacing: 0.1em; color: #ffffff; text-transform: uppercase;
}
.brand-sub { font-size: 9.5px; color: #6f858c; letter-spacing: 0.28em; text-transform: uppercase; margin-top: 4px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--sidebar-ink); text-decoration: none;
  font-weight: 500; font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .75; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(125, 227, 187, 0.16), rgba(125, 227, 187, 0.03));
  border-left-color: var(--accent);
  color: #fff;
}
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-badge {
  margin-left: auto; background: rgba(125, 227, 187, 0.14); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
}
.nav-badge.warn { background: rgba(244, 184, 96, 0.16); color: var(--amber); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sidebar-note { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #6f858c; padding: 0 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(125, 227, 187, 0.12); }

.sidebar-user {
  display: flex; align-items: center; gap: 9px; padding: 10px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(151, 197, 184, 0.12);
}
.sidebar-user .avatar { width: 32px; height: 32px; font-size: 11px; }
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-user-info b { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: 10.5px; color: var(--muted); }
.sidebar-user .icon-btn { width: 28px; height: 28px; }
.sidebar-user .icon-btn svg { width: 16px; height: 16px; }

/* ---------- Auth ---------- */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(720px 520px at 12% 8%, rgba(125, 227, 187, 0.10), transparent 65%),
    radial-gradient(620px 430px at 92% 92%, rgba(111, 181, 255, 0.06), transparent 62%),
    var(--bg);
}
.auth-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(125, 227, 187, 0.08);
  box-shadow: 0 0 0 80px rgba(125, 227, 187, 0.02), 0 0 0 160px rgba(125, 227, 187, 0.015);
  pointer-events: none;
}
.auth-shell { width: min(430px, 100%); position: relative; z-index: 1; }
.auth-brand { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 52px; height: 52px; font-size: 27px; }
.auth-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.auth-kicker { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.auth-card h1 { font-size: 24px; margin: 8px 0 6px; letter-spacing: -0.3px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.auth-form input {
  height: 42px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--panel-3); padding: 0 12px; color: var(--ink); outline: none;
  font-size: 14px; width: 100%;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-form .btn { height: 42px; margin-top: 4px; }
.auth-error {
  margin-top: 14px; padding: 10px 12px; border-radius: 9px;
  background: var(--red-soft); border: 1px solid rgba(255, 128, 128, 0.25);
  color: var(--red); font-size: 12.5px;
}
.auth-hint {
  margin-top: 14px; padding: 10px 12px; border-radius: 9px;
  background: var(--accent-soft); color: var(--muted); font-size: 12px; line-height: 1.5;
}
.auth-foot { display: flex; align-items: center; gap: 7px; justify-content: center; margin: 20px 0 0; color: var(--muted); font-size: 11px; }
.auth-copy { text-align: center; color: var(--muted); font-size: 11px; margin-top: 18px; line-height: 1.8; }
.auth-theme { position: absolute; top: 18px; right: 18px; border: 1px solid var(--line); background: var(--panel-3); z-index: 2; }

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

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 30px 16px;
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 20, 28, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(151, 197, 184, 0.06);
}
.topbar-title h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.3px; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-3); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 11px; height: 38px; width: 300px;
  transition: border .15s, box-shadow .15s;
}
.search:focus-within { border-color: rgba(125, 227, 187, 0.55); box-shadow: 0 0 0 3px rgba(125, 227, 187, 0.1); }
.search svg { width: 16px; height: 16px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: #70868d; }

.content { padding: 6px 30px 40px; }

.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background .15s, border .15s, transform .05s, box-shadow .15s, color .15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(151, 197, 184, 0.4); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, #94efca, #4fd6a3);
  border-color: transparent; color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(79, 214, 163, 0.18);
}
.btn-primary:hover { background: linear-gradient(135deg, #a8f5d6, #62dfb0); border-color: transparent; box-shadow: 0 10px 26px rgba(79, 214, 163, 0.26); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn-danger { color: var(--red); border-color: rgba(255, 128, 128, 0.35); background: rgba(255, 128, 128, 0.06); }
.btn-danger:hover { background: rgba(255, 128, 128, 0.14); border-color: rgba(255, 128, 128, 0.5); }
.btn-sm { height: 31px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle { border: 1px solid var(--line); background: var(--panel-3); }
.theme-toggle:hover { border-color: var(--line-strong); }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Cards / layout ---------- */
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 620; }
.card-head .hint { color: var(--muted); font-size: 12px; }

.stat { padding: 17px 19px; display: flex; flex-direction: column; gap: 9px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.stat-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.stat-ico svg { width: 17px; height: 17px; }
.stat-value { font-size: 25px; font-weight: 680; letter-spacing: -.6px; }
.stat-sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.trend { font-weight: 600; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }

.tint-indigo { background: var(--accent-soft); color: var(--accent); }
.tint-green { background: var(--green-soft); color: var(--green); }
.tint-amber { background: var(--amber-soft); color: var(--amber); }
.tint-blue { background: var(--blue-soft); color: var(--blue); }
.tint-violet { background: var(--violet-soft); color: var(--violet); }
.tint-red { background: var(--red-soft); color: var(--red); }

.dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 26px;
  background:
    radial-gradient(620px 300px at 86% 6%, rgba(125, 227, 187, 0.14), transparent 64%),
    linear-gradient(135deg, #12222e 0%, #0c1721 58%, #0a141c 100%);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 227, 187, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 227, 187, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(500px 240px at 82% 40%, #000, transparent 78%);
  mask-image: radial-gradient(500px 240px at 82% 40%, #000, transparent 78%);
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.hero-kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero-logo { display: flex; flex-direction: column; line-height: 0.96; margin-bottom: 10px; }
.hero-logo span {
  font-family: var(--serif); font-weight: 400; text-transform: uppercase;
  font-size: 22px; letter-spacing: 0.28em; color: #f2f8f6;
}
.hero-logo b {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 40px; letter-spacing: 0.07em; color: #ffffff; line-height: 0.92;
}
.hero-sub {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.hero-meta {
  position: relative; z-index: 1; margin-left: auto; text-align: right;
  display: flex; flex-direction: column; gap: 4px; flex: none;
}
.hero-meta .tagline { font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; color: #7f979c; }
.hero-meta .phone { font-size: 19px; font-weight: 700; letter-spacing: 0.02em; color: #fff; }
.hero-meta .addr { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: #7f979c; padding: 11px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid rgba(151, 197, 184, 0.08); font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.row-click { cursor: pointer; transition: background .12s; }
tbody tr.row-click:hover { background: rgba(125, 227, 187, 0.04); }
.cell-main { font-weight: 570; }
.cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.accepted { background: var(--blue-soft); color: var(--blue); }
.badge.diagnostics { background: var(--violet-soft); color: var(--violet); }
.badge.waiting { background: var(--amber-soft); color: var(--amber); }
.badge.repair { background: var(--accent-soft); color: var(--accent); }
.badge.ready { background: var(--green-soft); color: var(--green); }
.badge.issued { background: rgba(169, 190, 194, 0.1); color: #a9bec2; }
.badge.canceled { background: var(--red-soft); color: var(--red); }
.badge.source-site { background: var(--accent-soft); color: var(--accent); }
.badge.online-new { background: var(--blue-soft); color: var(--blue); }
.badge.online-processing { background: var(--amber-soft); color: var(--amber); }
.badge.online-converted { background: var(--green-soft); color: var(--green); }
.badge.online-rejected { background: var(--red-soft); color: var(--red); }
.source-site { color: var(--accent); font-weight: 600; }

.priority { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.priority .pdot { width: 7px; height: 7px; border-radius: 50%; }
.p-high .pdot { background: var(--red); }
.p-normal .pdot { background: #7f979c; }
.p-low .pdot { background: #415863; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: rgba(169, 190, 194, 0.09); color: #b9cdd0; font-size: 11.5px; font-weight: 550;
  white-space: nowrap;
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(125, 227, 187, 0.16);
}
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div { min-width: 0; }
.person .cell-main, .person .cell-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- Toolbar / filters ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.filter-input, .select {
  height: 34px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-3); padding: 0 10px; font-size: 12.5px; outline: none;
  color: var(--ink);
}
.filter-input { min-width: 210px; }
.select:focus, .filter-input:focus { border-color: rgba(125, 227, 187, 0.55); box-shadow: 0 0 0 3px rgba(125, 227, 187, 0.1); }
.toolbar .spacer { flex: 1; }
.count-note { color: var(--muted); font-size: 12px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: #a8bdc1; }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  height: 38px; border: 1px solid rgba(151, 197, 184, 0.2); border-radius: 9px;
  padding: 0 11px; background: var(--panel-3); outline: none; font-size: 13px;
  color: var(--ink);
  transition: border .15s, box-shadow .15s, background .15s;
}
.field textarea { height: auto; min-height: 78px; padding: 9px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(125, 227, 187, 0.6); box-shadow: 0 0 0 3px rgba(125, 227, 187, 0.1);
  background: #0b1720;
}
.field .help { font-size: 11.5px; color: var(--muted); }
.form-section { margin: 4px 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #6f858c; grid-column: 1 / -1; padding-top: 6px; }
.form-section:not(:first-child) { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--line); }
.form-actions.full { grid-column: 1 / -1; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 9, 13, 0.72);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 38px 18px; overflow-y: auto;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 620px; max-width: 100%; background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: pop .18s ease-out;
  max-height: calc(100vh - 76px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal.wide { width: 780px; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  flex: none; background: var(--panel); border-radius: 16px 16px 0 0;
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.modal-body { padding: 20px 22px 22px; overflow-y: auto; }

/* ---------- Order details ---------- */
.detail-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-number { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin-right: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.info-box { border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; background: var(--panel-3); }
.info-box h4 { margin: 0 0 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: #7f979c; font-weight: 700; }
.info-box .strong { font-weight: 600; font-size: 13.5px; }
.info-box .line { color: var(--muted); font-size: 12px; margin-top: 2px; }
.money-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.money-cell { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-3); }
.money-cell span { display: block; font-size: 11px; color: var(--muted); }
.money-cell b { font-size: 15px; font-weight: 650; }
.money-cell.due b { color: var(--red); }
.money-cell.paid b { color: var(--green); }

.detail-desc { background: var(--panel-3); border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; font-size: 13px; margin-bottom: 16px; white-space: pre-wrap; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 11px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 12px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: #3b4f59; margin-top: 5px; flex: none; }
.tl-item:first-child .tl-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(125, 227, 187, 0.12); }
.tl-line { width: 1px; flex: 1; background: var(--line); }
.tl-body { padding-bottom: 13px; }
.tl-body .t { font-size: 12.5px; }
.tl-body .d { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- Pipeline ---------- */
.pipeline { display: flex; flex-direction: column; gap: 13px; }
.pipe-row { display: grid; grid-template-columns: 132px 1fr 38px; align-items: center; gap: 12px; }
.pipe-label { font-size: 12.5px; color: #b0c2c6; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pipe-bar { height: 8px; border-radius: 6px; background: rgba(151, 197, 184, 0.09); overflow: hidden; }
.pipe-fill { height: 100%; border-radius: 6px; transition: width .35s; box-shadow: 0 0 12px rgba(125, 227, 187, 0.18); }
.pipe-count { font-size: 12.5px; font-weight: 650; text-align: right; color: #b0c2c6; }

/* ---------- Charts ---------- */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 18px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.chart-bar { width: 100%; max-width: 46px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #a6f2d3, #4fd6a3); min-height: 3px; transition: height .4s; position: relative; box-shadow: 0 0 18px rgba(79, 214, 163, 0.14); }
.chart-bar:hover { filter: brightness(1.08); }
.chart-val { font-size: 11px; font-weight: 650; color: #b0c2c6; }
.chart-label { font-size: 11px; color: var(--muted); }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut { width: 146px; height: 146px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; }
.donut::after { content: ""; position: absolute; inset: 21px; background: var(--panel); border-radius: 50%; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center b { display: block; font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.donut-center span { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 160px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-row b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- Empty / misc ---------- */
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty .emoji { font-size: 34px; margin-bottom: 10px; }
.empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 15px; }
.empty p { margin: 0 0 16px; font-size: 12.5px; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.tiny { font-size: 11.5px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

.low { color: var(--red); font-weight: 600; }
.stock-ok { color: var(--green); font-weight: 600; }
.qty-control { display: inline-flex; align-items: center; gap: 6px; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-3); font-weight: 700; line-height: 1; color: #b0c2c6; }
.qty-btn:hover { background: rgba(125, 227, 187, 0.1); border-color: rgba(125, 227, 187, 0.4); color: var(--accent); }
.qty-num { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 16px; }
.notice.warn { background: var(--amber-soft); color: #f6c77e; border: 1px solid rgba(244, 184, 96, 0.2); }
.notice.info { background: var(--blue-soft); color: #a2d0ff; border: 1px solid rgba(111, 181, 255, 0.2); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #16242f; color: #fff; padding: 11px 15px; border-radius: 10px;
  font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; gap: 8px;
  animation: pop .2s ease-out;
}
.toast.success { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.toast.error { background: #b33232; color: #fff; border-color: transparent; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(151, 197, 184, 0.08); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .t { font-weight: 570; font-size: 13px; }
.setting-row .d { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-3);
}
.user-row .avatar { width: 30px; height: 30px; font-size: 10px; }
.user-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-row-info b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row-info span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .btn { height: 28px; padding: 0 8px; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(169, 190, 194, 0.09); border-radius: 20px; padding: 4px 6px 4px 10px; font-size: 12px; }
.chip button { border: 0; background: transparent; color: #98a1b3; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.chip button:hover { background: rgba(255, 255, 255, 0.08); color: var(--red); }

/* ---------- Print document (screen preview + print) ---------- */
.print-doc { width: 100%; max-width: 186mm; margin: 0 auto; font-size: 9.5pt; line-height: 1.35; }
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8mm;
  border-bottom: 0.5mm solid #111;
  padding-bottom: 4mm;
  margin-bottom: 4mm;
}
.doc-logo { width: 22mm; height: 22mm; object-fit: cover; border-radius: 1.5mm; }
.doc-company { text-align: right; font-size: 8.2pt; line-height: 1.45; color: #222; }
.doc-company-name { font-size: 12pt; font-weight: 700; margin-bottom: 1mm; color: #000; }
.doc-title { text-align: center; font-size: 17pt; font-weight: 700; margin: 4mm 0 1mm; }
.doc-order { text-align: center; font-size: 10pt; margin-bottom: 5mm; }
.doc-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 7mm; margin-bottom: 5mm; }
.doc-info-grid--act { gap: 3mm 5mm; }
.doc-info-block { border: 0.35mm solid #bbb; border-radius: 1.5mm; padding: 2.5mm 3mm; break-inside: avoid; }
.doc-info-block h3 { margin: 0 0 1.8mm; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.4px; color: #444; }
.doc-info-row { display: flex; gap: 3mm; justify-content: space-between; font-size: 8.7pt; line-height: 1.35; margin: 0.7mm 0; }
.doc-info-row span { color: #555; min-width: 28mm; }
.doc-info-row b { text-align: right; font-weight: 600; }
.doc-terms { border-top: 0.35mm solid #999; padding-top: 3mm; margin-top: 2mm; }
.doc-terms h3 { font-size: 9.2pt; margin: 0 0 1.5mm; }
.doc-terms ol { margin: 0; padding-left: 5mm; font-size: 7.1pt; line-height: 1.32; }
.doc-terms li { margin-bottom: 1.1mm; text-align: justify; }
.doc-terms--act ol { font-size: 7.8pt; }
.doc-table { width: 100%; border-collapse: collapse; margin: 4mm 0 3mm; font-size: 8.8pt; }
.doc-table th, .doc-table td { border: 0.35mm solid #777; padding: 2mm 2.2mm; vertical-align: top; }
.doc-table th { background: #eee; font-weight: 700; text-align: left; }
.doc-table .num { text-align: right; white-space: nowrap; }
.doc-table tfoot td { font-weight: 700; }
.doc-table tr { break-inside: avoid; }
.doc-payment { display: flex; justify-content: flex-end; gap: 10mm; font-size: 9pt; margin: 0 0 4mm; }
.doc-statement { font-size: 8.8pt; font-style: italic; line-height: 1.45; margin: 3mm 0; padding: 2.5mm 3mm; background: #f5f5f5; border-left: 1mm solid #111; }
.doc-signatures { margin-top: 7mm; font-size: 9pt; }
.doc-sign-row { display: flex; justify-content: space-between; gap: 8mm; margin: 3mm 0; align-items: baseline; }
.doc-sign-row span { white-space: nowrap; }
.doc-sign-row b { font-weight: 600; text-align: right; }
.doc-sign-line { margin-top: 2mm; }
.doc-footer { margin-top: 5mm; border-top: 0.3mm solid #aaa; padding-top: 2mm; font-size: 7pt; color: #555; text-align: center; }

.print-area { display: none; }
.print-preview-toolbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 0 0 12px;
}
.print-preview-toolbar h3 { margin: 0 0 3px; font-size: 14px; font-weight: 650; }
.print-preview-wrap {
  background: #e6eaee; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; overflow: auto;
}
.print-preview-sheet {
  width: 100%; max-width: 186mm; margin: 0 auto; background: #fff; color: #000;
  padding: 7mm 6mm; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  font-family: Arial, "Segoe UI", sans-serif; font-size: 9.5pt; line-height: 1.35;
}
.print-preview-sheet .print-doc { max-width: none; }

@media (max-width: 700px) {
  .print-preview-wrap { padding: 6px; }
  .print-preview-sheet { padding: 4mm 3mm; font-size: 8.2pt; }
  .print-preview-sheet .doc-logo { width: 16mm; height: 16mm; }
  .print-preview-sheet .doc-title { font-size: 14pt; }
  .print-preview-sheet .doc-info-grid { grid-template-columns: 1fr; }
  .print-preview-sheet .doc-terms ol { font-size: 6.6pt; }
}

@media print {
  @page { size: A4; margin: 10mm 12mm; }
  html, body { background: #fff !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app, .overlay, .toasts, .print-preview-toolbar, .print-preview-wrap { display: none !important; }
  .print-area {
    display: block !important;
    padding: 0;
    font-family: Arial, "Segoe UI", sans-serif;
    color: #000;
    background: #fff;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .hero-meta { display: none; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 14px 18px; }
  .content { padding: 6px 18px 32px; }
}

@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; }
  .search { display: none; }
  .auth-screen { padding: 56px 14px 24px; align-items: flex-start; }
  .auth-card { padding: 22px; border-radius: 16px; }
  .auth-brand { margin-bottom: 16px; }
  .auth-theme { top: 12px; right: 12px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 0 12px; }
  .topbar-title p { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .money-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { gap: 8px; }
  .filter-input { min-width: 0; width: 100%; }
  .pipe-row { grid-template-columns: 108px 1fr 30px; gap: 8px; }
  .modal-body { padding: 16px; }
  .modal-head { padding: 14px 16px; }
  .hero { padding: 20px; }
  .hero-logo span { font-size: 17px; letter-spacing: 0.22em; }
  .hero-logo b { font-size: 31px; }
  .hero-sub { font-size: 9px; letter-spacing: 0.1em; }
}

/* ---------- ML Service warehouse ---------- */
.ml-head .card-pad { display: flex; flex-direction: column; gap: 13px; }
.ml-head-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ml-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ml-logo {
  width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .06em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 20px rgba(79, 214, 163, .22);
}
.ml-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 650; }
.ml-sub { margin-top: 2px; color: var(--muted); font-size: 12px; }
.ml-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ml-meta {
  display: flex; flex-wrap: wrap; gap: 5px 18px;
  padding-top: 12px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px;
}
.ml-meta b { color: var(--ink); font-weight: 600; }

.ml-progress {
  position: relative; display: flex; align-items: center; height: 28px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-3);
  color: var(--muted); font-size: 11.5px; overflow: hidden;
}
.ml-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent); opacity: .22; transition: width .4s ease;
}
.ml-progress span { position: relative; z-index: 1; }

.ml-login {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3);
}
.ml-login-text { flex: 1 1 100%; display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.ml-login-text b { color: var(--ink); font-size: 13px; font-weight: 600; }
.ml-login input {
  flex: 1 1 190px; height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--panel-2); padding: 0 11px; color: var(--ink); font: inherit; font-size: 13px; outline: none;
}
.ml-login .btn { flex: 0 0 auto; }
.ml-login input:focus { border-color: rgba(125, 227, 187, .6); box-shadow: 0 0 0 3px var(--accent-soft); }

.ml-tabs { display: flex; gap: 4px; margin: 16px 0 14px; border-bottom: 1px solid var(--line); }
.ml-tab {
  position: relative; padding: 10px 14px 11px; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ml-tab:hover { color: var(--ink); }
.ml-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.ml-toolbar { border-bottom: 1px solid var(--line); }
.ml-toolbar .ml-search { min-width: 260px; flex: 1 1 240px; }
.ml-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ml-check.full { grid-column: 1 / -1; }
.ml-check input { width: 15px; height: 15px; accent-color: var(--accent); }

tbody tr.ml-row { cursor: pointer; transition: background .12s; }
tbody tr.ml-row:hover { background: rgba(125, 227, 187, .04); }
.ml-product { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ml-thumb {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 18px;
}
.ml-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ml-price { font-weight: 650; font-variant-numeric: tabular-nums; }
.ml-stock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ml-wh {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px;
  background: rgba(169, 190, 194, .1); color: var(--muted); font-size: 11px; white-space: nowrap;
}
.ml-wh.on { background: var(--accent-soft); color: var(--accent); }
.ml-pager {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.ml-pager .spacer, .ml-cart-foot .spacer { flex: 1; }

.ml-detail { display: flex; flex-direction: column; gap: 16px; }
.ml-detail-top { display: flex; gap: 18px; flex-wrap: wrap; }
.ml-gallery { display: flex; flex-direction: column; gap: 8px; flex: none; }
.ml-gallery img {
  width: 96px; height: 96px; object-fit: contain; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; padding: 6px;
}
.ml-gallery img.main { width: 190px; height: 190px; }
.ml-detail-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ml-detail-name { font-size: 17px; font-weight: 650; line-height: 1.3; }
.ml-detail-price { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.ml-detail-price .cell-sub { display: inline; margin-left: 6px; font-size: 11.5px; font-weight: 500; }
.ml-desc {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-3); color: var(--muted); font-size: 12.5px; line-height: 1.55;
}
.ml-variants .chips { margin-top: 6px; }
.ml-variants .tag { font-size: 10.5px; }
.ml-qty { width: 68px; min-width: 0; text-align: center; }

.ml-cart-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line);
}
.ml-cart-total { font-size: 14px; }
.ml-cart-total b { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }

/* ---------- Liberty Project ---------- */
.lb-logo {
  background: linear-gradient(135deg, #f6b73c 0%, #e2762f 100%);
  color: #2a1608;
  box-shadow: 0 8px 20px rgba(226, 118, 47, .24);
}
tr.lb-store-here { background: rgba(125, 227, 187, .07); }
[data-theme="light"] tr.lb-store-here { background: #eefaf3; }

@media screen {
  [data-theme="light"] tbody tr.ml-row:hover { background: #f1f9f5; }
  [data-theme="light"] .ml-login { background: #f7faf9; }
  [data-theme="light"] .ml-login input { background: #ffffff; border-color: #d5e2dd; }
  [data-theme="light"] .ml-wh.on { background: #e2f7ed; color: #0f8f60; }
  [data-theme="light"] .ml-logo { box-shadow: 0 8px 20px rgba(31, 174, 131, .18); }
}

@media (max-width: 900px) {
  .ml-login-text { flex-basis: 100%; }
  .ml-gallery { flex-direction: row; flex-wrap: wrap; }
  .ml-gallery img.main { width: 140px; height: 140px; }
}

@media (max-width: 700px) {
  .ml-actions { margin-left: 0; }
  .ml-toolbar .ml-search { min-width: 0; flex-basis: 100%; }
}

/* ---------- Light theme ---------- */
@media screen {
  [data-theme="light"] {
    color-scheme: light;
    --bg: #f1f6f4;
    --panel: #ffffff;
    --panel-2: #f6fbf9;
    --panel-3: #f7faf9;
    --ink: #14242c;
    --muted: #647a80;
    --line: #dfe9e5;
    --line-strong: #cbdad5;
    --accent: #149e77;
    --accent-2: #2bbf90;
    --accent-ink: #06231a;
    --accent-soft: rgba(31, 174, 131, 0.12);
    --green: #0f8f60;
    --green-soft: #e2f7ed;
    --amber: #a96c08;
    --amber-soft: #fff3df;
    --red: #c23d3d;
    --red-soft: #ffecec;
    --blue: #2367b8;
    --blue-soft: #e8f1ff;
    --violet: #6a4fd2;
    --violet-soft: #f0ebff;
    --sidebar: #ffffff;
    --sidebar-ink: #465c63;
    --shadow: 0 10px 28px rgba(17, 31, 42, 0.07);
  }

  [data-theme="light"] body {
    background:
      radial-gradient(900px 520px at 78% -12%, rgba(31, 174, 131, 0.1), transparent 62%),
      radial-gradient(760px 420px at -10% 108%, rgba(35, 103, 184, 0.05), transparent 60%),
      var(--bg);
  }
  [data-theme="light"] ::selection { background: rgba(31, 174, 131, 0.2); color: #14242c; }
  [data-theme="light"] ::-webkit-scrollbar-track { background: #eef4f1; }
  [data-theme="light"] ::-webkit-scrollbar-thumb { background: #c6d7d1; border-color: #eef4f1; }
  [data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #adc5bd; }

  [data-theme="light"] .sidebar {
    background:
      radial-gradient(420px 260px at 50% -40px, rgba(31, 174, 131, 0.09), transparent 70%),
      var(--sidebar);
    border-right-color: #e3ece8;
  }
  [data-theme="light"] .brand-mark {
    background: radial-gradient(circle at 32% 28%, #1b3039, #0b1a22 70%);
    border-color: #111f2a;
    box-shadow: 0 0 0 4px rgba(17, 31, 42, 0.04), 0 8px 18px rgba(17, 31, 42, 0.18);
  }
  [data-theme="light"] .brand-name span,
  [data-theme="light"] .brand-name b { color: #111f2a; }
  [data-theme="light"] .brand-sub { color: #7c9095; }
  [data-theme="light"] .nav-item:hover { background: rgba(17, 31, 42, 0.04); color: #111f2a; }
  [data-theme="light"] .nav-item.active {
    background: linear-gradient(90deg, rgba(31, 174, 131, 0.14), rgba(31, 174, 131, 0.03));
    color: #0d2b22;
  }
  [data-theme="light"] .nav-item.active svg { color: var(--accent); }
  [data-theme="light"] .sidebar-note { color: #7a9095; }

  [data-theme="light"] .topbar {
    background: rgba(241, 246, 244, 0.86);
    border-bottom-color: rgba(17, 31, 42, 0.06);
  }
  [data-theme="light"] .search { background: #ffffff; border-color: var(--line); }
  [data-theme="light"] .search input::placeholder { color: #8aa0a5; }
  [data-theme="light"] .search:focus-within {
    border-color: #4fc9a1;
    box-shadow: 0 0 0 3px rgba(31, 174, 131, 0.12);
  }
  [data-theme="light"] .icon-btn { color: var(--muted); }
  [data-theme="light"] .icon-btn:hover { background: rgba(17, 31, 42, 0.05); color: var(--ink); }

  [data-theme="light"] .btn { background: #ffffff; border-color: var(--line-strong); color: var(--ink); }
  [data-theme="light"] .btn:hover { background: #f4f9f7; border-color: #b9ccc6; }
  [data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #8febc6, #4fd6a3);
    border-color: transparent;
    color: #06231a;
    box-shadow: 0 8px 20px rgba(31, 174, 131, 0.18);
  }
  [data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #a5f2d4, #62dfb0);
    border-color: transparent;
  }
  [data-theme="light"] .btn-ghost { background: transparent; color: var(--muted); }
  [data-theme="light"] .btn-ghost:hover { background: rgba(17, 31, 42, 0.05); color: var(--ink); }
  [data-theme="light"] .btn-danger { background: #fff5f5; border-color: #f0c9c9; color: var(--red); }
  [data-theme="light"] .btn-danger:hover { background: #ffecec; border-color: #e3aaaa; }

  [data-theme="light"] .hero {
    background:
      radial-gradient(620px 300px at 86% 6%, rgba(31, 174, 131, 0.16), transparent 64%),
      linear-gradient(135deg, #ffffff 0%, #eff8f4 58%, #e7f2ed 100%);
    border-color: var(--line);
  }
  [data-theme="light"] .hero::before {
    background-image:
      linear-gradient(rgba(17, 31, 42, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(17, 31, 42, 0.055) 1px, transparent 1px);
  }
  [data-theme="light"] .hero-logo span { color: #111f2a; }
  [data-theme="light"] .hero-logo b { color: #0b1a22; }
  [data-theme="light"] .hero-kicker { color: var(--accent); }
  [data-theme="light"] .hero-sub { color: var(--accent); }
  [data-theme="light"] .hero-meta .tagline { color: #5b7278; }
  [data-theme="light"] .hero-meta .phone { color: #111f2a; }
  [data-theme="light"] .hero-meta .addr { color: var(--muted); }

  [data-theme="light"] th { color: #6f858a; border-bottom-color: var(--line); }
  [data-theme="light"] td { border-bottom-color: #edf3f0; }
  [data-theme="light"] tbody tr.row-click:hover { background: #f1f9f5; }
  [data-theme="light"] .tag { background: #eef4f2; color: #4f676d; }
  [data-theme="light"] .avatar { border-color: #cdece1; }
  [data-theme="light"] .badge.issued { background: #eef3f2; color: #5b6e73; }
  [data-theme="light"] .badge.source-site { background: #e3f6ee; color: #12835f; }
  [data-theme="light"] .source-site { color: #12835f; }
  [data-theme="light"] .priority { color: var(--muted); }

  [data-theme="light"] .filter-input,
  [data-theme="light"] .select { background: #ffffff; border-color: var(--line); }
  [data-theme="light"] .filter-input:focus,
  [data-theme="light"] .select:focus {
    border-color: #4fc9a1;
    box-shadow: 0 0 0 3px rgba(31, 174, 131, 0.12);
  }

  [data-theme="light"] .field label { color: #52686e; }
  [data-theme="light"] .field input,
  [data-theme="light"] .field select,
  [data-theme="light"] .field textarea { background: #ffffff; border-color: #d5e2dd; }
  [data-theme="light"] .field input:focus,
  [data-theme="light"] .field select:focus,
  [data-theme="light"] .field textarea:focus {
    background: #ffffff;
    border-color: #4fc9a1;
    box-shadow: 0 0 0 3px rgba(31, 174, 131, 0.12);
  }
  [data-theme="light"] .form-section { color: #7a9095; }
  [data-theme="light"] .form-actions { border-top-color: var(--line); }

  [data-theme="light"] .overlay { background: rgba(17, 31, 42, 0.35); }
  [data-theme="light"] .modal {
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(17, 31, 42, 0.22);
  }
  [data-theme="light"] .modal-head { background: #ffffff; border-bottom-color: var(--line); }
  [data-theme="light"] .info-box,
  [data-theme="light"] .money-cell,
  [data-theme="light"] .detail-desc { background: #f7faf9; border-color: var(--line); }
  [data-theme="light"] .info-box h4 { color: #74898e; }
  [data-theme="light"] .timeline .tl-dot { background: #c6d6d1; }
  [data-theme="light"] .timeline .tl-item:first-child .tl-dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 174, 131, 0.14);
  }

  [data-theme="light"] .pipe-label,
  [data-theme="light"] .pipe-count { color: #4f676d; }
  [data-theme="light"] .pipe-bar { background: #e9f1ee; }
  [data-theme="light"] .chart-val { color: #536a70; }
  [data-theme="light"] .chart-bar { box-shadow: 0 6px 14px rgba(31, 174, 131, 0.16); }

  [data-theme="light"] .notice.warn { background: #fff3df; color: #8a5a0b; border-color: #f1dcb6; }
  [data-theme="light"] .notice.info { background: #e8f1ff; color: #205d9e; border-color: #cfe0f7; }

  [data-theme="light"] .qty-btn { background: #ffffff; border-color: var(--line-strong); color: #4f676d; }
  [data-theme="light"] .qty-btn:hover { background: #e9f8f1; border-color: #9edec9; color: #148a68; }

  [data-theme="light"] .toast {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: 0 12px 30px rgba(17, 31, 42, 0.16);
  }
  [data-theme="light"] .toast.success { background: #7de3bb; color: #06231a; border-color: transparent; }
  [data-theme="light"] .toast.error { background: #b33232; color: #ffffff; border-color: transparent; }

  [data-theme="light"] .setting-row { border-bottom-color: #edf3f0; }
  [data-theme="light"] .chip { background: #eef4f2; color: #3f575d; }
  [data-theme="light"] .chip button { color: #7a9095; }
  [data-theme="light"] .chip button:hover { background: rgba(17, 31, 42, 0.06); color: var(--red); }

  [data-theme="light"] .auth-card { box-shadow: 0 24px 50px rgba(20, 36, 44, 0.12); }
  [data-theme="light"] .auth-form input { background: #ffffff; border-color: #d5e2dd; }
  [data-theme="light"] .auth-theme { background: #ffffff; }
  [data-theme="light"] .sidebar-user { background: #ffffff; border-color: var(--line); }
  [data-theme="light"] .sidebar-user-info b { color: var(--ink); }
  [data-theme="light"] .sidebar-user .avatar { border-color: #cdece1; }
}
