:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --line: #e2e8f1;
  --text: #1b2638;
  --muted: #6f7c8f;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --shadow: 0 12px 28px rgba(25, 48, 84, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; color: #eef5ff; background: #18263b; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.brand-mark { color: #79aaff; font-size: 24px; line-height: 1; }
.prototype-badge { margin-left: 4px; padding: 4px 8px; border: 1px solid #4a607d; border-radius: 5px; color: #abc0de; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: #b6c6dc; font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.logout-button { padding: 5px 9px; border: 1px solid #4a607d; border-radius: 5px; color: #c6d4e7; background: transparent; font-size: 10px; font-weight: 700; }
.logout-button:hover { color: #fff; border-color: #7892b4; }
.status-dot { width: 7px; height: 7px; border-radius: 99px; background: #54d38c; box-shadow: 0 0 0 3px rgba(84, 211, 140, .13); }
.app-shell { height: calc(100vh - 64px); display: grid; grid-template-rows: minmax(210px, 1fr) minmax(360px, 2fr); }
.overview-pane { min-height: 0; display: grid; grid-template-columns: minmax(170px, .55fr) minmax(300px, 1.35fr) minmax(300px, 1.3fr); border-bottom: 1px solid var(--line); }
.sidebar, .description-panel, .preview-panel { background: var(--panel); }
.sidebar { min-width: 0; overflow: auto; padding: 22px 16px; border-right: 1px solid var(--line); }
.description-panel { min-width: 0; overflow: auto; padding: 18px 22px; border-right: 1px solid var(--line); }
.sidebar-heading { padding: 0 11px 10px; color: #8490a1; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.folder-heading { margin-top: 26px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 0; border-radius: 7px; color: #56657a; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { background: #f5f8fc; color: var(--text); }
.nav-item.active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.nav-icon { width: 18px; color: #7c8da5; font-size: 18px; text-align: center; }
.active .nav-icon { color: var(--blue); }
.folder-shortcuts { display: grid; gap: 2px; }
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px 28px 10px; }
.toolbar { display: flex; align-items: center; gap: 14px; min-height: 30px; }
.navigation-buttons { display: flex; gap: 9px; }
.navigation-button { min-width: 96px; height: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; color: #fff; background: var(--blue); box-shadow: 0 5px 12px rgba(37, 99, 235, .18); font-size: 12px; font-weight: 750; line-height: 1; transition: transform .15s, background .15s, box-shadow .15s; }
.navigation-button span { font-size: 16px; font-weight: 500; }
.navigation-button:hover { transform: translateY(-1px); background: #1d4ed8; box-shadow: 0 9px 20px rgba(37, 99, 235, .28); }
.navigation-button:active { transform: translateY(0); }
.parent-button { background: #334d79; box-shadow: 0 7px 16px rgba(51, 77, 121, .2); }
.parent-button:hover { background: #263f69; box-shadow: 0 9px 20px rgba(51, 77, 121, .28); }
.refresh-button { background: #087f8c; box-shadow: 0 7px 16px rgba(8, 127, 140, .2); }
.refresh-button:hover { background: #066b76; box-shadow: 0 9px 20px rgba(8, 127, 140, .28); }
.breadcrumbs { min-width: 100px; flex: 1 1 auto; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.search-form { flex: 0 1 430px; display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 6px; }
.search-form input { min-width: 0; height: 30px; padding: 0 10px; border: 1px solid #ccd7e5; border-radius: 6px; color: var(--text); background: #fff; font-size: 11px; }
.search-form input:focus { outline: 2px solid #a9c3f5; border-color: #7ea5ec; }
.search-form input:disabled { color: #8a97a8; background: #f4f6f9; }
.search-button, .search-clear-button { height: 30px; padding: 0 10px; border: 1px solid #cad7e8; border-radius: 6px; color: #fff; background: #334d79; font-size: 10px; font-weight: 750; }
.search-button:hover:not(:disabled) { background: #263f69; }
.search-button:disabled { cursor: not-allowed; opacity: .48; }
.search-clear-button { color: #52627a; background: #fff; }
.search-clear-button:hover { color: var(--blue); border-color: #abc2ee; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.crumb-button { max-width: 180px; overflow: hidden; border: 0; color: #52627a; background: transparent; text-overflow: ellipsis; font-size: 13px; }
.crumb-button:hover { color: var(--blue); }
.crumb-button.current { color: var(--text); font-weight: 700; }
.crumb-divider { padding: 0 7px; color: #9aa7b9; }
.content-header { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 12px; }
h1 { margin: 0 0 5px; font-size: 23px; letter-spacing: -.02em; }
.content-header p { margin: 0; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; gap: 8px; }
.primary-button { padding: 9px 14px; border: 0; border-radius: 6px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 700; }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { padding: 8px 11px; border: 1px solid #d5deea; border-radius: 6px; color: #52627a; background: #fff; font-size: 11px; font-weight: 700; }
.secondary-button:hover:not(:disabled) { color: var(--blue); border-color: #abc2ee; background: #f6f9ff; }
.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.download-button { background: #087f8c; }
.download-button:hover:not(:disabled) { background: #066b76; }
.download-progress { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(140px, 1fr); align-items: center; gap: 14px; margin: -3px 0 10px; padding: 8px 11px; border: 1px solid #dbe7ef; border-radius: 7px; background: #f7fbfc; }
.download-progress-copy { min-width: 0; display: flex; justify-content: space-between; gap: 10px; color: #52627a; font-size: 10px; }
.download-progress-copy strong { overflow: hidden; color: #315363; text-overflow: ellipsis; white-space: nowrap; }
.download-progress-copy span { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.download-progress progress { width: 100%; height: 9px; accent-color: #087f8c; }
.download-frame { display: none; }
.browser-card { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); }
.file-row { display: grid; grid-template-columns: var(--column-layout, minmax(210px, 2fr) 1.1fr .8fr 1fr); align-items: center; gap: 10px; }
.list-header { min-height: 32px; padding: 0 12px; border-bottom: 1px solid var(--line); color: #8b98a9; background: #fbfcfe; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.column-heading { position: relative; min-width: 0; }
.column-resizer { position: absolute; z-index: 2; top: -14px; right: -7px; width: 14px; height: 38px; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 7px; bottom: 7px; left: 6px; width: 1px; background: #d8e0ec; transition: background .15s, width .15s; }
.column-resizer:hover::after, .column-resizer:focus-visible::after { width: 2px; background: var(--blue); }
.column-resizer:focus-visible { outline: 2px solid #9bb9f5; outline-offset: 1px; }
body.resizing-columns, body.resizing-columns * { cursor: col-resize !important; user-select: none !important; }
.file-list { min-height: 0; flex: 1; overflow-y: auto; }
.file-item { width: 100%; min-height: 34px; padding: 0 12px; border: 0; border-bottom: 1px solid #edf1f6; color: var(--text); background: #fff; text-align: left; }
.file-item:hover, .file-item.selected { background: #f5f8ff; }
.file-item.selected { box-shadow: inset 3px 0 0 var(--blue); }
.file-name { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; font-size: 12px; font-weight: 600; }
.file-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-icon { flex: 0 0 19px; display: grid; place-items: center; color: #6c92d3; font-size: 15px; }
.muted-cell { overflow: hidden; color: #738197; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.empty-state, .loading-state, .error-state { padding: 55px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.error-state, .preview-error { color: #b24d5a; }
.hidden { display: none; }
.statusbar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; color: #8794a5; font-size: 10px; }
.panel-heading { padding-bottom: 12px; color: #8490a1; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.description-empty { padding-top: 26px; color: #8996a8; font-size: 11px; line-height: 1.55; }
.preview-panel { min-width: 0; overflow: auto; padding: 18px 22px; }
.preview-empty { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #8996a8; text-align: center; }
.preview-empty strong { color: #5b6b81; font-size: 13px; }
.preview-empty span { max-width: 190px; font-size: 11px; line-height: 1.5; }
.preview-symbol { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 5px; border-radius: 14px; color: #729be5; background: var(--blue-soft); font-size: 25px; }
.preview-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.preview-heading strong, .preview-heading small { display: block; overflow: hidden; max-width: 520px; text-overflow: ellipsis; white-space: nowrap; }
.preview-heading strong { font-size: 13px; }
.preview-heading small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.preview-file-icon { display: grid; width: 38px; height: 42px; place-items: center; border-radius: 7px; color: #6c92d3; background: #edf3ff; font-size: 22px; }
.metadata-grid { display: grid; grid-template-columns: 62px 1fr; gap: 9px 8px; padding: 14px 0; }
.metadata-label { color: #8a97a8; font-size: 10px; }
.metadata-value { overflow: hidden; color: #52627a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.preview-label { padding: 19px 0 9px; color: #8a97a8; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.preview-content { max-height: 150px; overflow: auto; margin: 0; padding: 12px; border: 1px solid #e3eaf4; border-radius: 6px; color: #5b6980; background: #f8fafd; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.image-preview-frame { height: calc(100% - 24px); min-height: 130px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e3eaf4; border-radius: 7px; background: #f8fafd; }
.image-preview { width: 100%; height: 100%; max-height: 240px; object-fit: contain; }
.unavailable-preview-frame { min-height: 150px; }
.unavailable-preview { width: auto; height: auto; max-width: min(83%, 347px); max-height: 147px; object-fit: contain; }
.preview-loading, .preview-error { padding-top: 30px; font-size: 12px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef3f9; }
.login-card { width: min(100%, 520px); padding: 24px 30px 28px; border: 1px solid #dce4ee; border-radius: 12px; background: #fff; box-shadow: 0 20px 48px rgba(25, 48, 84, .13); }
.login-logo { display: block; width: 100%; height: auto; max-height: 350px; margin: 0 auto 18px; object-fit: contain; border-radius: 7px; }
.login-brand { display: flex; align-items: center; gap: 9px; color: #18263b; font-size: 18px; font-weight: 800; }
.login-badge { display: inline-block; margin: 10px 0 24px; color: #607795; border-color: #b9c7d8; }
.login-card h1 { margin-bottom: 7px; }
.login-card > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-card form { display: grid; gap: 8px; }
.login-card label { margin-top: 6px; color: #52627a; font-size: 11px; font-weight: 750; }
.login-card input { width: 100%; padding: 10px 11px; border: 1px solid #ccd7e5; border-radius: 6px; color: var(--text); background: #fbfcfe; }
.login-card input:focus { outline: 2px solid #a9c3f5; border-color: #7ea5ec; }
.login-card .primary-button { margin-top: 12px; padding: 11px 14px; }
.login-error { min-height: 18px; color: #b24d5a; font-size: 11px; line-height: 1.45; }
.login-card > small { display: block; margin-top: 18px; color: #8794a5; font-size: 9px; line-height: 1.5; }

@media (max-width: 1050px) {
  .overview-pane { grid-template-columns: minmax(150px, .5fr) minmax(260px, 1.3fr) minmax(260px, 1.2fr); }
  .preview-heading strong, .preview-heading small { max-width: 360px; }
}

@media (max-width: 700px) {
  .topbar { height: 57px; padding: 0 16px; }
  .topbar-status { display: none; }
  .prototype-badge { display: none; }
  .app-shell { height: auto; display: block; }
  .overview-pane { display: block; }
  .sidebar { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 9px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading { display: none; }
  .folder-shortcuts { display: flex; gap: 4px; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 8px 10px; white-space: nowrap; }
  .workspace { padding: 16px 12px; }
  .toolbar { flex-wrap: wrap; }
  .breadcrumbs { order: 3; width: 100%; }
  .search-form { order: 4; flex-basis: 100%; width: 100%; }
  .navigation-buttons { width: 100%; }
  .navigation-button { flex: 1; }
  .content-header { margin-top: 22px; }
  .content-header { align-items: flex-start; gap: 12px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .download-progress { grid-template-columns: 1fr; gap: 6px; }
  .content-header h1 { font-size: 20px; }
  .file-row { grid-template-columns: minmax(150px, 2fr) .9fr .7fr; gap: 8px; }
  .column-resizer { display: none; }
  .file-row > :last-child { display: none; }
  .list-header, .file-item { padding-left: 9px; padding-right: 9px; }
  .file-item { min-height: 42px; }
  .login-body { padding: 12px; }
  .login-card { padding: 16px 18px 22px; }
  .login-logo { max-height: 290px; margin-bottom: 14px; }
  .statusbar { flex-direction: column; gap: 4px; }
  .description-panel, .preview-panel { min-height: 220px; border-bottom: 1px solid var(--line); }
}
