:root {
    color-scheme: light;
    --background: #eef4fa;
    --ink: #112743;
    --muted: #4f6480;
    --line: #d9e4ee;
    --navy: #091d3a;
    --blue: #075cca;
    --cyan: #62daf9;
    --card: #ffffff;
    font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--background); }
a { color: #0752a9; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #0088be; outline-offset: 3px; }
svg { width: 1.25rem; height: 1.25rem; flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.topbar { min-height: 76px; padding: 8px max(24px, calc((100vw - 1120px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: white; background: var(--navy); border-bottom: 3px solid #10a5e7; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: white; font-weight: 740; }
.brand img { width: 82px; height: 54px; object-fit: contain; }
.brand span { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--cyan); border: 1px solid #38749a; border-radius: 12px; }
.topbar .quiet { color: white; background: #152f4b; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.35rem); line-height: 1.13; font-weight: 750; letter-spacing: -.035em; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.workspace { max-width: 1168px; margin: auto; padding: 28px 24px 64px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.page-heading p { margin-top: 7px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-weight: 670; white-space: nowrap; text-decoration: none; }
.button:hover { background: #eaf3fc; text-decoration: none; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: #064aab; }
.button.quiet { background: transparent; border-color: transparent; }
.button.danger { width: 100%; color: #a0202b; border-color: #efc8ce; }
.button:disabled { opacity: .75; cursor: wait; }
.search { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; margin: 0 0 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.search input { min-width: 0; flex: 1; padding: 10px 4px; border: 0; background: transparent; }
.search a { font-size: .83rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 7px 24px #102a4a0b; }
.files { overflow: hidden; }
.files table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.files th, .files td { padding: 11px 14px; border-bottom: 1px solid #e6eef5; text-align: left; }
.files th { background: #f9fbfe; color: var(--muted); font-size: .85rem; }
.files td { color: var(--muted); font-size: .9rem; }
.files tr:last-child td { border-bottom: 0; }
.files tbody tr:hover { background: #f8fbff; }
.files .date { width: 145px; }
.files .size { width: 106px; }
.files th:last-child, .files .row-action { width: 62px; padding: 7px; text-align: center; }
.item-link { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.item-link span:last-child { min-width: 0; }
.item-link strong { display: block; overflow-wrap: anywhere; }
.item-link small { display: block; color: var(--muted); }
.tile { display: inline-grid; flex: none; width: 37px; height: 37px; place-items: center; border-radius: 10px; color: #055c9b; background: #e3f2fe; }
.tile.folder { color: #775000; background: #fff1d0; }
.tile.pdf { color: #ac3034; background: #fce9e8; }
.tile.video { color: #6143a9; background: #f0eaff; }
.tile.image { color: #14634e; background: #e1f7ee; }
.icon-button { padding: 8px; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty svg { width: 36px; height: 36px; color: var(--blue); margin-bottom: 7px; }
.auth { display: grid; place-items: start center; padding: 42px 16px; }
.auth-card { width: min(100%, 480px); padding: clamp(20px, 5vw, 36px); }
.auth-logo { display: block; width: min(100%, 205px); max-height: 138px; object-fit: contain; margin: 0 auto 22px; }
.auth-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 16px; border-radius: 12px; color: var(--blue); background: #e3f2fe; }
.auth h1 { font-size: 1.75rem; margin-bottom: 10px; }
.auth .stack { margin-top: 20px; }
.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 5px; font-size: .93rem; font-weight: 620; }
.stack input, .stack select { width: 100%; min-width: 0; padding: 9px; border: 1px solid #b9c9db; border-radius: 8px; background: #fbfdff; color: var(--ink); }
.notice { padding: 11px 14px; margin: 12px 0; border-radius: 9px; color: #14583e; background: #def4e8; }
.notice.error { color: #8b1929; background: #fbe6e9; }
dialog { width: min(460px, calc(100% - 24px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 15px; padding: 20px; color: var(--ink); background: white; box-shadow: 0 14px 60px #07192d44; }
dialog::backdrop { background: #06132985; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.dialog-heading .button { color: var(--muted); font-size: 1.25rem; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.preview { overflow: hidden; }
.preview iframe { display: block; border: 0; width: 100%; height: 72vh; min-height: 450px; background: #f5f8fb; }
.preview video { display: block; width: 100%; max-height: 75vh; background: #091321; }
.photo { display: block; width: auto; max-width: 100%; max-height: 75vh; margin: auto; object-fit: contain; }
.preview-note { color: var(--muted); background: #f5f8fb; padding: 11px 18px; }
.document { width: min(100%, 800px); margin: auto; padding: clamp(12px, 5vw, 45px); overflow-x: auto; overflow-wrap: anywhere; color: #171b25; }
.document p { margin: 0 0 .55em; white-space: pre-wrap; }
.document table { border-collapse: collapse; margin: 1rem 0; max-width: 100%; }
.document td { border: 1px solid #b0bdc9; padding: 5px 8px; }
.document img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 630px) {
    .workspace { padding: 20px 12px 36px; }
    .topbar { padding: 6px 12px; min-height: 65px; }
    .brand img { width: 63px; height: 43px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .files .date { display: none; }
    .files .size { width: 75px; padding: 7px; }
    .files .row-action, .files th:last-child { width: 45px; padding: 2px; }
    .files th, .files td { padding: 8px; }
    .item-link { gap: 7px; }
    .tile { width: 30px; height: 30px; }
    .preview iframe { min-height: 360px; }
}

