:root {
  --velocity: #b7ff2a;
  --velocity-strong: #92e600;
  --velocity-soft: rgba(183, 255, 42, .13);
  --ink: #090b0a;
  --surface-0: #0d100f;
  --surface-1: #131715;
  --surface-2: #1a1f1c;
  --surface-3: #242a26;
  --line: #2c332f;
  --line-strong: #3a443e;
  --text: #f2f5f3;
  --muted: #9da7a1;
  --quiet: #717b75;
  --danger: #ff5d62;
  --warning: #ffca4a;
  --info: #66b7ff;
  --success: #69dd93;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .35);
  --sidebar: 224px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --type-caption: 10px;
  --type-small: 11px;
  --type-label: 12px;
  --type-body-sm: 12px;
  --type-body: 14px;
  --type-heading: 16px;
  --type-title-sm: 18px;
  --type-title: 24px;
  --type-display: 36px;
  --type-hero: 90px;
  --leading-tight: 1.15;
  --leading-body: 1.5;
  --weight-regular: 450;
  --weight-medium: 650;
  --weight-bold: 750;
  --tracking-label: .035em;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--surface-0); color: var(--text); font-family: var(--font); font-size: var(--type-body); font-weight: var(--weight-regular); line-height: var(--leading-body); }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5, h6, strong, small, label, caption, th, td, button, input, select, textarea, code { font-family: inherit; }
h1 { font-size: var(--type-display); font-weight: 850; line-height: var(--leading-tight); letter-spacing: -.04em; }
h2 { font-size: var(--type-title); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: -.025em; }
h3 { font-size: var(--type-heading); font-weight: var(--weight-bold); line-height: 1.25; }
p { font-size: var(--type-body); line-height: var(--leading-body); }
small { font-size: var(--type-small); line-height: 1.4; }
strong { font-weight: var(--weight-bold); }
code, kbd { font-family: var(--font-mono); }
button, input, select, textarea { font: inherit; line-height: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--velocity); color: #071000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #343c37; border: 3px solid transparent; background-clip: padding-box; border-radius: 99px; }

