:root {
  --bg: #080b16;
  --bg2: #0d1124;
  --card: #111630;
  --card2: #171d3b;
  --line: #232a4d;
  --text: #eef1f8;
  --muted: #9aa1bf;
  --navy: #1b2456;
  --red: #e10600;
  --red2: #ff3b30;
  --red-soft: rgba(225, 6, 0, .15);
  --ok: #22c55e;
  --warn: #f59e0b;
  --info: #3b82f6;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .25);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Montserrat', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0; margin: 0; font-weight: 800; }
h1 { font-size: 26px; text-transform: uppercase; font-weight: 900; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.red { color: var(--red2); }
.hide { display: none !important; }
::selection { background: var(--red); color: #fff; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, #141c46 0%, #0d1230 55%, #2a0a12 100%);
  border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 10px; }
.logo-img { width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12), 0 4px 14px rgba(0, 0, 0, .4); }
.brand b { font: 900 19px/1 var(--display); text-transform: uppercase; display: block; }
.brand b span { color: var(--red2); }
.brand small { color: #b8bdd6; font-size: 10.5px; letter-spacing: .02em; display: block; margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 600; position: relative; transition: .15s;
}
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a { color: #b8bdd6; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.on { color: #fff; background: linear-gradient(90deg, rgba(225, 6, 0, .35), rgba(225, 6, 0, .08)); }
.nav a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.side .user { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 800; flex: none; }
.side .user > div:not(.avatar) { min-width: 0; flex: 1; }
.side .user b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .user small { color: var(--muted); text-transform: capitalize; }
main { padding: 26px 30px 60px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.top .sub { color: var(--muted); margin-top: 2px; }
.mobile-top { display: none; }

/* ---------- Componentes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); padding: 9px 14px; border-radius: 10px; font: 600 14px var(--font);
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #3a3a44; background: #24242a; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red2); border-color: var(--red2); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff6b63; }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.icon { padding: 7px; }
.btn.wa { background: #128c4a; border-color: #128c4a; color: #fff; }
.btn.wa:hover { background: #0f7a40; border-color: #0f7a40; }
.btn.ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.ok:hover { background: #15803d; border-color: #15803d; }
.tag-old { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #fbbf24; white-space: nowrap; }
.tag-old svg { width: 13px; height: 13px; }
.card-alert { border-color: rgba(245, 158, 11, .45); background: linear-gradient(rgba(245, 158, 11, .06), rgba(245, 158, 11, .06)), var(--card); }
.card-alert h2 { display: flex; align-items: center; gap: 8px; color: #fcd34d; }
.card-alert h2 svg { width: 20px; height: 20px; }
.card-alert .list-item { gap: 10px; }
.aviso-old { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .4); color: #fcd34d; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.aviso-old > svg { width: 20px; flex: none; }
.aviso-old .grow { flex: 1; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.g21 { grid-template-columns: 2fr 1fr; }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--red-soft); }
.kpi small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; }
.kpi b { display: block; font: 800 28px/1.1 var(--display); margin-top: 8px; }
.kpi:hover { border-color: #33407a; }
.kpi .ic { position: absolute; right: 16px; top: 16px; color: var(--red); z-index: 1; }
.kpi .ic svg { width: 22px; height: 22px; }

input, select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: 10px 12px; font: 14px var(--font); outline: none; transition: .15s;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.f { margin-bottom: 12px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.search { position: relative; flex: 1; min-width: 200px; max-width: 380px; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.chip i { font-style: normal; opacity: .7; margin-left: 4px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--card2); }
.tbl { overflow-x: auto; margin: -18px; }
.tbl table { min-width: 640px; }
.tbl tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--line); display: block; margin: 0 auto 10px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-orcamento { color: #c4b5fd; background: rgba(139, 92, 246, .14); }
.s-aprovado { color: #93c5fd; background: rgba(59, 130, 246, .14); }
.s-em_servico { color: #fdba74; background: rgba(249, 115, 22, .15); }
.s-aguardando_peca { color: #fcd34d; background: rgba(245, 158, 11, .14); }
.s-pronto { color: #86efac; background: rgba(34, 197, 94, .15); }
.s-entregue { color: #a1a1aa; background: rgba(161, 161, 170, .12); }
.s-cancelado { color: #ff7b74; background: var(--red-soft); }
.tag-low { color: #ff7b74; font-weight: 700; }
.plate { display: inline-block; font: 700 12px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; background: #f4f4f5; color: #111; padding: 4px 7px; border-radius: 4px; border-top: 4px solid #1e3a8a; }

/* Lista de OS como cards no mobile */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osnum { font: 700 18px/1 var(--display); color: var(--red2); min-width: 46px; }

/* Barra de status da OS */
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.step:hover { color: var(--text); }
.step.on { background: var(--red); border-color: var(--red); color: #fff; }
.items td { padding: 6px; }
.items input { padding: 8px 10px; }
.totals { display: grid; gap: 8px; max-width: 340px; margin-left: auto; }
.totals div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.totals input { width: 130px; text-align: right; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; font: 700 26px var(--display); }
.totals .grand span:last-child { color: var(--red2); }
.client-box { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg2); }
.client-box .grow { flex: 1; min-width: 0; }

/* Gráfico */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.chart .bar i { display: block; width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--red2), #8f0400); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .bar small { font-size: 10px; color: var(--muted); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; animation: up .2s; }
.modal.lg { max-width: 760px; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #fff; color: #111; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 99; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); border-left: 5px solid var(--ok); animation: up .2s; max-width: 90vw; }
.toast.err { border-left-color: var(--red); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero {
  background: radial-gradient(circle at 85% 20%, rgba(225, 6, 0, .45), transparent 50%), linear-gradient(115deg, #141c46 0%, #1b1f4a 50%, #6d0b12 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 60px; border-right: 1px solid var(--line); position: relative; overflow: hidden;
}
.login .hero .logo { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 20px 50px rgba(0, 0, 0, .5); }
.login .hero h1 { font-size: 60px; line-height: .95; margin-top: 24px; }
.login .hero .slogan { color: #fff; font: 600 20px var(--font); margin: 8px 0 14px; }
.login .hero h1 span { color: #fff; }
.login .hero p { color: #c9cde0; font-size: 16px; max-width: 440px; }
.login .stripe { position: absolute; bottom: 0; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--red) 0 40px, #fff 40px 80px); opacity: .9; }
.login form { display: flex; flex-direction: column; justify-content: center; padding: 60px; max-width: 460px; width: 100%; margin: 0 auto; }
.login form h2 { font-size: 28px; margin-bottom: 4px; }
.login .err { color: #ff7b74; min-height: 20px; margin: 4px 0 10px; font-weight: 600; }

/* Chat IA */
.chat { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 80%; padding: 12px 15px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--card2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.ai b { color: #fff; }
.chat-in { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--bg2); }
.chat-in textarea { min-height: 46px; max-height: 140px; resize: none; }
.sugs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.sugs button { background: var(--card2); border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 99px; cursor: pointer; font: 13px var(--font); }
.sugs button:hover { border-color: var(--red); }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

/* Impressão da OS */
#print { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .app, .modal-bg, .toast, .login { display: none !important; }
  #print { display: block; font: 12px/1.4 Arial, sans-serif; color: #000; padding: 10px; }
  #print .ph { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #e10600; padding-bottom: 10px; margin-bottom: 12px; }
  #print h1 { font: 800 26px Arial; text-transform: uppercase; color: #000; }
  #print h1 span { color: #e10600; }
  #print .box { border: 1px solid #999; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
  #print .box b { font-size: 10px; text-transform: uppercase; color: #555; display: block; }
  #print table { width: 100%; border-collapse: collapse; margin: 8px 0; }
  #print th, #print td { border: 1px solid #999; padding: 5px 7px; color: #000; }
  #print th { background: #eee; font-size: 10px; }
  #print .tot { text-align: right; font-size: 14px; }
  #print .sign { display: flex; gap: 40px; margin-top: 50px; }
  #print .sign div { flex: 1; border-top: 1px solid #000; text-align: center; padding-top: 4px; }
  #print .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #print .ph { border-bottom-color: #1b2456; }
  #print .pfotos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
  #print .pfotos img { width: 100%; height: 90px; object-fit: cover; border-radius: 4px; }
  #print .sign { margin-top: 70px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: 1fr 1fr; } .g21 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); z-index: 40; background: #0d1230;
  }
  .side .brand, .side .user { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; font-size: 10px; padding: 6px 4px; flex: 1; text-align: center; }
  .nav a.on::before { left: 25%; right: 25%; top: -7px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav a.opt { display: none; }
  main { padding: 0 16px 100px; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 30; }
  .mobile-top .brand { border: 0; padding: 0; margin: 0; }
  .mobile-top .brand .logo-img { width: 36px; height: 36px; }
  .mobile-top .brand b { font-size: 17px; }
  .login .hero .logo { width: 96px; height: 96px; }
  .login .hero .slogan { font-size: 16px; }
  h1 { font-size: 24px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .g4 { gap: 10px; }
  .kpi b { font-size: 24px; }
  .card { padding: 14px; }
  .tbl { margin: -14px; }
  .login { grid-template-columns: 1fr; }
  .login .hero { padding: 40px 24px 30px; }
  .login .hero h1 { font-size: 42px; }
  .login form { padding: 30px 24px; }
  .msg { max-width: 92%; }
  .chat { height: calc(100vh - 200px); }
  .search { max-width: none; }
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; }
}

/* Vistoria de entrada */
.chk { display: flex; flex-wrap: wrap; gap: 6px; }
.chk button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.chk button::before { content: '○'; font-size: 12px; }
.chk button.ok { color: #86efac; border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .1); }
.chk button.ok::before { content: '✓'; }
.chk button.nao { color: #fcd34d; border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .1); }
.chk button.nao::before { content: '⚠'; }
.chk button:disabled { cursor: default; }
.fuel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.fuel button { padding: 9px 4px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
.fuel button:first-child { border-radius: 10px 0 0 10px; } .fuel button:last-child { border-radius: 0 10px 10px 0; }
.fuel button.on { background: linear-gradient(180deg, var(--red2), var(--red)); border-color: var(--red); color: #fff; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fotos .ft { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.fotos .ft img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.fotos .ft button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.fotos .ft button svg { width: 14px; }
.fotos .ft small { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 99px; }
.fotos .add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 12px; background: transparent; }
.fotos .add:hover { border-color: var(--red); color: var(--text); }
.fotos .add svg { width: 26px; height: 26px; display: block; margin: 0 auto 4px; }
.assin { background: #fff; border-radius: 12px; min-height: 90px; display: grid; place-items: center; color: #777; border: 1px solid var(--line); }
.assin img { max-width: 100%; max-height: 120px; }
.pad { width: 100%; height: 220px; background: #fff; border-radius: 12px; touch-action: none; display: block; }
.zoom { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 60; display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.sec-t { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sec-t:first-of-type { margin-top: 0; }

/* Pátio (quadro) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 200px; transition: .15s; }
.kcol.over { border-color: var(--red); background: var(--card); }
.kcol h3 { display: flex; justify-content: space-between; align-items: center; font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .04em; padding: 4px 4px 10px; }
.kcol h3 i { font-style: normal; background: var(--card2); border-radius: 99px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.kcard { display: block; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.kcard:hover { border-color: #33407a; }
.kcard.dragging { opacity: .4; }
.kcard b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .kf { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 6px; }
.kcol[data-s=orcamento] .kcard { border-left-color: #8b5cf6; } .kcol[data-s=aprovado] .kcard { border-left-color: #3b82f6; }
.kcol[data-s=em_servico] .kcard { border-left-color: #f97316; } .kcol[data-s=aguardando_peca] .kcard { border-left-color: #f59e0b; }
.kcol[data-s=pronto] .kcard { border-left-color: #22c55e; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 8px; font: 600 13px var(--font); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--red); color: #fff; }
.card-info { border-color: rgba(59, 130, 246, .45); }
.card-info h2 { display: flex; align-items: center; gap: 8px; color: #93c5fd; }
.card-info h2 svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  .kanban { grid-auto-columns: 80vw; }
  .nav a.mais { display: flex; }
  .pdv-cart { position: static; }
  .side .nav { overflow: visible; }
}

/* Menu */
.nav { overflow-y: auto; }
.nav a.mais { display: none; }
.menu-mais { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.menu-mais a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; text-align: center; }
.menu-mais a svg { width: 24px; height: 24px; color: var(--red2); }

/* Balcão */
.pdv-res { margin-top: 10px; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.pdv-prod { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: 14px var(--font); cursor: pointer; }
.pdv-prod:hover { border-color: var(--red); }
.pdv-prod .grow { flex: 1; min-width: 0; } .pdv-prod .grow b, .pdv-prod .grow span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdv-prod .grow span { font-size: 12px; }
.pdv-cart { position: sticky; top: 16px; }
.pdv-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pdv-item .grow { flex: 1; min-width: 0; } .pdv-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pdv-item .grow span { font-size: 12px; }
.qtd { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qtd button { width: 30px; height: 32px; border: 0; background: var(--card2); color: var(--text); font-size: 18px; cursor: pointer; }
.qtd input { width: 42px; border: 0; border-radius: 0; text-align: center; padding: 6px 2px; background: var(--bg2); }

/* Agenda */
.ag-dia { margin-bottom: 12px; }
.ag-dia.hoje { border-color: rgba(59, 130, 246, .6); }
.ag-dia .card-h { margin-bottom: 8px; }
.ag-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border-left: 4px solid #3b82f6; margin-bottom: 6px; flex-wrap: wrap; }
.ag-item .grow { flex: 1; min-width: 160px; } .ag-item .grow > * { display: block; }
.ag-h { font: 800 18px var(--display); min-width: 56px; }
.ag-st { font-size: 12px; font-weight: 700; color: var(--muted); }
.ag-acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ag-item.st-confirmado { border-left-color: #22c55e; } .ag-item.st-concluido { border-left-color: #71717a; opacity: .7; }
.ag-item.st-faltou { border-left-color: #f59e0b; opacity: .7; } .ag-item.st-cancelado { border-left-color: #ef4444; opacity: .55; }

/* Tela de descanso */
.descanso { position: fixed; inset: 0; z-index: 100; background: #080b16; animation: fade .8s; }
.descanso iframe { width: 100%; height: 100%; border: 0; display: block; }
.descanso .tampa { position: absolute; inset: 0; cursor: pointer; }

/* Licença */
.aviso-lic { display: flex; gap: 10px; align-items: center; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .4); color: #fcd34d; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.aviso-lic svg { width: 20px; flex: none; }
.bloqueio { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 20%, rgba(225, 6, 0, .25), transparent 60%), var(--bg); }
.bloqueio .card { max-width: 480px; width: 100%; text-align: center; padding: 34px 26px; border-top: 4px solid var(--red); }
.bloqueio .lock { width: 64px; height: 64px; border-radius: 50%; background: var(--red-soft); color: var(--red2); display: grid; place-items: center; margin: 0 auto 14px; }
.bloqueio .lock svg { width: 32px; }
.bloqueio p { font-size: 15px; }
.bloqueio .pix { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; background: var(--bg2); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; margin-top: 14px; }
.bloqueio .pix small { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
