/* Bancada — gestão para assistência técnica
   Paleta inspirada na bancada do técnico: manta antiestática verde,
   etiqueta de serviço em papel manilha, fita de sinalização. */
:root {
  --paper: #EEF1F0; --surface: #FFFFFF; --surface-2: #F6F8F7; --ink: #16202A; --muted: #5B6873; --line: #D5DCDD;
  --mat: #2D5F57; --mat-deep: #1F4741; --mat-soft: #DCE9E5; --on-mat: #F3F8F6;
  --manila: #F3E2B6; --manila-line: #D9C287; --manila-ink: #3B2F12;
  --signal: #E3A21A; --danger: #B23A3A; --ok: #2E7D4F; --focus: #2B6CB0; --whats: #1F8F4E;
  --radius-s: 6px; --radius-m: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 42, .08), 0 4px 14px rgba(22, 32, 42, .06);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bottom-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121A1F; --surface: #1A242A; --surface-2: #202C33; --ink: #E7EEF0; --muted: #9AA8B1; --line: #2E3C44;
    --mat: #2F6C62; --mat-deep: #183A35; --mat-soft: #23413C; --on-mat: #EAF4F1;
    --manila: #4A4027; --manila-line: #6B5C35; --manila-ink: #F5E9C8; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121A1F; --surface: #1A242A; --surface-2: #202C33; --ink: #E7EEF0; --muted: #9AA8B1; --line: #2E3C44;
  --mat: #2F6C62; --mat-deep: #183A35; --mat-soft: #23413C; --on-mat: #EAF4F1;
  --manila: #4A4027; --manila-line: #6B5C35; --manila-ink: #F5E9C8; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--mat); }
