/* Voltaxion Customer Portal v0 — styles */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #07060D;
  --bg-1: #0B0917;
  --bg-2: #0E0B1C;
  --bg-3: #14112A;
  --surface: #11102200;
  --fg: #ffffff;
  --muted: rgba(255,255,255,0.65);
  --muted-2: rgba(255,255,255,0.45);
  --muted-3: rgba(255,255,255,0.30);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --grad: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #F59E0B 100%);
  --grad-2: linear-gradient(135deg, #8B5CF6, #EC4899);
  --violet: #8B5CF6;
  --pink: #EC4899;
  --amber: #F59E0B;
  --green: #10B981;
  --red: #EF4444;
  --blue: #3B82F6;
  --cyan: #06B6D4;
  --sidebar-w: 232px;
  --topbar-h: 64px;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(139,92,246,0.55); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ====== LOGIN PAGE ====== */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(139,92,246,0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(236,72,153,0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(245,158,11,0.06), transparent 70%),
    var(--bg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-body::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.login-card {
  position: relative;
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(20,17,42,0.85), rgba(11,9,23,0.85));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 40px 36px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.12);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 20px;
  margin-bottom: 28px;
}
.logo-mark-sq {
  width: 32px; height: 32px;
  background: conic-gradient(from 180deg, #8B5CF6, #EC4899, #F59E0B, #8B5CF6);
  border-radius: 9px;
  box-shadow: 0 0 26px rgba(139,92,246,0.55);
}
.login-card h1 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.4px;
  margin-bottom: 8px;
}
.login-sub {
  font-size: 14px; color: var(--muted); margin-bottom: 28px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  border-radius: 10px; color: var(--fg);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,0.6);
  background: rgba(139,92,246,0.06);
}
.field .row-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  user-select: none;
}
.checkbox input { accent-color: var(--violet); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: filter .15s, transform .05s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad-2); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(139,92,246,0.55);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-danger {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.4);
  color: #FCA5A5;
}
.btn-danger:hover { background: rgba(239,68,68,0.22); }
.login-foot {
  margin-top: 22px; padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted); text-align: center;
}
.login-foot a { color: #C4B5FD; font-weight: 600; }
.login-foot a:hover { color: #fff; }
.fine-print {
  margin-top: 18px;
  font-size: 11px; color: var(--muted-2);
  text-align: center; letter-spacing: 0.2px;
}

/* ====== APP SHELL ====== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(139,92,246,0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(236,72,153,0.06), transparent 60%),
    var(--bg);
}
.topbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(7,6,13,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.3px;
}
.topbar .right {
  display: flex; align-items: center; gap: 16px;
}
.am-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  cursor: pointer;
  transition: background .15s;
}
.am-chip:hover { background: rgba(255,255,255,0.08); }
.am-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.am-chip .name { font-size: 13px; font-weight: 600; }
.am-chip .role { font-size: 11px; color: var(--muted); margin-top: -2px; }

.sidebar {
  background: rgba(11,9,23,0.6);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.side-section {
  font-size: 10px; font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 12px 6px;
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: 14px;
  margin: 2px 0;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.side-link:hover { background: rgba(255,255,255,0.04); color: #fff; }
.side-link.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(236,72,153,0.15));
  color: #fff;
  border: 1px solid rgba(139,92,246,0.35);
}
.side-link svg { width: 18px; height: 18px; opacity: 0.85; flex-shrink: 0; }
.side-link .badge {
  margin-left: auto;
  background: rgba(139,92,246,0.25);
  color: #C4B5FD;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px;
}

.main {
  padding: 28px 32px 60px;
  overflow-x: hidden;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.page-head .sub { color: var(--muted); font-size: 14px; }

/* ====== Cards / KPI ====== */
.card {
  background: linear-gradient(180deg, rgba(20,17,42,0.55), rgba(11,9,23,0.55));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi {
  position: relative; overflow: hidden;
}
.kpi .label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--muted-2);
}
.kpi .value {
  font-size: 28px; font-weight: 700; margin-top: 8px;
  letter-spacing: -0.5px;
}
.kpi .delta {
  font-size: 12px; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}
.delta.up { color: #6EE7B7; }
.delta.down { color: #FCA5A5; }
.delta.flat { color: var(--muted-2); }
.kpi .accent {
  position: absolute; right: -16px; top: -16px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad-2);
  opacity: 0.18; filter: blur(8px);
}

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.card h2 {
  font-size: 15px; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.card h2 .link {
  font-size: 12px; color: #C4B5FD; font-weight: 600; cursor: pointer;
}
.card h2 .link:hover { color: #fff; }

/* ====== Timeline ====== */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: flex-start;
  font-size: 13px;
}
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.35);
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-text strong { font-weight: 600; }
.tl-text .desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tl-time { color: var(--muted-2); font-size: 12px; white-space: nowrap; }

/* ====== Quick actions ====== */
.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.quick a {
  padding: 14px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.quick a:hover {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.4);
}
.quick svg { width: 22px; height: 22px; opacity: 0.85; }

/* ====== Filter bar ====== */
.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr) auto;
  gap: 10px; align-items: end;
  background: linear-gradient(180deg, rgba(20,17,42,0.55), rgba(11,9,23,0.55));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .filter-bar { grid-template-columns: 1fr 1fr 1fr; } }