.app-shell { min-height: 100vh; padding-left: var(--sidebar); transition: padding-left .2s ease; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #0b0e0c; z-index: 40; transition: width .2s ease, transform .2s ease; }
.sidebar-head { position: relative; min-height: 76px; display: flex; align-items: center; }
.brand { min-width: 0; height: 76px; padding: 18px 12px 18px 20px; display: flex; flex: 1; align-items: center; color: var(--text); text-decoration: none; overflow: hidden; }
.brand-logo { display: block; object-fit: contain; object-position: left center; }
.brand-logo-full { width: 150px; height: auto; flex: 0 0 150px; }
.brand-logo-icon { display: none; width: 36px; height: 36px; flex: 0 0 36px; filter: drop-shadow(0 0 12px rgba(183,255,42,.12)); }
.sidebar-toggle, .mobile-menu-toggle { width: 36px; height: 36px; min-width: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--surface-1); cursor: pointer; -webkit-appearance: none; appearance: none; }
.sidebar-toggle { position: absolute; z-index: 3; right: -14px; top: 24px; width: 28px; min-width: 28px; height: 28px; flex: 0 0 28px; margin: 0; overflow: hidden; border-radius: 7px; line-height: 0; box-shadow: 0 4px 15px rgba(0,0,0,.35); transition: right .2s ease; }
.sidebar-toggle:hover, .mobile-menu-toggle:hover { color: var(--velocity); border-color: var(--line-strong); background: var(--surface-2); }
.sidebar-toggle > [data-icon] { width: 100%; height: 100%; display: grid; place-items: center; }
.sidebar-toggle svg, .mobile-menu-toggle svg { display: block; width: 18px; height: 18px; }
.sidebar-toggle svg { transform: rotate(0deg); transition: transform .2s ease; }
.mobile-menu-toggle, .sidebar-backdrop { display: none; }
.main-nav { padding: 14px 12px; display: grid; gap: 5px; }
.main-nav a, .main-nav button.nav-primary { width: 100%; min-height: 44px; border: 0; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 8px; color: var(--muted); background: transparent; text-decoration: none; text-align: left; font-weight: 650; cursor: pointer; transition: .16s ease; }
.main-nav a:hover, .main-nav button.nav-primary:hover { color: var(--text); background: var(--surface-1); }
.main-nav a.active, .main-nav button.nav-primary.active { color: var(--velocity); background: var(--velocity-soft); }
.main-nav a > span:first-child, .main-nav button.nav-primary > span:first-child { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; }
.main-nav svg { display: block; width: 19px; height: 19px; }
.nav-group { position: relative; display: grid; gap: 3px; }
.nav-primary .nav-label { min-width: 0; flex: 1; }
.nav-primary .nav-chevron { width: 16px; height: 16px; display: grid; place-items: center; color: var(--quiet); transition: transform .16s ease; }
.nav-primary .nav-chevron svg { width: 14px; height: 14px; }
.nav-group.expanded .nav-chevron { transform: rotate(180deg); }
.nav-submenu { display: none; gap: 2px; padding: 2px 0 7px; }
.nav-group.expanded .nav-submenu { display: grid; }
.nav-submenu a { min-height: 32px; padding: 0 13px; border-radius: 7px; color: var(--quiet); font-size: 12px; font-weight: 650; }
.nav-submenu a:hover { color: var(--text); background: var(--surface-1); }
.nav-submenu a.active { color: var(--velocity); background: rgba(183,255,42,.075); }
.sidebar-footer { margin-top: auto; padding: 14px 12px 18px; border-top: 1px solid var(--line); }
.user-chip { width: 100%; min-height: 40px; border: 0; background: transparent; padding: 8px 9px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); text-align: left; cursor: pointer; transition: color .15s ease,background-color .15s ease; }
.user-chip:hover { color: var(--velocity); background: var(--surface-1); }
.user-chip strong { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-body-sm); }
.user-chip-copy { min-width: 0; display: grid; gap: 1px; }
.user-chip-copy small { overflow: hidden; color: var(--quiet); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-action { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; color: var(--quiet); transition: color .15s ease,transform .15s ease; }
.user-chip-action svg { width: 17px; height: 17px; }
.user-chip:hover .user-chip-action { color: var(--velocity); transform: translateX(1px); }
.page-root { min-height: 100vh; background: var(--surface-0); }
.page-root:focus { outline: none; }
.page { max-width: 1600px; margin: 0 auto; padding: 34px 42px 72px; }
.page-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-header h1 { margin: 0; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.035em; line-height: 1; }
.page-description { margin-top: 9px; color: var(--muted); font-size: var(--type-body-sm); }
.page-actions, .toolbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.btn { min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .12s; }
.btn:hover { background: var(--surface-3); border-color: #4a554e; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--velocity); border-color: var(--velocity); color: #0a1106; }
.btn-primary:hover { background: var(--velocity-strong); border-color: var(--velocity-strong); }
.btn-danger { color: #ffd9da; border-color: rgba(255,93,98,.4); background: rgba(255,93,98,.09); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-icon { width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; flex: 0 0 38px; aspect-ratio: 1; display: inline-grid; place-items: center; }
.btn svg { width: 17px; height: 17px; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn-sm.btn-icon { width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; flex-basis: 32px; }
.btn-lg { min-height: 46px; padding: 0 20px; }
.btn, .view-switch button, .more-button, .image-select, .tool, .panel-icon-button, .breadcrumbs button, .file-sort-button, .design-index button, .action-choice, .ui-dropdown-menu button { transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease, opacity .16s ease; }
:where(.btn, .view-switch button, .more-button, .image-select, .tool, .panel-icon-button, .breadcrumbs button, .file-sort-button, .design-index button, .action-choice, .ui-dropdown-menu button):hover:not(:disabled) { transform: none; }
:where(.btn, .view-switch button, .more-button, .image-select, .tool, .panel-icon-button, .breadcrumbs button, .file-sort-button, .design-index button, .action-choice, .ui-dropdown-menu button):active:not(:disabled) { transform: scale(.97); }
:where(.view-switch button, .btn-icon, .more-button, .image-select, .tool, .panel-icon-button) > svg { transition: transform .16s ease; }
:where(.view-switch button, .btn-icon, .more-button, .image-select, .tool, .panel-icon-button):hover:not(:disabled) > svg { transform: scale(1.08); }
:where(.view-switch button, .btn-icon, .more-button, .image-select, .tool, .panel-icon-button):active:not(:disabled) > svg { transform: scale(.92); }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--velocity); outline-offset: 2px; }

.input, .select, .textarea { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #0e1210; color: var(--text); padding: 0 12px; outline: none; }
.textarea { min-height: 82px; padding-block: 10px; resize: vertical; font: inherit; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--velocity); box-shadow: 0 0 0 3px var(--velocity-soft); }
.input::placeholder { color: #657069; }
.label { display: block; margin-bottom: 7px; color: var(--muted); font-weight: 650; font-size: 12px; }
.field { display: grid; gap: 6px; }
.search-field { position: relative; width: min(360px, 38vw); }
.search-field .input { padding-left: 38px; }
.search-field svg { position: absolute; left: 12px; top: 11px; width: 18px; color: var(--quiet); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { min-height: 43px; padding: 0 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--velocity); border-bottom-color: var(--velocity); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toolbar-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
.library-toolbar { align-items: center; flex-wrap: wrap; }
.library-toolbar .toolbar-left { flex: 1 1 120px; min-width: 120px; }
.library-tools { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.library-action-switch { flex: 0 0 auto; align-items: center; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.library-action-switch.search-open { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(183,255,42,.055); }
.library-inline-search { width: 0; max-width: 0; opacity: 0; overflow: hidden; pointer-events: none; transition: width .22s ease, max-width .22s ease, opacity .14s ease; }
.library-action-switch.search-open .library-inline-search { width: 210px; max-width: 210px; opacity: 1; pointer-events: auto; }
.library-inline-search .input { width: 100%; height: 32px; min-height: 32px; padding: 0 7px 0 3px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: var(--type-label); }
.library-inline-search .input:focus { border: 0; box-shadow: none; }
.library-action-divider { width: 1px; height: 20px; flex: 0 0 1px; margin-inline: 9px; background: var(--line-strong); opacity: .82; transition: background-color .16s ease, opacity .16s ease; }
.library-action-switch:focus-within .library-action-divider, .library-action-switch:hover .library-action-divider { background: #536058; opacity: 1; }
.library-annotate-button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; flex: 0 0 40px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(183,255,42,.16), 0 7px 22px rgba(116,181,0,.18); animation: none; }
.library-annotate-button:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 0 1px rgba(183,255,42,.28), 0 10px 30px rgba(116,181,0,.28); }
.library-annotate-button:active { transform: scale(.96); }
.library-annotate-button svg { width: 17px; height: 17px; }
@keyframes control-enter { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.directory-options { min-width: 0; display: flex; align-items: center; gap: 4px; }
.compact-select { min-width: 0; height: 40px; padding: 0 7px 0 9px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 5px; color: var(--quiet); background: var(--surface-1); }
.compact-select:focus-within { border-color: var(--line-strong); color: var(--velocity); }
.compact-select svg { width: 15px; height: 15px; flex: 0 0 15px; }
.compact-select select { min-width: 0; max-width: 138px; height: 32px; padding: 0 18px 0 4px; border: 0; outline: 0; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.compact-select select option { color: var(--text); background: var(--surface-2); }
.view-switch button:disabled { opacity: .32; cursor: not-allowed; }
.library-summary { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--quiet); font-size: 11px; }
.library-summary span + span { padding-left: 10px; border-left: 1px solid var(--line); }
.library-summary strong { color: var(--text); font-size: 12px; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); }
.breadcrumbs button { border: 0; padding: 4px 2px; background: none; color: inherit; cursor: pointer; font-weight: 650; max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.breadcrumbs button:hover { color: var(--text); }
.view-switch { display: flex; padding: 3px; background: var(--surface-1); border: 1px solid var(--line); border-radius: 9px; }
.view-switch button { width: 34px; height: 32px; border: 0; border-radius: 6px; display: grid; place-items: center; color: var(--quiet); background: transparent; cursor: pointer; }
.view-switch button.active { color: var(--velocity); background: var(--surface-3); }
.view-switch svg { width: 17px; height: 17px; }

.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 26px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.stat strong { display: block; font-size: 24px; line-height: 1.15; letter-spacing: -.03em; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.card-header { min-height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 18px; }
.api-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.api-columns > * { min-width: 0; }
.api-endpoint, .api-key-heading, .api-result-heading { display: flex; align-items: center; gap: 12px; }
.api-endpoint { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-0); }
.api-endpoint code { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: var(--type-body-sm); }
.api-key-heading, .api-result-heading { justify-content: space-between; flex-wrap: wrap; }
.api-code { max-height: 560px; margin: 0; overflow: auto; color: var(--text); font-size: var(--type-body-sm); line-height: 1.7; }
.api-code code, .api-token { font-family: var(--font-mono); }
.api-facts { display: grid; gap: 14px; }
.api-facts > div { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 12px; }
.api-facts dt { color: var(--text); font-family: var(--font-mono); font-size: var(--type-body-sm); font-weight: var(--weight-bold); }
.api-facts dd { color: var(--muted); font-size: var(--type-body-sm); }
.api-result-image { width: 100%; max-height: 640px; object-fit: contain; background: var(--surface-0); border-radius: var(--radius-sm); }
.api-page details summary { color: var(--muted); font-size: var(--type-body-sm); cursor: pointer; margin-bottom: 12px; }
.api-copy-field { position: fixed; left: -9999px; top: 0; }
@media (max-width: 900px) { .api-columns { grid-template-columns: 1fr; } }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border: 1px solid transparent; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 750; }
.badge.badge-success { color: var(--success); border-color: rgba(105,221,147,.32); background: rgba(105,221,147,.14); }
.badge.badge-info { color: var(--info); border-color: rgba(102,183,255,.32); background: rgba(102,183,255,.14); }
.badge.badge-warning { color: var(--warning); border-color: rgba(255,202,74,.32); background: rgba(255,202,74,.14); }
.badge.badge-velocity { color: var(--velocity); border-color: rgba(183,255,42,.32); background: rgba(183,255,42,.14); }
.badge.badge-danger { color: var(--danger); border-color: rgba(255,93,98,.32); background: rgba(255,93,98,.14); }
.badge.badge-neutral { color: var(--muted); border-color: var(--line-strong); background: var(--surface-3); }
.badge.badge-on-media { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(7,10,8,.9); text-shadow: 0 1px 2px rgba(0,0,0,.9); box-shadow: 0 3px 12px rgba(0,0,0,.48); -webkit-backdrop-filter: blur(8px) saturate(130%); backdrop-filter: blur(8px) saturate(130%); }
.badge.badge-velocity.badge-on-media { color: var(--velocity); border-color: rgba(183,255,42,.56); background: rgba(10,18,7,.9); }
.badge.badge-info.badge-on-media { color: #8bcbff; border-color: rgba(102,183,255,.56); background: rgba(6,14,21,.9); }
.badge.badge-warning.badge-on-media { color: #ffd566; border-color: rgba(255,202,74,.56); background: rgba(22,17,5,.9); }
.badge.detector-badge { color: var(--detector-color); border: 0; background: #090c0b; box-shadow: none; }
.badge.detector-badge-products { --detector-color: #c6a7ff; }
.badge.detector-badge-prices { --detector-color: #55e4d1; }
.badge.detector-badge-communication { --detector-color: #ff8fb8; }
.badge.detector-badge.badge-on-media { color: var(--detector-color); border: 0; background: rgba(4,7,6,.92); text-shadow: 0 1px 2px #000; }

.folder-grid, .image-grid, .directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.folder-grid-section { margin-bottom: 18px; }
.folder-card, .image-card { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-1); overflow: hidden; transition: .17s ease; }
.image-card { position: relative; }
.folder-card:hover, .image-card:hover { border-color: #4a574f; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.image-card.selected, .folder-card.selected, .file-row.selected { border-color: var(--velocity); box-shadow: 0 0 0 2px var(--velocity-soft); background: rgba(183,255,42,.04); }
.folder-card { position: relative; min-height: 120px; padding: 17px; display: flex; flex-direction: column; cursor: pointer; }
.folder-menu { position: absolute; z-index: 3; top: 10px; right: 10px; }
.folder-icon { width: 44px; height: 36px; position: relative; border-radius: 5px 7px 7px 7px; background: var(--velocity); margin-bottom: 18px; }
.folder-icon::before { content: ""; position: absolute; left: 0; top: -5px; width: 20px; height: 8px; border-radius: 4px 4px 0 0; background: var(--velocity); }
.library-items.selection-mode .selectable-folder .folder-icon { margin-left: 42px; }
.folder-card strong, .image-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-card small { margin-top: 6px; color: var(--quiet); }
.folder-splits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.image-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #080a09; cursor: pointer; }
.image-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .2s ease; }
.image-card:hover .image-thumb img { transform: scale(1.015); }
.image-count { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 6px; color: #fff; background: rgba(4,7,5,.8); backdrop-filter: blur(5px); font-size: 11px; font-weight: 750; }
.image-meta { min-width: 0; padding: 11px 12px 12px; display: grid; grid-template-columns: minmax(0,1fr) 30px; align-items: center; gap: 8px; }
.image-meta strong { display: block; font-size: 12px; }
.image-meta small { display: block; margin-top: 4px; color: var(--quiet); font-size: 11px; }
.more-button, .image-select { width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; aspect-ratio: 1; border: 0; border-radius: 7px; display: grid; place-items: center; background: rgba(9,12,10,.82); color: var(--muted); cursor: pointer; }
.more-button:hover, .image-select:hover { color: var(--velocity); background: var(--surface-3); }
.more-button svg, .image-select svg { display: block; width: 18px; height: 18px; }
.image-select { position: absolute; z-index: 5; top: 8px; left: 8px; border: 1px solid rgba(255,255,255,.12); }
.image-card.selected .image-select, .folder-card.selected .image-select, .file-row.selected .image-select { color: #091006; border-color: var(--velocity); background: var(--velocity); }
.dataset-badge { min-height: 24px; justify-content: center; white-space: nowrap; font-size: 10.5px; }
.badge.dataset-badge, .badge.directory-split-badge, .badge.folder-empty-badge { border: 0; }
.badge.dataset-badge.badge-on-media { border: 0; }
.image-thumb > .dataset-badge { position: absolute; z-index: 2; top: 8px; right: 8px; }
.image-thumb > .image-detector-badge { position: absolute; z-index: 2; left: 8px; bottom: 8px; max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-shell { width: 100%; max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.table-shell--embedded { border: 0; border-radius: 0 0 var(--radius) var(--radius); background: transparent; }
.file-list { overflow: hidden; }
.file-list-header { display: grid; grid-template-columns: 32px 46px minmax(0,1fr) 124px 92px 104px 84px 32px; gap: 12px; align-items: center; min-height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--quiet); background: #101311; font-size: var(--type-caption); font-weight: var(--weight-bold); line-height: 1; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.file-header-cell { min-width: 0; height: 38px; display: flex; align-items: center; }
.file-header-actions { justify-content: center; }
.file-sort-button { width: 100%; height: 38px; min-width: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 5px; color: inherit; background: transparent; cursor: pointer; text-align: left; text-transform: inherit; letter-spacing: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.file-sort-button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sort-button svg { width: 12px; height: 12px; flex: 0 0 12px; opacity: 0; transform: rotate(0deg); transition: opacity .16s ease, transform .16s ease; }
.file-sort-button:hover, .file-sort-button.active { color: var(--velocity); }
.file-sort-button:hover svg, .file-sort-button.active svg { opacity: 1; }
.file-sort-button.ascending svg { transform: rotate(180deg); }
.file-row { position: relative; display: grid; grid-template-columns: 32px 46px minmax(0,1fr) 124px 92px 104px 84px 32px; gap: 12px; align-items: center; min-height: 62px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--surface-2); }
.file-row .image-select { position: static; }
.library-items:not(.selection-mode) .image-select, .library-items:not(.selection-mode) .file-selection-heading { display: none; }
.library-items:not(.selection-mode) .file-row, .library-items:not(.selection-mode) .file-list-header { grid-template-columns: 46px minmax(0,1fr) 124px 92px 104px 84px 32px; }
.file-list-header .image-select { position: static; width: 28px; height: 28px; border-color: transparent; background: transparent; }
.file-list-header .image-select:hover, .file-list-header .image-select.active { color: var(--velocity); border-color: var(--line-strong); background: var(--velocity-soft); }
.file-row img { width: 46px; height: 42px; object-fit: cover; border-radius: 5px; cursor: pointer; }
.file-name-stack { min-width: 0; display: grid; gap: 3px; }
.file-name-stack strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.file-mobile-meta { display: none; color: var(--quiet); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row span:not(.badge) { color: var(--muted); font-size: 12px; }
.file-row > .dataset-badge { width: 78px; }
.file-row > .detector-badge { width: 100%; min-width: 0; overflow: hidden; justify-content: center; text-overflow: ellipsis; white-space: nowrap; }
.folder-row { cursor: pointer; }
.folder-row:hover strong { color: var(--velocity); }
.folder-row-icon { width: 46px; height: 42px; border-radius: 6px; display: grid; place-items: center; color: var(--velocity) !important; background: var(--velocity-soft); }
.folder-row-icon svg { width: 21px; height: 21px; }
.directory-split-summary { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.directory-split-badge { min-width: 0; min-height: 20px; padding: 0 5px; font-size: 9px; line-height: 1; }
.folder-detector-summary { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.folder-card > .folder-detector-summary { margin-top: 11px; }
.file-detector-cell { align-content: center; flex-wrap: wrap; overflow: visible; }
.file-detector-cell .detector-badge { min-width: 0; max-width: 100%; padding-inline: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-bar { min-height: 52px; margin-bottom: 12px; padding: 8px 10px 8px 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-1); color: var(--muted); }
.selection-bar-sticky { position: sticky; z-index: 25; top: 10px; background: rgba(19,23,21,.94); box-shadow: 0 10px 26px rgba(0,0,0,.3); -webkit-backdrop-filter: blur(12px) saturate(125%); backdrop-filter: blur(12px) saturate(125%); }
.selection-bar strong { color: var(--text); }
.detector-switcher { margin: -4px 0 22px; padding: 5px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-1); }
.detector-switcher button { min-width: 0; min-height: 58px; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 9px; align-items: center; color: var(--muted); background: transparent; text-align: left; cursor: pointer; transition: color .16s ease,background-color .16s ease,border-color .16s ease,transform .16s ease; }
.detector-switcher button:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.detector-switcher button.active { color: var(--velocity); border-color: rgba(183,255,42,.24); background: var(--velocity-soft); }
.detector-switcher button > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.035); }
.detector-switcher strong,.detector-switcher small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.detector-switcher strong { color: currentColor; font-size: var(--type-body-sm); }
.detector-switcher small { margin-top: 3px; color: var(--quiet); font: 10px ui-monospace,Consolas,monospace; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 10px; }
.catalog-item { min-width: 0; min-height: 62px; padding: 7px 10px 7px 14px; display: grid; grid-template-columns: minmax(0,1fr) 32px; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); transition: border-color .16s ease, background-color .16s ease; }
.catalog-item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.catalog-item--detailed { min-height: 76px; padding-block: 10px; }
.catalog-item-copy { min-width: 0; display: grid; gap: 3px; }
.catalog-item-copy strong, .catalog-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item-copy strong { color: var(--text); font-size: var(--type-body); }
.catalog-item-copy small { color: var(--quiet); font-size: var(--type-caption); font-weight: var(--weight-medium); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.catalog-item > .more-button { justify-self: end; }
.upload-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.upload-folder-section { min-width: 0; display: grid; gap: 7px; }
.upload-directory-picker .directory-picker-list { min-height: 76px; max-height: min(136px,21vh); }
.upload-directory-picker .directory-picker-loading, .upload-directory-picker .directory-picker-empty { min-height: 64px; }
.upload-directory-picker .directory-picker-current { min-height: 56px; }
.upload-directory-picker .directory-picker-selection { min-height: 46px; }
.dropzone.upload-dropzone { min-height: 94px; padding: 12px; border-radius: 9px; }
.dropzone.upload-dropzone svg { width: 28px; height: 28px; margin-bottom: 7px; }
.upload-file-preview { min-width: 0; display: grid; gap: 8px; }
.upload-file-preview[hidden] { display: none; }
.upload-file-preview > header { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.upload-file-preview > header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: var(--type-body-sm); }
.upload-file-preview > header small { flex: 0 0 auto; color: var(--quiet); font-size: var(--type-caption); }
.upload-thumbnail-strip { min-width: 0; padding: 2px 1px 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 66px; gap: 7px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-snap-type: inline proximity; }
.upload-thumbnail { position: relative; width: 66px; height: 66px; margin: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #080a09; scroll-snap-align: start; }
.upload-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.upload-thumbnail figcaption { position: absolute; right: 4px; bottom: 4px; min-width: 20px; min-height: 20px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: rgba(5,8,6,.82); font-size: 9px; font-weight: var(--weight-bold); }
.upload-thumbnail-placeholder { display: grid; place-items: center; color: var(--velocity); background: var(--surface-2); }
.upload-thumbnail-placeholder > svg { width: 23px; height: 23px; }
.pipeline-list { display: grid; gap: 7px; }
.pipeline-list span { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: var(--type-body-sm); }
.pipeline-list svg { width: 17px; color: var(--velocity); }
.test-detector-description { color: var(--muted); line-height: 1.65; }
.editor-recognition-result { display: grid; gap: 7px; }
.editor-recognition-result output { min-height: 82px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; white-space: pre-wrap; color: var(--text); background: #0a0d0b; font: var(--type-body); line-height: 1.45; }
.editor-recognition-result small { color: var(--quiet); font-size: var(--type-caption); }
.selection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.pagination { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); }

.empty { width: 100%; min-width: 0; min-height: 250px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; place-items: center; text-align: center; color: var(--muted); overflow: hidden; }
.empty > div { min-width: 0; width: min(100%,420px); display: grid; justify-items: center; gap: 8px; }
.empty strong, .empty span { display: block; max-width: 100%; overflow-wrap: anywhere; }
.empty span { color: var(--quiet); font-size: 12px; line-height: 1.5; }
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; color: var(--quiet); }
.skeleton { min-height: 180px; border-radius: 10px; background: linear-gradient(90deg,var(--surface-1),var(--surface-2),var(--surface-1)); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.split-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(320px,.7fr); gap: 18px; }
.split-layout > *, .stack { min-width: 0; }
.stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.stat-train { border-top-color: rgba(183,255,42,.55); }
.stat-valid { border-top-color: rgba(102,183,255,.55); }
.stat-test { border-top-color: rgba(255,202,74,.55); }
.model-status { display: flex; gap: 14px; align-items: center; }
.model-chip { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 12px; background: var(--velocity-soft); color: var(--velocity); }
.model-chip svg { width: 23px; height: 23px; }
.model-status > div { min-width: 0; display: grid; align-content: center; gap: 4px; }
.model-status > div > strong, .model-status > div > span { display: block; }
.model-status > div > span { color: var(--muted); font-size: 12px; }
.dataset-rule { padding: 11px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 10px; background: rgba(183,255,42,.035); }
.dataset-rule > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; color: var(--velocity); background: var(--velocity-soft); }
.dataset-rule svg { width: 18px; height: 18px; }
.dataset-rule strong, .dataset-rule small { display: block; }
.dataset-rule small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.folder-location { min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; background: var(--surface-2); }
.folder-location > span { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--velocity); background: var(--velocity-soft); }
.folder-location svg { width: 18px; height: 18px; }
.folder-location small, .folder-location strong { display: block; }
.folder-location small { margin-bottom: 3px; color: var(--quiet); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.directory-picker { display: grid; gap: 10px; }
.directory-picker-toolbar { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 8px; }
.directory-picker-toolbar .btn { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.directory-picker-breadcrumb { min-width: 0; min-height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 3px; overflow-x: auto; background: #0c0f0d; scrollbar-width: thin; }
.directory-picker-breadcrumb button { min-height: 28px; padding: 0 5px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; white-space: nowrap; font: inherit; font-size: var(--type-body-sm); font-weight: var(--weight-bold); cursor: pointer; }
.directory-picker-breadcrumb button:hover { color: var(--velocity); background: var(--velocity-soft); }
.directory-picker-breadcrumb svg { width: 13px; min-width: 13px; color: var(--quiet); }
.directory-picker-current { width: 100%; min-height: 62px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 9px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; color: var(--text); background: var(--surface-2); text-align: left; cursor: pointer; transition: border-color .15s ease,background-color .15s ease; }
.directory-picker-current:hover:not(:disabled), .directory-picker-current.selected { border-color: rgba(183,255,42,.42); background: var(--velocity-soft); }
.directory-picker-current:disabled { cursor: default; opacity: .62; }
.directory-picker-current-icon, .directory-picker-item-icon { display: grid; place-items: center; color: var(--velocity); background: var(--velocity-soft); }
.directory-picker-current-icon { width: 38px; height: 38px; border-radius: 8px; }
.directory-picker-current-icon svg { width: 20px; height: 20px; }
.directory-picker-current small, .directory-picker-current strong { display: block; }
.directory-picker-current small { margin-bottom: 3px; color: var(--quiet); font-size: var(--type-caption); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.directory-picker-current strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-body-sm); }
.directory-picker-list { min-height: 126px; max-height: min(300px,38vh); padding: 5px; border: 1px solid var(--line); border-radius: 9px; overflow-y: auto; background: #0c0f0d; }
.directory-picker-item, .directory-picker-retry { width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 7px; display: grid; grid-template-columns: 38px minmax(0,1fr) 24px; align-items: center; gap: 10px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.directory-picker-item:hover:not(:disabled), .directory-picker-retry:hover { background: var(--surface-2); }
.directory-picker-item:disabled { cursor: not-allowed; opacity: .46; }
.directory-picker-item-icon { width: 38px; height: 38px; border-radius: 7px; }
.directory-picker-item-icon svg { width: 19px; height: 19px; }
.directory-picker-item strong, .directory-picker-item small, .directory-picker-retry strong, .directory-picker-retry small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-picker-item strong, .directory-picker-retry strong { font-size: var(--type-body-sm); }
.directory-picker-item small, .directory-picker-retry small { margin-top: 3px; color: var(--quiet); font-size: var(--type-caption); }
.directory-picker-item > svg { width: 17px; color: var(--quiet); }
.directory-picker-loading, .directory-picker-empty { min-height: 114px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--quiet); font-size: var(--type-body-sm); }
.directory-picker-empty { flex-direction: column; text-align: center; }
.directory-picker-empty svg { width: 26px; color: var(--muted); }
.directory-picker-retry { grid-template-columns: 32px minmax(0,1fr); min-height: 70px; }
.directory-picker-retry > svg { width: 21px; color: var(--warning); }
.directory-picker-selection { min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; background: rgba(183,255,42,.035); }
.directory-picker-selection > svg { width: 18px; color: var(--velocity); }
.directory-picker-selection small, .directory-picker-selection strong { display: block; }
.directory-picker-selection small { margin-bottom: 3px; color: var(--quiet); font-size: var(--type-caption); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.directory-picker-selection strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-body-sm); }
.table-wrap { width: 100%; max-width: 100%; overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table caption { padding: 14px 12px 10px; color: var(--text); text-align: left; font-weight: 750; }
.table th { height: 38px; padding: 0 12px; text-align: left; color: var(--quiet); background: #101311; font-size: var(--type-caption); font-weight: var(--weight-bold); line-height: 1; letter-spacing: var(--tracking-label); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.table td { height: 62px; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--type-body-sm); vertical-align: middle; }
.table tbody tr { transition: background-color .16s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td strong { color: var(--text); }
.log { max-height: 320px; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #080a09; color: #b8c2bc; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.dropzone { position: relative; min-height: 260px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; place-items: center; gap: 14px; overflow: hidden; text-align: center; background: rgba(255,255,255,.012); cursor: pointer; transition: .16s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--velocity); background: var(--velocity-soft); }
.dropzone-copy { position: relative; z-index: 1; pointer-events: none; }
.dropzone-input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-preview { position: relative; z-index: 1; width: min(100%,320px); max-height: 210px; object-fit: contain; pointer-events: none; border-radius: 8px; background: #080a09; }
.dropzone svg { width: 38px; height: 38px; margin-bottom: 12px; color: var(--velocity); }
.dropzone strong, .dropzone span { display: block; }
.dropzone span { margin-top: 7px; color: var(--muted); font-size: 12px; }

.action-list { display: grid; gap: 8px; }
.action-choice { width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 32px minmax(0,1fr) 20px; align-items: center; gap: 10px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.action-choice:hover { border-color: var(--velocity); background: var(--surface-3); }
.action-choice > svg:first-child { width: 20px; height: 20px; color: var(--velocity); justify-self: center; }
.action-choice > svg:last-child { width: 16px; height: 16px; color: var(--quiet); }
.action-choice strong, .action-choice small { display: block; }
.action-choice small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.action-choice.danger > svg:first-child, .action-choice.danger strong { color: var(--danger); }
.action-list-compact .action-choice { min-height: 52px; }
.modal-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.design-section { margin-bottom: 40px; }
.design-section > h2 { margin: 0 0 16px; font-size: 18px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); gap: 14px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 10px; }
.swatch { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface-1); }
.swatch-color { height: 72px; }
.swatch-label { padding: 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.component-demo { min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-1); }
.component-demo-wide { grid-column: 1 / -1; }
.component-demo h3 { margin: 0 0 16px; font-size: 13px; }
.component-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.component-row-spaced { margin-top: 16px; }
.component-note { margin: 14px 0 0; color: var(--quiet); font-size: 11px; }
.button-group { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #0e1210; }
.button-group .btn { border-color: transparent; background: transparent; }
.button-group .btn.active { color: var(--velocity); background: var(--surface-3); }
.spinner-inline { width: 15px; height: 15px; border-width: 2px; border-color: rgba(9,16,6,.3); border-top-color: #091006; }
.field-error .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,93,98,.08); }
.field-error small { color: var(--danger); font-size: 11px; }
.input:disabled { opacity: .5; cursor: not-allowed; }
.input[readonly] { color: var(--muted); background: var(--surface-2); }
.design-page { scroll-behavior: smooth; }
.design-index { position: sticky; top: 0; z-index: 12; margin: -10px 0 32px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 4px; overflow-x: auto; background: rgba(13,16,15,.96); box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.design-index button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; display: inline-flex; align-items: center; color: var(--muted); background: transparent; white-space: nowrap; font-size: 12px; font-weight: 700; cursor: pointer; }
.design-index button:hover { color: var(--velocity); background: var(--surface-2); }
.design-section { scroll-margin-top: var(--design-index-offset, 64px); }
.design-grid-foundations { margin-top: 14px; }
.typography-list { display: grid; gap: 13px; }
.typography-spec { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 12px; }
.typography-spec code { color: var(--quiet); font-size: var(--type-caption); white-space: nowrap; }
.type-display { font-size: var(--type-display); font-weight: 850; line-height: var(--leading-tight); letter-spacing: -.04em; }
.type-hero { font-size: var(--type-hero); font-weight: 850; line-height: .9; letter-spacing: -.055em; }
.type-lead { font-size: var(--type-title-sm); line-height: 1.55; }
.type-title { font-size: var(--type-title); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: -.025em; }
.type-heading { font-size: var(--type-heading); font-weight: var(--weight-bold); line-height: 1.25; }
.type-body { font-size: var(--type-body); font-weight: var(--weight-regular); line-height: var(--leading-body); }
.type-label { font-size: var(--type-label); font-weight: var(--weight-medium); line-height: 1.35; }
.type-caption { color: var(--quiet); font-size: var(--type-caption); font-weight: var(--weight-bold); line-height: 1.3; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.type-code { font: var(--type-small)/1.5 var(--font-mono); }
.badge-media-demo { min-height: 96px; padding: 16px; border-radius: 9px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; background: linear-gradient(120deg,#f7faf8 0 34%,#c72d45 34% 67%,#5ab660 67%); }
.design-file-table { overflow-x: auto; }
.design-file-table .file-list-header, .design-file-table .file-row { min-width: 800px; }
.spacing-scale { display: grid; gap: 9px; }
.spacing-scale > div { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 12px; }
.spacing-scale span { display: block; height: 14px; min-width: 4px; background: var(--velocity); border-radius: 2px; }
.spacing-scale code { color: var(--muted); }
.radius-row { display: flex; flex-wrap: wrap; gap: 12px; }
.radius-sample { width: 72px; height: 72px; border: 1px solid var(--line-strong); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.radius-sm { border-radius: var(--radius-sm); }
.radius-md { border-radius: var(--radius); }
.radius-lg { border-radius: var(--radius-lg); }
.radius-shadow { width: 92px; border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-demo { display: grid; gap: 6px; margin-bottom: 8px; }
.grid-demo:last-child { margin-bottom: 0; }
.grid-demo span { min-height: 42px; display: grid; place-items: center; border: 1px solid rgba(183,255,42,.24); border-radius: 5px; background: rgba(183,255,42,.07); color: var(--velocity); font-size: 11px; font-weight: 750; }
.grid-12 { grid-template-columns: repeat(12,minmax(0,1fr)); }
.grid-halves { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-thirds { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-main-aside { grid-template-columns: 2fr 1fr; }
.choice-stack { display: grid; gap: 14px; }
.choice, .switch { display: flex; align-items: center; gap: 9px; color: var(--muted); cursor: pointer; }
.choice input { width: 17px; height: 17px; accent-color: var(--velocity); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { width: 38px; height: 22px; padding: 3px; border-radius: 99px; display: flex; align-items: center; background: var(--surface-3); transition: .15s; }
.switch > span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + span { background: var(--velocity); }
.switch input:checked + span::before { transform: translateX(16px); background: #091006; }
.design-search { width: 100%; }
.design-dropzone { min-height: 130px; }
.pagination-demo { margin-top: 0; justify-content: flex-start; }
.mini-nav { display: grid; gap: 4px; }
.mini-nav button { min-height: 38px; padding: 0 11px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 9px; color: var(--muted); background: transparent; text-align: left; }
.mini-nav button.active { color: var(--velocity); background: var(--velocity-soft); }
.mini-nav svg { width: 18px; height: 18px; }
.design-main-nav { padding: 0; }
.design-main-nav .nav-submenu { padding-left: 0; }
.design-view-switch { width: max-content; margin-top: 14px; }
.alert { min-height: 42px; margin-bottom: 8px; padding: 9px 11px; border: 1px solid; border-radius: 7px; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.alert:last-child { margin-bottom: 0; }
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; }
.alert-success { color: var(--success); border-color: rgba(105,221,147,.3); background: rgba(105,221,147,.08); }
.alert-warning { color: var(--warning); border-color: rgba(255,202,74,.3); background: rgba(255,202,74,.08); }
.alert-danger { color: var(--danger); border-color: rgba(255,93,98,.3); background: rgba(255,93,98,.08); }
.alert-info { color: var(--info); border-color: rgba(102,183,255,.3); background: rgba(102,183,255,.08); }
.progress { height: 8px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--velocity); }
.progress-label { margin-top: 8px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.progress-label strong { color: var(--velocity); }
.skeleton-small { min-height: 44px; margin-top: 20px; }
.mini-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.compact-list { display: grid; }
.compact-list > div { min-height: 54px; padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(0,1fr) 38px; align-items: center; gap: 9px; }
.compact-list > div:last-child { border-bottom: 0; }
.compact-list > div > svg { width: 20px; height: 20px; color: var(--velocity); }
.compact-list strong, .compact-list small { display: block; }
.compact-list small { margin-top: 3px; color: var(--muted); }
.design-folder, .design-image-card { min-height: 220px; }
.image-placeholder { display: grid; place-items: center; color: var(--quiet); }
.image-placeholder > svg { width: 42px; height: 42px; }
.modal-demo { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.modal-demo header, .modal-demo footer { min-height: 54px; padding: 8px 14px; display: flex; align-items: center; gap: 9px; }
.modal-demo header { justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-demo footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.modal-demo p { min-height: 80px; margin: 0; padding: 18px 14px; color: var(--muted); line-height: 1.55; }
.design-action-list { padding: 14px; background: var(--surface-1); }
.toast-static { position: static; width: 100%; margin-bottom: 10px; animation: none; }
.toast-static:last-child { margin-bottom: 0; }
.empty-small { min-height: 160px; }
.annotator-demo { overflow: hidden; border: 1px solid #303632; border-radius: 10px; background: #111412; }
.annotator-demo-top { min-height: 48px; padding: 5px 10px; border-bottom: 1px solid #303632; display: flex; align-items: center; gap: 10px; }
.annotator-demo-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annotator-demo-top .btn-primary { margin-left: auto; }
.annotator-demo-body { height: 360px; display: grid; grid-template-columns: 54px minmax(0,1fr) 260px; }
.annotator-demo-body .toolrail { position: static; }
.annotator-canvas { display: grid; place-items: center; padding: 28px; background-color: #1d211f; background-image: linear-gradient(45deg,#202522 25%,transparent 25%),linear-gradient(-45deg,#202522 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#202522 75%),linear-gradient(-45deg,transparent 75%,#202522 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.annotator-canvas svg { width: min(100%,520px); max-height: 290px; background: #4a514c; box-shadow: 0 10px 34px rgba(0,0,0,.42); }
.annotator-demo-body aside { padding: 14px; border-left: 1px solid #303632; background: #121513; }
.annotator-demo-body aside h3 { margin: 0 0 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.annotator-demo-body aside h3:not(:first-child) { margin-top: 16px; }
.annotator-demo-body aside .panel-heading h3 { margin: 0; }
.design-layer-heading { margin-top: 15px; }
.design-auth-card { width: 100%; padding: 24px; }
.design-auth-shell { min-height: 360px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; }
.design-auth-shell .auth-layout { min-height: 360px; }
.design-auth-shell .auth-visual-panel, .design-auth-shell .auth-form-panel { min-height: 360px; }
.design-auth-shell .auth-form-panel { padding: 24px; }
.design-auth-shell .auth-form-content { max-width: 310px; padding: 16px 0; }
.design-auth-shell .auth-brand { margin-bottom: 18px; }
.design-auth-shell .auth-brand-logo { width: 126px; }
.design-auth-shell .auth-heading { margin-bottom: 18px; }
.design-auth-shell .auth-heading h1 { font-size: 22px; }
.design-auth-shell .auth-heading p { font-size: var(--type-body-sm); }
.design-auth-shell .auth-footer { display: none; }
.design-user-chip { max-width: 200px; border: 1px solid var(--line); background: var(--surface-1); }
.design-upload-thumbnails { max-width: 100%; }
.crop-demo { height: 170px; }
.crop-product { display: block; width: 72%; height: 42%; border-radius: 8px; background: linear-gradient(90deg,#991d23,#e22d32 45%,#8b171b); box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,1fr)); gap: 9px; }
.icon-tile { min-height: 92px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; gap: 8px; background: var(--surface-1); color: var(--muted); }
.icon-square { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--velocity); }
.icon-square svg { display: block; width: 20px; height: 20px; }
.icon-tile code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.icon-rules { min-height: 0; margin-bottom: 14px; }
.icon-size-demo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; }
.icon-box { position: relative; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--velocity); background: var(--surface-3); }
.icon-box svg { width: 52%; height: 52%; }
.icon-box small { position: absolute; top: calc(100% + 5px); color: var(--quiet); font-size: 9px; }
.icon-box-28 { width: 28px; height: 28px; }
.icon-box-32 { width: 32px; height: 32px; }
.icon-box-38 { width: 38px; height: 38px; }
.icon-box-40 { width: 40px; height: 40px; }

.input-group { width: 100%; display: flex; align-items: stretch; }
.input-group > span { min-width: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 8px 0 0 8px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.input-group .input { min-width: 0; border-radius: 0; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.floating-field { position: relative; display: block; }
.floating-field .input { min-height: 52px; padding: 17px 12px 3px; }
.floating-field span { position: absolute; left: 12px; top: 17px; color: var(--quiet); pointer-events: none; transition: .14s ease; }
.floating-field .input:focus + span, .floating-field .input:not(:placeholder-shown) + span { top: 6px; color: var(--velocity); font-size: 9px; }
.range { width: 100%; accent-color: var(--velocity); }
.field-valid .input { border-color: var(--success); box-shadow: 0 0 0 3px rgba(105,221,147,.08); }
.field-valid small { color: var(--success); font-size: 11px; }

.ui-dropdown, .ui-popover { position: relative; width: max-content; max-width: 100%; }
.ui-dropdown-menu { position: absolute; z-index: 35; top: calc(100% + 7px); left: 0; width: 210px; max-width: min(280px,calc(100vw - 48px)); padding: 6px; border: 1px solid var(--line-strong); border-radius: 9px; display: none; background: var(--surface-2); box-shadow: var(--shadow); }
.ui-dropdown.open .ui-dropdown-menu { display: grid; }
.ui-dropdown-menu button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.ui-dropdown-menu button:hover, .ui-dropdown-menu button:focus { outline: 0; color: var(--text); background: var(--surface-3); }
.ui-dropdown-menu button.active { color: var(--velocity); background: var(--surface-3); }
.ui-dropdown-menu button svg { width: 15px; height: 15px; margin-left: auto; }
.ui-dropdown-menu button.danger { color: var(--danger); }
.ui-dropdown-divider { height: 1px; margin: 5px 3px; background: var(--line); }
.directory-dropdown .btn-icon { position: relative; }
.directory-dropdown .btn-icon.active { color: var(--velocity); background: var(--surface-3); }
.directory-dropdown .ui-dropdown-menu { right: 0; left: auto; }
.directory-filter-menu { width: 244px; padding: 12px; gap: 11px; }
.directory-filter-menu .select { min-height: 36px; font-size: 12px; }
.directory-filter-menu > button { margin-top: 1px; text-align: center; }
.directory-sort .ui-dropdown-menu button { display: flex; align-items: center; justify-content: space-between; }
.control-count { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid var(--surface-0); border-radius: 99px; display: grid; place-items: center; color: #071006; background: var(--velocity); font-size: 9px; font-weight: 850; }
.ui-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .18s ease; }
.ui-collapse.show { grid-template-rows: 1fr; }
.ui-collapse-body { min-height: 0; margin-top: 0; padding: 0 12px; overflow: hidden; border: 0 solid var(--line); border-radius: 8px; color: var(--muted); line-height: 1.5; transition: margin .18s, padding .18s, border-width .18s; }
.ui-collapse.show .ui-collapse-body { margin-top: 10px; padding: 12px; border-width: 1px; }
.ui-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.ui-accordion-item + .ui-accordion-item { border-top: 1px solid var(--line); }
.ui-accordion-item > button { width: 100%; min-height: 43px; padding: 0 12px; border: 0; display: flex; align-items: center; justify-content: space-between; color: var(--text); background: var(--surface-2); text-align: left; cursor: pointer; }
.ui-accordion-item > button svg { width: 15px; transition: transform .16s; }
.ui-accordion-item.open > button { color: var(--velocity); }
.ui-accordion-item.open > button svg { transform: rotate(180deg); }
.ui-accordion-item > div { display: none; padding: 12px; color: var(--muted); line-height: 1.5; }
.ui-accordion-item.open > div { display: block; }
.ui-tab-list { display: flex; gap: 3px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ui-tab-list button { min-height: 38px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; white-space: nowrap; cursor: pointer; }
.ui-tab-list button.active { color: var(--velocity); border-bottom-color: var(--velocity); }
.ui-tab-panel { min-height: 72px; padding: 14px 4px 4px; color: var(--muted); line-height: 1.5; }
.ui-carousel-viewport { min-height: 130px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.ui-carousel-slide { min-height: 130px; padding: 18px; display: none; place-content: center; justify-items: center; gap: 8px; text-align: center; }
.ui-carousel-slide.active { display: grid; }
.ui-carousel-slide span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #091006; background: var(--velocity); font-weight: 850; }
.ui-carousel-controls { margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 11px; }
.scrollspy-demo { padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 10px; color: var(--quiet); }
.scrollspy-demo span.active { color: var(--velocity); font-weight: 750; }
.design-index button.active { color: var(--velocity); background: var(--surface-3); }
.alert > span { min-width: 0; flex: 1; }
.alert-close { width: 26px; height: 26px; margin-left: auto; padding: 0; border: 0; border-radius: 5px; display: grid; place-items: center; color: currentColor; background: transparent; cursor: pointer; }
.alert-close:hover { background: rgba(255,255,255,.08); }
.alert-close svg { width: 14px; height: 14px; }
.spinner-pulse { border: 0; background: var(--velocity); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .4; } }
.placeholder-stack { margin-top: 18px; display: grid; gap: 8px; }
.placeholder-stack span { height: 10px; border-radius: 4px; background: var(--surface-3); animation: shimmer-opacity 1.2s ease-in-out infinite alternate; }
.placeholder-stack span:nth-child(2) { width: 86%; }
.placeholder-stack span:nth-child(3) { width: 58%; }
@keyframes shimmer-opacity { to { opacity: .42; } }
.list-group { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.list-group button { width: 100%; min-height: 43px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); background: var(--surface-2); text-align: left; cursor: pointer; }
.list-group button:last-child { border-bottom: 0; }
.list-group button.active { color: var(--velocity); background: var(--velocity-soft); }
.list-group button:disabled { opacity: .4; cursor: not-allowed; }
.ui-offcanvas { position: fixed; z-index: 102; inset: 0 0 0 auto; width: min(360px,88vw); padding: 18px; border-left: 1px solid var(--line-strong); background: var(--surface-1); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .2s ease; }
.ui-offcanvas.show { transform: translateX(0); }
.ui-offcanvas header { min-height: 48px; margin: -8px 0 22px; display: flex; align-items: center; justify-content: space-between; }
.ui-offcanvas-backdrop { position: fixed; z-index: 101; inset: 0; display: none; background: rgba(2,4,3,.72); }
.ui-offcanvas-backdrop.show { display: block; }
[data-ui-tooltip] { position: relative; }
[data-ui-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 35; left: 50%; bottom: calc(100% + 8px); padding: 5px 7px; border-radius: 5px; color: var(--text); background: #030504; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%,4px); pointer-events: none; white-space: nowrap; font-size: 10px; transition: .14s; }
[data-ui-tooltip]:hover::after, [data-ui-tooltip]:focus-visible::after { opacity: 1; transform: translate(-50%,0); }
.ui-popover-panel { position: absolute; z-index: 35; top: calc(100% + 8px); right: 0; width: 220px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 9px; display: none; background: var(--surface-2); box-shadow: var(--shadow); }
.ui-popover.open .ui-popover-panel { display: block; }
.ui-popover-panel strong, .ui-popover-panel span { display: block; }
.ui-popover-panel span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.auth-shell { min-height: 100svh; display: grid; place-items: stretch; padding: 0; overflow-x: hidden; background: var(--surface-0); }
.auth-card { width: min(420px,100%); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: rgba(19,23,21,.92); box-shadow: var(--shadow); }
.auth-brand { min-height: 43px; display: flex; align-items: center; margin-bottom: 32px; }
.auth-brand-logo { display: block; width: 160px; height: auto; }
.auth-layout { width: 100%; min-height: 100svh; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.auth-visual-panel { position: relative; min-width: 0; min-height: 100svh; overflow: hidden; background: var(--ink); }
.auth-visual-photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.auth-visual-shade { position: absolute; inset: 0; background: linear-gradient(115deg,#000000f5 0%,#000000d1 24%,#0000008f 43%,#00000030 62%,transparent 80%); }
.auth-form-panel { min-width: 0; min-height: 100svh; padding: 40px clamp(28px,4.5vw,76px) 24px; display: flex; flex-direction: column; background: var(--surface-0); }
.auth-form-content { width: 100%; max-width: 400px; margin: auto; padding: 48px 0; }
.auth-shell .auth-card { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-shell .auth-brand { margin-bottom: 36px; }
.auth-heading { margin-bottom: 28px; }
.auth-shell .auth-heading h1 { margin: 0; }
.auth-heading p { margin-top: 8px; color: var(--muted); }
.auth-password-field { position: relative; display: block; }
.auth-password-field .input { padding-right: 46px; }
.auth-password-toggle { position: absolute; top: 4px; right: 4px; }
.auth-password-toggle[aria-pressed="true"]::after { content: ""; position: absolute; width: 18px; height: 1px; background: currentColor; transform: rotate(45deg); }
.auth-submit { width: 100%; margin-top: 10px; justify-content: space-between; }
.auth-registration-warning { margin-bottom: 18px; }
.auth-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; color: var(--quiet); font-size: var(--type-body-sm); }
.auth-footer > span { max-width: 290px; }
.auth-footer small { white-space: nowrap; }
.auth-motion-root { position: fixed; inset: 0; z-index: 1000; }
.auth-motion-root .auth-motion { --auth-motion-ease: cubic-bezier(.22,1,.36,1); position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; color: var(--text); background: #000; outline: none; }
.auth-motion-header { position: absolute; z-index: 1; top: 24px; right: 32px; left: 32px; display: flex; align-items: center; justify-content: space-between; }
.auth-motion-header > span { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-bold); letter-spacing: .14em; }
.auth-motion-content { position: relative; width: 100%; padding: 24px; text-align: center; }
.auth-motion-mark { width: 180px; height: 180px; margin: auto; }
.auth-motion-eye-idle, .auth-motion-symbol { width: 100%; height: 100%; display: block; }
.auth-motion-eye-idle { transform-origin: center; }
.auth-motion-background { fill: var(--velocity); opacity: 0; transform: scale(.88); transform-origin: center; }
.auth-motion-eye, .auth-motion-iris { fill: var(--velocity); }
.auth-motion-eye { transform: translateY(103px); }
.auth-motion-iris { transform: translateY(-171.5px); }
.auth-motion-details { position: absolute; top: calc(50% + 104px); right: 20px; left: 20px; display: flex; flex-direction: column; align-items: center; }
.auth-motion-track { width: 80px; height: 2px; overflow: hidden; border-radius: 4px; background: var(--velocity-soft); }
.auth-motion-track span { width: 100%; height: 100%; display: block; background: var(--velocity); transform-origin: left; }
.auth-motion-concept { min-height: 21px; margin-top: 22px; color: var(--muted); }
.auth-motion-farewell { margin-top: 24px; }
.auth-motion-farewell p { margin-top: 10px; color: var(--muted); }
.auth-motion[data-flow="entry"] .auth-motion-background { animation: auth-vizyon-tile .7s .45s var(--auth-motion-ease) both; }
.auth-motion[data-flow="entry"] .auth-motion-eye { animation: auth-vizyon-eye .95s .7s var(--auth-motion-ease) both, auth-vizyon-color .6s .52s both; }
.auth-motion[data-flow="entry"] .auth-motion-iris { animation: auth-vizyon-iris .95s .7s var(--auth-motion-ease) both, auth-vizyon-color .6s .52s both; }
.auth-motion[data-flow="entry"] .auth-motion-eye-idle { animation: auth-vizyon-blink 2.8s 1.7s both; }
.auth-motion[data-flow="entry"] .auth-motion-iris-look { animation: auth-vizyon-look 3s 1.7s var(--auth-motion-ease) both; }
.auth-motion[data-flow="entry"] .auth-motion-track { animation: auth-vizyon-appear .25s 1.9s both; }
.auth-motion[data-flow="entry"] .auth-motion-track span { animation: auth-vizyon-progress 3s 1.9s cubic-bezier(.25,.5,.35,1) both; }
.auth-motion[data-flow="farewell"] .auth-motion-track span { animation: auth-vizyon-progress 2.8s cubic-bezier(.25,.5,.35,1) reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-track { animation: auth-vizyon-appear .25s 2.8s reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-eye-idle { animation: auth-vizyon-blink 2.6s reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-iris-look { animation: auth-vizyon-look 2.6s var(--auth-motion-ease) reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-eye { animation: auth-vizyon-eye .95s 2.8s var(--auth-motion-ease) reverse both, auth-vizyon-color .6s 3.3s reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-iris { animation: auth-vizyon-iris .95s 2.8s var(--auth-motion-ease) reverse both, auth-vizyon-color .6s 3.3s reverse both; }
.auth-motion[data-flow="farewell"] .auth-motion-background { animation: auth-vizyon-tile .7s 3.3s var(--auth-motion-ease) reverse both; }
@keyframes auth-vizyon-tile { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.88); } }
@keyframes auth-vizyon-color { from { fill: #050505; } to { fill: #b7ff2a; } }
@keyframes auth-vizyon-eye { from { transform: translateY(0); } to { transform: translateY(103px); } }
@keyframes auth-vizyon-iris { from { transform: translateY(0); } to { transform: translateY(-171.5px); } }
@keyframes auth-vizyon-blink { 0%,18%,30%,65%,78%,100% { transform: scaleY(1); } 24%,72% { transform: scaleY(.09); } }
@keyframes auth-vizyon-look { 0%,100% { transform: translateX(0); } 20%,33% { transform: translateX(35px); } 49% { transform: translateX(0); } 68%,80% { transform: translateX(-28px); } }
@keyframes auth-vizyon-progress { 0% { transform: scaleX(0); } 45% { transform: scaleX(.55); } 75% { transform: scaleX(.72); } 100% { transform: scaleX(1); } }
@keyframes auth-vizyon-appear { from { opacity: 0; } to { opacity: 1; } }
.sidebar-toggle-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.sidebar-toggle-option { min-width: 0; display: grid; gap: 9px; }
.sidebar-toggle-option > small { color: var(--muted); }
.sidebar-toggle-stage { position: relative; width: min(132px,calc(100% - 14px)); height: 76px; border-right: 1px solid var(--line-strong); border-radius: 8px 0 0 8px; background: #0b0e0c; }
.design-sidebar-toggle { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; display: grid; place-items: center; color: var(--muted); background: var(--surface-1); box-shadow: 0 4px 15px rgba(0,0,0,.35); }
.design-sidebar-toggle svg { width: 14px; height: 14px; }
.design-sidebar-toggle-edge { position: absolute; top: 24px; right: -14px; }
.design-sidebar-toggle-inline { margin: 24px 0 0 18px; }
.auth-card h1 { margin: 0 0 25px; font-size: 28px; letter-spacing: -.04em; }
.auth-card > p { margin: -13px 0 25px; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 14px; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted); }
.link-button { border: 0; background: transparent; color: var(--velocity); cursor: pointer; font-weight: 750; }
.form-error { color: var(--danger); font-size: 12px; }
.form-error:empty { display: none; }
.auth-code-input { text-transform: uppercase; letter-spacing: .055em; }
.auth-invite-context { margin: -10px 0 22px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; background: var(--surface-2); }
.auth-invite-context > svg { width: 21px; color: var(--velocity); }
.auth-invite-context strong, .auth-invite-context small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-invite-context small { margin-top: 2px; color: var(--muted); }

.access-page .page-header { align-items: flex-start; }
.access-table { min-width: 780px; }
.access-table th:last-child, .access-table td:last-child { text-align: right; }
.table-actions-heading { width: 150px; }
.table-primary { min-width: 0; display: grid; gap: 3px; }
.table-primary strong, .table-primary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-primary strong { font-size: var(--type-body); line-height: var(--leading-body); }
.table-primary small { color: var(--quiet); font-size: var(--type-caption); }
.table-primary code { color: var(--quiet); }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 5px; white-space: nowrap; }
.table-actions > small { color: var(--quiet); }
.muted-row { opacity: .58; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(310px,1fr)); gap: 14px; }
.role-card .card-header { align-items: center; }
.role-card .card-header > div { min-width: 0; }
.role-card .card-header h2, .role-card .card-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-card .card-header small { margin-top: 4px; color: var(--quiet); }
.role-card .card-body { min-height: 210px; display: flex; flex-direction: column; }
.role-card .card-body > p { min-height: 42px; color: var(--muted); font-size: var(--type-body-sm); }
.permission-list { margin: 17px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.permission-list span { min-height: 28px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 650; }
.permission-list svg { width: 13px; color: var(--velocity); }
.role-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 7px; }
.permission-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.permission-fieldset legend { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 650; }
.permission-options { display: grid; gap: 7px; }
.permission-option { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; align-items: start; background: var(--surface-2); cursor: pointer; }
.permission-option:has(input:checked) { border-color: rgba(183,255,42,.3); background: var(--velocity-soft); }
.permission-option input { margin: 3px 0 0; accent-color: var(--velocity); }
.permission-option strong, .permission-option small { display: block; }
.permission-option small { margin-top: 3px; color: var(--quiet); line-height: 1.4; }
.permission-option.locked { cursor: default; }
.form-help { color: var(--quiet); font-size: 11px; line-height: 1.5; }
.access-code-result { display: grid; justify-items: center; gap: 13px; text-align: center; }
.access-code-result > svg { width: 34px; height: 34px; color: var(--velocity); }
.access-code-result > p, .access-code-result > small { color: var(--muted); }
.access-code-result > code { width: 100%; padding: 15px 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--velocity); background: #090c0a; font-size: 16px; font-weight: 750; letter-spacing: .07em; overflow-wrap: anywhere; user-select: all; }
.audit-query-toolbar { margin-bottom: 18px; }
.audit-query-toolbar .library-tools { flex: 0 1 auto; }
.audit-search-switch.search-open .library-inline-search { width: 310px; max-width: 310px; }
.audit-filter-menu { width: min(640px,calc(100vw - 72px)); max-width: min(640px,calc(100vw - 72px)); grid-template-columns: repeat(3,minmax(150px,1fr)); gap: 12px; padding: 14px; }
.audit-filter-menu > .audit-clear { grid-column: 1 / -1; margin-top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.audit-filter-menu > .audit-clear svg { width: 15px; height: 15px; margin: 0; }
.audit-table { min-width: 1040px; }
.audit-table th:first-child { width: 34%; }
.modal-audit { width: min(940px,100%); }
.audit-detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.audit-detail-summary { margin: 14px 0 18px; color: var(--text); font-size: 16px; font-weight: 720; line-height: 1.45; }
.audit-facts { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.audit-facts > div { min-width: 0; padding: 10px 12px; background: var(--surface-2); }
.audit-facts dt { margin-bottom: 4px; color: var(--quiet); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.audit-facts dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.audit-notice { margin-top: 14px; padding: 11px 12px; display: grid; grid-template-columns: 18px 1fr; gap: 9px; border: 1px solid rgba(105,221,147,.25); border-radius: 8px; color: var(--muted); background: rgba(105,221,147,.06); font-size: 12px; }
.audit-notice.warning { border-color: rgba(255,202,74,.28); background: rgba(255,202,74,.06); }
.audit-notice svg { width: 17px; color: var(--velocity); }
.audit-diff { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.audit-diff section, .audit-detail-section { min-width: 0; }
.audit-diff h3, .audit-detail-section h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.audit-diff pre, .audit-detail-section pre { min-height: 74px; max-height: 260px; margin: 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; color: #c8d1cc; background: #090c0a; font: 11px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-detail-section { margin-top: 18px; }
.audit-item-list, .audit-file-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.audit-item-list > div, .audit-file-list > div { padding: 9px 11px; border-bottom: 1px solid var(--line); }
.audit-item-list > div:last-child, .audit-file-list > div:last-child { border-bottom: 0; }
.audit-item-list strong, .audit-item-list small, .audit-file-list strong, .audit-file-list small { display: block; overflow-wrap: anywhere; }
.audit-item-list small, .audit-file-list small, .audit-empty { margin-top: 3px; color: var(--quiet); font-size: 11px; }
@media (max-width: 1100px) {
  .audit-filter-menu { width: min(520px,calc(100vw - 72px)); max-width: min(520px,calc(100vw - 72px)); grid-template-columns: repeat(2,minmax(150px,1fr)); }
}

@media (max-width: 720px) {
  .audit-filter-menu, .audit-facts, .audit-diff { grid-template-columns: 1fr; }
}

.modal-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(2,4,3,.82); }
.modal { width: min(520px,100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-1); box-shadow: var(--shadow); }
.modal-upload { width: min(640px,100%); display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; }
.modal-upload .modal-body { overflow-y: auto; }
.modal-header { min-height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { width: min(360px,calc(100vw - 40px)); padding: 13px 14px; display: grid; grid-template-columns: 20px 1fr; gap: 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: #181d1a; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.success { border-color: rgba(105,221,147,.35); }
.toast.error { border-color: rgba(255,93,98,.4); }
.toast svg { width: 18px; height: 18px; color: var(--velocity); }
.toast.error svg { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.editor-shell { position: fixed; inset: 0; z-index: 120; display: grid; grid-template-rows: 48px minmax(0,1fr) 28px; background: #080a09; }
.editor-topbar { display: grid; grid-template-columns: minmax(240px,1fr) auto minmax(240px,1fr); align-items: center; gap: 12px; padding: 0 10px; border-bottom: 1px solid #2b302d; background: #121513; }
.editor-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.editor-nav { display: flex; align-items: center; gap: 4px; }
.editor-nav .btn { min-height: 30px; }
.editor-position { min-width: 74px; color: #929c96; text-align: center; font-size: 11px; font-weight: 750; white-space: nowrap; }
.editor-save { display: flex; justify-content: flex-end; gap: 7px; }
.editor-body { min-height: 0; display: grid; grid-template-columns: 54px minmax(0,1fr) 294px; }
.toolrail { padding: 7px; border-right: 1px solid #282e2a; background: #111412; display: flex; flex-direction: column; gap: 5px; }
.tool { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 6px; display: grid; place-items: center; background: transparent; color: #a1aaa5; cursor: pointer; }
.tool:hover { background: #202521; color: #fff; }
.tool.active { border-color: rgba(183,255,42,.35); background: rgba(183,255,42,.1); color: var(--velocity); }
.tool.danger { margin-top: auto; color: #d88386; }
.tool svg { width: 19px; height: 19px; }
.canvas-workspace { position: relative; min-width: 0; min-height: 0; overflow: hidden; background-color: #1d211f; background-image: linear-gradient(45deg,#202522 25%,transparent 25%),linear-gradient(-45deg,#202522 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#202522 75%),linear-gradient(-45deg,transparent 75%,#202522 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.canvas-workspace.switching .canvas-frame { opacity: .62; }
.canvas-loading { position: absolute; z-index: 8; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #c9d0cc; background: rgba(10,13,11,.22); font-size: 12px; font-weight: 700; pointer-events: none; }
.canvas-scroll { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 42px; }
.canvas-frame { position: relative; flex: none; box-shadow: 0 10px 50px rgba(0,0,0,.5); user-select: none; transition: opacity .14s ease; }
.canvas-frame img { width: 100%; height: 100%; display: block; pointer-events: none; }
.annotation-layer { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.annotation-layer.select-mode { cursor: default; }
.annotation-box { fill: rgba(183,255,42,.035); stroke: var(--velocity); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: move; }
.annotation-box:hover { fill: rgba(183,255,42,.08); }
.annotation-box.selected { fill: rgba(183,255,42,.11); stroke: #e3ffad; stroke-width: 2.5; }
.box-label-bg { fill: #0a0e0b; opacity: .9; }
.box-label { fill: var(--velocity); font-family: var(--font); font-weight: 850; paint-order: stroke; stroke: rgba(9,13,10,.55); stroke-width: .7px; }
.resize-handle { fill: #fff; stroke: #111; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: nwse-resize; }
.resize-handle.ne, .resize-handle.sw { cursor: nesw-resize; }
.editor-panel { min-height: 0; overflow: auto; border-left: 1px solid #282e2a; background: #121513; }
.panel-section { padding: 14px; border-bottom: 1px solid #282e2a; }
.panel-section h3 { margin: 0 0 12px; color: #c9cfcb; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.panel-heading { min-height: 28px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading h3 { margin: 0; }
.panel-heading-actions { display: flex; align-items: center; gap: 6px; }
.panel-icon-button { width: 28px; min-width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 6px; display: grid; place-items: center; color: #717b75; background: transparent; cursor: pointer; }
.panel-icon-button:hover { color: #fff; background: #202521; }
.panel-icon-button.active { color: var(--velocity); border-color: rgba(183,255,42,.26); background: rgba(183,255,42,.08); }
.panel-icon-button svg { width: 16px; height: 16px; }
.crop-preview { width: 100%; height: 240px; padding: 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid #303733; background: #080a09; }
.crop-preview canvas, .crop-preview img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.crop-empty { padding: 20px; color: #6f7973; text-align: center; font-size: 12px; }
.coords { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.coord label { display: block; margin-bottom: 4px; color: #747f78; font-size: 10px; }
.coord input { width: 100%; height: 30px; border: 1px solid #343b37; border-radius: 4px; background: #090c0a; color: #dbe0dd; padding: 0 7px; font: 11px ui-monospace, Consolas, monospace; }
.editor-split-control { display: grid; gap: 7px; }
.editor-split-control select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid #343b37; border-radius: 5px; outline: 0; background: #090c0a; color: #dbe0dd; font-size: 11px; }
.editor-split-control select:focus { border-color: var(--velocity); box-shadow: 0 0 0 2px rgba(183,255,42,.1); }
.editor-split-control small { color: #747f78; font-size: 10px; }
.layer-list { display: grid; gap: 4px; max-height: 230px; overflow: auto; }
.layer-item { width: 100%; min-height: 44px; padding: 3px 7px 3px 4px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 8px; align-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #929c96; text-align: left; font: inherit; cursor: pointer; }
.layer-item:hover { background: #1d221f; }
.layer-item.active { border-color: rgba(183,255,42,.25); background: rgba(183,255,42,.08); color: var(--velocity); }
.layer-thumb { width: 36px; height: 36px; display: block; border: 1px solid #303733; border-radius: 4px; background: #080a09; }
.layer-item small { font: 10px ui-monospace,Consolas,monospace; color: #6f7973; }
.editor-status { padding: 0 10px 0 62px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #282e2a; background: #111412; color: #77817b; font-size: 10px; }
.editor-shortcuts { display: grid; gap: 7px; }
.shortcut { display: flex; justify-content: space-between; color: #838d87; font-size: 11px; }
kbd { min-width: 23px; padding: 2px 6px; border: 1px solid #3c443f; border-bottom-width: 2px; border-radius: 4px; background: #1a1f1c; color: #bec6c1; text-align: center; font: 10px ui-monospace,Consolas,monospace; }
.editor-loading { grid-template-rows: 1fr; }
.editor-loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; background: #080a09; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid #354039; border-top-color: var(--velocity); border-radius: 50%; animation: spin .7s linear infinite; }
.btn .spinner.spinner-inline { width: 15px; height: 15px; border-color: rgba(9,16,6,.3); border-top-color: #091006; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 768px) {
  .app-shell.sidebar-collapsed { padding-left: 76px; }
  .sidebar.collapsed { width: 76px; }
  .sidebar.collapsed .brand { justify-content: center; padding-inline: 0; }
  .sidebar.collapsed .brand-logo-full, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-chevron { display: none; }
  .sidebar.collapsed .brand-logo-icon { display: block; }
  .sidebar.collapsed .sidebar-toggle svg { width: 14px; height: 14px; transform: rotate(180deg); }
  .sidebar.collapsed .main-nav a, .sidebar.collapsed .main-nav button.nav-primary { justify-content: center; padding: 0; }
  .sidebar.collapsed .nav-submenu { position: absolute; z-index: 45; left: calc(100% + 9px); top: 0; width: 196px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-1); box-shadow: var(--shadow); }
  .sidebar.collapsed .nav-submenu a { min-height: 38px; justify-content: flex-start; padding: 0 11px; font-size: 12px; }
  .sidebar.collapsed .sidebar-footer { padding-inline: 10px; }
  .sidebar.collapsed .user-chip { justify-content: center; padding-inline: 0; }
  .sidebar.collapsed .user-chip-copy { display: none; }
  .sidebar.collapsed .user-chip-action { display: grid; }
}

@media (max-width: 1199.98px) {
  .page { padding-inline: 28px; }
  .split-layout { grid-template-columns: 1fr; }
  .library-toolbar { align-items: flex-start; }
  .library-tools { flex: 1 1 680px; flex-wrap: wrap; }
  .file-row, .file-list-header { grid-template-columns: 32px 46px minmax(0,1fr) 116px 92px 104px 84px 32px; }
  .library-items:not(.selection-mode) .file-row, .library-items:not(.selection-mode) .file-list-header { grid-template-columns: 46px minmax(0,1fr) 116px 92px 104px 84px 32px; }
}

@media (max-width: 991.98px) {
  .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-body { grid-template-columns: 50px minmax(0,1fr); grid-template-rows: minmax(240px,1fr) minmax(220px,38dvh); }
  .toolrail { grid-row: 1 / -1; }
  .canvas-workspace { grid-column: 2; grid-row: 1; }
  .editor-panel { display: block; grid-column: 2; grid-row: 2; border-top: 1px solid #282e2a; border-left: 0; }
  .grid-12 { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .annotator-demo-body { grid-template-columns: 50px minmax(0,1fr); }
  .annotator-demo-body aside { display: none; }
  .file-row, .file-list-header { grid-template-columns: 32px 46px minmax(0,1fr) 112px 92px 84px 32px; }
  .library-items:not(.selection-mode) .file-row, .library-items:not(.selection-mode) .file-list-header { grid-template-columns: 46px minmax(0,1fr) 112px 92px 84px 32px; }
  .file-date-cell, .file-header-date { display: none; }
}

@media (max-width: 767.98px) {
  :root { --sidebar: 0px; }
  body:has(.app-shell.nav-open) { overflow: hidden; }
  .app-shell, .app-shell.sidebar-collapsed { padding-left: 0; }
  .mobile-menu-toggle { position: fixed; z-index: 55; top: 14px; left: 14px; display: grid; background: #121613; box-shadow: 0 8px 22px rgba(0,0,0,.32); }
  .sidebar-backdrop { position: fixed; z-index: 39; inset: 0; display: block; background: rgba(2,4,3,.7); backdrop-filter: blur(2px); }
  .sidebar, .sidebar.collapsed { inset: 0 auto 0 0; width: min(310px,88vw); transform: translateX(-105%); box-shadow: var(--shadow); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .sidebar-toggle { display: grid; }
  .app-shell.nav-open .mobile-menu-toggle { opacity: 0; pointer-events: none; }
  .brand { padding-left: 20px; }
  .main-nav a { min-height: 46px; }
  .nav-submenu { position: static; width: auto; padding: 2px 0 7px; border: 0; background: transparent; box-shadow: none; }
  .nav-submenu a { min-height: 38px; justify-content: flex-start; padding: 0 13px; font-size: 12px; }
  .page { padding: 20px 18px 48px; }
  .page-header { min-height: 38px; padding-left: 50px; align-items: center; margin-bottom: 24px; }
  .page-header h1 { font-size: 29px; }
  .toolbar { align-items: flex-start; }
  .library-toolbar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .library-toolbar .toolbar-left { width: 100%; min-width: 0; flex-basis: auto; }
  .library-tools { width: 100%; flex: 0 0 auto; display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; align-items: center; justify-content: stretch; gap: 8px; }
  .library-summary { grid-column: 1 / -1; width: 100%; margin: 0; justify-content: space-between; }
  .library-annotate-button { grid-column: 1; justify-self: start; }
  .library-action-switch { grid-column: 2; }
  .library-action-switch.search-open { grid-column: 1 / -1; grid-row: 3; width: 100%; }
  .library-action-switch.search-open .library-inline-search { width: auto; max-width: none; flex: 1 1 auto; }
  .directory-options { grid-column: 3; width: auto; overflow: visible; }
  .directory-options .directory-dropdown:first-child .ui-dropdown-menu { right: auto; left: 0; width: min(210px,calc(100vw - 108px)); }
  .directory-options .directory-sort .ui-dropdown-menu { right: auto; left: -44px; width: min(210px,calc(100vw - 108px)); }
  .library-tools > .view-switch:last-child { grid-column: 4; justify-self: end; }
  .audit-query-toolbar .library-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .audit-query-toolbar .library-action-switch, .audit-query-toolbar .directory-options { grid-column: auto; }
  .audit-query-toolbar .library-action-switch.search-open { order: 2; width: 100%; }
  .audit-query-toolbar .audit-filter-dropdown .audit-filter-menu { right: 0; left: auto; width: min(520px,calc(100vw - 36px)); max-width: min(520px,calc(100vw - 36px)); }
  .compact-select { flex: 0 0 auto; }
  .breadcrumbs { width: 100%; overflow-x: auto; padding-bottom: 3px; }
  .folder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .image-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .file-row { grid-template-columns: 32px 46px minmax(0,1fr) 32px; }
  .library-items:not(.selection-mode) .file-row { grid-template-columns: 46px minmax(0,1fr) 32px; }
  .file-row > span, .file-row > .dataset-badge { display: none; }
  .file-mobile-meta { display: block; }
  .file-list-header { display: none; }
  .folder-row { grid-template-columns: 32px 46px minmax(0,1fr) 32px; }
  .folder-row .folder-row-icon { display: grid; }
  .search-field { width: 100%; }
  .editor-topbar { grid-template-columns: auto minmax(0,1fr) auto; gap: 6px; padding-inline: 5px; }
  .editor-nav { display: flex; min-width: 0; justify-content: center; }
  .editor-position { min-width: 58px; }
  .editor-body { grid-template-columns: 46px minmax(0,1fr); grid-template-rows: minmax(180px,1fr) minmax(260px,44dvh); }
  .toolrail { padding: 4px 3px; }
  .tool { width: 38px; }
  .selection-bar { align-items: flex-start; flex-direction: column; }
  .selection-bar-sticky { top: 62px; }
  .selection-actions { width: 100%; justify-content: flex-start; }
  .detector-switcher { grid-template-columns: 1fr; margin-top: 0; }
  .detector-switcher button { min-height: 50px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .grid-12 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .grid-thirds, .grid-main-aside { grid-template-columns: 1fr; }
  .annotator-demo-top .badge { display: none; }
  .design-index { width: calc(100% - 40px); min-height: 52px; margin-left: 40px; margin-right: 0; padding-left: 8px; flex-wrap: nowrap; }
  .design-section { scroll-margin-top: var(--design-index-offset, 58px); }
  .modal-layer { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 88dvh; border-radius: 15px 15px 0 0; }
  .ui-offcanvas { width: min(330px,90vw); }
}

@media (max-width: 575.98px) {
  .page { padding-inline: 12px; }
  .page-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px 8px; }
  .page-actions { grid-column: 1 / -1; width: 100%; margin: 0; justify-content: flex-end; }
  .page-actions .btn { min-height: 42px; }
  .access-page .page-header { grid-template-columns: 1fr; }
  .access-page .page-actions { grid-column: 1; justify-content: stretch; }
  .access-page .page-actions .btn { width: 100%; }
  .access-page .tabs { overflow-x: auto; }
  .access-page .tab { flex: 0 0 auto; }
  .editor-save .btn-ghost { width: 38px; padding-inline: 0; font-size: 0; }
  .editor-save .btn-primary { width: 38px; padding-inline: 0; font-size: 0; }
  .editor-title > .badge { display: none; }
  .stats-row, .folder-grid, .catalog-grid { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .image-meta { padding-inline: 9px; grid-template-columns: minmax(0,1fr) 30px; }
  .library-tools { gap: 8px; }
  .library-summary { flex: 1 0 100%; width: 100%; justify-content: space-between; }
  .library-summary span { flex: 1; }
  .library-summary span + span { text-align: right; }
  .directory-options { margin-top: 0; }
  .empty { min-height: 180px; padding: 22px 14px; }
  .selection-actions .btn { flex: 1 1 auto; }
  .selection-actions .btn-icon { flex: 0 0 32px; }
  .pagination { gap: 7px; font-size: 12px; }
  .component-demo { padding: 14px; }
  .swatches { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-halves { grid-template-columns: 1fr; }
  .type-hero { font-size: 64px; }
  .type-display { font-size: 30px; }
  .input-group { flex-wrap: wrap; }
  .input-group > span { border-radius: 8px 0 0 8px; }
  .input-group .input { width: calc(100% - 42px); border-radius: 0 8px 8px 0; }
  .input-group .btn { width: 100%; margin-top: 7px; border-radius: 8px; }
  .modal-header, .modal-body, .modal-footer { padding-inline: 14px; }
  .upload-settings-grid { grid-template-columns: 1fr; }
  .upload-file-preview > header small { display: none; }
  .upload-thumbnail-strip { grid-auto-columns: 60px; }
  .upload-thumbnail { width: 60px; height: 60px; }
  .upload-directory-picker .directory-picker-list { max-height: 20dvh; }
  .directory-picker-current { grid-template-columns: 36px minmax(0,1fr); }
  .directory-picker-current > .badge { grid-column: 2; justify-self: start; }
  .directory-picker-list { max-height: 32dvh; }
  .toast-stack { right: 10px; bottom: 10px; left: 10px; }
  .toast { width: 100%; }
  .annotator-demo-top { gap: 5px; }
  .annotator-demo-top .btn-primary { font-size: 0; width: 38px; padding: 0; }
  .icon-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .icon-tile { min-height: 82px; }
}

@media (max-width: 760px) {
  .auth-layout { grid-template-columns: minmax(0,1fr); }
  .auth-visual-panel { display: none; }
  .auth-form-panel { min-height: 100svh; padding: 28px 24px 24px; }
  .auth-form-content { padding: 44px 0; }
  .auth-footer { gap: 20px; }
  .auth-motion-header { top: 20px; right: 24px; left: 24px; }
  .auth-motion-mark { width: 160px; height: 160px; }
  .auth-motion-details { top: calc(50% + 94px); }
  .design-auth-shell .auth-layout { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .design-auth-shell .auth-visual-panel { display: block; }
}

@media (max-width: 460px) {
  .auth-form-panel { padding-inline: 20px; }
  .auth-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .design-auth-shell .auth-layout { grid-template-columns: minmax(0,1fr); }
  .design-auth-shell .auth-visual-panel { display: none; }
}

/* Product photos are modifiers of the shared catalog/media components. */
.catalog-item--media { min-height: 80px; }
.catalog-item-link { display: flex; gap: 12px; align-items: center; min-width: 0; color: inherit; text-decoration: none; }
.catalog-item-cover { display: grid; place-items: center; flex: 0 0 54px; height: 62px; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.catalog-item-cover img { width: 100%; height: 100%; object-fit: contain; }
.catalog-item-link .catalog-item-copy { flex: 1; }
.product-photo-thumb { display: block; border: 0; padding: 0; width: 100%; }
.product-photo-thumb img { object-fit: contain; }
.editor-context-title { max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--type-caption); color: var(--muted); }
@media (max-width: 760px) { .editor-context-title { max-width: 100px; } .editor-save .product-photo-save-next { font-size: var(--type-caption); padding-inline: 8px; } }

@media (max-height: 540px) {
  .auth-motion-mark { width: 120px; height: 120px; }
  .auth-motion-content { margin-top: -48px; }
  .auth-motion-details { top: calc(50% + 70px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .auth-motion[data-flow="farewell"] .auth-motion-background { opacity: 1; transform: scale(1); }
  .auth-motion[data-flow="farewell"] .auth-motion-eye, .auth-motion[data-flow="farewell"] .auth-motion-iris { fill: #050505; transform: none; }
  .auth-motion[data-flow="farewell"] .auth-motion-track { opacity: 0; }
}
