/* Pest Control Empire Developer Portal - design system */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/vendor/fonts/inter-latin-wght.woff2") format("woff2");
}
:root {
  --bg: #0a0d0c; --bg-2: #0d1110; --surface: #121715; --surface-2: #171d1a; --surface-3: #1d2521;
  --line: #222b27; --line-2: #2c3732; --text: #e9eeeb; --text-2: #b9c4be; --muted: #84928b; --faint: #5d6b64;
  --green: #2f9a62; --green-2: #3cb574; --green-ink: #e9fbf1; --green-soft: rgba(47, 154, 98, .13); --green-line: rgba(60, 181, 116, .35);
  --amber: #e2a336; --amber-soft: rgba(226, 163, 54, .13); --red: #e5584f; --red-soft: rgba(229, 88, 79, .13);
  --blue: #4d9be6; --blue-soft: rgba(77, 155, 230, .13); --violet: #9b7ce8; --violet-soft: rgba(155, 124, 232, .14);
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.25);
  --sidebar: 264px; --topbar: 64px; --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(1200px 600px at 85% -10%, rgba(47,154,98,.07), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(47,154,98,.05), transparent 60%), var(--bg); }
a { color: var(--green-2); text-decoration: none; }
a:hover { color: #59cf8d; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; }
code, pre, .mono { font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; font-size: .86em; }
code { background: var(--surface-3); border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 6px; color: var(--text-2); }
pre { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); padding: .8rem; border-radius: var(--radius-sm); max-height: 22rem; overflow: auto; margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.ic { width: 18px; height: 18px; flex: none; stroke-width: 1.9; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; } .ic-lg { width: 24px; height: 24px; } .ic-xl { width: 34px; height: 34px; stroke-width: 1.6; }
.muted { color: var(--muted); } .faint { color: var(--faint); } small, .small { font-size: .84rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(60,181,116,.35); }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, #0f1412, #0b0f0d);
  border-right: 1px solid var(--line); padding: 18px 14px 20px; display: flex; flex-direction: column; gap: 6px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2c8f5b, #17543a); box-shadow: 0 6px 18px rgba(47,154,98,.25), inset 0 1px 0 rgba(255,255,255,.15); }
.brand-mark img { width: 24px; height: 24px; }
.brand-name { font-weight: 700; font-size: .98rem; line-height: 1.15; }
.brand-name span { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.nav-section { margin-top: 12px; }
.nav-title { font-size: .7rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 0 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 520; font-size: .93rem; transition: background .15s var(--ease), color .15s var(--ease); position: relative; }
.nav-link .ic { color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:hover .ic { color: var(--text-2); }
.nav-link.active { background: linear-gradient(90deg, var(--green-soft), rgba(47,154,98,.04)); color: #f2fbf6; }
.nav-link.active .ic { color: var(--green-2); }
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green-2); }
.nav-count { margin-left: auto; font-size: .72rem; font-weight: 650; min-width: 22px; text-align: center; padding: 1px 7px;
  border-radius: 99px; background: var(--amber-soft); color: var(--amber); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--faint); }
.sidebar-foot .env { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 3px rgba(60,181,116,.18); flex: none; }
.dot.off { background: var(--faint); box-shadow: none; } .dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(226,163,54,.18); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(10,13,12,.78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--text-2); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); } .crumbs .ic { width: 14px; color: var(--faint); }
.crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.project-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: .82rem; color: var(--text-2); white-space: nowrap; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, color .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn .pip { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red);
  color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.menu-toggle { display: none; }
