*{box-sizing:border-box}body{margin:0;background:#f6f3ea;color:#214638;font:16px/1.5 system-ui,sans-serif}main{max-width:780px;margin:auto;padding:24px 18px 80px}h1{font-size:30px;margin:12px 0}p{color:#526258}.notice{background:#e9eddf;padding:14px;border-radius:12px}button,input,select{font:inherit;min-height:44px;border:1px solid #b5c2b6;border-radius:8px;padding:9px;background:white;color:inherit}button{cursor:pointer}button.primary{background:#214638;color:white}header,.row{background:#fffefa;border:1px solid #daddce;border-radius:12px;padding:16px;margin:12px 0}label{display:block}input,select{max-width:100%;min-width:0}input[type=date]{width:100%}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px}.row>label{flex:1 1 150px;min-width:0}.row strong{display:block}.row>label .muted{display:block}.row>.tools{flex:0 1 auto}.row>.status{flex:1 1 100%;min-height:0}.row[data-state="blank"]>.status,.row[data-state="number"]>.status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.quantity{display:flex;flex:0 0 auto;gap:8px;margin:0}.quantity input{width:102px}.quantity select{width:74px}.muted{font-size:14px;color:#657166}.tools{display:flex;gap:8px;flex-wrap:wrap}.status{min-height:24px;font-size:14px}dialog{max-height:85dvh;overflow:auto;width:min(92%,600px);border:0;border-radius:16px;padding:22px;color:inherit}dialog::backdrop{background:#0007}#review p{border-bottom:1px solid #ddd;padding-bottom:8px}.footer{margin-top:20px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b08c3c;outline-offset:2px}@media(max-width:480px){.row{padding:12px;gap:10px}.row>label{flex-basis:110px}.row>label .muted{font-size:12px}.quantity input{width:88px}.quantity select{width:64px}.row>.tools{flex-basis:100%}}@media(max-width:360px){.fields{grid-template-columns:1fr}main{padding-inline:12px}}
[hidden]{display:none!important}header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:transparent;border:0;padding:0}header img{width:150px;max-width:45%}header span{font-size:12px}section:not(.row),.panel{background:#fffefa;border:1px solid #daddce;border-radius:12px;padding:16px;margin:16px 0}section>label{margin-top:16px}label>input:not([type=checkbox]),label>select,textarea{display:block;width:100%;margin:6px 0 12px}textarea{font:inherit;border:1px solid #b5c2b6;border-radius:8px;padding:10px;resize:vertical}summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600}.check{display:flex;align-items:flex-start;gap:12px;margin:16px 0}.check input{min-height:24px;width:24px;height:24px;flex-shrink:0}.fields>*{min-width:0}.entry{padding:14px 0;border-top:1px solid #ddd}.entry p{margin:6px 0}.row label>input{margin:0}.row{position:relative}.quantity input{margin:0}.status{color:#895c20}#save-message,#review-message,#import-message{white-space:pre-line}button:disabled{opacity:.55;cursor:wait}input[type=date]{appearance:none;min-inline-size:0;overflow:hidden}h2{font-size:22px}
/* Keep complete option labels visible; wrap fields when two usable controls no longer fit. */
.fields{display:flex;flex-wrap:wrap;gap:12px}
.fields>label:first-child{flex:1.4 1 260px}
.fields>label:last-child{flex:1 1 170px}
.fields>label{max-width:100%}
select{-webkit-appearance:none;appearance:none;line-height:1.5;padding-inline:12px 36px;background-image:linear-gradient(45deg,transparent 50%,#526258 50%),linear-gradient(135deg,#526258 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.quantity select{width:76px;flex:0 0 76px;padding-inline:10px 28px;background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%}
@media(forced-colors:active){select{appearance:auto;background-image:none}}

.document-link{display:inline-flex;align-items:center;min-height:44px;padding:9px 12px;border:1px solid #b5c2b6;border-radius:8px;background:white;color:inherit;text-decoration:none}.document-link:focus-visible{outline:3px solid #b08c3c;outline-offset:2px}

#journal-panel textarea{min-height:260px}#journal-panel>label{display:block;margin-top:16px}.journal-document{padding:12px;border:1px solid #d5dbc9;border-radius:10px;margin:12px 0}.journal-document h3{margin:0 0 8px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f6f3ea;padding:12px;border-radius:8px}#inventory-tools>summary{font-weight:650;cursor:pointer;padding:16px 0}#journal-review{max-height:90dvh;overflow-y:auto}#journal-summary p{margin:8px 0}

#admin-panel{margin:24px 0;padding:20px;border:1px solid #c9d0bc;border-radius:12px}#admin-panel[hidden]{display:none}#admin-panel pre,#admin-panel code{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all}#banner-preview{background:#123e30;color:#fff6df;border-radius:16px;padding:24px;margin:20px 0}#banner-preview h2{color:inherit}#banner-preview strong{font-size:28px}
/* Admin: two focused pages and a single next action per step. */
#admin-panel{padding:0;border:0}#admin-panel>summary{padding:20px 0;cursor:pointer;font-weight:650}
.admin-route #store-utilities,.admin-route #store-workspace,.admin-route #admin-panel>summary{display:none}
.admin-route main{max-width:920px}.admin-route #session-user{font-size:14px;color:#5f7065;overflow-wrap:anywhere;margin:16px 0}
.admin-heading{margin:28px 0 24px}.admin-heading h1{margin:8px 0 20px;font-size:32px}.admin-eyebrow,.admin-step{font-size:12px;letter-spacing:1.2px;font-weight:700;color:#68765e}.admin-account-actions{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between}.admin-account-actions a{padding:12px 0;min-height:48px}
.admin-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:28px}.admin-nav button{min-height:52px;background:#eef0e7;color:#123e30;border:1px solid #d6dccd;font-weight:650}.admin-nav button[aria-pressed=true]{background:#123e30;color:#fff;border-color:#123e30}
#admin-panel button,.admin-dialog button{min-height:48px;padding:13px 18px;white-space:normal;line-height:1.4;border-radius:10px}#admin-panel button:disabled{opacity:.5;cursor:not-allowed}#admin-panel [hidden],.admin-dialog [hidden]{display:none!important}
.admin-page-title{margin-bottom:24px}.admin-page-title h2{margin:0 0 10px;font-size:26px}.admin-page-title p,.admin-help{color:#5e6d62}.admin-card{padding:26px!important;border:1px solid #dde1d5;border-radius:16px;background:#fffef9;margin:0 0 20px!important}.admin-card h3{margin:0 0 20px;font-size:20px}.admin-card label{display:block;margin:20px 0 0}.admin-card input,.admin-card textarea,.admin-card select,.admin-dialog input{margin-top:8px;min-height:50px}.admin-help{font-size:14px;line-height:1.6;margin:10px 0 0}.admin-dates{display:grid;grid-template-columns:1fr 1fr;gap:20px}.admin-actions{display:grid;gap:14px;margin:26px 0}.admin-actions button{width:100%}.admin-secondary{background:white!important;color:#123e30!important;border:1px solid #b9c4b9!important}.admin-text-button{background:transparent!important;color:#526659!important;border:0!important;font-size:14px!important}
.admin-callout{background:#f0eddf;border-radius:14px;padding:22px;margin-bottom:24px}.admin-callout button{display:block;margin-top:18px}.admin-meta{font-size:14px;color:#64715f;margin-bottom:20px}.admin-more{border-top:1px solid #dce1d4;margin-top:32px;padding-top:16px}.admin-more summary{cursor:pointer;padding:16px 0;min-height:52px;font-weight:600}.admin-more>button{margin:16px 0}.admin-more>details{margin:16px 0}.admin-danger-zone{margin-top:28px;border-top:1px solid #e8d9d4;padding-top:24px}.admin-danger-zone h3{font-size:18px}.admin-danger{color:#8b2e25!important;background:#fff8f5!important;border:1px solid #bc8b80!important}.admin-confirm{padding:20px;border:1px solid #d7ded1;border-radius:12px;margin:24px 0!important;background:#fffef9}.admin-history-entry{padding:20px 0;border-bottom:1px solid #dde1d5}.admin-history-entry button{margin:8px 0}.admin-dialog{max-width:520px;max-height:90dvh;overflow-y:auto;padding:26px}.admin-dialog-head{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:20px}.admin-dialog-head h2{font-size:24px;margin:8px 0}.admin-dialog code{display:block;background:#f1f0e7;border-radius:10px;padding:18px;word-break:break-all;user-select:all;font-size:18px;line-height:1.7}.admin-dialog .admin-actions{margin-bottom:0}
#admin-message:not(:empty),#mfa-message:not(:empty),#banner-disable-message:not(:empty){padding:18px;border-radius:12px;background:#edf2e8;margin:20px 0;overflow-wrap:anywhere}
@media(max-width:600px){.admin-route main{padding:0 18px 32px}.admin-heading{margin-top:24px}.admin-card{padding:22px 18px!important}.admin-dates{grid-template-columns:1fr;gap:0}.admin-nav{gap:12px}.admin-nav button{font-size:16px;padding:14px 10px!important}.admin-dialog{padding:24px 20px}.admin-page-title h2{font-size:25px}.admin-route #session-user{font-size:13px}.admin-account-actions{gap:10px}.admin-actions{gap:16px}}

/* Show one login step at a time, with a clear primary action and a separate way back. */
#login-form,#login-credentials,#login-otp-panel{display:grid;gap:16px}
#login-form input:not([type=checkbox]){display:block;width:100%;margin-top:8px}
#login-submit,#login-otp-back{width:100%;min-height:48px}
#login-otp-back{background:transparent;border-color:transparent;color:#526258}

/* Errors have a distinct, readable treatment; ordinary status and success keep their own colors. */
.feedback-error:not(:empty){color:#991b1b;font-weight:600}
#login-message.feedback-error:not(:empty),#admin-message.feedback-error:not(:empty),#mfa-message.feedback-error:not(:empty),#banner-disable-message.feedback-error:not(:empty){background:#fff1f2;border-left:4px solid #991b1b;border-radius:8px;padding:14px 16px}

/* Inline notices remain beside the action; important results are also shown above the viewport edge. */
[data-notice-kind]:not(:empty){--notice-fg:#164e63;--notice-bg:#ecf6fa;--notice-border:#36718a;background:var(--notice-bg)!important;color:var(--notice-fg)!important;border:1px solid var(--notice-border);border-left-width:5px;border-radius:12px;padding:16px 18px!important;margin:16px 0;line-height:1.6;overflow-wrap:anywhere}
[data-notice-kind="success"]{--notice-fg:#14532d!important;--notice-bg:#eaf6ec!important;--notice-border:#408453!important}
[data-notice-kind="warning"]{--notice-fg:#78350f!important;--notice-bg:#fff5da!important;--notice-border:#b7791f!important}
[data-notice-kind="error"]{--notice-fg:#991b1b!important;--notice-bg:#fff1f2!important;--notice-border:#b42d37!important}
[data-notice-title]::before{content:attr(data-notice-title);display:block;font-size:14px;font-weight:750;letter-spacing:.2px;margin-bottom:5px}
#feedback-toast{position:fixed;z-index:100;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(540px,calc(100% - 24px));margin:0;display:flex;align-items:flex-start;gap:12px;box-shadow:0 8px 28px #10291d35;padding:18px!important;max-height:45dvh;overflow-y:auto}
#feedback-toast[hidden]{display:none!important}#feedback-toast>div{white-space:pre-line;flex:1;font-weight:600}#feedback-toast>button{flex:0 0 auto;min-height:44px;padding:8px 12px;background:transparent;color:inherit;border-color:currentColor}

#journal-select{width:100%;min-height:50px;margin-top:8px}.journal-order{border:1px solid #d7ded0;border-radius:14px;padding:20px;margin:18px 0}.journal-order h3{margin-top:0}.journal-order-lines{border-top:1px solid #e1e5d9;padding:14px 0}.journal-order .tools{gap:12px;margin-top:18px}.journal-order .tools button{min-height:48px}

/* Persistent sync state stays readable without repeating large success cards. */
[data-notice-kind="success"][data-notice-compact="true"]:not(:empty){background:transparent!important;border:0;border-radius:0;padding:0!important;margin:8px 0;font-size:14px;line-height:1.5}
[data-notice-kind="success"][data-notice-compact="true"]::before{content:"✓ ";display:inline;font-size:inherit;margin:0}

.journal-history-controls{display:grid;gap:12px;margin:16px 0}.journal-history-controls input{display:block;width:100%;margin-top:6px}.journal-history-controls .tools{gap:12px}.journal-day{border:1px solid #cbd4c6;border-radius:12px;margin:12px 0;padding:0 14px;background:#fffefa}.journal-day>summary{padding:16px 0;min-height:52px;font-weight:700;cursor:pointer;overflow-wrap:anywhere}.journal-day .journal-order{margin:0 0 14px}.journal-day .journal-order h3{font-size:18px}

/* Three task pages: input first, tools out of the daily flow. */
[hidden]{display:none!important}.store-nav{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:8px;margin:14px 0}.store-nav button{font-size:14px;padding:11px 5px;min-height:48px}.store-nav button[aria-pressed="true"]{background:#214638;color:#fff;border-color:#214638;font-weight:700}#store-sync{margin:10px 0 20px;border-bottom:1px solid #daddce;padding-bottom:10px}#store-sync>summary{font-size:14px;cursor:pointer;min-height:36px;padding:7px 0}#store-sync[data-attention="true"]>summary{color:#991b1b;font-weight:700}#store-sync[open]{background:#fffefa;border:1px solid #daddce;border-radius:12px;padding:12px}#store-page-entry h1{margin:12px 0}#journal-panel>p:first-child{margin-top:0}#journal-panel textarea{min-height:200px}#journal-panel>.tools{display:grid;grid-template-columns:1fr;gap:12px}#journal-clear{background:transparent;border:0;color:#657166}#journal-draft-status[data-notice-kind="info"],#local-status[data-notice-kind="info"]{background:transparent!important;border:0;padding:0!important;margin:8px 0;font-size:14px}#journal-draft-status[data-notice-kind="info"]::before,#local-status[data-notice-kind="info"]::before{display:none}.entry-options{margin:12px 0;font-size:14px}.entry-options>summary{min-height:44px;padding:10px 0;cursor:pointer}.entry-options label{margin:8px 0}#store-page-manage>.tools,#store-utilities .tools{gap:12px}#store-page-manage #session-user{font-size:14px;overflow-wrap:anywhere}#store-page-manage #store-utilities{margin:18px 0 24px}#store-page-history #journal-select{width:100%;margin:6px 0}.admin-route #store-workspace{display:block}.admin-route #store-utilities{display:block}#store-page-manage #admin-panel{margin:24px 0}

#reconcile-open{margin:8px 0 20px}#reconcile-panel>label{margin:16px 0}#reconcile-panel input:not([type=checkbox]),#reconcile-panel select{display:block;width:100%;margin-top:6px}#reconcile-panel .check{display:flex;align-items:flex-start;gap:12px}#reconcile-panel .check input{width:22px;min-height:22px;flex:0 0 22px;margin:4px 0}#reconcile-panel>button{margin:12px 0}#reconcile-preview section{border-top:1px solid #daddce;padding:12px 0}.reconcile-map{display:grid;gap:6px;padding:10px 0}.reconcile-map small{color:#526258}.reconcile-warning{padding:12px;background:#fff5da;color:#78350f;border-radius:8px}.reconcile-row{padding:14px;border:1px solid #daddce;border-radius:10px;margin:12px 0}.reconcile-row>summary{font-weight:700;cursor:pointer;min-height:44px}.reconcile-row:not([data-result=match])>summary{color:#991b1b}.reconcile-row pre{white-space:pre-wrap;overflow-wrap:anywhere}#reconcile-file{font-size:14px}#reconcile-panel details>summary{padding:12px 0;cursor:pointer}#reconcile-panel{overflow-wrap:anywhere}

#update-app{width:100%;background:#e9eddf;border-color:#73907c;margin:4px 0 8px;font-weight:650}
