:root {
  color-scheme: light;
  --ink: #172432;
  --muted: #728190;
  --faint: #9ca9b3;
  --line: #e4ebef;
  --panel: #ffffff;
  --canvas: #f4f8fa;
  --sidebar: #eef4f6;
  --ice: #dff5ff;
  --blue: #5dbbe7;
  --blue-dark: #278bbd;
  --orange: #ff7043;
  --orange-dark: #ec572b;
  --red: #c94e61;
  --navy: #10243e;
  --shadow: 0 18px 60px rgba(31, 66, 87, .14);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(93,187,231,.35); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { color: var(--blue-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-screen { display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr); min-height: 100vh; background: #fff; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg,#e9f8ff 0%,#d6f0fb 54%,#c5e8f5 100%); }
.login-art::after { content: ""; position: absolute; inset: auto -8% -22% 8%; height: 43%; background: rgba(255,255,255,.56); border-radius: 50% 50% 0 0; transform: rotate(-3deg); }
.aurora { position: absolute; border-radius: 999px; filter: blur(4px); opacity: .8; }
.aurora-one { width: 420px; height: 420px; background: rgba(255,255,255,.55); left: -80px; top: -80px; }
.aurora-two { width: 330px; height: 330px; background: rgba(255,154,92,.15); right: -110px; bottom: 20px; }
.login-penguin { width: min(53%, 520px); position: relative; z-index: 2; transform: translate(10%, -3%); filter: drop-shadow(0 24px 26px rgba(24,72,101,.18)); }
.login-copy { position: absolute; z-index: 3; left: clamp(38px,6vw,92px); bottom: clamp(38px,7vh,82px); }
.login-copy h1 { font-size: clamp(38px,4.7vw,70px); line-height: 1.02; letter-spacing: -.055em; margin: 13px 0 16px; color: var(--navy); }
.login-copy p { font-size: 17px; color: #526f80; margin: 0; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: min(390px,100%); }
.login-card h2 { font-size: 31px; letter-spacing: -.035em; margin: 12px 0 6px; }
.login-card > p { margin: 0 0 32px; }
.login-card label { display: block; font-size: 13px; font-weight: 700; margin: 20px 0; }
.login-card input { display: block; width: 100%; margin-top: 9px; height: 48px; border: 1px solid #d9e3e8; border-radius: 11px; padding: 0 14px; background: #fbfdfe; color: var(--ink); transition: .16s; }
.login-card input:focus { border-color: var(--blue); background: #fff; }
.password-field { position: relative; }
.password-field button { position: absolute; top: 17px; right: 12px; border: 0; background: transparent; color: var(--blue-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.login-button { width: 100%; height: 49px; margin-top: 5px; justify-content: center; }
.secure-note { text-align: center; color: var(--faint) !important; font-size: 12px; margin-top: 20px !important; }
.form-error { color: var(--red); background: #fff1f3; border-radius: 9px; padding: 10px 12px; font-size: 13px; margin: 10px 0 !important; }
.mobile-brand { display: none; }

.app-shell { --detail-panel-width: 350px; display: grid; width: 100%; height: 100vh; grid-template-columns: 224px minmax(0,1fr); grid-template-rows: 68px minmax(0,1fr); grid-template-areas: "top top" "side work"; }
.app-shell.with-detail { grid-template-columns: 224px minmax(0,1fr); grid-template-areas: "top top" "side work"; }
.topbar { grid-area: top; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); z-index: 20; }
.brand { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 23px; text-decoration: none; color: var(--navy); font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 32px; height: 36px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(20,45,60,.12)); }
.path-navigation { height: 30px; display: flex; align-items: center; gap: 3px; margin: 0 0 7px -7px; }
.path-navigation .icon-button { width: 28px; height: 28px; }
.breadcrumbs { display: flex; min-width: 0; align-items: center; white-space: nowrap; overflow: hidden; }
.breadcrumb { background: transparent; border: 0; padding: 7px 6px; cursor: pointer; font-size: 13px; font-weight: 650; color: var(--muted); }
.breadcrumb:last-child { color: var(--ink); }
.breadcrumb-sep { color: #bcc8cf; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; padding-right: 22px; }
.search-box { width: min(300px,26vw); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #f7fafb; color: var(--faint); transition: .16s; }
.search-box:focus-within { width: min(350px,30vw); border-color: #a7d7ed; background: #fff; box-shadow: 0 0 0 3px rgba(93,187,231,.12); }
.search-box svg { width: 17px; }
.search-box input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; color: var(--ink); font-size: 13px; }
kbd { font: 10px ui-monospace, monospace; color: #9ba7af; border: 1px solid #dbe3e7; padding: 2px 5px; border-radius: 5px; background: #fff; }
.primary-button, .soft-button { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.primary-button { height: 40px; padding: 0 16px; color: #fff; background: var(--orange); box-shadow: 0 7px 18px rgba(255,112,67,.2); }
.primary-button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.primary-button svg { width: 18px; }
.soft-button { height: 38px; padding: 0 12px; background: #f2f6f8; border: 1px solid #e3eaee; }
.soft-button:hover { background: #eaf2f5; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: #edf3f5; color: var(--ink); }

.sidebar { grid-area: side; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid #e1e9ed; padding: 18px 12px 14px; min-height: 0; }
.sidebar-nav { display: grid; gap: 3px; }
.nav-item { width: 100%; height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #536575; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.65); color: var(--ink); }
.nav-item.active { color: #176b95; background: rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(38,73,92,.06); }
.nav-item svg, .nav-item .folder-mini { width: 19px; height: 19px; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 10px; }
.folder-mini { position: relative; display: inline-block; border-radius: 4px; background: linear-gradient(#9cddf4,#55b8e4); }
.folder-mini::before { content: ""; position: absolute; left: 1px; top: -3px; width: 9px; height: 5px; border-radius: 3px 3px 0 0; background: #7bcbe9; }
.storage-card { margin-top: auto; padding: 14px 12px; }
.storage-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.storage-row strong { color: var(--ink); font-weight: 700; }
.storage-track { height: 5px; background: #dce7ec; border-radius: 9px; margin: 11px 0 7px; overflow: hidden; }
.storage-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,var(--blue),#76cde9); transition: width .4s; }
.storage-caption { color: var(--faint); font-size: 10px; }
.account-button { min-height: 54px; display: flex; align-items: center; gap: 10px; border: 0; background: rgba(255,255,255,.65); border-radius: 11px; padding: 8px 10px; text-align: left; cursor: pointer; }
.account-button:hover { background: #fff; }
.account-button > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; flex: 1; }
.account-button strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.account-button small { color: var(--muted); font-size: 10px; }
.account-button svg { width: 16px; color: var(--faint); }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg,var(--navy),#416789); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 800; }

.workspace { grid-area: work; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); position: relative; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 27px 30px 19px; transition: margin-right .18s ease; }
.workspace-heading { min-width: 0; }
.workspace-header h1 { font-size: 27px; letter-spacing: -.035em; margin: 6px 0 4px; }
.workspace-header p { color: var(--muted); margin: 0; font-size: 13px; }
.workspace-tools { display: flex; align-items: center; gap: 9px; }
.workspace-tools svg { width: 17px; }
.segmented { display: flex; padding: 3px; background: #f0f4f6; border-radius: 10px; }
.segmented button { display: grid; place-items: center; width: 32px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; }
.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(20,36,59,.12); }
.segmented svg { width: 17px; }
.sort-select { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 0 28px 0 10px; color: var(--muted); font-size: 12px; }
.content-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 8px 26px 38px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(146px,1fr)); align-content: start; gap: 22px 14px; }
.file-item { position: relative; min-width: 0; height: 194px; display: grid; grid-template-rows: 105px 38px 17px; align-content: start; padding: 12px 9px 10px; border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: default; user-select: none; transition: .15s ease; }
.file-item:hover { background: #f2f7f9; }
.file-item.selected { background: #e7f4fa; border-color: #9bd2ea; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.file-visual { height: 105px; display: grid; place-items: center; position: relative; }
.file-visual img { max-width: 112px; max-height: 96px; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 16px rgba(31,64,82,.12); }
.file-icon { width: 78px; height: 91px; position: relative; display: grid; place-items: center; color: #fff; filter: drop-shadow(0 7px 8px rgba(35,65,80,.12)); }
.file-icon::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg,#fff,#edf4f7); border: 1px solid #dbe6eb; border-radius: 10px 17px 10px 10px; clip-path: polygon(0 0,72% 0,100% 24%,100% 100%,0 100%); }
.file-icon::after { content: ""; position: absolute; right: 0; top: 0; width: 28%; height: 24%; background: #dce8ed; clip-path: polygon(0 0,0 100%,100% 100%); }
.file-icon span { position: relative; z-index: 2; min-width: 38px; padding: 5px 5px; border-radius: 6px; background: var(--type-color,#718da0); font-size: 10px; font-weight: 850; text-align: center; letter-spacing: .04em; }
.file-icon.html { --type-color: #ff7043; } .file-icon.code { --type-color: #537fc3; } .file-icon.pdf { --type-color: #d95366; } .file-icon.archive { --type-color: #9b78c9; } .file-icon.video { --type-color: #6d6bc7; } .file-icon.audio { --type-color: #34a58a; }
.folder-icon { width: 103px; height: 77px; position: relative; margin-top: 13px; border-radius: 11px 11px 16px 16px; background: linear-gradient(155deg,#7fd2ef,#45acd8); box-shadow: inset 0 1px rgba(255,255,255,.65),0 9px 15px rgba(48,140,181,.17); }
.folder-icon::before { content: ""; position: absolute; width: 46px; height: 17px; left: 4px; top: -10px; border-radius: 8px 9px 0 0; background: #75c9ea; }
.folder-icon::after { content: ""; position: absolute; inset: 9px 7px auto; height: 18px; border-radius: 8px; background: rgba(255,255,255,.2); transform: skewX(-12deg); }
.system-folder-icon { background: linear-gradient(155deg,#9daec0,#71879d); box-shadow: inset 0 1px rgba(255,255,255,.65),0 9px 15px rgba(62,83,103,.17); }
.system-folder-icon::before { background: #8fa2b5; }
.system-folder-badge { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 3px 5px; border-radius: 5px; background: rgba(16,36,62,.78); color: #fff; font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.file-name { width: 100%; align-self: start; margin-top: 6px; overflow: hidden; text-align: center; font-size: 12px; line-height: 16px; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.file-meta-row { align-self: end; display: flex; justify-content: center; min-width: 0; margin-top: 1px; line-height: 15px; text-align: center; color: var(--faint); font-size: 10px; white-space: nowrap; }
.file-size, .file-modified { overflow: hidden; text-overflow: ellipsis; }
.meta-separator { flex: 0 0 auto; }
.item-menu { position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; display: none; place-items: center; padding: 0; border: 0; border-radius: 7px; background: rgba(255,255,255,.88); box-shadow: 0 2px 9px rgba(30,54,69,.11); cursor: pointer; z-index: 3; }
.file-item:hover .item-menu, .file-item.selected .item-menu { display: grid; }
.item-menu svg { width: 15px; }
.selection-check { position: absolute; z-index: 4; top: 9px; left: 9px; width: 16px; height: 16px; padding: 0; border: 1px solid #b8cbd5; border-radius: 5px; background: rgba(255,255,255,.94); opacity: 0; cursor: pointer; transition: .14s ease; }
.file-item:hover .selection-check, .file-item.selected .selection-check { opacity: 1; }
.file-item.selected .selection-check { border-color: #2d9bcc; background: #2d9bcc; }
.file-item.selected .selection-check::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.file-grid.list-view { display: block; border-top: 1px solid var(--line); }
.list-header, .list-view .file-item { display: grid; grid-template-columns: 22px 46px minmax(220px,1fr) 110px 150px 32px; grid-template-rows: 1fr; align-items: center; gap: 10px; }
.list-header { height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.list-view .file-item { height: 62px; border: 0; border-bottom: 1px solid #edf1f3; border-radius: 0; padding: 7px 10px; }
.list-view .file-visual { width: 45px; height: 45px; }
.list-view .file-visual img { max-width: 43px; max-height: 43px; border-radius: 6px; }
.list-view .folder-icon { width: 41px; height: 31px; margin-top: 5px; border-radius: 5px 5px 7px 7px; }
.list-view .folder-icon::before { width: 19px; height: 8px; top: -5px; border-radius: 4px 4px 0 0; }
.list-view .file-icon { width: 34px; height: 41px; }
.list-view .file-icon span { min-width: 24px; padding: 3px; font-size: 7px; }
.list-view .file-name, .list-view .file-size, .list-view .file-modified { text-align: left; margin: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-view .file-name { font-size: 13px; }
.list-view .file-meta-row { display: contents; }
.list-view .file-size, .list-view .file-modified { color: var(--faint); font-size: 11px; }
.list-view .meta-separator { display: none; }
.list-view .item-menu { position: static; grid-column: 6; display: grid; box-shadow: none; background: transparent; }
.list-view .selection-check { position: relative; top: auto; left: auto; grid-column: 1; grid-row: 1; justify-self: center; margin-left: 0; opacity: .5; }
.list-view .file-visual { grid-column: 2; grid-row: 1; }
.list-view .file-name { grid-column: 3; grid-row: 1; }
.list-view .file-size { grid-column: 4; grid-row: 1; }
.list-view .file-modified { grid-column: 5; grid-row: 1; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.link-button { border: 0; background: transparent; color: var(--blue-dark); font-size: 11px; font-weight: 750; cursor: pointer; padding: 6px; white-space: nowrap; }
.danger-text { color: var(--red) !important; }
.activity-list, .transfer-list { display: grid; gap: 8px; }
.activity-row, .transfer-row { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(93,187,231,.12); }
.activity-row > div { display: grid; gap: 3px; flex: 1; min-width: 0; }
.activity-row strong, .transfer-top strong { font-size: 12px; }
.activity-row span, .activity-row time, .transfer-top span { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-row { display: grid; }
.transfer-top { display: flex; justify-content: space-between; gap: 12px; }
.transfer-progress { height: 6px; overflow: hidden; border-radius: 10px; background: #edf2f4; }
.transfer-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#d94b78,#ff7043,#ffae48); transition: width .2s; }
.simple-empty { grid-column: 1/-1; min-height: 320px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--muted); }
.simple-empty h2 { color: var(--ink); font-size: 17px; margin: 0 0 6px; }
.simple-empty p { margin: 0; font-size: 12px; }

.selection-bar { margin: 0 28px 10px; min-height: 45px; display: flex; align-items: center; gap: 6px; padding: 5px 7px 5px 15px; border: 1px solid #cce4ef; border-radius: 12px; background: #eff9fd; transition: margin-right .18s ease; }
.selection-bar strong { flex: 0 0 auto; font-size: 12px; margin-right: auto; }
.selection-bar button { flex: 0 0 auto; border: 0; background: transparent; border-radius: 7px; padding: 7px 9px; color: #3f6578; font-size: 11px; font-weight: 700; cursor: pointer; }
.selection-bar button:hover { background: #fff; }
.selection-bar button:disabled { color: #abb6bd !important; cursor: not-allowed; background: transparent; }
.selection-bar .danger-text { color: var(--red); }
.selection-close { font-size: 19px !important; }

.detail-panel { position: fixed; z-index: 90; top: 68px; right: 0; bottom: 0; width: var(--detail-panel-width); min-height: 0; overflow: auto; background: #fbfdfe; border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(20,45,60,.13); animation: slideIn .18s ease; }
@keyframes slideIn { from { transform: translateX(15px); opacity: 0; } }
.detail-header { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 750; }
.detail-header .icon-button { font-size: 22px; }
.detail-preview { height: 226px; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg,#f2f8fa,#eaf4f7); overflow: hidden; }
.detail-preview img { max-height: 178px; max-width: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 12px 30px rgba(29,66,84,.16); }
.detail-preview .folder-icon { transform: scale(1.25); }
.detail-preview .file-icon { transform: scale(1.25); }
.detail-body { padding: 20px; }
.detail-body h2 { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; margin: 0 0 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; color: #368368; font-size: 11px; font-weight: 700; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #45b88a; box-shadow: 0 0 0 3px rgba(69,184,138,.12); }
.detail-actions { display: flex; gap: 8px; margin: 20px 0; }
.detail-actions button { flex: 1; justify-content: center; }
.detail-body dl { display: grid; grid-template-columns: 78px 1fr; gap: 12px; margin: 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.detail-body dt { color: var(--faint); }
.detail-body dd { margin: 0; color: #465866; overflow-wrap: anywhere; }
.detail-section-title { margin: 20px 0 10px; font-size: 12px; font-weight: 750; }
.version-empty { color: var(--faint); font-size: 11px; }
.version-item { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f3; font-size: 10px; }
.version-item button { border: 0; background: transparent; color: var(--blue-dark); font-size: 10px; font-weight: 700; cursor: pointer; }

.empty-state { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-visual { position: relative; }
.empty-visual img { width: 116px; height: 116px; object-fit: contain; }
.empty-visual span { position: absolute; right: 3px; bottom: 10px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: white; font-size: 22px; box-shadow: 0 7px 15px rgba(255,112,67,.28); }
.empty-state h2 { margin: 16px 0 6px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.drop-overlay { position: absolute; inset: 12px; z-index: 30; display: grid; place-items: center; border: 2px dashed #69bddf; border-radius: 18px; background: rgba(235,249,254,.94); backdrop-filter: blur(8px); }
.drop-overlay > div { display: grid; justify-items: center; gap: 9px; color: #287ea6; }
.drop-overlay svg { width: 38px; height: 38px; }
.drop-overlay strong { font-size: 18px; }
.drop-overlay span { color: var(--muted); font-size: 12px; }

.menu { position: fixed; z-index: 100; width: 244px; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.menu button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; }
.menu button:hover { background: #f1f6f8; }
.menu button svg, .menu button .folder-mini { flex: 0 0 24px; width: 24px; height: 24px; }
.menu button span:last-child { display: grid; gap: 2px; }
.menu strong { font-size: 12px; }
.menu small { color: var(--muted); font-size: 10px; }
.context-menu { position: fixed; z-index: 210; width: 226px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 18px 55px rgba(20,45,60,.2); backdrop-filter: blur(18px); }
.context-menu button { width: 100%; height: 36px; border: 0; border-radius: 8px; padding: 0 11px; background: transparent; text-align: left; font-size: 12px; font-weight: 650; cursor: pointer; }
.context-menu button:hover { background: #eef5f8; }
.context-menu button.danger { color: var(--red); }
.context-separator { height: 1px; border: 0; margin: 5px 7px; background: var(--line); }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(16,36,62,.28); backdrop-filter: blur(7px); }
.modal { width: min(490px,100%); max-height: min(720px,calc(100vh - 40px)); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 32px 90px rgba(16,36,62,.25); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 23px 24px 12px; }
.modal-header h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.025em; }
.modal-header .icon-button { font-size: 24px; }
.modal-content { padding: 10px 24px 22px; color: #435767; font-size: 13px; }
.modal-content label { display: block; margin: 8px 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.modal-content input { width: 100%; height: 43px; margin-top: 8px; padding: 0 12px; border: 1px solid #dbe4e8; border-radius: 9px; }
.modal-content code { display: block; padding: 12px; border-radius: 9px; background: #f2f6f8; color: #35586a; overflow-wrap: anywhere; font: 11px ui-monospace,monospace; }
.modal-content .warning { padding: 11px 12px; border-radius: 9px; background: #fff4ef; color: #985039; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 24px 22px; border-top: 1px solid var(--line); }
.danger-button { height: 40px; border: 0; border-radius: 10px; padding: 0 14px; background: var(--red); color: white; font-weight: 700; cursor: pointer; }

.preview-overlay { position: fixed; inset: 0; z-index: 180; display: grid; grid-template-rows: 68px 1fr; background: rgba(16,27,39,.96); color: #fff; }
.preview-overlay header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 0 25px; background: rgba(5,14,23,.7); }
.preview-overlay header > div:first-child { display: grid; gap: 3px; min-width: 0; }
.preview-overlay header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.preview-overlay header span { color: #91a3b0; font-size: 10px; }
.preview-overlay header > div:last-child { display: flex; align-items: center; gap: 8px; }
.preview-overlay .soft-button { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.15); }
.preview-overlay .icon-button { color: white; font-size: 27px; }
.preview-stage { display: grid; place-items: center; min-height: 0; padding: 28px; overflow: auto; }
.preview-stage img { max-width: 92%; max-height: calc(100vh - 125px); object-fit: contain; }
.preview-stage iframe { width: min(1200px,95%); height: calc(100vh - 120px); border: 0; border-radius: 10px; background: #fff; }
.preview-stage video { max-width: 90%; max-height: 80vh; }
.preview-stage audio { width: min(560px,90%); }
.text-preview { width: min(1000px,94%); max-height: calc(100vh - 130px); overflow: auto; padding: 25px; border-radius: 11px; background: #f8fbfc; color: #263b48; white-space: pre-wrap; word-break: break-word; font: 12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace; }

.toast-region { position: fixed; z-index: 300; right: 22px; bottom: 22px; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 280px; max-width: 390px; display: flex; gap: 10px; align-items: center; padding: 13px 15px; border: 1px solid #dfe8ec; border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 15px 45px rgba(20,45,60,.16); color: #38515f; font-size: 12px; animation: toastIn .2s ease; }
.toast::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #45b88a; }
.toast.error::before { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
  .app-shell { --detail-panel-width: min(360px,42vw); }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 48px; color: var(--navy); font-weight: 800; }
.mobile-brand img { width: 30px; height: 34px; object-fit: contain; }
  .app-shell, .app-shell.with-detail { grid-template-columns: 76px minmax(0,1fr); grid-template-areas: "top top" "side work"; }
  .topbar { grid-template-columns: 76px minmax(0,1fr) auto; }
  .brand { padding: 0 20px; }
  .brand span { display: none; }
  .sidebar { padding-inline: 9px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span:not(.nav-icon):not(.nav-badge) { display: none; }
  .storage-card, .account-button > span:nth-child(2), .account-button > svg { display: none; }
  .account-button { margin-top: auto; justify-content: center; padding: 8px; }
  .detail-panel { width: min(360px,92vw); }
  .search-box { width: 180px; }
}
@media (min-width: 621px) {
  .app-shell.with-detail .selection-bar { margin-right: calc(var(--detail-panel-width) + 16px); overflow-x: auto; scrollbar-width: thin; }
}
@media (min-width: 1100px) {
  .app-shell.with-detail .workspace-header { margin-right: calc(var(--detail-panel-width) + 16px); }
}
@media (max-width: 620px) {
  .app-shell, .app-shell.with-detail { grid-template-columns: 1fr; grid-template-rows: 60px minmax(0,1fr) 62px; grid-template-areas: "top" "work" "side"; }
  .topbar { height: 60px; }
  .brand { padding: 0 9px; }
  .brand img { width: 28px; height: 32px; }
  .path-navigation, .search-box, .primary-button svg { display: none; }
  .topbar-actions { padding-right: 10px; }
  .topbar-actions .primary-button { padding: 0 13px; }
  .sidebar { flex-direction: row; align-items: center; border: 0; border-top: 1px solid var(--line); padding: 5px 8px; background: rgba(248,251,252,.96); z-index: 70; }
  .sidebar-nav { display: flex; justify-content: space-around; width: 100%; }
  .nav-item { width: 51px; height: 48px; flex-direction: column; gap: 2px; font-size: 9px; background: transparent !important; box-shadow: none !important; }
  .nav-item span:not(.nav-icon):not(.nav-badge) { display: block; }
  .nav-item .nav-badge { position: absolute; margin: -23px 0 0 24px; }
  .nav-item:nth-child(4) { display: none; }
  .account-button, .storage-card { display: none; }
  .workspace-header { padding: 20px 18px 14px; align-items: center; }
  .workspace-header h1 { font-size: 23px; }
  .workspace-header p, .workspace-header .eyebrow, .sort-select, #newFolderButton { display: none; }
  .content-scroll { padding: 5px 12px 24px; }
  .file-grid { grid-template-columns: repeat(auto-fill,minmax(105px,1fr)); gap: 12px 5px; }
  .file-item { height: 168px; grid-template-rows: 87px 36px 15px; padding-inline: 4px; }
  .file-visual { height: 87px; }
  .file-visual img { max-width: 92px; max-height: 82px; }
  .folder-icon { transform: scale(.84); }
  .file-icon { transform: scale(.82); }
  .selection-bar { position: fixed; z-index: 80; left: 10px; right: 10px; bottom: 70px; margin: 0; overflow-x: auto; }
  .selection-bar button[data-action="download"], .selection-bar button[data-action="move"] { display: none; }
  .detail-panel { top: 60px; bottom: 62px; width: 100%; }
  .preview-overlay { grid-template-rows: 60px 1fr; }
  .preview-overlay header { padding-inline: 12px; }
  .preview-overlay .soft-button { display: none; }
  .toast-region { left: 12px; right: 12px; bottom: 75px; }
  .toast { min-width: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
