:root {
  color-scheme: light;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d1d1f;
  background: #f2f2f5;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #63636b;
  --line: #e7e7ec;
  --shadow: 0 1px 2px #1d1d1f05, 0 12px 36px #1d1d1f06;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 212px minmax(0, 1fr); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
small { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
button, input, select, textarea { font: inherit; }
button, .document-link { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { min-height: 42px; }
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  padding: 8px 13px;
  transition: background-color .16s ease;
}
button:hover { background-color: #f1f1f4; }
button:active:not(:disabled), .secondary-link[href]:active { background-color: #e8e8ed; }
button:disabled { cursor: wait; opacity: .6; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid #54545e; outline-offset: 2px; }
:where(h1, h2)[tabindex="-1"]:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}
.primary { border-color: var(--ink); background: var(--ink); color: #fff; padding-inline: 18px; white-space: nowrap; }
.primary:hover { background-color: #39393c; }
.primary:active:not(:disabled) { background-color: #4d4d55; }
input, select, textarea { width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid #8a8a93; border-radius: 9px; background: #f8f8fa; color: var(--ink); }
input::placeholder { color: #686870; }
select { appearance: none; padding-right: 33px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235e5e66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

aside {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  border-right: 1px solid #dedee5;
  background: #fbfbfdd9;
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
}
.brand { width: 150px; height: 48px; position: relative; margin-left: 8px; overflow: hidden; flex: none; }
.brand-logo { position: absolute; top: 50%; left: 50%; width: 174px; height: auto; transform: translate(-50%, -50%); mix-blend-mode: multiply; }
.nav-caption { margin: 22px 11px 7px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; }
nav { display: grid; gap: 4px; }
nav button { display: flex; gap: 10px; align-items: center; border-color: transparent; background: transparent; padding-inline: 11px; text-align: left; color: #4d4d54; }
nav button.active { background: #e4e4e9; color: var(--ink); }
.nav-icon { width: 18px; height: 18px; flex: none; }
.account { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 24px 8px 0; font-size: .9rem; font-weight: 700; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e8e8ed; }

main { min-width: 0; }
.content { max-width: 1536px; margin: auto; padding: clamp(17px, 3vw, 36px); }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.intro p, .panel-head p, .storage { color: var(--muted); margin-top: 8px; }
.panel-head p, .storage { font-size: .875rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.card, .panel { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.card { display: block; padding: 12px 14px; text-align: left; }
.card strong { display: block; margin: 5px 0 1px; font-size: clamp(1.3rem, 3vw, 1.9rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.stat-icon, .part-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: #f0f0f3; color: #3b3b42; }
.card:nth-child(2) .stat-icon { background: #fff1d9; color: #785000; }
.panel { overflow: hidden; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 15px; }
.toolbar { display: grid; grid-template-columns: minmax(190px, 1.65fr) repeat(4, minmax(125px, 1fr)); gap: 8px; padding: 9px 15px; border-block: 1px solid var(--line); background: #fbfbfc; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .875rem; }
th, td { padding: 8px 11px; border-bottom: 1px solid var(--line); }
th { color: #505058; background: #f8f8fa; font-weight: 650; }
th:first-child, td:first-child { padding-left: 15px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfbfc; }
td button { min-height: 36px; }
.part { display: flex; gap: 10px; align-items: center; }
.part-photo { display: block; width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; flex: none; }
.pill { display: inline-block; padding: 4px 9px; border-radius: 99px; background: #ededf0; color: #393940; font-size: .8rem; font-weight: 700; }
.good { background: #e6f5ec; color: #17633f; }
.low { background: #fff0d7; color: #785000; }
.out { background: #ffe9ed; color: #9a2340; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

dialog { width: min(600px, calc(100% - 24px)); max-height: 90dvh; padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: #fdfdfe; color: var(--ink); box-shadow: 0 20px 85px #11111c38; }
dialog::backdrop { background: #16162365; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog-head, .actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-head { margin-bottom: 15px; }
.dialog-head button { min-width: 42px; border-radius: 50%; font-size: 1.25rem; padding: 0; }
.actions { justify-content: flex-end; margin-top: 15px; }
#fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
label { display: grid; gap: 5px; font-size: .875rem; font-weight: 650; }
#error { color: #9a2340; margin-top: 8px; }
.photo-field { grid-column: 1 / -1; display: grid; gap: 8px; }
.photo-field .part-photo { width: 76px; height: 76px; }
.photo-remove { display: flex; align-items: center; gap: 7px; width: max-content; }
.photo-remove input { width: auto; min-height: auto; }

@media (max-width: 1180px) {
  .toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { display: block; }
  aside { position: relative; height: auto; padding: 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-left: 0; }
  .account, .nav-caption { display: none; }
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  nav button { justify-content: center; gap: 5px; padding-inline: 4px; font-size: .8rem; text-align: center; }
  .nav-icon { width: 15px; height: 15px; }
  .content { padding: 15px 12px; }
  .intro { flex-wrap: wrap; }
  .stats { gap: 9px; }
  .card { padding: 12px; }
  .panel-head, .toolbar { padding-inline: 13px; }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog table, .catalog tbody, .catalog tr, .catalog td { display: block; }
  .catalog table { white-space: normal; }
  .catalog thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .catalog tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
  .catalog tbody tr:last-child { border-bottom: 0; }
  .catalog td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .catalog td:first-child, .catalog td:nth-child(3), .catalog td:last-child { grid-column: 1 / -1; }
  .catalog td:not(:first-child):not(:last-child) .cell-label { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
  .catalog td:last-child { display: block; }
}
@media (max-width: 480px) {
  #fields { grid-template-columns: minmax(0, 1fr); }
  input, select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
@media (min-width: 761px) {
  .catalog td:nth-child(3) { min-width: 145px; white-space: normal; }
  .catalog td:last-child { min-width: 138px; }
}

.sale-panel form { padding: 0 20px 20px; }
.sale-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.sale-fields textarea { resize: vertical; }
#sale-lines { display: grid; gap: 8px; margin: 10px 0; }
.sale-line { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(130px, 3fr) minmax(80px, 1fr) minmax(105px, 1fr) auto; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.sale-line button { font-size: 1.2rem; }
.sale-total { margin-top: 14px; text-align: right; }
.sale-total output { margin-left: 10px; font-size: 1.25rem; font-weight: 750; }
#sale-error { color: #9a2340; }
#print-document { display: none; }

@media (max-width: 950px) {
  .sale-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-line button { justify-self: start; }
}
@media (max-width: 480px) {
  .sale-fields { grid-template-columns: minmax(0, 1fr); }
  .sale-panel form { padding-inline: 13px; }
  .sale-panel .actions { flex-wrap: wrap; }
}
.sale-signature { display: flex; align-items: center; gap: 8px; }
.sale-signature input { width: auto; min-height: 0; }
.sale-payment { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-top: 14px; }
.sale-payment .sale-total { margin: 0; }
.sale-preview { overflow: auto; }
.sale-preview > .panel-head { position: sticky; left: 0; border-bottom: 1px solid var(--line); }
.invoice-paper { max-width: 900px; margin: auto; padding: 22px; background: white; color: #161616; font-size: .875rem; }
.invoice-heading { text-align: center; margin-bottom: 12px; }
.invoice-logo { position: relative; overflow: hidden; width: 205px; height: 63px; margin: 0 auto 5px; }
.invoice-logo img { position: absolute; top: 50%; left: 50%; width: 244px; transform: translate(-50%,-50%); }
.invoice-company p { white-space: pre-wrap; overflow-wrap: anywhere; }
.invoice-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; text-align: left; }
.invoice-meta h1 { font-size: 1.55rem; }
.invoice-meta p { overflow-wrap: anywhere; }
.invoice-details, .job-totals { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; border: 1px solid #252525; }
.invoice-details dt, .invoice-details dd, .job-totals dt, .job-totals dd { margin: 0; padding: 4px 7px; border-bottom: 1px solid #252525; }
.invoice-details dt, .job-totals dt { border-right: 1px solid #252525; font-weight: 680; }
.invoice-details dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.invoice-details :nth-last-child(-n+2), .job-totals :nth-last-child(-n+2) { border-bottom: 0; }
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; margin-top: 14px; }
.job-table { border-collapse: collapse; table-layout: auto; white-space: normal; font-size: inherit; margin-bottom: 8px; }
.job-table th, .job-table td, .job-table th:first-child, .job-table td:first-child { padding: 5px 6px; border: 1px solid #252525; vertical-align: top; overflow-wrap: anywhere; }
.job-table tbody tr:last-child td { border-bottom: 1px solid #252525; }
.job-table th { background: #ededee; color: #161616; }
.job-table td:first-child, .job-table th:first-child { width: 1%; white-space: nowrap; }
.job-table td:nth-child(3), .job-table th:nth-child(3) { width: 1%; white-space: nowrap; text-align: right; }
.job-subtotal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 7px; border: 1px solid #252525; }
.job-subtotal strong { white-space: nowrap; }
.invoice-footer { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: 18px; }
.prepared { min-width: 180px; display: grid; justify-items: start; }
.prepared img { width: auto; height: 51px; object-fit: contain; filter: grayscale(1) brightness(.62); }
.prepared strong { display: block; min-height: 1.4em; min-width: 160px; border-bottom: 1px solid; }
.job-totals dd { text-align: right; white-space: nowrap; }
.job-totals :nth-last-child(-n+2) { font-weight: 750; }
.warranty-note { margin-top: 15px; padding-top: 7px; border-top: 1px solid #252525; white-space: pre-wrap; overflow-wrap: anywhere; }

@media screen and (max-width: 540px) {
  .invoice-paper { padding: 13px; }
  .job-grid { grid-template-columns: 1fr; }
  .invoice-footer { align-items: start; flex-direction: column-reverse; }
}
@page { size: A4; margin: 13mm; }
@media print {
  :root { background: #fff; }
  body { display: block; min-height: auto; color: #161616; }
  body:has(#print-document:not([hidden])) > :not(#print-document) { display: none !important; }
  #print-document:not([hidden]) { display: block; }
  .invoice-paper { margin: 0; max-width: none; padding: 0; font-size: 9.5pt; }
  .invoice-heading, .invoice-details, .invoice-footer, .job-subtotal, .warranty-note, .job-table tr { break-inside: avoid; }
  .job-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.document-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#sale-pdf-status:empty, #sale-docx-status:empty { display: none; }
#sale-pdf-status, #sale-docx-status { flex-basis: 100%; margin: 0; }
.invoice-paper { max-width: 760px; padding: 16px; }
.invoice-logo { height: 47px; width: 164px; margin-bottom: 3px; }
.invoice-logo img { width: 187px; }
.invoice-heading { margin-bottom: 8px; }
.invoice-meta { margin-top: 7px; }
.invoice-meta h1 { font-size: 1.25rem; }
.job-grid { margin-top: 9px; }
.job-table th, .job-table td, .job-table th:first-child, .job-table td:first-child { padding-block: 3px; }
.invoice-footer { margin-top: 11px; }
.prepared img { height: 54px; }
.warranty-note { margin-top: 10px; }
@media print {
  .invoice-paper { max-width: none; padding: 0; }
}

.document-link { display: inline-flex; align-items: center; min-height: 42px; border: 1px solid var(--ink); border-radius: 11px; font-size: .875rem; font-weight: 650; text-decoration: none; }
.document-link[aria-disabled="true"] { opacity: .5; }

.sourcing-fields { display: grid; gap: 12px; }
.sourcing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.secondary-link { padding: 8px 13px; border-color: var(--line); color: var(--ink); background: white; }
.secondary-link[href]:hover { background: #f1f1f4; }
.supplier-notes { display: block; min-width: 8rem; max-width: 20rem; white-space: pre-wrap; overflow-wrap: anywhere; }

#sourcing { width: min(700px, calc(100% - 24px)); }
.sourcing-connection { margin-top: 14px; }
.sourcing-connection summary { cursor: pointer; font-weight: 650; font-size: .875rem; }
.sourcing-connection label, .sourcing-connection p { margin-top: 9px; }
.sourcing-connection p, .sourcing-status, .sourcing-result p { color: var(--muted); font-size: .875rem; }
.sourcing-status { margin-top: 10px; }
.sourcing-results { display: grid; gap: 8px; }
.sourcing-result { border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow-wrap: anywhere; }
.sourcing-result p { margin: 6px 0 8px; }
.sourcing-result a { color: inherit; font-weight: 700; }

.skip-link { position: fixed; z-index: 10; left: 12px; top: 12px; transform: translateY(-175%); padding: 10px 14px; border-radius: 8px; background: #1d1d1f; color: white; }
.skip-link:focus { transform: none; }
.cell-label { display: none; }
.table-scroll:focus-visible { outline-offset: -3px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 42px; padding: 2px 15px; color: var(--muted); font-size: .875rem; }
.catalog-status button { min-height: 34px; border-color: transparent; padding-block: 4px; }
.catalog-status button:disabled { color: var(--muted); cursor: default; opacity: 1; }
.catalog-status button:disabled:hover { background: var(--surface); }
.toolbar label { min-width: 0; }
@media (max-width: 760px) {
  nav button, .row-actions button, .catalog-status button, .document-actions button, .document-actions .document-link { min-height: 44px; }
  nav button { overflow-wrap: anywhere; }
  .catalog-status { padding-inline: 12px; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  nav button.active { border-color: Highlight; }
}

.toolbar input, .toolbar select { font-weight: 500; }
@media (min-width: 1100px) {
  .catalog td:last-child { min-width: 216px; }
  .catalog .row-actions button { padding-inline: 8px; }
}

.sales-lookup { padding: 0 15px 10px; }
.sales-lookup label { max-width: 420px; }
#sale-count:not(:empty) { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.document-reference { font-family: ui-monospace, monospace; font-size: .75rem; }
.invoice-reference { margin: 5px 0 0; text-align: left; font-size: .8em; overflow-wrap: anywhere; }

.desktop-nav { display: grid; gap: 4px; }
.mobile-nav { display: none; }
.workspace-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.workspace-actions [hidden] { display: none; }
@media screen and (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  aside { padding-top: max(9px, env(safe-area-inset-top)); overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .desktop-nav { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    background: #fafaf7f7;
    border-top: 1px solid var(--line);
    box-shadow: 0 -5px 22px #1d1d1f0a;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .mobile-nav > button, .workspace-more > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 1px;
    border: 0;
    border-radius: 12px;
    color: #404049;
    font-size: .75rem;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
  }
  .mobile-nav > button .nav-icon, .workspace-more > summary .nav-icon { width: 19px; height: 19px; }
  .workspace-more > summary::-webkit-details-marker { display: none; }
  .workspace-more > summary:hover, .workspace-more[open] > summary, .workspace-more.active > summary { background: #e4e4e9; color: var(--ink); }
  .workspace-more-panel {
    position: absolute;
    bottom: calc(60px + env(safe-area-inset-bottom));
    right: max(8px, env(safe-area-inset-right));
    width: min(240px, calc(100vw - 16px));
    display: grid;
    gap: 3px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 36px #16161c26;
  }
  .workspace-more-panel button { justify-content: flex-start; gap: 8px; padding-inline: 10px; text-align: left; font-size: .875rem; }
  .workspace-actions { flex: 0 1 auto; }
  .workspace-actions button { min-height: 44px; padding-inline: 10px; }
}
@media print {
  .desktop-nav, .mobile-nav { display: none; }
}

.support-panel > p { margin: 0 15px 12px; color: var(--muted); font-size: .875rem; }
.vehicle-record { border-top: 1px solid var(--line); }
.vehicle-record > summary { cursor: pointer; padding: 12px 15px; min-height: 44px; overflow-wrap: anywhere; }
.vehicle-record > summary span { display: inline-block; margin-left: 8px; color: var(--muted); font-size: .875rem; }
.vehicle-detail { padding: 0 15px 12px; }
.vehicle-detail > p { margin: 8px 0; }
.vehicle-detail > button { margin-bottom: 8px; }
.sale-line { min-inline-size: 0; margin: 0; grid-template-columns: minmax(90px,1fr) minmax(125px,1.65fr) minmax(145px,2fr) minmax(80px,.8fr) minmax(105px,1fr) auto; }
.sale-line[disabled] { background: #f8f8fa; }
@media (max-width: 1040px) {
  .sale-line { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sale-line > button { justify-self: start; }
}

.customer-panel #contact-title { margin-top: 8px; }
.customer-panel #contact-count { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.contact-info { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 8px; margin: 0; padding: 0 15px; }
.contact-info:empty { display: none; }
.contact-info div { background: #f6f6f8; border-radius: 10px; padding: 9px 11px; }
.contact-info dt { color: var(--muted); font-size: .8rem; }
.contact-info dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.inquiry-list { list-style: none; margin: 0; padding: 0 15px 14px; display: grid; gap: 8px; }
.inquiry-entry { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.inquiry-entry-head, .inquiry-entry-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; }
.inquiry-entry-head h3 { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.inquiry-entry-head p, .inquiry-entry-foot span { color: var(--muted); font-size: .82rem; }
.inquiry-entry-foot { justify-content: flex-end; margin-top: 6px; }
.inquiry-entry-foot span { margin-right: auto; }
.inquiry-notes { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

.overview-today { margin: 0 0 10px; }
.today-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.today-panel { margin: 0; }
.today-panel ul, #job-file-list ul { list-style: none; padding: 0; margin: 0; }
.today-panel li { border-top: 1px solid var(--line); }
.today-panel li button { width: 100%; text-align: left; border: 0; border-radius: 0; padding: 10px 15px; }
.ops-panel { padding: 14px 15px; }
.sale-preview > .ops-panel { border-top: 1px solid var(--line); }
.ops-panel h2, .ops-panel p { margin-bottom: 8px; }
.ops-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.ops-form label { min-width: min(100%,145px); }
.ops-form p { flex-basis: 100%; margin-top: 4px; }
#job-file-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
#job-file-list small { margin-top: 2px; }
@media (max-width: 650px) {
  .today-grid { grid-template-columns: 1fr; }
  .ops-form label { flex: 1 1 min(100%,150px); }
}

.sale-fields [hidden] { display: none; }

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: safe center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(16px, 4vw, 40px);
  background: radial-gradient(ellipse at 50% 14%, #fafaf9, #eeedf0 72%);
}
.auth-card {
  width: min(100%, 448px);
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid #e4e3e7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 5px #14141c08, 0 22px 70px #14141c0d;
}
.auth-header { text-align: center; }
.auth-card .brand { margin: 0 auto 15px; }
.auth-card h1 { font-size: clamp(1.5rem, 7vw, 2rem); letter-spacing: -.035em; }
.auth-card p { color: var(--muted); margin-top: 7px; font-size: .9rem; }
.auth-card form { display: grid; margin-top: 23px; gap: 14px; }
.auth-card [hidden] { display: none; }
.auth-card label { gap: 6px; }
.auth-card input { min-height: 48px; background: #fafafa; border-color: #9999a4; font-size: 16px; }
.auth-password { display: grid; gap: 6px; }
.auth-password-control { position: relative; }
.auth-password-control input { padding-right: 63px; }
#auth-reveal { position: absolute; top: 3px; right: 3px; min-height: 42px; padding-inline: 9px; border: 0; background: transparent; color: #41414a; }
#auth-reveal:hover, #auth-reveal:active { background: #eeeef2; }
#auth-submit { min-height: 48px; }
.auth-card #auth-error { margin: 0; color: #9a2340; }
.auth-card #auth-error:empty { display: none; }
.auth-card .auth-help { margin-top: 17px; border-top: 1px solid var(--line); color: var(--muted); }
.auth-help summary { display: flex; align-items: center; min-height: 44px; justify-content: center; color: #404047; cursor: pointer; font-size: .875rem; font-weight: 650; }
.auth-help summary::-webkit-details-marker { display: none; }
.auth-help p { margin: 0 auto 3px; text-align: center; max-width: 32ch; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; }
.invite-result { display: grid; gap: 6px; margin: 10px 0; }
.invite-result[hidden] { display: none; }

.workshop-tabs{display:flex;gap:.35rem;flex-wrap:wrap;margin-bottom:1.1rem}
.workshop-tabs button{min-height:42px;border-color:transparent}
.workshop-tabs button[aria-current=page]{background:#e8eefc;color:#174392;font-weight:700}
.workshop-form{display:flex;align-items:end;gap:.8rem;flex-wrap:wrap;margin:.7rem 0 1.15rem}
.workshop-form>*{min-width:0}
.workshop-form label{flex:1 1 165px}
.workshop-form textarea{width:100%}
.form-feedback{width:100%;margin:0;overflow-wrap:anywhere}
.job-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem}
.job-board section{padding:.75rem;background:#f3f5f8;border-radius:.85rem}
.job-board h3{margin-top:0}
.job-card{display:grid;gap:.15rem;text-align:left;width:100%;margin:.35rem 0;overflow-wrap:anywhere}
.sale-check-in{grid-column:1/-1}
.sale-check-in .sale-fields{margin-top:.75rem}
.customer-portal .content{max-width:38rem;margin:6vh auto}
.portal-panel form{display:grid;gap:.8rem}
.portal-panel li{margin:.35rem 0}
#security-secret,#authenticator-key,#customer-link-result{overflow-wrap:anywhere;margin:.35rem 0}
#customer-link-result input{width:100%}
dialog video{display:block;width:min(100%,420px)}
@media(max-width:860px){.job-board{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:440px){.job-board{grid-template-columns:1fr}.workshop-form label{flex-basis:100%}}
