:root {
    --navy: #222a3f;
    --navy-2: #2b344c;
    --navy-3: #343e58;
    --banana: #f2c12e;
    --banana-2: #ffe16a;
    --banana-deep: #a97100;
    --banana-soft: #fff8dc;
    --purple: #8458ee;
    --ink: #20283a;
    --muted: #778094;
    --line: #e6e9f0;
    --surface: #ffffff;
    --canvas: #f5f7fb;
    --shadow: 0 14px 35px rgba(27, 35, 57, .09);
    --shadow-soft: 0 4px 14px rgba(27, 35, 57, .07);
    --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; overflow: hidden; pointer-events: none; }

.brand { color: #fff; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.4px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--navy); border-radius: 13px; background: linear-gradient(140deg, var(--banana-2), var(--banana)); box-shadow: 0 9px 22px rgba(211, 165, 19, .3); }
.brand-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.eyebrow { color: var(--banana-deep); font-weight: 750; text-transform: uppercase; letter-spacing: 1.7px; font-size: 11px; }
.eyebrow.light { color: #ffe78c; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--canvas); }
.boot-screen { min-height: 100vh; display: grid; place-items: center; background: var(--canvas); }
.boot-screen > div { display: grid; justify-items: center; gap: 10px; color: var(--navy); }
.boot-screen .brand-mark { width: 58px; height: 58px; border-radius: 17px; }
.boot-screen .brand-mark svg { width: 34px; height: 34px; }
.boot-screen b { font-size: 18px; }
.boot-screen small { color: var(--muted); font-size: 11px; }
.auth-art { position: relative; overflow: hidden; padding: 42px 58px; color: #fff; background: radial-gradient(circle at 12% 96%, rgba(242, 193, 46, .22), transparent 35%), radial-gradient(circle at 90% 12%, rgba(116, 82, 220, .18), transparent 28%), var(--navy); }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-art::before { width: 480px; height: 480px; left: -260px; bottom: -290px; box-shadow: 0 0 0 70px rgba(255,255,255,.02), 0 0 0 140px rgba(255,255,255,.018); }
.auth-art::after { width: 300px; height: 300px; right: -190px; top: -170px; box-shadow: 0 0 0 60px rgba(255,255,255,.02); }
.auth-copy { position: relative; max-width: 590px; margin-top: clamp(150px, 25vh, 250px); z-index: 1; }
.auth-copy h1 { margin: 18px 0; font-size: clamp(42px, 4.1vw, 67px); line-height: 1.03; letter-spacing: -3px; }
.auth-copy p { max-width: 480px; color: #bac1d1; font-size: 17px; line-height: 1.7; }
.floating-files { position: absolute; inset: auto 30px 45px auto; width: 420px; height: 200px; pointer-events: none; }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; min-width: 210px; padding: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); border-radius: 14px; box-shadow: 0 14px 35px rgba(7,10,22,.2); }
.float-card div { display: flex; flex-direction: column; gap: 4px; }
.float-card b { font-size: 13px; }.float-card div span { color: #aeb6ca; font-size: 11px; }
.fc-one { left: 0; top: 20px; transform: rotate(-3deg); }.fc-two { right: 0; bottom: 5px; transform: rotate(3deg); }
.mini-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; }.mini-icon.folder { color: #e7ae3e; background: #fff1c9; }.mini-icon.image { color: #599de4; background: #dcecff; }
.auth-panel { width: min(100%, 450px); padding: 38px 40px 42px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.auth-form { width: 100%; }
.auth-form h2 { margin: 10px 0 8px; font-size: 36px; letter-spacing: -1.5px; }
.form-intro { color: var(--muted); margin: 0 0 34px; }
.auth-form label, .modal label { display: grid; gap: 8px; margin: 18px 0; color: #475064; font-size: 13px; font-weight: 700; }
.auth-form input, .modal input { width: 100%; height: 50px; padding: 0 15px; color: var(--ink); background: #f8f9fc; border: 1px solid var(--line); border-radius: 11px; outline: 0; transition: .18s; }
.auth-form input:focus, .modal input:focus { background: #fff; border-color: #e4bd3a; box-shadow: 0 0 0 3px rgba(242,193,46,.16); }
.form-error { min-height: 18px; margin: 3px 0 8px; color: #d93d4c; font-size: 12px; }
.auth-mobile-brand { display: inline-flex; color: var(--navy); margin-bottom: 40px; }

.button { min-width: 0; height: 44px; border: 0; border-radius: 11px; padding: 0 18px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; font-weight: 720; font-size: 13px; cursor: pointer; text-decoration: none; transition: transform .16s, box-shadow .16s, background .16s; }
.button span { min-width: 0; display: inline-block; }
.button svg { flex: none; }
.button:hover { transform: translateY(-1px); }.button:active { transform: translateY(0); }
.button.primary { color: var(--navy); background: linear-gradient(135deg, var(--banana), var(--banana-2)); box-shadow: 0 8px 20px rgba(205, 158, 12, .22); }
.button.primary:hover { box-shadow: 0 11px 25px rgba(205, 158, 12, .31); }
.button.subtle { color: #4a5365; background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 9px rgba(35,42,61,.04); }
.button.danger { color: #fff; background: #e54d59; }.button.danger-text { padding-left: 0; color: #d94451; background: transparent; }
.button.wide { width: 100%; height: 52px; margin-top: 10px; justify-content: space-between; padding: 0 19px; }.button.wide svg { width: 18px; }
.button[disabled] { opacity: .58; pointer-events: none; }
.icon-button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; cursor: pointer; }
.icon-button:hover { background: #f0f2f7; }

.app { min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 254px; padding: 24px 14px 18px; color: #cbd1df; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--navy) 0%, #20273a 100%); }
.sidebar-head { height: 52px; display: flex; align-items: center; padding: 0 10px; }.close-sidebar { display: none; color: #fff; margin-left: auto; }
.main-nav { display: grid; gap: 5px; margin-top: 34px; }
.nav-item { position: relative; width: 100%; height: 47px; padding: 0 15px; color: #cbd1df; background: transparent; border: 0; border-radius: 11px; display: flex; align-items: center; gap: 14px; font-weight: 620; font-size: 14px; cursor: pointer; text-align: left; transition: .18s; }
.nav-item svg { width: 19px; }.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(242,193,46,.2), rgba(242,193,46,.1)); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 5px 5px 0; background: var(--banana); box-shadow: 0 0 15px rgba(242,193,46,.5); }
.nav-item.active svg { color: var(--banana); }
.sidebar-spacer { flex: 1; }
.storage-card { width: 100%; padding: 14px; color: #d7dce7; text-align: left; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09); border-radius: 13px; cursor: default; }
.storage-title { display: flex; align-items: center; gap: 8px; }.storage-title svg { width: 16px; }.storage-title b { font-size: 12px; }.storage-title small { margin-left: auto; color: #929caf; font-size: 10px; }
.storage-track { display: block; height: 6px; margin: 13px 0 9px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.12); }.storage-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--banana), var(--banana-2)); transition: width .4s; }
.storage-copy { color: #929caf; font-size: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 11px 8px 0; border-top: 1px solid rgba(255,255,255,.07); }.sidebar-user > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }.sidebar-user b { color: #eef0f5; font-size: 12px; }.sidebar-user small { max-width: 145px; overflow: hidden; color: #8e98ab; font-size: 9px; text-overflow: ellipsis; }
.avatar { flex: none; width: 37px; height: 37px; overflow: hidden; display: grid; place-items: center; color: var(--navy); background: linear-gradient(140deg, var(--banana-2), var(--banana)); border-radius: 50%; font-size: 11px; font-weight: 800; box-shadow: 0 5px 13px rgba(205,158,12,.22); }.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sidebar-scrim { display: none; }

.workspace { width: calc(100% - 254px); min-height: 100vh; margin-left: 254px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 76px; padding: 0 25px 0 31px; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.menu-button { display: none; }
.search-box { width: min(600px, 53vw); height: 45px; padding: 0 11px 0 15px; display: flex; align-items: center; gap: 10px; border-radius: 12px; border: 1px solid var(--line); background: #f8f9fb; transition: .18s; }
.search-box:focus-within { background: #fff; border-color: #e8cb6b; box-shadow: 0 0 0 3px rgba(242,193,46,.1); }.search-box svg { width: 18px; color: #9ba3b2; }.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }.search-box input::placeholder { color: #a3a9b6; }
.search-box kbd { padding: 3px 6px; color: #9098a8; background: #fff; border: 1px solid #e4e6ec; border-radius: 5px; font: 10px inherit; }
.activity-button { position: relative; margin-left: auto; color: #626b7e; background: #f7f8fa; }.activity-button i { position: absolute; right: 9px; top: 8px; width: 6px; height: 6px; background: var(--banana); border: 2px solid #fff; border-radius: 50%; box-sizing: content-box; }
.profile-wrap { position: relative; flex: none; }.profile-button { min-width: 0; padding: 5px 8px 5px 5px; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; }.profile-button:hover, .profile-button[aria-expanded="true"] { background: #f6f7fa; border-color: #eceff4; }.profile-copy { display: flex; min-width: 75px; flex-direction: column; gap: 1px; text-align: left; }.profile-copy b { max-width: 108px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.profile-copy small { color: #9199a8; font-size: 9px; }.profile-button .chevron { width: 14px; color: #9098a7; transition: transform .16s; }.profile-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.profile-menu { position: absolute; z-index: 95; right: 0; top: calc(100% + 12px); width: 260px; padding: 8px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(.98); transform-origin: top right; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 18px 48px rgba(25,34,57,.16); transition: opacity .16s, visibility .16s, transform .16s; }.profile-menu.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }.profile-menu::before { content: ""; position: absolute; right: 20px; top: -6px; width: 12px; height: 12px; background: #fff; border-top: 1px solid var(--line); border-left: 1px solid var(--line); transform: rotate(45deg); }.profile-menu div { min-width: 0; margin-bottom: 6px; padding: 11px 12px; display: grid; gap: 4px; background: #f8f9fc; border: 1px solid #eef1f5; border-radius: 11px; }.profile-menu strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.profile-menu span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.profile-menu button { position: relative; width: 100%; min-height: 42px; padding: 0 10px; display: flex; align-items: center; gap: 10px; color: #515a6d; background: transparent; border: 0; border-radius: 10px; font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; }.profile-menu button:hover { background: #f5f7fa; }.profile-menu button.logout-menu-item { margin-top: 8px; color: #d8414e; }.profile-menu button.logout-menu-item::before { content: ""; position: absolute; top: -5px; left: 8px; right: 8px; height: 1px; background: var(--line); }.profile-menu button.logout-menu-item:hover { background: #fff2f3; }.profile-menu svg { flex: none; width: 17px; height: 17px; }

.content { width: min(100%, 1540px); margin: 0 auto; padding: 30px 30px 55px; }
.page-heading { min-height: 95px; display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; }.page-heading h1 { margin: 6px 0 5px; font-size: 29px; line-height: 1; letter-spacing: -1px; }.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }.heading-actions { display: flex; gap: 10px; }
.breadcrumb { min-height: 15px; display: flex; align-items: center; gap: 5px; color: #969ead; font-size: 10px; }.breadcrumb button { padding: 0; color: inherit; background: none; border: 0; cursor: pointer; }.breadcrumb button:hover { color: var(--banana-deep); }.breadcrumb i { font-style: normal; color: #c1c6d0; }
.list-toolbar { height: 56px; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.toolbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }.list-toolbar #item-count { color: #6f788b; font-size: 11px; font-weight: 650; }.select-all { display: inline-flex; align-items: center; gap: 7px; color: #71798a; font-size: 11px; font-weight: 700; cursor: pointer; }.select-all input, .file-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--banana-deep); cursor: pointer; }.toolbar-right { display: flex; align-items: center; gap: 20px; }.sort-control { color: #949baa; font-size: 10px; }.sort-control select { padding-right: 4px; color: #596174; background: transparent; border: 0; outline: 0; font-size: 10px; font-weight: 650; }.view-switch { display: flex; padding: 3px; background: #ebeef3; border-radius: 9px; }.view-switch button { width: 32px; height: 29px; display: grid; place-items: center; color: #8991a1; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }.view-switch button.active { color: var(--banana-deep); background: #fff; box-shadow: 0 2px 6px rgba(30,39,62,.08); }.view-switch svg { width: 16px; }
.selection-toolbar { min-height: 52px; margin-top: 12px; padding: 8px 10px 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); }.selection-toolbar > span { color: #4f586b; font-size: 12px; font-weight: 800; }.selection-toolbar > span::before { content: ""; width: 7px; height: 7px; margin-right: 8px; display: inline-block; vertical-align: 1px; background: var(--banana); border-radius: 50%; box-shadow: 0 0 0 3px rgba(242,193,46,.18); }.selection-toolbar > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }.selection-toolbar .button { height: 35px; padding: 0 12px; font-size: 11px; box-shadow: none; }.selection-toolbar .button svg { width: 15px; height: 15px; }
.file-area { position: relative; min-height: 400px; padding-top: 21px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.file-card { position: relative; min-width: 0; height: 212px; padding: 14px 14px 15px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid #e4e7ee; border-radius: var(--radius); box-shadow: 0 3px 8px rgba(24,32,54,.035); cursor: default; transition: transform .18s, box-shadow .18s, border-color .18s; }
.file-card:hover { transform: translateY(-3px); border-color: #d9dde7; box-shadow: 0 11px 26px rgba(25,34,57,.09); }.file-card.selected { border-color: #dfbd4f; box-shadow: 0 0 0 2px rgba(242,193,46,.16), 0 11px 26px rgba(25,34,57,.08); }.file-card.long-pressing { border-color: #dfbd4f; box-shadow: 0 0 0 3px rgba(242,193,46,.2), 0 11px 26px rgba(25,34,57,.08); }
.file-select { position: absolute; top: 12px; left: 12px; z-index: 3; width: 28px; height: 28px; display: grid; place-items: center; opacity: 0; background: rgba(255,255,255,.94); border: 1px solid #e7e9ee; border-radius: 8px; transition: opacity .15s; }.file-card:hover .file-select, .file-card.selected .file-select { opacity: 1; }
.card-actions { position: absolute; top: 9px; right: 9px; z-index: 2; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }.file-card:hover .card-actions, .file-card.selected .card-actions { opacity: 1; }.card-actions button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; color: #737b8e; background: rgba(255,255,255,.92); border: 1px solid #e7e9ee; border-radius: 8px; cursor: pointer; }.card-actions button:hover { color: var(--banana-deep); }.card-actions svg { width: 14px; }
.favorite-mark { position: absolute; top: 12px; left: 13px; z-index: 2; color: #f5b92f; }.file-card.selection-mode .favorite-mark { left: 45px; }.favorite-mark svg { width: 15px; fill: currentColor; stroke-width: 1.3; }
.file-visual { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 11px; overflow: hidden; touch-action: manipulation; }
.file-visual svg { width: 63px; height: 63px; }.file-visual.folder { color: #e9a928; background: linear-gradient(145deg, #fff9e8, #fff3c8); }.file-visual.folder svg { width: 76px; height: 76px; fill: #f5c34f; stroke: #e8a924; stroke-width: 1; }
.file-visual.image { color: #508bd3; background: linear-gradient(145deg, #e9f4ff, #d9ebff); }.file-visual.image svg { fill: rgba(80,139,211,.12); }
.file-visual.play { color: #8753e9; background: linear-gradient(145deg, #f1ebff, #fbeafa); }.file-visual.play svg { fill: rgba(135,83,233,.12); }.file-visual.play::after { content: ""; position: absolute; width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 7px 20px rgba(132,82,235,.25); }
.file-visual.pdf { color: #e25a60; background: linear-gradient(145deg, #fff1f1, #ffe1df); }.file-visual.pdf svg { fill: rgba(226,90,96,.08); }.file-visual.music { color: #e268a9; background: #fff0f7; }.file-visual.code { color: #3a9b6c; background: #e9f8ef; }.file-visual.archive { color: #a57742; background: #f8f0e4; }.file-visual.file { color: #768399; background: #eef1f6; }
.file-meta { padding: 11px 3px 0; text-align: center; }.file-name { display: block; overflow: hidden; color: #31394a; font-size: 12px; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }.file-detail { display: block; margin-top: 5px; color: #9198a7; font-size: 9px; }
.file-grid.list-mode { display: flex; flex-direction: column; gap: 8px; }.file-grid.list-mode .file-card { height: 68px; padding: 8px 55px 8px 10px; display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; }.file-grid.list-mode .file-card.selection-mode { padding-left: 46px; }.file-grid.list-mode .file-select { top: 20px; left: 10px; opacity: 1; }.file-grid.list-mode .file-visual { width: 50px; height: 50px; }.file-grid.list-mode .file-visual svg { width: 30px; height: 30px; }.file-grid.list-mode .file-meta { padding: 0 0 0 13px; text-align: left; }.file-grid.list-mode .file-detail { margin-top: 4px; }.file-grid.list-mode .card-actions { top: 19px; right: 12px; opacity: 1; }.file-grid.list-mode .favorite-mark { top: 8px; left: 46px; }.file-grid.list-mode .file-card.selection-mode .favorite-mark { left: 80px; }
.loading-state { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }.loading-state span { height: 212px; border: 1px solid #eceef2; border-radius: var(--radius); background: linear-gradient(110deg, #fff 8%, #f2f4f8 18%, #fff 33%); background-size: 200% 100%; animation: shine 1.2s linear infinite; }
@keyframes shine { to { background-position-x: -200%; } }
.empty-state { min-height: 390px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }.empty-illustration { width: 125px; height: 105px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff 30%, #f0f2f8 31%, transparent 68%); }.empty-illustration span { width: 72px; height: 65px; display: grid; place-items: center; color: #e9aa2a; background: #fff2c3; border-radius: 14px; transform: rotate(-3deg); box-shadow: var(--shadow-soft); }.empty-illustration svg { width: 45px; height: 45px; fill: rgba(246,192,70,.45); }.empty-state h2 { margin: 17px 0 7px; font-size: 18px; }.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }

.system-page { padding-top: 38px; }
.system-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }.system-heading h1 { margin: 8px 0 6px; font-size: 30px; letter-spacing: -1px; }.system-heading p { margin: 0; color: var(--muted); font-size: 12px; }.system-heading .heading-actions { display: flex; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.settings-card { padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }.settings-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }.settings-card-head h2 { margin: 0 0 4px; font-size: 17px; }.settings-card-head p { margin: 0; color: var(--muted); font-size: 10px; }.settings-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--banana-deep); background: var(--banana-soft); border-radius: 11px; }
.avatar-editor { padding: 15px; display: flex; align-items: center; gap: 15px; background: #f8f9fc; border: 1px solid var(--line); border-radius: 12px; }.avatar-editor .avatar-preview { width: 72px; height: 72px; font-size: 20px; box-shadow: none; }.avatar-editor > div { min-width: 0; display: grid; gap: 4px; }.avatar-editor b { font-size: 12px; }.avatar-editor small { color: var(--muted); font-size: 9px; }.avatar-editor > div > span { display: flex; align-items: center; gap: 8px; margin-top: 7px; }.avatar-editor .button { height: 34px; padding: 0 11px; font-size: 10px; }
.settings-card label, .admin-user-modal label { display: grid; gap: 8px; margin: 17px 0; color: #4b5467; font-size: 12px; font-weight: 700; }.settings-card input, .admin-user-modal input, .admin-user-modal select { width: 100%; height: 46px; padding: 0 14px; color: var(--ink); background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; outline: 0; }.settings-card input:focus, .admin-user-modal input:focus, .admin-user-modal select:focus { background: #fff; border-color: #e4bd3a; box-shadow: 0 0 0 3px rgba(242,193,46,.14); }.settings-card .button { margin-left: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }.admin-stats article { padding: 19px 20px; display: grid; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }.admin-stats span { color: var(--muted); font-size: 10px; font-weight: 680; }.admin-stats strong { font-size: 23px; letter-spacing: -.7px; }
.admin-table-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }.admin-table-head { min-height: 76px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }.admin-table-head h2 { margin: 0 0 4px; font-size: 16px; }.admin-table-head p { margin: 0; color: var(--muted); font-size: 10px; }.admin-search { width: min(260px, 40%); height: 39px; padding: 0 11px; display: flex; align-items: center; gap: 8px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 9px; }.admin-search svg { width: 15px; color: #929baa; }.admin-search input { min-width: 0; width: 100%; height: 100%; background: transparent; border: 0; outline: 0; font-size: 11px; }
.admin-table-wrap { overflow-x: auto; }.admin-table { width: 100%; border-collapse: collapse; }.admin-table th { padding: 12px 17px; color: #9299a8; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .7px; }.admin-table td { padding: 14px 17px; border-bottom: 1px solid #eff1f5; font-size: 11px; }.admin-table tbody tr:last-child td { border-bottom: 0; }.admin-table tbody tr:hover { background: #fdfcf7; }.admin-user-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }.admin-user-cell .avatar { width: 34px; height: 34px; }.admin-user-copy { min-width: 0; display: grid; gap: 2px; }.admin-user-copy b, .admin-user-copy small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.admin-user-copy b { font-size: 11px; }.admin-user-copy small { color: var(--muted); font-size: 9px; }
.role-badge, .status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 750; }.role-badge.admin { color: #8c6500; background: #fff4c7; }.role-badge.user { color: #536078; background: #eef1f6; }.status-badge.active { color: #218252; background: #e8f7ef; }.status-badge.inactive { color: #a34a53; background: #fff0f1; }.status-badge::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.admin-usage { min-width: 125px; display: grid; gap: 5px; }.admin-usage span { color: #687186; font-size: 9px; }.admin-usage i { width: 100%; height: 4px; overflow: hidden; background: #edf0f4; border-radius: 5px; }.admin-usage i::after { content: ""; display: block; width: var(--usage, 0%); height: 100%; background: var(--banana); border-radius: inherit; }.admin-edit-button { width: 31px; height: 31px; display: grid; place-items: center; color: #6e778a; background: #f5f7fa; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }.admin-edit-button:hover { color: var(--banana-deep); }.admin-edit-button svg { width: 14px; }.admin-users-mobile { display: none; }
.modal.admin-user-modal { width: min(calc(100% - 28px), 620px); }.admin-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; margin-top: 18px; }.modal.admin-user-modal .admin-form-grid label { margin: 8px 0; }.toggle-row { display: flex !important; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px; background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; }.toggle-row span { display: grid; gap: 3px; }.toggle-row small { color: var(--muted); font-size: 9px; font-weight: 500; }.toggle-row input { width: 38px; height: 21px; accent-color: var(--banana-deep); }.admin-modal-actions { align-items: center; }.admin-modal-actions > span { flex: 1; }

.modal { width: min(calc(100% - 28px), 470px); padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 18px; box-shadow: 0 25px 80px rgba(18,24,43,.22); }.modal::backdrop { background: rgba(21,27,43,.55); backdrop-filter: blur(3px); }.modal form { padding: 24px; }.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }.modal-head > div { display: flex; gap: 13px; }.modal-head h2 { margin: 2px 0 5px; font-size: 18px; }.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }.modal-icon { width: 43px; height: 43px; display: grid; place-items: center; color: #dea22e; background: #fff3cd; border-radius: 12px; }.modal-icon.share { color: var(--purple); background: #eee8ff; }.modal-icon svg { width: 21px; }.modal label { margin-top: 25px; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }.modal-actions.split { justify-content: space-between; }.copy-field, .slug-field { min-width: 0; display: flex; }.copy-field input, .slug-field input { min-width: 0; border-radius: 11px 0 0 11px; }.copy-field button, .slug-field button { flex: none; color: var(--purple); border: 1px solid var(--line); border-left: 0; border-radius: 0 11px 11px 0; background: #f4f1ff; cursor: pointer; }.copy-field button { width: 52px; }.slug-field button { width: 88px; font-size: 11px; font-weight: 750; }
.modal.editor-modal { width: min(calc(100% - 28px), 920px); }.editor-textarea { width: 100%; min-height: 52vh; margin-top: 18px; padding: 14px 15px; color: var(--ink); background: #f8f9fc; border: 1px solid var(--line); border-radius: 12px; outline: 0; resize: vertical; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; tab-size: 4; transition: .18s; }.editor-textarea:focus { background: #fff; border-color: #e4bd3a; box-shadow: 0 0 0 3px rgba(242,193,46,.14); }
.confirm-modal { width: min(calc(100% - 28px), 400px); text-align: center; }.confirm-icon { width: 56px; height: 56px; margin: 0 auto 16px; display: grid; place-items: center; color: #dc4c57; background: #fff0f1; border-radius: 50%; }.confirm-modal h2 { margin: 0 0 8px; font-size: 20px; }.confirm-modal p { margin: 0 auto; max-width: 310px; color: var(--muted); font-size: 12px; line-height: 1.55; }.confirm-modal .modal-actions { justify-content: center; }

.context-menu { position: fixed; z-index: 90; width: 230px; padding: 6px; display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }.context-menu.open { display: block; }.context-menu button { width: 100%; min-height: 37px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; color: #515a6c; background: transparent; border: 0; border-radius: 8px; font-size: 11px; line-height: 1.25; text-align: left; cursor: pointer; }.context-menu button:hover { color: var(--ink); background: #f4f6f9; }.context-menu button.danger-item { color: #d74450; }.context-menu svg { width: 15px; flex: none; }.context-menu hr { height: 1px; margin: 4px; background: var(--line); border: 0; }
.toast-region { position: fixed; z-index: 110; right: 22px; bottom: 22px; display: grid; gap: 8px; }.toast { min-width: 260px; max-width: 380px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; color: #fff; background: #283148; border-radius: 11px; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .25s ease-out; }.toast::before { content: "✓"; width: 21px; height: 21px; display: grid; place-items: center; color: #fff; background: #42ad75; border-radius: 50%; font-weight: 800; }.toast.error::before { content: "!"; background: #e4535e; }@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast > span { flex: 1; }.toast > button { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; color: #bec5d3; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }.toast > button:hover { color: #fff; background: rgba(255,255,255,.1); }.toast > button svg { width: 14px; }
.drop-overlay { position: fixed; z-index: 100; inset: 16px; display: grid; place-items: center; opacity: 0; visibility: hidden; color: #fff; background: rgba(32,39,59,.91); border: 2px dashed rgba(255,255,255,.32); border-radius: 20px; backdrop-filter: blur(8px); transition: .18s; }.drop-overlay.open { opacity: 1; visibility: visible; }.drop-overlay > div { text-align: center; }.drop-overlay span { width: 78px; height: 78px; margin: auto; display: grid; place-items: center; color: var(--banana); background: rgba(255,255,255,.1); border-radius: 23px; }.drop-overlay svg { width: 40px; height: 40px; }.drop-overlay h2 { margin: 19px 0 7px; }.drop-overlay p { margin: 0; color: #b5bdcd; }

.activity-drawer { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(390px, 92vw); padding: 26px; transform: translateX(105%); background: #fff; box-shadow: -15px 0 50px rgba(18,25,43,.13); transition: transform .25s ease; }.activity-drawer.open { transform: none; }.drawer-scrim { position: fixed; z-index: 70; inset: 0; opacity: 0; visibility: hidden; background: rgba(23,29,46,.3); transition: .2s; }.drawer-scrim.open { opacity: 1; visibility: visible; }.drawer-head { display: flex; justify-content: space-between; }.drawer-head h2 { margin: 0 0 4px; font-size: 21px; }.drawer-head p { margin: 0; color: var(--muted); font-size: 11px; }.activity-list { margin-top: 28px; display: grid; gap: 3px; }.activity-row { position: relative; padding: 11px 0 14px 42px; }.activity-row::before { content: ""; position: absolute; left: 15px; top: 42px; bottom: -5px; width: 1px; background: #e7e9ef; }.activity-row:last-child::before { display: none; }.activity-row > span { position: absolute; left: 0; top: 8px; width: 31px; height: 31px; display: grid; place-items: center; color: var(--banana-deep); background: var(--banana-soft); border-radius: 9px; }.activity-row svg { width: 15px; }.activity-row b { display: block; margin-bottom: 4px; font-size: 11px; }.activity-row small { color: #9299a8; font-size: 9px; }
.drawer-actions { display: flex; align-items: center; gap: 5px; }.drawer-actions > button:first-child { padding: 7px 9px; color: var(--banana-deep); background: var(--banana-soft); border: 0; border-radius: 8px; font-size: 10px; font-weight: 700; cursor: pointer; }.drawer-actions > button:first-child:hover { background: #fff0b8; }.activity-row { padding-right: 30px; }.activity-delete { position: absolute; right: 0; top: 10px; width: 25px; height: 25px; padding: 0; display: grid; place-items: center; opacity: 0; color: #9da4b2; background: transparent; border: 0; border-radius: 7px; cursor: pointer; transition: .15s; }.activity-row:hover .activity-delete, .activity-delete:focus { opacity: 1; }.activity-delete:hover { color: #d74450; background: #fff1f2; }.activity-delete svg { width: 13px; }

/* Página pública */
.public-page { min-height: 100vh; background: var(--canvas); }.public-header { height: 78px; padding: 0 max(25px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--navy); }.public-brand { font-size: 18px; }.public-pill { padding: 7px 11px; color: #d8ddeb; background: rgba(255,255,255,.08); border-radius: 20px; font-size: 10px; }.public-main { width: min(calc(100% - 36px), 1180px); margin: 0 auto; padding: 55px 0 80px; }.share-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 35px; }.share-hero h1 { margin: 9px 0 8px; font-size: 34px; letter-spacing: -1.2px; }.share-hero p { margin: 0; color: var(--muted); font-size: 12px; }.public-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }.public-item { min-width: 0; height: 200px; padding: 14px; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: .18s; }.public-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }.public-item .file-visual { min-height: 120px; }.public-item strong { margin-top: 10px; overflow: hidden; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }.public-item > span { margin-top: 4px; color: var(--muted); font-size: 9px; text-align: center; }.shared-file-card { width: min(100%, 430px); padding: 18px; display: flex; align-items: center; gap: 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }.shared-file-card .file-visual { flex: none; width: 100px; height: 82px; }.shared-file-card > div:last-child { min-width: 0; display: grid; gap: 7px; }.shared-file-card strong { overflow: hidden; text-overflow: ellipsis; }.shared-file-card span { color: var(--muted); font-size: 11px; }.back-link { display: inline-block; margin: -18px 0 18px; color: var(--banana-deep); text-decoration: none; font-size: 12px; font-weight: 700; }.share-error { margin: 12vh auto; max-width: 500px; text-align: center; }.share-error-icon { width: 60px; height: 60px; margin: auto; display: grid; place-items: center; color: var(--navy); background: var(--banana); border-radius: 50%; font-size: 27px; font-weight: 800; }.share-error h1 { margin: 20px 0 8px; }.share-error p, .empty-public { color: var(--muted); }.empty-public { grid-column: 1/-1; padding: 80px; text-align: center; }

@media (max-width: 900px) {
    .auth-screen { padding: 0; background: #fff; }.auth-panel { min-height: 100vh; width: min(100%, 450px); padding: 35px 25px; display: flex; justify-content: center; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; }
    .sidebar { transform: translateX(-105%); transition: transform .23s ease; }.sidebar.open { transform: none; box-shadow: 20px 0 50px rgba(13,18,31,.2); }.close-sidebar { display: grid; }.sidebar-scrim { position: fixed; z-index: 35; inset: 0; display: block; opacity: 0; visibility: hidden; background: rgba(26,32,49,.42); transition: .2s; }.sidebar-scrim.open { opacity: 1; visibility: visible; }
    .workspace { width: 100%; margin: 0; }.topbar { padding: 0 14px; }.menu-button { display: grid; }.search-box { width: min(100%, 530px); }.profile-copy, .profile-button .chevron { display: none; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }.settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .topbar { height: 66px; gap: 8px; }.search-box { height: 41px; }.search-box kbd, .activity-button { display: none; }.profile-button { padding-right: 0; }
    .content { padding: 22px 16px 45px; }.page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }.page-heading h1 { font-size: 25px; }.heading-actions { width: 100%; }.heading-actions .button { flex: 1; padding: 0 12px; }.heading-actions .button span { display: inline; }
    .list-toolbar { margin-top: 14px; }.select-all span, .sort-control span { display: none; }.toolbar-left { gap: 9px; }.toolbar-right { gap: 8px; }.selection-toolbar { align-items: flex-start; flex-direction: column; }.selection-toolbar > div { width: 100%; }.selection-toolbar .button { flex: 1; min-width: 120px; }
    .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.file-card { height: 179px; padding: 10px; }.file-select { opacity: 1; top: 9px; left: 9px; }.favorite-mark { left: 12px; }.file-card.selection-mode .favorite-mark { left: 42px; }.file-visual svg { width: 52px; height: 52px; }.file-visual.folder svg { width: 62px; height: 62px; }.file-name { font-size: 11px; }.card-actions { opacity: 1; }.loading-state { grid-template-columns: repeat(2, 1fr); gap: 10px; }.loading-state span { height: 179px; }
    .modal form { padding: 20px; }.modal-actions.split { align-items: stretch; flex-direction: column-reverse; }.toast-region { right: 12px; bottom: 12px; left: 12px; }.toast { min-width: 0; width: 100%; }
    .share-hero { align-items: flex-start; flex-direction: column; }.share-hero h1 { font-size: 28px; }.public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.public-item { height: 175px; padding: 10px; }.public-item .file-visual { min-height: 105px; }
    .system-heading { align-items: flex-start; flex-direction: column; }.system-heading .heading-actions, .system-heading > .button { width: 100%; }.system-heading .heading-actions .button, .system-heading > .button { flex: 1; }.settings-card { padding: 20px; }.admin-table-wrap { display: none; }.admin-users-mobile { padding: 10px; display: grid; gap: 9px; }.admin-mobile-user { padding: 13px; background: #fafbfc; border: 1px solid var(--line); border-radius: 11px; }.admin-mobile-top { display: flex; justify-content: space-between; gap: 10px; }.admin-mobile-meta { margin: 12px 0; display: flex; gap: 6px; }.admin-mobile-bottom { display: flex; align-items: center; justify-content: space-between; }.admin-search { width: 48%; }.admin-form-grid { grid-template-columns: 1fr; }.admin-user-modal { max-height: 92vh; overflow-y: auto; }.admin-modal-actions { flex-wrap: wrap; }.admin-modal-actions > span { display: none; }
    .activity-delete { opacity: 1; }
}

@media (max-width: 760px) {
    html { width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { width: 100%; min-width: 0; overflow-x: hidden; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    input, select, textarea { font-size: 16px !important; }
    button, a, .file-card, .public-item, .nav-item, .profile-button, .search-box, .select-all, .file-select { touch-action: manipulation; }
    input, select, textarea, button { max-width: 100%; }

    .button { min-height: 44px; height: auto; padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.15; }
    .button span { display: inline-block; overflow: hidden; text-overflow: ellipsis; }
    .icon-button { width: 44px; height: 44px; border-radius: 12px; }
    .avatar { width: 38px; height: 38px; }
    .brand { font-size: 18px; letter-spacing: 0; }
    .brand-mark { width: 38px; height: 38px; border-radius: 12px; }

    .auth-screen { min-height: 100dvh; padding: 0; align-items: stretch; background: #fff; }
    .boot-screen { min-height: 100dvh; padding: 24px; }
    .auth-panel { width: 100%; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
    .auth-mobile-brand { margin-bottom: 34px; }
    .auth-form h2 { font-size: 31px; line-height: 1.08; letter-spacing: -.8px; }
    .form-intro { margin-bottom: 24px; font-size: 14px; line-height: 1.45; }
    .auth-form label, .modal label, .settings-card label, .admin-user-modal label { gap: 9px; margin: 15px 0; font-size: 12px; }
    .auth-form input, .modal input, .settings-card input, .admin-user-modal input, .admin-user-modal select { min-height: 48px; height: 48px; border-radius: 10px; }

    .app { min-height: 100dvh; display: block; }
    .workspace { width: 100%; min-height: 100dvh; margin: 0; }
    .sidebar { width: min(304px, 86vw); padding: max(18px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
    .sidebar-head { height: 48px; padding: 0 8px; }
    .main-nav { gap: 6px; margin-top: 26px; }
    .nav-item { height: 48px; border-radius: 10px; font-size: 14px; }
    .storage-card { padding: 13px; }
    .sidebar-user { padding-top: 12px; }

    .topbar { position: sticky; top: 0; height: auto; min-height: 64px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; gap: 8px; background: rgba(255,255,255,.97); }
    .menu-button { flex: 0 0 44px; display: grid; }
    .search-box { flex: 1 1 auto; width: auto; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; }
    .search-box input { font-size: 16px; }
    .search-box svg { flex: none; }
    .search-box kbd { display: none; }
    .activity-button { display: none; }
    .profile-wrap { flex: 0 0 auto; }
    .profile-button { width: 44px; height: 44px; padding: 3px; justify-content: center; }
    .profile-copy, .profile-button .chevron { display: none; }
    .profile-menu { position: fixed; z-index: 120; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 72px); bottom: auto; width: auto; max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px; border-radius: 18px; transform: translateY(-8px) scale(.98); transform-origin: top right; box-shadow: 0 22px 60px rgba(25,34,57,.22); }
    .profile-menu.open { transform: none; }
    .profile-menu::before { display: none; }
    .profile-menu div { padding: 14px; margin-bottom: 8px; border-radius: 13px; }
    .profile-menu strong { font-size: 14px; }
    .profile-menu span { font-size: 12px; }
    .profile-menu button { min-height: 48px; height: auto; padding: 0 12px; font-size: 14px; border-radius: 12px; }

    .content { width: 100%; padding: 20px 14px max(44px, env(safe-area-inset-bottom)); }
    .page-heading, .system-heading { min-height: 0; align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 18px; }
    .page-heading h1, .system-heading h1 { margin-top: 4px; font-size: 26px; line-height: 1.08; letter-spacing: -.5px; }
    .page-heading p, .system-heading p { font-size: 13px; line-height: 1.45; }
    .breadcrumb { min-height: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
    .breadcrumb::-webkit-scrollbar { display: none; }
    .heading-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .heading-actions .button, .system-heading > .button, .system-heading .heading-actions .button { width: 100%; min-width: 0; }
    .heading-actions .button span, .system-heading .button span { white-space: nowrap; }

    .list-toolbar { height: auto; min-height: 50px; margin-top: 12px; padding: 8px 0; gap: 10px; align-items: center; }
    .toolbar-left { min-width: 0; gap: 8px; }
    .list-toolbar #item-count { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .toolbar-right { flex: none; gap: 8px; }
    .sort-control { max-width: 134px; display: flex; align-items: center; }
    .sort-control span { display: none; }
    .sort-control select { max-width: 118px; height: 38px; padding: 0 4px; font-size: 16px; }
    .view-switch { padding: 3px; border-radius: 10px; }
    .view-switch button { width: 36px; height: 34px; }

    .selection-toolbar { position: sticky; top: 62px; z-index: 20; margin-top: 10px; padding: 10px; align-items: stretch; flex-direction: column; border-radius: 13px; }
    .selection-toolbar > div { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .selection-toolbar .button { width: 100%; min-width: 0; min-height: 42px; padding: 10px; justify-content: center; }
    .selection-toolbar .button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .select-all { min-height: 38px; }
    .select-all input, .file-select input { width: 18px; height: 18px; }

    .file-area { min-height: 320px; padding-top: 16px; }
    .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .file-card { height: auto; min-height: 168px; padding: 10px; border-radius: 13px; box-shadow: 0 2px 7px rgba(24,32,54,.035); }
    .file-card:hover { transform: none; }
    .card-actions { top: 8px; right: 8px; opacity: 1; }
    .card-actions button { width: 32px; height: 32px; border-radius: 9px; }
    .file-select { top: 8px; left: 8px; width: 32px; height: 32px; opacity: 1; border-radius: 9px; }
    .file-visual { min-height: 104px; border-radius: 10px; }
    .file-visual svg { width: 50px; height: 50px; }
    .file-visual.folder svg { width: 60px; height: 60px; }
    .file-meta { padding: 9px 2px 0; }
    .file-name { font-size: 12px; line-height: 1.2; }
    .file-detail { font-size: 10px; line-height: 1.3; }
    .file-grid.list-mode { gap: 8px; }
    .file-grid.list-mode .file-card { min-height: 66px; height: auto; padding: 8px 52px 8px 10px; grid-template-columns: 48px minmax(0, 1fr); border-radius: 12px; }
    .file-grid.list-mode .file-card.selection-mode { padding-left: 44px; }
    .file-grid.list-mode .file-select { top: 17px; left: 8px; }
    .file-grid.list-mode .file-visual { width: 48px; height: 48px; min-height: 48px; }
    .file-grid.list-mode .card-actions { top: 17px; right: 10px; }
    .empty-state { min-height: 300px; padding: 20px 8px; }
    .empty-state h2 { font-size: 18px; }
    .empty-state p { max-width: 280px; font-size: 13px; line-height: 1.45; }

    .settings-grid { grid-template-columns: 1fr; gap: 14px; }
    .settings-card { padding: 18px; border-radius: 14px; }
    .settings-card-head { gap: 11px; margin-bottom: 18px; padding-bottom: 15px; }
    .avatar-editor { align-items: flex-start; padding: 13px; gap: 12px; }
    .avatar-editor .avatar-preview { width: 62px; height: 62px; }
    .avatar-editor > div > span { flex-wrap: wrap; }
    .settings-card .button { width: 100%; margin-left: 0; }

    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .admin-stats article { padding: 14px; border-radius: 12px; }
    .admin-stats strong { font-size: 21px; }
    .admin-table-card { border-radius: 14px; }
    .admin-table-head { min-height: 0; padding: 14px; align-items: stretch; flex-direction: column; gap: 12px; }
    .admin-search { width: 100%; height: 44px; }
    .admin-users-mobile { padding: 10px; }
    .admin-mobile-user { min-width: 0; overflow: hidden; }
    .admin-mobile-top, .admin-mobile-bottom { min-width: 0; gap: 10px; }
    .admin-mobile-top .admin-user-cell { min-width: 0; }
    .admin-mobile-meta { flex-wrap: wrap; }

    .modal { width: 100%; max-width: none; max-height: calc(100dvh - 18px); margin: 0; border-radius: 18px 18px 0 0; }
    .modal[open] { position: fixed; inset: auto 0 0 0; }
    .modal form { max-height: calc(100dvh - 18px); overflow-y: auto; padding: 20px 18px max(20px, env(safe-area-inset-bottom)); }
    .editor-textarea { min-height: 55dvh; resize: none; font-size: 16px !important; line-height: 1.5; }
    .modal-head { gap: 12px; }
    .modal-head > div { min-width: 0; gap: 11px; }
    .modal-head h2 { font-size: 18px; line-height: 1.2; }
    .modal-head p { font-size: 12px; line-height: 1.4; }
    .modal-icon { width: 40px; height: 40px; border-radius: 11px; }
    .modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .modal-actions .button, .modal-actions button { width: 100%; }
    .modal-actions.split, .admin-modal-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; }
    .confirm-modal { text-align: left; }
    .confirm-modal form { text-align: center; }
    .confirm-modal .modal-actions { grid-template-columns: 1fr 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .toggle-row { align-items: center; padding: 12px; }

    .context-menu { z-index: 120; left: 8px !important; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); top: auto !important; width: auto; max-height: min(70dvh, 520px); overflow-y: auto; padding: 8px; border-radius: 16px; }
    .context-menu button { min-height: 46px; padding: 10px 12px; font-size: 14px; border-radius: 11px; }
    .context-menu svg { width: 18px; height: 18px; }

    .activity-drawer { width: 100%; padding: max(20px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
    .drawer-head { gap: 12px; }
    .drawer-head h2 { font-size: 22px; }
    .drawer-actions .icon-button { flex: none; }
    .activity-list { margin-top: 22px; }
    .activity-row { padding-top: 10px; padding-bottom: 13px; }
    .toast-region { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
    .toast { width: 100%; min-width: 0; max-width: none; font-size: 13px; }
    .drop-overlay { inset: 10px; border-radius: 16px; }

    .public-header { height: auto; min-height: 68px; padding: 12px 16px; gap: 10px; }
    .public-brand { min-width: 0; }
    .public-brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .public-pill { flex: none; }
    .public-main { width: 100%; padding: 32px 14px 54px; }
    .share-hero { align-items: stretch; flex-direction: column; gap: 16px; }
    .share-hero h1 { font-size: 28px; line-height: 1.12; }
    .public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .public-item { height: auto; min-height: 166px; padding: 10px; border-radius: 13px; }
    .public-item .file-visual { min-height: 104px; }
    .shared-file-card { width: 100%; align-items: flex-start; padding: 14px; border-radius: 13px; }
    .shared-file-card .file-visual { width: 86px; height: 74px; }
}

@media (max-width: 380px) {
    .content { padding-left: 10px; padding-right: 10px; }
    .topbar { padding-left: 9px; padding-right: 9px; }
    .file-grid, .public-grid { gap: 8px; }
    .file-card { min-height: 158px; padding: 9px; }
    .file-visual { min-height: 96px; }
    .heading-actions { grid-template-columns: 1fr; }
    .selection-toolbar > div { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
