:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; background: #f3f6f4; color: #20352a; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, .upload-button { cursor: pointer; border: 1px solid #b9c9be; border-radius: 7px; padding: .42rem .65rem; background: #fff; color: #20352a; }
button:hover, .upload-button:hover { background: #edf5ef; }
button:disabled { background: #eee; color: #777; cursor: not-allowed; }
.primary { background: #cde9d3; border-color: #a3c9ab; color: #183721; font-weight: 600; }
.primary:hover { background: #bce0c4; }
.shell { max-width: 1600px; margin: 0 auto; padding: 14px 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: #61816a; }
h1 { margin: .1rem 0 0; font-size: clamp(1.25rem, 2vw, 1.6rem); }
h2 { margin-top: 0; font-size: 1.1rem; }
.identity { display: flex; align-items: center; gap: 9px; }
.message { min-height: 1.2em; margin: 0 0 8px; color: #385c42; }
.message.error { color: #a63131; }
.card { background: #fff; border: 1px solid #dde7df; border-radius: 10px; padding: 12px; box-shadow: 0 5px 24px #183b2710; }
.login-card { max-width: 400px; margin: 30px auto; }
.login-card p { color: #5f6d62; }
.login-card form { display: grid; gap: 6px; }
.login-card input, .login-card select, dialog select { width: 100%; border: 1px solid #b8c8ba; border-radius: 7px; padding: .5rem; background: white; }
.login-card button { margin-top: 6px; }
.storage-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; align-items: start; }
.storage-layout[hidden] { display: none; }
.tree-panel { padding: 10px 7px; }
.tree-panel h2 { margin: 0 7px 7px; }
.storage-content { min-width: 0; }
.folder-tree { display: grid; gap: 2px; max-height: calc(100vh - 150px); overflow: auto; }
.tree-item { width: 100%; min-width: 0; text-align: left; padding: .3rem .35rem .3rem calc(.4rem + var(--depth, 0) * .8rem); border: 0; background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-item.selected { background: #cde9d3; color: #183721; font-weight: 600; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-bottom: 9px; }
.breadcrumbs button { border: 0; padding: .2rem .3rem; background: transparent; color: #286542; }
.breadcrumbs span { color: #829487; }
.toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.list-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin-bottom: 10px; }
.list-controls label { color: #63766a; font-size: .85rem; }
.list-controls input, .list-controls select { border: 1px solid #b8c8ba; border-radius: 7px; padding: .42rem .55rem; background: #fff; }
.list-controls input { width: min(310px, 100%); }
.upload-button { display: inline-flex; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .8rem; color: #63766a; font-weight: 600; }
td, th { border-bottom: 1px solid #e4ebe5; padding: 7px 6px; }
td:first-child { min-width: 190px; }
td:last-child { min-width: 240px; }
.item-name { display: inline-flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; font-weight: 600; color: #245a37; padding: 2px; }
.item-name:hover { text-decoration: underline; background: transparent; }
.file-name { color: #273c2f; font-weight: 500; }
.file-owner { margin: 2px 0 0 2px; color: #63766a; font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 4px; }
.actions button { font-size: .85rem; padding: .3rem .45rem; }
.empty { color: #63766a; padding: 12px 6px; }
dialog { border: 1px solid #cad8cc; border-radius: 10px; padding: 16px; width: min(420px, calc(100vw - 24px)); box-shadow: 0 20px 60px #15291944; }
dialog::backdrop { background: #172b1d88; }
dialog label { display: block; margin-bottom: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.preview-dialog { width: min(1100px, calc(100vw - 24px)); max-height: 94dvh; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-head h2 { margin: 0; overflow-wrap: anywhere; }
.preview-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.download-link { display: inline-flex; align-items: center; border: 1px solid #a3c9ab; border-radius: 7px; padding: .42rem .65rem; background: #cde9d3; color: #183721; font-weight: 600; text-decoration: none; }
.preview-body { display: flex; align-items: center; justify-content: center; height: 65dvh; min-height: 220px; margin-top: 12px; overflow: auto; border-radius: 7px; background: #f0f3ec; }
.preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-body iframe, .preview-body canvas { width: 100%; height: 100%; border: 0; }
.preview-body canvas { touch-action: none; cursor: grab; }
.preview-body pre { width: 100%; height: 100%; margin: 0; padding: 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 Consolas, monospace; }
.preview-message { padding: 24px; text-align: center; }
.preview-message h3 { margin: 0 0 8px; }
.preview-message p { margin: 0; color: #63766a; }
@media (max-width: 700px) { :root { font-size: 14px; } .shell { padding: 10px; } .topbar { align-items: flex-start; } .identity { flex-direction: column; align-items: flex-end; } td:last-child { min-width: 220px; } }
@media (max-width: 700px) { .storage-layout { grid-template-columns: minmax(0, 1fr); } .folder-tree { max-height: 230px; } }
@media (max-width: 700px) { .preview-head { align-items: flex-start; flex-wrap: wrap; } .preview-body { height: 60dvh; min-height: 180px; } }
