:root {
  --navy: #071a2b;
  --blue: #0759d9;
  --blue-dark: #0649b0;
  --cyan: #12a7c7;
  --red: #e12929;
  --ink: #13202c;
  --muted: #667585;
  --line: #dce3e9;
  --soft: #f2f5f7;
  --white: #ffffff;
  --green: #178755;
  --amber: #a76708;
  --shadow: 0 10px 30px rgba(7, 26, 43, 0.12);
}

* { box-sizing: border-box; }
html { background: var(--soft); }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 15px; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; stroke-width: 2; }

.app-shell { min-height: 100vh; max-width: 1180px; margin: 0 auto; background: var(--white); padding-bottom: 88px; }
.app-header { height: 70px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-icon { width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #cfe5f0; background: transparent; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.wordmark { display: flex; align-items: baseline; gap: 6px; }
.wordmark strong { color: white; font-size: 17px; font-weight: 900; letter-spacing: 0; }
.wordmark span { color: #8ed2e1; font-size: 10px; font-weight: 900; }
.avatar { width: 38px; height: 38px; border: 1px solid #496173; border-radius: 50%; color: white; background: #18374f; font-weight: 800; }
main { min-height: calc(100vh - 158px); }
.view { display: none; padding: 24px 22px 34px; }
.view.active { display: block; }
.greeting p { color: var(--blue); text-transform: uppercase; font-size: 11px; font-weight: 800; margin: 0 0 7px; }
.greeting h1, .page-heading h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.greeting span, .page-heading p { display: block; color: var(--muted); margin: 6px 0 0; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 22px 0 12px; }
.dashboard-metrics button { min-width: 0; min-height: 108px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); text-align: center; }
.dashboard-metrics strong, .dashboard-metrics small { display: block; }
.dashboard-metrics strong { margin-top: 8px; font-size: 23px; }
.dashboard-metrics small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.metric-icon { width: 31px; height: 31px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon.blue { color: var(--blue); background: #e8f0fd; }
.metric-icon.green { color: var(--green); background: #e5f5ed; }
.metric-icon.red { color: #c92c2c; background: #fceaea; }

.new-order { width: 100%; min-height: 94px; margin: 25px 0 30px; padding: 16px; border: 0; border-radius: 8px; background: var(--blue); color: white; display: grid; grid-template-columns: 48px 1fr 22px; gap: 13px; align-items: center; text-align: left; box-shadow: 0 8px 22px rgba(7,89,217,.24); }
.new-order:hover { background: var(--blue-dark); }
.new-order-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.new-order-icon svg { width: 27px; height: 27px; }
.new-order strong, .new-order small { display: block; }
.new-order strong { font-size: 17px; }
.new-order small { margin-top: 5px; color: #dceaff; font-size: 12px; }

.section-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 13px; }
.section-title.recent-title { margin-top: 30px; }
.section-title h2 { margin: 0; font-size: 17px; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; display: grid; place-items: center; background: #e7effc; color: var(--blue); font-weight: 800; font-size: 12px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: white; }

.draft-list, .order-list, .catalog-list, .material-list { display: grid; gap: 10px; }
.operational-list { display: grid; gap: 10px; margin-bottom: 24px; }
.manager-workboard { display: grid; gap: 12px; }
.manager-workboard-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fb; }
.manager-workboard-tabs button { min-width: 0; min-height: 54px; padding: 6px 4px; border: 0; border-radius: 6px; display: grid; grid-template-rows: minmax(0, 1fr) 18px; place-items: center; gap: 3px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; line-height: 1.1; }
.manager-workboard-tabs button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-workboard-tabs button b { display: grid; min-width: 18px; height: 18px; margin: 0; padding: 0 4px; border-radius: 9px; place-items: center; color: inherit; background: #e3e9ee; font-size: 10px; }
.manager-workboard-tabs button.active { color: var(--blue); background: white; box-shadow: 0 1px 3px rgb(13 35 55 / 12%); }
.manager-workboard-tabs button.active b { color: white; background: var(--blue); }
.manager-workboard > header { display: flex; align-items: flex-start; gap: 12px; }
.manager-workboard > header h3 { margin: 0; font-size: 18px; }
.manager-workboard > header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.technician-work-section { display: grid; gap: 8px; }
.technician-work-section + .technician-work-section { margin-top: 18px; }
.technician-work-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.technician-work-section > header span { color: var(--blue); font-size: 10px; font-weight: 900; }
.technician-work-section > header h2 { margin: 0; font-size: 16px; }
.technician-work-later { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.technician-work-later > header { grid-column: 1 / -1; }
.technician-work-later > .operational-card:not(.technician-summary-card) { grid-column: 1 / -1; }
.operational-card { padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: white; }
.manager-work-card { display: grid; gap: 8px; }
.manager-work-card > .operational-head, .manager-work-card > .triage-tags, .manager-work-card > p, .manager-work-card > .operational-meta, .manager-work-card > .operational-total, .manager-work-card > .operational-actions { margin-top: 0; margin-bottom: 0; }
.manager-work-card .operational-head { align-items: flex-start; }
.manager-work-card .operational-head strong { min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.manager-work-card .status-pill { flex: 0 0 auto; max-width: 46%; text-align: center; }
.manager-work-card .operational-meta { display: grid; gap: 5px; }
.manager-work-card .operational-total { display: none; }
.manager-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.manager-priority-alert { margin: 14px 0; }
.manager-priority-alert .attention-item { border-left-color: var(--amber); }
.manager-summary-grid > .manager-work-card { grid-column: 1 / -1; }
.operational-summary-card { position: relative; min-width: 0; min-height: 154px; padding: 10px 10px 11px; overflow: hidden; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; color: var(--ink); background: white; display: grid; grid-template-rows: auto auto auto auto 1fr; align-content: start; gap: 5px; text-align: left; }
.operational-summary-card.waiting { border-left-color: var(--amber); }
.operational-summary-card.approved { border-left-color: var(--green); }
.operational-summary-card.returned { border-left-color: var(--red); }
.operational-summary-card.priority-urgente, .operational-summary-card.priority-plantao { border-left-color: #b42318; }
.operational-summary-card.overdue { border-color: #efb4aa; border-left-color: #b42318; background: #fffafa; }
.operational-summary-card.near-deadline { border-color: #f0c56d; border-left-color: #c78300; }
.operational-summary-card:focus-visible { outline: 3px solid rgba(7, 89, 217, .35); outline-offset: 2px; }
.operational-summary-card:active { background: #f4f8fe; transform: translateY(1px); }
.operational-summary-top { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.operational-summary-top .priority-tag, .operational-summary-top .status-pill { min-width: 0; max-width: calc(50% - 2px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-summary-top .status-pill { padding: 3px 5px; border-radius: 4px; font-size: 9px; line-height: 1.15; }
.operational-summary-order { overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.operational-summary-client, .operational-summary-problem { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-summary-client { color: var(--ink); font-size: 12px; font-weight: 900; line-height: 1.25; }
.operational-summary-problem { color: var(--muted); font-size: 11px; line-height: 1.25; }
.operational-summary-meta { align-self: end; display: grid; gap: 3px; min-width: 0; padding-top: 3px; color: var(--muted); font-size: 10px; }
.operational-summary-meta > span { min-width: 0; display: flex; align-items: center; gap: 4px; }
.operational-summary-meta svg { flex: 0 0 auto; width: 13px; height: 13px; }
.operational-summary-meta b { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.operational-summary-chevron { position: absolute; right: 7px; bottom: 7px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--blue); background: white; }
.operational-summary-chevron svg { width: 15px; height: 15px; }
.operational-summary-card.operational-dispatch-summary { display: block; min-height: 0; padding: 0; }
.operational-summary-open { position: relative; width: 100%; min-height: 142px; padding: 10px 10px 11px; border: 0; color: var(--ink); background: transparent; display: grid; grid-template-rows: auto auto auto auto 1fr; align-content: start; gap: 5px; text-align: left; }
.operational-summary-open:focus-visible { outline: 3px solid rgba(7, 89, 217, .35); outline-offset: -3px; }
.operational-summary-open:active { background: #f4f8fe; }
.operational-summary-action { padding: 0 10px 10px; border-top: 1px solid var(--line); }
.operational-summary-action button { width: 100%; min-height: 44px; margin: 9px 0 0; border-radius: 6px; font-weight: 800; }
.technical-work-card { padding: 15px; }
.technician-work-now .technical-work-card { border-left-width: 5px; box-shadow: 0 5px 16px rgba(7, 26, 43, 0.08); }
.operational-card.waiting { border-left-color: var(--amber); }
.operational-card.approved { border-left-color: var(--green); }
.operational-card.returned { border-left-color: var(--red); }
.operational-card.priority-urgente, .operational-card.priority-plantao { border-left-color: #b42318; }
.operational-card.overdue { border-color: #efb4aa; border-left-color: #b42318; background: #fffafa; }
.operational-card.near-deadline { border-color: #f0c56d; border-left-color: #c78300; }
.technical-work-card.assigned { border-left-color: var(--blue); }
.technical-work-card.in-service { border-left-color: var(--green); }
.technical-work-card .status-pill.assigned { color: var(--blue); background: #e8f0fd; }
.technical-work-card .status-pill.in-service { color: var(--green); background: #e5f5ed; }
.technical-work-card { --work-color: var(--blue); --work-tint: #e8f0fd; }
.technical-work-card.in-service { --work-color: var(--green); --work-tint: #e5f5ed; }
.technical-work-card.returned { --work-color: #b42318; --work-tint: #fff0ee; }
.technical-work-card.waiting { --work-color: #885700; --work-tint: #fff5df; }
.technical-work-card.near-deadline, .technical-work-card.overdue { border-color: var(--line); border-left-color: var(--work-color); background: white; }
.technical-work-card .status-pill { color: var(--work-color); background: var(--work-tint); }
.technical-work-card .approve-order { background: var(--work-color); }
.technician-work-later .technical-work-card .approve-order { color: var(--work-color); background: var(--work-tint); border: 1px solid currentColor; }
.technician-work-later > header > span { color: #7044a0; }
.technician-work-later .technical-work-card.assigned { --work-color: #7044a0; --work-tint: #f3edf9; border-left-color: var(--work-color); }
.technician-work-later .technical-work-card.assigned .status-pill { color: var(--work-color); background: var(--work-tint); }
.technician-summary-card { display: block; min-height: 0; padding: 0; }
.technician-summary-card .operational-summary-open { min-height: 0; padding-bottom: 10px; }
.technician-summary-card .operational-summary-top .status-pill { margin: 0; }
.technician-summary-bottom { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding-right: 18px; color: var(--muted); font-size: 10px; font-weight: 700; }
.technician-summary-bottom > span { display: inline-flex; align-items: center; gap: 4px; }
.technician-summary-bottom svg { width: 13px; height: 13px; }
.technician-summary-bottom .deadline-tag { font-style: normal; }
@media (max-width: 359px) { .technician-work-later { grid-template-columns: 1fr; } }
@media (min-width: 700px) { .technician-work-later { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.operational-head, .operational-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operational-head strong { font-size: 15px; }
.operational-card p { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.operational-card .operational-schedule { margin-bottom: 0; font-weight: 700; }
@media (max-width: 359px) {
  .manager-summary-grid { grid-template-columns: 1fr; }
}
@media (min-width: 700px) {
  .manager-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.operational-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 11px; }
.operational-meta span { display: inline-flex; align-items: center; gap: 4px; }
.operational-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.operational-actions.single { grid-template-columns: 1fr; }
.operational-actions button { min-height: 48px; border-radius: 6px; font-weight: 800; }
.order-administration-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.order-archive-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.order-archive-action svg { width: 18px; height: 18px; }
.order-archive-form header h2, .order-archive-form header p { margin: 0; }
.order-archive-form header p { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.order-archive-form footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.order-archive-form footer button { min-height: 48px; margin: 0; }
.operational-queue { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fb; }
.operational-queue > strong { font-size: 13px; }
.operational-queue > div { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 1px; }
.operational-queue button { min-width: max-content; min-height: 40px; padding: 7px 9px; border: 1px solid #d5dee6; border-radius: 7px; color: var(--muted); background: white; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; }
.operational-queue button.active { border-color: var(--blue); color: var(--blue); background: #edf4ff; }
.operational-queue button b { min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; color: inherit; background: #e8eef3; font-size: 10px; }
.operational-queue button.active b { background: #d9e8ff; }
.triage-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 -1px; }
.priority-tag, .deadline-tag, .agenda-triage { width: fit-content; padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: 900; }
.priority-tag { color: #50606e; background: #eef2f5; }
.priority-tag.alta { color: #885700; background: #fff2d8; }
.priority-tag.urgente, .priority-tag.plantao { color: #9f1d17; background: #fff0ee; }
.deadline-tag.near-deadline { color: #885700; background: #fff5df; }
.deadline-tag.overdue { color: #9f1d17; background: #fff0ee; }
.approve-order { border: 0; color: white; background: var(--green); }
.return-order { border: 1px solid #edb6b6; color: var(--red); background: #fff7f7; }
.sync-state { padding: 5px 8px; border-radius: 4px; color: var(--green); background: #e8f6ef; font-size: 10px; font-weight: 800; }
.sync-state.pending { color: var(--amber); background: #fff3dc; }
.sync-state.offline { color: var(--red); background: #fbeaea; }
.sync-state.conflict { color: var(--red); background: #fbeaea; }
.detail-toggle { width: 100%; min-height: 44px; margin-top: 10px; padding: 0; border: 0; border-top: 1px solid var(--line); color: var(--blue); background: transparent; display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 800; }
.detail-toggle svg { width: 17px; }
.own-order-detail { margin: 0 -2px 4px; padding: 13px; border-radius: 6px; background: #f6f8fa; }
.own-order-detail dl { margin: 0; }
.own-order-detail dl div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 5px 0; }
.own-order-detail dt { color: var(--muted); font-size: 11px; }
.own-order-detail dd { margin: 0; font-size: 12px; font-weight: 700; }
.own-order-detail h4 { margin: 13px 0 4px; }
.own-order-detail > p { display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.order-timeline { display: grid; gap: 0; margin: 8px 0 2px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.order-timeline-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-timeline-marker { position: relative; width: 10px; height: 10px; margin: 4px 0 0 4px; border: 2px solid #1976c9; border-radius: 50%; background: white; }
.order-timeline-item:not(:last-child) .order-timeline-marker::after { content: ""; position: absolute; top: 9px; left: 2px; width: 2px; height: 30px; background: #bed7ec; }
.order-timeline-item.distribuicao .order-timeline-marker, .order-timeline-item.redistribuicao .order-timeline-marker { border-color: #5a8a2b; }
.order-timeline-item.execucao .order-timeline-marker { border-color: #b17300; }
.order-timeline-item.finalizacao .order-timeline-marker { border-color: #287c58; }
.order-timeline-item.ajuste .order-timeline-marker, .order-timeline-item.retorno .order-timeline-marker { border-color: #b14450; }
.order-timeline-item > div { display: grid; gap: 2px; min-width: 0; font-size: 12px; }
.order-timeline-item strong { font-size: 12px; }
.order-timeline-item span, .order-timeline-item small, .order-timeline-empty { color: var(--muted); font-size: 11px; line-height: 1.35; }
.order-timeline-empty { padding: 10px 0; }
.technical-review-report { margin-top: 14px; padding-top: 1px; border-top: 1px solid var(--line); }
.technical-review-report > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.technical-review-report strong { display: block; color: var(--blue); font-size: 11px; text-transform: uppercase; }
.technical-review-report p { margin: 3px 0 0; line-height: 1.45; white-space: pre-wrap; }
.checklist-readonly { min-height: 38px; padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 7px; font-size: 12px; }
.checklist-readonly input { width: 22px; height: 22px; accent-color: var(--blue); }
.return-reason { margin-top: 10px; padding: 10px; border-left: 3px solid var(--red); background: #fff7f7; display: grid; gap: 3px; font-size: 12px; }
.return-field { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.return-field textarea { min-height: 74px; }
.empty-inline { border: 1px dashed #c9d3dc; padding: 20px; text-align: center; color: var(--muted); border-radius: 8px; font-size: 13px; }
.draft-card, .order-card, .catalog-card, .material-card, .detail-card { border: 1px solid var(--line); border-radius: 8px; background: white; }
.draft-card, .order-card { width: 100%; padding: 14px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; text-align: left; color: var(--ink); }
.card-icon { width: 42px; height: 42px; border-radius: 6px; display: grid; place-items: center; color: var(--blue); background: #eaf1fc; }
.card-icon.ok { color: var(--green); background: #e8f6ef; }
.card-body { min-width: 0; }
.card-body strong, .card-body span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body strong { font-size: 14px; }
.card-body span { color: var(--muted); margin-top: 4px; font-size: 12px; }
.card-side { text-align: right; }
.card-side strong, .card-side span { display: block; }
.card-side strong { font-size: 13px; }
.card-side span { color: var(--muted); margin-top: 5px; font-size: 11px; }
.status-tag { display: inline-flex !important; width: fit-content; margin-top: 6px !important; padding: 3px 7px; border-radius: 4px; background: #fff3dc; color: var(--amber) !important; font-weight: 700; font-size: 10px !important; }
.status-tag.approved { background: #e6f5ed; color: var(--green) !important; }
.skeleton { height: 70px; border-radius: 8px; background: linear-gradient(90deg,#eef2f4 25%,#f8fafb 45%,#eef2f4 65%); background-size: 300% 100%; animation: pulse 1.3s infinite; }
@keyframes pulse { from { background-position: 100% 0; } to { background-position: 0 0; } }

.page-heading { margin-bottom: 22px; }
.filter-row, .segment { display: flex; gap: 8px; margin: 20px 0 14px; }
.filter { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); background: white; font-weight: 700; font-size: 12px; }
.filter.active { color: white; border-color: var(--navy); background: var(--navy); }
.segment { margin-top: 0; padding: 4px; border-radius: 8px; background: #e9eef2; }
.segment button { flex: 1; min-height: 40px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-weight: 700; }
.segment button.active { background: white; color: var(--ink); box-shadow: 0 2px 5px rgba(7,26,43,.1); }
.search-bar { min-height: 48px; border: 1px solid #cfd8df; border-radius: 8px; background: white; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; padding-left: 13px; overflow: hidden; }
.search-bar:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,89,217,.1); }
.search-bar svg { color: #728190; }
.search-bar input { width: 100%; min-width: 0; height: 46px; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-bar button { align-self: stretch; min-width: 72px; border: 0; color: white; background: var(--blue); font-weight: 800; font-size: 12px; }
.search-bar.large { margin: 14px 0; }
.catalog-card { padding: 14px; display: flex; align-items: center; gap: 12px; }
button.catalog-card { width: 100%; text-align: left; color: var(--ink); }
.catalog-card > svg { color: var(--blue); flex: 0 0 auto; }
.catalog-card > div { flex: 1; min-width: 0; }
.catalog-card strong, .catalog-card span { display: block; }
.catalog-card strong { font-size: 14px; }
.catalog-card span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.catalog-card em { font-style: normal; font-weight: 800; color: var(--blue); white-space: nowrap; }
.customer-catalog-card .customer-edit-action { display: inline-flex; flex: 0 0 auto; min-height: 44px; margin: 0; padding: 8px 10px; align-items: center; justify-content: center; gap: 6px; color: var(--blue); background: transparent; font-size: 13px; font-weight: 700; }
.customer-catalog-card .customer-edit-action svg { width: 17px; height: 17px; }
.customer-catalog-card .customer-edit-action span { margin: 0; color: inherit; font-size: inherit; }
.customer-create-action { width: 100%; margin: -6px 0 18px; }
.customer-create-action[hidden] { display: none; }
.empty-state { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 12px; }
.empty-state strong { color: var(--ink); }
.empty-state span { margin-top: 5px; font-size: 12px; }
.detail-result { margin-top: 12px; }
.detail-card { padding: 16px; }
.detail-card h3 { margin: 0 0 5px; font-size: 17px; }
.detail-card p { color: var(--muted); margin: 0; font-size: 12px; }
.detail-items { margin-top: 14px; border-top: 1px solid var(--line); }
.detail-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; margin-top: 6px; padding: 3px 7px; border-radius: 4px; color: var(--amber); background: #fff2d8; font-size: 10px; font-weight: 800; }
.status-pill.progress { color: var(--blue); background: #e8f0fd; }
.status-pill.done { color: var(--green); background: #e5f5ed; }
/* OS colour contract: rail = priority, status pill = workflow, deadline tag = SLA. */
.operational-card.priority-plantao, .operational-card.priority-urgente,
.operational-summary-card.priority-plantao, .operational-summary-card.priority-urgente { border-left-color: #b42318; }
.operational-card.priority-alta, .operational-summary-card.priority-alta { border-left-color: #c78300; }
.operational-card.priority-media, .operational-summary-card.priority-media { border-left-color: var(--blue); }
.operational-card.priority-baixa, .operational-summary-card.priority-baixa { border-left-color: #70808d; }
.operational-card .status-pill, .operational-summary-card .status-pill { color: #50606e; background: #eef2f5; }
.operational-card .status-pill.assigned,
.operational-summary-card .status-pill.assigned { color: #125582; background: #e8f0fd; }
.operational-card .status-pill.in-service,
.operational-summary-card .status-pill.in-service { color: #136d63; background: #dff5f1; }
.operational-card .status-pill.waiting-review,
.operational-summary-card .status-pill.waiting-review { color: #885700; background: #fff5df; }
.operational-card .status-pill.waiting-billing,
.operational-summary-card .status-pill.waiting-billing { color: #65428a; background: #eee8f8; }
.operational-card .status-pill.waiting-return,
.operational-summary-card .status-pill.waiting-return { color: #9a4c12; background: #fff0e6; }
.operational-card .status-pill.approved, .operational-summary-card .status-pill.approved { color: #126d3e; background: #e5f5ed; }
.operational-card .status-pill.returned, .operational-summary-card .status-pill.returned { color: #a02020; background: #fbe9e9; }
.operational-summary-meta .deadline-tag { justify-self: start; margin-top: 2px; color: #885700; }
.operational-summary-meta .deadline-tag.overdue { color: #9f1d17; }
.detail-block { padding: 15px 0; border-top: 1px solid var(--line); }
.detail-block h4 { margin: 0 0 9px; font-size: 13px; }
.detail-block p { line-height: 1.5; }
.map-link { margin-top: 11px; min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 6px; color: white; background: var(--blue); text-decoration: none; font-size: 12px; font-weight: 800; }
.equipment-check { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.equipment-check input { width: 18px; height: 18px; accent-color: var(--green); }

.calendar-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.calendar-head { min-height: 44px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; text-align: center; text-transform: capitalize; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.calendar-week { padding: 10px 0 6px; color: var(--muted); text-align: center; font-size: 10px; font-weight: 800; }
.calendar-day { position: relative; aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 50%; color: var(--ink); background: transparent; }
.calendar-day.outside { color: #b8c1c8; }
.calendar-day.today { color: white; background: var(--blue); font-weight: 800; }
.calendar-day.selected { outline: 2px solid var(--red); outline-offset: 2px; font-weight: 900; }
.calendar-day.today.selected { outline-color: white; }
.calendar-day.has-event:not(.today)::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--red); transform: translateX(-50%); }
.agenda-list-title { margin-top: 24px; }
.agenda-list { display: grid; gap: 9px; }
.agenda-item { padding: 13px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; border-left: 4px solid var(--blue); border-radius: 6px; background: white; box-shadow: 0 2px 9px rgba(7,26,43,.08); }
.agenda-item { width: 100%; border-top: 0; border-right: 0; border-bottom: 0; color: var(--ink); text-align: left; }
.agenda-item.urgente, .agenda-item.plantao, .agenda-item.overdue { border-left-color: #b42318; }
.agenda-item.near-deadline { border-left-color: #c78300; }
.agenda-time { color: var(--blue); font-weight: 900; font-size: 12px; }
.agenda-item strong, .agenda-item span { display: block; }
.agenda-item span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.agenda-item small { display: block; margin-top: 6px; color: var(--blue); font-size: 10px; }
.agenda-triage { display: inline-block !important; margin-right: 4px !important; color: #50606e !important; background: #eef2f5; }
.agenda-triage.urgente, .agenda-triage.plantao, .agenda-triage.overdue { color: #9f1d17 !important; background: #fff0ee; }
.agenda-triage.near-deadline { color: #885700 !important; background: #fff5df; }
.agenda-weather { color: #55713f !important; }
.agenda-weather.medium { color: #956600 !important; }
.agenda-weather.high { color: #b42318 !important; }
.agenda-weather.unavailable { color: var(--muted) !important; }
.weather-forecast { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; margin: 12px 0; padding: 10px; border: 1px solid #b9d6c1; border-left: 4px solid #248c57; border-radius: 7px; background: #f2fbf5; color: #215d3f; }
.weather-forecast.medium { border-color: #f0c56d; border-left-color: #c78300; background: #fff9eb; color: #745000; }
.weather-forecast.high { border-color: #efb4aa; border-left-color: #b42318; background: #fff5f3; color: #8b2219; }
.weather-forecast.unavailable, .weather-forecast.loading { border-color: var(--line); border-left-color: #7f91a6; background: #f7f9fb; color: var(--muted); }
.weather-forecast svg { width: 20px; height: 20px; margin-top: 2px; }
.weather-forecast span { display: grid; gap: 3px; min-width: 0; }
.weather-forecast strong { font-size: 13px; }
.weather-forecast small { color: currentColor; font-size: 11px; line-height: 1.35; }
.schedule-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.schedule-quick span { width: 100%; font-size: 12px; font-weight: 800; }
.schedule-quick button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f5f8fa; color: var(--ink); }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-limit { display: grid; gap: 7px; margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; }
.schedule-limit > strong { font-size: 13px; }
.schedule-limit > p { margin: 0; font-size: 12px; font-weight: 800; }
.schedule-sla.within { color: #22734a; }
.schedule-sla.after { color: #915d00; }
.schedule-sla.unavailable, .schedule-sla.neutral { color: var(--muted); }
.schedule-limit > small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.schedule-window { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.schedule-window-day { min-width: 0; min-height: 52px; padding: 4px 2px; border: 1px solid #b9d6c1; border-radius: 7px; color: #22734a; background: #f2fbf5; display: grid; place-items: center; gap: 1px; }
.schedule-window-day.after { border-color: #f0c56d; color: #8b5b00; background: #fff8e8; }
.schedule-window-day.neutral { border-color: #d5dee6; color: #667785; background: #f7f9fb; }
.schedule-window-day.selected { outline: 2px solid var(--blue); outline-offset: 1px; }
.schedule-window-day strong { max-width: 100%; overflow: hidden; font-size: 9px; text-transform: capitalize; }
.schedule-window-day span { font-size: 14px; font-weight: 900; }
.pilot-dialog .schedule-form { display: grid; gap: 12px; }
.pilot-dialog .schedule-form > h2, .schedule-header h2, .schedule-header p { margin: 0; }
.schedule-header { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.schedule-header p, .schedule-technician { margin: 4px 0 0; color: var(--muted); }
.schedule-limit { gap: 9px; margin: 0; }
.schedule-limit > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.schedule-limit > div:first-child strong { font-size: 14px; }
.pilot-dialog .schedule-calendar { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
.pilot-dialog .schedule-calendar input { width: 27px; min-width: 27px; min-height: 32px; height: 32px; margin: 0; padding: 0; border: 0; color: transparent; background: transparent; cursor: pointer; }
.pilot-dialog .schedule-technician-field { margin: 0; }
.pilot-dialog .schedule-technician-field select { margin-top: 5px; }
.schedule-window { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.schedule-window-day { flex: 0 0 58px; min-height: 66px; padding: 6px 3px; scroll-snap-align: start; gap: 2px; }
.schedule-window-day small { font-size: 8px; font-weight: 800; }
.schedule-window-day.selected { border-color: var(--blue); background: #eef5ff; box-shadow: 0 0 0 1px var(--blue); outline: 0; }
.schedule-day-focus { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.schedule-day-focus.within { color: #22734a; }
.schedule-day-focus.after { color: #915d00; }
.schedule-quick { margin: -3px 0 0; }
.schedule-quick button { min-height: 38px; margin: 0; padding: 7px 10px; }
.schedule-fields { grid-template-columns: 1fr; }
.schedule-form .schedule-fields label { margin: 0; }
.schedule-date-hidden, .schedule-time-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.schedule-limit { gap: 8px; padding: 10px; }
.schedule-window { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; overflow: hidden; padding: 2px 0 4px; touch-action: pan-y; }
.schedule-window-day { min-height: 62px; padding: 5px 2px; }
.schedule-window-day small { font-size: 8px; }
.schedule-time-picker { gap: 7px; padding: 10px; }
.schedule-time-picker .schedule-quarter-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.schedule-time-picker .schedule-quarter { min-height: 42px; }
.schedule-time-picker .schedule-hour-tape { display: none; }
.schedule-form .weather-forecast { min-height: 0; margin: 0; padding: 6px 8px; font-size: 10px; }
.schedule-day-focus { margin: 0; font-size: 11px; }
.schedule-adjustment-note { margin: -4px 0 0; color: #8b5b00; font-size: 12px; font-weight: 700; line-height: 1.35; }
.schedule-limit > small { display: none; }
.schedule-form {
  max-height: min(610px, calc(100dvh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.schedule-time-picker { display: grid; gap: 8px; padding: 11px; border: 1px solid #b8cce8; border-radius: 8px; background: #f5f8fc; }
.schedule-time-picker > div:first-child { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.schedule-time-picker > div:first-child strong { font-size: 14px; }
.schedule-time-picker > div:first-child span { color: var(--blue); font-size: 12px; font-weight: 800; }
.schedule-hour-tape { display: flex; gap: 6px; overflow-x: auto; padding: 2px 1px; scrollbar-width: thin; }
.schedule-hour, .schedule-quarter { flex: 0 0 auto; min-height: 42px; margin: 0 !important; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font-weight: 800; }
.schedule-hour.selected, .schedule-quarter.selected { border-color: var(--blue); color: white; background: var(--blue); }
.schedule-quarter-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.schedule-quarter { width: 100%; padding: 6px 4px; }
.schedule-time-picker details { color: var(--muted); font-size: 12px; }
.schedule-time-picker summary { cursor: pointer; }
.schedule-time-picker details label { margin: 7px 0 0; }
.schedule-receipt { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #b9d6c1; border-left: 4px solid #248c57; border-radius: 8px; background: #f2fbf5; color: #215d3f; }
.schedule-receipt.after { border-color: #f0c56d; border-left-color: #c78300; background: #fff9eb; color: #745000; }
.schedule-receipt.unavailable, .schedule-receipt.neutral { border-color: var(--line); border-left-color: #7f91a6; background: #f7f9fb; color: var(--muted); }
.schedule-receipt > div { display: grid; gap: 2px; }
.schedule-receipt small { color: currentColor; font-size: 10px; font-weight: 800; }
.schedule-receipt strong { font-size: 14px; }
.schedule-receipt span { font-size: 11px; line-height: 1.35; }
.schedule-receipt nav { display: flex; flex-wrap: wrap; gap: 4px; }
.pilot-dialog .schedule-receipt nav button { min-height: 32px; margin: 0; padding: 4px 7px; border: 0; color: currentColor; background: transparent; font-size: 11px; font-weight: 800; text-decoration: underline; }
.schedule-footer { position: sticky; bottom: -18px; z-index: 3; display: grid; grid-template-columns: 1fr 1.3fr; gap: 7px 8px; margin: 0 -2px -18px; padding: 8px 2px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.schedule-footer .schedule-receipt { grid-column: 1 / -1; padding: 0 2px 5px; border: 0; border-radius: 0; background: white; color: var(--muted); }
.schedule-footer .schedule-receipt strong { color: var(--ink); font-size: 12px; }
.schedule-footer .schedule-receipt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-dialog .schedule-footer button { width: 100%; min-height: 48px; margin: 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 800; line-height: 1.15; }
.pilot-dialog .schedule-footer .schedule-cancel { border: 1px solid #c7d0d9; background: #fff; color: #344454; }
.pilot-dialog .schedule-footer .schedule-confirm { border-color: var(--blue); box-shadow: 0 4px 12px rgba(15, 99, 214, .18); white-space: nowrap; }
@media (max-width: 520px) {
  .pilot-dialog:has(.schedule-form) { width: calc(100% - 24px); max-height: calc(100vh - 24px); padding: 18px; }
  .schedule-quarter-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schedule-quarter { min-height: 44px; font-size: 12px; }
  .weather-forecast { padding: 9px; }
  .weather-forecast small + small { display: none; }
}
.tracking-map { position: relative; min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #e9eef0; }
.map-grid { position: absolute; inset: 0; opacity: .8; background-image: linear-gradient(32deg,transparent 46%,white 47%,white 51%,transparent 52%),linear-gradient(112deg,transparent 47%,#d4dfd8 48%,#d4dfd8 59%,transparent 60%),linear-gradient(90deg,rgba(255,255,255,.55) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.55) 1px,transparent 1px); background-size: 170px 130px,220px 180px,38px 38px,38px 38px; }
.map-pin { position: absolute; top: 38px; right: 48px; width: 42px; height: 42px; border: 4px solid white; border-radius: 50% 50% 50% 8px; display: grid; place-items: center; color: white; background: var(--blue); transform: rotate(-45deg); box-shadow: var(--shadow); }
.map-pin svg { width: 17px; transform: rotate(45deg); }
.map-copy { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 17px; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.map-copy > svg { color: var(--blue); }
.map-copy strong { display: block; margin-top: 7px; }
.map-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.team-title { margin-top: 24px; }
.team-empty { background: white; }
.team-date-control { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px auto; gap: 8px; align-items: end; margin: 16px 0 4px; }
.team-date-control label { display: grid; gap: 5px; min-width: 0; }
.team-date-control label span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.team-date-control input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: var(--ink); background: white; font: inherit; font-weight: 800; }
.team-date-control .text-btn { min-height: 42px; padding: 0 12px; border: 1px solid var(--blue); border-radius: 7px; color: var(--blue); background: #f5f9ff; font-weight: 900; }
.team-date-control .text-btn.active { color: white; background: var(--blue); }
.team-map-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 18px 0 10px; }
.team-map-summary > span { min-width: 0; padding: 10px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; text-align: center; font-size: 10px; }
.team-map-summary strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 17px; }
.team-map-filters { display: flex; gap: 7px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 2px; }
.team-map-filters[hidden], .team-map-legend[hidden], .team-operational-map[hidden], .team-map-fallback[hidden] { display: none; }
.team-map-filters button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: white; font-size: 11px; font-weight: 800; }
.team-map-filters button[data-team-filter]:not([data-team-filter=""]) { display: inline-flex; align-items: center; gap: 5px; }
.team-map-filters button.active { border-color: var(--team-color, var(--blue)); color: var(--team-color, var(--blue)); background: #f3f7fe; }
.team-map-filters b { display: inline-grid; min-width: 17px; height: 17px; margin-left: 3px; border-radius: 9px; place-items: center; color: inherit; background: #e7eef8; font-size: 9px; }
.team-locate-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 2px 0 0; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 6px; color: var(--blue); background: #f3f7fe; font-size: 12px; font-weight: 800; }
.team-locate-button svg { width: 17px; height: 17px; }
.team-locate-button:disabled { opacity: .6; }
.team-color-dot { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: var(--team-color); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.team-map-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.team-map-modes button { min-height: 36px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.team-map-modes button.active { color: var(--blue); background: white; box-shadow: 0 1px 4px #12202d1a; }
.team-map-context { margin: -3px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.team-map-legend { display: flex; flex-wrap: wrap; gap: 8px 15px; align-items: center; margin: -2px 0 12px; color: var(--muted); font-size: 11px; font-weight: 700; }
.team-map-legend > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.team-location-list { margin: 0 0 12px; border-top: 1px solid var(--line); }
.team-location-list[hidden], .technician-location-share[hidden], .technician-location-actions button[hidden] { display: none; }
.team-location-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.team-location-row > span { min-width: 0; color: var(--muted); text-align: right; }
.team-location-row strong { display: inline-flex; align-items: center; gap: 8px; }
.team-location-row.is-missing > span { color: var(--amber); }
.team-location-row.is-stale > span { color: var(--amber); }
.team-operational-map { height: min(54vw, 360px); min-height: 270px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #e9eef0; }
.team-operational-map .leaflet-overlay-pane svg { width: auto; height: auto; }
.team-map-title { margin-top: 22px; }
.team-map-refresh[hidden] { display: none; }
.team-map-fallback { margin-bottom: 10px; }
.team-visit-list, .team-exception-list { display: grid; gap: 8px; }
.team-visit-card { width: 100%; min-width: 0; padding: 11px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; color: var(--ink); background: white; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 16px; gap: 8px; align-items: center; text-align: left; }
.team-visit-card.priority-urgente, .team-visit-card.priority-plantao { border-left-color: var(--red); }
.team-visit-card.priority-alta { border-left-color: var(--amber); }
.team-visit-time { color: var(--blue); font-size: 12px; font-weight: 900; }
.team-visit-card strong, .team-visit-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-visit-card strong { font-size: 12px; }
.team-visit-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.team-visit-card em { max-width: 74px; overflow: hidden; color: var(--amber); font-size: 9px; font-style: normal; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.team-visit-card > svg { width: 16px; color: var(--blue); }
.team-exception { min-height: 60px; padding: 10px; border: 1px solid #f0d49e; border-radius: 7px; background: #fffaf0; display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; }
.team-exception > svg { color: var(--amber); }
.team-exception strong, .team-exception small { display: block; }
.team-exception strong { font-size: 12px; }
.team-exception small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.detail-photo { width: 150px; min-height: 58px; margin-top: 11px; }

.management-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 22px; }
.management-card { min-width: 0; min-height: 168px; padding: 15px; border: 1px solid var(--line); border-top: 4px solid currentColor; border-radius: 8px; background: white; color: var(--blue); display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 1fr auto; gap: 10px; text-align: left; }
.management-card.finance { color: var(--green); }
.management-card.schedule { color: var(--amber); }
.management-card.inventory { color: #b73737; }
.management-icon { width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb,currentColor 12%,white); }
.management-card > span:nth-child(2) { min-width: 0; }
.management-card small, .management-card strong, .management-card em { display: block; }
.management-card small { font-size: 9px; font-weight: 900; }
.management-card strong { margin-top: 7px; color: var(--ink); font-size: 21px; overflow-wrap: anywhere; }
.management-card em { margin-top: 2px; color: var(--muted); font-size: 10px; font-style: normal; }
.management-foot { grid-column: 1 / -1; min-height: 34px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 4px; font-size: 10px; }
.management-foot b { color: var(--ink); font-size: 12px; }
.management-foot svg { width: 15px; height: 15px; margin-left: auto; color: currentColor; }
.management-foot.danger b { color: var(--red); }
.management-foot.warning b { color: var(--amber); }
.attention-title { margin-top: 28px; }
.alert-count { color: #a42222; background: #fbe6e6; }
.attention-list, .finance-list { display: grid; gap: 9px; }
.attention-item { width: 100%; min-height: 68px; padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 7px; background: white; color: var(--ink); display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 10px; text-align: left; }
.attention-item.warning { border-left-color: var(--amber); }
.attention-item .attention-icon { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; color: var(--red); background: #fbeaea; }
.attention-item.warning .attention-icon { color: var(--amber); background: #fff3dd; }
.attention-item strong, .attention-item small { display: block; }
.attention-item strong { font-size: 13px; }
.attention-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.attention-item > svg { width: 16px; color: var(--muted); }
.performance-title, .quick-title { margin-top: 28px; }
.performance-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.performance-strip div { min-width: 0; min-height: 80px; padding: 14px 10px; border-right: 1px solid var(--line); }
.performance-strip div:last-child { border-right: 0; }
.performance-strip small, .performance-strip strong { display: block; }
.performance-strip small { color: var(--muted); font-size: 9px; }
.performance-strip strong { margin-top: 8px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.quick-grid button { min-width: 0; min-height: 78px; padding: 10px 5px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--blue); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.quick-grid span { color: var(--ink); font-size: 10px; font-weight: 800; }
.quick-grid small { color: var(--muted); font-size: 9px; font-weight: 700; line-height: 1.15; }
.quick-grid-operational { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-grid-operational button { min-height: 94px; padding: 12px; align-items: flex-start; text-align: left; gap: 5px; }
.quick-grid-operational button svg { width: 21px; height: 21px; }
.quick-grid-operational span { font-size: 12px; }
.quick-grid-operational small { min-height: 11px; }
.quick-grid-operational button:active { border-color: var(--blue); background: #f4f8fe; transform: translateY(1px); }
@media (min-width: 700px) { .quick-grid-operational { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.operation-heading p { margin: 0 0 6px; color: var(--blue); font-size: 10px; font-weight: 900; }
.operation-heading span { display: block; margin-top: 6px; color: var(--muted); }
.operation-metrics { margin-top: 0; }
.orders-list-title { margin-top: 22px; }
.order-history-search { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.order-history-search label { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; }
.order-history-search input, .order-history-search select { width: 100%; min-width: 0; height: 44px; padding: 8px; border: 1px solid #ccd1d6; border-radius: 6px; background: white; color: #18252d; font: inherit; }
.order-history-search button, .order-history-pages button { min-height: 44px; border: 1px solid #ccd1d6; border-radius: 6px; background: white; color: #0758c9; font-weight: 600; }
.order-history-search button[type=submit] { background: #0758c9; color: white; }
.order-history-pages { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.order-history-pages span { flex: 1; }
.order-history-pages button { width: 44px; display: grid; place-items: center; }
.order-history-pages button:disabled { opacity: .4; }
@media (min-width: 900px) { .order-history-search { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.finance-summary, .stock-summary, .quote-summary { display: grid; gap: 10px; }
.finance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.quote-summary { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 20px; }
.stock-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
.finance-summary > div, .stock-summary > div, .quote-summary > div { min-width: 0; min-height: 102px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.finance-summary small, .finance-summary strong, .finance-summary span, .stock-summary small, .stock-summary strong, .quote-summary small, .quote-summary strong { display: block; }
.finance-summary small, .stock-summary small, .quote-summary small { color: var(--muted); font-size: 10px; }
.finance-summary strong, .stock-summary strong, .quote-summary strong { margin-top: 9px; font-size: 19px; overflow-wrap: anywhere; }
.finance-summary span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.finance-summary .critical strong, .stock-summary .critical strong, .quote-summary .critical strong { color: var(--red); }
.stock-summary .warning strong { color: var(--amber); }
.finance-action { width: 100%; min-height: 70px; margin-top: 10px; padding: 12px 14px; border: 1px solid #b8d7c8; border-radius: 7px; background: #f1faf5; color: var(--green); display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 10px; text-align: left; }
.finance-action strong, .finance-action small { display: block; }
.finance-action strong { color: var(--ink); font-size: 13px; }
.finance-action small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-action > svg:last-child { width: 16px; color: var(--muted); }
.finance-list-title { margin-top: 26px; }
.finance-movement { min-height: 66px; padding: 13px; border-bottom: 1px solid var(--line); background: white; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; }
.finance-movement:first-child { border-radius: 7px 7px 0 0; }
.finance-movement:last-child { border-bottom: 0; border-radius: 0 0 7px 7px; }
.finance-movement > i { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; color: var(--green); background: #e7f5ee; }
.finance-movement strong, .finance-movement small { display: block; }
.finance-movement strong { font-size: 12px; }
.finance-movement small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-movement > b { color: var(--green); font-size: 12px; }
.finance-billing-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; display: grid; gap: 10px; }
.finance-billing-card header { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.finance-billing-card header > span { width: 34px; height: 34px; border-radius: 6px; color: var(--blue); background: #edf5ff; display: grid; place-items: center; }
.finance-billing-card header strong, .finance-billing-card header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-billing-card header strong { font-size: 13px; }
.finance-billing-card header small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.finance-billing-card header b { color: var(--blue); font-size: 13px; white-space: nowrap; }
.finance-billing-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; }
.finance-billing-meta span { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
.finance-billing-meta svg { width: 14px; height: 14px; color: var(--blue); }
.finance-billing-items { margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 6px; }
.finance-billing-items li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.finance-billing-items b { color: var(--ink); white-space: nowrap; }
.finance-billing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.finance-billing-actions .secondary-btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.finance-billing-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.finance-billing-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.finance-billing-form input, .finance-billing-form select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; }
.finance-billing-form button { min-height: 42px; grid-column: 1 / -1; }
.finance-receipt-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.finance-order-detail { width: min(920px, calc(100vw - 24px)); max-height: min(760px, calc(100vh - 24px)); overflow: auto; background: white; color: var(--ink); border-radius: 8px; padding: 16px; display: grid; gap: 14px; }
.pilot-dialog:has(.finance-order-detail) { width: min(920px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; background: white; }
.finance-order-detail header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.finance-order-detail header h2 { margin: 0; font-size: 18px; }
.finance-order-detail header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.finance-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.finance-detail-summary > div { padding: 10px; border: 1px solid var(--line); border-radius: 6px; display: grid; gap: 4px; }
.finance-detail-summary small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.finance-detail-summary strong { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.finance-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.finance-detail-grid section { display: grid; align-content: start; gap: 8px; }
.finance-detail-grid h3 { margin: 0; font-size: 14px; }
.finance-detail-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.finance-detail-items, .finance-detail-timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.finance-detail-items li, .finance-detail-timeline li { border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.finance-detail-items small, .finance-detail-timeline small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.finance-evidence-list { display: grid; gap: 8px; }
.finance-evidence-list a { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; color: var(--ink); text-decoration: none; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: center; }
.finance-evidence-list strong, .finance-evidence-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-evidence-list small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.finance-order-detail footer { display: flex; justify-content: flex-end; }
.finance-order-detail footer a { text-decoration: none; }
.quote-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px; border: 1px solid #b9d4f4; border-radius: 7px; background: #f6faff; color: var(--ink); }
.quote-notice svg { flex: 0 0 auto; color: var(--blue); }
.quote-notice strong, .quote-notice small { display: block; }
.quote-notice small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.quote-title-actions { display: flex; align-items: center; gap: 8px; }
.quote-new-action { flex: 0 0 auto; min-height: 44px; padding: 0 14px; }
.quote-workspace { display: grid; gap: 12px; }
.quote-workspace > .quote-card:only-child { width: min(100%, 920px); }
.quote-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.quote-card > header { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.quote-card-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--blue); background: #edf4ff; }
.quote-card header strong, .quote-card header small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-card header small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.quote-card header b { color: var(--blue); white-space: nowrap; }
.quote-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.quote-card-meta > span:not(.status-pill) { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; }
.quote-card-meta svg { width: 15px; height: 15px; }
.quote-workflow-note { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 8px; align-items: center; padding: 9px 0; border-block: 1px solid var(--line); }
.quote-workflow-note > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; color: var(--blue); background: #edf4ff; }
.quote-workflow-note svg { width: 16px; height: 16px; }
.quote-workflow-note small, .quote-workflow-note strong { display: block; }
.quote-workflow-note small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.quote-workflow-note strong { margin-top: 2px; font-size: 12px; line-height: 1.35; }
.quote-card-note, .quote-side-effect-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.quote-card-note svg, .quote-side-effect-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--green); }
.quote-item-preview, .quote-revisions { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.quote-item-preview li, .quote-revisions li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 42px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.quote-item-preview span, .quote-revisions span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-revisions strong, .quote-revisions small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-revisions small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.quote-revisions .secondary-btn { min-height: 34px; padding: 0 10px; font-size: 12px; text-decoration: none; }
.quote-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quote-actions .primary-btn, .quote-actions .secondary-btn { flex: 0 1 auto; min-height: 44px; padding: 0 12px; text-decoration: none; }
.quote-form { display: grid; gap: 14px; }
.quote-form header, .quote-product-picker header, .quote-decision-form header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quote-form header h2, .quote-form header p, .quote-product-picker header h2, .quote-product-picker header p, .quote-decision-form header h2, .quote-decision-form header p { margin: 0; }
.quote-form-section { display: grid; gap: 12px; min-width: 0; }
.quote-form-section h3 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.quote-form-pair, .quote-item-numbers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.quote-form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quote-form-section-heading .secondary-btn { flex: 0 0 auto; min-height: 40px; padding: 0 10px; }
.quote-item-row { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.quote-item-main { display: grid; grid-template-columns: minmax(92px,.35fr) minmax(0,1fr) auto; gap: 10px; align-items: end; }
.quote-item-main .secondary-btn { min-height: 48px; margin: 0; padding: 0 10px; }
.quote-item-numbers { grid-template-columns: minmax(74px,.7fr) minmax(64px,.55fr) minmax(96px,1fr) minmax(96px,1fr) 44px; align-items: end; }
.quote-item-numbers .icon-btn { width: 44px; height: 48px; margin: 0; color: var(--red); }
.quote-form-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote-form-totals span { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.quote-form-totals b { color: var(--ink); font-size: 15px; }
.quote-product-picker .catalog-list { max-height: 50vh; overflow: auto; }
.pilot-dialog:has(.quote-form) { width: min(920px, calc(100% - 32px)); }
@media (max-width: 520px) {
  .finance-billing-card header { grid-template-columns: 34px minmax(0, 1fr); }
  .finance-billing-card header b { grid-column: 2; }
  .finance-billing-actions { display: grid; grid-template-columns: 1fr; }
  .finance-billing-form { grid-template-columns: 1fr; }
  .finance-billing-form button { width: 100%; }
  .finance-detail-summary, .finance-detail-grid { grid-template-columns: 1fr; }
  .finance-order-detail { width: calc(100vw - 16px); padding: 12px; }
  .pilot-dialog:has(.finance-order-detail) { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .finance-order-detail { width: 100%; max-height: 100%; border-radius: 0; box-sizing: border-box; }
  .quote-card > header { grid-template-columns: 34px minmax(0,1fr); }
  .quote-card > header > b { grid-column: 2; justify-self: start; }
  .quote-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .quote-actions .primary-btn, .quote-actions .secondary-btn { width: 100%; }
  .pilot-dialog:has(.quote-form) { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; padding: 16px; border: 0; border-radius: 0; }
  .quote-form-pair, .quote-item-main, .quote-item-numbers, .quote-form-totals { grid-template-columns: minmax(0,1fr); }
  .quote-item-main .secondary-btn, .quote-item-numbers .icon-btn { width: 100%; }
}
.pos-recent-sale { width: 100%; border: 0; color: var(--ink); text-align: left; }
.pos-recent-sale:hover { background: var(--surface-hover); }
.pos-recent-sale > svg { width: 16px; color: var(--blue); }
.pos-connection-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warning-line); border-radius: 7px; color: var(--warning-ink); background: var(--warning-surface); font-size: 12px; line-height: 1.35; }
.pos-session { margin: 18px 0; }
.pos-session-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; display: grid; gap: 14px; }
.pos-session-card > div:first-child { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; }
.pos-session-card strong, .pos-session-card small { display: block; }
.pos-session-card strong { font-size: 15px; }
.pos-session-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.pos-session-card label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.pos-session-card input, .pos-payment-row input, .pos-payment-row select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; }
.pos-session-card.open { border-left: 4px solid var(--green); }
.pos-close-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.pos-close-row .secondary-btn { min-height: 42px; white-space: nowrap; }
.pos-sale { display: grid; gap: 18px; }
.pos-sale[hidden], .pos-recent-section[hidden], .pos-receipt[hidden] { display: none; }
.pos-pane-heading { display: none; }
.pos-receipt { margin: 0 0 18px; }
.pos-receipt-card { padding: 14px; border: 1px solid var(--line-info); border-radius: 8px; background: var(--surface-info); }
.pos-receipt-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--divider-info); }
.pos-receipt-card header small, .pos-receipt-card header strong, .pos-receipt-card header span { display: block; }
.pos-receipt-card header small { color: var(--blue); font-size: 10px; font-weight: 900; }
.pos-receipt-card header strong { margin-top: 4px; font-size: 15px; }
.pos-receipt-card header span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.pos-receipt-items { display: grid; gap: 9px; padding: 12px 0; }
.pos-receipt-items > div, .pos-receipt-payments > span, .pos-receipt-card footer { display: flex; justify-content: space-between; gap: 12px; }
.pos-receipt-items span, .pos-receipt-items small { display: block; }
.pos-receipt-items span { min-width: 0; font-size: 12px; font-weight: 800; }
.pos-receipt-items small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.pos-receipt-items b { flex: 0 0 auto; font-size: 12px; }
.pos-receipt-payments { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--divider-info); color: var(--muted); font-size: 11px; }
.pos-receipt-payments b { color: var(--ink); }
.pos-receipt-card footer { align-items: baseline; padding-top: 11px; border-top: 1px solid var(--divider-info); font-size: 13px; font-weight: 900; }
.pos-receipt-card footer strong { color: var(--blue); font-size: 17px; }
.pos-cash-expected { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface-raised); }
.pos-cash-expected span { font-size: 11px; font-weight: 800; }
.pos-cash-expected strong { font-size: 16px; }
.pos-close-preview { display: block; margin-top: -5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.pos-close-preview.matched { color: var(--green); }
.pos-close-preview.difference { color: var(--amber); }
.pos-product-results { max-height: 230px; overflow: auto; }
.pos-cart-section, .pos-payments-section { padding-top: 2px; }
.pos-cart-section .section-title, .pos-payments-section .section-title { margin-bottom: 9px; }
.pos-cart-section .section-title > strong { color: var(--blue); font-size: 16px; }
.pos-cart-heading-actions { display: flex; align-items: center; gap: 6px; }
.pos-clear-cart { width: 32px; height: 32px; color: var(--red); }
.pos-clear-cart svg { width: 16px; height: 16px; }
.pos-clear-cart:disabled { opacity: .35; cursor: default; }
.pos-cart, .pos-payments { display: grid; gap: 8px; }
.pos-cart-item { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: white; display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; gap: 9px; align-items: center; }
.pos-cart-item strong, .pos-cart-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-cart-item strong { font-size: 12px; }
.pos-cart-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pos-quantity { display: grid; grid-template-columns: 26px 22px 26px; gap: 3px; align-items: center; text-align: center; }
.pos-quantity button, .pos-remove, .pos-payment-row button { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; font-weight: 800; display: grid; place-items: center; }
.pos-quantity b { font-size: 12px; }
.pos-remove { color: var(--red); }
.pos-line-total { display: none; color: var(--ink); font-size: 12px; white-space: nowrap; text-align: right; }
.pos-payment-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 26px; gap: 8px; align-items: center; }
.pos-payment-row:has(button:only-child) { grid-template-columns: minmax(0, 1fr) 104px; }
.pos-payment-row select, .pos-payment-row input { min-width: 0; width: 100%; }
.pos-recent-section { margin-top: 25px; }
.pos-checkout-summary { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line-info); border-radius: 7px; background: var(--surface-info); }
.pos-checkout-summary span { color: var(--muted); font-size: 11px; font-weight: 800; }
.pos-checkout-summary strong { color: var(--blue); font-size: 24px; line-height: 1.1; }
.pos-checkout-summary small { color: var(--muted); font-size: 11px; }
.pos-payment-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 9px; }
.pos-payment-quick button { min-height: 34px; padding: 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; font-size: 11px; font-weight: 800; }
.pos-payment-quick button.active { border-color: var(--blue); color: var(--blue); background: var(--surface-selection); }
@media (min-width: 960px) {
  .quote-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .quote-workspace { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-workspace > .quote-card:only-child { grid-column: 1 / -1; }
  .quote-card { align-content: start; }
  #pdvView { max-width: none; }
  .pdv-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
  .pdv-heading p { margin: 0; }
  .pos-session { margin: 16px 0; }
  .pos-session-card.open { grid-template-columns: minmax(220px, 1fr) minmax(220px, .8fr) minmax(310px, 1fr); align-items: end; gap: 18px; }
  .pos-session-card.open > div:first-child { align-self: center; }
  .pos-session-card.open .pos-cash-expected { align-self: stretch; }
  .pos-session-card.open .pos-close-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pos-session-card.open .pos-close-preview { grid-column: 3; margin: -12px 0 0; }
  .pos-sale { grid-template-columns: minmax(250px, .84fr) minmax(320px, 1.14fr) minmax(280px, .86fr); align-items: start; gap: 16px; }
  .pos-products-pane, .pos-cart-section, .pos-checkout-pane { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
  .pos-products-pane { display: grid; gap: 12px; }
  .pos-pane-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .pos-pane-heading h2 { margin: 0; font-size: 16px; }
  .pos-pane-heading span { color: var(--muted); font-size: 11px; }
  .pos-products-pane .search-bar { margin: 0; }
  .pos-product-results { min-height: 330px; max-height: calc(100vh - 390px); }
  .pos-cart-section { padding-top: 15px; }
  .pos-cart { max-height: calc(100vh - 396px); overflow: auto; padding-right: 2px; }
  .pos-cart-item { grid-template-columns: minmax(0, 1fr) auto auto 32px; }
  .pos-quantity { grid-template-columns: 30px 26px 30px; }
  .pos-quantity button, .pos-remove { width: 30px; height: 30px; }
  .pos-line-total { display: block; }
  .pos-checkout-pane { position: sticky; top: 18px; display: grid; gap: 16px; box-shadow: 0 6px 20px rgba(7, 26, 43, .06); }
  .pos-payments-section { padding: 0; }
  .pos-checkout-pane .approve-btn { width: 100%; min-height: 56px; margin: 0; }
  .pos-recent-section { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
  .pos-recent-section .section-title { margin: 0; }
  .pos-recent-section .finance-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
}
.menu-list { display: grid; gap: 9px; }
.menu-list button { width: 100%; min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); display: grid; grid-template-columns: 44px 1fr 20px; align-items: center; gap: 12px; text-align: left; }
.menu-icon { width: 44px; height: 44px; border-radius: 7px; display: grid; place-items: center; color: var(--blue); background: #e9f1fd; }
.menu-icon.purchase { color: var(--green); background: #e7f5ee; }
.menu-icon.commercial { color: #0b5f8a; background: #e7f5ff; }
.menu-icon.clients { color: #986200; background: #fff2d9; }
.menu-icon.team { color: #a22f42; background: #fbe8ec; }
.menu-icon.settings { color: #596773; background: #edf0f2; }
.menu-list strong, .menu-list small { display: block; }
.menu-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.menu-list > button > svg { width: 17px; color: var(--muted); }
.back-link { min-height: 42px; margin: -8px 0 15px; padding: 0; border: 0; background: transparent; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; }
.xml-import { min-height: 112px; padding: 18px; border: 2px dashed #9ab8dd; border-radius: 8px; background: #f5f9ff; color: var(--blue); display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 13px; }
.xml-import > svg { width: 32px; height: 32px; }
.xml-import strong, .xml-import small { display: block; }
.xml-import small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.xml-import input { display: none; }
.purchase-status { margin-top: 14px; min-height: 74px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; background: white; color: var(--green); }
.purchase-status strong, .purchase-status small { display: block; }
.purchase-status small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.settings-list { border-top: 1px solid var(--line); }
.settings-list > div { min-height: 72px; padding: 12px 4px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.settings-list small, .settings-list strong { display: block; }
.settings-list small { color: var(--muted); margin-bottom: 5px; }
.settings-list svg { color: var(--muted); }

.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,1180px); height: 72px; padding: 7px max(6px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
.bottom-nav button { border: 0; background: transparent; color: #778593; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; }
.bottom-nav button.active { color: var(--blue); }
.bottom-nav .nav-create { align-self: start; justify-self: center; width: 52px; height: 52px; margin-top: -23px; border: 5px solid white; border-radius: 50%; color: white; background: var(--blue); box-shadow: 0 5px 14px rgba(7,89,217,.28); }
.bottom-nav .nav-create svg { width: 25px; height: 25px; }

.sheet-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(2,12,21,.52); }
.order-sheet { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(100%,620px); background: white; transform: translateX(105%); transition: transform .25s ease; display: grid; grid-template-rows: auto 4px minmax(0,1fr) auto; box-shadow: -15px 0 40px rgba(0,0,0,.2); }
.order-sheet.open { transform: translateX(0); }
.sheet-header { min-height: 66px; padding: 10px 14px; display: grid; grid-template-columns: 42px 1fr 60px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.sheet-header > div { text-align: center; }
.sheet-header strong, .sheet-header span { display: block; }
.sheet-header span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.text-btn { border: 0; color: var(--blue); background: transparent; font-weight: 800; }
.progress { background: #e6ebef; }
.progress span { display: block; width: 25%; height: 4px; background: var(--blue); transition: width .2s; }
.sheet-content { overflow-y: auto; padding: 25px 20px 32px; }
.form-step { display: none; }
.form-step.active { display: block; }
.step-copy { position: relative; padding-left: 48px; margin-bottom: 27px; }
.step-copy > span { position: absolute; left: 0; top: 1px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #e7effc; font-size: 11px; font-weight: 900; }
.step-copy h2 { margin: 0; font-size: 22px; }
.step-copy p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; font-size: 13px; }
.field-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
textarea { width: 100%; resize: vertical; min-height: 150px; padding: 14px; border: 1px solid #cfd8df; border-radius: 8px; color: var(--ink); outline: 0; line-height: 1.5; }
textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,89,217,.1); }
.field-select { width: 100%; min-height: 52px; padding: 0 13px; border: 1px solid #cfd8df; border-radius: 8px; color: var(--ink); background: white; font: inherit; }
.selected-box { padding: 15px; border: 2px solid var(--blue); border-radius: 8px; background: #f4f8ff; }
.selected-box strong, .selected-box span { display: block; }
.selected-box span { color: var(--muted); margin-top: 4px; font-size: 12px; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.capture-btn { min-height: 72px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 800; }
.capture-btn svg { color: var(--blue); }
.capture-btn.is-listening { background: #b42318; color: white; box-shadow: 0 0 0 0 rgba(180, 35, 24, .55); animation: voice-listening-pulse 1.25s ease-out infinite; }
.capture-btn.is-listening svg { color: white; animation: voice-listening-mic .8s ease-in-out infinite alternate; }
.capture-btn input { display: none; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; }
.photo-thumb { width: 74px; height: 74px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; }
.magic-btn { width: 100%; min-height: 76px; padding: 13px 15px; display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; border: 1px solid #a9c6f4; border-radius: 8px; color: var(--blue); background: #f3f7fe; text-align: left; }
.material-search-results { display: grid; gap: 6px; margin: 8px 0 14px; }
.material-search-results button { width: 100%; min-height: 62px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 8px; text-align: left; }
.material-search-results span, .material-search-results small { display: block; }
.material-search-results small { margin-top: 3px; color: var(--muted); }
.editable-material { display: block; padding: 13px; }
.material-title, .material-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.material-title button { width: 42px; height: 42px; border: 0; color: var(--red); background: transparent; }
.material-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 10px 0; }
.material-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.material-fields input { width: 100%; min-height: 44px; padding: 0 9px; border: 1px solid #cfd8df; border-radius: 6px; color: var(--ink); font: inherit; font-weight: 700; }
.material-foot { padding-top: 9px; border-top: 1px solid var(--line); font-size: 11px; }
.material-foot em { color: var(--green); font-style: normal; }
.material-foot em.warn { color: var(--red); }
.magic-btn > svg { width: 27px; height: 27px; }
.magic-btn strong, .magic-btn small { display: block; }
.magic-btn small { color: var(--muted); margin-top: 4px; }
.material-list { margin-top: 15px; }
.material-card { padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.material-card strong, .material-card span { display: block; }
.material-card span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.material-card em { color: var(--green); font-size: 11px; font-style: normal; }
.material-card em.warn { color: var(--amber); }
.total-row { display: flex; justify-content: space-between; margin-top: 20px; padding: 16px 0; border-top: 2px solid var(--navy); font-size: 17px; }
.loading-note, .warning-note { margin-top: 12px; padding: 11px; border-radius: 6px; font-size: 12px; }
.loading-note { color: var(--blue); background: #edf4ff; }
.warning-note { color: var(--amber); background: #fff6e7; }
.review-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.review-section { padding: 15px; border-bottom: 1px solid var(--line); }
.review-section:last-child { border-bottom: 0; }
.review-section small { display: block; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; font-weight: 800; }
.review-section strong, .review-section p { margin: 0; line-height: 1.4; }
.review-section p { color: var(--muted); font-size: 13px; }
.check-row { min-height: 54px; margin-top: 15px; display: flex; align-items: center; gap: 11px; font-weight: 700; }
.check-row input { width: 21px; height: 21px; accent-color: var(--blue); }
.approve-btn { width: 100%; min-height: 50px; border: 0; border-radius: 6px; color: white; background: var(--green); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; }
.approve-btn:disabled { cursor: not-allowed; background: #aeb9c1; }
.safe-note { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.safe-note svg { width: 15px; height: 15px; }
.sheet-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); display: flex; gap: 10px; border-top: 1px solid var(--line); background: white; }
.primary-btn, .secondary-btn { min-height: 48px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; }
.sheet-footer button[hidden] { display: none; }
.primary-btn { flex: 1; border: 0; color: white; background: var(--blue); }
.secondary-btn { padding: 0 15px; border: 1px solid var(--line); color: var(--ink); background: white; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 88px; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 6px; color: white; background: var(--navy); box-shadow: var(--shadow); transform: translate(-50%,30px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }

@media (min-width: 760px) {
  body { padding: 22px; }
  .app-shell { min-height: calc(100vh - 44px); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
  .app-header { padding: 0 34px; }
  .view { padding: 36px 40px 50px; }
  .greeting h1, .page-heading h1 { font-size: 30px; }
  .new-order { max-width: 650px; }
  .dashboard-metrics { max-width: 650px; }
  .management-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .management-card { min-height: 176px; }
  .attention-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .menu-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .draft-list, .order-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bottom-nav { bottom: 22px; width: min(calc(100% - 44px),1180px); border-radius: 0 0 8px 8px; }
}

@media (max-width: 370px) {
  .view { padding-left: 15px; padding-right: 15px; }
  .new-order { grid-template-columns: 42px 1fr 18px; padding: 13px; }
  .new-order-icon { width: 42px; height: 42px; }
  .capture-actions { grid-template-columns: 1fr; }
}
/* Scoped pilot identity and assignment controls. */
.identity-locked main, .identity-locked .bottom-nav { display: none; }
.identity-notice { padding: 24px; }
.pilot-dialog { width: 440px; max-width: calc(100% - 32px); max-height: 90vh; overflow: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid #767676; border-radius: 8px; background: white; color: #17212b; }
.pilot-dialog::backdrop { background: #0008; }
.pilot-dialog label { display: block; margin: 16px 0; }
.pilot-dialog input, .pilot-dialog select { display: block; width: 100%; box-sizing: border-box; min-height: 48px; margin-top: 8px; }
.pilot-dialog textarea { box-sizing: border-box; min-height: 96px; margin-top: 8px; }
.pilot-dialog input[type="checkbox"] { width: 22px !important; min-width: 22px; height: 22px; min-height: 22px !important; margin: 0; padding: 0; accent-color: var(--blue); }
.technician-route-prompt { display: grid; gap: 10px; }
.technician-route-prompt h2, .technician-route-prompt p { margin: 0; }
.technician-route-prompt h2 { font-size: 18px; }
.technician-route-prompt > strong { font-size: 15px; }
.technician-route-prompt > p, .technician-route-prompt > small { color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.technician-route-prompt > a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 6px; color: white; background: var(--blue); font-weight: 800; text-align: center; text-decoration: none; }
.technician-route-prompt > a svg { width: 18px; height: 18px; }
.technician-route-prompt > div { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.technician-route-prompt > div button { margin: 0; padding: 8px; font-size: 12px; }
.technician-route-prompt [data-confirm-arrival] { border: 0; border-radius: 6px; color: white; background: var(--green); font-weight: 800; }
@media (max-width: 380px) { .technician-route-prompt > div { grid-template-columns: 1fr; } }
.technical-work-state { margin: 14px 0; padding: 12px; border-left: 4px solid var(--green); background: #effaf4; }
.technical-work-state strong, .technical-work-state span { display: block; }
.technical-work-state span, .technical-next-step { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.technical-next-step { padding-top: 8px; border-top: 1px solid var(--line); }
.technical-form { display: grid; gap: 12px; }
.technical-form-header h2, .technical-form-header strong { display: block; }
.technical-form-header h2 { margin: 0; color: var(--blue); font-size: 11px; font-weight: 800; }
.technical-form-header strong { margin-top: 3px; font-size: 20px; }
.technical-context, .technical-timing, .technical-future { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9fb; }
.technical-context span, .technical-timing span, .technical-timing small, .technical-future span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.technical-timing { border-left: 4px solid var(--green); background: #effaf4; }
.technical-timing strong { font-size: 15px; }
.technical-timing.has-visit-control { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.technical-timing.has-visit-control > :is(span, strong, small) { grid-column: 1; }
.technical-timing .visit-pause-control { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; min-width: 116px; min-height: 44px; margin: 0; padding: 6px 10px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.15; }
.technical-timing .visit-pause-control svg { width: 17px; height: 17px; }
.technical-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.technical-steps button { min-height: 40px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); font-size: 11px; font-weight: 800; }
.technical-steps button.active { border-color: var(--blue); color: var(--blue); background: #eef5ff; }
.technical-panel { display: none; }
.technical-panel.active { display: block; }
.technical-panel h3 { margin: 8px 0; font-size: 16px; }
.technical-summary { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9fb; }
.technical-summary strong, .technical-summary p { display: block; margin: 0; }
.technical-summary strong { margin-top: 10px; color: var(--blue); font-size: 11px; text-transform: uppercase; }
.technical-summary strong:first-child { margin-top: 0; }
.technical-summary p { margin-top: 3px; line-height: 1.45; white-space: pre-wrap; }
.technical-warning { padding: 10px; color: var(--amber); background: #fff6e7; font-size: 11px; line-height: 1.4; }
.technical-form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.technical-form-footer p { flex: 1 0 100%; margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.technical-form-footer p[data-state="error"] { padding: 9px; border-left: 3px solid #b42318; color: #7a271a; background: #fef3f2; font-size: 13px; font-weight: 700; }
.technical-hint { margin: -4px 0 4px; color: var(--muted); font-size: 12px; }
.technical-voice { padding: 12px; border: 1px solid #88aee0; border-radius: 7px; background: #f3f7fe; }
.technical-voice > button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: white; font-weight: 800; }
.technical-voice > button.is-listening { position: relative; background: #b42318; box-shadow: 0 0 0 0 rgba(180, 35, 24, .55); animation: voice-listening-pulse 1.25s ease-out infinite; }
.technical-voice > button.is-listening::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.24); animation: voice-listening-dot .8s ease-in-out infinite alternate; }
.technical-voice > button.is-listening svg { animation: voice-listening-mic .8s ease-in-out infinite alternate; }
.technical-voice > p, .technical-voice > [role="status"] { margin: 7px 0 0; font-size: 12px; line-height: 1.4; }
.technical-voice > [role="status"] { color: var(--blue); font-weight: 700; }
.technical-voice [data-tech-voice-review] { margin-top: 10px; padding-top: 10px; border-top: 1px solid #b8cce8; }
.technical-voice [data-tech-voice-review] small, .technical-voice [data-tech-voice-review] strong { display: block; margin-top: 8px; }
.technical-voice [data-tech-voice-review] p { margin: 2px 0 6px; white-space: pre-wrap; }
.technical-voice [data-tech-voice-review] em { display: block; margin: 5px 0; color: var(--amber); font-size: 11px; }
.technical-voice [data-tech-voice-review] > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.technical-voice .voice-draft-review { display: grid; gap: 9px; }
.technical-voice .voice-draft-review > header { display: grid; gap: 2px; }
.technical-voice .voice-draft-review > header span { color: var(--blue); font-size: 10px; font-weight: 900; }
.technical-voice .voice-draft-review > header strong { margin: 0; font-size: 16px; }
.pilot-dialog .technical-voice .voice-draft-review label { display: grid; gap: 4px; margin: 0; color: var(--ink); font-size: 12px; font-weight: 800; }
.pilot-dialog .technical-voice .voice-draft-review textarea { min-height: 74px; margin: 0; padding: 9px 10px; background: white; }
.pilot-dialog .technical-voice .voice-refresh { justify-self: start; min-height: 38px; margin: -2px 0 0; padding: 6px 10px; font-size: 12px; }
.technical-voice .voice-materials { display: grid; gap: 7px; }
.technical-voice .voice-materials > strong { margin: 2px 0 0; font-size: 13px; }
.technical-voice .voice-materials > p { margin: 0; color: var(--muted); font-size: 12px; }
.technical-voice .voice-material-card { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 4px 9px; padding: 9px; border: 1px solid #c8d8ed; border-radius: 7px; background: white; }
.pilot-dialog .technical-voice .voice-material-card .check-row { grid-column: 1 / -1; min-height: 32px; margin: 0; font-size: 11px; color: var(--muted); }
.pilot-dialog .technical-voice .voice-material-card .check-row > input { width: 18px !important; min-width: 18px; height: 18px; min-height: 18px !important; }
.technical-voice .voice-material-card > strong { align-self: center; margin: 0; font-size: 13px; }
.technical-voice .voice-material-card > small { align-self: center; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.pilot-dialog .technical-voice .voice-material-card > label:not(.check-row) { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.pilot-dialog .technical-voice .voice-draft-review .voice-material-quantity { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 3px 0 0; padding-top: 7px; border-top: 1px solid #e5ebf2; }
.pilot-dialog .technical-voice .voice-material-quantity > span { flex: 1 1 auto; font-weight: 800; }
.pilot-dialog .technical-voice .voice-material-card input[type="number"] { display: inline-block; flex: 0 0 76px; width: 76px !important; min-width: 76px; min-height: 40px; margin: 0; padding: 6px 8px; border-radius: 7px; font-size: 16px; font-weight: 800; text-align: center; }
.pilot-dialog .technical-voice .voice-draft-review > footer button { min-height: 46px; margin: 0; border-radius: 8px; }
.technical-voice .voice-draft-review footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.pilot-dialog .technical-voice .voice-draft-review footer button { min-height: 44px; margin: 0; padding: 8px; font-size: 12px; }
@keyframes voice-listening-pulse { 0% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .55); } 70% { box-shadow: 0 0 0 10px rgba(180, 35, 24, 0); } 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); } }
@keyframes voice-listening-dot { from { opacity: .45; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
@keyframes voice-listening-mic { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .technical-voice > button.is-listening, .technical-voice > button.is-listening::before, .technical-voice > button.is-listening svg { animation: none; } }
.technical-photo-capture { min-height: 58px; margin: 8px 0; padding: 10px 14px; border: 1px solid #9ab8dd; border-radius: 7px; background: #f3f7fe; color: var(--blue); display: flex !important; align-items: center; justify-content: center; gap: 9px; font-weight: 800; }
.technical-photo-capture input { display: none !important; }
.technical-photo-capture svg { width: 22px; height: 22px; }
.technical-photo-list { display: grid; gap: 7px; margin-bottom: 12px; }
.technical-photo-card { min-height: 66px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; display: grid; grid-template-columns: 52px 1fr 42px; align-items: center; gap: 9px; }
.technical-photo-card > span:nth-child(2) { min-width: 0; }
.technical-photo-card strong, .technical-photo-card small { display: block; overflow-wrap: anywhere; }
.technical-photo-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.technical-photo-preview { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: #edf0f2; display: grid; place-items: center; color: var(--muted); }
.technical-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.technical-photo-card button { width: 42px; height: 42px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--red); display: grid; place-items: center; }
.technical-material { display: grid; gap: 9px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.technical-material-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.technical-material-heading strong { min-width: 0; overflow-wrap: anywhere; }
.technical-material-heading button { flex: 0 0 auto; min-height: 40px; margin: 0; padding: 7px 10px; }
.technical-material label { margin: 0; }
.technical-material label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.technical-material-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.technical-equipment-toggle { min-height: 40px; margin: 0 !important; padding: 7px 9px; border: 1px solid #b8cce8; border-radius: 6px; background: #f3f7fe; color: var(--blue); }
.technical-material.invalid { padding: 8px; border: 2px solid #b42318; border-radius: 6px; background: #fef3f2; }
.technical-material [aria-invalid="true"] { border-color: #b42318; outline: 2px solid rgba(180, 35, 24, 0.2); }
.technical-form textarea[aria-invalid="true"] { border: 2px solid #b42318; background: #fff7f6; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }
.technical-form textarea[aria-invalid="true"]:focus { border-color: #b42318; box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.2); }
.technical-form .technical-field-invalid { color: #b42318; }
.technical-form .technical-field-invalid > :is(textarea, input, select),
.technical-form .technical-field-invalid[aria-invalid="true"] { border: 2px solid #b42318; background: #fff7f6; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }
.technical-form .technical-steps button.has-error { border-color: #b42318; color: #b42318; }
.technical-material input, .technical-material select { min-width: 0; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.technical-checklist { display: grid; gap: 6px; }
.technical-acceptance { display: grid; gap: 10px; margin-top: 16px; padding: 14px; border: 1px solid #b8cce8; border-radius: 8px; background: #f3f7fe; }
.technical-acceptance h3 { margin: 0; }
.technical-acceptance label { margin: 0; }
.technical-acceptance [data-acceptance-reason][hidden] { display: none; }
.technical-acceptance-summary { min-height: 18px; color: var(--muted); font-size: 12px; }
.technical-acceptance > [data-open-acceptance-signature] { width: 100%; margin: 0; background: var(--blue); color: white; }
.technical-acceptance-exception { color: var(--muted); font-size: 12px; }
.technical-acceptance-exception summary { cursor: pointer; }
.technical-acceptance-exception > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.technical-acceptance-exception button { min-height: 40px; margin: 0; padding: 7px 10px; }
.acceptance-capture-form { display: grid; gap: 14px; min-height: calc(100vh - 36px); }
.acceptance-capture-form header > span { color: var(--blue); font-size: 11px; font-weight: 800; }
.acceptance-capture-form h2 { margin: 3px 0 5px; }
.acceptance-capture-form header p { margin: 0; color: var(--muted); line-height: 1.4; }
.acceptance-capture-form label { margin: 0; }
.acceptance-capture-form input { min-height: 44px; margin-top: 6px; }
.acceptance-capture-pad { display: grid; gap: 8px; min-height: 0; }
.acceptance-capture-pad canvas { display: block; width: 100%; height: min(38vh, 340px); min-height: 240px; border: 2px dashed #7f91a6; border-radius: 8px; background: white; touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.acceptance-capture-form footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.acceptance-capture-form footer button { margin: 0; }
.acceptance-capture-form footer .primary-btn { grid-column: 1 / -1; background: var(--blue); color: white; }
.acceptance-capture-form footer button:disabled { opacity: .45; }
.technical-inline-error { min-height: 18px; margin: 0; color: #b42318; font-size: 12px; font-weight: 700; }
@media (max-width: 620px) {
  .technical-material-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .pilot-dialog:has(.technical-form) { width: 100%; max-width: none; max-height: 100vh; height: 100vh; margin: 0; border: 0; border-radius: 0; padding: 18px; }
  .pilot-dialog:has(.acceptance-capture-form) { width: 100%; max-width: none; max-height: 100vh; height: 100vh; margin: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; padding: 18px; }
  .acceptance-capture-pad canvas { height: clamp(250px, 32vh, 280px); }
}
.pilot-dialog button { min-height: 48px; padding: 10px 16px; margin: 4px; }
.pilot-dialog .technical-form label { margin: 9px 0; }
.pilot-dialog .technical-form .technical-material label,
.pilot-dialog .technical-form .technical-acceptance label { margin: 0; }
.pilot-dialog .check-row { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0; }
.pilot-dialog .check-row > input[type="checkbox"] { display: inline-block; flex: 0 0 22px; width: 22px !important; min-width: 22px; height: 22px; min-height: 22px !important; margin: 0; }
.pilot-dialog .check-row > span { display: block; flex: 1 1 auto; min-width: 0; margin: 0; }
.pilot-dialog .technical-equipment-toggle { display: flex; min-height: 44px; margin: 4px 0 !important; padding: 8px 10px; }
.pilot-dialog .technical-form textarea[name="service_performed"] { min-height: 90px; }
.pilot-dialog .technical-form textarea[name="technical_notes"],
.pilot-dialog .technical-form textarea[name="pending_notes"],
.pilot-dialog .technical-form textarea[name="return_request_reason"] { min-height: 76px; }
.pilot-dialog .technical-material-heading button { min-height: 44px; margin: 0; padding: 6px 10px; }
.pilot-dialog .technical-form-footer button,
.pilot-dialog .review-items-footer button { margin: 0; }
.pilot-dialog .review-change-product { min-height: 42px; margin: 0 !important; }
.technical-material-summary { display: grid; gap: 4px; min-width: 0; }
.technical-material-summary strong { overflow-wrap: anywhere; }
.technical-material-summary span { color: var(--muted); font-size: 12px; }
.technical-material-actions { display: flex; align-items: center; gap: 4px; }
.technical-material-editor { display: grid; gap: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.technical-return-reason[hidden] { display: none; }
.review-items-form { display: grid; gap: 14px; }
.review-items-header { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.review-items-header > span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.review-items-header h2 { margin: 3px 0 5px; }
.review-items-header p { margin: 0; color: var(--muted); line-height: 1.4; }
.review-items-list { display: grid; gap: 10px; padding-bottom: 120px; }
.review-item-card { min-width: 0; margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.review-item-card legend { padding: 0 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.review-item-card label { margin: 9px 0; }
.review-product-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; margin-bottom: 7px; }
.review-selected-product { display: grid; gap: 3px; min-width: 0; }
.review-selected-product strong { overflow-wrap: anywhere; font-size: 16px; }
.review-selected-product span, .review-product-result span, .review-product-result small { color: var(--muted); font-size: 12px; }
.review-change-product { width: auto; }
.review-product-picker { padding: 10px; border: 1px solid #b8cce8; border-radius: 7px; background: #f3f7fe; }
.review-product-picker[hidden] { display: none; }
.review-search-state { margin: 7px 0; color: var(--muted); font-size: 12px; }
.review-product-results { display: grid; gap: 7px; }
.review-product-result { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.review-product-result > div { display: grid; gap: 3px; min-width: 0; }
.review-product-result strong { overflow-wrap: anywhere; }
.review-product-result button { flex: 0 0 auto; min-height: 44px; margin: 0; padding: 8px 10px; background: var(--blue); color: white; }
.review-manual-product { margin: 8px 0; color: var(--muted); font-size: 12px; }
.review-manual-product summary { cursor: pointer; }
.review-quantity-price { display: grid; grid-template-columns: 1.1fr .8fr 1.1fr; gap: 8px; }
.review-quantity-price label { margin: 8px 0 !important; }
.stepper { display: flex; align-items: center; margin-top: 8px; }
.stepper input { min-width: 0; margin-top: 0 !important; text-align: center; }
.stepper button { flex: 0 0 44px; margin: 0; padding: 0; border: 1px solid var(--line); background: #eef5ff; color: var(--blue); font-size: 22px; }
.review-item-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.review-item-total span, .review-items-footer span { color: var(--muted); font-size: 12px; }
.review-item-total strong { font-size: 18px; }
.review-item-total small { flex-basis: 100%; color: var(--amber); }
.review-field-error { display: block; min-height: 15px; color: #b42318; font-size: 11px; }
.review-items-footer { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px 8px; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; box-shadow: 0 -8px 16px rgba(23, 33, 43, .08); }
.review-items-footer > div { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.review-items-footer > div strong { font-size: 20px; }
.review-items-footer > div small { display: none; }
.review-items-footer [data-review-status] { grid-column: 1 / -1; margin: 0; color: #b42318; font-size: 12px; font-weight: 700; }
.review-items-footer [data-review-status]:empty { display: none; }
.review-items-footer button { width: 100%; }
.review-items-footer .primary-btn { background: var(--blue); color: white; }
@media (min-width: 700px) {
  .review-items-form { gap: 18px; }
  .review-item-card { padding: 18px; }
  .review-change-product { width: auto; }
  .review-product-picker { max-width: 620px; }
}
@media (max-width: 480px) {
  .pilot-dialog:has(.review-items-form) { width: 100%; max-width: none; max-height: 100vh; height: 100vh; margin: 0; border: 0; border-radius: 0; padding: 16px; }
  .review-quantity-price { grid-template-columns: 1fr 1fr; }
  .review-quantity-price label:last-child { grid-column: span 2; }
  .review-product-result { align-items: stretch; flex-direction: column; }
  .review-product-result button { width: 100%; }
  .review-items-header p { font-size: 13px; }
  .review-item-card { padding: 10px; }
}
.technician-view [data-nav]:not([data-nav="ordens"]), .technician-view #newOrderBtn,
.technician-view .operation-metrics, .technician-view #draftList, .technician-view #draftList + form,
.technician-view #osSearchResult, .technician-view .filter-row, .technician-view .orders-list-title,
.technician-view #allOrdersList, .technician-view .section-title:has(#draftCount),
.technician-view #syncState { display: none; }
@media (max-width: 699px) {
  .technician-view #operationalList { margin-bottom: 0; }
  .technician-view #ordensView { padding-bottom: 8px; }
}
.technician-view .operation-heading { position: relative; padding-right: 52px; }
.technician-view .operation-heading > span { display: block; }
.technician-view .technician-refresh { position: absolute; top: 2px; right: 0; }
.technician-view .technician-empty-work { display: grid; gap: 4px; text-align: left; }
.technician-view .technician-empty-work span { color: var(--muted); font-size: 12px; }
.technician-location-share { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.technician-location-share > div:first-child { min-width: 0; }
.technician-location-share strong, .technician-location-share small { display: block; }
.technician-location-share strong { font-size: 13px; }
.technician-location-share small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.technician-location-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.technician-location-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: white; font-size: 11px; font-weight: 800; }
.technician-location-actions button:first-child { border-color: var(--blue); }
.technician-location-actions button:disabled { opacity: .6; }
.technician-location-actions button svg { width: 15px; height: 15px; }

/* Customer acceptance capture: a focused mobile surface, without altering the drawing pad. */
.pilot-dialog .acceptance-capture-form { gap: 12px; min-height: calc(100vh - 36px); }
.pilot-dialog .acceptance-capture-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pilot-dialog .acceptance-capture-header > div { min-width: 0; }
.pilot-dialog .acceptance-capture-header span { display: block; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.pilot-dialog .acceptance-capture-header h2 { margin: 3px 0 4px; font-size: 23px; line-height: 1.18; }
.pilot-dialog .acceptance-capture-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.pilot-dialog .acceptance-capture-cancel { flex: 0 0 auto; min-height: 38px; margin: -4px -8px 0 0; padding: 6px 8px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; }
.acceptance-capture-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pilot-dialog .acceptance-capture-fields label { display: grid; gap: 5px; margin: 0; color: var(--ink); font-size: 12px; font-weight: 800; }
.pilot-dialog .acceptance-capture-fields label > span { display: block; }
.pilot-dialog .acceptance-capture-fields em { color: var(--muted); font-style: normal; font-weight: 500; }
.pilot-dialog .acceptance-capture-fields input { width: 100%; min-width: 0; min-height: 50px; margin: 0; padding: 10px 11px; border: 1px solid #c6d0d9; border-radius: 10px; background: var(--white); }
.pilot-dialog .acceptance-capture-fields input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 89, 217, .14); outline: 0; }
.acceptance-capture-pad { display: grid; gap: 8px; min-height: 0; }
.acceptance-signature-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acceptance-signature-heading strong { font-size: 14px; }
.acceptance-signature-heading small { color: var(--muted); font-size: 11px; }
.acceptance-signature-surface { position: relative; overflow: hidden; border: 1px solid #cbd5de; border-radius: 14px; background: var(--white); box-shadow: inset 0 1px 0 rgba(7, 26, 43, .03); }
.acceptance-capture-pad canvas { position: relative; z-index: 1; display: block; width: 100%; height: clamp(220px, 29vh, 280px); min-height: 0; border: 0; border-radius: 0; background: transparent; touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.acceptance-signature-placeholder { position: absolute; inset: 0; z-index: 0; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 28px; color: var(--muted); pointer-events: none; transition: opacity .16s ease, visibility .16s ease; }
.acceptance-signature-placeholder svg { width: 23px; height: 23px; color: var(--blue); }
.acceptance-signature-placeholder strong { color: var(--ink); font-size: 15px; }
.acceptance-signature-placeholder span { font-size: 12px; }
.acceptance-signature-placeholder i { width: min(72%, 320px); height: 1px; margin-top: 14px; background: #b6c1ca; }
.acceptance-signature-placeholder[hidden] { display: none; }
.acceptance-capture-pad[data-signature-state="signed"] .acceptance-signature-placeholder { visibility: hidden; opacity: 0; }
.acceptance-capture-pad[data-signature-state="signed"] .acceptance-signature-heading small { color: var(--green); font-weight: 800; }
.acceptance-signature-actions { display: flex; justify-content: flex-end; gap: 4px; }
.pilot-dialog .acceptance-signature-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; margin: 0; padding: 6px 8px; border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.pilot-dialog .acceptance-signature-actions button svg { width: 17px; height: 17px; }
.pilot-dialog .acceptance-signature-actions button:disabled { opacity: .42; cursor: default; }
.pilot-dialog .acceptance-capture-form .technical-inline-error { min-height: 16px; margin: -3px 0 0; }
.pilot-dialog .acceptance-capture-form footer { display: block; margin-top: auto; padding: 10px 0 max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.pilot-dialog .acceptance-capture-form footer .primary-btn { width: 100%; min-height: 50px; margin: 0; border-radius: 10px; background: var(--blue); color: white; font-weight: 900; }
.pilot-dialog .acceptance-capture-form footer .primary-btn:disabled { opacity: .65; }
.opening-sla { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; margin: 10px 0 4px; padding: 10px 11px; border: 1px solid #b8cce8; border-radius: 8px; background: #f3f7fe; color: var(--ink); }
.opening-sla > svg { width: 20px; height: 20px; margin-top: 2px; color: var(--blue); }
.opening-sla > span { display: grid; gap: 2px; min-width: 0; }
.opening-sla strong { font-size: 12px; }
.opening-sla b { color: var(--blue); font-size: 15px; }
.opening-sla small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.opening-sla[data-state="loading"] { opacity: .78; }
.identity-form > p { margin: 4px 0 14px; color: var(--muted); line-height: 1.4; }
.identity-form .identity-current { margin: 10px 0; padding: 9px 10px; border-left: 3px solid var(--blue); background: #f3f7fe; color: var(--ink); }
.identity-form .identity-warning { padding: 9px 10px; border-left: 3px solid var(--amber); background: #fff8e8; color: #745510; font-size: 12px; }
.identity-form footer, .sla-settings footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.identity-form footer button, .sla-settings footer button { margin: 0; }
.identity-form .primary-btn { background: var(--blue); color: white; }
.identity-form .danger-btn { border-color: #d92d20; color: #b42318; background: #fff; }
.pilot-dialog:has(.customer-edit-form) { width: min(720px, calc(100% - 32px)); padding: 0; overflow-y: auto; }
.customer-edit-form { display: flex; min-height: min(760px, 86vh); flex-direction: column; width: 100%; min-width: 0; }
.customer-edit-header { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.pilot-dialog .customer-edit-header button { display: inline-flex; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink); }
.customer-edit-header button > span { font-size: 24px; font-weight: 400; line-height: 1; }
.customer-edit-header > div { min-width: 0; }
.customer-edit-header h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.1; }
.customer-edit-header p { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.customer-edit-content { display: grid; gap: 22px; width: 100%; min-width: 0; padding: 18px 20px 24px; box-sizing: border-box; }
.customer-edit-section { display: grid; gap: 16px; min-width: 0; }
.customer-edit-section h3 { margin: 0 0 -2px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.pilot-dialog .customer-edit-form label { display: grid; gap: 6px; min-width: 0; margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.2; }
.pilot-dialog .customer-edit-form label > span { display: block; }
.pilot-dialog .customer-edit-form input, .pilot-dialog .customer-edit-form select { width: 100%; max-width: 100%; min-width: 0; height: 48px; min-height: 48px; margin: 0; padding: 0 12px; box-sizing: border-box; border-radius: 6px; font-size: 16px; font-weight: 500; line-height: 1.25; }
.pilot-dialog .customer-edit-form input:focus-visible { border-color: var(--blue); outline: 2px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 1px; }
.customer-edit-pair { display: grid; min-width: 0; gap: 12px; }
.customer-edit-number { grid-template-columns: minmax(100px, 120px) minmax(0, 1fr); }
.customer-edit-city { grid-template-columns: minmax(0, 1fr) minmax(72px, 80px); }
.customer-edit-footer { position: sticky; bottom: 0; z-index: 3; display: grid !important; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px !important; margin: auto 0 0 !important; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)) !important; border-top: 1px solid var(--line); background: var(--white); box-shadow: 0 -6px 14px rgba(7, 26, 43, .08); }
.customer-edit-footer [role="status"] { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--muted); font-size: 12px; }
.customer-edit-footer [role="status"]:empty { display: none; }
.pilot-dialog .customer-edit-footer button { width: 100%; min-width: 0; height: 48px; min-height: 48px; margin: 0; padding: 0 12px; box-sizing: border-box; font-size: 16px; }
.customer-relation-list { display: grid; gap: 6px; }
.customer-relation-list > div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.customer-relation-list strong { font-size: 13px; }
.customer-relation-list small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.customer-relation-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.customer-relation-actions button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.customer-relation-form { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.customer-relation-form label { display: grid; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.customer-relation-form button { min-height: 44px; }
.product-edit-footer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-edit-footer [role="status"] { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .pilot-dialog:has(.identity-form.customer-edit-form) { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .customer-edit-form { min-height: 100%; }
  .customer-edit-header { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
  .customer-edit-content { gap: 20px; padding: 16px 16px 24px; }
  .customer-edit-section { gap: 16px; }
  .customer-relation-actions { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .customer-edit-number, .customer-edit-city { grid-template-columns: 1fr; }
}
.sla-settings { display: grid; gap: 10px; }
.sla-settings h2, .sla-settings p { margin: 0; }
.sla-settings > p { color: var(--muted); }
.sla-settings [data-sla-rules] { display: grid; gap: 8px; }
.sla-settings fieldset { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
.sla-settings legend { padding: 0 4px; font-weight: 800; }
.sla-settings label { margin: 0; font-size: 12px; }
.sla-settings .check-row { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .pilot-dialog:has(.identity-form), .pilot-dialog:has(.sla-settings) { width: calc(100% - 24px); max-height: calc(100vh - 24px); padding: 18px; }
  .identity-form footer { display: grid; grid-template-columns: 1fr 1fr; }
  .identity-form footer button:last-child { grid-column: 2; }
  .sla-settings fieldset { grid-template-columns: minmax(0, 1fr) 96px; }
}
@media (max-width: 520px) {
  .pilot-dialog:has(.acceptance-capture-form) { padding: 16px; }
  .acceptance-capture-fields { grid-template-columns: 1fr; gap: 8px; }
  .pilot-dialog .acceptance-capture-fields input { min-height: 48px; }
  .acceptance-capture-pad canvas { height: clamp(220px, 28vh, 260px); }
}
.operational-evidence { margin: 10px 0 4px; }
.operational-evidence > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.operational-evidence h4 { margin: 0; font-size: 13px; }
.operational-evidence > header span { color: var(--muted); font-size: 11px; }
.evidence-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 5px; }
.evidence-thumbnail { flex: 0 0 82px; width: 82px; height: 70px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #eef2f5; color: var(--muted); display: grid; place-items: center; font-size: 10px; line-height: 1.25; text-align: center; }
.evidence-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.evidence-thumbnail.pending { padding: 5px; border-style: dashed; }
.pilot-dialog:has(.evidence-viewer) { width: min(760px, calc(100% - 32px)); max-height: 92vh; padding: 16px; }
.evidence-viewer { display: grid; gap: 10px; }
.evidence-viewer > header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.evidence-viewer > header span { color: var(--blue); font-size: 10px; font-weight: 900; }
.evidence-viewer h2 { margin: 1px 0 0; font-size: 19px; }
.evidence-viewer > header button { width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }
.evidence-viewer-image { height: min(58vh, 560px); min-height: 220px; overflow: auto; display: grid; place-items: center; border-radius: 6px; background: #111820; color: white; }
.evidence-viewer-image img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; transition: transform .15s ease; }
.evidence-viewer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.evidence-viewer-controls button { min-width: 42px; min-height: 42px; margin: 0; padding: 7px; }
.evidence-viewer-controls [data-photo-view-original] { min-width: 100px; }
.evidence-viewer-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.evidence-viewer-meta dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.evidence-viewer-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.technical-material.needs-confirmation { gap: 6px; padding: 9px 10px; border-color: #ead29a; background: #fffaf0; }
.technical-material.needs-confirmation .technical-material-heading { padding: 0; border: 0; }
.technical-material-summary .material-confirmation-label { display: flex; align-items: center; gap: 5px; color: var(--amber); font-size: 12px; }
.technical-material-summary .material-confirmation-label svg { width: 15px; height: 15px; }
.technical-material-actions button { min-width: 44px; }
.technical-material-actions button[data-remove-material] { color: var(--red); }
.technical-voice .voice-material-card .voice-material-description { display: grid; gap: 2px; min-width: 0; }
.technical-voice .voice-material-card .voice-material-description strong { margin: 0; font-size: 13px; }
.technical-voice .voice-material-card .voice-material-description small { color: var(--muted); font-size: 10px; text-align: left; }
@media (max-width: 520px) {
  .pilot-dialog:has(.evidence-viewer) { width: 100%; max-width: none; max-height: 100vh; height: 100vh; margin: 0; border: 0; border-radius: 0; padding: 12px; }
  .evidence-viewer-image { height: min(56vh, 470px); }
  .evidence-viewer-meta { grid-template-columns: 1fr; }
}
