@font-face{font-family:InterLocal;src:local("Inter"),local("Segoe UI");font-display:swap}
:root{--red:#a81727;--red-dark:#7f101d;--red-soft:#fbebed;--ink:#201b1c;--muted:#746b6d;--line:#e9e3e4;--surface:#fff;--canvas:#f7f5f5;--green:#207a52;--green-soft:#e8f5ee;--amber:#a66311;--amber-soft:#fff3df;--blue:#3269a8;--blue-soft:#eaf2fb;--shadow:0 14px 38px rgba(48,24,28,.07);--radius:18px;--sidebar:260px}
*{box-sizing:border-box}
html{font-size:16px;scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:var(--canvas);font-family:InterLocal,"Segoe UI",Arial,sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button,a{touch-action:manipulation}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.eyebrow{display:block;margin-bottom:8px;color:var(--red);font-size:.73rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh}
.sidebar{position:fixed;z-index:40;inset:0 auto 0 0;display:flex;width:var(--sidebar);flex-direction:column;border-right:1px solid #ede8e9;background:#fff;padding:28px 20px 20px}
.brand{display:flex;align-items:center;gap:13px;margin:0 5px 38px}
.brand-mark{display:grid;width:48px;height:48px;place-items:center;border-radius:14px;background:var(--red-soft)}
.brand-mark img{width:32px;height:42px;object-fit:contain}
.brand strong,.brand small{display:block}.brand strong{font-size:1.1rem;letter-spacing:-.02em}.brand small{margin-top:1px;color:var(--muted);font-size:.67rem;letter-spacing:.03em}
.main-nav{display:flex;flex-direction:column;gap:7px}
.main-nav a{display:flex;align-items:center;gap:13px;padding:12px 13px;border-radius:11px;color:#635a5c;font-size:.92rem;font-weight:650;transition:.18s ease}
.main-nav a:hover{background:#f9f6f6;color:var(--red)}
.main-nav a.active{background:var(--red-soft);color:var(--red-dark)}
.nav-icon{display:grid;width:25px;height:25px;place-items:center;font-size:1.08rem;font-weight:800}
.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding-top:18px}
.profile-mini{display:flex;align-items:center;gap:11px;padding:6px 5px 15px}
.profile-mini strong,.profile-mini small{display:block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-mini strong{font-size:.84rem}.profile-mini small{color:var(--muted);font-size:.67rem}
.avatar{display:grid;width:36px;height:36px;flex:0 0 36px;place-items:center;border-radius:50%;background:var(--red);color:#fff;font-size:.82rem;font-weight:800}
.logout-button{display:flex;width:100%;align-items:center;justify-content:space-between;border:0;border-radius:10px;background:transparent;padding:10px 11px;color:var(--muted);cursor:pointer;font-size:.82rem}.logout-button:hover{background:#f8f5f5;color:var(--red)}
.workspace{grid-column:2;min-width:0}.page-content{width:min(1420px,100%);margin:0 auto;padding:42px clamp(24px,4vw,60px) 70px}
.mobile-header,.sidebar-scrim{display:none}
.page-header{margin-bottom:28px}.page-header h1{margin:0;color:#241e20;font-size:clamp(1.8rem,3vw,2.45rem);line-height:1.15;letter-spacing:-.04em}.page-header p{margin:9px 0 0;color:var(--muted);font-size:.95rem}
.page-header-split{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.compact-header{align-items:center}.compact-header h1{margin-top:10px}
.back-link{display:inline-flex;align-items:center;color:var(--red);font-size:.82rem;font-weight:750}.back-link:hover{text-decoration:underline}
.header-actions{display:flex;flex-wrap:wrap;gap:10px}
.button{display:inline-flex;min-height:42px;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:10px;padding:10px 17px;cursor:pointer;font-size:.84rem;font-weight:750;line-height:1.2;transition:.18s ease}
.button:hover{transform:translateY(-1px)}.button-primary{border-color:var(--red);background:var(--red);color:#fff;box-shadow:0 8px 20px rgba(168,23,39,.17)}.button-primary:hover{border-color:var(--red-dark);background:var(--red-dark)}
.button-secondary{border-color:var(--line);background:#fff;color:#443b3d}.button-secondary:hover,.button-ghost:hover{border-color:#d3c7c9;background:#fcfafa}.button-ghost{border-color:transparent;background:transparent;color:var(--muted)}.button-large{min-height:52px;width:100%;font-size:.92rem}.button-wide{min-width:170px}
.alert{position:relative;display:flex;align-items:center;gap:12px;margin:0 0 18px;border:1px solid #f0c6cb;border-radius:12px;background:#fff1f2;padding:12px 14px;color:#7e1420;font-size:.86rem;box-shadow:0 8px 20px rgba(80,20,26,.04)}
.alert>span{display:grid;width:25px;height:25px;flex:0 0 25px;place-items:center;border-radius:50%;background:var(--red);color:#fff;font-weight:800}.alert p{margin:0}.alert button{margin-left:auto;border:0;background:transparent;color:inherit;cursor:pointer;font-size:1.3rem}.alert-success{border-color:#b9dfca;background:#effaf4;color:#1d6646}.alert-success>span{background:var(--green)}
.toast-stack{position:fixed;z-index:1000;right:24px;bottom:24px;display:flex;width:min(390px,calc(100vw - 32px));flex-direction:column;gap:11px;pointer-events:none}.toast{--toast-color:var(--red);position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) 28px;align-items:start;gap:12px;overflow:hidden;border:1px solid rgba(62,38,42,.1);border-radius:14px;background:rgba(255,255,255,.98);padding:15px 13px 17px 15px;box-shadow:0 18px 50px rgba(49,25,30,.18),0 4px 14px rgba(49,25,30,.08);opacity:0;pointer-events:auto;transform:translateX(32px) scale(.98);transition:opacity .22s ease,transform .22s ease;backdrop-filter:blur(14px)}.toast-visible{opacity:1;transform:translateX(0) scale(1)}.toast-leaving{opacity:0;transform:translateX(24px) scale(.97)}.toast-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:11px;background:#f6eeee;background:color-mix(in srgb,var(--toast-color) 12%,white);color:var(--toast-color);font-size:1rem;font-weight:900}.toast-content{min-width:0;padding-top:1px}.toast-content strong{display:block;color:#302729;font-size:.78rem}.toast-content p{margin:3px 0 0;color:#74696b;font-size:.72rem;line-height:1.45}.toast-close{display:grid;width:27px;height:27px;place-items:center;border:0;border-radius:7px;background:transparent;color:#978c8e;cursor:pointer;font-size:1.15rem;line-height:1}.toast-close:hover{background:#f3eeee;color:#544a4c}.toast-progress{position:absolute;right:0;bottom:0;left:0;height:4px;background:#f3e9ea;background:color-mix(in srgb,var(--toast-color) 12%,white)}.toast-progress>span{display:block;width:100%;height:100%;background:var(--toast-color);transform-origin:left;animation:toast-countdown 5s linear forwards}.toast-paused .toast-progress>span{animation-play-state:paused}.toast-success{--toast-color:var(--green)}.toast-warning{--toast-color:var(--amber)}.toast-info{--toast-color:var(--blue)}.toast-error{--toast-color:var(--red)}
@keyframes toast-countdown{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:24px}
.stat-card{display:flex;min-width:0;align-items:flex-start;gap:14px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:21px 19px;box-shadow:0 5px 15px rgba(50,20,25,.025)}
.stat-card>div{min-width:0}.stat-card small{display:block;color:var(--muted);font-size:.72rem;font-weight:700}.stat-card strong{display:block;margin:3px 0 2px;font-size:1.75rem;line-height:1.15;letter-spacing:-.04em}.stat-card p{margin:0;color:#988f91;font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat-icon{display:grid;width:42px;height:42px;flex:0 0 42px;place-items:center;border-radius:12px;background:var(--red-soft);color:var(--red);font-weight:850}.stat-icon-green{background:var(--green-soft);color:var(--green)}.stat-icon-amber{background:var(--amber-soft);color:var(--amber)}.stat-icon-blue{background:var(--blue-soft);color:var(--blue)}
.panel{border:1px solid var(--line);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow);overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:20px 24px}.panel-heading h2{margin:0;font-size:1rem}.panel-heading p{margin:3px 0 0;color:var(--muted);font-size:.75rem}.text-link{color:var(--red);font-size:.78rem;font-weight:750}.text-link:hover{text-decoration:underline}.text-link span{margin-left:4px}
.recent-list{padding:3px 22px}.recent-item{display:grid;grid-template-columns:45px minmax(160px,1.5fr) minmax(100px,.5fr) auto 16px;align-items:center;gap:16px;border-bottom:1px solid #f0ecec;padding:15px 3px;transition:.15s}.recent-item:last-child{border-bottom:0}.recent-item:hover{padding-left:8px;background:#fdfbfb}.book-cover{display:grid;width:42px;height:51px;flex:0 0 auto;place-items:center;overflow:hidden;border-radius:5px 9px 9px 5px;background:linear-gradient(145deg,#b82031,#86101e);box-shadow:inset 4px 0 0 rgba(255,255,255,.16),0 5px 12px rgba(100,12,22,.17);color:#fff}.book-cover b{font-family:Georgia,"Times New Roman",serif;font-size:.78rem;letter-spacing:.03em}.book-cover:before{width:17px;height:22px;border:1.5px solid rgba(255,255,255,.94);border-left-width:3px;border-radius:2px 4px 4px 2px;box-shadow:inset 3px 0 0 rgba(255,255,255,.16);content:""}.book-cover.has-thumbnail{background:#eee;box-shadow:0 5px 12px rgba(55,30,33,.16)}.book-cover.has-thumbnail:before,.book-cover.has-initials:before{display:none}.book-cover.has-thumbnail img{width:100%;height:100%;object-fit:cover}.book-cover-small{width:34px;height:41px}.book-cover-small:before{width:14px;height:18px}.book-cover-small b{font-size:.65rem}.cover-tone-1{background:linear-gradient(145deg,#b82031,#86101e)}.cover-tone-2{background:linear-gradient(145deg,#315d83,#193b59)}.cover-tone-3{background:linear-gradient(145deg,#7f5a35,#52361f)}.cover-tone-4{background:linear-gradient(145deg,#47705a,#294a39)}.cover-tone-5{background:linear-gradient(145deg,#73547f,#493451)}.cover-tone-6{background:linear-gradient(145deg,#776f62,#48423a)}
.recent-main,.recent-meta{min-width:0}.recent-main strong,.recent-main small,.recent-meta strong,.recent-meta small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recent-main strong{font-size:.85rem}.recent-main small,.recent-meta small{margin-top:2px;color:var(--muted);font-size:.7rem}.recent-meta strong{font-size:.76rem}.chevron{color:#b0a6a8;font-size:1.4rem}
.badge{display:inline-flex;align-items:center;border-radius:99px;padding:5px 9px;font-size:.64rem;font-weight:800;white-space:nowrap}.badge-success{background:var(--green-soft);color:var(--green)}.badge-muted{background:#f1eeee;color:#786f70}
.quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:15px;margin-top:20px}.quick-grid>a{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:14px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:16px 18px;transition:.18s}.quick-grid>a:hover{border-color:#d8c8ca;box-shadow:0 9px 24px rgba(50,20,25,.06);transform:translateY(-1px)}.quick-grid>a>span{display:grid;width:40px;height:40px;place-items:center;border-radius:10px;background:var(--red-soft);color:var(--red);font-weight:800}.quick-grid strong,.quick-grid small{display:block}.quick-grid strong{font-size:.82rem}.quick-grid small{margin-top:2px;color:var(--muted);font-size:.7rem}.quick-grid b{color:var(--red)}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:16px 20px}.search-form{display:flex;width:min(500px,100%);align-items:center;gap:10px;border:1px solid #ded6d7;border-radius:10px;background:#faf9f9;padding:0 12px}.search-form:focus-within{border-color:#c4868e;background:#fff;box-shadow:0 0 0 3px var(--red-soft)}.search-form>span{color:#9f9597;font-size:1.2rem}.search-form input{width:100%;height:41px;border:0;outline:0;background:transparent;color:var(--ink);font-size:.8rem}.search-form a{color:#948a8c;font-size:1.2rem}.result-count{color:var(--muted);font-size:.72rem;font-weight:700;white-space:nowrap}
.table-wrap{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table th{border-bottom:1px solid var(--line);background:#fcfbfb;padding:11px 15px;color:#817779;font-size:.63rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.data-table td{border-bottom:1px solid #f0ecec;padding:13px 15px;font-size:.76rem;vertical-align:middle}.data-table tbody tr:hover{background:#fdfbfb}.data-table tbody tr:last-child td{border-bottom:0}.data-table td>strong,.data-table td>small{display:block}.data-table td>small{max-width:180px;margin-top:3px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-cell{display:flex;min-width:220px;align-items:center;gap:11px}.title-cell>span:last-child{min-width:0}.title-cell strong,.title-cell small{display:block;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-cell strong{font-size:.77rem}.title-cell small{margin-top:3px;color:var(--muted);font-size:.68rem}.signature{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.7rem}.catalog-label{display:inline-grid;min-width:29px;height:27px;place-items:center;border-radius:7px;background:#f3eff0;color:#685d5f;font-size:.67rem;font-weight:800}
.actions-cell{display:flex!important;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.actions-cell form{display:inline-flex}.icon-button{display:inline-grid;width:33px;height:33px;place-items:center;border:0;border-radius:8px;background:transparent;color:#6f6466;cursor:pointer;font-size:1rem}.icon-button:hover{background:#f0ebec;color:var(--red)}.icon-button-danger:hover{background:#fff0f1;color:#b11527}
.pagination{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:14px 20px;color:var(--muted);font-size:.72rem}.pagination a{border:1px solid var(--line);border-radius:8px;background:#fff;padding:7px 11px;color:#594e50;font-weight:700}.pagination a:hover{border-color:#cfbfc1}.pagination a.disabled{pointer-events:none;opacity:.4}
.empty-state{padding:44px 20px;text-align:center}.empty-state>span{display:grid;width:48px;height:48px;margin:0 auto 11px;place-items:center;border-radius:14px;background:var(--red-soft);color:var(--red);font-weight:800}.empty-state h3{margin:0;font-size:.95rem}.empty-state p{margin:5px 0 0;color:var(--muted);font-size:.78rem}.large-empty{padding:72px 20px}.large-empty .button{margin-top:18px}
.words-table th:first-child,.words-table td:first-child{width:30%}.dictionary-name{display:inline-flex;border-radius:7px;background:var(--blue-soft);padding:5px 8px;color:var(--blue);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.69rem}
.record-form{display:flex;flex-direction:column;gap:17px}.record-fieldset{display:flex;min-width:0;flex-direction:column;gap:17px;margin:0;border:0;padding:0}.record-fieldset[disabled] input,.record-fieldset[disabled] select,.record-fieldset[disabled] textarea{border-color:#e6e0e1;background:#f8f6f6;color:#615759;opacity:1}.form-card{border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:26px 28px;box-shadow:0 7px 24px rgba(50,20,25,.035)}.form-section-heading{display:flex;align-items:flex-start;gap:13px;margin-bottom:24px}.form-section-heading>span{display:grid;width:34px;height:34px;flex:0 0 34px;place-items:center;border-radius:10px;background:var(--red-soft);color:var(--red);font-size:.68rem;font-weight:850}.form-section-heading h2{margin:0;font-size:1rem}.form-section-heading p{margin:4px 0 0;color:var(--muted);font-size:.73rem}.form-grid{display:grid;gap:18px 20px}.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.field-full{grid-column:1/-1}.field label{display:block;margin-bottom:6px;color:#514749;font-size:.73rem;font-weight:750}.field input,.field select,.field textarea{display:block;width:100%;border:1px solid #ddd5d6;border-radius:9px;background:#fff;padding:10px 12px;color:var(--ink);outline:0;font-size:.8rem;transition:.15s}.field input,.field select{height:42px}.field textarea{min-height:88px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#bd737d;box-shadow:0 0 0 3px var(--red-soft)}.field small{display:block;margin-top:5px;color:var(--red);font-size:.67rem}.field .field-hint{color:var(--muted)}.field-error input,.field-error select,.field-error textarea{border-color:#c72b3d;background:#fffafb}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:8px 0}.narrow-form{max-width:700px}.narrow-form .field{margin-bottom:18px}
.alert-info{border-color:#c7d9ed;background:#f0f6fc;color:#2b5f94}.alert-info>span{background:var(--blue)}
.role-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:20px}.role-guide-item{display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:17px}.role-guide-item>span{display:grid;width:33px;height:33px;flex:0 0 33px;place-items:center;border-radius:9px;background:#f1eeee;color:#665b5d;font-weight:850}.role-guide-item strong{display:block;font-size:.78rem}.role-guide-item p{margin:3px 0 0;color:var(--muted);font-size:.67rem}.role-guide-item.role-level-2>span{background:var(--blue-soft);color:var(--blue)}.role-guide-item.role-level-3>span{background:var(--red-soft);color:var(--red)}
.user-cell{display:flex;min-width:200px;align-items:center;gap:11px}.user-cell strong,.user-cell small{display:block}.user-cell strong{font-size:.77rem}.user-cell small{margin-top:2px;color:var(--muted);font-size:.67rem}.role-badge{display:inline-flex;align-items:center;gap:6px;border-radius:8px;background:#f1eeee;padding:5px 8px;color:#62585a;font-size:.67rem;font-weight:750;white-space:nowrap}.role-badge b{display:grid;width:18px;height:18px;place-items:center;border-radius:5px;background:#fff}.role-badge.role-level-2{background:var(--blue-soft);color:var(--blue)}.role-badge.role-level-3{background:var(--red-soft);color:var(--red)}.date-cell{color:var(--muted);font-size:.7rem}.inline-note{margin:-5px 0 18px;border-left:3px solid var(--blue);border-radius:0 8px 8px 0;background:var(--blue-soft);padding:10px 12px;color:#315f91;font-size:.72rem}.permission-preview{margin-top:19px}.permission-preview>div{display:none;border-radius:10px;background:#f8f6f6;padding:12px 14px}.permission-preview>div.active{display:block}.permission-preview strong{font-size:.76rem}.permission-preview p{margin:3px 0 0;color:var(--muted);font-size:.68rem}.user-form{max-width:960px}
.files-panel{padding-bottom:18px}.file-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0;padding:20px;list-style:none}.file-card{position:relative;min-width:0;border:1px solid var(--line);border-radius:13px;background:#fff;padding:9px;transition:.18s}.file-card:hover{border-color:#cfbdc0;box-shadow:0 10px 24px rgba(50,20,25,.08)}.file-card.dragging{opacity:.45;transform:scale(.98)}.drag-handle{position:absolute;z-index:2;top:14px;left:14px;display:grid;width:28px;height:28px;place-items:center;border-radius:8px;background:rgba(255,255,255,.92);box-shadow:0 3px 8px rgba(0,0,0,.12);color:#776c6e;cursor:grab}.file-preview{display:grid;aspect-ratio:4/3;place-items:center;overflow:hidden;border-radius:9px;background:#f2eeee}.file-preview img{width:100%;height:100%;object-fit:cover}.pdf-preview{display:grid;width:58px;height:70px;place-items:center;border-radius:6px;background:var(--red);color:#fff;font-size:.78rem;font-weight:850}.file-info{padding:10px 2px 6px}.file-info small,.file-info strong{display:block}.file-info small{color:var(--muted);font-size:.63rem}.file-info strong{margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.7rem}.file-actions{position:absolute;right:12px;bottom:12px;display:flex;border-radius:9px;background:#fff;box-shadow:0 3px 12px rgba(50,20,25,.1)}.files-panel .form-actions{border-top:1px solid var(--line);padding:15px 20px 0}.sort-status{margin:0 auto 0 0;color:var(--muted);font-size:.72rem}
.upload-form{max-width:850px}.upload-dropzone{display:flex;min-height:330px;align-items:center;justify-content:center;flex-direction:column;border:2px dashed #d9c8ca;border-radius:15px;background:#fdfafa;padding:36px;text-align:center;cursor:pointer;transition:.18s}.upload-dropzone:hover,.upload-dropzone.dragover{border-color:var(--red);background:var(--red-soft)}.upload-dropzone input{position:absolute;width:1px;height:1px;opacity:0}.upload-icon{display:grid;width:64px;height:64px;margin-bottom:16px;place-items:center;border-radius:18px;background:#fff;color:var(--red);box-shadow:0 8px 22px rgba(80,20,28,.09);font-size:1.7rem}.upload-dropzone strong{font-size:1rem}.upload-dropzone p{margin:5px 0;color:var(--red);font-size:.82rem;font-weight:700}.upload-dropzone small{margin-top:12px;color:var(--muted);font-size:.69rem}.selected-files{display:grid;gap:7px;margin-top:12px}.selected-file{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:9px;padding:9px 12px;font-size:.72rem}.selected-file span:last-child{color:var(--muted)}
.auth-body{min-height:100vh;background:radial-gradient(circle at 5% 10%,#faeaec 0,transparent 35%),radial-gradient(circle at 95% 90%,#f1dedf 0,transparent 34%),#f8f5f5}.auth-shell{display:grid;min-height:100vh;place-items:center;padding:28px}.auth-card{display:grid;width:min(100%,960px);min-height:600px;grid-template-columns:1.05fr .95fr;overflow:hidden;border:1px solid rgba(123,87,91,.14);border-radius:26px;background:#fff;box-shadow:0 28px 75px rgba(70,31,36,.14)}
.auth-brand{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;background:linear-gradient(145deg,#941421 0%,#b81c2d 60%,#87101d 100%);padding:50px;text-align:center;color:#fff}.auth-brand:before,.auth-brand:after{position:absolute;border:1px solid rgba(255,255,255,.11);border-radius:50%;content:""}.auth-brand:before{width:420px;height:420px;top:-200px;left:-190px}.auth-brand:after{width:330px;height:330px;right:-170px;bottom:-150px}.auth-brand img{position:relative;z-index:1;width:110px;max-height:180px;margin-bottom:30px;filter:brightness(0) invert(1);object-fit:contain}.auth-brand .eyebrow{position:relative;z-index:1;color:#ffd8dc}.auth-brand h1{position:relative;z-index:1;margin:0;font-family:Georgia,"Times New Roman",serif;font-size:3.3rem;font-weight:500;letter-spacing:-.04em}.auth-brand p{position:relative;z-index:1;max-width:330px;margin:15px 0 0;color:#f7dfe1;font-size:.88rem;line-height:1.7}
.auth-form-panel{display:flex;justify-content:center;flex-direction:column;padding:55px clamp(35px,6vw,65px)}.auth-heading{margin-bottom:26px}.auth-heading h2{margin:0;font-size:1.9rem;letter-spacing:-.035em}.auth-heading p{margin:7px 0 0;color:var(--muted);font-size:.82rem}.auth-form{display:flex;flex-direction:column}.auth-form>label{margin:13px 0 6px;color:#514749;font-size:.72rem;font-weight:750}.input-with-icon{position:relative}.input-with-icon>span{position:absolute;top:50%;left:13px;color:#9c9294;font-size:.75rem;transform:translateY(-50%)}.input-with-icon input{width:100%;height:48px;border:1px solid #ded6d7;border-radius:10px;outline:0;padding:0 60px 0 38px;font-size:.81rem}.input-with-icon input:focus{border-color:#be747e;box-shadow:0 0 0 3px var(--red-soft)}.password-toggle{position:absolute;top:50%;right:8px;border:0;background:transparent;color:var(--red);cursor:pointer;font-size:.67rem;font-weight:750;transform:translateY(-50%)}.auth-form>.button{margin-top:23px}.auth-note{margin:22px 0 0;color:#9a9092;font-size:.66rem;text-align:center}.auth-form-panel .alert{padding:9px 11px;font-size:.72rem}
.error-page{display:flex;min-height:75vh;align-items:center;justify-content:center;flex-direction:column;text-align:center}.error-page img{width:55px;margin-bottom:15px}.error-code{color:#eadadc;font-size:7rem;font-weight:900;line-height:1}.error-page h1{margin:0;font-size:1.6rem}.error-page p{max-width:500px;margin:10px 0 20px;color:var(--muted)}
@media (max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.file-grid{grid-template-columns:repeat(3,1fr)}.recent-item{grid-template-columns:45px minmax(140px,1fr) auto 16px}.recent-meta{display:none}}
@media (max-width:820px){:root{--sidebar:280px}.app-shell{display:block}.workspace{min-height:100vh}.sidebar{transform:translateX(-100%);box-shadow:18px 0 55px rgba(45,20,25,.15);transition:transform .22s ease}.app-shell.menu-open .sidebar{transform:translateX(0)}.sidebar-scrim{position:fixed;z-index:30;inset:0;display:block;border:0;background:rgba(35,23,25,.42);opacity:0;pointer-events:none;transition:.2s}.app-shell.menu-open .sidebar-scrim{opacity:1;pointer-events:auto}.mobile-header{position:sticky;z-index:20;top:0;display:flex;height:61px;align-items:center;gap:15px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.92);padding:0 20px;backdrop-filter:blur(12px)}.mobile-header>a{font-weight:800}.menu-toggle{display:flex;width:35px;height:35px;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:0;border-radius:8px;background:var(--red-soft);cursor:pointer}.menu-toggle>span:not(.sr-only){width:16px;height:2px;background:var(--red)}.page-content{padding:28px 20px 55px}.page-header-split{align-items:flex-start;flex-direction:column}.page-header-split>.button{width:100%}.header-actions{width:100%}.header-actions .button{flex:1}.file-grid{grid-template-columns:repeat(2,1fr)}.auth-card{min-height:0;grid-template-columns:1fr}.auth-brand{display:none}.auth-form-panel{padding:44px 35px}.auth-shell{padding:18px}.two-columns{grid-template-columns:1fr}.form-card{padding:22px}.field-full{grid-column:auto}.role-guide{grid-template-columns:1fr}}
@media (max-width:620px){.stats-grid,.quick-grid{grid-template-columns:1fr}.stat-card{align-items:center}.recent-list{padding:4px 13px}.recent-item{grid-template-columns:39px minmax(0,1fr) 15px;gap:11px}.recent-item .badge{display:none}.book-cover{width:36px;height:44px}.panel-heading{padding:17px}.panel-heading .text-link{font-size:0}.panel-heading .text-link span{font-size:1rem}.toolbar{align-items:stretch;flex-direction:column}.result-count{align-self:flex-end}.data-table thead{display:none}.data-table,.data-table tbody,.data-table tr,.data-table td{display:block;width:100%}.data-table tr{position:relative;border-bottom:1px solid var(--line);padding:12px 12px}.data-table td{display:grid!important;grid-template-columns:105px minmax(0,1fr);border:0;padding:6px 4px}.data-table td:before{color:var(--muted);content:attr(data-label);font-size:.65rem;font-weight:750}.data-table .actions-cell{position:absolute;top:11px;right:11px;display:flex!important;width:auto;grid-template-columns:none;background:#fff;padding:2px}.title-cell{min-width:0;padding-right:70px}.data-table td:first-child:before,.data-table td:last-child:before{display:none}.data-table td:first-child{display:block!important}.words-table td:first-child{padding-right:78px}.pagination span{display:none}.file-grid{grid-template-columns:1fr;padding:13px}.file-preview{aspect-ratio:16/9}.form-actions{align-items:stretch;flex-direction:column-reverse}.form-actions .button{width:100%}.sort-status{text-align:center;width:100%}.upload-dropzone{min-height:280px;padding:24px}.auth-form-panel{padding:38px 24px}.auth-heading h2{font-size:1.65rem}.page-header h1{font-size:1.75rem}.toast-stack{right:16px;bottom:16px;left:16px;width:auto}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.toast-progress>span{animation:none!important;transform:scaleX(1)}}
