/* Shared desktop theme for the POS, Repair, and Reports workspaces. */
:root {
  --navy:#16426b; --navy2:#103657; --mint:#0067b8; --mint-dark:#005a9e;
  --bg:#eef1f5; --text:#202a35; --sub:#405264; --muted:#586b7e;
  --line:#b7c4d1; --radius:2px; --shadow:none;
}
html,body { font-family:"Segoe UI",Arial,sans-serif; font-size:13px; }
.workspace-header { padding-block:8px; gap:20px; border-bottom:1px solid #0e304f; }
.workspace-brand { font-size:18px; letter-spacing:0; }
.workspace-brand span { color:#b9ddff; }
.primary-nav { gap:4px; }
.primary-nav button { border-radius:2px; border-color:#6584a1; padding:7px 14px; color:#fff; background:#204d76; font-size:12px; font-weight:650; }
.primary-nav button:hover { background:#2b5a83; color:#fff; }
.primary-nav button.active { background:#fff; color:#16426b; border-color:#fff; }
.workspace-heading { padding-block:11px; gap:10px; background:#e7ebf1; }
.top-title { font-size:18px; letter-spacing:0; }
.top-sub { font-size:11px; }
.workspace-tools { gap:4px; }
.workspace-tools button,.filter-tab { border:1px solid #aebdcb; border-radius:2px; padding:6px 9px; background:#f8fafc; color:#304559; font-weight:600; }
.workspace-tools button:hover,.filter-tab:hover { background:#edf5fd; }
.workspace-tools button[aria-current=page],.filter-tab.selected { background:#dcecfb; border-color:#6294c4; color:#16426b; box-shadow:none; }
.content { padding-top:14px; }
.panel,.search,.quick,.cart-panel { border-radius:2px; box-shadow:none; }
.panel-pad,.chart-panel { padding:14px; }
.panel-head,.cart-header { padding:10px 12px; border-bottom:1px solid #c5d0db; background:#e8edf3; }
.panel-head h3,.cart-header h3,.section-head h2 { color:#263e57; letter-spacing:0; font-size:14px; }
.section-head { margin-bottom:11px; }
.final-bills-picker { margin-bottom:20px; }
.final-bills-picker-row { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:8px; align-items:center; }
.final-bills-picker-row button[type="submit"] { white-space:nowrap; }
@media (max-width:480px) {
 .final-bills-picker-row { grid-template-columns:minmax(0, 1fr); }
 .final-bills-picker-row button[type="submit"] { justify-self:start; }
}
.table th,.table td,.receipt-table th,.receipt-table td { border:1px solid #d1dae3; padding:7px 9px; }
.table th,.receipt-table th { background:#e8edf3; color:#304559; text-transform:none; letter-spacing:0; font-size:11px; }
.table tbody tr:nth-child(even),.receipt-table tbody tr:nth-child(even) { background:#f7f9fb; }
.table tbody tr:hover,.receipt-table tbody tr:hover { background:#edf5fd; }
.cell-title { color:#263e57; }
.cell-sub { color:#586b7e; }
.badge,.stock-image,.product-img,.stat-icon,.customer-avatar,.note,.detail-note,.quote-total-box,.toast { border-radius:2px; }
.note { background:#e5eff9; border-color:#a8bfd6; color:#304559; }
.detail-note { background:#f7f9fb; border:1px solid #d1dae3; }
.quote-total-box { background:#e5f0fb; color:#16426b; }
.btn { border-radius:2px; border-color:#aab8c5; box-shadow:none; padding:7px 12px; min-height:30px; color:#263e57; }
.btn:hover:not(:disabled) { transform:none; background:#edf5fd; }
.btn-primary,.btn-dark { background:#0067b8; border-color:#00579e; color:#fff; }
.btn-primary:hover:not(:disabled),.btn-dark:hover:not(:disabled) { background:#005a9e; }
.btn-soft { background:#e5f0fb; color:#16426b; border-color:#8aabc9; }
.btn-danger { background:#fff0f0; color:#9b2727; border-color:#d7a2a2; }
.btn-danger:hover:not(:disabled) { background:#fbe1e1; }
.btn-sm { min-height:27px; padding:5px 8px; }
.field-input,.field-select,.field-area { border-radius:2px; border:1px solid #a9b8c6; background:#fff; color:#202a35; padding:6px 8px; min-height:32px; }
.field-area { min-height:60px; }
.field-input:focus,.field-select:focus,.field-area:focus,.search:focus-within { border-color:#0067b8; box-shadow:0 0 0 1px #0067b8; }
.field-label { font-size:11px; font-weight:600; color:#3b4d5e; margin-bottom:4px; }
.job-customer-field { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.job-customer-field .btn { white-space:nowrap; min-height:32px; }
.search { border-color:#a9b8c6; min-height:32px; }
.filter-tabs { gap:4px; padding:0; background:transparent; border-radius:0; }
.toolbar { margin-bottom:11px; }
.pos-layout { grid-template-columns:minmax(0,1fr) clamp(230px,32vw,350px); gap:10px; }
@media(max-width:590px) { .pos-layout { grid-template-columns:1fr; } }
.products-grid {
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 210px), 260px));
  gap:8px;
}
.signed-out .primary-nav,.signed-out #workspace-tools{display:none}
.primary-nav button[hidden]{display:none}
.account-panel{max-width:420px;margin:32px auto}
.account-panel .field-input{margin-bottom:14px}
.company-settings-layout{display:grid;grid-template-columns:repeat(2,minmax(0,420px));gap:16px;align-items:start}
.maintenance-layout{display:grid;grid-template-columns:repeat(2,minmax(0,480px));gap:16px;align-items:start}
.maintenance-layout h2,.maintenance-section h2{font-size:17px;margin:0 0 12px}
.maintenance-layout form,.maintenance-section form{display:grid;gap:12px}
.maintenance-section{max-width:976px;margin-top:16px}
.maintenance-section form{max-width:480px}
.maintenance-section button{white-space:normal}
.maintenance-layout p,.maintenance-section p{line-height:1.55}
.restore-review{border-top:1px solid #b7c4d1;margin-top:18px;padding-top:12px;overflow-wrap:anywhere}
.maintenance-layout input[type=file]{max-width:100%;width:100%}
@media(max-width:760px){.maintenance-layout{grid-template-columns:minmax(0,480px)}}
.company-settings-layout h2{font-size:17px;margin:0 0 16px}
#company-settings-form{display:grid;gap:14px}
#company-settings-form textarea{min-height:80px}
.company-preview h3{font-size:13px;margin:0 0 20px}
.company-preview-header{border-bottom:2px solid #16426b;padding-bottom:14px}
.company-preview-header p{white-space:pre-line;overflow-wrap:anywhere}
.company-preview-header h2{overflow-wrap:anywhere}
.bill-company-header{margin-bottom:14px}
.bill-company-header h1{font-size:20px;margin:0 0 6px;overflow-wrap:anywhere}
.bill-company-header p{margin:4px 0;white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:720px){.company-settings-layout{grid-template-columns:minmax(0,420px)}}
.modal-backdrop:has(#pos-payment-form,#staff-password-form){background:#172a3d65;padding:12px}
.modal:has(#pos-payment-form,#staff-password-form){width:min(440px,100%);height:auto;max-height:calc(100dvh - 24px);border:1px solid #526f8b;box-shadow:0 8px 26px #182d4c40}
.modal:has(#pos-payment-form,#staff-password-form) .modal-body{flex:0 1 auto}
#pos-payment-form,#staff-password-form{display:grid;gap:12px}
.session-controls{margin-left:auto;display:flex;align-items:center;gap:10px;color:white;font-size:12px}
.cash-layout{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;align-items:start}
.cash-layout:has(#cash-open-form){grid-template-columns:minmax(0,420px)}
.cash-layout h2,.cash-layout h3{font-size:16px;margin:0 0 12px}
.cash-layout form{display:grid;gap:12px}
.cash-table{margin-top:18px}
.cash-totals{display:grid;gap:8px}
.cash-warning,#login-error{color:#aa271c}
@media(max-width:650px){.session-controls{width:100%;flex-wrap:wrap}.workspace-header{flex-wrap:wrap}}
.product-thumbnail {
  width:32px;
  height:32px;
  object-fit:contain;
  vertical-align:middle;
}
.product-card { min-height:105px; border-radius:2px; border-color:#b7c4d1; padding:10px; }
.product-card:hover:not(:disabled) { transform:none; box-shadow:none; background:#edf5fd; border-color:#6294c4; }
.product-img { width:32px; height:32px; font-size:18px; background:#e8edf3; }
.product-name { min-height:0; margin:7px 0; font-weight:650; }
.cart-footer { background:#e7ebf1; border-color:#c5d0db; padding:10px 12px; }
.cart-body { padding:10px 12px; }
.qty { border-radius:2px; }
.hero { min-height:0; border-radius:2px; border:1px solid #b7c4d1; background:#e5eff9; color:#202a35; margin-bottom:12px; }
.hero-copy { padding:14px; }
.hero h2 { font-size:18px; letter-spacing:0; margin:4px 0; }
.hero p,.eyebrow { color:#405264; }
.hero p { margin-bottom:9px; }
.hero-art,.hero:after { display:none; }
.stats,.small-stats,.quick-actions { gap:9px; margin-bottom:12px; }
.stat,.mini-stat,.quick { padding:10px 12px; }
.stat:hover { transform:none; box-shadow:none; background:#edf5fd; }
.stat-value { margin:8px 0 3px; }
.bar { background:#347daf; border-radius:2px 2px 0 0; }

/* Every dialog uses the same full-window title bar and command strip. */
.modal-backdrop,.modal-backdrop:has(.desktop-bill-workspace) { padding:0; background:#eef1f5; backdrop-filter:none; }
.modal,.modal.wide,.modal:has(.product-batch-layout),.modal:has([data-form="final-bill"]) {
  width:100%; height:100%; max-width:none; max-height:none; border-radius:0; box-shadow:none; background:#eef1f5;
}
.modal-head { flex-shrink:0; padding:8px 15px; min-height:54px; background:#16426b; border-bottom:1px solid #0e304f; color:#fff; }
.modal-title { font-size:16px; letter-spacing:0; font-weight:650; }
.modal-sub { color:#d7e6f3; margin-top:3px; }
.modal-head .btn-icon { background:transparent; color:#fff; border-color:#7898b4; padding:5px; }
.modal-head .btn-icon:hover:not(:disabled) { background:#275783; }
.modal-body { flex:1; min-height:0; overflow:auto; scrollbar-gutter:stable; padding:12px 15px 16px; }
.modal-footer { flex-shrink:0; background:#e7ebf1; border-top:1px solid #aebdcb; padding:9px 15px; }
.modal-body > form:not(.desktop-bill-workspace) { background:#fff; border:1px solid #b7c4d1; padding:12px; }
.modal-backdrop:has([data-form="job"], [data-form="customer"][data-id=""]) { padding:12px; background:#172a3d65; }
.modal:has([data-form="job"], [data-form="customer"][data-id=""]) {
  width:min(760px,100%); height:auto; max-height:calc(100dvh - 24px);
  border:1px solid #526f8b; box-shadow:0 8px 26px #182d4c40;
}
.modal:has([data-form="job"], [data-form="customer"][data-id=""]) .modal-body { flex:0 1 auto; scrollbar-gutter:auto; }
:is([data-form="job"], [data-form="customer"][data-id=""]) .form-grid { gap:12px; }
:is([data-form="job"], [data-form="customer"][data-id=""]) .field-area { min-height:54px; }
.detail-grid { background:#fff; border:1px solid #b7c4d1; padding:12px; }
.detail-label { color:#536476; }
@media(max-width:520px) {
  .workspace-header { gap:6px; }
  .primary-nav button { padding:7px 5px; }
  .modal-body,.modal-head,.modal-footer { padding-inline:10px; }
}

.modal-footer{flex-wrap:wrap}

.modal-backdrop:has([data-action="print-sale"]) {
  padding:12px;
  background:#172a3d65;
}
.modal:has([data-action="print-sale"]) {
  width:min(560px,100%);
  height:auto;
  max-height:calc(100dvh - 24px);
  border:1px solid #526f8b;
  box-shadow:0 8px 26px #182d4c40;
}
.modal:has([data-action="print-sale"]) .modal-body {
  flex:0 1 auto;
  scrollbar-gutter:auto;
}
.modal:has([data-action="print-sale"]) .receipt-table {
  table-layout:fixed;
}
.modal:has([data-action="print-sale"]) .receipt-table th:first-child {
  width:55%;
}
.modal:has([data-action="print-sale"]) .receipt-table th:nth-child(2) {
  width:10%;
}
.modal:has([data-action="print-sale"]) .receipt-table td {
  overflow-wrap:anywhere;
}
.modal:has([data-action="print-sale"]) .receipt-total {
  font-size:18px;
  margin-block:16px;
}

.bill-unit-cost { text-align:right!important; white-space:nowrap; font-variant-numeric:tabular-nums; }

.cart-price-button{appearance:none;border:0;background:none;color:#16426b;text-decoration:underline;text-underline-offset:2px;font:inherit;padding:0;white-space:nowrap}
.cart-price-button:hover{color:#0067b8}.cart-price-button:focus-visible{outline:2px solid #0067b8;outline-offset:2px}
.modal-backdrop:has([data-form="pos-price"]){background:#172a3d65;padding:12px}
.modal:has([data-form="pos-price"]){width:min(420px,100%);height:auto;max-height:calc(100dvh - 24px);border:1px solid #526f8b;box-shadow:0 8px 26px #182d4c40}
.modal:has([data-form="pos-price"]) .modal-body{flex:0 1 auto;scrollbar-gutter:auto}
.pos-price-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pos-price-fields .field-full{grid-column:1/-1}
.pos-price-fields + p{font-size:11px;margin:10px 0 0}

.select-search-wrapper{position:relative;width:100%;min-width:0}
.select-search-wrapper.bill-payment-select{padding:0;min-height:0}
.select-search-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;opacity:0;pointer-events:none}
.select-search-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;width:100%;min-width:0}
.select-search-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.select-search-arrow{flex:none;color:#405264}
.select-search-trigger[aria-invalid=true]{border-color:#b32828}
.select-search-panel{position:fixed;z-index:100;padding:6px;border:1px solid #7191ae;background:#fff;box-shadow:0 4px 12px #152b4433}
.select-search-panel .field-input{margin-bottom:5px;width:100%}
.select-search-options{overflow:auto;overscroll-behavior:contain}
.select-search-option{display:block;width:100%;border:0;background:#fff;color:#263e57;text-align:left;padding:7px 8px;font-size:12px;overflow-wrap:anywhere}
.select-search-option[aria-selected=true]{font-weight:650}
.select-search-option.active,.select-search-option:hover{background:#dcecfb;color:#16426b}
.select-search-empty{padding:9px 8px;color:#586b7e;font-size:12px}

.overview-date-filter{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);padding:10px 12px;margin:0 0 12px}
.overview-date-filter>div{min-width:140px}.overview-period{align-self:center;font-size:12px;margin-left:4px}
.report-grid .bar{width:100%;max-width:36px;align-self:center}
.overview-stats{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}.overview-cost-card{text-align:left;min-width:0}
.overview-cost-card .stat-value,.overview-cost-card .stat-foot{display:block}.overview-cost-card:focus-visible{outline:2px solid #0067b8;outline-offset:2px}

/* Sign-in screen */
body.signed-out{background:#102c4a}
.signed-out .main{min-height:100dvh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 18% 20%,#277eaa55,transparent 52%),radial-gradient(ellipse at 88% 80%,#338bbd30,transparent 48%),linear-gradient(135deg,#0d223b,#163e64)}
.signed-out .workspace-header{background:transparent;border:0;padding:22px 32px;flex:none}
.signed-out .workspace-brand{font-size:22px;letter-spacing:-.5px}
.signed-out:has(.sign-in-panel) .workspace-heading{display:none}
.signed-out .content{flex:1;display:grid;place-items:center;width:100%;max-width:none;margin:0;padding:24px 16px 70px;background-image:linear-gradient(#ffffff04 1px,transparent 1px),linear-gradient(90deg,#ffffff04 1px,transparent 1px);background-size:48px 48px}
.signed-out .sign-in-panel{width:min(360px,100%);max-width:360px;margin:0;padding:28px;border:1px solid #ffffff80;border-radius:14px;background:#fff;box-shadow:0 24px 70px #00000035}
.sign-in-heading{margin-bottom:24px}
.sign-in-icon{display:grid;place-items:center;width:44px;height:44px;margin-bottom:18px;border:1px solid #d8e8f7;border-radius:11px;background:#edf5fc;color:#1768a5}
.sign-in-icon svg{width:23px;height:23px}
.sign-in-heading h2{margin:0 0 6px;font-size:23px;letter-spacing:-.6px;color:#18334f;line-height:1.25}
.sign-in-heading p{margin:0;font-size:12px;line-height:1.6;color:#617387}
.sign-in-panel .field-label{font-size:12px;font-weight:600;color:#304b66;margin-bottom:7px}
.sign-in-panel .field-input{height:42px;border-radius:6px;border-color:#c6d2de;background:#fbfcfe;margin-bottom:17px;font-size:13px;padding:10px 11px}
.sign-in-panel .field-input:focus{border-color:#1979bd;outline:2px solid #1979bd24;outline-offset:1px;background:#fff}
.sign-in-panel .btn-primary{width:100%;min-height:42px;margin-top:4px;border-radius:6px;font-size:13px;background:#126bb0;border-color:#126bb0;color:#fff}
.sign-in-panel .btn-primary:hover:not(:disabled){background:#0b5894;border-color:#0b5894}
.sign-in-panel #login-error{margin:0 0 14px;color:#b42318;font-size:12px;line-height:1.5}
.sign-in-panel #login-error:empty{display:none}
.sign-in-caption{text-align:center;margin:22px 0 0;padding-top:18px;border-top:1px solid #edf1f5;font-size:10px;line-height:1.5;color:#748597}
@media(max-width:420px){.signed-out .workspace-header{padding:18px 20px}.signed-out .content{padding-bottom:40px}.signed-out .sign-in-panel{padding:24px}}
