:root{color-scheme:light;--ink:#16223b;--muted:#64718a;--edge:#e1e7f0;--surface:#fff;--canvas:#f5f7fb;--navy:#151e33;--accent:#2563eb;--danger:#b42330;--shadow:0 10px 35px rgba(24,38,67,.045);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{background:var(--canvas);color:var(--ink);margin:0;min-height:100vh;line-height:1.5}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(2rem,3.5vw,2.7rem);line-height:1.15;letter-spacing:-.045em;margin-bottom:.55rem}h2{font-size:1.25rem;letter-spacing:-.02em;margin-bottom:.75rem}h3{font-size:1rem}.muted{color:var(--muted)}.small{font-size:.875rem}.hint{color:var(--muted);font-size:.78rem;margin:-.25rem 0 .25rem}.centered{text-align:center}.eyebrow{font-size:.73rem;letter-spacing:.16em;font-weight:800;color:#4969a4;margin-bottom:.8rem}.site-header{background:var(--navy);color:#fff}.header-inner{max-width:1160px;margin:auto;min-height:78px;padding:0 30px;display:flex;align-items:center;justify-content:space-between;gap:1rem}.brand{color:#fff;display:flex;align-items:center;gap:.65rem;font-size:1.25rem;letter-spacing:-.035em;font-weight:800}.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;width:34px;height:34px;background:#5578ed;border-radius:9px;color:#fff}.header-nav{display:flex;gap:1.35rem;align-items:center;color:#c5ccdc;font-size:.87rem}.header-nav a,.nav-button{color:#e5ebf8}.header-note{color:#a9b4cd}.header-nav form{margin:0}.nav-button{border:0;background:transparent;font:inherit;cursor:pointer;padding:0}.nav-button:hover{text-decoration:underline}.page{max-width:1160px;margin:0 auto;min-height:calc(100vh - 158px);padding:42px 30px 72px}.site-footer{text-align:center;font-size:.78rem;color:#8994a8;padding:26px 18px}.page-heading{display:flex;gap:24px;align-items:flex-start;justify-content:space-between;margin-bottom:26px}.page-heading p{margin:0}.stat,.pill{white-space:nowrap;border:1px solid #dce5f1;color:#496180;background:#eff4fc;border-radius:999px;padding:.45rem .8rem;font-size:.79rem;font-weight:700}.stat{margin-top:12px}.dashboard-grid{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,1.5fr);gap:22px;align-items:start}.detail-grid{grid-template-columns:minmax(0,1.5fr) minmax(290px,.85fr)}.card{background:var(--surface);border:1px solid var(--edge);border-radius:18px;box-shadow:var(--shadow);padding:28px}.card>p{margin-bottom:24px}.stack{display:flex;flex-direction:column;gap:12px}.stack label,.card>label{font-size:.86rem;font-weight:700}.stack label:not(:first-of-type){margin-top:6px}input{font:inherit;min-width:0}input[type="text"],input[type="password"],input[type="date"],input[type="file"],input:not([type]){width:100%;padding:12px 14px;border:1px solid #cfd8e5;background:#fff;color:var(--ink);border-radius:9px;outline-offset:2px}input:focus{outline:2px solid #9cb8fc;border-color:#6795fa}input[type="file"]{font-size:.84rem;padding:12px}input[readonly]{background:#f8fafc;color:#4d5d76}.button{display:inline-flex;align-items:center;justify-content:center;white-space:normal;min-height:43px;padding:10px 17px;border-radius:9px;font-weight:700;font-size:.88rem;cursor:pointer;text-align:center;border:1px solid transparent;font-family:inherit;text-decoration:none}.button:hover{text-decoration:none;filter:brightness(.96)}.primary{background:var(--accent);color:#fff}.secondary{background:#f3f6fb;color:#263c5e;border-color:#d9e2ef}.destructive{background:#fff1f0;border-color:#f2c6c7;color:#b42330}.danger{color:var(--danger)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h2{margin:0}.show-list,.file-list{margin:0 -8px}.show-row,.file-row{display:flex;align-items:center;gap:14px;border-top:1px solid #edf0f5;padding:16px 8px}.show-row:first-child,.file-row:first-child{border-top:none}.show-row{color:var(--ink)}.show-row:hover{text-decoration:none;background:#f9fbff;border-radius:10px}.show-icon,.file-icon{display:grid;place-items:center;background:#eaf0ff;color:#4668cd;width:45px;height:45px;border-radius:12px;font-size:1.15rem;flex-shrink:0;font-weight:700}.file-icon{background:#f1f4f9;color:#617493}.show-main,.file-main{display:flex;flex-direction:column;min-width:0;gap:2px;overflow-wrap:anywhere;flex:1}.show-main strong,.file-main strong{font-size:.93rem}.row-chevron{color:#8292af;font-size:1.7rem}.empty-state{text-align:center;padding:42px 16px}.empty-state.compact{padding:25px 10px}.empty-state h3{margin-bottom:5px}.empty-state p{margin:0}.empty-icon{font-size:2.15rem;color:#89a4d8;margin-bottom:10px}.auth-shell{display:grid;place-items:center;padding:55px 0}.auth-card{width:min(100%,430px);padding:38px}.auth-card .stack{margin-top:24px}.auth-card .button{margin-top:10px}.auth-card h1{font-size:2.25rem}.notice{padding:12px 16px;border-radius:10px;margin-bottom:20px;border:1px solid #d7e7fe;background:#ecf4ff;color:#224b7f}.notice.error{border-color:#f4cccc;background:#fff0ef;color:#9c2429}.notice.success{border-color:#bfe6d3;background:#ecfff5;color:#21734c}.back-link{display:inline-block;margin-bottom:20px;font-size:.9rem;font-weight:650}.share-card{margin-bottom:22px}.share-card p{margin-bottom:14px}.link-row{display:flex;gap:10px;margin-top:6px}.link-row input{flex:1}.link-row .button{flex-shrink:0}.divider{height:1px;background:var(--edge);margin:26px 0}.file-actions{display:flex;align-items:center;flex-wrap:wrap;gap:13px;font-size:.83rem;font-weight:650}.file-actions form{margin:0}.text-button{border:0;background:transparent;padding:0;font:inherit;cursor:pointer}.text-button:hover{text-decoration:underline}.small-button{min-height:33px;padding:6px 12px;font-size:.8rem}.upload-form{margin-top:18px}.reading-card{max-width:100%}.viewer-wrap{background:#e6ebf3;min-height:60vh;border:1px solid var(--edge);border-radius:15px;overflow:hidden;display:flex;justify-content:center;align-items:center}.document-frame{width:100%;height:75vh;min-height:520px;border:0;background:white}.document-image{display:block;max-width:100%;max-height:80vh;object-fit:contain}.document-title{overflow-wrap:anywhere}
@media(max-width:800px){.dashboard-grid,.detail-grid{grid-template-columns:1fr}.page{padding:26px 18px 45px}.header-inner{padding:0 18px;min-height:66px}.page-heading{align-items:flex-start}.card{padding:22px}.stat{font-size:.72rem}.auth-shell{padding:30px 0}.auth-card{padding:28px}.file-row{align-items:flex-start;flex-wrap:wrap}.file-actions{width:100%;padding-left:58px}.document-frame{height:65vh;min-height:380px}}
@media(max-width:420px){.page-heading{flex-direction:column;gap:12px}.stat{margin:0}.header-note{display:none}.header-nav{gap:.75rem}.file-actions{padding-left:0}.file-icon{width:39px;height:39px}.link-row{flex-direction:column}.auth-card h1{font-size:1.85rem}}

/* Progressive-enhancement upload drop area: native input remains when JS is unavailable. */
.js-upload{display:none}.upload-enhanced .js-upload{display:block}.upload-enhanced .native-upload{display:none}
.upload-dropzone{border:2px dashed #a6b8d7;background:#f8fbff;border-radius:14px;padding:29px 16px;display:flex;align-items:center;flex-direction:column;gap:9px;text-align:center;transition:background .15s,border-color .15s;cursor:pointer}
.upload-dropzone:hover,.upload-dropzone:focus-visible,.upload-dropzone.drag-over{background:#ebf3ff;border-color:var(--accent);outline-offset:3px}
.upload-dropzone strong{font-size:1rem}.dropzone-icon{font-size:2.2rem;color:#4d7ce1;line-height:1}
.upload-pickers{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-top:6px}
#folder-picker{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none}
.upload-queue-header{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:19px;font-size:.86rem}
.upload-queue{list-style:none;margin:8px 0;padding:0;max-height:265px;overflow-y:auto;border:1px solid var(--edge);border-radius:10px}
.upload-queue:empty{display:none}.upload-queue li{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--edge);padding:9px 12px;font-size:.81rem}
.upload-queue li:first-child{border-top:0}.upload-queue .queue-name{min-width:0;overflow-wrap:anywhere}.upload-queue .queue-size{color:var(--muted);white-space:nowrap}
.upload-queue .queue-remove{background:transparent;color:var(--danger);border:0;font:inherit;cursor:pointer;padding:4px}
.upload-progress{display:block;width:100%;height:11px;accent-color:var(--accent);margin-top:10px}.upload-progress[hidden]{display:none}
.upload-status{font-size:.85rem;margin:7px 0 0;min-height:1.2em;color:var(--muted)}.upload-status.error{color:var(--danger)}