.filter-bar .field { margin: 0; }
.filter-bar label { font-size: 10px; }
.filter-bar input, .filter-bar select {
  padding: 9px 12px; font-size: 13px;
}
.filter-bar .clear {
  align-self: end;
  color: var(--muted); font-size: 12px; cursor: pointer;
  padding: 10px 8px;
}
.filter-bar .clear:hover { color: #fff; }

/* ====== Table ====== */
.table-wrap {
  background: linear-gradient(180deg, rgba(20,17,42,0.55), rgba(11,9,23,0.55));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.dt th, table.dt td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.dt th {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted-2);
  background: rgba(255,255,255,0.02);
  position: sticky; top: 0;
  cursor: pointer;
  user-select: none;
}
table.dt th .sort-hint { opacity: 0.4; margin-left: 4px; font-size: 9px; }
table.dt th:hover .sort-hint { opacity: 1; }
table.dt tbody tr { transition: background .12s; }
table.dt tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
table.dt tbody tr:hover { background: rgba(139,92,246,0.07); }
table.dt td .mono { font-family: "JetBrains Mono", "SF Mono", Menlo, monospace; font-size: 12px; }
table.dt td strong { font-weight: 600; }

.sku-cell { display: flex; align-items: center; gap: 12px; }
.sku-img {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.1));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sku-cell .meta .name { font-weight: 600; }
.sku-cell .meta .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.price-cell .price { font-weight: 700; font-size: 14px; }
.price-cell .moq { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* ====== Badges ====== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge.b-new       { background: rgba(139,92,246,0.15); color: #C4B5FD; border-color: rgba(139,92,246,0.35); }
.badge.b-locked    { background: rgba(245,158,11,0.14); color: #FCD34D; border-color: rgba(245,158,11,0.35); }
.badge.b-confirmed { background: rgba(6,182,212,0.14);  color: #67E8F9; border-color: rgba(6,182,212,0.35); }
.badge.b-shipped   { background: rgba(59,130,246,0.14); color: #93C5FD; border-color: rgba(59,130,246,0.35); }
.badge.b-delivered { background: rgba(16,185,129,0.14); color: #6EE7B7; border-color: rgba(16,185,129,0.35); }
.badge.b-disputed  { background: rgba(236,72,153,0.14); color: #F9A8D4; border-color: rgba(236,72,153,0.35); }
.badge.b-closed    { background: rgba(255,255,255,0.06); color: var(--muted); border-color: var(--border-strong); }
.badge.b-open      { background: rgba(239,68,68,0.14);  color: #FCA5A5; border-color: rgba(239,68,68,0.35); }
.badge.b-resolved  { background: rgba(16,185,129,0.14); color: #6EE7B7; border-color: rgba(16,185,129,0.35); }
.badge.b-grade-new { background: rgba(139,92,246,0.15); color: #C4B5FD; border-color: rgba(139,92,246,0.35); }
.badge.b-grade-a   { background: rgba(16,185,129,0.14); color: #6EE7B7; border-color: rgba(16,185,129,0.35); }
.badge.b-grade-ab  { background: rgba(6,182,212,0.14);  color: #67E8F9; border-color: rgba(6,182,212,0.35); }
.badge.b-grade-b   { background: rgba(245,158,11,0.14); color: #FCD34D; border-color: rgba(245,158,11,0.35); }

.region {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}

.actions-cell { display: flex; gap: 6px; }
.actions-cell .icon-btn {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.actions-cell .icon-btn:hover { background: rgba(139,92,246,0.18); color: #fff; }
.actions-cell .icon-btn svg { width: 14px; height: 14px; }

/* ====== Pagination ====== */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; gap: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.pager .pages { display: flex; gap: 4px; }
.pager .pages button {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted); cursor: pointer; font-weight: 600;
}
.pager .pages button.on {
  background: var(--grad-2); color: #fff; border: 0;
}
.pager .pages button:hover { color: #fff; }

/* ====== Modal & Toast ====== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(5,4,12,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-bg.open { display: flex; }
.modal {
  width: 100%; max-width: 480px;
  background: linear-gradient(180deg, #14112A, #0B0917);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.8);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal .lock-summary {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.modal .lock-summary .row { display: flex; justify-content: space-between; padding: 4px 0; }
.modal .lock-summary .row .l { color: var(--muted); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(236,72,153,0.95));
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 14px 40px -8px rgba(139,92,246,0.5);
  animation: t-in .25s ease-out;
}
.toast.success { background: linear-gradient(135deg, #10B981, #059669); box-shadow: 0 14px 40px -8px rgba(16,185,129,0.5); }
.toast.warn { background: linear-gradient(135deg, #F59E0B, #DC2626); }
@keyframes t-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ====== Dispute cards ====== */
.dispute-list { display: flex; flex-direction: column; gap: 12px; }
.dispute {
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(20,17,42,0.55), rgba(11,9,23,0.55));
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}
.dispute .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dispute .id { font-weight: 700; font-size: 14px; }
.dispute .desc { color: var(--muted); font-size: 13px; margin-top: 6px; }
.dispute .res { font-size: 12px; color: var(--muted-2); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.dispute .meta-right { text-align: right; font-size: 12px; color: var(--muted-2); }

/* ====== Tabs ====== */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: #fff; }
.tab.on {
  color: #fff;
  border-bottom-color: var(--violet);
}
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* ====== Invoice ====== */
.invoice-toolbar {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-bottom: 18px;
}
.invoice-paper {
  background: #ffffff;
  color: #111;
  border-radius: 12px;
  padding: 48px 56px;
  max-width: 880px; margin: 0 auto;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.invoice-paper * { color: #111; }
.invoice-paper .inv-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 36px; padding-bottom: 22px; border-bottom: 2px solid #111;
}
.invoice-paper .brand .brand-row {
  display: flex; gap: 12px; align-items: center; font-size: 22px; font-weight: 700;
}
.invoice-paper .brand .brand-row .logo-mark-sq { box-shadow: none; }
.invoice-paper .brand .addr { font-size: 12px; color: #555; margin-top: 8px; line-height: 1.6; }
.invoice-paper .inv-meta { text-align: right; }
.invoice-paper .inv-meta h2 { font-size: 28px; letter-spacing: 2px; margin-bottom: 8px; }
.invoice-paper .inv-meta .kv { font-size: 12px; color: #555; margin: 3px 0; }
.invoice-paper .inv-meta .kv b { color: #111; }
.invoice-paper .bill-to {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px;
}
.invoice-paper .bill-to h4 {
  text-transform: uppercase; font-size: 11px; color: #888; letter-spacing: 1px; margin-bottom: 8px;
}
.invoice-paper .bill-to p { font-size: 13px; line-height: 1.6; }
.invoice-paper table.inv {
  width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 13px;
}
.invoice-paper table.inv th {
  background: #111; color: #fff; text-align: left;
  padding: 10px 12px; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase;
}
.invoice-paper table.inv th:last-child, .invoice-paper table.inv td:last-child { text-align: right; }
.invoice-paper table.inv td { padding: 12px; border-bottom: 1px solid #eee; }
.invoice-paper .totals {
  margin-left: auto; width: 320px; font-size: 13px;
}
.invoice-paper .totals .row { display: flex; justify-content: space-between; padding: 6px 0; }
.invoice-paper .totals .row.grand {
  margin-top: 8px; padding-top: 12px; border-top: 2px solid #111;
  font-size: 16px; font-weight: 700;
}
.invoice-paper .notes {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee;
  font-size: 11px; color: #666; line-height: 1.6;
}

@media print {
  body { background: #fff !important; }
  .topbar, .sidebar, .invoice-toolbar { display: none !important; }
  .app { grid-template-columns: 1fr !important; grid-template-rows: 0 1fr !important; }
  .main { padding: 0 !important; }
  .invoice-paper { box-shadow: none !important; border-radius: 0 !important; }
}

/* Range picker */
.range {
  display: flex; align-items: center; gap: 6px;
}
.range input { width: 50%; }
.range span { color: var(--muted-2); font-size: 12px; }

/* mini-bar */
.stock-bar {
  display: inline-block; width: 60px; height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden; vertical-align: middle;
  margin-right: 6px;
}
.stock-bar .fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #EC4899);
}
.stock-cell .count { font-weight: 600; font-size: 13px; }
.stock-cell .sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* small utilities */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-right { text-align: right; }
.mt-12 { margin-top: 12px; } .mt-18 { margin-top: 18px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-18 { margin-bottom: 18px; }

.empty-state {
  padding: 60px 20px; text-align: center; color: var(--muted);
}
.empty-state svg { opacity: 0.4; margin: 0 auto 12px; }

@media (max-width: 860px) {
  :root { --sidebar-w: 64px; }
  .side-link span:not(.badge) { display: none; }
  .side-section { display: none; }
  .side-link { justify-content: center; }
}
