/* UPTECH Smart Shop premium glass theme — tokens + reusable components */
:root {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --radius: 16px; --radius-sm: 10px; --radius-xs: 8px;
  --accent: #6366f1; --accent-2: #8b5cf6; --accent-3: #06b6d4;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #06b6d4 120%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.18) 55%, rgba(6,182,212,.2));
  --success: #22c55e; --warning: #f59e0b; --danger: #ef4444; --info: #38bdf8;
  --ease: cubic-bezier(.2,.8,.2,1);
}
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f1a; --bg-2: #0f1527;
  --blob-1: rgba(99,102,241,.32); --blob-2: rgba(6,182,212,.22); --blob-3: rgba(236,72,153,.16);
  --surface: rgba(255,255,255,.045); --surface-2: rgba(255,255,255,.07); --surface-3: rgba(255,255,255,.11);
  --border: rgba(255,255,255,.08); --border-2: rgba(255,255,255,.14);
  --text: #e8ecf5; --text-2: #aab3c8; --muted: #7c869f;
  --shadow: 0 10px 30px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06) inset;
  --shadow-sm: 0 4px 14px rgba(0,0,0,.28);
  --gloss: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 50%);
  --sidebar: rgba(10,14,26,.6); --input-bg: rgba(0,0,0,.25);
  --grid: rgba(255,255,255,.07);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f8; --bg-2: #f6f7fb;
  --blob-1: rgba(99,102,241,.22); --blob-2: rgba(6,182,212,.18); --blob-3: rgba(236,72,153,.12);
  --surface: rgba(255,255,255,.72); --surface-2: rgba(255,255,255,.9); --surface-3: rgba(255,255,255,1);
  --border: rgba(15,23,42,.08); --border-2: rgba(15,23,42,.14);
  --text: #0f172a; --text-2: #475569; --muted: #64748b;
  --shadow: 0 10px 30px rgba(15,23,42,.08), 0 1px 0 rgba(255,255,255,.8) inset;
  --shadow-sm: 0 4px 14px rgba(15,23,42,.06);
  --gloss: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 60%);
  --sidebar: rgba(255,255,255,.55); --input-bg: rgba(255,255,255,.8);
  --grid: rgba(15,23,42,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(900px 600px at 8% -10%, var(--blob-1), transparent 60%),
  radial-gradient(800px 500px at 100% 20%, var(--blob-2), transparent 60%),
  radial-gradient(700px 500px at 60% 110%, var(--blob-3), transparent 60%), var(--bg); }
a { color: var(--accent-3); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0; } .muted { color: var(--muted); } .text-2 { color: var(--text-2); }
.mono { font-family: var(--mono); } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .gap-sm { gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }

/* glass surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(140%); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: var(--gloss); pointer-events: none; opacity: .6; }
.card > * { position: relative; }
.card-body { padding: 18px; } .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { font-size: 15px; } .card-head .muted { font-size: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); user-select: none; }
.btn:hover { background: var(--surface-3); transform: translateY(-1px); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.14); }
.btn:active { transform: translateY(0) scale(.98); } .btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 10px 24px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-success { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(34,197,94,.3), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-success:hover { background: linear-gradient(135deg,#16a34a,#22c55e); filter: brightness(1.08); }
.btn-danger { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(239,68,68,.3), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-danger:hover { background: linear-gradient(135deg,#dc2626,#ef4444); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; } .btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-outline { background: transparent; } .btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; } .btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 13px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.btn-icon:hover { background: var(--surface-2); color: var(--text); } .btn-icon.danger:hover { color: var(--danger); }
.btn .ico, .btn-icon .ico { width: 18px; height: 18px; } .btn-sm .ico { width: 15px; height: 15px; }
.ico { display: inline-flex; width: 20px; height: 20px; flex: none; } .ico svg { width: 100%; height: 100%; }

/* inputs */
.input { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text); font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.25); } .input::placeholder { color: var(--muted); }
.input-sm { height: 32px; font-size: 13px; padding: 0 10px; border-radius: 8px; } .input-lg { height: 46px; font-size: 16px; border-radius: 12px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select.input option { background: var(--bg-2); color: var(--text); }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; } .field label { font-size: 12.5px; font-weight: 550; color: var(--text-2); } .field label i { color: var(--danger); font-style: normal; } .field small { font-size: 11.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; } .form-grid .full { grid-column: 1 / -1; }
.search { position: relative; } .search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; } .search .input { padding-left: 38px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; height: 38px; } .switch input { display: none; }
.switch .slider { width: 42px; height: 24px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: background .2s; }
.switch .slider::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s var(--ease); }
.switch input:checked + .slider { background: var(--grad); border-color: transparent; } .switch input:checked + .slider::after { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 550; padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.active, .seg button:hover { background: var(--surface-3); color: var(--text); } .seg button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35); }

