/* MoonThing Cap Red. Shared by the authenticated viewer and PDF backups. */
@font-face{font-family:Inter;src:url('/fonts/Inter-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/Inter-500.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/Inter-600.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/Inter-700.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:light;--canvas:#faf6f4;--surface:#fff;--raised:#f3eeec;--sunken:#faf6f4;--ink:#1f1a1c;--muted:#5e5357;--faint:#5e5357;--line:#e2d9d6;--divider:#f0eae7;--brand:#c62f24;--brand-soft:#fbece8;--blue:var(--brand);--blue-dark:var(--brand);--blue-pale:var(--brand-soft);--info:#1d5fb8;--info-bg:#e6f0fc;--success:#1f7a4d;--success-bg:#e9f5ee;--danger:#b12d3f;--danger-bg:#fcebee;--danger-line:#e6a6b0;--warning:#6b4e16;--warning-bg:#f7efcb;--warning-line:#ecdc9a;--on-brand:#fff;--action-start:#d6352a;--action-end:#c21f3a;--target:44px;--text-base:14px;--text-md:14px;font-family:Inter,system-ui,sans-serif}
:root[data-theme="dark"]{color-scheme:dark;--canvas:#110e10;--surface:#1b1719;--raised:#241e21;--sunken:#151113;--ink:#f5f0ee;--muted:#b9adb1;--faint:#b9adb1;--line:#3a3236;--divider:#2b2427;--brand:#ff6b52;--brand-soft:#30201e;--info:#7cb8ff;--info-bg:#243042;--success:#34d399;--success-bg:#18352a;--danger:#ff8d9c;--danger-bg:#361e25;--danger-line:#653440;--warning:#f4ecc2;--warning-bg:#241e21;--warning-line:#5e5235}
html,body{font-family:Inter,system-ui,sans-serif;background:var(--canvas);color:var(--ink)}
button,input,select{font:inherit}button,a,summary{touch-action:manipulation}svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--info);outline-offset:3px}
[hidden]{display:none!important}button:disabled{cursor:default;opacity:.5}a{color:var(--brand)}
.header{height:68px;min-height:68px;padding:0 32px;gap:32px;background:var(--surface);border-color:var(--divider);z-index:10}
.brand{gap:10px;flex-shrink:0}.brand-mark{width:36px;height:40px;flex-basis:36px;border:0;border-radius:0;background:transparent;box-shadow:none}.brand-name strong{font-size:17px}.brand small{display:block;font-size:11px;letter-spacing:0;text-transform:none;font-weight:400;color:var(--muted);margin:3px 0 0}
.primary-nav{display:flex;gap:10px;align-self:stretch;margin-right:auto}.primary-nav a{display:flex;align-items:center;gap:8px;padding:0 12px;min-height:44px;text-decoration:none;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}.primary-nav a[aria-current="page"]{color:var(--brand);border-bottom-color:var(--brand);font-weight:500}.primary-nav svg{width:17px;height:17px}
.header-actions{gap:12px}.session-identity{font-size:12px;max-width:220px}.header-icon-button{display:grid;place-items:center;width:44px;height:44px;min-width:44px;padding:10px;color:var(--ink);background:transparent;border:0;border-radius:10px;cursor:pointer}.header-icon-button:hover{background:var(--raised)}.header-icon-button svg{width:20px;height:20px}.search-toggle{display:none!important}.actions-menu{border-color:var(--line);background:var(--surface);box-shadow:0 12px 40px #0002}.actions-menu button,.actions-menu a{color:var(--ink);min-height:44px}.actions-menu .danger{color:var(--danger)}
.workspace{grid-template-columns:300px minmax(0,1fr);gap:20px;padding:24px 32px;background:var(--canvas)}.library{border:1px solid var(--line);border-radius:12px;overflow:hidden}.library-search{padding:18px 16px 14px;border-bottom:1px solid var(--divider)}.library-search>strong{display:block;margin-bottom:12px;font-size:16px;font-weight:600}.header-search{display:flex;width:100%;min-width:0;height:44px;border-color:var(--line);border-radius:9px;background:var(--surface)}.header-search input{width:100%;min-width:0;font-size:13px;color:var(--ink);background:transparent}.report-list{scrollbar-color:var(--line) transparent}.group-heading{background:var(--sunken)}.location-folder{min-height:80px;padding:14px 16px}.location-folder strong{font-weight:500}.folder-icon{background:var(--brand-soft);color:var(--brand);box-shadow:none}.location-group-section,.location-row{border-color:var(--divider)}.location-scope{padding:18px 16px}.location-scope h2{font-size:18px;overflow-wrap:anywhere}.report-item{padding:14px 16px;border-color:var(--divider)}.report-title{font-weight:500}.report-item.selected{background:var(--brand-soft)}.report-item.selected .pdf-icon{background:var(--brand);color:var(--surface)}
.viewer{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--raised)}.viewer-toolbar{background:var(--surface);padding:14px 20px;border-color:var(--line);min-height:72px}.viewer-title strong{font-weight:600}.viewer-actions{display:flex;gap:10px;align-items:center}.download,.quiet-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:9px;padding:0 14px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:500;text-decoration:none;cursor:pointer}.download:hover,.quiet-button:hover{background:var(--raised)}#pdfFrame{background:#fff;flex:1}.workspace.is-expanded{grid-template-columns:minmax(0,1fr)}.workspace.is-expanded .library{display:none}.workspace.is-expanded .viewer{width:100%;max-width:1280px;justify-self:center}
.log-records-page{padding:24px 32px;overflow:auto}.log-records-card{height:100%;min-height:540px;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible}.log-records-head{padding:0;justify-content:space-between;align-items:center;gap:16px;margin:0 0 20px}.log-records-head h2{font-size:28px;font-weight:600;letter-spacing:-.04em}.log-records-head p{margin:7px 0 0;font-size:13px;color:var(--muted)}.sheet-head-actions{display:flex;gap:10px;align-items:center}.meter-copy-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;height:44px;padding:0 18px;border-radius:9px;background:linear-gradient(135deg,var(--action-start),var(--action-end));color:var(--on-brand);font-size:14px}.meter-copy-button svg{width:17px;height:17px}.meter-copy-button:hover:not(:disabled){background:linear-gradient(135deg,var(--action-start),var(--action-end));filter:brightness(.95)}.meter-copy-button:disabled{background:var(--raised);color:var(--muted)}
.sheet-options{position:relative;z-index:20}.sheet-options summary{list-style:none}.sheet-options summary::-webkit-details-marker{display:none}.sheet-actions-menu{position:absolute;right:0;top:50px;width:240px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 36px #0002}.sheet-actions-menu button{display:block;text-align:left;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:13px;cursor:pointer}.sheet-actions-menu button:hover{background:var(--raised)}.sheet-help{border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:12px 16px;margin-bottom:18px;color:var(--muted);font-size:13px;line-height:1.6}.sheet-help p{margin:0}.sheet-help p+p{margin-top:5px}
.meter-sheet-controls{padding:0;margin-bottom:18px;gap:12px}.meter-sheet-field-grow{flex:0 1 350px}.meter-sheet-field select{height:44px;min-width:110px;border-color:var(--line);background:var(--surface);color:var(--ink);border-radius:9px;font-size:14px}.meter-sheet-field label{font-weight:500;font-size:12px}.meter-sheet-field select:disabled{background:var(--raised)}.meter-sheet-tabbar{display:flex;align-items:center;gap:10px;padding:8px 16px;min-width:0;background:var(--surface);border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0}.collection-label,.sheet-row-count{font-size:11px;color:var(--muted);white-space:nowrap}.sheet-row-count{margin-left:auto}.meter-sheet-tabs{padding:0;border:0;min-width:0;gap:6px;align-items:center;scrollbar-width:thin}.meter-sheet-tab{min-height:44px;padding:10px 14px;border:0;border-radius:7px;background:transparent;font-size:12px;font-weight:400;color:var(--muted)}.meter-sheet-tab:hover{background:var(--raised)}.meter-sheet-tab.is-active{background:var(--raised);color:var(--brand);box-shadow:inset 0 -2px var(--brand)}
.log-records-card>.meter-grid-wrap{min-height:200px;border:1px solid var(--line);background:var(--surface);scroll-padding:72px 0 0 234px;scrollbar-color:var(--line) transparent}.meter-grid{font-size:14px;min-width:1200px}.meter-grid th,.meter-grid td{height:44px;padding:10px 16px;border-color:var(--divider);text-overflow:clip}.meter-grid thead th{top:28px;height:44px;letter-spacing:0;text-transform:none;font-size:12px;font-weight:500;background:var(--raised);white-space:nowrap}.meter-grid .meter-grid-groups th{height:28px;top:0;background:var(--surface);font-size:11px;text-align:center;cursor:default;padding:5px 12px}.meter-grid thead .meter-grid-corner{width:44px;min-width:44px;z-index:5;left:0;background:var(--raised)}.meter-grid thead th[data-col="0"]{left:44px;z-index:4;text-align:left;width:190px;min-width:190px;background:var(--raised)}.meter-grid thead th[rowspan]{height:72px;top:0}.meter-grid tbody .meter-grid-rowhead{width:44px;min-width:44px;top:auto;background:var(--raised);font-size:11px;font-weight:400;z-index:3}.meter-grid tbody td{background:var(--surface);font-weight:400}.meter-grid tbody td[data-col="0"]{position:sticky;left:44px;z-index:2;background:var(--sunken);font-weight:500}.meter-grid tbody td.is-numeric{text-align:right;font-weight:400}.meter-grid tbody td.is-selected,.meter-grid .is-active{background:var(--info-bg)!important;color:var(--info)!important}.meter-grid tbody td.is-focus{box-shadow:inset 0 0 0 2px var(--info)}
.meter-sheet-footer{padding:12px 16px;border:1px solid var(--line);border-top:0;border-radius:0 0 12px 12px;background:var(--sunken);min-height:44px}.meter-sheet-status{font-weight:400}.sheet-shortcut,.sheet-readonly{font-size:11px;color:var(--muted)}.meter-sheet-note{padding:12px 0;border:0;font-weight:400}.refill-visits{margin-top:12px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.refill-visits-wrap{max-height:140px}.refill-visits-table th{background:var(--raised);text-transform:none;letter-spacing:0}.log-records-card>.dialog-message{margin:8px 0;padding:10px 14px}
.log-records-page.is-focused .meter-sheet-controls,.log-records-page.is-focused .sheet-help,.log-records-page.is-focused .meter-sheet-note,.log-records-page.is-focused .refill-visits{display:none}.log-records-page.is-focused .log-records-head{margin-bottom:18px}
.login-view{background:var(--canvas)}.login-card{background:var(--surface);border-color:var(--line);box-shadow:0 14px 48px #0001}.login-mark{background:transparent;border:0;box-shadow:none}.login-form button,.viewer-form button{min-height:44px;background:linear-gradient(135deg,var(--action-start),var(--action-end));color:var(--on-brand)}.login-form input,.viewer-form input{background:var(--surface);color:var(--ink);border-color:var(--line)}.dialog-kicker{color:var(--brand)}.dialog-message[data-type="success"]{background:var(--success-bg);color:var(--success)}.dialog-message[data-type="error"]{background:var(--danger-bg);color:var(--danger)}dialog{color:var(--ink);background:var(--surface)}
.local-demo-banner{padding:7px 16px;text-align:center;font-size:12px;color:var(--warning);background:var(--warning-bg);border-bottom:1px solid var(--warning-line)}body.is-local-demo .app{height:calc(100dvh - 33px)}
@media(max-width:1100px){.header{gap:18px;padding:0 24px}.session-identity{display:none}.workspace{grid-template-columns:270px minmax(0,1fr);padding:20px 24px}.log-records-page{padding:20px 24px}.primary-nav a{padding:0 10px}}
@media(max-width:700px){body{overflow:auto}.app{height:auto;min-height:100dvh}.header{height:auto;min-height:112px;display:grid;grid-template-columns:1fr auto;gap:0;padding:8px 16px 0}.brand small{display:block}.primary-nav{grid-column:1/-1;grid-row:2;height:48px;gap:0;justify-content:center;margin:0}.primary-nav a{flex:1;justify-content:center;font-size:12px;padding:0 8px;gap:6px}.primary-nav svg{width:15px;height:15px}.header-actions{grid-column:2;grid-row:1;gap:2px}.header-icon-button{width:44px;min-width:44px}.workspace{display:block;padding:16px;min-height:calc(100dvh - 112px)}.library{min-height:calc(100dvh - 146px)}.library-search{padding:14px}.header-search input{font-size:16px}.viewer{border-radius:0;border:0}.viewer-toolbar{padding:12px;gap:8px}.viewer-actions{gap:2px}.viewer-title span{font-size:11px}.viewer-title strong{font-size:13px}.download{font-size:12px;padding:0 10px}.workspace.is-expanded .viewer{max-width:none}.log-records-page{padding:20px 16px;overflow:visible}.log-records-card{height:auto;min-height:0;overflow:visible}.log-records-head{align-items:flex-start;flex-wrap:wrap;gap:14px;margin-bottom:20px}.log-records-head h2{font-size:26px}.log-records-head p{font-size:12px;line-height:1.5}.sheet-head-actions{margin-left:auto;gap:4px}.meter-copy-button{font-size:13px;padding:0 13px}.meter-sheet-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.meter-sheet-field-grow{grid-column:1/-1}.meter-sheet-field select{width:100%;font-size:16px}.meter-sheet-tabbar{padding:8px;gap:6px}.collection-label{display:none}.sheet-row-count{font-size:10px}.meter-sheet-tab{padding:10px 12px;font-size:11px}.log-records-card>.meter-grid-wrap{max-height:60dvh;scroll-padding-left:180px;min-height:240px}.meter-grid{min-width:1130px}.meter-grid th,.meter-grid td{padding:10px 12px}.meter-grid thead .meter-grid-corner,.meter-grid tbody .meter-grid-rowhead{width:36px;min-width:36px}.meter-grid thead th[data-col="0"]{width:144px;min-width:144px;left:36px}.meter-grid tbody td[data-col="0"]{left:36px}.meter-sheet-footer{position:static!important;padding:12px 10px;gap:8px}.sheet-shortcut{display:none}.meter-sheet-note{padding:12px 0;font-size:12px}.refill-visits{padding:12px}.log-records-page.is-focused .log-records-card{height:calc(100dvh - 180px);min-height:500px}.log-records-page.is-focused .meter-grid-wrap{max-height:none;min-height:220px}.meter-sheet-tabbar:has(.quiet-button:not([hidden])){flex-wrap:wrap}.meter-sheet-tabbar .quiet-button{font-size:11px;padding:0 10px}.sheet-actions-menu{width:236px}.local-demo-banner{font-size:11px;padding:7px 10px}body.is-local-demo .app{height:auto}}
.meter-col-row-number{width:44px}.meter-col-machine{width:190px}
.fallback-open,.group-save-button,.header-icon-button.active,.organize-button[aria-pressed="true"]{background:linear-gradient(135deg,var(--action-start),var(--action-end));color:var(--on-brand)}
.login-form button:hover,.viewer-form button:hover,.group-save-button:hover{background:linear-gradient(135deg,var(--action-start),var(--action-end));filter:brightness(.95)}
@media(max-width:700px){.meter-col-row-number{width:36px}.meter-col-machine{width:144px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
