:root{--background:210 40% 98%;--foreground:222 47% 11%;--muted:214 32% 91%;--muted-foreground:215 16% 35%;--border:214 32% 91%;--input:214 32% 91%;--primary:218 58% 25%;--primary-foreground:0 0% 100%;--ring:218 58% 25%;--destructive:0 72% 44%;--destructive-foreground:0 0% 100%;--radius:0.3rem;--sidebar-background:218 58% 25%;--sidebar-foreground:0 0% 100%;--sidebar-foreground-muted:0 0% 100%;--sidebar-border:218 48% 20%;--accent:44 44% 52%;color-scheme:light}.dark{--background:222 47% 11%;--foreground:210 40% 98%;--muted:217 33% 17%;--muted-foreground:215 20% 65%;--border:217 33% 17%;--input:217 33% 17%;--primary:218 58% 25%;--primary-foreground:0 0% 100%;--ring:218 58% 25%;--destructive:0 72% 44%;--destructive-foreground:0 0% 100%;--sidebar-background:218 58% 25%;--sidebar-foreground:0 0% 100%;--sidebar-foreground-muted:0 0% 100%;--sidebar-border:218 48% 20%;--accent:44 44% 52%}*{box-sizing:border-box}body,html{margin:0;min-height:100%;background:hsl(var(--background));color:hsl(var(--foreground));font-family:Inter,Geist,Segoe UI,system-ui,-apple-system,sans-serif}body{overflow-x:hidden}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.shell{min-height:100vh;background:hsl(var(--background))}.shell-sidebar{position:fixed;inset:0 auto 0 0;width:264px;background:hsl(var(--sidebar-background));color:hsl(var(--sidebar-foreground));border-right:1px solid hsl(var(--sidebar-border));display:flex;flex-direction:column;gap:20px;padding:18px 16px 16px}.shell-main{margin-left:264px;min-height:100vh;background:hsl(var(--background))}.shell-brand{display:flex;align-items:center;gap:12px}.shell-brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:.35rem;background:rgba(255,255,255,.12);color:#fff;font-size:.8rem;font-weight:700;letter-spacing:.08em}.shell-brand-eyebrow{margin:0 0 2px;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;opacity:.8}.shell-brand strong{display:block;font-size:1rem;font-weight:700}.shell-nav,.shell-sidebar-section{display:grid;grid-gap:6px;gap:6px}.shell-sidebar-heading{margin:8px 12px 2px;color:rgba(255,255,255,.8);font-size:.72rem;line-height:1;letter-spacing:.12em;text-transform:uppercase;font-weight:700}.shell-sidebar-links{display:grid;grid-gap:6px;gap:6px}.shell-nav-link{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--radius);color:rgba(255,255,255,.8);transition:background-color .14s ease,color .14s ease,transform .14s ease}.shell-nav-link.active,.shell-nav-link:hover{color:#fff;background:rgba(255,255,255,.08)}.shell-nav-icon{width:16px;height:16px;display:inline-grid;place-items:center}.shell-nav-icon svg{width:16px;height:16px}.shell-sidebar-footer{margin-top:auto;display:grid;grid-gap:10px;gap:10px;border-top:1px solid rgba(255,255,255,.12);padding-top:14px}.shell-role-pill{display:inline-flex;align-items:center;width:-moz-fit-content;width:fit-content;border-radius:999px;padding:4px 10px;background:rgba(255,255,255,.12);color:#fff;font-size:.75rem;font-weight:700}.shell-user-email{color:rgba(255,255,255,.8);word-break:break-word}.shell-logout{width:100%;justify-content:center;border-color:rgba(255,255,255,.22);color:#fff}.shell-header{position:-webkit-sticky;position:sticky;top:0;z-index:10;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 16px;border-bottom:1px solid hsl(var(--border));background:hsl(var(--background)/.96);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.auth-panel h1,.shell-header-copy h1{margin:0;line-height:1.05;font-size:clamp(2rem,1.2rem + 1vw,2.8rem);font-weight:700;letter-spacing:-.03em}.shell-header-copy .muted{margin-top:4px}.shell-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.shell-content{padding:18px 24px 28px}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-panel{width:min(100%,440px);padding:24px;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--background))}.auth-panel .message,.eyebrow,.message{color:hsl(var(--primary))}.eyebrow{margin:0 0 8px;font-size:.72rem;line-height:1;letter-spacing:.12em;text-transform:uppercase;font-weight:700}.muted{color:hsl(var(--muted-foreground))}.pill,.status-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 10px;font-size:.72rem;font-weight:700}.pill,.status-badge.active{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.status-badge.archived{background:hsl(var(--muted));color:hsl(var(--foreground))}.stack{display:grid;grid-gap:16px;gap:16px}.panel{padding:0 0 18px;border-bottom:1px solid hsl(var(--border))}.document-row,.panel-header,.version-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.panel-header{margin-bottom:12px}.panel h2{margin:0;line-height:1.1;font-size:1.25rem;font-weight:700}.table-shell{overflow-x:auto;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--background))}.data-table{width:100%;border-collapse:collapse;min-width:960px}.data-table thead th{position:-webkit-sticky;position:sticky;top:0;z-index:1;text-align:left;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:hsl(var(--muted-foreground));background:hsl(var(--background))}.data-table td,.data-table th{padding:.5rem .75rem;border-bottom:1px solid hsl(var(--border));vertical-align:top}.data-table tbody tr:nth-child(2n){background:hsl(var(--muted)/.3)}.data-table tbody tr:hover{background:hsl(var(--muted)/.55)}.table-actions,.table-actions-head{text-align:right}.table-select-head{width:42px}.table-actions{white-space:nowrap}.table-actions .button{margin-left:8px}.table-title-cell{display:grid;grid-gap:4px;gap:4px}.table-title-cell strong{font-weight:600}.table-title-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.version-pill{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;background:hsl(var(--primary));color:hsl(var(--primary-foreground));font-size:.7rem;font-weight:700}.tag-badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.tag-badge{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid hsl(var(--border));border-radius:999px;background:hsl(var(--muted)/.35);color:hsl(var(--foreground));font-size:.72rem;font-weight:700;line-height:1;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.tag-badge:hover{border-color:hsl(var(--primary));color:hsl(var(--primary));background:hsl(var(--background))}.tag-empty{display:inline-block}.tag-picker{display:grid;grid-gap:6px;gap:6px}.tag-picker-shell{position:relative;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--background))}.tag-picker-input-row{padding:8px 10px}.tag-picker-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.tag-picker-chips input{flex:1 1 180px;min-width:180px;border:0;padding:6px 0;background:transparent;box-shadow:none}.tag-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid hsl(var(--border));border-radius:999px;padding:4px 10px;background:hsl(var(--muted)/.35);color:hsl(var(--foreground));font-size:.76rem;font-weight:700}.tag-chip:hover{border-color:hsl(var(--primary))}.tag-picker-menu{display:none;border-top:1px solid hsl(var(--border));max-height:240px;overflow:auto}.tag-picker-menu.open{display:grid}.tag-picker-option{display:grid;grid-gap:2px;gap:2px;padding:10px 12px;border:0;background:transparent;color:hsl(var(--foreground));text-align:left}.tag-picker-option:hover{background:hsl(var(--muted)/.4)}.tag-picker-option span{color:hsl(var(--muted-foreground));font-size:.82rem}.tag-picker-empty-state{margin:0;padding:10px 12px}.table-toggle{min-height:28px;padding:0 10px;font-size:.78rem}.documents-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-gap:16px;gap:16px}.documents-layout-open{grid-template-columns:minmax(0,1fr) 420px;align-items:start}.documents-table-shell{min-width:0}.group-child td:first-child{padding-left:28px}.group-indent{padding-left:24px}.row-active{background:hsl(var(--muted)/.55)!important}.inspector-preview{margin-bottom:12px;border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden}.inspector-preview object{display:block;width:100%;height:280px;background:hsl(var(--background))}.lock-banner{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid hsl(var(--border));border-left-width:4px;border-radius:var(--radius);background:hsl(var(--muted)/.28)}.lock-banner strong{display:block;margin-bottom:4px}.lock-banner.idle,.lock-banner.owned{border-left-color:hsl(var(--primary))}.lock-banner.locked{border-left-color:hsl(var(--destructive))}.bulk-toolbar{position:fixed;left:50%;bottom:20px;z-index:40;transform:translateX(-50%);gap:16px;padding:12px 16px;border:1px solid hsl(var(--border));border-radius:999px;background:hsl(var(--background));box-shadow:none}.bulk-controls,.bulk-toolbar{display:flex;align-items:center}.bulk-controls{gap:10px}.bulk-controls select{min-width:180px}.bulk-confirm{width:min(480px,calc(100vw - 24px));margin:20vh auto 0}.admin-filters{grid-template-columns:1.2fr .8fr .8fr auto;align-items:end}.admin-summary{display:flex;gap:8px;flex-wrap:wrap}.row-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.button,.button.danger,.button.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border-radius:var(--radius);border:1px solid transparent;font-weight:700;text-decoration:none;transition:background-color .14s ease,color .14s ease,border-color .14s ease,box-shadow .14s ease}.button{background:hsl(var(--primary));color:hsl(var(--primary-foreground));border-color:hsl(var(--primary))}.button:hover{box-shadow:0 0 0 1px hsl(var(--primary)/.2)}.button.secondary{background:transparent;color:hsl(var(--foreground));border-color:hsl(var(--border))}.button.danger{background:transparent;color:hsl(var(--destructive));border-color:hsl(var(--destructive)/.3)}.button:disabled{opacity:.65;cursor:not-allowed}.command-trigger{min-width:96px}.filter-bar,.stack label{display:grid;grid-gap:6px;gap:6px}.filter-bar{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.filter-bar button{align-self:end}input,select,textarea{width:100%;border:1px solid hsl(var(--input));border-radius:var(--radius);padding:9px 12px;background:transparent;color:hsl(var(--foreground));outline:none}input::placeholder,textarea::placeholder{color:hsl(var(--muted-foreground))}input:focus,select:focus,textarea:focus{border-color:hsl(var(--primary));box-shadow:0 0 0 1px hsl(var(--primary)/.15)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none}textarea{min-height:112px;resize:vertical}.segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:6px;gap:6px;padding:4px;border:1px solid hsl(var(--border));border-radius:var(--radius)}.segmented-option{border:0;border-radius:calc(var(--radius) - 1px);padding:10px 12px;background:transparent;color:hsl(var(--muted-foreground));font-weight:700}.segmented-option.active{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.code-block{margin:0;white-space:pre-wrap;font-size:13px}.admin-form{grid-template-columns:repeat(5,minmax(0,1fr))}.upload-grid{display:grid;grid-gap:12px;gap:12px}.upload-grid-version{grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr) minmax(220px,.8fr);align-items:start}.file-field{display:grid;grid-gap:6px;gap:6px}.file-dropzone{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px dashed hsl(var(--border));border-radius:var(--radius);padding:14px;cursor:pointer;background:hsl(var(--background))}.file-dropzone.drag-active{border-color:hsl(var(--primary));background:hsl(var(--muted)/.35)}.file-dropzone-copy{display:grid;grid-gap:4px;gap:4px}.meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:12px;gap:12px}.message{margin:0}.shell .panel .message{margin-top:8px}.command-overlay,.sheet-overlay{position:fixed;inset:0;z-index:50;background:rgba(15,23,42,.35)}.command-dialog{width:min(720px,calc(100vw - 24px));margin:12vh auto 0;border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--background));overflow:hidden}.command-search-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid hsl(var(--border));padding:12px}.command-input{flex:1 1;border:0;padding:0;box-shadow:none;background:transparent}.command-shortcut{font-size:.75rem;color:hsl(var(--muted-foreground))}.command-list{max-height:48vh;overflow:auto;padding:6px}.command-item{display:grid;grid-gap:4px;gap:4px;padding:10px 12px;border-radius:calc(var(--radius) - 1px);color:hsl(var(--foreground))}.command-item:hover{background:hsl(var(--muted))}.command-item strong{font-weight:600}.command-item span{color:hsl(var(--muted-foreground));font-size:.875rem}.command-empty{margin:0;padding:10px 12px}.sheet{position:-webkit-sticky;position:sticky;top:20px;width:100%;max-height:calc(100vh - 40px);background:hsl(var(--background));border-left:1px solid hsl(var(--border));box-shadow:none;z-index:55;overflow:auto}.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid hsl(var(--border))}.sheet-body{padding:16px}.sheet .panel{padding-bottom:0}.shell .panel:last-child,.stack>.panel:last-child{border-bottom:0}@media (max-width:1080px){.shell{display:block}.shell-sidebar{position:-webkit-sticky;position:sticky;inset:auto;width:auto;height:auto;border-right:0;border-bottom:1px solid hsl(var(--sidebar-border));border-top:0}.shell-main{margin-left:0}.shell-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.shell-sidebar-footer{grid-template-columns:1fr}.shell-content,.shell-header{padding-inline:16px}.admin-form,.filter-bar,.meta-grid{grid-template-columns:1fr}}