/* badges */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge.success { background: rgba(34,197,94,.16); color: #4ade80; border-color: rgba(34,197,94,.3); } .badge.warning { background: rgba(245,158,11,.16); color: #fbbf24; border-color: rgba(245,158,11,.3); }
.badge.danger { background: rgba(239,68,68,.16); color: #f87171; border-color: rgba(239,68,68,.3); } .badge.info { background: rgba(56,189,248,.16); color: #7dd3fc; border-color: rgba(56,189,248,.3); }
.badge.accent { background: rgba(99,102,241,.18); color: #a5b4fc; border-color: rgba(99,102,241,.35); }
:root[data-theme="light"] .badge.success { color: #15803d; } :root[data-theme="light"] .badge.warning { color: #b45309; } :root[data-theme="light"] .badge.danger { color: #b91c1c; } :root[data-theme="light"] .badge.info { color: #0369a1; } :root[data-theme="light"] .badge.accent { color: #4338ca; }

/* tables */
.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 11px 12px; background: var(--surface-2); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th.sortable { cursor: pointer; } .table th.sortable:hover { color: var(--text); } .sort-ind { margin-left: 5px; font-size: 9px; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; } .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; } .table tbody tr:hover { background: var(--surface-2); } .table tr.clickable { cursor: pointer; }
.table td.right, .table th.right { text-align: right; } .table td.empty { text-align: center; padding: 40px; color: var(--muted); }
.table tfoot td { font-weight: 650; background: var(--surface-2); }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px 0; font-size: 12.5px; } .pager { display: flex; align-items: center; gap: 8px; }
.table .row-actions { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .15s; } .table tr:hover .row-actions { opacity: 1; }
.cell-main { font-weight: 550; } .cell-sub { font-size: 12px; color: var(--muted); }

/* stat cards */
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(18px); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0; background: var(--gloss); opacity: .5; pointer-events: none; }
.stat::after { content: ""; position: absolute; width: 140px; height: 140px; right: -40px; top: -60px; border-radius: 50%; background: var(--stat-glow); filter: blur(30px); opacity: .55; }
.stat-indigo { --stat-glow: #6366f1; } .stat-cyan { --stat-glow: #06b6d4; } .stat-green { --stat-glow: #22c55e; } .stat-amber { --stat-glow: #f59e0b; } .stat-pink { --stat-glow: #ec4899; } .stat-red { --stat-glow: #ef4444; }
.stat-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--stat-glow), color-mix(in srgb, var(--stat-glow) 55%, #fff 0%)); box-shadow: 0 8px 18px color-mix(in srgb, var(--stat-glow) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35); position: relative; }
.stat-ico .ico { width: 22px; height: 22px; } .stat-body { position: relative; min-width: 0; } .stat-label { font-size: 12px; color: var(--muted); font-weight: 550; letter-spacing: .02em; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; } .stat-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-delta { position: absolute; top: 12px; right: 14px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); } .stat-delta.up { color: var(--success); } .stat-delta.down { color: var(--danger); }
.hbars { display: flex; flex-direction: column; gap: 8px; } .hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; } .hbar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar-track { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; } .hbar-track i { display: block; height: 100%; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); transition: width .4s var(--ease); } .hbar-val { font-weight: 650; white-space: nowrap; min-width: 48px; text-align: right; }

/* toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 5000; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-2); backdrop-filter: blur(16px); box-shadow: var(--shadow); color: var(--text); font-weight: 500; transform: translateX(30px); opacity: 0; transition: all .25s var(--ease); max-width: 380px; }
.toast.show { transform: none; opacity: 1; } .toast .ico { width: 18px; height: 18px; } .toast-success .ico { color: var(--success); } .toast-error .ico { color: var(--danger); } .toast-info .ico { color: var(--info); }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5,8,16,.55); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; padding: 20px; }
.modal-backdrop.show { opacity: 1; } .modal-backdrop.show .modal { transform: none; opacity: 1; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: translateY(14px) scale(.98); opacity: 0; transition: all .25s var(--ease); overflow: hidden; }
.modal::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .35; pointer-events: none; }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1080px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; position: relative; } .modal-head h3 { font-size: 17px; }
.modal-body { padding: 10px 22px 18px; overflow: auto; position: relative; } .modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); position: relative; background: var(--surface); }

/* misc */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); } .empty-state .ico { width: 42px; height: 42px; margin-bottom: 10px; opacity: .6; } .empty-state h3 { color: var(--text-2); margin-bottom: 4px; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-2); color: var(--text-2); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: var(--grad); flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chart { width: 100%; height: auto; display: block; } .chart .grid { stroke: var(--grid); stroke-dasharray: 3 4; } .chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); } .chart-h .axis.lbl { font-size: 12px; fill: var(--text-2); } .chart .dot { opacity: 0; transition: opacity .2s; } .chart:hover .dot { opacity: 1; } .chart .bar { transition: opacity .2s; } .chart .bar:hover { opacity: .8; } .donut-center { fill: var(--text); font-weight: 700; font-size: 18px; font-family: var(--font); }
.divider { height: 1px; background: var(--border); margin: 8px 0; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 13px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; } .alert .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-info { background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.3); } .alert-warn { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); } .alert-danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.35); } .alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.35); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; } .step { display: flex; gap: 12px; align-items: flex-start; } .step::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.step > div > b { display: block; margin-bottom: 2px; } .step p { font-size: 13px; color: var(--text-2); } .step p b { color: var(--text); }
pre.code { font-family: var(--mono); font-size: 12px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; max-height: 240px; overflow: auto; margin: 0; white-space: pre; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } } .spin { animation: spin 1s linear infinite; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; } .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font: inherit; font-weight: 550; padding: 10px 14px; cursor: pointer; margin-bottom: -1px; transition: color .2s, border-color .2s; } .tabs button.active { color: var(--text); border-color: var(--accent); } .tabs button:hover { color: var(--text); }
.range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .range label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); } .range .input { width: 150px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; }
