:root {
    color-scheme: light;
    --ink: #172b3a;
    --muted: #73818a;
    --line: #e1e8e8;
    --surface: #ffffff;
    --canvas: #f3f7f6;
    --teal: #087f78;
    --teal-dark: #066b65;
    --teal-pale: #e4f4f1;
    --coral: #c65b48;
    --shadow: 0 18px 45px rgba(27, 57, 64, .12);
    font-family: "Aptos", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); }
button, input, textarea { font: inherit; }
button { color: inherit; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 32px; padding: 0 clamp(18px, 4vw, 58px); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 16px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; color: #fff; background: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.top-location { min-width: 0; display: grid; gap: 3px; border-left: 1px solid var(--line); padding-left: 25px; }
.top-location span, .eyebrow { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.top-location strong { overflow: hidden; max-width: min(52vw, 600px); color: #36515d; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { margin-left: auto; }
.workspace { width: min(1250px, calc(100% - 56px)); margin: 0 auto; padding: 43px 0 60px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.eyebrow { margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
.workspace-heading h1 { margin: 0; font-size: 25px; font-weight: 720; }
.heading-meta { display: flex; gap: 8px; align-items: center; padding-bottom: 4px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #38a27b; box-shadow: 0 0 0 3px #e0f3e9; }
.breadcrumbs { display: flex; align-items: center; min-height: 45px; gap: 9px; overflow-x: auto; padding: 0 15px; border: 1px solid var(--line); border-radius: 6px 6px 0 0; background: #fbfdfc; white-space: nowrap; }
.breadcrumb-link { padding: 6px 0; border: 0; background: transparent; color: #54717a; cursor: pointer; font-size: 12px; }
.breadcrumb-link:hover { color: var(--teal); }
.breadcrumb-divider { color: #a6b2b4; font-size: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 15px; border: 1px solid var(--line); border-top: 0; background: #fff; }
.toolbar-primary { display: flex; flex-wrap: wrap; gap: 8px; }
.button { min-height: 36px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 650; text-decoration: none; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { border-color: var(--teal); color: #fff; background: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { border-color: #d8e1e1; color: #38545f; background: #fff; }
.button-secondary:hover, .button-quiet:hover { border-color: #b9d3d0; background: #f2f8f7; }
.button-quiet { border-color: transparent; color: #526973; background: transparent; }
.button-wide { width: 100%; min-height: 43px; margin-top: 10px; }
.search-box { height: 36px; width: min(280px, 36vw); display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dce5e5; border-radius: 5px; color: #72868b; background: #fff; }
.search-box > span { font-size: 20px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box kbd { color: #91a0a3; font-size: 11px; white-space: nowrap; }
.file-table-wrap { position: relative; min-height: 160px; border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th { height: 39px; padding: 0 14px; border-bottom: 1px solid var(--line); color: #809095; background: #f9fbfb; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.file-table td { height: 55px; padding: 7px 14px; border-bottom: 1px solid #edf1f1; font-size: 12px; }
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-table tbody tr:hover { background: #fbfdfd; }
.file-table th:first-child { width: 42%; }
.file-table th:nth-child(2) { width: 16%; }
.file-table th:nth-child(3) { width: 12%; }
.file-table th:nth-child(4) { width: 20%; }
.file-table th:last-child { width: 10%; }
.name-cell { overflow: hidden; }
.file-icon { width: 25px; height: 25px; display: inline-grid; place-items: center; margin-right: 10px; border-radius: 5px; vertical-align: middle; font-size: 13px; }
.folder-icon { color: #98722a; background: #fff3d2; }
.document-icon { color: #497381; background: #e9f2f4; }
.image-icon { color: #16806f; background: #e1f4ed; }
.file-name { max-width: calc(100% - 40px); overflow: hidden; padding: 4px 0; border: 0; color: #243e4a; background: transparent; cursor: pointer; font-weight: 650; text-align: left; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.file-name:hover { color: var(--teal); }
.muted-cell { color: #71838a; }
.actions-cell { overflow: visible; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; opacity: .72; }
tbody tr:hover .row-actions, tbody tr:focus-within .row-actions { opacity: 1; }
.action-button { display: inline-flex; justify-content: center; padding: 5px 6px; border: 0; border-radius: 4px; color: #587078; background: transparent; cursor: pointer; font-size: 10px; text-decoration: none; white-space: nowrap; }
.action-button:hover { color: var(--teal-dark); background: var(--teal-pale); }
.action-button.action-danger:hover { color: #a33f36; background: #fff0ee; }
.table-message { height: 100px !important; color: #839297; text-align: center; }
.empty-state { min-height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; color: #829196; font-size: 12px; }
.empty-state strong { color: #405963; font-size: 14px; }
.empty-mark { color: #b6c4c5; font-size: 25px; }
.workspace-footnote { margin: 11px 2px 0; color: #879699; font-size: 11px; }
.modal { width: min(760px, calc(100% - 28px)); max-width: none; padding: 0; border: 1px solid #dfe7e6; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(16, 37, 43, .48); backdrop-filter: blur(2px); }
.modal-head { min-height: 73px; display: flex; justify-content: space-between; align-items: center; padding: 14px 19px; border-bottom: 1px solid var(--line); }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h2 { overflow: hidden; max-width: 65vw; margin: 0; color: #243c46; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 5px; color: #73878b; background: transparent; cursor: pointer; font-size: 22px; }
.icon-button:hover { background: #f0f5f4; }
.editor-modal textarea { width: 100%; min-height: min(62vh, 600px); display: block; resize: vertical; padding: 17px 20px; border: 0; outline: 0; color: #e0ecea; background: #182b32; font: 12px/1.65 Consolas, "Cascadia Code", monospace; tab-size: 4; }
.editor-modal textarea:read-only { color: #d5e3e1; }
.modal-footer { min-height: 60px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 17px; }
.modal-status { margin-right: auto; color: #819194; font-size: 11px; }
.preview-modal { width: min(900px, calc(100% - 28px)); }
.preview-meta { margin: 5px 0 0; color: #819194; font-size: 11px; }
.preview-stage { min-height: 220px; max-height: 70vh; display: grid; place-items: center; overflow: auto; padding: 20px; background: #eef3f1; }
.preview-stage img { max-width: 100%; max-height: 65vh; object-fit: contain; }
.name-modal { width: min(430px, calc(100% - 28px)); padding: 20px; }
.name-modal h2 { margin: 0 0 18px; font-size: 17px; }
.name-modal label, .login-form label { display: block; margin: 12px 0 6px; color: #435d66; font-size: 12px; font-weight: 650; }
.name-modal input, .login-form input { width: 100%; height: 41px; padding: 0 11px; border: 1px solid #d6e0e0; border-radius: 5px; outline: 0; color: var(--ink); background: #fff; }
.name-modal input:focus, .login-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 120, .12); }
.name-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 5; max-width: min(420px, calc(100vw - 44px)); padding: 12px 15px; transform: translateY(12px); border: 1px solid #cee5dd; border-radius: 6px; color: #175b4b; background: #f1fbf7; box-shadow: 0 8px 26px rgba(25, 58, 60, .14); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast-visible { transform: translateY(0); opacity: 1; }
.toast-error { border-color: #f0d4cf; color: #8f3b30; background: #fff6f4; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 12% 8%, rgba(174, 221, 211, .5), transparent 35%), radial-gradient(ellipse at 95% 95%, rgba(250, 214, 191, .45), transparent 35%), #f3f7f6; }
.login-panel { width: min(410px, 100%); padding: 37px 38px 28px; border: 1px solid rgba(216, 228, 226, .9); border-radius: 8px; background: rgba(255, 255, 255, .94); box-shadow: 0 22px 70px rgba(34, 74, 75, .12); animation: rise-in .4s ease both; }
.brand-mark-large { width: 45px; height: 45px; margin-bottom: 26px; font-size: 13px; }
.login-panel h1 { margin: 0; font-size: 25px; font-weight: 740; }
.login-copy { margin: 9px 0 23px; color: var(--muted); font-size: 13px; }
.login-form label { margin-top: 15px; }
.login-footnote { margin: 20px 0 0; color: #8b999b; font-size: 11px; text-align: center; }
.alert { margin: 0 0 15px; padding: 10px 11px; border: 1px solid #f0d4cf; border-radius: 4px; color: #8f3b30; background: #fff6f4; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@keyframes rise-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
    .topbar { min-height: 62px; gap: 14px; padding: 0 16px; }
    .brand { font-size: 14px; }
    .top-location { padding-left: 13px; }
    .top-location span { font-size: 9px; }
    .top-location strong { max-width: 32vw; font-size: 11px; }
    .logout-form .button { padding: 0 7px; font-size: 11px; }
    .workspace { width: calc(100% - 28px); padding-top: 29px; }
    .workspace-heading h1 { font-size: 22px; }
    .heading-meta { font-size: 10px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-primary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .toolbar-primary .button { padding: 0 7px; font-size: 11px; }
    .search-box { width: 100%; }
    .file-table th, .file-table td { padding-right: 8px; padding-left: 8px; }
    .file-table th:first-child { width: 46%; }
    .file-table th:nth-child(2) { width: 18%; }
    .file-table th:nth-child(3) { width: 14%; }
    .file-table th:nth-child(4) { display: none; }
    .file-table th:last-child { width: 22%; }
    .file-table td:nth-child(4) { display: none; }
    .file-table td { height: 58px; font-size: 11px; }
    .file-icon { width: 21px; height: 21px; margin-right: 5px; font-size: 11px; }
    .row-actions { gap: 0; opacity: 1; }
    .action-button { padding: 5px 3px; font-size: 9px; }
}
@media (max-width: 420px) {
    .heading-meta { display: none; }
    .file-table th:nth-child(2), .file-table td:nth-child(2) { display: none; }
    .file-table th:first-child { width: 49%; }
    .file-table th:nth-child(3) { width: 18%; }
    .file-table th:last-child { width: 33%; }
    .action-button { font-size: 8px; }
    .login-panel { padding: 29px 24px 23px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.terminal-app { color: #dce8df; background: #dce5df; }
.terminal-app .topbar { border-bottom-color: #293833; background: #17221e; }
.terminal-app .brand { color: #edf5ed; }
.terminal-app .top-location { border-left-color: #34443d; }
.terminal-app .top-location span { color: #91a69a; }
.terminal-app .top-location strong { color: #d1dfd5; }
.terminal-app .button-quiet { color: #c2d3c8; }
.terminal-app .button-quiet:hover { border-color: #43584c; background: #26352e; }
.terminal-page { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: clamp(34px, 7vh, 74px) 0 44px; }
.terminal-window { height: min(690px, calc(100vh - 205px)); min-height: 390px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #2d3d36; border-radius: 7px; color: #d8e5dc; background: #101714; box-shadow: 0 26px 70px rgba(30, 57, 43, .2); }
.terminal-titlebar { min-height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 17px; border-bottom: 1px solid #2b3933; background: #1b2521; }
.terminal-lights { display: flex; gap: 7px; }
.terminal-lights i { width: 9px; height: 9px; border-radius: 50%; background: #c76b58; }
.terminal-lights i:nth-child(2) { background: #c99b51; }
.terminal-lights i:nth-child(3) { background: #68a17a; }
.terminal-window-title { display: flex; gap: 9px; align-items: center; color: #c3d1c7; font-size: 12px; font-weight: 650; }
.terminal-symbol { color: #91c48e; font-family: Consolas, monospace; font-size: 15px; }
.terminal-title-path { max-width: 30vw; overflow: hidden; color: #84968b; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.terminal-lock { justify-self: end; display: flex; gap: 7px; align-items: center; color: #8eaa97; font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.terminal-lock-dot, .terminal-statusbar > span:first-child i { width: 6px; height: 6px; border-radius: 50%; background: #7cb687; box-shadow: 0 0 0 3px rgba(124, 182, 135, .12); }
.terminal-output { flex: 1; min-height: 0; overflow: auto; padding: 24px 27px 16px; font: 13px/1.7 Consolas, "Cascadia Code", monospace; scrollbar-color: #40534a #141d19; scrollbar-width: thin; }
.terminal-entry { margin-bottom: 13px; }
.terminal-echo { display: flex; gap: 11px; overflow-wrap: anywhere; color: #dfe9e1; }
.terminal-echo span:first-child { flex: 0 0 auto; color: #90c58f; }
.terminal-result { overflow-wrap: anywhere; margin: 2px 0 0; color: #b1c0b5; font: inherit; white-space: pre-wrap; }
.terminal-entry-error .terminal-result { color: #e39a85; }
.terminal-command-line { display: flex; gap: 12px; align-items: baseline; min-height: 55px; padding: 15px 27px 17px; border-top: 1px solid #202d27; background: #141d19; }
.terminal-prompt { flex: 0 0 auto; font: 12px/1.5 Consolas, "Cascadia Code", monospace; white-space: nowrap; }
.prompt-user, .prompt-host { color: #9ccd92; }
.prompt-at, .prompt-colon { color: #84958a; }
.prompt-path { max-width: min(40vw, 360px); display: inline-block; overflow: hidden; color: #d1b571; text-overflow: ellipsis; vertical-align: bottom; }
.prompt-dollar { padding-left: 7px; color: #e9eee9; font-weight: 700; }
.terminal-input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; color: #eff6ef; background: transparent; font: 12px/1.5 Consolas, "Cascadia Code", monospace; caret-color: #9ccd92; }
.terminal-statusbar { min-height: 32px; display: flex; gap: 22px; align-items: center; padding: 0 16px; border-top: 1px solid #2b3933; color: #82958a; background: #1b2521; font-size: 10px; }
.terminal-statusbar > span:first-child { display: flex; gap: 8px; align-items: center; color: #9bae9f; }
.terminal-statusbar > span:first-child i { display: inline-block; }
.terminal-upload-trigger { margin-left: auto; color: #b6c9bb; cursor: pointer; }
.terminal-upload-trigger:hover { color: #a4d09c; }
.terminal-caption { display: flex; justify-content: space-between; gap: 12px; margin: 12px 3px 0; color: #708078; font-size: 10px; }
.terminal-caption > span:first-child { font-weight: 750; letter-spacing: .1em; }
.terminal-caption strong { color: #52655a; font-weight: 650; }
@media (max-width: 620px) {
    .terminal-app .topbar { gap: 10px; padding: 0 12px; }
    .terminal-app .brand { gap: 7px; font-size: 12px; }
    .terminal-app .brand-mark { width: 30px; height: 30px; }
    .terminal-app .top-location { padding-left: 10px; }
    .terminal-app .top-location strong { max-width: 25vw; }
    .terminal-app .logout-form .button { padding: 0 7px; font-size: 10px; }
    .terminal-page { width: calc(100% - 22px); padding: 28px 0 28px; }
    .terminal-window { height: calc(100dvh - 165px); min-height: 360px; }
    .terminal-titlebar { min-height: 43px; grid-template-columns: auto 1fr auto; gap: 12px; padding: 0 11px; }
    .terminal-window-title { gap: 6px; font-size: 11px; }
    .terminal-lock { font-size: 8px; }
    .terminal-output { padding: 18px 13px 12px; font-size: 12px; }
    .terminal-command-line { gap: 8px; min-height: 54px; padding: 14px 12px; }
    .terminal-prompt, .terminal-input { font-size: 11px; }
    .prompt-path { max-width: 29vw; }
    .terminal-statusbar { gap: 10px; padding: 0 10px; font-size: 9px; }
    .terminal-caption { font-size: 9px; }
}
@media (max-width: 390px) {
    .terminal-lock { letter-spacing: 0; }
    .terminal-lights { gap: 5px; }
    .terminal-lights i { width: 7px; height: 7px; }
    .terminal-window-title { font-size: 10px; }
    .terminal-caption { flex-direction: column; gap: 5px; }
}