:root{font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:#202a3a;background:#f7f9fc}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:0}button:disabled{opacity:.6}.hidden{display:none!important}.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(140deg,#eff5ff,#fafcff)}.login-card{width:min(400px,92vw);background:white;padding:36px;border-radius:20px;box-shadow:0 16px 60px #23345c18}.login-card h2{margin:32px 0 4px}.login-card p{color:#8490a2;margin:0 0 24px}.login-card input{width:100%;padding:14px;margin-bottom:12px;border:1px solid #e0e5ed;border-radius:10px}.login-card button{width:100%;margin-top:8px}.error{color:#cc4150;margin-top:12px;font-size:13px}.logo{font-size:21px;color:#3c6ce8;white-space:nowrap}.logo b{color:#24344d}#shell{display:flex;min-height:100vh}.sidebar{width:235px;background:white;border-right:1px solid #e9edf4;padding:30px 16px;display:flex;flex-direction:column;gap:16px;flex-shrink:0}.sidebar .logo{padding:0 14px;margin-bottom:30px}.nav{text-align:left;padding:13px 15px;background:none;border-radius:10px;color:#56657c}.nav.active{background:#edf3ff;color:#3869dc;font-weight:700}.side-label{color:#a1aaba;font-size:11px;letter-spacing:1.5px;margin:26px 14px 0}.side-info{color:#7b879a;padding:10px 14px;font-size:13px}.side-bottom{margin-top:auto;border-top:1px solid #edf0f5;padding:20px 12px;display:flex;flex-direction:column;gap:10px;font-size:13px;color:#68758a}.main{flex:1;min-width:0}header{height:78px;border-bottom:1px solid #e9edf4;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 42px}.crumb{font-size:14px;color:#70809a}.crumb a{cursor:pointer;color:#70809a}.crumb b{color:#263750}.head-actions{display:flex;align-items:center;gap:18px}.status{color:#7e8b9d;font-size:12px}.status i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#32bc8a;margin-right:5px}.content{padding:36px 42px}.topline{display:flex;align-items:center;justify-content:space-between;gap:15px}.topline h1{margin:0;font-size:29px;letter-spacing:-.8px}.subtitle{color:#95a0b0;font-size:13px;margin-top:6px}.actions{display:flex;gap:10px}.primary,.outline{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;border-radius:10px;font-weight:650;font-size:13px}.primary{background:#4778ee;color:#fff}.primary:hover{background:#3267e6}.outline{border:1px solid #dfe5f0;background:#fff;color:#3b4a60}.ghost{background:none;color:#8490a2;padding:7px}.toolbar{display:flex;align-items:center;gap:18px;margin:30px 0 20px}.search-wrap{background:white;border:1px solid #e7ecf4;border-radius:11px;padding:10px 14px;color:#a5afbf;width:min(380px,100%)}.search-wrap input{border:0;outline:0;width:90%;color:#283449}.sort-label{margin-left:auto;color:#9aa5b5;font-size:12px}.view{background:white;border:1px solid #e7ecf4;border-radius:8px;padding:9px 13px;color:#73819a}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(174px,1fr));gap:18px}.tile{background:white;border:1px solid #e9edf4;border-radius:15px;padding:17px;min-width:0;transition:box-shadow .15s,border-color .15s;position:relative}.tile:hover{box-shadow:0 8px 26px #263b5c10;border-color:#c9d8f5}.tile-main{cursor:pointer}.art{height:106px;display:flex;align-items:center;justify-content:center;font-size:65px;color:#efc965}.art.file{font-size:51px;color:#6388d9}.tile-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:14px}.tile-meta{font-size:11px;color:#9aa5b4;margin-top:6px}.tile-menu{position:absolute;right:10px;top:9px;background:#f5f7fb;color:#8794a7;border-radius:7px;padding:3px 9px}.drop{border:2px dashed #b2c7f9;border-radius:14px;background:#f0f5ff;padding:35px;text-align:center;color:#4778ee;margin-bottom:18px;display:none}.drop.on{display:block}.drop span{font-size:24px;margin-right:10px}.empty{text-align:center;color:#98a5b8;padding:90px 20px}.empty div{font-size:55px;color:#c7d7f3}.empty h3{color:#41516a}.modal-back{position:fixed;inset:0;background:#14213b99;display:grid;place-items:center;padding:18px;z-index:20}.modal{width:min(900px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:16px;padding:20px}.modal-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px;border-bottom:1px solid #eee;margin-bottom:15px}.modal iframe{width:100%;height:65vh;border:0}.modal img{display:block;max-width:100%;max-height:65vh;margin:auto}.modal .links{display:flex;gap:10px;flex-wrap:wrap}.modal .links button{background:#edf3ff;padding:12px;border-radius:8px;color:#315dba}.toast{position:fixed;bottom:25px;right:25px;background:#273750;color:#fff;padding:13px 20px;border-radius:10px;z-index:30;box-shadow:0 10px 30px #0002}.grid.list{display:block}.grid.list .tile{display:flex;align-items:center;margin-bottom:8px;padding:8px 20px}.grid.list .art{height:40px;font-size:28px;width:60px}.grid.list .tile-main{display:flex;align-items:center;gap:14px;flex:1}.grid.list .tile-name{margin:0}.grid.list .tile-meta{margin-left:auto}.grid.list .tile-menu{position:static;margin-left:12px}@media(max-width:760px){.sidebar{width:65px;padding:20px 6px}.sidebar .logo{font-size:0;padding:0;margin:0}.sidebar .logo:first-letter{font-size:22px}.sidebar .nav{font-size:0}.sidebar .side-label,.sidebar .side-info,.sidebar .side-bottom{display:none}header{padding:0 18px}.content{padding:24px 18px}.topline{align-items:flex-start;flex-direction:column}.grid{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px}.head-actions .status{display:none}}

/* v0.2 image viewer and administrator */
.viewer{display:flex;align-items:center;justify-content:center;gap:8px;background:#121b2c;border-radius:12px;min-height:52vh;overflow:hidden}
.viewer-stage{height:min(65vh,680px);flex:1;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.viewer-stage img{max-width:100%;max-height:100%;object-fit:contain;transition:transform .15s ease;user-select:none}
.viewer-arrow{border-radius:10px;background:#ffffff20;color:white;padding:15px 12px;font-size:22px;flex-shrink:0}
.viewer-arrow:hover{background:#ffffff40}
.viewer-actions{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:16px 0 3px;font-size:13px}
.viewer-actions button,.viewer-actions a,.admin button{background:#edf3ff;color:#315dba;border-radius:8px;padding:9px 12px;text-decoration:none}
.admin{display:flex;flex-direction:column;gap:12px}.admin h3{margin:15px 0 2px}.admin form{display:flex;flex-wrap:wrap;gap:8px}.admin input,.admin select{min-width:120px;flex:1;border:1px solid #dfe5f0;padding:10px;border-radius:8px}.admin-list{display:flex;flex-direction:column;gap:6px}.admin-list>div{background:#f6f8fc;padding:9px 12px;border-radius:8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.admin-list b{margin-right:auto}.admin-note{font-size:12px;color:#6b7b91}

/* v0.3 administration workspace */
.admin-page{position:fixed;inset:0;background:#f7f9fc;z-index:15;overflow:auto;color:#23324a}.adm-top{height:76px;background:#fff;border-bottom:1px solid #e5eaf3;padding:0 4%;display:flex;align-items:center;justify-content:space-between;gap:12px}.adm-top b{color:#326ce8}.adm-top span{color:#78869a}.adm-tabs{background:#fff;display:flex;gap:26px;padding:0 4%;border-bottom:1px solid #e5eaf3}.adm-tab{padding:18px 8px;background:none;color:#738097;border-bottom:2px solid transparent}.adm-tab.active{color:#326ce8;border-color:#326ce8;font-weight:650}.adm-body{padding:34px 4%;max-width:1550px;margin:auto}.adm-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:25px}.adm-heading h1{font-size:25px;margin:0 0 6px}.adm-heading p{margin:0;color:#8391a4;font-size:13px}.adm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}.adm-stats>div{background:white;border:1px solid #e3e9f2;border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:6px}.adm-stats strong{font-size:27px}.adm-stats span{font-size:12px;color:#8391a4}.adm-panel{background:white;border:1px solid #e3e9f2;border-radius:13px;overflow:hidden}.adm-panel-head{padding:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.adm-panel-head input{border:1px solid #e0e6ef;border-radius:9px;padding:11px 14px;width:min(360px,100%)}.adm-panel-head span{font-size:12px;color:#9aa4b5}.adm-table-head,.adm-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,1fr) minmax(120px,1fr) 22px;align-items:center;gap:10px;padding:15px 18px;text-align:left}.adm-table-head{background:#f9fbfd;color:#8290a4;font-size:12px;border-block:1px solid #edf0f6}.adm-row{width:100%;background:#fff;border-bottom:1px solid #eef1f5;color:#36445a;font-size:13px}.adm-row:hover{background:#f6f9ff}.adm-person{display:flex;align-items:center;gap:12px}.adm-person b,.adm-person small{display:block}.adm-person small{color:#97a3b3;margin-top:4px}.adm-avatar{width:39px;height:39px;border-radius:50%;display:grid;place-items:center;background:#e8efff;color:#326ce8;font-weight:700;flex-shrink:0}.adm-state{font-size:12px}.adm-state.on{color:#299b65}.adm-state.off{color:#a0a8b6}.adm-empty{padding:30px;color:#9aa4b4;text-align:center}.admin-drawer-back{position:fixed;inset:0;background:#14213b88;z-index:26;display:flex;justify-content:flex-end}.admin-drawer{width:min(510px,100%);height:100%;background:white;overflow:auto;box-shadow:-12px 0 40px #101e3422}.adm-drawer-head{padding:26px 30px;border-bottom:1px solid #edf0f5;display:flex;justify-content:space-between;gap:10px}.adm-drawer-head h2{margin:0 0 5px;font-size:21px}.adm-drawer-head p,.adm-muted{font-size:12px;color:#8391a4;line-height:1.6}.adm-drawer-head p{margin:0}.adm-drawer-section{padding:26px 30px;display:flex;flex-direction:column;gap:17px}.adm-drawer-section label:not(.adm-check),.adm-access label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600}.adm-drawer-section input:not([type=checkbox]),.adm-access select{padding:12px;border:1px solid #dfe5ef;border-radius:9px;width:100%;background:#fff}.adm-drawer-section label span{color:#e64b63}.adm-drawer-section h3{margin:15px 0 0}.adm-check{padding:12px;border:1px solid #e7ecf4;border-radius:9px;display:flex;align-items:center;gap:10px;font-size:13px}.adm-drawer-actions{display:flex;gap:10px;flex-wrap:wrap}.adm-access{padding:24px;display:flex;flex-direction:column;gap:20px}.adm-access select{max-width:400px}.adm-grant{padding:10px 14px;background:#f6f8fc;border-radius:8px;margin-bottom:6px}.adm-grant-form{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr)) auto;gap:10px;align-items:end}.adm-grant-form button{height:43px}@media(max-width:760px){.adm-stats{grid-template-columns:repeat(2,1fr)}.adm-heading{align-items:flex-start;flex-direction:column}.adm-table-head,.adm-row{grid-template-columns:minmax(120px,2fr) minmax(100px,1fr) 20px}.adm-table-head span:nth-child(3),.adm-row>span:nth-child(3){display:none}.adm-grant-form{grid-template-columns:1fr}.adm-top{padding:0 15px}.adm-tabs{padding:0 15px}.adm-body{padding:24px 15px}}

/* v0.5.1: full-size document viewer */
.modal-back.document-modal{padding:18px;background:rgba(18,30,52,.72)}
.document-modal .modal{width:min(1720px,98vw);height:calc(100vh - 36px);max-height:none;padding:0;overflow:hidden;border-radius:16px;display:flex;flex-direction:column;box-shadow:0 25px 85px #09152850}
.document-modal .modal-head{display:none}
.document-modal #modalBody{display:flex;flex-direction:column;flex:1;min-height:0}
.doc-toolbar{height:68px;flex-shrink:0;display:flex;align-items:center;gap:16px;padding:0 24px;border-bottom:1px solid #e7ecf4;background:#fff}
.doc-kind{font-size:12px;font-weight:800;letter-spacing:.3px;color:#3f70df;background:#eaf1ff;padding:8px 12px;border-radius:9px}
.doc-title{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.doc-toolbar-actions{margin-left:auto;display:flex;align-items:center;gap:12px;flex-shrink:0}
.doc-download{background:#4778ee;color:white;text-decoration:none;padding:11px 17px;border-radius:9px;font-size:13px;font-weight:650}
.doc-close{background:#f1f4f9;color:#5b6b80;width:37px;height:37px;border-radius:9px}
.doc-canvas{flex:1;min-height:0;background:#f0f3f8;overflow:auto}
.document-modal .doc-canvas iframe{width:100%;height:100%;display:block;border:0}
.sheet-tabs{display:flex;align-items:center;gap:5px;flex-shrink:0;min-height:49px;padding:7px 20px;background:#fff;border-bottom:1px solid #e6ebf3;overflow-x:auto;color:#77859b;font-size:13px}
.sheet-tabs button{white-space:nowrap;background:transparent;border-radius:7px;padding:8px 13px;color:#61718a;font-size:13px}
.sheet-tabs button.active{background:#eaf1ff;color:#3569dc;font-weight:700}
.doc-image-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#f0f3f8;overflow:hidden}
.doc-image-stage img{max-width:95%;max-height:95%;object-fit:contain;transition:transform .15s}
.doc-image-controls{display:flex;align-items:center;justify-content:center;gap:12px;padding:12px;background:#fff}
.doc-image-controls button{background:#edf3ff;color:#315dba;border-radius:8px;padding:8px 12px}
@media(max-width:650px){.modal-back.document-modal{padding:0}.document-modal .modal{width:100vw;height:100dvh;border-radius:0}.doc-toolbar{padding:0 10px;gap:7px;height:60px}.doc-kind{padding:6px}.doc-title{font-size:12px}.doc-download{font-size:11px;padding:9px}.doc-close{width:30px}}

/* v0.7.1 — file actions */
.file-action-menu{position:fixed;z-index:100;background:#fff;border:1px solid #e2e8f2;border-radius:13px;box-shadow:0 16px 45px #1b2e4a30;padding:6px;min-width:226px;max-width:calc(100vw - 16px)}
.file-action{width:100%;display:flex;align-items:center;gap:12px;border:0;background:transparent;color:#304158;text-align:left;border-radius:8px;padding:11px 12px;font-size:13px;cursor:pointer}
.file-action:hover{background:#edf3ff;color:#255fd1}.file-action.danger{color:#c34550}.file-action.danger:hover{background:#fff0f1}
.file-action-icon{width:19px;text-align:center;font-size:16px}
.copy-link-backdrop{position:fixed;inset:0;z-index:150;background:#101d3459;display:grid;place-items:center;padding:16px}
.copy-link-dialog{width:min(500px,100%);background:white;border-radius:14px;padding:25px;box-shadow:0 22px 65px #14213b35;display:flex;flex-direction:column;gap:12px;color:#293b56}
.copy-link-dialog p{margin:0;color:#758399;font-size:13px}.copy-link-dialog input{width:100%;padding:12px;border:1px solid #ccd8e9;border-radius:8px;color:#293b56}
.copy-link-dialog button{align-self:flex-end;background:#286de5;color:white;border-radius:8px;padding:10px 18px}

/* TGS Disk 1.0 — consistent file identity and selection */
.tile{user-select:none;cursor:default;transition:background .16s,border-color .16s,box-shadow .16s}.tile.selected{background:#f1f6ff;border-color:#6696ee;box-shadow:0 0 0 2px #a6c5ff60}.tile:focus-visible{outline:3px solid #8eb3f6;outline-offset:2px}.tile-main{cursor:default}.tile-menu{display:grid;place-items:center;width:30px;height:30px;padding:0;background:#f2f5fb}.tile-menu:hover{background:#e5edfc;color:#3267d7}.art{height:105px;display:flex;flex-direction:column;gap:0;color:#c99435}.art svg{filter:drop-shadow(0 4px 5px #182c4b10)}.art.file{font-size:inherit}.file-ext{font-size:10px;letter-spacing:.1em;font-weight:800;margin-top:-4px}.kind-folder{color:#e5ad46}.kind-word{color:#3277da}.kind-excel{color:#18895d}.kind-pdf{color:#e45a60}.kind-image{color:#9867d4}.kind-archive{color:#c48a38}.kind-file{color:#8190a6}.selection-bar{position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:13px;padding:12px 16px;margin:22px 0 -10px;border:1px solid #d7e5ff;background:#fff;box-shadow:0 7px 24px #1f427511;border-radius:13px;min-height:70px}.selection-icon{width:42px;height:42px;display:grid;place-items:center;background:#f2f6fc;border-radius:10px;flex:none}.selection-info{min-width:0;display:flex;flex-direction:column;gap:4px;flex:1}.selection-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.selection-info small{color:#8390a4;font-size:12px}.selection-actions{display:flex;gap:8px;flex-wrap:wrap}.selection-actions button{padding:10px 13px;border:1px solid #e0e8f3;background:#f8faff;color:#425572;border-radius:9px;font-size:12px;font-weight:650}.selection-actions button:hover{background:#edf4ff}.selection-actions .selection-primary{background:#4076e8;color:#fff;border-color:#4076e8}.file-action-icon{display:grid;place-items:center}.file-action-menu{padding:7px;box-shadow:0 18px 48px #1c31582e}.file-action{gap:11px}.file-action-icon{width:22px}.grid.list .art{height:44px;width:55px;flex:none}.grid.list .art svg{width:30px;height:30px}.grid.list .file-ext{display:none}.grid.list .tile-main{min-width:0}.grid.list .tile-name{flex:1}.grid.list .tile{gap:10px}@media(max-width:760px){.selection-bar{position:static;align-items:flex-start}.selection-actions{justify-content:flex-end}.selection-actions button{padding:8px}.selection-icon{display:none}}

/* v1.1 floating selection and consistent document tiles */
.content{position:relative}.selection-bar{position:fixed;top:94px;left:clamp(88px,calc(235px + 3vw),300px);right:clamp(16px,3vw,55px);margin:0;z-index:12;box-shadow:0 18px 46px #1d39632b;animation:selection-in .17s ease-out;min-height:64px;max-width:1500px;margin-inline:auto;backdrop-filter:blur(14px)}
@keyframes selection-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.art{gap:5px}.art svg{width:48px;height:48px;stroke-width:1.75;filter:none}.file-ext{margin-top:0;font-size:10px;line-height:1;letter-spacing:.08em}.tile .art{height:106px}.tile-menu svg{width:18px;height:18px}.file-action-menu{border-radius:12px}.file-action-icon svg{stroke-width:1.8}
.unsupported-preview{padding:22px 12px 30px;text-align:center;display:grid;justify-items:center;gap:13px}.unsupported-symbol{display:grid;place-items:center;width:80px;height:80px;border-radius:22px;background:#eef3fc;color:#6280ad}.unsupported-symbol svg{width:45px;height:45px}.unsupported-preview h3{margin:0;font-size:19px}.unsupported-preview p{margin:0;color:#7d8aa0;max-width:440px;line-height:1.6}.unsupported-preview .primary{text-decoration:none;margin-top:10px}.unsupported-preview small{color:#8a98aa}
@media(max-width:760px){.selection-bar{top:72px;left:75px;right:12px;flex-wrap:wrap}.selection-actions{width:100%;justify-content:flex-start}}

/* v1.2 navigation */
.sidebar{background:#fff;border-right:1px solid #e4eaf3}.sidebar .nav{display:flex;align-items:center;text-align:left;gap:7px;min-height:42px;border-radius:10px}.sidebar .soon{margin-left:auto;font-size:10px;color:#8c9bb2;background:#eef2f8;border-radius:6px;padding:3px 6px}.storage-widget{margin:20px 10px 100px;padding:15px;border-radius:13px;background:#f3f7fc;border:1px solid #e4eaf4;color:#334763;display:flex;flex-direction:column;gap:8px;font-size:12px}.storage-widget.hidden{display:none}.storage-widget b{font-size:13px}.storage-widget small{color:#8794a9;line-height:1.45}.storage-widget button{align-self:flex-start;padding:4px 0}.tile-meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* v1.2.1 — redesigned navigation; functional selectors preserved */
.sidebar{width:286px;min-width:286px;padding:22px 16px 16px;gap:0;background:#f7f9fd;border-right:1px solid #e1e8f3;box-shadow:2px 0 16px #20395705}
.side-brand{display:flex;align-items:center;gap:12px;padding:6px 8px 20px;margin-bottom:12px;border-bottom:1px solid #e1e8f2;min-width:0}
.brand-mark{width:43px;height:43px;flex:none;display:grid;place-items:center;border-radius:13px;background:#356de9;color:white;box-shadow:0 5px 12px #356de92b}
.brand-mark svg{width:24px;height:24px}.brand-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.brand-copy strong{font-size:19px;line-height:1.2;color:#1a2e4e;font-weight:800;letter-spacing:-.35px;white-space:nowrap}.brand-copy small{font-size:10px;color:#7c8ba2;white-space:nowrap}
.side-nav-group{display:flex;flex-direction:column;gap:6px}.sidebar .nav{display:flex;align-items:center;gap:12px;min-height:47px;padding:11px 13px;border-radius:11px;color:#415571;font-size:13.5px;font-weight:600;white-space:nowrap;width:100%;transition:background .15s,color .15s}.sidebar .nav svg{width:19px;height:19px;flex:none;stroke-width:1.9}.sidebar .nav span{flex:1;text-align:left}.sidebar .nav:hover{background:#eaf0fb;color:#285bd0}.sidebar .nav.active{background:#dfeaff;color:#255ad4;font-weight:750}.sidebar .soon{margin-left:auto;font-size:10px;color:#8b9ab1;background:#e9eef6;border-radius:6px;padding:3px 6px;font-weight:500}.side-flex-spacer{flex:1;min-height:28px}
.sidebar .storage-widget{margin:0 2px 16px;padding:14px;border:1px solid #dfe7f3;border-radius:13px;background:#fff;box-shadow:0 2px 10px #1e38540a;color:#415673;font-size:12px;gap:9px}.storage-heading{display:flex;align-items:center;gap:9px;color:#1d3556}.storage-heading svg{width:17px;height:17px;color:#356de9}.storage-heading b{font-size:13px}.storage-widget small{font-size:11px;color:#8796ac}.storage-widget .ghost{display:flex;align-items:center;gap:6px;color:#5378bd;font-size:11px}.storage-widget .ghost svg{width:13px;height:13px}
.sidebar .side-bottom{margin-top:0;border-top:1px solid #e1e8f2;padding:16px 3px 0;display:flex;flex-direction:column;gap:12px}.side-user{display:flex;align-items:center;gap:10px;min-width:0}.user-avatar{width:37px;height:37px;border-radius:12px;flex:none;background:#dfeaff;color:#356de9;display:grid;place-items:center}.user-avatar svg{width:19px;height:19px}.user-identity{display:flex;flex-direction:column;gap:3px;min-width:0}.user-identity strong{font-size:12px;font-weight:750;color:#263c5c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-identity small{font-size:10px;color:#8292a9}.side-user-actions{display:flex;gap:7px}.side-user-actions .ghost{display:flex;align-items:center;justify-content:center;gap:6px;flex:1;background:#fff;border:1px solid #e1e8f2;border-radius:9px;padding:9px 7px;font-size:11px;color:#536783}.side-user-actions .ghost:hover{background:#eaf0fb;color:#255ad4}.side-user-actions svg{width:14px;height:14px}
@media(max-width:760px){.sidebar{width:64px;min-width:64px;padding:16px 7px}.side-brand{padding:0 2px 16px;justify-content:center}.brand-mark{width:39px;height:39px}.brand-copy,.sidebar .nav span,.sidebar .soon,.sidebar .storage-widget,.sidebar .side-bottom{display:none!important}.sidebar .nav{font-size:0;padding:11px;justify-content:center}.sidebar .nav svg{width:20px;height:20px}.side-nav-group{gap:8px}}

/* Unified document iconography v1.2.2 */
.art{gap:0!important}
.art svg{width:60px!important;height:60px!important;stroke-width:initial!important;filter:none!important;flex-shrink:0}
.grid.list .art svg{width:34px!important;height:34px!important}
.file-ext{display:none!important}
.selection-icon svg{width:29px;height:29px}
.unsupported-symbol svg{width:64px;height:64px}
/* v1.3: information panel and recycle bin */
.details-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.17);z-index:180}
.details-panel{position:fixed;right:0;top:0;bottom:0;width:min(440px,100vw);background:#fff;z-index:181;box-shadow:-15px 0 45px rgba(25,45,75,.15);overflow:auto;padding:24px;color:#24314a}
.details-header{display:flex;justify-content:space-between;align-items:center;font-size:20px;border-bottom:1px solid #e7ecf3;padding-bottom:18px}
.details-file{text-align:center;padding:30px 10px 22px;overflow-wrap:anywhere}.details-file svg{margin:auto}.details-file h3{margin:14px 0 4px;font-size:19px}.details-file small{color:#718198}
.details-fields{border-top:1px solid #e7ecf3}.details-line{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #edf1f6;font-size:13px}.details-line span{color:#7b879b;min-width:105px}.details-line strong{text-align:right;font-weight:600;overflow-wrap:anywhere}
.details-restore{width:100%;margin-top:24px}.trash-grid{display:flex!important;flex-direction:column;gap:10px}.trash-tile{display:flex;align-items:center;gap:16px;border:1px solid #e3eaf4;background:#fff;border-radius:14px;padding:14px 18px}.trash-icon{flex:none}.trash-name{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.trash-name small{color:#7c8ba0;font-size:12px}.trash-actions{display:flex;gap:8px;flex-wrap:wrap}.trash-actions button{white-space:nowrap}
@media(max-width:700px){.trash-tile{align-items:flex-start;flex-wrap:wrap}.trash-actions{width:100%;justify-content:flex-end}}

/* v1.4 folder assets and controls */
.folder-art-image{width:66px;height:66px;object-fit:contain;display:block}.grid.list .folder-art-image{width:36px;height:36px}.folder-heading{display:flex;align-items:center;gap:12px}.back-folder{width:39px;height:39px;border:1px solid #dfe7f3;background:#fff;border-radius:10px;color:#355f9e;font-size:23px;display:grid;place-items:center}.back-folder:disabled{opacity:.3;cursor:default}.back-folder:not(:disabled):hover{background:#edf4ff}.tile-link-badge{position:absolute;right:12px;bottom:12px;color:#467de2;background:#eaf1ff;border-radius:6px;padding:4px;display:flex}.color-backdrop{position:fixed;inset:0;z-index:1000;background:#14213b77;display:grid;place-items:center;padding:20px}.color-panel{width:min(560px,100%);padding:25px;border-radius:17px;background:white;box-shadow:0 20px 60px #14213b33}.color-panel h3{margin:0 0 8px}.color-panel p{color:#8290a4;font-size:13px}.color-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:20px 0}.color-option{background:#f7f9fd;border:1px solid #e3eaf4;border-radius:10px;padding:8px 3px;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:11px;color:#35445e}.color-option:hover{border-color:#4076e8;background:#eef5ff}.color-option img{width:64px;height:64px;object-fit:contain}.folder-upload-status{margin:12px 0;padding:12px 16px;border:1px solid #c8dcff;border-radius:10px;background:#eef5ff;font-size:13px;color:#2e579e}.folder-upload-status.hidden{display:none}@media(max-width:760px){.color-grid{grid-template-columns:repeat(3,1fr)}}

/* v1.4.1: slightly larger archive illustrations */
.grid:not(.list) .folder-art-image{width:90px;height:90px}

/* TGS Drive: 3D file icon pack (cards only) */
.file-art-image{width:70px;height:70px;object-fit:contain;display:block;flex-shrink:0}
.grid.list .file-art-image{width:36px;height:36px}
@media(max-width:760px){.file-art-image{width:60px;height:60px}}

/* File icons: larger in card view, compact in list view */
.grid:not(.list) .file-art-image{width:82px;height:82px}

.grid:not(.list) .file-art-image{width:82px;height:82px}

.adm-grants-overview{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;border-top:1px solid #e7ecf4}.adm-grants-overview h3{width:100%;margin:0 0 6px}.adm-grants-overview .outline{padding:8px 12px}

/* TGS_AUDIT_V1 */
.audit-panel{padding:16px}.audit-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.audit-filters input{flex:1;min-width:230px}.audit-filters input,.audit-filters select{border:1px solid #dfe5f0;border-radius:9px;padding:10px 12px;background:white}.audit-rows{display:flex;flex-direction:column}.audit-entry{display:grid;grid-template-columns:160px minmax(140px,1fr) minmax(140px,1fr) minmax(180px,2fr) 90px;gap:10px;align-items:center;padding:13px 8px;border-bottom:1px solid #edf1f6;font-size:12px;color:#41516a}.audit-entry strong{overflow-wrap:anywhere}.audit-entry span{overflow-wrap:anywhere}.audit-entry small{color:#7e8c9d}.audit-time{color:#8a98a9}.audit-pager{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding-top:16px;font-size:12px;color:#7a8ca3}@media(max-width:900px){.audit-entry{grid-template-columns:110px 1fr 1fr}.audit-entry span:nth-child(4),.audit-entry small{display:none}}

/* TGS_DND_V2 */
#tgsDropOverlay{display:none;position:fixed;inset:0;z-index:900;pointer-events:none;background:rgba(44,106,220,.08);border:4px dashed #4b82e8;align-items:center;justify-content:center}#tgsDropOverlay.visible{display:flex}#tgsDropOverlay .tgs-drop-box{padding:26px 38px;background:#fff;border:1px solid #c7d9ff;box-shadow:0 16px 45px #1d376530;border-radius:18px;text-align:center;display:flex;flex-direction:column;gap:8px;color:#2853a0}#tgsDropOverlay strong{font-size:20px}#tgsDropOverlay span{font-size:13px;color:#607899}.tile.tgs-drop-target{outline:3px solid #4076e8;outline-offset:2px;background:#e8f1ff!important}


/* TGS DRIVE: unified file actions */
.tgs-file-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:9px;
}
.tgs-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:43px;
  padding:10px 15px;
  border-radius:12px;
  white-space:nowrap;
  font-size:13px;
  font-weight:650;
  transition:background .16s,border-color .16s,transform .16s;
}
.tgs-action-btn:hover{
  transform:translateY(-1px);
}
.tgs-action-icon{
  display:inline-grid;
  place-items:center;
  width:19px;
  height:19px;
  font-size:18px;
  line-height:1;
  font-weight:600;
}
.tgs-file-actions .upload-btn{
  cursor:pointer;
}
.tgs-view-switch{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:4px;
  border:1px solid #e0e7f2;
  background:#fff;
  border-radius:12px;
  flex-shrink:0;
}
.tgs-view-switch .tgs-view-option{
  display:grid;
  place-items:center;
  width:37px;
  height:34px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#8190a8;
  font-size:21px;
  cursor:pointer;
}
.tgs-view-switch .tgs-view-option.active{
  background:#eaf1ff;
  color:#386de0;
}
.tgs-view-switch .tgs-view-option:hover:not(.active){
  background:#f3f6fc;
}
@media(max-width:1050px){
  .topline{
    flex-wrap:wrap;
    gap:18px;
  }
  .tgs-file-actions{
    justify-content:flex-start;
  }
}
@media(max-width:600px){
  .tgs-file-actions{
    width:100%;
  }
  .tgs-action-btn{
    flex:1 1 auto;
    padding:10px 12px;
  }
  .toolbar{
    flex-wrap:wrap;
  }
  .toolbar .search-wrap{
    flex:1 1 100%;
  }
  .toolbar .sort-label{
    margin-left:0;
  }
}


/* TGS ADMIN VISUAL V2 START */

/* Основная поверхность */
.admin-page {
  background:
    radial-gradient(ellipse 65% 30% at 85% 0%,
      rgba(81, 119, 245, .065), transparent 75%),
    #f5f7fc;
  color: #22314c;
}

.adm-body {
  max-width: 1420px;
  padding: 38px 34px 70px;
}

.adm-top {
  background: rgba(255,255,255,.96);
  border-bottom-color: #e8edf7;
}

.adm-top b {
  color: #376cf0;
}

.adm-tabs {
  gap: 12px;
  background: #fff;
  border-bottom-color: #e8edf7;
}

.adm-tab {
  border-radius: 9px 9px 0 0;
  padding: 17px 15px;
  transition: background .18s, color .18s;
}

.adm-tab:hover {
  background: #f0f5ff;
  color: #3269e9;
}

.adm-tab.active {
  background: #edf3ff;
  color: #3269e9;
  border-color: #4777f4;
}

.adm-heading {
  margin-bottom: 25px;
}

.adm-heading h1 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.6px;
  color: #1c2d4b;
}

.adm-heading p {
  font-size: 13px;
  color: #8996ac;
}

/* Статистика */
.adm-stats {
  gap: 16px;
  margin-bottom: 24px;
}

.adm-stats > div {
  position: relative;
  overflow: hidden;
  min-height: 115px;
  padding: 23px;
  border-radius: 17px;
  box-shadow: 0 5px 20px rgba(36,60,105,.035);
  transition: transform .2s, box-shadow .2s;
}

.adm-stats > div:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(36,60,105,.08);
}

.adm-stats > div::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  right: -18px;
  top: -23px;
  border-radius: 50%;
  background: currentColor;
  opacity: .055;
}

.adm-stats > div:nth-child(1) {
  background: #edf2ff;
  border-color: #dbe5ff;
  color: #3568dc;
}

.adm-stats > div:nth-child(2) {
  background: #eaf8f1;
  border-color: #d2efdf;
  color: #18865a;
}

.adm-stats > div:nth-child(3) {
  background: #fff5e9;
  border-color: #f7e4c9;
  color: #b87924;
}

.adm-stats > div:nth-child(4) {
  background: #f3eeff;
  border-color: #e7dcff;
  color: #8057c7;
}

.adm-stats strong {
  font-size: 33px;
  line-height: 1.1;
  color: inherit;
  letter-spacing: -.8px;
}

.adm-stats span {
  color: inherit;
  opacity: .78;
  font-size: 12px;
  font-weight: 600;
}

/* Основные панели */
.adm-panel {
  border: 1px solid #e6ebf5;
  border-radius: 17px;
  box-shadow: 0 8px 28px rgba(36,60,105,.035);
}

.adm-panel-head {
  padding: 20px;
  gap: 16px;
}

.adm-panel-head input,
.audit-filters input,
.audit-filters select,
.adm-access select {
  border: 1px solid #dfe7f4;
  border-radius: 11px;
  background: #fbfcff;
  transition: border-color .18s, box-shadow .18s;
}

.adm-panel-head input:focus,
.audit-filters input:focus,
.audit-filters select:focus,
.adm-access select:focus {
  outline: none;
  border-color: #7e9fff;
  box-shadow: 0 0 0 3px rgba(70,113,240,.11);
}

/* Таблица сотрудников */
.adm-table-head {
  background: #f5f8ff;
  color: #8290a7;
  font-weight: 650;
}

.adm-row {
  transition: background .16s;
}

.adm-row:hover {
  background: #f0f5ff;
}

.adm-person b {
  color: #263b60;
  font-weight: 700;
}

.adm-person small {
  color: #91a0b5;
  line-height: 1.5;
}

.adm-avatar {
  width: 42px;
  height: 42px;
  background: #e7efff;
  color: #3869e5;
  border: 1px solid #dbe6ff;
}

.adm-row:nth-child(4n+2) .adm-avatar {
  background: #f0eaff;
  border-color: #e6dbff;
  color: #7957bd;
}

.adm-row:nth-child(4n+3) .adm-avatar {
  background: #e5f7f2;
  border-color: #d5eee6;
  color: #258b72;
}

.adm-row:nth-child(4n+4) .adm-avatar {
  background: #fff1e6;
  border-color: #f9e5d3;
  color: #c07a3d;
}

.adm-state {
  font-weight: 650;
}

.adm-state.on {
  color: #168b59;
}

.adm-state.off {
  color: #c1842b;
}

/* Группы */
.adm-panel .adm-row {
  min-height: 66px;
}

.adm-panel .adm-row:focus-visible,
.adm-tab:focus-visible {
  outline: 3px solid rgba(67,111,238,.3);
  outline-offset: -3px;
}

/* Права доступа */
.adm-access {
  padding: 28px;
}

.adm-grant {
  background: #f0f5ff;
  border: 1px solid #e0eaff;
  border-radius: 11px;
  padding: 13px 16px;
  color: #345483;
}

.adm-grant-form {
  gap: 12px;
}

/* Боковая карточка сотрудника */
.admin-drawer-back {
  background: rgba(18,35,66,.48);
  backdrop-filter: blur(3px);
}

.admin-drawer {
  box-shadow: -18px 0 60px rgba(20,36,70,.14);
}

.adm-drawer-head {
  background: linear-gradient(135deg,#f2f6ff,#fff);
  padding: 30px;
}

.adm-drawer-section {
  padding: 28px 30px;
}

.adm-check {
  border-radius: 11px;
  background: #fbfcff;
}

.adm-check:hover {
  border-color: #cbdafa;
  background: #f5f8ff;
}

/* Журнал */
.audit-panel {
  padding: 20px;
}

.audit-entry {
  border-radius: 9px;
  transition: background .16s;
}

.audit-entry:hover {
  background: #f3f7ff;
}

.audit-entry strong {
  color: #31496f;
}

.audit-time {
  color: #8b9bb0;
}

/* Маленькие экраны */
@media (max-width: 760px) {
  .adm-body {
    padding: 24px 15px 45px;
  }

  .adm-tabs {
    overflow-x: auto;
    gap: 4px;
    padding: 0 12px;
  }

  .adm-tab {
    white-space: nowrap;
    padding: 15px 10px;
  }

  .adm-stats {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }

  .adm-stats > div {
    padding: 17px;
    min-height: 95px;
  }

  .adm-stats strong {
    font-size: 27px;
  }

  .adm-panel-head {
    flex-wrap: wrap;
  }

  .adm-heading h1 {
    font-size: 24px;
  }

  .adm-access {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adm-stats > div,
  .adm-row,
  .adm-tab,
  .audit-entry {
    transition: none;
  }
}

/* TGS ADMIN VISUAL V2 END */


/* TGS ADMIN UX V3 START */
.adm-stats {
  grid-template-columns: repeat(5,minmax(0,1fr));
}

.adm-stats > .adm-stat-filter {
  appearance: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 22px;
  min-height: 115px;
  border: 1px solid #dbe5ff;
  border-radius: 17px;
  background: #edf2ff;
  color: #3568dc;
  transition: transform .18s,box-shadow .18s,border-color .18s;
}

.adm-stats > .adm-stat-filter:nth-child(2) {
  background:#eaf8f1;
  border-color:#d2efdf;
  color:#18865a;
}
.adm-stats > .adm-stat-filter:nth-child(3) {
  background:#fff5e9;
  border-color:#f7e4c9;
  color:#b87924;
}
.adm-stats > .adm-stat-filter:nth-child(4) {
  background:#f3eeff;
  border-color:#e7dcff;
  color:#8057c7;
}
.adm-stats > .adm-stat-filter:nth-child(5) {
  background:#fff0f3;
  border-color:#f9dce5;
  color:#b94e75;
}

.adm-stat-filter strong {
  font-size:32px;
  line-height:1.1;
  color:inherit;
}
.adm-stat-filter span {
  font-size:12px;
  font-weight:650;
  color:inherit;
  opacity:.85;
}
.adm-stat-filter:hover {
  transform:translateY(-2px);
  box-shadow:0 9px 24px #203b6415;
}
.adm-stats > .adm-stat-filter.selected {
  outline:2px solid currentColor;
  outline-offset:-4px;
}
.adm-stat-filter:focus-visible {
  outline:3px solid #4979ee;
  outline-offset:3px;
}

.adm-grant-item {
  display:flex;
  align-items:center;
  gap:13px;
  background:#f6f8ff;
  padding:13px 15px;
}
.adm-grant-icon {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:39px;
  height:39px;
  border-radius:11px;
  background:#e5edff;
  color:#4875e7;
  font-size:19px;
}
.adm-grant-info {
  display:flex;
  flex:1;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.adm-grant-info strong {
  font-size:13px;
  color:#253d67;
  overflow-wrap:anywhere;
}
.adm-grant-info small {
  font-size:12px;
  color:#7589a8;
}
.adm-grant-remove {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:33px;
  height:33px;
  padding:0;
  border-radius:9px;
  background:#fff;
  color:#a3aec0;
  border:1px solid #e2e7f0;
  font-size:23px;
  cursor:pointer;
}
.adm-grant-remove:hover {
  color:#cf4159;
  background:#fff0f2;
  border-color:#f5ccd3;
}
.admin-drawer .adm-drawer-section input:not([type=checkbox]),
.admin-drawer .adm-drawer-section select {
  border:1px solid #dfe6f2;
  border-radius:11px;
  min-height:43px;
  padding:11px 13px;
  background:#fbfcff;
}
.admin-drawer .adm-drawer-section input:focus,
.admin-drawer .adm-drawer-section select:focus {
  outline:none;
  border-color:#7e9fff;
  box-shadow:0 0 0 3px #4671f01c;
}
@media(max-width:1050px){
  .adm-stats {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .adm-stats {grid-template-columns:repeat(2,minmax(0,1fr))}
  .adm-stats > .adm-stat-filter {padding:16px;min-height:95px}
  .adm-stat-filter strong {font-size:26px}
}
/* TGS ADMIN UX V3 END */

/* Статус ожидания смены пароля */
.adm-state.pending {
  color: #c1842b;
  font-weight: 650;
}

/* TGS rename compact */
.modal-back.tgs-rename-compact .modal {width:min(520px,calc(100vw - 32px));max-width:100%;padding:22px 24px;border-radius:17px;box-shadow:0 22px 70px #12213c35}
.tgs-rename-compact #tgsRenameForm {max-width:none!important;width:100%;padding:2px 0 0!important;gap:12px!important}
.tgs-rename-compact #tgsRenameInput {width:100%;outline:none!important;transition:border-color .15s,box-shadow .15s}
.tgs-rename-compact #tgsRenameInput:focus {border-color:#4778ee!important;box-shadow:0 0 0 3px #4778ee20}
.tgs-rename-compact #tgsRenameCancel {background:#f1f3f7;color:#334155}
.tgs-rename-compact #tgsRenameCancel:hover {background:#e6eaf1}
@media(max-width:560px){.modal-back.tgs-rename-compact .modal{padding:18px 16px}}

/* TGS version footer */
.tgs-version{margin-top:12px;padding:12px 4px 0;border-top:1px solid #edf0f5;text-align:center;color:#9aa6b8;font-size:11px;font-weight:500;letter-spacing:.1px;user-select:text;white-space:nowrap}
