:root{--brand:#2f4f4f;--brand-hover:#406868;--brand-active:#182c2c;--accent:#598787;--tint:#dee8e8;--ink:#1b1b1b;--muted:#5e5e5e;--surface:#fff;--page:#f6f6f6;--line:#dee8e8;--alarm:#c62828;--serif:"EB Garamond", Georgia, serif;color:var(--ink);background:var(--page);font-family:Roboto,system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0}.topbar{background:var(--brand);color:#fff;justify-content:space-between;align-items:center;height:56px;padding:0 20px;display:flex}.brand{color:inherit;font-family:var(--serif);letter-spacing:.08em;text-transform:uppercase;align-items:center;gap:10px;font-size:20px;font-weight:600;text-decoration:none;display:flex}.brand img{width:auto;height:32px}.brand-sub{letter-spacing:.04em;opacity:.8;text-transform:none;font-family:Roboto,sans-serif;font-size:14px;font-weight:400}.avatar-wrap{position:relative}.avatar{background:var(--accent);color:#fff;cursor:pointer;border:2px solid #fff3;border-radius:50%;width:36px;height:36px;padding:0;font-weight:600;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.menu{z-index:1000;background:var(--surface);min-width:240px;color:var(--ink);border:1px solid var(--line);border-radius:8px;position:absolute;top:44px;right:0;overflow:hidden;box-shadow:0 8px 24px #0002}.menu-identity{border-bottom:1px solid var(--line);flex-direction:column;gap:2px;padding:12px 14px;display:flex}.menu-identity span{color:var(--muted);font-size:13px}.menu-identity .role{text-transform:uppercase;letter-spacing:.04em;font-size:12px}.menu-item{width:100%;font:inherit;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:8px;padding:10px 14px;display:flex}.menu-item:hover{background:var(--tint)}.page{padding:24px 20px}.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;margin-bottom:16px;padding:18px 20px}.card h1{font-family:var(--serif);color:var(--brand);margin:0 0 8px;font-size:28px;font-weight:600}.card.error{color:var(--alarm)}.card.loading{align-items:center;gap:10px;display:flex}.spinner{border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;width:16px;height:16px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.page{max-width:1100px;margin:0 auto}h1{font-family:var(--serif);color:var(--brand);margin:4px 0 16px;font-size:30px;font-weight:600}h2{margin:0 0 12px;font-size:18px;font-weight:500}.muted{color:var(--muted)}.empty{color:var(--muted);padding:14px 4px;list-style:none}a{color:var(--brand)}.page-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;display:flex}.search{min-width:min(360px,100%);min-height:44px;font:inherit;border:1px solid #c9d6d6;border-radius:22px;padding:0 14px}.tiles{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.tile{background:var(--surface);border:1px solid var(--line);min-height:72px;color:var(--ink);border-radius:10px;grid-template-columns:auto 1fr;align-items:center;gap:2px 12px;padding:16px;text-decoration:none;display:grid}.tile:hover,.tile:active{border-color:var(--accent);background:#fbfdfd}.tile .material-symbols-outlined{color:var(--accent);grid-row:span 2;font-size:32px}.tile-name{font-size:17px;font-weight:500}.tile-meta{color:var(--muted);font-size:13px}.back{min-height:44px;color:var(--brand);align-items:center;gap:4px;font-weight:500;text-decoration:none;display:inline-flex}.files{margin:0;padding:0;list-style:none}.file{min-height:56px;color:var(--ink);border-radius:8px;align-items:center;gap:12px;padding:6px 8px;text-decoration:none;display:flex}.file:hover,.file:active{background:var(--tint)}.file .material-symbols-outlined{color:var(--accent)}.file-name{flex:1;font-size:16px}.file.disabled{opacity:.55}.btn{border:1px solid var(--brand);background:var(--surface);min-height:44px;color:var(--brand);font:inherit;cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:0 16px;font-weight:500;display:inline-flex}.btn:hover{background:var(--tint)}.btn.primary{background:var(--brand);color:#fff}.btn.primary:hover{background:var(--brand-hover)}.btn.primary:active{background:var(--brand-active)}.btn:disabled{opacity:.5;cursor:default}.btn.icon{width:44px;padding:0}.btn.danger{border-color:var(--alarm);color:var(--alarm)}.spinner.light{border-color:#fff #fff5 #fff5}.card-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.card-head h2{margin:0}.photos{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;display:grid}.photo{aspect-ratio:1;background:var(--tint);cursor:pointer;border:0;border-radius:8px;padding:0;overflow:hidden}.photo img{object-fit:cover;width:100%;height:100%;display:block}.lightbox{z-index:2000;background:#000d;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:16px;display:flex;position:fixed;inset:0}.lightbox img{object-fit:contain;max-width:100%;max-height:calc(100% - 40px)}.lightbox-name{color:#fff;font-size:13px}.doc-bar{z-index:50;background:var(--page);flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:8px 0;display:flex;position:sticky;top:0}.doc-title{font-family:var(--serif);color:var(--brand);flex:1;min-width:160px;font-size:22px;font-weight:600}.pdf-wrap{border:1px solid var(--line);background:#e9eded;border-radius:10px;height:calc(100vh - 200px);min-height:420px;position:relative}.pdf-container{position:absolute;inset:0;overflow:auto}.pdfViewer .annotationLayer .textWidgetAnnotation :is(input,textarea),.pdfViewer .annotationLayer .choiceWidgetAnnotation select{background-color:#dee8e88c}.pdfViewer .annotationLayer .buttonWidgetAnnotation.checkBox input{cursor:pointer}.section>summary{cursor:pointer;justify-content:space-between;align-items:center;min-height:32px;list-style:none;display:flex}.section>summary::-webkit-details-marker{display:none}.section>summary h2{margin:0}.section>summary:after{content:"expand_more";color:var(--muted);font-family:Material Symbols Outlined;font-size:24px}.section[open]>summary:after{content:"expand_less"}.fields{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px 20px;margin-top:10px;display:grid}.field{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;min-height:52px;padding:4px 0;display:flex}.field-label{flex:1;font-size:15px}.field select,.field input[type=text]{min-width:150px;max-width:60%;min-height:44px;font:inherit;background:#fff;border:1px solid #c9d6d6;border-radius:8px;padding:0 10px}.toggle{width:48px;height:44px;color:var(--muted);cursor:pointer;background:0 0;border:0}.toggle .material-symbols-outlined{font-size:32px}.toggle.on{color:var(--brand)}.sheet-tabs{gap:6px;margin-bottom:8px;display:flex}.tab{border:1px solid var(--line);background:var(--surface);min-height:40px;font:inherit;cursor:pointer;border-radius:8px 8px 0 0;padding:0 14px}.tab.active{border-color:var(--brand);color:var(--brand);font-weight:500}.editor{grid-template-columns:1fr 320px;align-items:start;gap:16px;display:grid}@media (width<=900px){.editor{grid-template-columns:1fr}}.grid-wrap{border:1px solid var(--line);background:#fff;border-radius:10px;max-height:calc(100vh - 230px);overflow:auto}.grid{border-collapse:collapse;font-size:12px}.grid th{background:var(--page);color:var(--muted);border:1px solid var(--line);z-index:1;padding:2px 6px;font-weight:500;position:sticky;top:0}.grid tbody th{position:sticky;left:0}.grid td{white-space:nowrap;text-overflow:ellipsis;cursor:pointer;border:1px solid #eef1f1;min-width:36px;max-width:160px;height:28px;padding:2px 6px;overflow:hidden}.grid td.is-text{color:var(--muted);cursor:default}.grid td.is-field{background:var(--tint);outline:1px solid var(--accent)}.grid td.is-sel{background:var(--brand);color:#fff}.field-panel{position:sticky;top:64px}.stack{color:var(--muted);flex-direction:column;gap:4px;margin-bottom:12px;font-size:13px;display:flex}.stack :is(input,select,textarea){min-height:40px;font:inherit;color:var(--ink);border:1px solid #c9d6d6;border-radius:8px;padding:6px 10px}.check-row{align-items:center;gap:8px;min-height:40px;margin-bottom:8px;display:flex}.preview{background:var(--page);border-radius:8px;align-items:center;gap:10px;margin:8px 0 12px;padding:10px;display:flex}.row-actions{flex-wrap:wrap;gap:8px;display:flex}.pill{white-space:nowrap;border-radius:12px;padding:2px 10px;font-size:12px}.pill.ok{color:#2e7d3e;background:#e3f1e6}.pill.warn{color:#b45309;background:#fdf0dc}.menu-section{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:8px 14px 2px;font-size:11px}.menu-sep{border-top:1px solid var(--line);margin-top:4px}.toasts{z-index:3000;flex-direction:column;gap:8px;display:flex;position:fixed;bottom:20px;left:50%;transform:translate(-50%)}.toast{background:var(--ink);color:#fff;border-radius:8px;padding:12px 18px;box-shadow:0 6px 18px #0003}.toast.error{background:var(--alarm)}.error-text{color:var(--alarm);margin-top:0}
