/* =====================================================================
   LUBTEC — Design system
   Cores, tipografia e componentes compartilhados por todas as páginas.
   Marca: LUBTEC (LUB azul / TEC prata) em Saira Expanded itálico 800.
   ===================================================================== */

/* o atributo hidden sempre esconde, mesmo em elementos com display próprio (.card-foot, .row…) */
[hidden] { display: none !important; }

:root {
  /* superfícies */
  --bg: #030A1C;
  --bg-2: #051231;
  --side: #040C22;
  --surface: rgba(10, 30, 76, .55);
  --surface-solid: #0A1838;
  --field: rgba(3, 9, 22, .9);
  --line: rgba(80, 150, 255, .26);
  --line-soft: rgba(110, 150, 220, .16);
  --field-line: #2A3D60;

  /* marca */
  --blue: #1477FF;
  --blue-deep: #0A62F4;
  --blue-text: #2E95FF;
  --blue-soft: rgba(20, 119, 255, .16);

  /* texto */
  --text: #F4F7FC;
  --text-2: #C9D3E6;
  --muted: #8E9BB5;

  /* status (validados para contraste no fundo escuro; sempre com ícone + texto) */
  --ok: #3BE36B;
  --warn: #F5B03C;
  --danger: #FF5A66;
  --info: #2E8BFF;
  --violet: #B49CFF;
  --neutral: #8E9BB5;

  /* forma */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 0 24px rgba(25, 110, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .07);
  --glow: 0 10px 28px -10px rgba(20, 119, 255, .8);

  --side-w: 264px;
  --font: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 70% 0%, rgba(18, 70, 175, .28), transparent 70%),
    radial-gradient(700px 600px at 100% 100%, rgba(20, 95, 230, .14), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
a { color: var(--blue-text); text-decoration: none; }
a:hover { color: #6BB4FF; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #6BB4FF; outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(46, 149, 255, .4); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
body.booting { visibility: hidden; }
/* enquanto os dados chegam: um círculo girando em vez de tela vazia (só aparece se demorar mais de 0,3 s) */
body.booting::after { content: ""; visibility: visible; position: fixed; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(120, 160, 230, .22); border-top-color: var(--blue, #1477FF); opacity: 0; animation: boot-gira .8s linear infinite, boot-surge .2s ease .3s forwards; }
@keyframes boot-gira { to { transform: rotate(360deg); } }
@keyframes boot-surge { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.booting::after { animation: boot-surge .2s ease .3s forwards; } }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Marca ---------- */
.wordmark {
  font-family: Saira, sans-serif; font-style: italic; font-weight: 800; font-stretch: 125%;
  line-height: .8; letter-spacing: -.005em; white-space: nowrap; display: inline-block;
}
.wordmark .lub { background: linear-gradient(180deg, #47A0FF 0%, #1477FF 50%, #0B55E0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(20, 119, 255, .55)); }
.wordmark .tec { background: linear-gradient(180deg, #FFFFFF 0%, #E3E8F0 45%, #A9B4C6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* itálico: folga para o degradê pintar a ponta inclinada das letras (sem mudar o espaçamento) */
.wordmark .lub, .wordmark .tec { display: inline-block; padding: .06em .14em .06em .04em; margin: -.06em -.14em -.06em -.04em; }
.eyebrow { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Estrutura do app ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  padding: 26px 14px 18px;
  background: linear-gradient(180deg, rgba(5, 15, 39, .96), rgba(3, 10, 28, .96));
  border-right: 1px solid rgba(40, 120, 255, .4);
  box-shadow: 6px 0 30px rgba(20, 100, 255, .1);
  scrollbar-width: thin; scrollbar-color: #233A66 transparent;
}
.side .brand { padding: 0 10px; }
.side .brand .wordmark { font-size: 40px; }
.side .brand .eyebrow { display: block; margin-top: 10px; font-size: 9.5px; line-height: 1.6; }
.org-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: rgba(14, 40, 95, .35); border: 1px solid var(--line); }
.org-card .logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(160deg, #1E78FF, #0B48C4); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.org-card b { display: block; font-size: 14px; }
.org-card small { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav .group { margin: 10px 12px 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #7F8CA8; }
.nav a {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; border: 1px solid transparent; color: var(--text-2); font-weight: 500;
}
.nav a .ico { width: 20px; height: 20px; color: #AEBBD3; }
.nav a:hover { background: rgba(30, 90, 200, .18); color: #fff; }
.nav a[aria-current="page"] { color: #fff; font-weight: 600; background: linear-gradient(180deg, #1E78FF, #1257DD); border-color: rgba(110, 180, 255, .7); box-shadow: 0 0 20px rgba(30, 120, 255, .4); }
.nav a[aria-current="page"] .ico { color: #fff; }
.nav .count { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(46, 139, 255, .2); color: #8CC6FF; }
.nav .count.alert { background: rgba(255, 90, 102, .18); color: #FF8A93; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-foot .tag { padding: 0 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 32px; min-height: 72px;
  background: rgba(3, 10, 28, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .menu-btn { display: none; }
.topbar .search { flex: 0 1 380px; margin-right: auto; }
.topbar .mobile-brand { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; }
.user-chip:hover { border-color: var(--line); }
.user-chip b { display: block; font-size: 14px; }
.user-chip small { display: block; font-size: 12px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #CFE3FF; border: 2px solid var(--blue-text); background: radial-gradient(circle at 50% 35%, #0E3C9A, #071A45); box-shadow: 0 0 12px rgba(30, 120, 255, .35); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; border-width: 1px; box-shadow: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.content { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 1560px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; }
.page-head .titles { margin-right: auto; display: flex; gap: 16px; align-items: stretch; }
.page-head .titles::before { content: ""; width: 5px; border-radius: 3px; background: var(--blue); box-shadow: 0 0 12px rgba(20, 119, 255, .7); }
.page-head h1 { font-size: 30px; font-weight: 700; }
.page-head p { margin-top: 4px; color: var(--text-2); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }

/* ---------- Grade ---------- */
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1fr) 400px; }
.split-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- Cartões ---------- */
.card {
  position: relative; min-width: 0;
  border-radius: var(--r-lg);
  border: 1px solid rgba(70, 150, 255, .32);
  background: linear-gradient(160deg, rgba(22, 80, 190, .26) 0%, rgba(10, 34, 88, .45) 40%, rgba(6, 18, 48, .85) 100%);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.flat { background: rgba(6, 16, 40, .65); }
.card.pad-0 { padding: 0; }
.card.hero { background: linear-gradient(140deg, rgba(25, 100, 235, .55), rgba(10, 40, 110, .5) 45%, rgba(6, 18, 48, .9)); border-color: rgba(80, 160, 255, .55); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; font-weight: 700; }
.card-head .sub { font-size: 13px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }

/* indicador */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi .label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.kpi .label .ico { width: 16px; height: 16px; color: var(--blue-text); }
.kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.kpi .value small { font-size: 17px; font-weight: 700; color: var(--text-2); margin-right: 3px; }
.kpi .note { font-size: 12.5px; color: var(--muted); }
.trend-up { color: var(--ok); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }
.icon-tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue-text); border: 1px solid rgba(46, 149, 255, .35); }
.icon-tile .ico { width: 22px; height: 22px; }

.meter { height: 8px; border-radius: 999px; background: rgba(140, 170, 220, .16); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-deep), #3FA0FF); }
.meter.thin { height: 5px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: filter .15s, background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(90deg, var(--blue-deep), #1683FF); color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-ghost { background: rgba(4, 12, 30, .6); border-color: var(--field-line); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue-text); color: #fff; }
.btn-outline { background: rgba(10, 40, 100, .25); border-color: var(--blue-text); color: #CFE3FF; }
.btn-outline:hover { background: rgba(20, 110, 255, .3); color: #fff; }
.btn-danger { background: rgba(255, 90, 102, .12); border-color: rgba(255, 90, 102, .5); color: #FF9AA2; }
.btn-danger:hover { background: rgba(255, 90, 102, .22); color: #fff; }
.btn-ok { background: rgba(59, 227, 107, .12); border-color: rgba(59, 227, 107, .5); color: var(--ok); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--field-line); background: rgba(4, 12, 30, .6); display: grid; place-items: center; cursor: pointer; color: var(--text-2); flex: none; }
.icon-btn:hover { border-color: var(--blue-text); color: #fff; }
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #071230; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-text); cursor: pointer; font-weight: 600; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span, .field > label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--field-line); background: var(--field); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E9BB5' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.select option { background: #0A1838; }
.input::placeholder, .textarea::placeholder { color: #7480A0; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 119, 255, .22); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.error-msg { font-size: 12.5px; color: #FF8A93; font-weight: 500; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 14px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field); color: var(--muted); }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 119, 255, .2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: #7480A0; }
.kbd { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid #2E4470; color: var(--muted); white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 40px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #22314F; border: 1px solid var(--field-line); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #C9D3E6; transition: transform .15s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(18px); background: #fff; }

/* abas e segmentos */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 2px; min-height: 44px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs [aria-selected="true"] { color: #fff; border-bottom-color: var(--blue-text); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--field); border: 1px solid var(--field-line); }
.seg button { border: 0; background: none; cursor: pointer; min-height: 34px; padding: 0 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #1E5FD8; color: #fff; }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg .ico, .crumb .ico, .chip .ico { width: 15px; height: 15px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--field); cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.chip[aria-pressed="true"] { background: #E8EEF9; border-color: #E8EEF9; color: #050B1A; }

/* ---------- Status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, #8E9BB5) 16%, transparent); }
.pill .ico { width: 13px; height: 13px; }
.st-orcamento { --c: var(--warn); }
.st-recusada { --c: var(--neutral); }
.st-aberta { --c: var(--info); }
.st-andamento { --c: var(--warn); }
.st-aguardando { --c: var(--violet); }
.st-pronta { --c: var(--ok); }
.st-entregue { --c: var(--neutral); }
.st-atrasada, .st-vencido { --c: var(--danger); }
.st-breve { --c: var(--warn); }
.st-emdia { --c: var(--ok); }
.st-ativa { --c: var(--ok); }
.st-pendente { --c: var(--warn); }
.st-suspensa { --c: var(--danger); }
.st-convite { --c: var(--neutral); }

/* placa Mercosul */
.plate { display: inline-flex; flex-direction: column; overflow: hidden; width: 86px; flex: none; border-radius: 4px; background: #F4F6F8; border: 1px solid #111; vertical-align: middle; }
.plate::before { content: "BRASIL"; display: block; height: 7px; background: #0B3FA8; color: #fff; font: 700 5.5px/7px Figtree, sans-serif; letter-spacing: .3em; text-align: center; }
.plate b { display: block; font: 600 18px/20px "Barlow Condensed", sans-serif; letter-spacing: .06em; color: #111; text-align: center; }
.plate.lg { width: 150px; border-width: 2px; border-radius: 6px; }
.plate.lg::before { height: 12px; font-size: 9px; line-height: 12px; }
.plate.lg b { font-size: 34px; line-height: 38px; }

/* ---------- Tabela ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover td { background: rgba(30, 80, 180, .12); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .strong { font-weight: 700; color: #fff; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }
.table .num { text-align: right; }
.table td .pill, .table .nowrap { white-space: nowrap; }
.input:disabled, .select:disabled { opacity: .35; cursor: not-allowed; }
.table.compact th, .table.compact td { padding-left: 10px; padding-right: 10px; }
.table.compact th:first-child, .table.compact td:first-child { padding-left: 16px; }
.table.compact th:last-child, .table.compact td:last-child { padding-right: 16px; }

/* lista simples */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 700; }
.list .sub { font-size: 13px; color: var(--muted); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* linha do tempo */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #4B5A78); box-shadow: 0 0 0 4px rgba(4, 12, 30, .9); }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--line-soft); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12.5px; color: var(--muted); }

/* etapas da OS */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stepper li::before { content: ""; height: 6px; border-radius: 999px; background: rgba(140, 170, 220, .16); }
.stepper li.done { color: var(--text-2); }
.stepper li.done::before { background: var(--blue); }
.stepper li.now { color: #fff; }
.stepper li.now::before { background: linear-gradient(90deg, var(--blue), #6BB4FF); box-shadow: 0 0 10px rgba(46, 149, 255, .7); }

/* quadro (kanban) */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.lane { border-radius: var(--r-lg); background: rgba(4, 12, 30, .55); border: 1px solid var(--line-soft); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; transition: border-color .15s, background .15s; }
.lane.drop { border-color: var(--blue-text); background: rgba(20, 90, 220, .14); }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 700; }
.lane-head .n { margin-left: auto; min-width: 26px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; background: rgba(140, 170, 220, .14); color: var(--text-2); }
.lane-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.ticket { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: rgba(10, 26, 62, .9); border: 1px solid rgba(80, 140, 255, .2); color: var(--text); cursor: grab; }
.ticket:hover { border-color: var(--blue-text); color: var(--text); }
.ticket.dragging { opacity: .45; }
.ticket .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ticket .top b { color: #8CC6FF; }
.ticket .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }

/* ---------- Sobreposições ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(1, 5, 15, .66); backdrop-filter: blur(3px); display: none; }
.overlay.open { display: block; }
.modal { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; display: none; }
.modal.open { display: block; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; height: 100vh; width: min(460px, 100vw); overflow: auto; display: none; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.drawer.open { display: block; }
.modal .card, .drawer .card { background: linear-gradient(160deg, #0F2D6E 0%, #0A1C45 35%, #071431 100%); border-color: rgba(80, 160, 255, .5); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.drawer .card { min-height: 100%; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.close-x { margin-left: auto; }

.toast-host { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #0B1835; border: 1px solid rgba(59, 227, 107, .45); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); pointer-events: auto; animation: toast-in .2s ease-out; }
.toast.error { border-color: rgba(255, 90, 102, .55); }
.toast .ico { color: var(--ok); }
.toast.error .ico { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.empty { display: grid; place-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--text-2); }
.empty .big { font-size: 36px; font-weight: 800; color: var(--ok); }
.empty .icon-tile { margin-bottom: 4px; }

/* ---------- Gráficos ---------- */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); padding: 8px 11px; border-radius: 8px; background: #0B1835; border: 1px solid #2E4C85; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); font-size: 12.5px; color: var(--text-2); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.chart-tip b { display: block; font-size: 15px; color: #fff; }
.hbar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: 14px; padding: 6px 0; }
.hbar .meter { height: 10px; }
.hbar .v { text-align: right; font-weight: 700; }

/* ---------- Entrada suave ---------- */
.reveal { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.settled .reveal { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Telas de acesso (login, convite, senha) ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth::before, .auth::after { content: ""; position: absolute; pointer-events: none; }
.auth::before { top: 0; left: 0; width: 210px; height: 250px; background: linear-gradient(160deg, rgba(43, 140, 255, .95), rgba(13, 91, 224, .6) 45%, transparent 46%); clip-path: polygon(0 0, 100% 0, 0 100%); opacity: .9; }
.auth::after { right: 0; bottom: 70px; width: 160px; height: 190px; background: linear-gradient(200deg, #2B8CFF, #0D5BE0); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: .85; }
.auth-main { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px 80px; padding: 56px 32px; position: relative; z-index: 1; }
.auth-hero { flex: 1 1 460px; max-width: 600px; display: flex; flex-direction: column; gap: 30px; }
.auth-hero .wordmark { font-size: clamp(64px, 7vw, 116px); }
.auth-hero .lines { display: flex; gap: 10px; margin: 14px 0 12px 4px; }
.auth-hero .lines i { height: 3px; border-radius: 2px; background: var(--blue); width: 68px; }
.auth-hero .lines i + i { width: 15px; opacity: .5; }
.auth-hero .tagline { font-family: Montserrat, sans-serif; font-weight: 500; font-size: clamp(15px, 1.4vw, 22px); letter-spacing: .26em; line-height: 1.3; text-transform: uppercase; color: var(--text-2); }
.auth-hero h2 { font-size: clamp(30px, 2.8vw, 46px); font-weight: 500; line-height: 1.05; max-width: 9.6em; }
.auth-hero h2 strong { display: block; font-weight: 700; color: var(--blue-text); }
.auth-hero .lead { padding-left: 20px; border-left: 5px solid var(--blue); color: var(--text-2); font-size: 18px; max-width: 26em; }
.auth-features { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; }
.auth-features li { flex: 1 1 110px; padding: 0 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 15px; color: var(--text-2); }
.auth-features li + li { border-left: 1px solid rgba(154, 166, 189, .3); }
.auth-features li:first-child { padding-left: 0; }
.auth-features .ico { width: 36px; height: 36px; color: var(--blue-text); }
.auth-card { flex: 0 1 520px; width: 100%; border-radius: 18px; padding: 48px 48px 36px; border: 1.5px solid rgba(80, 160, 255, .55); background: linear-gradient(155deg, rgba(25, 100, 235, .55) 0%, rgba(14, 55, 140, .45) 30%, rgba(7, 22, 56, .9) 72%, rgba(5, 16, 40, .94) 100%); box-shadow: 0 0 40px rgba(30, 120, 255, .32), inset 0 0 40px rgba(60, 140, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth-card .head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 32px; text-align: left; }
.auth-card .head .ico { width: 52px; height: 52px; color: var(--blue-text); }
.auth-card .head h1 { font-size: 30px; font-weight: 700; }
.auth-card .head p { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.auth-card form { display: flex; flex-direction: column; gap: 20px; }
.auth-card .input { min-height: 58px; font-size: 17px; padding: 0 20px; }
.auth-card .field > span { font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.auth-card .btn-primary { min-height: 58px; font-size: 19px; font-weight: 600; }
.or { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.or::before, .or::after { content: ""; width: 72px; height: 1px; background: rgba(154, 166, 189, .45); }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 60px; }
.pass-wrap .icon-btn { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: none; }
.demo { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.demo .row { flex-wrap: wrap; gap: 8px; }
.auth-foot { position: relative; z-index: 1; border-top: 1px solid rgba(80, 140, 255, .22); background: rgba(3, 9, 22, .9); }
.auth-foot .in { max-width: 1560px; margin: 0 auto; padding: 22px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; font-size: 14.5px; color: var(--text-2); }
.auth-foot .wordmark { font-size: 22px; }
.auth-foot .sep { width: 1px; height: 24px; background: rgba(154, 166, 189, .45); }

/* ---------- Impressão (OS, relatórios) ---------- */
@media print {
  .side, .topbar, .no-print, .page-head .actions, .toast-host { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .card { background: #fff !important; border-color: #ccc; box-shadow: none; color: #000; break-inside: avoid; }
  .text-2, .muted, .table .sub, .hint { color: #444 !important; }
  .content { padding: 0; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 70; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s; }
  .side.open { transform: none; }
  .topbar .menu-btn { display: grid; }
  .topbar .mobile-brand { display: block; }
  .topbar .mobile-brand .wordmark { font-size: 26px; }
  .split, .split-wide, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split > *, .split-wide > * { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .content { padding: 20px 16px 40px; gap: 18px; }
  .topbar { padding: 10px 16px; min-height: 64px; }
  .topbar .search, .user-chip div, .topbar .kbd { display: none; }
  .cols-2, .cols-3, .cols-4, .cols-5, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-5 > :first-child { grid-column: 1 / -1; }
  .kpi .value { font-size: 26px; }
  .page-head h1 { font-size: 25px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .card { padding: 16px; }
  .stepper { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
  .board { grid-template-columns: repeat(5, minmax(240px, 82vw)); }
  .hbar { grid-template-columns: 100px minmax(0, 1fr) 54px; }
  .auth-main { padding: 32px 16px; gap: 36px; }
  .auth-card { padding: 30px 20px 24px; }
  .auth-card .head h1 { font-size: 24px; }
  .auth-features li { flex-basis: 45%; padding: 10px 6px; }
  .auth-features li + li { border-left: 0; }
  .auth::before, .auth::after { display: none; }
  .drawer .card { border-radius: 0; }
}

/* =====================================================================
   CATÁLOGO DE APLICAÇÃO DE PEÇAS
   Componentes do contrato (plano do catálogo). Markup esperado:

   1) Selo (só o texto "Verificado"; nunca número). SVG check inline:
      <span class="selo-verificado" title="Aplicação confirmada por várias oficinas">
        <svg viewBox="0 0 24 24" aria-hidden="true">
          <path d="M12 2.5l2.4 1.8 3-.1.9 2.9 2.4 1.8-.9 2.9.9 2.9-2.4 1.8-.9 2.9-3-.1L12 21.5l-2.4-1.8-3 .1-.9-2.9-2.4-1.8.9-2.9-.9-2.9 2.4-1.8.9-2.9 3 .1z"/>
          <path class="v" d="m8.5 12.2 2.4 2.4 4.6-4.9"/>
        </svg>
        Verificado
      </span>
      Variante compacta (tabelas/resultados de busca): .selo-verificado.sm

   2) Especificações
      Formulário:
        <div class="specs-grid">   (ou <fieldset class="specs-grid"><legend>…</legend>)
          <label class="field"><span>Estrias externas</span><input class="input" inputmode="numeric"></label>
          <label class="field"><span>Diâmetro <i class="unid">mm</i></span><input class="input"></label>
          <label class="field"><span>Semi-eixo</span><select class="select">…</select></label>
          <label class="field full">…</label>      (.full ocupa a linha toda)
        </div>
      Leitura:
        <div class="spec-chips">
          <span class="spec-chip"><span class="k">Estrias</span> 25</span>
          <span class="spec-chip">fino 22 mm</span>
        </div>

   3) Aplicações (ficha da peça)
      <ul class="aplic-lista">
        <li class="aplic-item">
          <div class="aplic-txt">
            <b>Fiat Uno 1.0 Fire</b>
            <small>2004–2013 · Dianteira · Ambos os lados</small>
          </div>
          <div class="aplic-acoes">
            <span class="selo-verificado">…</span>
            <button class="btn btn-ghost btn-sm">Desvincular</button>
          </div>
        </li>
        <li class="aplic-item is-desvinculada">   (texto riscado; selo some)
          <div class="aplic-txt"><b>Fiat Palio 1.0 Fire</b><small>Desvinculada em 10/11/2026 · Medida diferente</small></div>
        </li>
      </ul>
      <details class="aplic-hist">
        <summary>Histórico de aplicações <span class="n">6</span></summary>
        <ol>
          <li data-acao="confirma"><b>Confirmou</b> Fiat Uno 1.0 Fire <small>Ana · 10/11/2026 · OS #1042</small></li>
          <li data-acao="nao_serve"><b>Não serve</b> … <small>…</small></li>
          <li data-acao="desvincula"><b>Desvinculou</b> … <small>… · Motivo: medida diferente</small></li>
        </ol>
      </details>
      (data-acao usa os mesmos valores de confirmacoes.acao)

   4) Pergunta de compatibilidade (a OS nunca trava)
      <section class="compat-card" role="group" aria-labelledby="compat-q">
        <div class="compat-head">
          <span class="icon-tile"><svg class="ico">…</svg></span>
          <div>
            <h3 id="compat-q">Essa peça é compatível com este veículo?</h3>
            <p class="compat-veic">Bieleta dianteira Nakata N-1234 · <b>Fiat Uno 1.0 Fire 2012</b></p>
          </div>
        </div>
        <div class="compat-acoes">
          <button class="btn btn-primary">Sim, confirmar</button>
          <button class="btn btn-ghost">Não tenho certeza</button>
          <button class="btn btn-danger">Não serve</button>
        </div>
        <p class="compat-nota">A peça já está na OS. Sua resposta só melhora o catálogo.</p>
      </section>
      Dentro de .card fica sem sombra; dentro de .modal/.drawer perde a moldura.

   5) Interpretação da busca
      <div class="busca-entendi" aria-live="polite">
        <span class="lbl">Entendi:</span>
        <span class="chip-entendi">Bieleta</span>
        <span class="chip-entendi">Fiat Uno</span>
        <span class="chip-entendi">1.0 Fire</span>
        <span class="chip-entendi is-ano">2014</span>
      </div>
      Chip removível: <button class="chip-entendi" aria-label="Remover Fiat Uno">Fiat Uno <svg>x</svg></button>
      Vazio (:empty) some sozinho.
   ===================================================================== */

/* ---------- Selo "Verificado" ---------- */
.selo-verificado {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  height: 24px; padding: 0 10px 0 6px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1; letter-spacing: .01em; white-space: nowrap;
  color: #DCEBFF;
  background: linear-gradient(180deg, rgba(46, 139, 255, .22), rgba(20, 90, 220, .12));
  border: 1px solid rgba(120, 180, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  vertical-align: middle; cursor: default;
}
.selo-verificado svg { width: 15px; height: 15px; flex: none; fill: var(--blue); stroke: none; }
.selo-verificado svg .v, .selo-verificado svg path + path, .selo-verificado svg polyline { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.selo-verificado.sm { height: 20px; padding: 0 8px 0 4px; font-size: 11.5px; gap: 4px; }
.selo-verificado.sm svg { width: 13px; height: 13px; }

/* ---------- Especificações ---------- */
.specs-grid {
  display: grid; gap: 14px 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  margin: 0; padding: 16px; min-width: 0;
  border-radius: var(--r); border: 1px solid var(--line-soft); background: rgba(4, 12, 30, .45);
}
.specs-grid > .full, .specs-grid > legend { grid-column: 1 / -1; }
.specs-grid > legend { float: left; width: 100%; padding: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.specs-grid .field > span { display: flex; align-items: baseline; gap: 6px; }
.specs-grid .unid { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); }
.specs-grid:empty { display: none; }

.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px;
  border-radius: var(--r-sm); border: 1px solid var(--line-soft); background: rgba(140, 170, 220, .09);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.spec-chip .k { font-weight: 500; color: var(--muted); }

/* ---------- Aplicações ---------- */
.aplic-lista {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  border-radius: var(--r); border: 1px solid var(--line-soft); background: rgba(4, 12, 30, .45); overflow: hidden;
}
.aplic-item { display: flex; align-items: center; gap: 10px 14px; min-height: 60px; padding: 10px 14px 10px 16px; border-bottom: 1px solid var(--line-soft); transition: background .12s; }
.aplic-item:last-child { border-bottom: 0; }
.aplic-item:hover { background: rgba(30, 80, 180, .1); }
.aplic-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aplic-txt b { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.aplic-txt small { font-size: 13px; color: var(--muted); }
.aplic-acoes { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: none; }
.aplic-acoes .btn-sm { min-height: 40px; }
.aplic-item.is-desvinculada { background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(140, 170, 220, .035) 10px 20px); }
.aplic-item.is-desvinculada .aplic-txt b { color: var(--muted); font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(142, 155, 181, .75); text-decoration-thickness: 1.5px; }
.aplic-item.is-desvinculada .selo-verificado { display: none; }

.aplic-hist { border-radius: var(--r); border: 1px solid var(--line-soft); background: rgba(4, 12, 30, .35); }
.aplic-hist > summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  list-style: none; cursor: pointer; border-radius: var(--r);
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.aplic-hist > summary::-webkit-details-marker { display: none; }
.aplic-hist > summary::before {
  content: ""; width: 7px; height: 7px; flex: none; margin: 0 3px 0 2px;
  border-right: 2px solid var(--blue-text); border-bottom: 2px solid var(--blue-text);
  transform: rotate(-45deg); transition: transform .15s;
}
.aplic-hist[open] > summary::before { transform: rotate(45deg) translate(-2px, -1px); }
.aplic-hist > summary:hover { color: #fff; }
.aplic-hist > summary .n { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(140, 170, 220, .14); color: var(--text-2); }
.aplic-hist ol, .aplic-hist ul { list-style: none; margin: 0; padding: 0 14px 10px 16px; display: flex; flex-direction: column; }
.aplic-hist li { position: relative; padding: 9px 0 9px 22px; font-size: 13.5px; color: var(--text-2); border-top: 1px solid var(--line-soft); }
.aplic-hist li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--neutral)); }
.aplic-hist li b { color: var(--c-t, var(--text)); font-weight: 700; }
.aplic-hist li small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.aplic-hist li[data-acao="confirma"] { --c: var(--ok); --c-t: #7EF0A0; }
.aplic-hist li[data-acao="nao_serve"] { --c: var(--danger); --c-t: #FF9AA2; }
.aplic-hist li[data-acao="desvincula"] { --c: var(--warn); --c-t: #FFCB75; }

/* ---------- Pergunta de compatibilidade ---------- */
.compat-card {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
  padding: 20px; border-radius: var(--r-lg);
  border: 1px solid rgba(80, 160, 255, .5);
  background: linear-gradient(150deg, rgba(25, 100, 235, .3), rgba(10, 40, 110, .35) 45%, rgba(6, 18, 48, .85));
  box-shadow: 0 14px 34px -14px rgba(10, 60, 180, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.compat-head { display: flex; align-items: flex-start; gap: 14px; }
.compat-head > div { min-width: 0; }
.compat-card h3 { font-size: 19px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.compat-veic { margin-top: 6px; font-size: 14.5px; color: var(--text-2); }
.compat-veic b { color: #fff; }
.compat-acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.compat-acoes .btn { min-height: 52px; padding: 0 12px; font-size: 15px; white-space: normal; text-align: center; line-height: 1.2; }
.compat-nota { font-size: 13px; color: var(--muted); }
/* dentro de outro cartão ou modal: sem moldura dupla */
.card .compat-card { box-shadow: none; background: rgba(20, 119, 255, .08); border-color: var(--line); }
.modal .compat-card, .drawer .compat-card { padding: 0; border: 0; background: none; box-shadow: none; }

/* ---------- "Entendi:" da busca ---------- */
.busca-entendi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 30px; font-size: 13px; }
.busca-entendi .lbl { font-weight: 600; color: var(--muted); margin-right: 2px; }
.busca-entendi:empty { display: none; }
.chip-entendi {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid rgba(46, 149, 255, .4); background: var(--blue-soft);
  font-size: 13px; font-weight: 600; color: #CFE3FF; white-space: nowrap;
}
.chip-entendi.is-ano { background: rgba(232, 238, 249, .1); border-color: rgba(201, 211, 230, .35); color: var(--text); }
button.chip-entendi { cursor: pointer; padding-right: 7px; transition: background .12s, border-color .12s; }
button.chip-entendi::after { content: ""; position: absolute; inset: -7px -2px; }
button.chip-entendi:hover { background: rgba(20, 119, 255, .28); border-color: var(--blue-text); color: #fff; }
.chip-entendi svg { width: 14px; height: 14px; flex: none; opacity: .8; }

@media (max-width: 720px) {
  .aplic-item { flex-wrap: wrap; padding: 12px 14px; }
  .aplic-acoes { flex: 1 1 100%; justify-content: flex-start; }
  .compat-acoes { grid-template-columns: minmax(0, 1fr); }
  .compat-card { padding: 16px; }
  .compat-card h3 { font-size: 17.5px; }
  .specs-grid { padding: 14px; }
}
@media print {
  .compat-card, .busca-entendi { display: none !important; }
  .selo-verificado { color: #000; background: none; border-color: #999; }
}

/* aceite dos Termos de Uso / Política de Privacidade (bloqueia o sistema até aceitar) */
.aceite-gate { position: fixed; inset: 0; z-index: 90; background: rgba(1, 5, 15, .82); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.aceite-card { width: min(560px, 100%); background: linear-gradient(160deg, #0F2D6E 0%, #0A1C45 35%, #071431 100%); border-color: rgba(80, 160, 255, .5); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.aceite-card h2 { margin: 0 0 8px; }
.aceite-docs { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.aceite-docs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(120, 160, 230, .3); border-radius: 10px; color: var(--text, #F4F7FC); text-decoration: none; font-weight: 600; }
.aceite-docs a:hover, .aceite-docs a:focus-visible { border-color: #2E8BFF; background: rgba(20, 119, 255, .12); }
.aceite-ok { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 4px; cursor: pointer; line-height: 1.5; }
.aceite-ok input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: #1477FF; }
.aceite-ok a { color: #5AA8FF; }
.nota-aceite { font-size: 12.5px; color: var(--muted, #8E9BB5); margin: 10px 0 0; }

/* histórico de ações (Configurações) */
.hx-filtros { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.hx-tabela td { vertical-align: top; }
.hx-mud { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.5; }
.hx-mud li { word-break: break-word; }
.pill.hx-incluiu { background: rgba(34, 197, 94, .14); color: #6EE7A0; }
.pill.hx-alterou { background: rgba(20, 119, 255, .16); color: #7DB8FF; }
.pill.hx-apagou { background: rgba(239, 68, 68, .14); color: #FCA5A5; }
.nowrap { white-space: nowrap; }

/* internet instável: faixa enquanto estiver sem conexão */
.rede-aviso { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 80; width: min(720px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #3A2A06; border: 1px solid rgba(245, 180, 40, .55); color: #FDE7B0; box-shadow: 0 12px 36px rgba(0, 0, 0, .5); font-size: 14px; line-height: 1.45; }
.rede-aviso svg { flex: none; width: 20px; height: 20px; color: #F5B428; }
.rede-aviso span { flex: 1; }
.rede-aviso b { color: #fff; }
.rede-aviso .btn { flex: none; color: #FDE7B0; border-color: rgba(245, 180, 40, .5); }
@media (max-width: 560px) { .rede-aviso { flex-wrap: wrap; bottom: 10px; } .rede-aviso .btn { width: 100%; justify-content: center; } }
.lista-conflitos { margin: 8px 0 4px; padding-left: 18px; line-height: 1.6; }

/* ---------- sino: painel de avisos da oficina ---------- */
.notif-wrap { position: relative; flex: none; }
.notif-pop {
  position: fixed; top: 72px; right: 12px; z-index: 60; width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.notif-pop[hidden] { display: none; }
.notif-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-solid); }
.notif-head b { font-size: 16px; color: #fff; }
.notif-list { list-style: none; margin: 0; padding: 6px; }
.notif-item { display: flex; gap: 12px; width: 100%; text-align: left; padding: 12px 10px; border: 0; border-radius: 10px; background: none; color: var(--text-2); cursor: pointer; font: inherit; }
.notif-item:hover, .notif-item:focus-visible { background: rgba(80, 150, 255, .12); outline: none; }
.notif-item:focus-visible { box-shadow: 0 0 0 2px var(--blue-text); }
.notif-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(80, 150, 255, .14); color: var(--blue-text); }
.notif-ico .ico { width: 18px; height: 18px; }
.notif-txt { display: grid; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.4; }
.notif-txt b { color: #fff; font-size: 14.5px; }
.notif-txt small { color: var(--text-3, #8FA0BF); font-size: 12.5px; }
.notif-item.nova { background: rgba(80, 150, 255, .08); }
.notif-item.nova .notif-txt b::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--danger); vertical-align: middle; }
.notif-vazio { margin: 0; padding: 18px 16px 20px; color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* ---------- conferência do cadastro enviado pelo app ---------- */
.app-conf { display: grid; grid-template-columns: minmax(110px, auto) 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.app-conf > div { padding: 9px 12px; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.app-conf > .h { border-top: 0; font-weight: 600; color: #fff; background: rgba(80, 150, 255, .1); }
.app-conf > .k { color: var(--text-2); }
.app-conf .dif { color: var(--warn, #FFB547); }

@media (max-width: 700px) {
  .app-conf { grid-template-columns: 1fr 1fr; }
  .app-conf > .k { grid-column: 1 / -1; background: rgba(80, 150, 255, .06); font-weight: 600; padding-bottom: 4px; }
  .app-conf > .h.k { display: none; }
}

/* ---------- tela "Aplicativo do cliente" (empresa/aplicativo.html) ---------- */
.app-pedidos { display: grid; gap: 8px; }
.app-ped { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: rgba(4, 12, 30, .35); transition: border-color .12s, background .12s; }
.app-ped:hover, .app-ped:focus-visible { border-color: var(--blue-text); background: rgba(30, 80, 180, .14); outline: none; }
.app-ped.ativo { border-color: var(--blue-text); background: rgba(30, 80, 180, .2); box-shadow: inset 3px 0 0 var(--blue-text); }
.app-ped__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-ped__txt b { color: #fff; font-size: 15px; }
.app-ped__txt span { color: var(--text-2); font-size: 13px; }
.app-ped__ir { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-text); font-weight: 700; font-size: 14px; white-space: nowrap; }
.app-ped__seta { font-size: 22px; line-height: 1; }
@media (max-width: 700px) { .app-ped { flex-wrap: wrap; } .app-ped__txt { flex-basis: calc(100% - 140px); } .app-ped__ir { margin-left: auto; } }

.app-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; border: 1px solid; }
.app-alert .ico { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.app-alert b { color: #fff; }
.app-alert--warn { background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .4); color: #FFE2B3; }
.app-alert--danger { background: rgba(255, 90, 102, .1); border-color: rgba(255, 90, 102, .45); color: #FFC9CD; }
.app-alert--ok { background: rgba(59, 227, 107, .08); border-color: rgba(59, 227, 107, .35); color: #C8F7D5; }
.app-novodono > div { display: grid; gap: 10px; min-width: 0; }
.app-novodono__t { font-size: 15.5px; }
.app-novodono__passos { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
.app-novodono__passos li.agora { color: #fff; font-weight: 600; }
.app-novodono__passos li.feito { color: #C8F7D5; }
.app-novodono__passos li .ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.app-novodono__nota { font-size: 12.5px; }

/* as duas tabelas lado a lado, com as linhas alinhadas (subgrid) */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--n), auto); column-gap: 16px; }
.cmp-col { display: grid; grid-row: span var(--n); grid-template-rows: subgrid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cmp-col--app { border-color: rgba(46, 149, 255, .45); }
.cmp-h { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: rgba(46, 149, 255, .12); border-bottom: 1px solid var(--line); }
.cmp-col--sis .cmp-h { background: rgba(255, 255, 255, .05); }
.cmp-h .ico { width: 22px; height: 22px; color: var(--blue-text); flex: none; }
.cmp-h b { display: block; color: #fff; font-size: 15px; }
.cmp-h span { display: block; color: var(--text-2); font-size: 12.5px; }
.cmp-c { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 9px 14px; border-top: 1px solid var(--line-soft, rgba(80,150,255,.12)); font-size: 14.5px; min-height: 44px; }
.cmp-c:nth-child(2) { border-top: 0; }
.cmp-k { color: var(--muted, #8FA0BF); font-size: 12.5px; font-weight: 600; }
.cmp-v { color: #fff; overflow-wrap: anywhere; }
.cmp-v .muted { color: var(--muted, #8FA0BF); font-style: italic; }
.cmp-c--dif { background: rgba(255, 181, 71, .09); box-shadow: inset 3px 0 0 #FFB547; }
.cmp-acoes { gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .cmp-c { grid-template-columns: 1fr auto; } .cmp-k { grid-column: 1 / -1; } }
@media (max-width: 700px) { .cmp { grid-template-columns: minmax(0, 1fr); row-gap: 14px; } .cmp-col { grid-row: auto; grid-template-rows: none; } }