details.pop { position: relative; }
details.pop > summary { list-style: none; } details.pop > summary::-webkit-details-marker { display: none; }
.pop-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.5); padding: 8px; z-index: 50; animation: pop .14s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; font-weight: 600; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; color: var(--text-2); font-size: .88rem; }
.notif:hover { background: var(--surface-2); color: var(--text); }
.notif .ic { color: var(--green-2); margin-top: 2px; }
.notif.unread { background: rgba(47,154,98,.06); }
.notif time { display: block; color: var(--faint); font-size: .76rem; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.user-chip:hover { background: var(--surface-2); border-color: var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--green-ink);
  background: linear-gradient(145deg, #2f8f5b, #1d5a3d); flex: none; letter-spacing: .02em; }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: .68rem; }
.user-chip .who { line-height: 1.15; } .user-chip .who b { display: block; font-size: .88rem; } .user-chip .who span { font-size: .74rem; color: var(--muted); }
.content { padding: 28px 32px 48px; width: 100%; max-width: 1560px; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
footer.foot { color: var(--faint); font-size: .8rem; padding: 18px 32px 26px; text-align: center; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; color: var(--green-ink);
  background: linear-gradient(180deg, #34a56a, #278552); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px rgba(47,154,98,.18);
  transition: transform .12s var(--ease), box-shadow .15s, background .15s, border-color .15s, color .15s; }
.btn:hover { color: #fff; background: linear-gradient(180deg, #3bb675, #2a8f59); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 22px rgba(47,154,98,.28); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.secondary:hover { background: var(--surface-3); border-color: #3a4842; }
.btn.ghost { background: transparent; color: var(--text-2); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.danger { background: linear-gradient(180deg, #d9534a, #b9433b); box-shadow: 0 6px 16px rgba(229,88,79,.16); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: .96rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
button.linkish { background: none; border: 0; color: var(--green-2); font: inherit; cursor: pointer; padding: 0; }
.form { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label, .label { font-weight: 600; font-size: .86rem; color: var(--text-2); }
.field .req { color: var(--green-2); margin-left: 2px; }
.help { font-size: .8rem; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: .92rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: #384640; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(60,181,116,.18); background: #0e1311; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2384928b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; }
.toggle-group { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.toggle-group a, .toggle-group label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: .85rem; font-weight: 550; cursor: pointer; }
.toggle-group a.on, .toggle-group input:checked + span { background: var(--surface-3); color: var(--text); }
.yesno { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.yesno label { position: relative; }
.yesno input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.yesno span { display: block; padding: 6px 16px; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 550; }
.yesno input:checked + span { background: var(--green-soft); color: var(--green-2); }
.yesno input:focus-visible + span { outline: 2px solid var(--green-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text-2); font-size: .88rem; font-weight: 550; transition: all .15s; }
.chip-radio input:hover + span { border-color: #3a4842; color: var(--text); }
.chip-radio input:checked + span { border-color: var(--green-line); background: var(--green-soft); color: #cdf3dd; }
.chip-radio input:focus-visible + span { outline: 2px solid var(--green-2); outline-offset: 2px; }

/* ---------------------------------------------------------------- cards, badges, tables */
.card { background: linear-gradient(180deg, var(--surface), #101412); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { display: flex; align-items: center; gap: 9px; font-size: 1rem; }
.card-head h2 .ic { color: var(--green-2); }
.card-body { padding: 18px 20px; }
.stack { display: grid; gap: 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: .74rem; font-weight: 650;
  letter-spacing: .01em; white-space: nowrap; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; }
.badge .ic { width: 13px; height: 13px; }
.tone-green { background: var(--green-soft); color: #63d396; border-color: rgba(60,181,116,.2); }
.tone-amber { background: var(--amber-soft); color: #f0bd5e; border-color: rgba(226,163,54,.22); }
.tone-red { background: var(--red-soft); color: #f2867f; border-color: rgba(229,88,79,.22); }
.tone-blue { background: var(--blue-soft); color: #7db8f0; border-color: rgba(77,155,230,.22); }
.tone-violet { background: var(--violet-soft); color: #b9a2f2; border-color: rgba(155,124,232,.24); }
.tone-gray { background: var(--surface-3); color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255,255,255,.018); }
.table td.title-cell { color: var(--text); font-weight: 600; }
.row-thumb { width: 52px; height: 38px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; flex: none; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-flex { display: flex; align-items: center; gap: 12px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; stroke-width: 1.5; }
.empty h3 { color: var(--text-2); margin-bottom: 6px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 520;
  border: 1px solid var(--line-2); background: var(--surface-2); }
.flash.ok { border-color: rgba(60,181,116,.35); background: var(--green-soft); color: #9de6bd; }
.flash.error { border-color: rgba(229,88,79,.35); background: var(--red-soft); color: #f4a29c; }
.error-text { color: #f2867f; }
.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 10px 18px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- dashboard */
.hello { font-size: 1.85rem; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { position: relative; padding: 18px 18px 16px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), #101412);
  border: 1px solid var(--line); color: var(--text); overflow: hidden; transition: border-color .18s, transform .18s var(--ease); }
.stat:hover { border-color: var(--line-2); transform: translateY(-2px); color: var(--text); }
.stat .stat-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; }
.stat b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 520; }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: currentColor; opacity: .025; }
.quick { display: grid; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font-weight: 560; transition: border-color .15s, background .15s; }
.quick a:hover { border-color: var(--green-line); background: var(--green-soft); }
.quick a .ic:first-child { width: 34px; height: 34px; padding: 8px; border-radius: 9px; background: var(--surface-3); color: var(--green-2); }
.quick a .ic:last-child { margin-left: auto; color: var(--faint); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .fi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.feed .ft { font-size: .88rem; color: var(--text-2); line-height: 1.45; }
.feed .ft a { color: var(--text); font-weight: 600; }
.feed time { display: block; font-size: .76rem; color: var(--faint); margin-top: 2px; }

/* ---------------------------------------------------------------- asset cards */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.acard { display: flex; flex-direction: column; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), #101412);
  border: 1px solid var(--line); overflow: hidden; color: var(--text); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.acard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 40px rgba(0,0,0,.35); color: var(--text); }
.acard-media { position: relative; aspect-ratio: 16 / 11; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.acard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.acard:hover .acard-media img { transform: scale(1.04); }
.acard-media .badge { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(8px); background: rgba(10,13,12,.72); }
.acard-media .ver { position: absolute; right: 10px; top: 10px; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 7px;
  background: rgba(10,13,12,.72); color: var(--text-2); backdrop-filter: blur(8px); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; }
.ph .ic { width: 46px; height: 46px; stroke-width: 1.4; opacity: .85; }
.acard-body { padding: 14px 16px 6px; flex: 1; }
.acard-cat { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); font-weight: 560; margin-bottom: 6px; }
.acard-cat .ic { width: 14px; height: 14px; }
.acard h3 { font-size: .98rem; line-height: 1.3; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acard-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.acard-foot { padding: 10px 16px 14px; display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--green-2); }
.acard-foot .ic { transition: transform .2s var(--ease); }
.acard:hover .acard-foot .ic { transform: translateX(3px); }
/* category tints for placeholders / icons */
.cat-tint { color: #8fd3ad; background: radial-gradient(120% 90% at 30% 20%, rgba(60,181,116,.20), transparent 60%), linear-gradient(160deg, #18221d, #111613); }
.cat-npcs { color: #9fc4f2; background: radial-gradient(120% 90% at 30% 20%, rgba(77,155,230,.22), transparent 60%), linear-gradient(160deg, #161d25, #111418); }
.cat-pests { color: #d9b37a; background: radial-gradient(120% 90% at 30% 20%, rgba(226,163,54,.20), transparent 60%), linear-gradient(160deg, #221d15, #141210); }
.cat-vehicles { color: #a9b4c4; background: radial-gradient(120% 90% at 30% 20%, rgba(150,170,200,.18), transparent 60%), linear-gradient(160deg, #1a1d22, #121416); }
.cat-furniture { color: #d3a98a; background: radial-gradient(120% 90% at 30% 20%, rgba(200,140,100,.18), transparent 60%), linear-gradient(160deg, #211a16, #141110); }
.cat-buildings { color: #c3bca8; background: radial-gradient(120% 90% at 30% 20%, rgba(190,180,150,.16), transparent 60%), linear-gradient(160deg, #1f1d18, #131210); }
.cat-equipment { color: #8fd3ad; background: radial-gradient(120% 90% at 30% 20%, rgba(60,181,116,.20), transparent 60%), linear-gradient(160deg, #16201b, #101412); }
.cat-clothing { color: #c9a3e6; background: radial-gradient(120% 90% at 30% 20%, rgba(155,124,232,.20), transparent 60%), linear-gradient(160deg, #1d1824, #131116); }
.cat-animations { color: #f0a7c4; background: radial-gradient(120% 90% at 30% 20%, rgba(232,110,160,.17), transparent 60%), linear-gradient(160deg, #22171d, #151013); }
.cat-audio { color: #7fd6d6; background: radial-gradient(120% 90% at 30% 20%, rgba(70,200,200,.17), transparent 60%), linear-gradient(160deg, #15201f, #101414); }
.cat-environment { color: #9ad38b; background: radial-gradient(120% 90% at 30% 20%, rgba(110,190,90,.2), transparent 60%), linear-gradient(160deg, #17201a, #101410); }
.cat-infestations { color: #e48a7f; background: radial-gradient(120% 90% at 30% 20%, rgba(229,88,79,.18), transparent 60%), linear-gradient(160deg, #221615, #151010); }
.cat-vfx { color: #f2cf73; background: radial-gradient(120% 90% at 30% 20%, rgba(240,200,90,.17), transparent 60%), linear-gradient(160deg, #221f14, #15130f); }

/* ---------------------------------------------------------------- library */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .search { position: relative; flex: 1 1 260px; max-width: 420px; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar .search input { padding-left: 38px; }
.toolbar select { width: auto; min-width: 150px; }
.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.catpill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-weight: 560; font-size: .86rem; white-space: nowrap; transition: all .15s; }
.catpill:hover { color: var(--text); border-color: var(--line-2); }
.catpill.on { background: var(--green-soft); border-color: var(--green-line); color: #cdf3dd; }
.catpill .n { font-size: .74rem; color: var(--faint); font-weight: 650; }
.catpill.on .n { color: #7fd8a7; }
.result-line { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }

/* ---------------------------------------------------------------- upload wizard */
.steps { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 560; font-size: .88rem; }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.step.on { color: var(--text); border-color: var(--green-line); } .step.on i { background: var(--green); color: #fff; }
.step.done i { background: var(--green-soft); color: var(--green-2); }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.catcard { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); color: var(--text);
  background: linear-gradient(180deg, var(--surface), #101412); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; min-height: 210px; }
.catcard:hover { transform: translateY(-3px); border-color: var(--green-line); box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(60,181,116,.12); color: var(--text); }
.catcard .cat-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; }
.catcard .cat-icon .ic { width: 28px; height: 28px; stroke-width: 1.7; }
.catcard h3 { font-size: 1.05rem; }
.catcard p { color: var(--muted); font-size: .86rem; margin: 0; line-height: 1.45; }
.catcard .subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.catcard .subs span { font-size: .72rem; padding: 3px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.form-section { padding: 22px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.form-section h2 .num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-2); font-size: .8rem; }
.form-section > p.muted { margin-bottom: 16px; font-size: .88rem; }
.drop { position: relative; display: grid; gap: 6px; border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 16px; background: var(--bg-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--green-line); background: rgba(47,154,98,.05); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-head { display: flex; align-items: center; gap: 12px; }
.drop-head .ic { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--surface-3); color: var(--green-2); }
.drop-head b { display: block; font-size: .92rem; } .drop-head span { font-size: .78rem; color: var(--muted); }
.drop .req-tag { margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green-2); }
.filelist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; position: relative; z-index: 1; pointer-events: none; }
.filelist li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); }
.filelist li .ic { width: 14px; height: 14px; color: var(--green-2); }
.filelist li span:last-child { margin-left: auto; color: var(--faint); }
.submit-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line);
  background: rgba(16,20,18,.92); backdrop-filter: blur(10px); border-radius: 0 0 var(--radius) var(--radius); }
.submit-bar .grow { flex: 1; }
progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 99px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #2f9a62, #59cf8d); border-radius: 99px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #2f9a62, #59cf8d); border-radius: 99px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: .88rem; color: var(--text-2); }
.callout .ic { color: var(--blue); margin-top: 2px; }
.callout.warn .ic { color: var(--amber); } .callout.green .ic { color: var(--green-2); }

/* ---------------------------------------------------------------- 3D viewer */
.viewer { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(90% 80% at 50% 30%, #1c2621, #0b0f0d 75%); }
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer .vstage { height: 460px; }
.viewer.compact .vstage { height: 360px; }
.vbar { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; pointer-events: none; }
.vbar .group { pointer-events: auto; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(10,13,12,.72); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.vbar button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .78rem; font-weight: 600; padding: 6px 10px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.vbar button:hover { color: var(--text); background: var(--surface-3); }
.vbar button.on { background: var(--green-soft); color: #9de6bd; }
.vbar .spacer { flex: 1; }
.vstats { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.vstats span { padding: 5px 9px; border-radius: 8px; background: rgba(10,13,12,.72); border: 1px solid var(--line-2); font-size: .74rem; color: var(--text-2); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
.vstats b { color: var(--text); font-weight: 650; }
.vmsg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.vmsg .ic { width: 42px; height: 42px; color: var(--faint); margin-bottom: 8px; stroke-width: 1.4; }
.viewer-note { font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* ---------------------------------------------------------------- asset detail */
.detail-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.detail-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head .sub { color: var(--muted); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; align-items: center; }
.media-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.media-hero img { width: 100%; height: 100%; object-fit: contain; background: #0b0f0d; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pipeline li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; color: var(--muted); font-size: .9rem; }
.pipeline li:last-child { padding-bottom: 0; }
.pipeline li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line-2); }
.pipeline li:last-child::before { display: none; }
.pipeline .pdot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--line-2); flex: none; z-index: 1; }
.pipeline .pdot .ic { width: 13px; height: 13px; }
.pipeline li.done { color: var(--text-2); } .pipeline li.done .pdot { background: var(--green); border-color: var(--green); color: #fff; }
.pipeline li.done::before { background: var(--green); }
.pipeline li.now { color: var(--text); font-weight: 600; } .pipeline li.now .pdot { border-color: var(--green-2); background: var(--green-soft); color: var(--green-2); box-shadow: 0 0 0 4px rgba(60,181,116,.12); }
.pipeline li.bad .pdot { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.file .fic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.file .fname { min-width: 0; flex: 1; } .file .fname b { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fname span { font-size: .76rem; color: var(--muted); }
.checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.checks li { display: flex; gap: 8px; font-size: .82rem; color: var(--text-2); }
.checks li .ic { width: 15px; height: 15px; margin-top: 2px; }
.lv-pass .ic { color: var(--green-2); } .lv-warn .ic { color: var(--amber); } .lv-fail .ic { color: var(--red); } .lv-info .ic { color: var(--blue); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: flex; gap: 12px; }
.timeline .tl-body { flex: 1; min-width: 0; }
.timeline .tl-head { font-size: .86rem; color: var(--text-2); } .timeline .tl-head b { color: var(--text); }
.timeline .tl-head time { color: var(--faint); font-size: .78rem; margin-left: 6px; }
.timeline .bubble { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: .9rem; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.action-grid { display: grid; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--green-2); }

/* ---------------------------------------------------------------- auth / landing */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(800px 500px at 20% 10%, rgba(60,181,116,.20), transparent 60%), radial-gradient(700px 500px at 90% 100%, rgba(47,154,98,.12), transparent 60%), linear-gradient(160deg, #0f1613, #090c0b);
  border-right: 1px solid var(--line); }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 40% 40%, #000, transparent); pointer-events: none; }
.auth-art .brand { padding: 0; z-index: 1; }
.auth-copy { z-index: 1; max-width: 520px; }
.auth-copy h1 { font-size: 2.6rem; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 16px; }
.auth-copy h1 span { color: var(--green-2); }
.auth-copy p { color: var(--text-2); font-size: 1.02rem; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: center; color: var(--text-2); }
.feature-list .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--green-soft); color: var(--green-2); }
.auth-foot { z-index: 1; color: var(--faint); font-size: .82rem; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); margin-bottom: 24px; }
.auth-card .alt { text-align: center; color: var(--muted); margin-top: 20px; font-size: .9rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- misc */
.settings-cat { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.settings-cat:last-child { border-bottom: 0; }
.settings-cat .cat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.signup { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.signup:last-child { border-bottom: 0; }
.signup .grow { flex: 1; min-width: 240px; }
.signup .note { margin-top: 8px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; color: var(--text-2); white-space: pre-wrap; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; }
.token-box { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.gh-hero { display: flex; gap: 18px; align-items: center; padding: 22px; }
.gh-hero .big-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.gh-hero .big-ic .ic { width: 28px; height: 28px; }
.perm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.perm-list li { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--text-2); }
.perm-list .ic { color: var(--green-2); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .w-full { width: 100%; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1400px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .menu-toggle { display: grid; }
  .project-chip { display: none; }
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 14px; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .user-chip .who { display: none; }
  .pop-panel { width: calc(100vw - 24px); right: -60px; }
  .hello { font-size: 1.45rem; }
  .viewer .vstage { height: 340px; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.vbar select { width: auto; height: 28px; padding: 2px 28px 2px 8px; font-size: .78rem; background-color: transparent; border: 0; border-radius: 7px; background-position: right 6px center; }
.vbar select:focus { box-shadow: none; }
.capture-preview { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
.detail-head .sub > span { display: inline-flex; align-items: center; gap: 7px; }
.kv code { word-break: break-all; }
