:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:16px;color:#292d32;background:#fff;color-scheme:light;--line:#e6e8eb;--muted:#7b8088;--blue:#287bd6;--sidebar:#191b1e}*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex}a{color:var(--blue);text-decoration:none}button,input,select,textarea{font:inherit}button,a,summary,input,select{touch-action:manipulation}button{border:1px solid transparent;padding:10px 18px;background:var(--blue);border-radius:9px;color:#fff;cursor:pointer;font-weight:500;white-space:nowrap}button:hover{background:#1868bd}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #82baff;outline-offset:3px}.secondary{background:#fff;color:#42474f;border-color:#dfe1e5}.secondary:hover{background:#f3f5f8}input,select,textarea{width:100%;min-height:43px;padding:10px 12px;background:#fff;border:1px solid #dce0e5;border-radius:8px;color:inherit}input:focus,select:focus,textarea:focus{outline:2px solid #bedcff;border-color:var(--blue)}textarea{min-height:90px;resize:vertical}select{padding-right:32px}label{display:grid;gap:7px;font-size:.875rem;font-weight:500;min-width:0}.check{display:flex;align-items:center;gap:10px;min-height:43px}.check input{width:18px;min-height:18px}.sidebar{width:238px;position:sticky;top:0;height:100vh;background:var(--sidebar);color:#c9ccd1;flex-shrink:0;padding:22px 12px 12px;display:flex;flex-direction:column;overflow:auto}.company{display:flex;align-items:center;gap:11px;color:#fff;font-size:1rem;font-weight:650;padding:0 8px 20px;line-height:1.4}.company-icon{display:grid;place-items:center;width:36px;height:36px;background:#eaf2fc;color:#2c72bd;border-radius:50%;flex-shrink:0;font-size:.875rem}.sidebar nav{display:flex;flex-direction:column;gap:3px;flex:1}.nav-label{font-size:.8125rem;font-weight:600;color:#858a92;margin:23px 10px 10px}.sidebar nav a{display:flex;align-items:center;gap:12px;min-height:43px;padding:10px 12px;border-radius:8px;color:#cbd0d6;font-size:.9375rem}.sidebar nav a:hover{background:#25292f;color:#fff}.sidebar nav a.active{background:#30343b;color:#fff}.nav-icon{font-size:1.3rem;width:23px;text-align:center;line-height:1}.settings-link{margin-top:20px}.profile{display:flex;gap:10px;align-items:center;border-top:1px solid #3a3d42;margin:18px 6px 0;padding:18px 2px 8px}.profile strong{font-size:.875rem;display:block;color:#eee}.profile small{display:block;color:#9199a4;margin-top:3px}.avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#356899;color:white;font-size:.875rem}.logout{display:block;margin:0 6px}.logout-button{color:#959ca6;background:transparent;padding:6px;font-size:.8125rem}.logout-button:hover{background:#30343b;color:white}.workspace{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:76px;min-height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 28px}.topbar h1{font-size:1.375rem;font-weight:650;margin:0;letter-spacing:-.5px}.topbar-context{font-size:.875rem;color:var(--muted);display:flex;gap:24px;align-items:center}.language{font-size:.875rem;color:#343a43;font-weight:600;border-left:1px solid var(--line);padding-left:20px}.content{padding:24px 28px 36px;flex:1;min-width:0}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin:-3px 0 26px;overflow:auto}.tabs a{display:block;padding:13px 14px 15px;color:#5c626b;white-space:nowrap;border-bottom:2px solid transparent;font-size:.9375rem}.tabs a.selected{color:#222a35;border-color:#303b4d;font-weight:600}.tabs a:hover{background:#f7f9fc}.page-intro{margin:4px 0 22px}.page-intro h2{font-size:1.25rem;margin:0 0 8px}.page-intro p,.muted{color:var(--muted);font-size:.875rem;line-height:1.6}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:24px}.card{display:flex;flex-direction:column;gap:15px;border:1px solid var(--line);border-radius:10px;padding:22px;background:#fff;color:inherit;min-width:0}.card span{font-size:.875rem;color:#747c88;line-height:1.4}.card strong{font-size:1.85rem;font-weight:600;letter-spacing:-.5px;overflow-wrap:anywhere}.card small{color:#8692a3;font-size:.8125rem}.card:hover{border-color:#b5c6da}h2{font-size:1.2rem;font-weight:600}h3{font-size:1rem;font-weight:600}.section-title{margin:28px 0 16px}.toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}.toolbar .search{max-width:360px}.toolbar label{min-width:180px}.filter-chip{border:1px solid #dce0e5;background:#fff;border-radius:8px;padding:10px 14px;font-size:.875rem}details{border:1px solid var(--line);border-radius:9px;margin:0 0 18px;background:#fff}summary{padding:15px 18px;cursor:pointer;font-size:.9375rem;font-weight:550;color:#2f6fb5;list-style-position:inside}details[open]>summary{border-bottom:1px solid var(--line)}details>p{padding:0 18px}form.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;padding:20px;align-items:end}form.grid>button{justify-self:start}.form-actions{display:flex;gap:16px;align-items:center}.table{border:1px solid #e0e3e7;border-radius:9px;overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}th{font-size:.875rem;color:#5b616b;background:#f7f8fa;font-weight:550;white-space:nowrap}th,td{padding:15px 17px;border-bottom:1px solid var(--line)}td{font-size:.875rem;line-height:1.5;max-width:400px;overflow-wrap:anywhere}tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafcfe}td details{margin:0;min-width:120px}td details form{padding:12px;display:grid;gap:10px}.table-footer{border-top:1px solid var(--line);padding:12px 18px;font-size:.8125rem;color:#8c929b;background:#fff}.empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;min-height:190px;padding:30px;color:#a1a7b0;text-align:center;font-size:.875rem}.empty strong{color:#656d78;font-weight:500;font-size:1rem}.pagination{display:flex;align-items:center;gap:20px;padding:18px 3px;font-size:.875rem}.pagination span{border:1px solid var(--line);padding:8px 12px;border-radius:7px;color:#67717e}.error{padding:14px 18px;color:#9a312c;background:#fff1ef;border:1px solid #f3ccc7;border-radius:8px;line-height:1.5}.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:22px;margin:20px 0}.info-grid span{display:block;font-size:.8125rem;color:var(--muted);margin-bottom:8px}.info-grid strong{font-size:.9375rem;font-weight:500;overflow-wrap:anywhere}.document-heading{display:flex;align-items:center;justify-content:space-between}.document-heading p{margin:0 0 8px}.document-heading h2{font-size:1.6rem;margin:0}.badge{background:#eaf2fd;color:#316298;border-radius:7px;padding:8px 12px;font-size:.8125rem}.panel{border:1px solid var(--line);padding:20px;border-radius:10px;margin:20px 0}.panel>h2,.panel>h3{margin:0 0 16px}.panel form.grid{padding:0}.document-actions{display:flex;align-items:start;gap:18px;margin:20px 0;flex-wrap:wrap}.inline-form{display:inline-block}.text-button{padding:0;background:transparent;color:#9c6770;font-size:.8125rem}.text-button:hover{background:transparent;color:#a12732}.danger{background:#b44444}.danger:hover{background:#9d3636}.danger-zone{max-width:480px}.danger-zone form{padding:0 18px 18px}.danger-zone summary{color:#9c5151}.settings-layout{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:20px}.settings-layout .panel{margin:0}.settings-layout form{grid-template-columns:1fr}.app-footer{padding:14px 28px;border-top:1px solid var(--line);color:#9ba2ac;font-size:.75rem;display:flex;justify-content:space-between}.login{width:min(440px,calc(100% - 32px));margin:auto;padding:36px;border:1px solid var(--line);border-radius:16px}.login h1{font-size:1.45rem;margin:28px 0}.brand{font-size:1.7rem;font-weight:750;color:#2c649b}.brand span{color:#c82131}.login-form{display:grid;gap:20px}.login-form button{margin-top:5px}@media(max-width:1000px){.sidebar{width:205px}.content{padding:20px}.topbar{padding:0 20px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){body{display:block}.sidebar{position:static;width:100%;height:auto;padding:16px}.company{padding-bottom:8px}.sidebar nav{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.nav-label,.profile,.nav-icon{display:none}.sidebar nav a{font-size:.8125rem;padding:8px;justify-content:center;min-height:38px}.settings-link{margin-top:0}.logout{text-align:right;margin:6px 0 0}.company-icon{width:30px;height:30px}.topbar{height:64px;min-height:64px;padding:0 16px}.topbar-context{display:none}.content{padding:18px 14px}.cards{gap:10px}.card{padding:16px}.card strong{font-size:1.45rem}.card small{font-size:.75rem}form.grid{grid-template-columns:1fr;padding:16px}.settings-layout{grid-template-columns:1fr}.toolbar .search{max-width:none;flex:1;min-width:150px}th,td{padding:12px}.app-footer{padding:12px 14px}.tabs a{padding:12px 10px;font-size:.875rem}.document-heading h2{font-size:1.3rem}}@media print{.sidebar,.topbar,.app-footer,details,.toolbar,.document-actions{display:none}.content{padding:0}.table{border:0}.workspace{display:block}body{display:block}}
.catalog-picker{display:grid;gap:10px;grid-column:1/-1;max-width:700px}.lookup-status{font-size:.8125rem;color:#858d98;min-height:18px}.nav-icon{display:inline-flex;align-items:center;justify-content:center}.catalog-picker select{min-width:0}
/* Navigation drawer follows the same section structure on desktop and phone. */
.menu-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:8px;background:transparent;color:#47515d;border:0;border-radius:7px;flex-shrink:0}.menu-toggle:hover{background:#f0f3f7}.topbar h1{margin-right:auto}.nav-close,.nav-backdrop{display:none}.sidebar{transition:margin-left .18s ease}.sidebar-collapsed .sidebar{margin-left:-238px;overflow:hidden}.nav-backdrop[hidden]{display:none!important}
@media(max-width:1000px) and (min-width:701px){.sidebar-collapsed .sidebar{margin-left:-205px}}
@media(max-width:700px){.sidebar{position:fixed;left:0;top:0;height:100vh;height:100dvh;width:min(290px,84vw);padding:24px 14px 14px;z-index:102;transform:translateX(-101%);transition:transform .2s ease;box-shadow:8px 0 24px #0003;overflow-y:auto;overscroll-behavior:contain}.nav-open .sidebar{transform:translateX(0)}.nav-open{overflow:hidden}.sidebar nav{display:flex;flex-direction:column;gap:3px}.sidebar nav a{display:flex;justify-content:flex-start;font-size:.9375rem;padding:10px 12px;min-height:44px}.sidebar .nav-label{display:block;font-size:.8125rem;margin:23px 10px 10px}.sidebar .nav-icon{display:inline-flex}.sidebar .profile{display:flex}.sidebar .company{padding-right:25px;padding-bottom:16px}.nav-close{display:block;position:absolute;right:8px;top:8px;background:transparent;color:#aab1bd;padding:5px 10px;font-size:1.5rem;line-height:1}.nav-close:hover{background:#30343b}.nav-backdrop{display:block;position:fixed;inset:0;width:100%;height:100%;z-index:101;background:#10172266;backdrop-filter:blur(2px);border:0;border-radius:0;padding:0}.nav-backdrop:hover{background:#10172266}.topbar{gap:10px}.sidebar .logout{text-align:left;margin:6px}.sidebar .settings-link{margin-top:20px}.sidebar .profile small{font-size:.8125rem}.workspace{min-height:100vh;min-height:100dvh}.content{overflow-x:hidden}.table{max-width:100%}.table table{min-width:580px}input,select,textarea{font-size:16px}.tabs{overscroll-behavior-x:contain}.sidebar .company-icon{width:34px;height:34px}.sidebar .profile .avatar{width:32px;height:32px}}@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
.record-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(1050px,89vw);max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid #dee3ea;border-radius:0;box-shadow:-8px 0 32px #16213326;background:#fff;color:inherit}.record-drawer::backdrop{background:#10151c70;backdrop-filter:blur(1px)}.drawer-header{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:12px 22px;position:sticky;top:0;background:#fff;z-index:3}.drawer-header h2{margin:0;font-size:1.2rem;font-weight:550}.drawer-close{padding:3px 12px;font-size:1.8rem;color:#89929d;background:transparent;line-height:1.3}.drawer-close:hover{background:#f4f6f9}.drawer-body{height:calc(100% - 64px);overflow-y:auto;padding:24px;overscroll-behavior:contain}.drawer-body>details[open]{border:0}.drawer-body>details[open]>summary{font-size:1.2rem;color:#293646}.record-title{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}.record-title>div{display:flex;align-items:baseline;gap:10px}.record-title h2{font-size:1.5rem;margin:0}.record-type{font-size:1rem;color:#657183}.record-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:24px}.status-form{display:flex;align-items:end;gap:10px}.status-form label{min-width:190px}.record-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--line);margin-bottom:24px}.record-tabs button{background:transparent;color:#68717d;border-radius:0;border:0;border-bottom:2px solid transparent;padding:13px 11px;font-size:.875rem}.record-tabs button[aria-selected=true]{color:#253041;border-bottom-color:#273647}.record-tabs button:hover{background:#f5f7fa}.record-panel[hidden]{display:none}.record-panel form.grid{padding:0 0 20px}.record-panel details form.grid{padding:20px}.record-panel form.grid textarea{min-height:90px}.record-footer{display:flex;justify-content:space-between;gap:20px;align-items:start;border-top:1px solid #dce7f4;background:#f0f6ff;padding:18px;margin-top:24px;border-radius:8px}.record-footer .document-actions{margin:0}.record-total{display:grid;gap:5px;text-align:right;white-space:nowrap}.record-total span{font-size:.875rem;color:#697586}.record-total strong{font-size:1.5rem}.timeline{display:grid;gap:18px;margin-top:24px}.timeline-entry{padding:16px 0;border-bottom:1px solid var(--line)}.timeline-entry>div{display:flex;gap:14px;justify-content:space-between;align-items:baseline}.timeline-entry strong{font-size:.875rem}.timeline-entry time{font-size:.75rem;color:#8b94a1}.timeline-entry p{white-space:normal;overflow-wrap:anywhere;font-size:.9375rem;line-height:1.6}.comment-form{display:grid;gap:14px}.comment-form button{justify-self:start}@media(max-width:700px){.record-drawer{width:100vw;border:0}.drawer-header{height:58px;padding:10px 14px}.drawer-body{height:calc(100% - 58px);padding:16px 12px}.record-title{align-items:start}.record-title>div{display:block}.record-type{display:block;font-size:.875rem;margin-bottom:6px}.record-title h2{font-size:1.3rem}.record-toolbar{align-items:start;gap:12px}.record-tabs{gap:0}.record-tabs button{padding:12px 8px;font-size:.8125rem}.record-tabs button:nth-child(1),.record-tabs button:nth-child(2){flex:1}.record-footer{flex-wrap:wrap;padding:16px 12px}.record-total{margin-left:auto}.status-form{flex-wrap:wrap}.status-form label{min-width:160px}.timeline-entry>div{display:block}.timeline-entry time{display:block;margin-top:6px}.record-panel .cards{grid-template-columns:1fr}.record-panel>.table table{min-width:620px}.drawer-body .grid{grid-template-columns:1fr}.drawer-body .info-grid{grid-template-columns:1fr 1fr}}
.permission-groups{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.permission-groups fieldset{border:1px solid var(--line);border-radius:9px;padding:12px 16px;min-width:0}.permission-groups legend{font-size:.875rem;font-weight:600;padding:0 6px}.permission-groups .check{font-size:.8125rem;line-height:1.5;margin:8px 0;min-height:30px;align-items:start}.permission-groups .check input{flex-shrink:0;margin-top:1px}.login-form[hidden]{display:none}
.return-form{display:grid;gap:18px}.return-form>.table{width:100%}.return-form button{justify-self:start}.return-form input[type=number]{min-width:110px;max-width:180px}.action-link{display:inline-block;border:1px solid #dce2ea;border-radius:8px;padding:10px 16px;font-size:.875rem;background:white}.action-link:hover{background:#f3f7fc}

/* Appointments share the same drawer and mobile navigation as orders. */
.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0}.booking-calendar{display:grid;grid-template-columns:repeat(7,minmax(145px,1fr));gap:1px;background:#dfe4eb;border:1px solid #dfe4eb;border-radius:10px;overflow:auto}.calendar-day{background:#f8fafc;padding:12px;min-height:280px}.calendar-day h3{font-size:14px;margin:0 0 16px}.booking-card{display:flex;flex-direction:column;gap:7px;padding:12px;margin:0 0 10px;background:white;border:1px solid #e2e8f0;border-left:3px solid #2697dd;border-radius:7px;overflow-wrap:anywhere}.booking-card time,.booking-card small{font-size:11px;color:#63748a}.booking-card strong{font-size:13px}.booking-card span{font-size:12px}.booking-arrived{border-left-color:#e5a600}.booking-completed{border-left-color:#27a46b}.booking-cancelled{border-left-color:#a8afb9;opacity:.65}@media(max-width:760px){.booking-calendar{grid-template-columns:1fr;background:transparent;border:0;gap:12px}.calendar-day{border:1px solid #dfe4eb;border-radius:10px;min-height:0}.calendar-heading{gap:8px;font-size:12px}.calendar-heading strong{text-align:center}}
.repair-board{display:flex;gap:14px;overflow-x:auto;padding:8px 0 20px;align-items:flex-start}.board-column{flex:0 0 265px;background:#edf1f6;border:1px solid #e0e6ee;border-radius:10px;padding:12px;min-height:220px}.board-column h3{font-size:14px;display:flex;justify-content:space-between;gap:8px;margin:0 0 16px}.board-column h3 span{color:#718096}.board-card{display:flex;flex-direction:column;gap:8px;border:1px solid #dce4ed;border-radius:8px;background:white;padding:14px;margin-bottom:10px;overflow-wrap:anywhere}.board-card[draggable=true]{cursor:grab}.board-card p{margin:0;font-size:13px}.board-card small{color:#6f7f93}.board-card.dragging{opacity:.5}.board-column.drop-target{outline:2px solid #298fd0}.board-notice{background:#fff3d1;border:1px solid #dcae45;padding:12px;border-radius:8px;margin:10px 0}.custom-field-value{padding:8px 0}.custom-field-value span{font-size:12px;color:#6f7f93}.custom-field-value p{margin:5px 0;white-space:pre-wrap}@media(max-width:600px){.board-column{flex-basis:85vw}.filter-panel .grid{grid-template-columns:1fr}}
.product-photos{display:flex;gap:12px;overflow:auto;padding:8px 0 20px}.product-photos img{width:150px;height:150px;object-fit:contain;border:1px solid #e1e6ed;border-radius:8px;background:white}.line-editor{min-width:160px;margin-bottom:8px}.line-editor[open]{min-width:245px}.line-editor .grid{grid-template-columns:1fr}
.category-tree{list-style:none;margin:6px 0;padding-left:16px}.category-tree a{display:inline-block;padding:5px 10px;border-radius:6px}.category-tree a.selected{background:#e5f2ff;color:#1678b6;font-weight:600}.catalog-category-panel{margin-bottom:12px}
.amount-negative{color:#c63e45}.amount-positive{color:#19834a}

.line-meta{display:block;margin-top:4px;color:#64748b;font-size:12px}.line-comment{white-space:normal;max-width:32rem;margin:6px 0}

.sku-preview:empty{display:none}.sku-preview{min-width:0;overflow-wrap:anywhere}.sku-preview img{display:block;max-width:100%;width:96px;height:80px;object-fit:contain}

/* Shared action treatment for work orders and appointments. */
.record-toolbar button:not(.text-button),
.record-footer button:not(.text-button),
.form-actions button:not(.text-button),
.repair-accept-button {
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 18px;
}

.repair-accept-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.repair-accept-form > label:not(.check) {
  flex: 1 1 220px;
  min-width: 0;
}
.repair-accept-button {
  background: #087744;
  color: #fff;
  font-weight: 600;
}
.repair-accept-button:hover { background: #065e36; }
.repair-accept-button:focus-visible {
  outline: 3px solid #087744;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .repair-accept-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .repair-accept-form > label:not(.check) { flex-basis: auto; }
  .repair-accept-button { width: 100%; min-height: 48px; }
  .record-toolbar button:not(.text-button),
  .record-footer button:not(.text-button),
  .form-actions button:not(.text-button) { min-height: 44px; }
}

/* Intake uses the STARTER+ palette and a consistent action hierarchy. */
.repair-intake {
  --intake-blue: #175eaa;
  --intake-blue-hover: #124e8d;
  --intake-pale: #edf6ff;
  border: 1px solid #c7dcf0;
  border-radius: 14px;
  background: #fff;
}
.repair-intake > summary {
  color: var(--intake-blue);
  font-weight: 650;
  padding: 12px 16px;
}
.repair-intake[open] > summary {
  background: var(--intake-pale);
  border-radius: 13px 13px 0 0;
}
.repair-intake-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.repair-intake-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #c7dcf0;
  padding-top: 14px;
}
.repair-intake-actions > button {
  background: var(--intake-blue);
  color: #fff;
}
.repair-intake-actions > button:hover { background: var(--intake-blue-hover); }
.repair-intake-actions > .secondary {
  background: var(--intake-pale);
  color: var(--intake-blue);
}
.repair-intake-actions > .secondary:hover { background: #daedff; }
.repair-intake-actions > button:focus-visible {
  outline: 3px solid var(--intake-blue);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .repair-intake-fields { grid-template-columns: 1fr; }
  .repair-intake-actions { flex-direction: column; align-items: stretch; }
  .repair-intake-actions > button { width: 100%; min-height: 44px; }
}

.brand-name { color: #2c649b; }
.brand-name i { color: #c82131; font-style: normal; }

.repair-intake > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px;
  min-height: 44px;
  color: #fff;
  background: #087744;
  border-radius: 999px;
  cursor: pointer;
}
.repair-intake > summary::-webkit-details-marker { display: none; }
.repair-intake[open] > summary { background: #087744; border-radius: 999px; }
.repair-intake > summary:hover { background: #065e36; }
.repair-intake > summary:focus-visible { outline: 3px solid #087744; outline-offset: 2px; }
.repair-intake > summary > span, .repair-accept-button > span { font-size: 1.16em; }

.document-contact-card { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; border: 1px solid #d9e0e8; border-radius: 12px; }
.document-contact-card::backdrop { background: #14223380; }
.document-contact-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.document-contact-card .grid { padding-inline: 0; }
.document-contact-card .form-actions { grid-column: 1 / -1; }

.required-note { grid-column: 1 / -1; margin: 0; color: #475569; font-size: .85rem; }
.repair-suggest-options { display: grid; gap: 4px; max-height: 11rem; overflow-y: auto; margin-top: 4px; }
.repair-suggest-options[hidden], .repair-suggest-options button[hidden] { display: none; }
.repair-suggest-options button { min-height: 40px; text-align: left; white-space: normal; }

.catalog-suggestions { display: grid; gap: 4px; max-height: 12rem; overflow: auto; }
.catalog-suggestions:empty { display: none; }
.catalog-suggestions button { min-height: 42px; text-align: left; white-space: normal; }
.field-help { margin: 0; color: #475569; }
.field-help summary { cursor: pointer; }


.line-search .catalog-suggestions,
.repair-suggest-options:not(:empty) {
  margin-block: 4px 12px;
  padding: 8px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f5f8fd;
}
.line-search .catalog-suggestions strong { padding: 4px 8px; }
.line-search-status:empty { display: none; }
.line-search [hidden], .repair-suggest [hidden] { display: none !important; }

.line-search .catalog-suggestions button:focus-visible,
.repair-suggest-options button:focus-visible {
  outline: 2px solid #2968b8;
  outline-offset: -2px;
}

.repair-intake-drawer { margin: 0 0 0 auto; width: min(100%, 760px); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: white; color: inherit; }
.repair-intake-drawer[open] { display: flex; flex-direction: column; }
.repair-intake-drawer::backdrop { background: rgb(18 35 57 / 42%); }
.repair-intake-drawer > header, .repair-intake-drawer > nav { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #dce7f2; }
.repair-intake-drawer > header { justify-content: space-between; }
.repair-intake-drawer > header h2 { margin: 0; }
.repair-intake-drawer > nav { flex-wrap: wrap; }
.repair-intake-drawer > nav button[aria-pressed="true"] { background: #dcecff; color: #154c85; }
.repair-intake-drawer > form { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 0; }
.repair-intake-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.repair-intake-panel[hidden] { display: none; }
.repair-intake-drawer .repair-intake-actions { flex-shrink: 0; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #dce7f2; background: white; }

.sidebar .nav-group { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.sidebar .nav-group > .nav-label {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #b2b7be;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  text-transform: none;
}
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}
.sidebar .nav-group[open] > summary::after { transform: rotate(45deg); }
.sidebar .nav-group > summary:hover { background: #292d32; }
.document-intake-button {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #099b49;
  font-size: 14px;
  font-weight: 500;
}
.document-intake-button:hover { background: #087744; }
.catalog-suggestions[hidden] { display: none; }
.line-search .catalog-suggestions,
[data-intake-client-results] {
  max-height: 16rem;
  gap: 0;
  padding: 4px;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(26 36 52 / 12%);
}
.line-search .catalog-suggestions button, [data-intake-client-results] button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  color: #282e33;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
}
.line-search .catalog-suggestions button:hover, [data-intake-client-results] button:hover { background: #eef4fc; }
@media (max-width: 700px) {
  .document-intake-button, .line-search .catalog-suggestions button, [data-intake-client-results] button { min-height: 44px; }
}

.repair-quick-filters { overflow: visible; }
.repair-period { position: relative; margin: 0; border-radius: 8px; }
.repair-period > summary { padding: 8px 12px; font-size: 14px; cursor: pointer; }
.repair-period-options {
  position: absolute;
  inset: calc(100% + 4px) auto auto 0;
  z-index: 5;
  display: grid;
  min-width: 180px;
  padding: 4px;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 10px rgb(40 46 51 / 16%);
}
.repair-period-options a {
  padding: 8px 10px;
  border-radius: 5px;
  color: #282e33;
  text-decoration: none;
}
.repair-period-options a:is(:hover, :focus-visible) { background: #eef4fc; }

.repair-period-options { max-height: min(55vh, 374px); overflow: auto; }
.status-options { width: min(300px, calc(100vw - 40px)); gap: 8px; padding: 10px; }
.status-options .status-option-list { overflow: auto; min-height: 0; }
.status-options [hidden] { display: none; }
.status-options .form-actions { margin: 0; flex-wrap: wrap; }
@media (max-width: 700px) {
  .repair-quick-filters { position: relative; }
  .repair-quick-filters .repair-period { position: static; }
  .repair-period-options { inset: 100% auto auto 0; }
}

.repair-intake-drawer > nav[hidden] { display: none; }
.sidebar .profile-menu { margin: 0; background: transparent; border: 0; }
.sidebar .profile-menu > summary { padding: 0; list-style: none; cursor: pointer; }
.sidebar .profile-menu > summary::-webkit-details-marker { display: none; }
.sidebar .profile-menu .logout { margin-top: 6px; }

@media screen {
  .topbar { height: 52px; min-height: 52px; padding-inline: 16px; }
  .topbar h1 { font-size: 20px; font-weight: 500; letter-spacing: 0; }
  .topbar .menu-toggle { width: 32px; height: 32px; padding: 5px; }
  .content { padding-inline: 16px; }
  .sidebar nav a { min-height: 40px; padding: 6px 10px; gap: 8px; font-size: 14px; }
  .sidebar nav a[aria-current="page"] { background: #343940; color: #fff; }
  .content .table { border-radius: 8px; }
  .content .table th { font-weight: 500; color: #333; background: #f7f8fa; }
  .content .table :is(th, td) { padding: 9px 12px; }
  .content .table tbody tr:hover { background: #f5f8fc; }
  .content .table-footer { padding: 8px 12px; }
  .repair-table-wrap .table { max-height: 68vh; }
  .repair-table-wrap .table th { position: sticky; top: 0; z-index: 1; }
  .repair-table-wrap .table :is(th, td):nth-child(-n+4) { white-space: nowrap; }
  .repair-table-wrap .table td { font-variant-numeric: tabular-nums; }
}
.repair-header-controls { display: flex; align-items: center; gap: 12px; }
.repair-topbar h1 { margin-right: 0; }
.repair-topbar .repair-header-controls { flex: 1; justify-content: space-between; }
.repair-view-switch { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: #f3f5f7; }
.repair-view-switch a { padding: 5px 8px; border-radius: 6px; color: #404851; font-size: 14px; text-decoration: none; }
.repair-view-switch a[aria-current="page"] { color: #171c21; background: #fff; box-shadow: 0 1px 3px #0002; }
.repair-header-search input { min-height: 32px; padding: 4px 9px; width: min(180px, 18vw); }
.document-intake-toolbar { overflow: visible; }
.document-intake-toolbar .repair-table-actions { margin-left: auto; }
.repair-table-actions .repair-period-options { inset-inline: auto 0; }
@media (max-width: 700px) {
  .repair-topbar { height: auto; min-height: 52px; flex-wrap: wrap; padding-block: 8px; }
  .repair-topbar .repair-header-controls { flex: 0 0 100%; }
  .repair-header-search input { width: min(44vw, 180px); }
  .sidebar nav { display: flex; }
  .sidebar nav a { justify-content: flex-start; min-height: 44px; }
}

#order-criteria[hidden], .repair-table-wrap [hidden], [data-toggle-order-filters][hidden] { display: none; }
.document-intake-toolbar, .order-display-controls, [data-order-presets] { overflow: visible; flex-wrap: wrap; }
.document-intake-toolbar > :is(button, a), .order-display-controls > :is(button, a),
[data-order-presets] > button { min-height: 34px; padding-block: 5px; }
.order-columns { margin-left: auto; order: 2; }
.order-columns .repair-period-options { inset-inline: auto 0; min-width: 195px; }
.order-columns .check { padding: 5px; white-space: nowrap; }
@media (max-width: 700px) {
  .order-columns .repair-period-options { max-width: calc(100vw - 34px); }
}
/* Load after app.css. Only the repair intake dialog is affected. */
.repair-intake-drawer > form.grid.repair-intake-fields.document-create-fields {
  align-items: stretch;
  min-inline-size: 0;
  min-block-size: 0;
}
.repair-intake-drawer > form > .repair-intake-body {
  align-self: stretch;
  flex: 1 1 auto;
  min-inline-size: 0;
  min-block-size: 0;
  overflow-y: auto;
}
.repair-intake-drawer > form > .repair-intake-actions {
  align-self: stretch;
  flex: 0 0 auto;
}
.repair-intake-drawer .repair-intake-panel:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  min-inline-size: 0;
  gap: 12px 16px;
}
.repair-intake-drawer .repair-intake-panel > :is(h3, p, fieldset, textarea, .wide) {
  grid-column: 1 / -1;
}
.repair-intake-drawer .repair-intake-panel :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* Catalog editor and compact order and report controls. */
.service-editor:not([open]) { display: none; }
.service-add { background: var(--blue, #326eb8); color: white; }
.service-drawer { width: min(760px, 52vw); }
.service-drawer .drawer-body { display: flex; flex-direction: column; overflow: hidden; }
.service-drawer .service-editor { display: flex; flex: 1; min-height: 0; flex-direction: column; margin: 0; }
.service-drawer .service-editor > summary { display: none; }
.service-drawer .service-editor-form { flex: 1; overflow-y: auto; min-height: 0; padding: 0; grid-template-columns: minmax(0, 1fr); align-content: start; }
.service-drawer .service-editor-form > * { min-width: 0; }
.service-drawer .service-editor-form > .form-actions { position: sticky; bottom: 0; background: white; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.order-columns summary { min-height: 34px; display: flex; align-items: center; }
.repair-quick-filters { gap: 8px; }
.repair-quick-filters > a, .repair-quick-filters > details > summary { min-height: 36px; }
.order-extra-filters > form { min-width: min(340px, calc(100vw - 36px)); }
[data-order-save]:not(:empty) { margin: 8px 0; }
.report-sections { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.report-sections > * { flex: none; }
.report-sections > a, .report-sections summary { white-space: nowrap; }
.report-group > .repair-period-options { position: fixed; inset: auto; max-width: calc(100vw - 16px); }
.report-sections .selected { color: #154c85; background: #dcecff; }
@media(max-width:700px) { .service-drawer { width: 100%; } }

.repair-quick-filters summary svg { vertical-align: middle; margin-inline-end: 6px; }
.repair-quick-filters a[aria-current="true"] { background: #dcecff; color: #154c85; }

/* Shared navigation for workshop directories and document lists. */
.content .tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  margin-block: 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f7fb;
}
.content .tabs > a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
}
.content .tabs > a.selected {
  background: white;
  border-color: #cedef3;
  color: #154c85;
}
.content .tabs > a:focus-visible {
  outline: 2px solid #236dc1;
  outline-offset: -2px;
}

/* Keep the same document tab order on small screens. */
.record-tabs {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scroll-padding-inline: 8px;
}
.record-tabs button,
.record-tabs button:nth-child(1),
.record-tabs button:nth-child(2) {
  flex: 0 0 auto;
  white-space: nowrap;
}
.record-tabs button:focus-visible {
  outline: 2px solid #236dc1;
  outline-offset: -3px;
}
