/* Panel Desk 1.4 — a local, keyboard-friendly customer worksheet. */
.customer-view-bar{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:10px;padding-right:22px;flex-wrap:wrap}
.customer-view-bar .list-tabs{border:0;flex:1;white-space:nowrap}
.view-switch{display:inline-flex;background:var(--surface-alt);padding:4px;border:1px solid var(--line);border-radius:9px;gap:3px;margin:9px 0}
.view-switch button{display:flex;align-items:center;gap:7px;background:none;border:1px solid transparent;border-radius:6px;padding:7px 13px;min-height:34px;font-size:12px;font-weight:600;color:var(--muted)}
.view-switch button[aria-pressed=true]{background:var(--surface);border-color:var(--line);color:var(--text);box-shadow:var(--shadow)}
.view-switch .icon,.sheet-tools .icon{width:15px;height:15px}
.sheet-typebar{padding:17px 22px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.type-switch{display:flex;gap:7px;flex-wrap:wrap}.type-switch button{border:1px solid var(--line);background:var(--surface);border-radius:7px;min-height:37px;padding:7px 12px;display:flex;gap:9px;align-items:center;font-size:12px;font-weight:600;color:var(--muted)}
.type-switch button span{font-size:10px;font-variant-numeric:tabular-nums;padding:1px 5px;border-radius:4px;background:var(--surface-alt);color:var(--muted)}
.type-switch button[aria-pressed=true]{background:var(--primary-soft);border-color:color-mix(in srgb,var(--primary) 40%,var(--line));color:var(--primary)}.type-switch button[aria-pressed=true] span{background:var(--surface);color:var(--primary)}
.sheet-local-badge{display:flex;gap:6px;align-items:center;font-size:10px;color:var(--green)}.sheet-local-badge .icon{width:14px;height:14px}
.sheet-toolbar{padding-top:14px;padding-bottom:12px;border-bottom:0!important}.sheet-toolbar .search-wrap{max-width:none;flex:1}.sheet-toolbar .filter-tools{flex:none}.sheet-toolbar #sort{width:165px}
.customer-filters{display:flex;gap:10px;align-items:flex-end;padding:0 22px 17px;border-bottom:1px solid var(--line)}.customer-filters label{font-size:10px;color:var(--muted);margin:0;flex:1;min-width:0;max-width:270px}.customer-filters select{font-size:12px;min-height:38px;padding:8px 25px 8px 10px;margin-top:5px;border-radius:7px}.filter-reset{font-size:11px;min-height:38px;padding:8px 10px;margin-left:auto}
.expiry-range{display:flex;align-items:center;gap:14px;padding:0 22px 16px;flex-wrap:wrap}.expiry-range label{max-width:180px;font-size:11px}.expiry-range input{margin-top:5px;min-height:38px;padding:8px;font-size:12px}.expiry-range span{font-size:11px}
.sheet-financial-summary{display:grid;grid-template-columns:1fr 1.6fr 1fr 1.15fr;padding:15px 22px;background:var(--surface-alt);border-bottom:1px solid var(--line);gap:20px}
.sheet-financial-summary>div{min-width:0}.sheet-financial-summary>div>span{display:block;color:var(--muted);font-size:10px;font-weight:500}.sheet-financial-summary strong{display:flex;gap:10px;align-items:baseline;font-size:21px;font-weight:650;letter-spacing:-.5px;margin-top:3px;line-height:1.3;flex-wrap:wrap}.sheet-financial-summary small{font-size:10px;color:var(--muted);font-weight:400;letter-spacing:0;display:block}.sheet-financial-summary .summary-due{color:var(--amber);font-size:16px;letter-spacing:-.2px;line-height:1.55;gap:4px}.summary-due b{font-weight:400;color:var(--subtle)}.sheet-financial-summary .summary-note{font-size:10px;color:var(--muted);border-left:1px solid var(--line);padding-left:16px;align-self:center;line-height:1.7}.summary-note span{font-size:10px}
.sheet-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;font-size:10px;color:var(--muted);flex-wrap:wrap}.sheet-tools>span,.sheet-tools>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sheet-tools .button{font-size:11px;min-height:35px;padding:7px 9px;gap:5px}.sheet-tools .check-label{font-size:10px;margin:0 4px 0 0;line-height:1.4}.sheet-tools input[type=checkbox]{width:15px;height:15px;min-height:15px}
.sheet-scroll{width:100%;overflow:auto;max-height:62vh;min-height:165px;scrollbar-width:thin;scrollbar-color:var(--subtle) var(--surface-alt);scroll-padding-left:242px;scroll-padding-top:48px;border-top:1px solid var(--line);overscroll-behavior-x:contain;isolation:isolate}
.customer-sheet{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:1232px;text-align:left}
.customer-sheet th{position:sticky;top:0;z-index:3;height:48px;background:var(--surface-alt);font-size:10px;font-weight:650;padding:10px 8px;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);letter-spacing:0;white-space:normal}.customer-sheet th span{display:block;color:var(--muted);font-size:9px;font-weight:400;margin-top:3px}
.customer-sheet td{height:68px;padding:7px 5px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)!important;font-size:12px;background:var(--surface);vertical-align:middle}
.customer-sheet tr:nth-child(even) td{background:color-mix(in srgb,var(--surface-alt) 55%,var(--surface))}.customer-sheet tr:hover td{background:var(--surface-alt)}
.customer-sheet .sheet-identity{width:240px;min-width:240px;position:sticky;left:0;z-index:2;border-right:1px solid color-mix(in srgb,var(--primary) 15%,var(--line));box-shadow:3px 0 7px #0c1d3510}.customer-sheet th.sheet-identity{z-index:4;padding-left:18px;background:var(--surface-alt)}
.customer-sheet td.sheet-identity{padding:7px 7px 7px 28px}.sheet-row-number{position:absolute;left:7px;top:17px;font-size:9px;color:var(--subtle);width:18px;text-align:center;font-variant-numeric:tabular-nums}.dirty-mark{display:none;font-size:18px;line-height:12px;color:var(--primary)}.row-dirty .dirty-mark{display:block}
.sheet-login-line{display:flex;gap:6px;align-items:center;padding:3px 5px 1px;min-width:0}.sheet-login-line .mono{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);line-height:1.5}.device-tag{display:inline-block;border-radius:4px;font-size:8px;font-weight:700;padding:1px 4px;letter-spacing:.3px;flex:none}.device-m3u{background:var(--primary-soft);color:var(--primary)}.device-mag{background:var(--green-bg);color:var(--green)}.test-marker{font-size:7px;letter-spacing:.3px;color:var(--muted)}
.customer-sheet .sheet-expiry{width:133px;min-width:133px;padding-left:10px}.sheet-expiry strong{font-size:11px;font-weight:550;display:block;white-space:nowrap}.sheet-expiry>span{font-size:10px;display:block;color:var(--muted);margin-top:3px}.sheet-expiry>small{font-size:8px;color:var(--amber)}
.col-price{width:84px}.col-currency{width:83px}.col-received{width:89px}.col-balance{width:87px}.col-payment{width:153px}.col-period{width:150px}.col-notes{width:186px}.col-contact{width:190px}.col-paid-on{width:150px}.sheet-account-action{width:42px;min-width:42px;text-align:center}.sheet-account-action .icon-button{width:30px;height:34px;padding:6px}.sheet-account-action .icon{width:15px;height:15px}
.sheet-cell{width:100%;min-width:0;border-radius:6px;position:relative}.sheet-cell input,.sheet-cell select,.sheet-cell textarea{font-size:12px;min-height:36px;padding:7px 6px;border:1px solid transparent;border-radius:6px;width:100%;background:transparent;transition:none;box-shadow:none}.sheet-cell input:hover,.sheet-cell select:hover,.sheet-cell textarea:hover{border-color:var(--line);background:var(--surface)}.sheet-cell input:focus,.sheet-cell select:focus,.sheet-cell textarea:focus{border-color:var(--primary);background:var(--surface);outline:2px solid color-mix(in srgb,var(--primary) 20%,transparent);position:relative;z-index:2}.sheet-cell input[data-field=name]{font-weight:600;font-size:12px}.sheet-cell select{font-size:11px;padding-right:19px;text-overflow:ellipsis}.sheet-cell textarea{resize:vertical;min-height:36px;max-height:170px;line-height:1.6;display:block}.sheet-cell textarea:focus{min-height:68px}.sheet-cell input[data-field=price],.sheet-cell input[data-field=amount_received]{font-variant-numeric:tabular-nums;text-align:right}.cell-dirty{background:var(--primary-soft)}.cell-dirty::after{position:absolute;right:0;top:0;content:'';border-top:5px solid var(--primary);border-left:5px solid transparent;border-radius:0 4px 0 0;pointer-events:none}
.sheet-cell:has(select[data-field=payment] option:checked[value=paid]),.sheet-cell:has(select[data-field=payment] option:checked[value=prepaid]){background:var(--green-bg);color:var(--green)}.sheet-cell:has(select[data-field=payment] option:checked[value=awaiting]),.sheet-cell:has(select[data-field=payment] option:checked[value=partial]){background:var(--amber-bg);color:var(--amber)}
.sheet-balance{text-align:right;padding-right:9px!important;font-variant-numeric:tabular-nums}.sheet-balance strong{font-size:12px;font-weight:550}.sheet-balance small{display:block;font-size:9px;color:var(--muted);margin-top:3px}.balance-due{color:var(--amber)}.balance-credit{color:var(--green)}
.payment-chip{display:inline-block;font-size:9px;font-weight:550;border-radius:5px;padding:2px 5px;color:var(--muted);background:var(--surface-alt);white-space:nowrap}.payment-paid,.payment-prepaid{background:var(--green-bg);color:var(--green)}.payment-awaiting,.payment-partial{background:var(--amber-bg);color:var(--amber)}.list-payment{display:flex;gap:6px;align-items:center;margin-top:7px;flex-wrap:wrap;font-size:10px}
.customer-sheet tr.row-invalid .sheet-identity{background:var(--red-bg)}.row-error{font-size:10px;color:var(--red);line-height:1.6;padding:5px;overflow-wrap:anywhere}.discard-row{padding:5px;background:transparent;color:var(--red);font-size:9px;border:0;text-align:left;text-decoration:underline}.sheet-errors{margin:0 16px 12px;padding:12px 14px;color:var(--red);background:var(--red-bg);font-size:11px;border-radius:8px}
.page-size-label{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);margin:0 8px 0 0}.page-size-label select{width:70px;padding:5px 20px 5px 8px;font-size:12px;min-height:33px;border-radius:6px}
.sheet-savebar{position:sticky;bottom:16px;z-index:8;margin-top:12px;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 18px;background:var(--surface);border:1px solid color-mix(in srgb,var(--primary) 50%,var(--line));border-radius:12px;box-shadow:0 6px 24px #13295720}
.sheet-save-state{display:flex;gap:11px;align-items:center;min-width:0}.sheet-save-state>.icon{background:var(--primary-soft);color:var(--primary);padding:8px;width:37px;height:37px;border-radius:9px}.sheet-save-state strong{display:block;font-size:13px;font-weight:600}.sheet-save-state span{font-size:10px;color:var(--muted);display:block;margin-top:2px}.sheet-save-actions{display:flex;align-items:center;gap:8px}.sheet-save-actions .check-label{font-size:10px;margin:0 6px 0 0}.sheet-save-actions .button{font-size:12px;min-height:39px}.sheet-savebar:has(#save-sheet:disabled) input{pointer-events:none}
.sheet-guide h3{font-size:15px;margin:24px 0 9px}.sheet-guide h3:first-child{margin-top:0}.sheet-guide p{font-size:12px;color:var(--muted);line-height:1.8;margin:9px 0}.expiry-check-progress{padding:14px;background:var(--surface-alt);border:1px solid var(--line);border-radius:8px;margin:20px 0 12px;font-size:13px;overflow-wrap:anywhere}#expiry-check-bar{width:100%;height:12px;accent-color:var(--primary)}#expiry-check-failed{font-size:11px;color:var(--red);margin-top:12px;overflow-wrap:anywhere}
@media(min-width:901px){.quick-edit-mode main{padding-left:24px;padding-right:24px}.quick-edit-mode .heading{margin-top:21px;margin-bottom:20px}.quick-edit-mode h1{font-size:27px}.quick-edit-mode .stats{gap:12px;margin-bottom:21px}.quick-edit-mode .stat-card{padding:13px 16px 10px}.quick-edit-mode .stat-top{font-size:11px}.quick-edit-mode .stat-icon{height:24px;width:24px}.quick-edit-mode .stat-icon .icon{height:15px;width:15px}.quick-edit-mode .stat-card>strong,.quick-edit-mode .credit-value>strong{font-size:27px;margin-top:3px}.quick-edit-mode .stat-link{font-size:10px;min-height:30px;padding-top:4px}.quick-edit-mode .credit-check{font-size:10px;min-height:31px;margin-top:1px;padding-top:5px;padding-bottom:5px}.quick-edit-mode .panel-heading{padding:19px 22px}.quick-edit-mode .panel-heading p{font-size:11px}}
@media(max-width:1150px){.sheet-financial-summary{grid-template-columns:1fr 1.6fr 1fr;gap:14px}.sheet-financial-summary .summary-note{display:none}.sheet-tools{gap:8px}.customer-view-bar{padding-right:16px}.customer-view-bar .list-tabs{gap:18px;padding-left:20px}.sheet-local-badge{font-size:9px}.sheet-savebar{flex-wrap:wrap}.sheet-save-actions{margin-left:auto}}
@media(max-width:900px){.customer-view-bar{padding:0 15px;gap:4px}.customer-view-bar .list-tabs{padding:0;gap:20px;flex-basis:100%}.view-switch{width:100%;margin:5px 0 12px}.view-switch button{flex:1;justify-content:center;min-height:40px}.sheet-typebar{padding:13px 15px 0;gap:9px}.type-switch{width:100%;gap:7px}.type-switch button{flex:1;justify-content:center;min-height:40px;padding:7px 9px;font-size:12px}.sheet-local-badge{font-size:10px}.sheet-toolbar{padding:12px 15px;flex-wrap:wrap}.sheet-toolbar .search-wrap{width:100%;flex-basis:100%}.sheet-toolbar .filter-tools{width:100%;justify-content:flex-end}.sheet-toolbar #sort{flex:1;width:auto;font-size:13px}.customer-filters{padding:0 15px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.customer-filters label{font-size:10px;max-width:none}.customer-filters select{font-size:13px;min-height:42px;padding-left:8px}.filter-reset{min-height:42px;margin:0;justify-self:stretch}.expiry-range{padding:0 15px 13px;gap:10px}.expiry-range label{flex:1;min-width:100px}.expiry-range input{font-size:16px}.sheet-financial-summary{padding:14px 15px;grid-template-columns:1fr 1fr;gap:13px}.sheet-financial-summary>div:first-child{grid-column:1}.sheet-financial-summary>div:nth-child(2){grid-column:2;grid-row:1/3}.sheet-financial-summary>div:nth-child(3){grid-column:1}.sheet-financial-summary strong{font-size:21px;gap:5px;line-height:1.3}.sheet-financial-summary strong small{font-size:9px}.sheet-financial-summary .summary-due{font-size:15px;display:block;margin-bottom:5px}.sheet-financial-summary .summary-due b{display:none}.sheet-financial-summary>div>span{font-size:10px}.sheet-tools{padding:12px;gap:10px}.sheet-tools>span{font-size:9px}.sheet-tools kbd{font-size:9px}.sheet-tools>div{width:100%;justify-content:space-between;gap:4px}.sheet-tools .check-label{font-size:10px;max-width:116px}.sheet-tools .button{min-height:42px;font-size:10px;padding:8px 7px;gap:4px}.sheet-tools .button .icon{width:13px;height:13px}.sheet-scroll{max-height:65vh;scroll-padding-left:158px}.customer-sheet .sheet-identity{width:156px;min-width:156px}.customer-sheet td.sheet-identity{padding-left:13px;padding-right:3px}.customer-sheet th.sheet-identity{padding-left:10px}.sheet-row-number{left:0;width:11px;font-size:8px}.customer-sheet th.sheet-identity span{font-size:8px}.sheet-cell input[data-field=name]{font-size:14px}.sheet-login-line{gap:3px;padding-left:4px}.sheet-login-line .mono{font-size:8px}.device-tag{font-size:7px;padding:1px 3px}.test-marker{display:none}.customer-sheet td{height:73px}.customer-sheet th{font-size:10px}.customer-sheet .sheet-expiry{width:130px;min-width:130px}.sheet-cell input,.sheet-cell select,.sheet-cell textarea{font-size:16px;min-height:44px;padding:8px 5px}.sheet-cell select{font-size:13px;padding-right:19px}.customer-sheet{min-width:1150px}.sheet-expiry strong{font-size:12px}.sheet-expiry>span{font-size:10px}.sheet-balance strong{font-size:13px}.customer-sheet .empty{font-size:12px}.sheet-mode .panel-foot{padding:12px;gap:12px;flex-wrap:wrap}.sheet-mode .panel-foot>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;font-size:10px}.sheet-mode .pagination{justify-content:flex-end;width:100%}.page-size-label select{font-size:16px;min-height:40px;width:80px}.page-size-label{font-size:10px;margin-right:auto}.sheet-savebar{bottom:78px;padding:12px;gap:11px;margin-top:12px;border-radius:10px}.sheet-save-state>.icon{width:31px;height:31px;padding:7px}.sheet-save-state strong{font-size:12px}.sheet-save-state span{font-size:9px}.sheet-save-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}.sheet-save-actions .check-label{grid-column:1/-1;font-size:10px}.sheet-save-actions .button{min-height:43px;font-size:12px}.quick-edit-mode .heading h1{font-size:25px}.list-payment{margin-top:6px}.sheet-errors{margin:0 12px 12px;font-size:11px}}
@media print{.sheet-savebar,.sheet-tools,.view-switch,.customer-filters,.sheet-typebar,.sheet-account-action{display:none!important}.sheet-scroll{max-height:none;overflow:visible}.customer-sheet .sheet-identity,.customer-sheet th{position:static}.customer-sheet{min-width:0;font-size:8px}.sheet-cell input,.sheet-cell textarea,.sheet-cell select{font-size:8px}}

.currency-total{white-space:nowrap}.sheet-financial-summary strong.summary-due{gap:4px}
@media(max-width:900px){.currency-total{display:block;line-height:1.6}}

@media(max-width:900px){.sheet-cell input[data-field=name],.sheet-cell select{font-size:16px}.col-payment{width:176px}}
