:root{--navy:#102c50;--blue:#1767b4;--ink:#172e4a;--muted:#526781;--line:#cedceb;--gold:#ffcc4d}
*{box-sizing:border-box}body{margin:0;background:#e9eff6;color:var(--ink);font-family:"DM Sans",sans-serif}button,input,textarea{font:inherit}a{color:inherit;text-decoration:none}.hidden{display:none!important}
.document-shell{width:min(1180px,calc(100% - 48px));margin-inline:auto}.document-header{position:sticky;top:0;background:#ffffffed;backdrop-filter:blur(16px);border-bottom:1px solid var(--line);z-index:20}.header-inner{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:22px}.header-actions{display:flex;align-items:center;gap:22px;font-size:13px;font-weight:700}.document-main{padding:28px 0 70px}.back-link{display:inline-block;font-size:13px;color:var(--muted);margin-bottom:22px}.back-link:hover{color:var(--blue)}
.button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:12px 18px;border-radius:11px;border:1px solid transparent;cursor:pointer;font-size:13px;font-weight:700;transition:background .2s,box-shadow .2s}.button:disabled{opacity:.55;cursor:wait}.primary{background:var(--blue);color:#fff}.primary:hover:not(:disabled){background:#105694;box-shadow:0 5px 15px #1767b425}.secondary{background:#fff;border-color:var(--line);color:var(--navy)}.secondary:hover:not(:disabled){background:#edf4fb}.gold{background:var(--gold);color:var(--navy)}.gold span{font-size:21px}.danger{background:#b72b3c;color:white}.full{width:100%}
.document-hero{position:relative;display:grid;grid-template-columns:1fr 270px;gap:36px;overflow:hidden;padding:45px 48px;border-radius:25px;background:linear-gradient(115deg,#0c2444,#184c7c);color:#fff;box-shadow:0 20px 40px #16355518}.document-hero:after{content:"";position:absolute;width:470px;height:470px;border:1px solid #ffffff16;border-radius:50%;right:-100px;top:-130px;pointer-events:none}.eyebrow{margin:0 0 12px;font-size:10px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;color:var(--blue)}.document-hero .eyebrow{color:#a9d4ff}.document-hero h1{max-width:620px;font:800 clamp(32px,4vw,49px)/1.12 "Libre Franklin",sans-serif;letter-spacing:-.04em;margin:0}.document-hero p:not(.eyebrow){color:#cfdeef;font-size:15px;line-height:1.7;margin:18px 0 26px}.hero-file{display:grid;justify-items:center;align-content:center;gap:22px;z-index:1}.paper{width:137px;height:163px;padding:20px;background:#f6f9ff;border:1px solid #fff;color:#153f6b;border-radius:13px 32px 13px 13px;transform:rotate(7deg);box-shadow:12px 12px 0 #ffffff12,0 14px 24px #00142633;position:relative}.paper span{font-size:7px;letter-spacing:.1em}.paper b{display:block;margin:12px 0;font-size:26px;letter-spacing:.06em}.paper i{display:block;width:90%;height:4px;background:#c6d9ee;border-radius:5px;margin:8px 0}.paper i:last-of-type{width:60%}.paper em{position:absolute;right:-14px;bottom:14px;background:var(--gold);width:40px;height:40px;display:grid;place-items:center;border-radius:50%;font-style:normal;font-size:22px}.hero-file-caption{font-size:11px;color:#c8dced}.document-guidance{display:flex;gap:30px;padding:22px 10px;color:#526983;font-size:12px}.document-guidance span{display:flex;align-items:center;gap:9px}.document-guidance b{font-size:10px;color:#1c588f;background:#d8e5f3;padding:6px;border-radius:6px}
.document-workspace{background:#fff;padding:30px;border:1px solid var(--line);border-radius:20px;box-shadow:0 14px 35px #102c5008}.workspace-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.workspace-heading h2{margin:0;font:800 24px "Libre Franklin",sans-serif;letter-spacing:-.035em}.count-badge{display:inline-block;padding:4px 9px;margin-left:5px;vertical-align:middle;border-radius:7px;background:#e6eff9;color:#1b5e9b;font:700 12px "DM Sans",sans-serif}.search-box{display:block;margin:25px 0 16px}.search-box span{display:block;font-size:12px;margin-bottom:8px;color:var(--muted)}.search-box input{width:100%;border:1px solid var(--line);background:#f6f9fd;border-radius:11px;padding:13px 16px;font-size:14px;color:var(--ink)}.documents-list{display:grid;gap:12px}.document-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;padding:21px;border:1px solid var(--line);border-radius:14px;background:#f7faff}.file-type{display:grid;place-items:center;width:49px;height:58px;border-radius:10px;color:#1a5b92;background:#deebfa;font-size:10px;font-weight:800;letter-spacing:.03em}.file-type.pdf{background:#fbe5e7;color:#aa3141}.file-type.image{background:#e2f1e9;color:#216848}.document-card h3{margin:0 0 6px;font-size:15px;overflow-wrap:anywhere}.document-card p{margin:0 0 8px;color:var(--muted);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.document-card time{font-size:11px;color:#526b86}.file-actions{display:flex;gap:6px;flex-wrap:wrap}.file-actions .button{min-height:38px;padding:8px 11px;font-size:11px}.file-actions .delete-button{border-color:#e9c7cd;color:#9f293a;background:#fff}.empty-state{padding:36px 15px 40px;text-align:center;border:1px dashed #c1d3e7;border-radius:15px;background:linear-gradient(#f6f9fd,#fff)}.empty-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 18px;border-radius:18px;background:#e3eefb;color:#2368aa;font-size:34px}.empty-state h3{margin:0;font-size:21px}.empty-state p{color:var(--muted);line-height:1.7;font-size:14px;margin:12px 0 22px}.workspace-note{margin:22px 0 0;padding-top:18px;border-top:1px solid #e4eaf2;font-size:11px;color:#687d94}.load-more{display:flex;margin:20px auto 0}.status{color:#295d7e;font-size:13px;line-height:1.6}.status:empty{display:none}.status.error{color:#a02336}.loading-state{display:flex;justify-content:center;align-items:center;gap:12px;padding:32px;color:var(--muted);font-size:13px}.spinner{width:20px;height:20px;border:2px solid #cbdced;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}
.document-dialog{border:1px solid #d9e3ef;border-radius:24px;padding:0;width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 32px);color:var(--ink);box-shadow:0 35px 100px #00112455}.document-dialog[open]{animation:appear .2s ease-out}.document-dialog::backdrop{background:#06172bc7;backdrop-filter:blur(7px)}.document-dialog.compact{width:min(455px,calc(100% - 28px))}.dialog-body{position:relative;padding:34px}.dialog-close{position:absolute;right:18px;top:16px;width:36px;height:36px;border:1px solid var(--line);border-radius:50%;background:white;color:var(--muted);font-size:24px;cursor:pointer}.dialog-symbol{display:grid;place-items:center;width:46px;height:46px;background:#e1edfb;color:#175c9d;border-radius:14px;font-size:28px;margin-bottom:22px}.document-dialog h2{font:800 27px/1.2 "Libre Franklin",sans-serif;letter-spacing:-.035em;margin:0}.dialog-intro{color:var(--muted);font-size:14px;line-height:1.7;margin:12px 0 24px}.form-field{display:block;font-size:13px;font-weight:700;margin:22px 0}.form-field textarea{display:block;width:100%;margin-top:10px;border:1px solid #bcccdf;background:#f9fbfd;border-radius:11px;padding:13px;resize:vertical;min-height:100px;font-weight:400;font-size:15px;color:var(--ink)}.file-drop{position:relative;display:grid;text-align:center;justify-items:center;gap:8px;padding:23px 18px;border:1.5px dashed #99b7d8;border-radius:14px;background:#f1f6fc;cursor:pointer}.file-drop:hover,.file-drop.dragging{border-color:var(--blue);background:#e5f0fe}.file-drop strong{font-size:14px;overflow-wrap:anywhere;max-width:100%}.file-drop>span:last-of-type{font-size:11px;color:var(--muted)}.file-drop-icon{color:var(--blue);font-size:27px}.file-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-drop:focus-within{outline:3px solid #d69c22;outline-offset:3px}.upload-progress{padding:16px;border:1px solid #bdd7ed;border-radius:12px;background:#edf5fc}.progress-heading{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#174d7c}.upload-progress progress{display:block;width:100%;height:9px;border:0;border-radius:10px;overflow:hidden;appearance:none;margin:13px 0 9px;accent-color:var(--blue)}.upload-progress progress::-webkit-progress-bar{background:#d5e3f1}.upload-progress progress::-webkit-progress-value{background:linear-gradient(90deg,#1671bd,#3aa2d4);border-radius:10px;transition:width .25s}.upload-progress p{margin:0;color:var(--muted);font-size:11px}.selected-name{padding:15px;border:1px solid var(--line);border-radius:11px;background:#f3f7fb;font-size:13px;overflow-wrap:anywhere}.dialog-actions{display:flex;gap:10px;margin-top:24px}.dialog-actions>*{flex:1}.danger-symbol{background:#fce7e9;color:#af283b}.success-dialog{text-align:center}.success-icon{display:grid;place-items:center;width:76px;height:76px;margin:7px auto 25px;border:8px solid #edf8f2;border-radius:50%;background:#d4efdf;color:#16704b;font-size:31px}.success-dialog .eyebrow{color:#227551}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #d69c22;outline-offset:3px}
.upload-progress { margin-bottom:18px; }
.document-name-button { padding:0; border:0; background:none; text-align:left; font:inherit; color:#145c9c; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; cursor:pointer; overflow-wrap:anywhere; }
.file-type.preview-trigger { border:0; cursor:pointer; font:700 10px "DM Sans",sans-serif; }
.preview-dialog { width:min(1040px,calc(100% - 28px)); }
.preview-dialog .dialog-body { padding:26px; }
.preview-dialog h2 { padding-right:40px; }
.preview-filename { margin:12px 0 20px; padding-right:30px; color:var(--muted); font-size:14px; overflow-wrap:anywhere; }
.preview-content { background:#e5edf5; border:1px solid var(--line); border-radius:12px; overflow:auto; text-align:center; }
.preview-content img { display:block; max-width:100%; max-height:65dvh; width:auto; height:auto; margin:auto; object-fit:contain; }
.pdf-toolbar { display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; padding:12px; background:#f6f9fd; border-bottom:1px solid var(--line); }
.pdf-toolbar span { font-size:13px; color:var(--navy); }
.pdf-toolbar .button { padding:8px 12px; min-height:38px; }
.pdf-toolbar select { min-height:38px; max-width:100%; padding:7px; border:1px solid var(--line); border-radius:8px; color:var(--navy); background:white; font:inherit; font-size:12px; }
.pdf-viewport { max-height:60dvh; min-height:180px; overflow:auto; padding:12px; }
.pdf-viewport canvas { display:block; margin:auto; background:white; box-shadow:0 3px 14px #102c5022; }
.preview-help { color:var(--muted); font-size:12px; line-height:1.6; }
.preview-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:18px; }
@media(max-width:600px) { .preview-dialog .dialog-body { padding:22px 16px; } .preview-actions .button { flex:1 1 100%; } .pdf-viewport { max-height:50dvh; } .pdf-toolbar { gap:6px; } }
@keyframes spin{to{transform:rotate(360deg)}}@keyframes appear{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:850px){.document-hero{grid-template-columns:1fr 170px;padding:34px}.document-card{grid-template-columns:auto minmax(0,1fr)}.file-actions{grid-column:2}.document-guidance{gap:16px;font-size:11px}}
@media(max-width:600px){.document-shell{width:calc(100% - 26px)}.header-actions{gap:14px;width:100%;justify-content:flex-end;font-size:11px}.header-actions .button{min-height:36px;padding:8px 10px;font-size:11px}.document-main{padding-top:22px}.document-hero{display:block;padding:29px 24px;border-radius:19px}.document-hero h1{font-size:33px}.document-hero p:not(.eyebrow){font-size:13px}.hero-file{display:none}.document-guidance{gap:12px;flex-direction:column;padding:20px 8px}.document-workspace{padding:20px 16px;border-radius:17px}.workspace-heading{align-items:flex-start;gap:12px}.workspace-heading h2{font-size:20px}.workspace-heading .button{padding:9px 10px;min-height:36px;font-size:11px}.document-card{padding:16px 12px;gap:12px}.document-card h3{font-size:14px}.file-type{width:38px;height:46px;font-size:9px}.file-actions{grid-column:1/-1}.file-actions .button{flex:1;min-height:42px}.dialog-body{padding:28px 22px}.document-dialog h2{font-size:24px}.dialog-actions{flex-direction:column}.form-field textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
