:root{--bg: #eef3f1;--bg-pattern: radial-gradient(1200px 600px at 100% -10%, #dff0e8 0%, transparent 55%), radial-gradient(900px 500px at -10% 110%, #e3eef9 0%, transparent 50%);--surface: #ffffff;--surface-2: #f6faf8;--surface-3: #eef4f1;--border: #e4ebe7;--border-strong: #d4ded9;--text: #0f1c18;--text-2: #586862;--text-3: #8a9a93;--accent: #11a06d;--accent-2: #0b8a5c;--accent-ink: #ffffff;--accent-soft: #e2f5ec;--accent-grad: linear-gradient(135deg, #14b27a, #0c8f5e);--ok: #11a06d;--ok-soft: #e2f5ec;--warn: #c17d11;--warn-soft: #faf0d7;--danger: #df474d;--danger-soft: #fcebec;--info: #2f74d0;--info-soft: #e7effb;--ring: rgba(17, 160, 109, .32);--shadow-sm: 0 1px 2px rgba(16, 40, 33, .06);--shadow: 0 8px 24px rgba(16, 40, 33, .08);--shadow-lg: 0 24px 60px rgba(16, 40, 33, .16);--radius: 16px;--radius-sm: 10px;--radius-lg: 22px;color-scheme:light}[data-theme=dark]{--bg: #0b1210;--bg-pattern: radial-gradient(1200px 600px at 100% -10%, #11271f 0%, transparent 55%), radial-gradient(900px 500px at -10% 110%, #11202c 0%, transparent 50%);--surface: #121b18;--surface-2: #16211d;--surface-3: #1c2823;--border: #243029;--border-strong: #30403795;--text: #e9f2ed;--text-2: #9fb3ab;--text-3: #6d837b;--accent: #2bd693;--accent-2: #36e0a0;--accent-ink: #06231a;--accent-soft: #11271f;--accent-grad: linear-gradient(135deg, #25cf8c, #18b478);--ok: #2bd693;--ok-soft: #11271f;--warn: #e0a23a;--warn-soft: #2a2113;--danger: #ff6b70;--danger-soft: #2c1718;--info: #6aa6f5;--info-soft: #142234;--ring: rgba(43, 214, 147, .4);--shadow-sm: none;--shadow: 0 10px 30px rgba(0, 0, 0, .4);--shadow-lg: 0 28px 70px rgba(0, 0, 0, .55);color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);background-image:var(--bg-pattern);background-attachment:fixed;color:var(--text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;transition:background-color .25s ease,color .25s ease}h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.01em}a{color:var(--accent-2)}::selection{background:var(--accent-soft)}button{font:inherit;cursor:pointer;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);padding:9px 14px;border-radius:var(--radius-sm);transition:transform .06s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease}button:hover{border-color:var(--accent);color:var(--accent-2)}button:active{transform:translateY(1px)}button:disabled{opacity:.55;cursor:not-allowed;transform:none}button.primary{background:var(--accent-grad);border:none;color:var(--accent-ink);font-weight:700;box-shadow:0 6px 16px -6px var(--accent)}button.primary:hover{color:var(--accent-ink);filter:brightness(1.05)}button.danger{border-color:transparent;background:var(--danger-soft);color:var(--danger);font-weight:600}button.danger:hover{border-color:var(--danger);color:var(--danger)}button.ghost{background:transparent;border-color:transparent;color:var(--text-2)}button.ghost:hover{background:var(--surface-3);color:var(--text)}button.ghost.danger-text{color:var(--danger)}button.btn-sm{padding:5px 10px;font-size:12.5px;border-radius:8px}.icon-button{display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border-radius:11px;background:var(--surface-2)}.icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}input,select,textarea{font:inherit;width:100%;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:9px 12px;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}input::placeholder,textarea::placeholder{color:var(--text-3)}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}textarea{resize:vertical;min-height:64px}label{display:grid;gap:6px;font-size:12.5px;font-weight:600;color:var(--text-2)}label.checkbox{grid-auto-flow:column;justify-content:start;align-items:center;gap:10px}label.checkbox input{width:18px;height:18px;accent-color:var(--accent)}.login-page{min-height:100%;display:grid;place-items:center;padding:24px}.login-panel{width:min(400px,92vw);display:grid;gap:16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:30px;box-shadow:var(--shadow-lg)}.login-panel h1{font-size:26px;background:var(--accent-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.login-panel p{margin:6px 0 0;color:var(--text-2);font-size:13px}.password-field{position:relative;display:block}.password-field input{padding-right:46px}.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:none;background:transparent}.password-toggle:hover{background:var(--surface-3)}.app-shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh;min-height:100dvh}.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:6px;padding:20px 16px;background:var(--surface);border-right:1px solid var(--border)}.brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:17px;letter-spacing:-.02em;padding:6px 8px 16px}.brand-mark{width:34px;height:34px;border-radius:11px;background:var(--accent-grad);display:grid;place-items:center;color:#fff;box-shadow:0 8px 18px -8px var(--accent);flex:none}.brand-mark svg{width:19px;height:19px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.nav{display:grid;gap:3px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:none;background:transparent;color:var(--text-2);padding:10px 12px;border-radius:11px;font-weight:600}.nav-item:hover{background:var(--surface-3);color:var(--text)}.nav-item.active{background:var(--accent-soft);color:var(--accent-2)}.nav-item svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}.nav-item .nav-count{margin-left:auto;font-size:11.5px;font-weight:700;background:var(--surface-3);color:var(--text-2);padding:1px 8px;border-radius:999px}.nav-item.active .nav-count{background:var(--accent);color:var(--accent-ink)}.sidebar-spacer{flex:1}.sidebar-logout{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600}.sidebar-logout svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.workspace{min-width:0;padding:22px max(26px,env(safe-area-inset-right)) max(60px,env(safe-area-inset-bottom)) max(26px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:18px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px}.topbar h1{font-size:22px}.topbar .subtitle{margin:3px 0 0;color:var(--text-2);font-size:12.5px}.topbar-actions{display:flex;align-items:center;gap:9px}.theme-toggle svg{stroke:currentColor}.refresh-btn{display:inline-flex;align-items:center;gap:8px;font-weight:600}.refresh-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.refresh-btn.is-loading svg{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.panel,.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.panel{overflow:hidden;min-width:0}.card{padding:18px;display:flex;flex-direction:column;gap:14px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.card-head h2,.card-head h3{font-size:15px}.card-head .hint{font-size:11.5px;color:var(--text-3);font-weight:600}.section-head{padding:16px 18px 0}.section-head h2{font-size:16px}.section-head p{margin:4px 0 0;color:var(--text-2);font-size:12.5px}.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.kpi{position:relative;overflow:hidden;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 16px 14px;box-shadow:var(--shadow-sm);display:grid;gap:8px;transition:transform .15s ease,box-shadow .15s ease}.kpi:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.kpi-top{display:flex;align-items:center;gap:10px}.kpi-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-2);flex:none}.kpi-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.kpi-ico.amber{background:var(--warn-soft);color:var(--warn)}.kpi-ico.blue{background:var(--info-soft);color:var(--info)}.kpi-ico.red{background:var(--danger-soft);color:var(--danger)}.kpi-label{font-size:12px;font-weight:600;color:var(--text-2)}.kpi-value{font-size:26px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}.kpi-sub{font-size:11.5px;color:var(--text-3);font-weight:600}.kpi-sub.warn{color:var(--warn)}.dash-grid{display:grid;grid-template-columns:1.55fr 1fr;gap:16px;align-items:start}.dash-grid.secondary{grid-template-columns:1fr 1fr 1fr}.chart{width:100%;height:200px;display:block}.chart .bar{fill:var(--accent);opacity:.85;transition:opacity .15s ease;cursor:default}.chart .bar:hover{opacity:1}.chart .bar-bg{fill:var(--surface-3)}.chart .axis{fill:var(--text-3);font-size:9px;font-weight:600}.chart .grid-line{stroke:var(--border);stroke-dasharray:3 4}.donut-wrap{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.donut{width:132px;height:132px;flex:none}.donut .track{fill:none;stroke:var(--surface-3)}.donut .seg-fk{fill:none;stroke:var(--accent);stroke-linecap:round;transition:stroke-dasharray .5s ease}.donut .seg-st{fill:none;stroke:var(--info);stroke-linecap:round;transition:stroke-dasharray .5s ease}.donut-center{font-weight:800;fill:var(--text);font-size:15px;text-anchor:middle}.donut-center-sub{fill:var(--text-3);font-size:7.5px;text-anchor:middle;font-weight:600}.legend{display:grid;gap:9px;font-size:12.5px}.legend-row{display:flex;align-items:center;gap:8px}.dot{width:10px;height:10px;border-radius:3px;flex:none}.dot.fk{background:var(--accent)}.dot.st{background:var(--info)}.legend-row b{margin-left:auto;font-variant-numeric:tabular-nums}.hbar-list{display:grid;gap:12px}.hbar{display:grid;gap:5px}.hbar-top{display:flex;justify-content:space-between;font-size:12.5px;font-weight:600}.hbar-top span:last-child{color:var(--text-2);font-variant-numeric:tabular-nums}.hbar-track{height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden}.hbar-fill{height:100%;border-radius:999px;background:var(--accent-grad);transition:width .5s ease}.feed{display:grid;gap:2px}.feed-row{display:flex;align-items:center;gap:12px;padding:10px 6px;border-radius:10px;border-bottom:1px solid var(--border)}.feed-row:last-child{border-bottom:none}.feed-row:hover{background:var(--surface-2)}.feed-main{display:grid;gap:2px;min-width:0}.feed-main strong{font-size:13px}.feed-main small{color:var(--text-3);font-size:11.5px}.feed-row .feed-amount{margin-left:auto;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.search{position:relative;flex:1;min-width:200px}.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;fill:none;stroke:var(--text-3);stroke-width:2;stroke-linecap:round;pointer-events:none}.search input{padding-left:36px;border-radius:999px;background:var(--surface)}.chips{display:flex;gap:7px;flex-wrap:wrap}.chip{border:1px solid var(--border-strong);background:var(--surface);color:var(--text-2);padding:6px 13px;border-radius:999px;font-size:12.5px;font-weight:600}.chip:hover{border-color:var(--accent);color:var(--text)}.chip.is-active{background:var(--accent-soft);border-color:transparent;color:var(--accent-2)}.new-item-btn{margin-left:auto;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.new-item-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}table{width:100%;border-collapse:collapse}thead th{text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3);font-weight:700;padding:13px 16px;border-bottom:1px solid var(--border);white-space:nowrap}thead th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}thead th.sortable:hover{color:var(--accent-2)}tbody td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}tbody tr:last-child td{border-bottom:none}tbody tr{transition:background .12s ease}tbody tr:hover{background:var(--surface-2)}td strong{display:block;font-weight:600}td small{display:block;color:var(--text-3);font-size:11.5px;margin-top:2px}td code{font-family:SF Mono,ui-monospace,JetBrains Mono,Menlo,monospace;font-size:12px;background:var(--surface-3);padding:2px 7px;border-radius:6px}td.actions{text-align:right}.actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.row-click{cursor:pointer}.expand-row td{background:var(--surface-2);padding:0}.expand-inner{padding:12px 16px 16px;display:grid;gap:8px}.line-item{display:flex;align-items:center;gap:10px;font-size:12.5px;padding:7px 10px;background:var(--surface);border:1px solid var(--border);border-radius:9px}.line-item .li-amount{margin-left:auto;font-weight:600}.status{display:inline-flex;align-items:center;gap:5px;min-width:64px;justify-content:center;border-radius:999px;padding:4px 10px;background:var(--surface-3);color:var(--text-2);font-size:11.5px;font-weight:700;white-space:nowrap}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status-available,.status-paid,.status-fulfilled{background:var(--ok-soft);color:var(--ok)}.status-pending,.status-reserved{background:var(--warn-soft);color:var(--warn)}.status-failed,.status-canceled,.status-expired,.status-disabled,.status-refunded{background:var(--danger-soft);color:var(--danger)}.status-draft,.status-none{background:var(--surface-3);color:var(--text-3)}.stock-badge{display:inline-flex;align-items:baseline;gap:4px;font-weight:700;font-variant-numeric:tabular-nums}.stock-badge small{display:inline;margin:0;font-weight:600}.stock-pill{display:inline-block;padding:2px 9px;border-radius:999px;font-weight:700;font-size:12px;background:var(--ok-soft);color:var(--ok)}.stock-pill.low{background:var(--warn-soft);color:var(--warn)}.stock-pill.out{background:var(--danger-soft);color:var(--danger)}.method-tag{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;color:var(--text-2)}.method-tag.stars{color:var(--info)}.split{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}.split.wide{grid-template-columns:minmax(0,1.25fr) 440px}.form-column{display:flex;flex-direction:column;gap:16px;min-width:0}.form-panel{display:grid;gap:13px;padding:18px}.form-panel h2{font-size:16px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.button-row{display:flex;gap:9px;flex-wrap:wrap}.generated-qr-info{display:grid;gap:3px;background:var(--accent-soft);border:1px dashed color-mix(in srgb,var(--accent) 40%,transparent);border-radius:var(--radius-sm);padding:11px 13px;font-size:12px}.generated-qr-info strong{color:var(--accent-2)}.generated-qr-info span{color:var(--text-2)}.codes-panel{padding:18px}.codes-panel h2{font-size:15px;margin-bottom:12px}.codes-add{display:grid;gap:12px;margin-bottom:16px}.code-entry-list{display:grid;gap:12px}.code-entry-card{display:grid;gap:10px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:13px}.code-entry-header{display:flex;align-items:center;justify-content:space-between}.code-entry-header strong{font-size:12.5px;color:var(--text-2)}.code-entry-activation textarea{font-family:SF Mono,ui-monospace,Menlo,monospace;font-size:12.5px}.code-purchase-meta{display:grid;gap:2px}.code-purchase-meta small{display:block;color:var(--text-3);font-size:11px}.error{border-radius:var(--radius-sm);padding:9px 13px;background:var(--danger-soft);color:var(--danger);font-size:12.5px;font-weight:600}.success{border-radius:var(--radius-sm);padding:9px 13px;background:var(--ok-soft);color:var(--ok);font-size:12.5px;font-weight:600}.empty{display:grid;gap:6px;justify-items:center;text-align:center;padding:44px 20px;color:var(--text-3)}.empty svg{width:40px;height:40px;fill:none;stroke:currentColor;stroke-width:1.5;opacity:.6}.toast-stack{position:fixed;right:18px;bottom:18px;display:grid;gap:10px;z-index:60}.toast{display:flex;align-items:center;gap:10px;min-width:240px;max-width:360px;padding:12px 14px;border-radius:12px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-lg);font-size:13px;font-weight:600;animation:toast-in .25s cubic-bezier(.22,1,.36,1)}.toast .toast-ico{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;flex:none;color:#fff}.toast.ok .toast-ico{background:var(--accent)}.toast.err .toast-ico{background:var(--danger)}.toast .toast-ico svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}@keyframes toast-in{0%{opacity:0;transform:translateY(12px) scale(.96)}}.skeleton{border-radius:var(--radius-sm);background:linear-gradient(100deg,var(--surface-3) 30%,var(--surface-2) 50%,var(--surface-3) 70%);background-size:200% 100%;animation:shimmer 1.3s infinite}@keyframes shimmer{to{background-position:-200% 0}}.copy-btn{border:none;background:transparent;padding:2px 6px;color:var(--text-3);border-radius:6px}.copy-btn:hover{background:var(--surface-3);color:var(--accent-2)}.view-enter{animation:view-in .28s ease}@keyframes view-in{0%{opacity:0;transform:translateY(6px)}}@media(max-width:1080px){.dash-grid,.dash-grid.secondary,.split,.split.wide{grid-template-columns:1fr}}@media(max-width:860px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;flex-direction:row;align-items:center;overflow-x:auto;border-right:none;border-bottom:1px solid var(--border);padding:12px}.brand{padding:0 8px 0 0}.brand-text{display:none}.nav{grid-auto-flow:column;gap:4px}.nav-item span.nav-label,.nav-item .nav-count,.sidebar-spacer{display:none}.sidebar-logout{margin-left:auto}.workspace{padding:16px 14px 50px}thead{display:none}table,tbody,tr,td{display:block;width:100%}tbody tr{border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:10px;padding:6px 4px}tbody td{border:none;display:flex;justify-content:space-between;gap:16px;padding:7px 12px}tbody td:before{content:attr(data-label);font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-3)}td.actions{justify-content:flex-end}}@media(max-width:860px){.sidebar{gap:4px;padding-top:max(12px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));-webkit-overflow-scrolling:touch}.nav-item{min-height:44px}.workspace{padding-top:max(14px,env(safe-area-inset-top));gap:14px}input,select,textarea{font-size:16px}.topbar{flex-wrap:wrap;gap:10px}.topbar h1{font-size:20px}.icon-button{width:44px;height:44px}.refresh-btn{min-height:44px}.search{min-width:100%}.search input{min-height:44px}.new-item-btn{margin-left:0;width:100%;justify-content:center;min-height:46px}.donut-wrap{justify-content:center}}@media(max-width:520px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi{padding:13px 13px 12px}.kpi-value{font-size:22px}.card,.form-panel,.codes-panel{padding:14px}.dash-grid,.dash-grid.secondary{gap:12px}.grid3{grid-template-columns:1fr}.code-entry-card{padding:11px}.toast-stack{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom))}.toast{min-width:0;max-width:none}}@media(max-width:380px){.kpis{grid-template-columns:1fr}}
