
:root{--forest:#17664c;--forest-dark:#124d3b;--ink:#263c34;--muted:#65736b;--border:#dfe6dd;--paper:#f7f9f6;--lime:#d9ecb5}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei','PingFang SC','Hiragino Sans',sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
button:focus-visible,a:focus-visible{outline:3px solid var(--forest);outline-offset:3px}
button{border:0}
input,select,textarea{border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--ink);padding:11px 12px;min-height:44px;max-width:100%}
input:focus,select:focus,textarea:focus{outline:2px solid #b2ceb9;border-color:var(--forest)}
input[type=number]{appearance:textfield}
input::-webkit-inner-spin-button{appearance:none}
a{color:var(--forest)}
.sidebar{position:fixed;inset:0 auto 0 0;width:240px;padding:28px 18px 22px;background:#fcfdfb;border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:20}
.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:750;letter-spacing:.2px;color:var(--forest)}
.brand small{display:block;font-size:10px;letter-spacing:2px;color:var(--muted);margin-top:3px}
.brand-icon{background:var(--forest);color:#fff;border-radius:12px;padding:13px;display:flex}
.space-label{color:var(--muted);font-size:13px;margin:42px 12px 16px}
.sidebar nav{display:grid;gap:10px}
.sidebar nav button{display:flex;align-items:center;gap:14px;text-align:left;background:transparent;color:var(--muted);padding:14px 16px;border-radius:8px;font-size:18px;font-weight:550;min-height:50px}
.sidebar nav button.active{color:var(--forest);background:#edf4ed}
.nav-count{margin-left:auto;background:var(--forest);color:#fff;font-size:12px;border-radius:4px;padding:1px 6px}
.workspace{margin-left:240px;min-width:0}
.topbar{position:absolute;top:0;left:240px;right:0;height:56px;padding:0 36px;display:flex;justify-content:flex-end;align-items:center}
.top-actions{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:13px}
.status-dot{width:6px;height:6px;border-radius:50%;background:#51936d}
.icon-button{display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--muted);min-height:44px;min-width:44px;border-radius:8px}
.icon-button:hover{background:#edf3eb}
.mobile-brand{display:none}
main{padding:44px 36px 0;max-width:1540px;margin:auto}
.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px;gap:24px}
.eyebrow{font-size:14px;color:var(--muted);margin-bottom:10px}
.page-heading h1{margin:0;font-size:48px;line-height:1.25;font-weight:700;letter-spacing:-1px}
.page-heading p{color:var(--muted);font-size:14px;margin:12px 0 0;line-height:1.6}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:12px 20px;border-radius:8px;font-size:14px;font-weight:600;min-height:48px}
.primary{background:var(--forest);color:white}
.primary:hover{background:var(--forest-dark)}
.secondary{background:#fff;border:1px solid #d6dfd3;color:var(--forest)}
.secondary:hover{background:#f1f5ef}
.text-button{display:inline-flex;gap:7px;align-items:center;justify-content:center;background:none;color:var(--forest);padding:10px 4px;font-size:14px;min-height:44px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:28px 0;background:#eff4e9;border:1px solid #e0e8d7;border-radius:9px;margin-bottom:24px}
.stat{display:flex;align-items:flex-start;gap:28px;padding:0 30px;min-width:0}
.stat-label{color:#4c6254;font-size:15px;font-weight:500}
.stat strong{display:block;color:var(--forest);font-size:42px;line-height:1.25;letter-spacing:-1px;font-weight:650;margin-top:8px;font-variant-numeric:tabular-nums;white-space:nowrap;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.stat em{font-size:17px;font-weight:400;letter-spacing:0;font-style:normal;margin-left:8px;color:#4c6254}
.pill{display:inline-block;font-size:12px;border-radius:5px;color:#356347;background:#edf4ec;padding:4px 8px;line-height:1.4}
.pending{background:#fcf4e5;color:#805d25}
.panel{background:#fff;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 28px 16px}
.section-heading h2{font-size:23px;font-weight:650;margin:0;line-height:1.4}
.section-heading h2 span{font-size:12px;font-weight:400;color:#53654d;margin-left:10px;background:#eff4e9;padding:4px 8px;border-radius:4px;white-space:nowrap;display:inline-block;vertical-align:middle}
.section-heading p{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.6}
.table-tools{display:flex;justify-content:space-between;padding:0 28px 20px;gap:12px}
.search{display:flex;align-items:center;gap:10px;background:#f7f9f5;border:1px solid var(--border);border-radius:8px;padding:0 12px;max-width:510px;flex:1;color:var(--muted);min-width:0}
.search input{background:none;border:0;min-width:0;padding:12px 0;width:100%;font-size:16px}
.search input:focus{outline:0}
.table-tools select{font-size:14px;padding:10px 14px;min-height:48px}
.table-tools .date-input{font-size:14px}
.table-scroll{overflow-x:auto}
table{border-collapse:collapse;width:100%;white-space:nowrap}
th{background:#f6f8f4;color:var(--muted);font-weight:500;font-size:14px;padding:14px 28px;text-align:right;border-top:1px solid #edf1e9;border-bottom:1px solid #edf1e9}
th:first-child,td:first-child{text-align:left}
td{padding:8px 28px;border-bottom:1px solid #edf1e9;text-align:right;font-size:17px;font-variant-numeric:tabular-nums}
td small{color:var(--muted);font-size:12px}
.product-name{display:flex;align-items:center;max-width:320px;white-space:normal;overflow-wrap:anywhere}
.product-name strong{font-weight:600}
.product-name small{display:flex;align-items:center;gap:4px;font-size:11px;margin-top:4px;color:#617459}
.amount-cell{font-weight:600;color:var(--ink)}
.table-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 28px;background:#f4f7f0}
.table-footer span{font-size:14px;color:var(--muted)}
.table-footer small{display:block;margin-top:4px;font-size:12px}
.table-footer strong{font-size:28px;line-height:1.3;font-weight:650;color:var(--forest);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:right}
.empty{padding:40px 24px;display:flex;align-items:center;flex-direction:column;color:var(--muted);text-align:center}
.empty>span{display:grid;place-items:center;width:60px;height:60px;border-radius:14px;background:#eff4e9;margin-bottom:8px;color:var(--forest)}
.empty h3{color:var(--ink);font-size:18px;font-weight:600;margin:12px 0 6px}
.empty p{font-size:14px;line-height:1.7;margin:4px 0 18px;max-width:400px}
.page-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;color:var(--muted);padding:12px 0 24px;margin-top:8px}
.draft-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:1px solid #ead9b5;background:#fffbf2;padding:16px 24px;border-radius:8px;color:#865d23;margin:0 0 24px;font-size:15px;min-height:62px;text-align:left}
.draft-banner>span{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.draft-banner small{font-size:13px;color:#806d4d}
.history-tools{display:flex;align-items:center;gap:12px;margin:0 0 20px}
.history-tools>input{font-size:14px}
.receipt-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.receipt-item{min-width:0;background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.receipt-item .receipt-card{border:0;border-radius:0;width:100%}
.receipt-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 17px;border-top:1px solid var(--border)}
.receipt-actions>span,.photo-saved{display:flex;align-items:center;gap:6px;color:var(--forest);font-size:13px}
.receipt-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:17px;display:flex;align-items:center;gap:17px;text-align:left;min-width:0;color:var(--ink)}
.receipt-thumb{width:70px;height:93px;background:#f0f3eb;border-radius:6px;border:1px solid #e4e9dc;display:grid;place-items:center;color:#9ca98e;overflow:hidden;flex-shrink:0}
.receipt-thumb img{width:100%;height:100%;object-fit:cover}
.receipt-info{flex:1;min-width:0}
.receipt-info h3{font-size:16px;margin:8px 0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.receipt-info p{font-size:13px;color:var(--muted);margin:0 0 9px}
.receipt-info strong{font-size:17px;font-weight:650}
.receipt-card>svg{color:#91a185;flex-shrink:0}
.settings-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.setting{padding:25px}
.setting>svg{color:#628453}
.setting h2{font-size:17px;margin:17px 0}
.setting p,.setting li{font-size:14px;color:var(--muted);line-height:1.9}
.setting ol{padding-left:20px}
.alert{background:#fff4ef;border:1px solid #efd9c7;color:#984e2d;padding:14px 17px;font-size:14px;border-radius:8px;margin-bottom:16px;white-space:pre-line;line-height:1.7;overflow-wrap:anywhere}
.alert button,.alert a{display:block;background:transparent;text-decoration:underline;margin-top:7px;color:var(--forest)}
.warning{display:flex;align-items:flex-start;gap:9px;background:#fff9ec;border:1px solid #f0e3c3;color:#7e5b20;padding:13px 15px;border-radius:8px;font-size:13px;line-height:1.7;margin-bottom:15px}
.warning svg{flex-shrink:0;margin-top:2px}
.warning p{margin:0 0 5px}
.toast,.busy-toast{position:fixed;bottom:28px;left:calc(50% + 115px);transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:14px 20px;background:#244b39;color:#fff;border-radius:10px;box-shadow:0 8px 30px #0002;z-index:100;font-size:12px;max-width:90vw}
.busy-toast{background:#fff;color:var(--forest);border:1px solid var(--border);z-index:120}
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}
}
.loading{display:flex;justify-content:center;gap:10px;padding:30px;color:var(--muted)}
.mobile-nav{display:none}
.modal-backdrop{position:fixed;inset:0;margin:0;border:0;width:100%;height:100dvh;max-width:none;max-height:none;background:transparent;color:var(--ink);display:grid;place-items:center;padding:25px;z-index:60}
.modal-backdrop::backdrop{background:#16352566;backdrop-filter:blur(3px)}
.editor{width:min(1160px,100%);max-height:95dvh;background:var(--paper);border-radius:17px;display:flex;flex-direction:column;box-shadow:0 20px 90px #123b2b30;overflow:hidden}
.editor-header{display:flex;align-items:center;justify-content:space-between;padding:22px 27px;border-bottom:1px solid var(--border);background:white}
.editor-header h2{margin:0;font-size:20px;font-weight:650}
.editor-header .eyebrow{display:block;font-size:10px;letter-spacing:.3px;margin-bottom:7px}
.editor-body{overflow-y:auto;display:grid;grid-template-columns:340px minmax(0,1fr);min-height:0}
.receipt-preview{padding:22px;border-right:1px solid var(--border)}
.photo-button{width:100%;background:#fff;padding:8px;border:1px solid var(--border);border-radius:9px;overflow:hidden}
.photo-button img{width:100%;height:380px;object-fit:contain}
.photo-button span{display:block;padding:12px 0 5px;color:var(--muted);font-size:12px}
.photo-button.zoomed img{height:auto;object-fit:initial}
.photo-viewer{width:min(1100px,100%);height:92dvh;min-height:0;background:var(--paper);border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.photo-viewer .editor-header{gap:12px;flex-shrink:0}
.photo-viewer .editor-header>div{min-width:0}
.photo-viewer .editor-header p{font-size:13px;color:var(--muted);margin:6px 0 0;overflow-wrap:anywhere}
.photo-viewer .icon-button{flex-shrink:0}
.photo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);flex-shrink:0}
.photo-toolbar>span{font-size:13px;color:var(--muted)}
.photo-toolbar button{flex-shrink:0}
.photo-stage{flex:1;min-height:0;overflow:auto;padding:16px;background:#e9eee7;position:relative}
.photo-stage:focus-visible{outline:3px solid var(--forest);outline-offset:-3px}
.photo-stage img{display:block;width:100%;height:100%;object-fit:contain}
.photo-stage.zoomed img{width:auto;height:auto;max-width:none;max-height:none;margin:auto}
.photo-stage>p,.photo-error{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:20px;color:var(--muted)}
.photo-error p{margin:0 0 16px}
.receipt-preview>.secondary{width:100%;margin-top:15px}
.subtle{color:var(--muted);font-size:13px;line-height:1.8;margin:13px 0}
.no-photo{height:220px;display:grid;place-content:center;text-align:center;color:var(--muted);border:1px dashed #ccd7c4;border-radius:9px}
.no-photo svg{margin:auto}
.draft-form{padding:24px;min-width:0}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}
.form-grid .full{grid-column:1/-1}
label{font-size:13px;color:#53664b;display:flex;flex-direction:column;gap:7px}
label input,label textarea{width:100%;font-size:15px}
.line-heading{display:flex;align-items:center;justify-content:space-between;margin:24px 0 13px;gap:10px}
.line-heading h3{margin:0;font-size:14px;font-weight:550}
.line-heading span{font-size:10px;color:#9aa88b;font-weight:400}
.line-editor{padding:14px 15px;background:white;border:1px solid var(--border);border-radius:10px;margin-bottom:12px}
.line-title{display:flex;align-items:center;gap:10px}
.line-number{font-size:11px;color:#99ab86;width:25px}
.name-label{flex:1}
.name-label input{font-weight:550}
.danger{color:#b18265}
.line-values{display:grid;grid-template-columns:1fr .7fr 1fr 1.2fr;gap:10px;margin:14px 0 13px}
.line-values input{padding:9px 10px}
.match-row{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #f0f3eb;padding-top:10px}
.match-label{font-size:12px;color:#356347;max-width:55%;overflow-wrap:anywhere}
.match-label.new{color:#805d25}
.match-row select{font-size:12px;padding:8px;min-height:44px;max-width:45%}
.row-warning{font-size:12px;color:#805d25;display:flex;gap:6px;align-items:center}
.add-line{width:100%;border:1px dashed #bcccae;border-radius:8px;background:#f3f7ee;display:flex;justify-content:center;gap:7px;padding:13px;color:var(--forest);font-size:14px;min-height:48px}
.totals-form{margin-top:23px}
.ack{display:flex;flex-direction:row;gap:9px;align-items:flex-start;margin-top:10px;color:#795a20;font-size:13px;min-height:44px}
.ack input{width:17px;height:17px;min-height:0;accent-color:var(--forest);padding:0;flex-shrink:0;margin-top:2px}
.editor-footer{display:flex;align-items:center;justify-content:space-between;padding:19px 27px;background:#fff;border-top:1px solid var(--border);gap:13px}
.editor-footer>div>span{font-size:12px;color:var(--muted);display:block;margin-bottom:5px}
.editor-footer strong{font-size:24px;font-weight:650}
.editor-buttons{display:flex;gap:9px;align-items:center}
.product-modal{width:480px;max-width:100%;background:#fff;border-radius:14px;overflow:auto;max-height:94dvh}
.product-form{padding:24px;display:grid;gap:18px}
.product-form p{margin:0}
.merge-box{border-top:1px solid var(--border);padding-top:15px}
.merge-box h3{font-size:14px}
.merge-box p{font-size:13px;color:var(--muted);line-height:1.7;margin:8px 0 15px}
.merge-box select{width:100%;margin-bottom:10px}


.sidebar-foot{margin-top:auto;padding:24px 12px 0;display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}
.heading-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.heading-actions .primary,.heading-actions .secondary{min-height:56px;padding:14px 20px;font-size:16px;white-space:nowrap}
.heading-divider{margin:0 14px;color:#a2ada4}
.camera-button{display:none}
.mobile-label,.table-hint{display:none}
.stat+.stat{border-left:1px solid #d6e0cc}
.stat>svg{color:#536b52;flex-shrink:0;margin-top:4px}
.stat>div{min-width:0;flex:1}
.footer-tools{display:flex;align-items:center;gap:18px}
.footer-tools>span{border-left:1px solid var(--border);padding-left:18px}
.search:focus-within{outline:2px solid var(--forest);outline-offset:2px}
.search input:focus{outline:0}
.sidebar nav button:hover:not(.active){background:#f1f5ee;color:var(--forest)}
.draft-banner:hover{background:#fcf4e3}
.table-scroll tbody tr:hover{background:#fafcf8}
@media(max-width:1200px){
 .sidebar{width:210px;padding:28px 14px 22px}.workspace{margin-left:210px}.brand{font-size:20px}.brand-icon{padding:10px}.sidebar nav button{font-size:14px;padding:13px 12px;gap:10px}
 main{padding:60px 28px 0}.topbar{left:210px;padding:0 28px}.page-heading{align-items:flex-start;flex-wrap:wrap;gap:20px}.heading-actions{flex-wrap:wrap}.heading-actions .primary,.heading-actions .secondary{font-size:14px;min-height:48px;padding:12px 16px}.page-heading h1{font-size:36px}
 .stat{display:block;padding:0 20px}.stat>svg{margin:0 0 10px}.stat strong{font-size:clamp(24px,2.7vw,32px)}.stats{padding:24px 0}.editor-body{grid-template-columns:280px 1fr}.receipt-grid{grid-template-columns:1fr}
 .table-hint{display:block;margin:0;padding:0 28px 10px;font-size:12px;color:var(--muted)}.table-scroll th:first-child,.table-scroll td:first-child{position:sticky;left:0;min-width:130px;max-width:210px;background:#fff;border-right:1px solid var(--border);z-index:1}.table-scroll th:first-child{background:#f6f8f4}
 td,th{padding-left:20px;padding-right:20px}.toast,.busy-toast{left:calc(50% + 105px)}
}
@media(max-width:760px){
 .sidebar{display:none}.workspace{margin-left:0}.topbar{position:static;height:64px;padding:0 18px;padding-top:env(safe-area-inset-top);justify-content:space-between;border-bottom:1px solid var(--border);background:#fff}.mobile-brand{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:650;color:var(--forest)}.top-actions{font-size:11px;gap:5px}.top-actions .icon-button{min-width:36px}
 main{padding:24px 16px 92px}.page-heading{display:block;position:relative;margin-bottom:22px}.page-heading h1{font-size:32px;letter-spacing:-.5px;padding-right:52px}.page-heading .eyebrow{font-size:12px;margin-bottom:8px}.page-heading p{font-size:13px;margin-top:10px}.heading-divider{margin:0 9px}.heading-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px;width:100%}.heading-actions .primary{grid-column:1/-1}.heading-actions .primary,.heading-actions .secondary{font-size:14px;min-height:48px;padding:11px 10px;gap:7px}.heading-actions .camera-button{display:flex;position:absolute;right:0;top:22px;width:48px}.camera-button span,.desktop-label{display:none}.mobile-label{display:inline}.heading-actions svg{width:18px;height:18px}
 .stats{padding:18px 0;grid-template-columns:1fr 1fr;margin-bottom:20px;row-gap:16px}.stat{display:flex;padding:0 16px;gap:10px}.stat:first-child{grid-column:1/-1;border-bottom:1px solid #d6e0cc;padding-bottom:14px;align-items:center}.stat:first-child>div{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1}.stat:nth-child(2){border-left:0}.stat>svg{width:21px;height:21px;margin:4px 0 0}.stat:not(:first-child)>svg{display:none}.stat strong{font-size:26px;margin-top:6px;letter-spacing:-.6px}.stat:first-child strong{font-size:32px;margin:0}.stat-label{font-size:13px}.stat em{font-size:14px;margin-left:6px}
 .draft-banner{padding:14px 16px;font-size:14px;margin-bottom:20px}.draft-banner small{display:none}.draft-banner>span{gap:8px}.draft-banner>svg{flex-shrink:0}
 .section-heading{padding:20px 18px 14px;align-items:flex-start;gap:10px}.section-heading h2{font-size:20px}.section-heading h2 span{font-size:11px;margin-left:6px}.section-heading p{font-size:12px;line-height:1.7}.section-heading .text-button{white-space:nowrap;font-size:12px;padding-top:0}.table-tools{padding:0 18px 18px;flex-wrap:wrap;gap:10px}.search{max-width:none;flex-basis:100%}.search input{font-size:14px}.table-tools select{font-size:13px;min-height:44px;margin-left:auto}.table-tools .date-input{flex:1;min-width:140px;font-size:14px}
 .table-scroll table{min-width:600px}.table-scroll th,.table-scroll td{padding:12px 16px}.product-name{max-width:210px}.product-name strong{font-size:14px}td{font-size:14px}.product-name small{font-size:11px}.table-footer{padding:18px;align-items:flex-start}.table-footer strong{font-size:24px}.table-footer span{font-size:13px}.empty{padding:30px 20px}.empty p{font-size:13px}.page-footer{font-size:12px;flex-wrap:wrap;gap:4px;padding-bottom:8px}.footer-tools{gap:12px;flex-wrap:wrap}.footer-tools>span{padding-left:12px}.footer-tools .text-button{font-size:13px}
 .table-hint{padding-left:18px;padding-right:18px}
 .mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;justify-content:space-around;background:#ffffffef;backdrop-filter:blur(15px);border-top:1px solid var(--border);padding:8px 7px calc(8px + env(safe-area-inset-bottom));z-index:30}.mobile-nav button{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;background:none;color:var(--muted);font-size:11px;min-height:48px;min-width:49px}.mobile-nav button.active{color:var(--forest)}.mobile-nav button.active svg{stroke-width:2.5}.toast,.busy-toast{left:50%;bottom:calc(86px + env(safe-area-inset-bottom));width:max-content;font-size:13px;max-width:calc(100vw - 32px)}
 .history-tools{flex-wrap:wrap;gap:10px}.history-tools .search{flex-basis:100%}.history-tools input[type=date]{flex:1;font-size:14px}.history-tools .secondary{font-size:13px;padding:10px}.receipt-grid{gap:12px}.receipt-card{padding:16px}.receipt-thumb{height:82px;width:61px}.settings-grid{grid-template-columns:1fr;gap:16px}.setting{padding:22px}.setting p,.setting li{font-size:14px}
 .photo-viewer{width:100%;height:100dvh;border-radius:0}.photo-toolbar{padding:10px 16px;gap:8px}.photo-toolbar>span{font-size:12px}.photo-toolbar button{font-size:13px;padding:10px 12px;min-height:44px}.photo-stage{padding:10px}
 .modal-backdrop{padding:0}.editor{width:100%;height:100dvh;max-height:100dvh;border-radius:0}.editor-header{padding:16px 18px;padding-top:calc(16px + env(safe-area-inset-top))}.editor-header h2{font-size:20px}.editor-header .eyebrow{font-size:12px}.editor-body{display:block}.receipt-preview{border:0;border-bottom:1px solid var(--border);padding:16px}.photo-button img{height:210px}.photo-button.zoomed img{height:auto}.receipt-preview>.secondary{width:auto;font-size:13px;margin-top:10px}.receipt-preview .subtle{font-size:12px;margin:10px 0 0}.draft-form{padding:20px 16px}.form-grid{gap:14px}label{font-size:13px}label input,label textarea{font-size:16px}.line-editor{padding:14px}.line-values{grid-template-columns:1fr 1fr;gap:14px}.line-values input{font-size:16px}.line-title{gap:6px}.line-number{width:23px}.line-editor .name-label input{font-size:16px}.match-row select{font-size:12px;max-width:50%;min-height:44px}.match-label{font-size:12px}
 .editor-footer{padding:14px 16px calc(14px + env(safe-area-inset-bottom));gap:14px;flex-wrap:wrap}.editor-footer strong{font-size:24px}.editor-footer>div>span{font-size:12px}.editor-buttons{gap:8px;flex:1;justify-content:flex-end}.editor-buttons .primary,.editor-buttons .secondary{font-size:13px;padding:11px 12px;min-height:44px}.editor-buttons .primary svg{display:none}.product-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:0}.product-form{padding:20px 18px 45px}.product-form input,.product-form textarea,.product-form select{font-size:16px}.alert,.ack,.warning{font-size:13px}.no-photo{height:110px}.no-photo svg{width:28px}.line-heading{margin-top:22px}.line-heading>span{font-size:12px}
}
@media(min-width:761px){.table-scroll table{min-width:680px}}
@media(prefers-reduced-motion:reduce){.spin{animation:none}}
.login-page{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background:#f3f6f0}
.login-card{width:100%;max-width:440px;padding:38px;border:1px solid var(--border);border-radius:20px;background:white;box-shadow:0 16px 50px #263c3408}
.login-brand{display:flex;align-items:center;gap:12px;font-size:17px;font-weight:650;margin-bottom:38px}
.login-card h1{font-size:28px;letter-spacing:-.6px;margin:8px 0}
.login-intro{color:var(--muted);margin:0 0 28px;line-height:1.8}
.login-card form{display:flex;flex-direction:column;gap:9px}
.login-card form label{font-weight:600;font-size:14px}
.login-card form input{width:100%;min-height:48px;margin-bottom:12px;background:var(--paper)}
.login-card form button{width:100%;min-height:48px;margin-top:8px;justify-content:space-between}
.login-card .alert{margin:0 0 22px;overflow-wrap:anywhere}
.login-help{font-size:13px;color:var(--muted);margin:24px 0 0;text-align:center}
.login-footer{position:static;color:var(--muted);font-size:12px;margin-top:26px;letter-spacing:.7px}
.logout-form{margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}
@media(max-width:480px){.login-page{padding:28px 16px}.login-card{padding:28px 24px}.login-brand{margin-bottom:30px}.login-card h1{font-size:26px}}