:root[data-theme="dark"] a, :root:not([data-theme="light"]) a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.cap { text-transform: capitalize; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* Carregando */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.boot-tag { background: var(--manila); color: var(--manila-ink); border: 1px solid var(--manila-line); padding: 10px 22px 10px 34px; font-weight: 800; font-stretch: 70%; font-size: 30px; position: relative; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }

/* Layout */
#app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--mat); color: var(--on-mat); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 14px 14px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand strong { display: block; font-size: 20px; font-stretch: 112%; letter-spacing: -.01em; }
.brand small { opacity: .75; font-size: 12.5px; display: block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: inherit; text-decoration: none; padding: 9px 10px; border-radius: var(--radius-s); display: flex; gap: 10px; align-items: center; opacity: .86; }
.nav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.nav a.active { background: var(--on-mat); color: var(--mat-deep); opacity: 1; font-weight: 600; }
.nav .ico { width: 18px; text-align: center; font-size: 14px; }
.is-tecnico [data-dono] { display: none; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 16px; }
.who { font-size: 13px; opacity: .85; padding: 8px 4px 0; border-top: 1px solid rgba(255,255,255,.18); }
.who small { opacity: .75; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 39; }

.main { min-width: 0; display: flex; flex-direction: column; }
.demo-bar, .offline-bar { padding: 7px 28px; font-size: 13.5px; font-weight: 600; }
.demo-bar { background: var(--manila); color: var(--manila-ink); }
.demo-bar a { color: inherit; margin-left: 6px; }
.offline-bar { background: var(--signal); color: #2a1c00; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 21px; font-stretch: 105%; font-weight: 700; white-space: nowrap; }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 4px 8px; }
.topbar-search { margin-left: auto; position: relative; width: min(380px, 45vw); }
.topbar-search input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow); max-height: 360px; overflow: auto; z-index: 30; }
.search-results a { display: block; padding: 9px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a:focus { background: var(--mat-soft); }
.search-results small { color: var(--muted); display: block; }
#view { padding: 24px 28px calc(60px + var(--bottom-h)); outline: none; }
.bottom-nav { display: none; }

/* Botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; min-height: 38px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--mat); border-color: var(--mat); color: var(--on-mat); }
.btn-primary:hover { background: var(--mat-deep); border-color: var(--mat-deep); }
.btn-danger { color: var(--danger); }
.btn-whats { background: var(--whats); border-color: var(--whats); color: #fff; }
.btn-small { padding: 4px 10px; min-height: 32px; font-size: 13px; }
.btn-lg { min-height: 46px; font-size: 15.5px; }
.btn-mat-ghost { background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--on-mat); }
.btn-mat-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 18px; padding: 4px 8px; color: var(--muted); min-width: 32px; min-height: 32px; }
.link { background: none; border: 0; padding: 0; color: var(--mat); text-decoration: underline; cursor: pointer; font-weight: 600; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.input { padding: 7px 10px; min-height: 38px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); min-width: 220px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; min-height: 36px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--ink); color: var(--paper); }

label.field, .field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font-weight: 400; font-size: 15px; }
.field textarea { min-height: 70px; resize: vertical; }
.field.checks { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 8px; }
.check-inline { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--mat); }
.code-input { text-transform: uppercase; letter-spacing: .14em; font-weight: 700 !important; }
.grid { display: grid; gap: 12px; }
.grid.narrow { max-width: 920px; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.form-actions .left { margin-right: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px 14px; margin: 0; background: var(--surface); }
legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
.h3 { font-size: 15px; margin: 18px 0 8px; }

/* Painéis */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; min-width: 0; }
.panel h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel h2 .count { color: var(--muted); font-weight: 500; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.dash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.dash .col, .os-grid .col { display: grid; gap: 18px; min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.metric { padding: 16px 18px; border-left: 1px solid var(--line); min-width: 0; }
.metric:first-child { border-left: 0; }
.metric .v { font-size: 28px; font-weight: 700; font-stretch: 85%; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .l { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.empty .btn { margin-top: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .time { font-weight: 700; font-stretch: 85%; font-size: 17px; width: 52px; flex: none; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { color: var(--muted); font-size: 13px; }
.list .qty { width: 40px; flex: none; }
.clickable { cursor: pointer; }
.clickable:hover { background: var(--surface-2); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.days { font-weight: 800; font-stretch: 80%; font-size: 16px; color: var(--muted); min-width: 36px; text-align: right; }
.days.warn { color: var(--signal); }
.days.bad { color: var(--danger); }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 28px; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; display: block; }
.bar span { display: block; height: 100%; }
.bar-row b { text-align: right; }
.alerts { display: grid; gap: 8px; margin-bottom: 18px; }
.alert { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-m); border: 1px solid; flex-wrap: wrap; }
.alert.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: var(--ok); }
.alert.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: var(--danger); }

/* Status */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.urg { font-size: 11.5px; font-weight: 700; color: var(--danger); margin-left: 6px; }

/* Etiqueta de serviço (a peça marcante da interface) */
.tag-card { position: relative; background: var(--manila); color: var(--manila-ink); border: 1px solid var(--manila-line); border-radius: 4px;
  padding: 12px 12px 10px 30px; cursor: pointer; text-align: left; width: 100%; display: block;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.tag-card::before { content: ""; position: absolute; left: 9px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--paper); border: 1px solid var(--manila-line); }
.tag-card:hover { filter: brightness(.98); border-color: var(--manila-ink); }
.tag-card.urgent { box-shadow: inset 4px 0 0 var(--danger); }
.tag-card.urgent .os-n small { color: var(--danger); opacity: 1; font-weight: 800; }
.tag-card .os-n { font-size: 22px; font-weight: 800; font-stretch: 70%; letter-spacing: .01em; line-height: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tag-card .os-n small { font-size: 12px; font-weight: 600; font-stretch: 100%; opacity: .75; }
.tag-card .eq { font-weight: 600; margin-top: 6px; font-size: 14px; }
.tag-card .cli, .tag-card .meta { font-size: 12.5px; opacity: .8; }
.tag-card .meta { display: flex; justify-content: space-between; margin-top: 6px; border-top: 1px dashed var(--manila-line); padding-top: 6px; }
.tag-card .late { color: var(--danger); font-weight: 700; opacity: 1; }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px; min-height: 200px; scroll-snap-align: start; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13.5px; padding: 2px 4px 10px; border-bottom: 3px solid var(--c); margin-bottom: 10px; }
.kcol-head span { color: var(--muted); font-weight: 600; }
.kcol .stack { display: grid; gap: 10px; }
.kcol.drop { outline: 2px dashed var(--mat); }
.kempty { text-align: center; padding: 12px 0; }

/* Tabelas */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr.clickable:hover { background: var(--surface-2); }
.low { color: var(--danger); font-weight: 700; }
.tabs-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; min-height: 32px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Agenda */
.week { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(120px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow-x: auto; }
.week .wh { position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 8px; text-align: center; font-size: 13px; color: var(--muted); }
.week .wh b { display: block; font-size: 19px; color: var(--ink); font-stretch: 85%; }
.week .wh.today b { color: var(--on-mat); background: var(--mat); border-radius: 999px; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; }
.week .hours { border-right: 1px solid var(--line); }
.week .hours div { height: 64px; font-size: 11.5px; color: var(--muted); text-align: right; padding: 2px 6px 0 0; }
.week .day { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 63px, var(--line) 63px, var(--line) 64px); cursor: copy; }
.ev { position: absolute; left: 4px; right: 4px; border-radius: 5px; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; background: var(--mat-soft); border: 0; border-left: 3px solid var(--c, var(--mat)); color: var(--ink); text-align: left; }
.ev b { display: block; font-size: 12px; }
.ev.faltou { opacity: .55; text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }

/* OS detalhe */
.os-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.os-title { min-width: 0; flex: 1 1 240px; }
.os-title h2 { font-size: 22px; }
.os-tag-big { background: var(--manila); color: var(--manila-ink); border: 1px solid var(--manila-line); padding: 12px 18px 12px 34px; position: relative;
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); }
.os-tag-big::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--paper); border: 1px solid var(--manila-line); }
.os-tag-big.urgent { box-shadow: inset 5px 0 0 var(--danger); }
.os-tag-big .n { font-size: 40px; font-weight: 800; font-stretch: 65%; line-height: 1; display: block; }
.os-tag-big small { font-size: 13px; opacity: .8; }
.os-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.status-flow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.status-flow button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; min-height: 34px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.status-flow button.on { background: var(--c); border-color: var(--c); color: #fff; }
.track { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--mat-soft); border: 1px solid color-mix(in srgb, var(--mat) 35%, transparent); border-radius: var(--radius-m); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.track-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.hist { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-m); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.hist.warn { border-color: var(--signal); background: color-mix(in srgb, var(--signal) 12%, var(--surface)); }
.hist ul { margin: 6px 0 0; padding-left: 18px; }
.os-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 14px; }
.check-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 8px; }
.tri { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; flex: none; }
.tri button { border: 0; background: var(--surface); padding: 4px 9px; min-height: 30px; font-size: 12px; cursor: pointer; color: var(--muted); }
.tri button.on[data-v="ok"] { background: var(--ok); color: #fff; }
.tri button.on[data-v="falha"] { background: var(--danger); color: #fff; }
.tri button.on[data-v="na"] { background: var(--muted); color: #fff; }
.items { display: grid; gap: 0; }
.item { display: grid; grid-template-columns: 1fr 56px 100px 32px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; width: 100%; background: var(--surface); text-align: right; min-height: 36px; }
.item-d { min-width: 0; font-size: 14px; }
.totals { display: grid; gap: 4px; justify-items: end; margin-top: 12px; font-size: 14px; }
.totals .big { font-size: 22px; font-weight: 800; font-stretch: 85%; }
.totals .desc { display: flex; gap: 8px; align-items: center; }
.totals .desc input { width: 100px; text-align: right; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.timeline li { padding: 6px 0 6px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.timeline small { color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pat-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.foto { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--surface-2); }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-grande { width: 100%; max-height: 70vh; object-fit: contain; display: block; background: #000; border-radius: var(--radius-s); }
.sig-img { max-width: 100%; height: 90px; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); }
.sig-pad { width: 100%; aspect-ratio: 3 / 1; background: #fff; border: 2px dashed var(--line); border-radius: var(--radius-m); touch-action: none; display: block; }
.pattern-pad { width: min(260px, 80vw); margin: 0 auto; touch-action: none; background: var(--surface-2); border-radius: var(--radius-m); padding: 6px; user-select: none; }
.pattern-pad svg { width: 100%; height: auto; display: block; }
.pattern .pdot { fill: var(--muted); }
.pattern .pline { fill: none; stroke: var(--mat); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.pattern .pstart { fill: none; stroke: var(--mat); stroke-width: 3; }
.invite { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.invite .code { font-size: 26px; font-weight: 800; font-stretch: 75%; letter-spacing: .12em; background: var(--manila); color: var(--manila-ink); padding: 4px 14px; border-radius: var(--radius-s); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 18, 22, .45); display: grid; place-items: start center; padding: 5vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--radius-m); width: min(760px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: var(--radius-m) var(--radius-m) 0 0; z-index: 1; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 18px; }

.toast { position: fixed; bottom: calc(20px + var(--bottom-h)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: var(--radius-s); z-index: 60; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
.hint { color: var(--muted); font-size: 13px; }

/* Acesso (login / cadastro) */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 380px); gap: 48px; justify-content: center; align-content: center; padding: 32px 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 14px; align-content: start; }
.auth-card.wide { grid-column: 1 / -1; max-width: 860px; width: 100%; justify-self: center; }
.auth-card h1 { font-size: 24px; }
.auth-brand { margin-bottom: 4px; }
.auth-brand .os-tag-big { display: inline-block; }
.auth-brand .os-tag-big .n { font-size: 34px; }
.btn-google { width: 100%; min-height: 46px; }
.or { text-align: center; color: var(--muted); font-size: 13px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); }
.auth-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.auth-demo { border-top: 1px solid var(--line); padding-top: 14px; text-align: center; }
.auth-pitch { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; align-content: center; }
.auth-pitch li { padding-left: 18px; border-left: 3px solid var(--mat); color: var(--muted); }
.auth-pitch b { color: var(--ink); display: block; font-size: 16.5px; }
.onb { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Impressão */
#print-area { display: none; }
@media print {
  body { background: #fff; }
  #app, #auth, #boot, .modal-backdrop, .toast { display: none !important; }
  #print-area { display: block; color: #000; font: 12px/1.4 var(--font); }
  @page { margin: 12mm; }
}
.pr h1 { font-size: 20px; }
.pr .head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.pr .osn { font-size: 26px; font-weight: 800; font-stretch: 70%; text-align: right; }
.pr .osn-sub { font-size: 11px; font-weight: 400; font-stretch: 100%; }
.pr table.pt { width: 100%; font-size: 12px; margin: 6px 0; }
.pr th, .pr td { padding: 4px 6px; border: 1px solid #999; background: none; color: #000; }
.pr .box { border: 1px solid #999; padding: 6px 8px; margin: 6px 0; }
.pr .sign { display: flex; gap: 40px; margin-top: 72px; }
.pr .sign div { flex: 1; border-top: 1px solid #000; text-align: center; padding-top: 4px; position: relative; }
.pr .sig-print { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); height: 54px; }
.pr .cut { border-top: 1px dashed #000; margin: 18px 0; text-align: center; font-size: 10px; }
.pr .terms { font-size: 10.5px; white-space: pre-wrap; }
.pr .client-via { display: flex; gap: 16px; align-items: flex-start; }
.pr .client-via > div:first-child { flex: 1; }
.pr .qr { width: 120px; text-align: center; font-size: 9.5px; }
.pr .qr svg { width: 110px; height: 110px; display: block; margin: 0 auto 4px; }

/* Responsivo */
@media (max-width: 1100px) {
  .dash, .os-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .auth { grid-template-columns: minmax(0, 460px); gap: 24px; }
  .auth-pitch { order: 2; }
}
@media (max-width: 820px) {
  :root { --bottom-h: 64px; }
  body { font-size: 15.5px; }
  #app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; height: 100%; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: block; }
  .topbar { padding: 8px 12px; gap: 6px; flex-wrap: wrap; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar h1 { font-size: 18px; }
  .topbar-search { width: 100%; order: 3; }
  .demo-bar, .offline-bar { padding: 6px 16px; }
  #view { padding: 14px 12px calc(24px + var(--bottom-h)); }
  .hide-m { display: none !important; }
  .grow-m { flex: 1 1 100%; min-width: 0; }
  .input { min-width: 0; }
  .toolbar { gap: 8px; }
  .toolbar > .seg { flex: 1 1 auto; }
  .toolbar > .seg button { flex: 1; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .panel { padding: 14px; }
  .metric { padding: 12px 14px; }
  .metric .v { font-size: 22px; }
  .checklist { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .os-head { gap: 12px; }
  .os-tag-big .n { font-size: 32px; }
  .os-actions { margin-left: 0; width: 100%; }
  .os-actions .btn { flex: 1 1 auto; }
  .status-flow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; scrollbar-width: none; }
  .status-flow button { flex: none; }
  .kanban { grid-auto-columns: 82%; }
  .bar-row { grid-template-columns: 120px 1fr 24px; }
  .item { grid-template-columns: 1fr 52px 90px 32px; }
  .onb { grid-template-columns: 1fr; }
  .auth-card { padding: 20px; }
  /* Tabelas viram cartões */
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr { display: block; width: 100%; }
  .rtable tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 2px 0; text-align: right; }
  .rtable td.r { text-align: right; }
  .rtable td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; }
  .rtable td.tcell-title { display: block; text-align: left; font-size: 15px; padding-bottom: 4px; }
  .rtable td:not([data-label]):not(.tcell-title) { justify-content: flex-end; padding-top: 6px; }
  .rtable td.empty { display: block; text-align: center; }
  /* Modal em tela cheia */
  .modal-backdrop { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100%; min-height: 100%; border-radius: 0; }
  .modal-head { border-radius: 0; padding-top: max(14px, env(safe-area-inset-top)); }
  .modal-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .form-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-bottom: -4px; }
  .form-actions .btn { flex: 1 1 auto; min-height: 44px; }
  /* Navegação inferior */
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); z-index: 30; }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 6px 0; cursor: pointer; }
  .bottom-nav .ico { font-size: 18px; line-height: 1; }
  .bottom-nav a.active { color: var(--mat); }
  .bottom-nav .fab { justify-self: center; width: 54px; height: 54px; border-radius: 16px; background: var(--mat); color: var(--on-mat); font-size: 30px; font-weight: 400; line-height: 1; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 18px rgba(45, 95, 87, .4); padding: 0; }
  .modal-open .bottom-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== Versão 3: Pix, avisos, logomarca, painéis e relatórios ===== */
:root { --c1: #00806A; --c2: #B06A10; --pix: #32BCAD; --pix-ink: #06433D; }
:root[data-theme="dark"] { --c1: #14A58A; --c2: #C47F1C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #14A58A; --c2: #C47F1C; } }

.brand-logo { width: 44px; height: 44px; flex: none; background: #fff; border-radius: 8px; display: grid; place-items: center; overflow: hidden; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo:not([hidden]) + .brand-mark { display: none; }

.sino { margin-left: auto; position: relative; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.sino-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.topbar-search { margin-left: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--danger); }
.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.alert.info { background: var(--mat-soft); border-color: color-mix(in srgb, var(--mat) 40%, transparent); margin-bottom: 18px; }
.assin-bar { background: var(--ink); color: var(--paper); padding: 8px 28px; font-size: 14px; font-weight: 600; }
.assin-bar .link { color: var(--manila); margin-left: 6px; }
.narrow-card { max-width: 560px; }

.btn-pix { background: var(--pix); border-color: var(--pix); color: var(--pix-ink); }
.btn-pix:hover { filter: brightness(.95); border-color: var(--pix); }
.pix-box { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; }
.pix-qr { width: 200px; height: 200px; background: #fff; padding: 10px; border-radius: var(--radius-s); flex: none; }
.pix-qr svg { width: 100%; height: 100%; display: block; }
.pix-info { flex: 1 1 220px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.pix-valor { font-size: 28px; font-weight: 800; font-stretch: 82%; }
.pix-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px !important; word-break: break-all; }

.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: var(--radius-m); display: grid; place-items: center; background: #fff; overflow: hidden; flex: none; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pr .pr-loja { display: flex; gap: 12px; align-items: center; }
.pr .pr-logo { max-height: 56px; max-width: 140px; object-fit: contain; }

/* Gráficos */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.charts .span-2 { grid-column: 1 / -1; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-base { stroke: var(--muted); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.ch-hit:hover path { opacity: .82; }
.ch-legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin: -4px 0 6px; flex-wrap: wrap; }
.ch-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: grid; gap: 10px; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-bar { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hb-bar span { display: block; height: 100%; background: var(--c1); border-radius: 0 4px 4px 0; }
.hb-v { font-size: 13.5px; white-space: nowrap; }
.table-wrap.flat { border: 0; border-radius: 0; }
.field.inline { display: flex; align-items: center; gap: 6px; }
.field.inline input { width: auto; }

@media (max-width: 1100px) { .charts { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .assin-bar { padding: 7px 16px; }
  .sino { width: 38px; height: 38px; }
  /* Correção: o formulário no celular cobre a tela inteira, sem deixar a página de trás aparecer */
  .modal-backdrop { display: block; padding: 0; background: var(--surface); overscroll-behavior: contain; }
  .modal, .modal.wide { width: 100%; height: auto; min-height: 100vh; min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .pix-qr { width: min(240px, 70vw); height: min(240px, 70vw); margin: 0 auto; }
  .hb-row { grid-template-columns: minmax(80px, 40%) 1fr auto; }
}

/* ===== Versão 4: bancada (quadro com sem reparo, balcão, entrega, etiqueta, anotações) ===== */
.tag-wrap { position: relative; }
.tag-wrap .os-n { padding-right: 36px; }
.tag-move { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--manila-line); background: color-mix(in srgb, var(--manila) 70%, #fff); color: var(--manila-ink); font-size: 16px; cursor: pointer; display: grid; place-items: center; opacity: .85; }
.tag-move:hover, .tag-move:focus-visible { opacity: 1; border-color: var(--manila-ink); }
.kcol[data-status="cancelado"] { background: color-mix(in srgb, var(--danger) 6%, var(--surface-2)); }
.move-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.move-opt { min-height: 48px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--ink); text-align: left; }
.move-opt::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.move-opt.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.loja-resumo { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.loja-resumo b { color: var(--ink); font-size: 18px; font-stretch: 85%; margin-right: 4px; }
.loja-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.loja-cli .list .badge { margin-left: 4px; }
.loc { color: var(--mat); }
.entrega-resumo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--manila); color: var(--manila-ink); border-radius: var(--radius-s); }
.entrega-resumo .hint { color: var(--manila-ink); opacity: .8; }
.notas .nota-t { white-space: pre-wrap; font-size: 14.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr .etq { display: flex; gap: 2mm; width: 58mm; height: 36mm; overflow: hidden; font-size: 8pt; line-height: 1.2; color: #000; }
.pr .etq-l { flex: 1; min-width: 0; display: grid; gap: .6mm; align-content: start; }
.pr .etq-n { font-size: 18pt; font-weight: 800; font-stretch: 70%; line-height: 1; }
.pr .etq-d { font-size: 7pt; max-height: 9mm; overflow: hidden; }
.pr .etq-qr { width: 17mm; flex: none; }
.pr .etq-qr svg { width: 17mm; height: 17mm; display: block; }
@media (max-width: 820px) {
  .loja-grid { grid-template-columns: 1fr; }
  .tag-move { width: 38px; height: 38px; top: 6px; }
  .tag-wrap .os-n { padding-right: 42px; }
  .move-opt { min-height: 52px; }
}
.laudo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.laudo-chips .chip { font-weight: 500; text-align: left; }
@media (max-width: 820px) { #os-tipo, #os-tec { flex: 1 1 40%; min-width: 0; } }

/* ---------- v6: mapa de avarias ---------- */
.av-svg { display: block; width: auto; max-width: 100%; overflow: visible; }
.av-contorno { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.av-contorno .av-tela { fill: color-mix(in srgb, var(--mat) 9%, transparent); }
.av-svg.av-edit { cursor: crosshair; touch-action: manipulation; background: var(--surface-2); border-radius: var(--radius-m); padding: 6px; box-sizing: content-box; }
.av-svg .av-marca { cursor: pointer; }
.av-svg text { font-family: inherit; pointer-events: none; }
.av-lados { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.av-lados figure { margin: 0; display: grid; justify-items: center; gap: 4px; }
.av-lados figcaption { font-size: 12px; color: var(--muted); font-weight: 600; }
.av-lista, .av-itens { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 14px; }
.av-lista li, .av-itens li { display: flex; gap: 8px; align-items: center; }
.av-n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.av-itens select { flex: 0 0 150px; }
.av-itens input { flex: 1; min-width: 0; }
.av-ok { margin: 0; padding: 8px 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid var(--ok); font-weight: 600; font-size: 14px; }
.av-env { margin: 10px 0 0; }
.av-editor { display: grid; gap: 12px; }
.av-tipos { display: flex; flex-wrap: wrap; gap: 6px; }
.av-tipo { border: 1.5px solid var(--c); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.av-tipo::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.av-tipo.on { background: var(--c); color: #fff; }
.av-tipo.on::before { background: #fff; }
.fotos-antigas { margin-top: 12px; }
.fotos-antigas summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.foto:is(span) { cursor: default; }
@media (max-width: 820px) {
  .av-itens li { flex-wrap: wrap; }
  .av-itens select { flex: 1 1 120px; }
  .av-itens input { flex: 1 1 100%; order: 3; }
  .av-lados { justify-content: center; }
}
@media print {
  .av-print .av-contorno { stroke: #000; }
  .av-print .av-contorno .av-tela { fill: #f2f2f2; }
  .av-print { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: center; }
  .av-print > b { grid-column: 1 / -1; }
  .av-print .av-ok { grid-column: 1 / -1; }
  .av-print .av-lados { gap: 8px 16px; margin-top: 6px; }
  .av-print svg { height: 100px; }
  .av-print .av-lista { font-size: 10px; gap: 2px; margin-top: 6px; }
  .av-print .av-n { width: 15px; height: 15px; font-size: 9px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .av-print svg circle { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .av-print .av-ok { background: none; border: 1px solid #000; }
}

/* ---------- Assinatura (planos) ---------- */
.alert.info { background: color-mix(in srgb, var(--focus) 9%, var(--surface)); border-color: color-mix(in srgb, var(--focus) 55%, var(--line)); }
.pill.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.ciclo-seg { justify-self: start; }
.ciclo-seg label { display: inline-flex; cursor: pointer; }
.ciclo-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ciclo-seg span { padding: 8px 16px; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
.ciclo-seg small { font-size: 11.5px; font-weight: 800; color: var(--ok); }
.ciclo-seg input:checked + span { background: var(--ink); color: var(--paper); }
.ciclo-seg input:checked + span small { color: var(--paper); opacity: .85; }
.ciclo-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.planos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.plano-card { position: relative; display: grid; gap: 2px; padding: 14px 14px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; }
.plano-card input { position: absolute; top: 14px; right: 14px; accent-color: var(--mat); width: 18px; height: 18px; }
.plano-card:has(input:checked) { border-color: var(--mat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mat) 18%, transparent); }
.plano-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.plano-card .pn { font-weight: 800; font-size: 16px; font-stretch: 110%; }
.plano-card .pv { font-size: 24px; font-weight: 800; font-stretch: 85%; }
.plano-card .pv small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.plano-card .pa { font-size: 12.5px; min-height: 1.4em; }
.plano-card .pu { font-size: 13px; font-weight: 600; margin-top: 4px; }
.plano-card.pouco { opacity: .8; }
/* Links com aparência de botão mantêm a cor do botão (a regra geral de links usa "inherit") */
:root a.btn-primary { color: var(--on-mat); }
:root a.btn-whats { color: #fff; }
:root a.btn-pix { color: var(--pix-ink); }
.formas { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.formas legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.forma-op { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-m); cursor: pointer; background: var(--surface); }
.forma-op input { margin-top: 3px; accent-color: var(--mat); width: 17px; height: 17px; flex: none; }
.forma-op span { display: grid; gap: 2px; }
.forma-op small { color: var(--muted); font-size: 13px; }
.forma-op:has(input:checked) { border-color: var(--mat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mat) 18%, transparent); }
