/* =====================================================================
   ESTACIONA — folha de estilo
   Estética: utilitária, alto contraste. Navy + azul + âmbar (alinhado ao site).
   ===================================================================== */

:root {
    --bg:        #0f1d3d;
    --bg-2:      #16244a;
    --surface:   #ffffff;
    --surface-2: #f4f6f9;
    --ink:       #1a2330;
    --ink-soft:  #5b6776;
    --line:      #e2e8f0;
    --teal:      #2563eb;
    --teal-dk:   #1d4ed8;
    --amber:     #f59e0b;
    --red:       #dc2626;
    --green:     #16a34a;
    --blue:      #2563eb;
    --purple:    #7c3aed;
    --orange:    #ea580c;
    --radius:    10px;
    --shadow:    0 1px 3px rgba(15,23,32,.08), 0 8px 24px rgba(15,23,32,.06);
    --shadow-lg: 0 12px 40px rgba(15,23,32,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Sora', system-ui, sans-serif;
    color: var(--ink); background: var(--surface-2);
    font-size: 14.5px; line-height: 1.45;
}
code, .mono { font-family: 'Roboto Mono', monospace; }

/* ---------- LOGIN ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center;
    background:
        radial-gradient(1100px 520px at 50% -8%, #1e3a8a 0%, rgba(30,58,138,0) 60%),
        linear-gradient(160deg, #14224a 0%, var(--bg) 55%, #0b1530 100%);
    padding: 24px; }
.login-card { background: var(--surface); width: 100%; max-width: 400px;
    padding: 34px 32px 22px; border-radius: 20px; text-align: center;
    box-shadow: 0 24px 60px rgba(8,15,35,.38); border-top: 4px solid var(--blue); }
.login-client-logo { display: block; max-width: 240px; max-height: 132px;
    width: auto; height: auto; margin: 6px auto 18px; object-fit: contain; }
.login-mark { font-size: 44px; }
.login-title { font-size: 21px; font-weight: 700; letter-spacing: -.4px; color: var(--ink); }
.login-title strong { color: var(--teal); }
.login-sub { color: var(--ink-soft); margin: 4px 0 24px; font-size: 13px; }
.login-form { text-align: left; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink); margin-bottom: 7px; }
.login-card input { width: 100%; padding: 13px 14px; font-size: 15px; background: #fff;
    border: 1.5px solid var(--line); border-radius: 12px; font-family: inherit; transition: .15s; }
.login-card input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.login-card button { width: 100%; margin-top: 4px; padding: 14px; font-size: 15px; font-weight: 700;
    background: var(--blue); color: #fff; border: none; border-radius: 12px; cursor: pointer; transition: .15s; }
.login-card button:hover { background: var(--teal-dk); }
.login-hint { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 18px; }
.alert-error { background: #fee2e2; color: #b91c1c; padding: 11px 14px; border-radius: 10px;
    font-size: 13.5px; margin-bottom: 16px; text-align: left; }
.login-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
    display: flex; flex-direction: column; align-items: center; gap: 7px; }
.login-foot .powered { font-size: 10.5px; color: #94a3b8; letter-spacing: .6px; text-transform: uppercase; }
.login-foot img { height: 24px; width: auto; opacity: .92; }

/* ---------- TOPBAR ---------- */
.topbar { display: flex; align-items: center; gap: 26px; background: var(--bg); color: #e8eef4;
    padding: 0 22px; height: 60px; position: sticky; top: 0; z-index: 50; }
.brand { font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand-mark { margin-right: 4px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: #9fb0c0; text-decoration: none; padding: 8px 14px; border-radius: 8px;
    font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: var(--teal); color: #fff; }
.user-box { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-name { font-size: 13px; font-weight: 600; }
.user-perfil { background: var(--amber); color: #3a2a00; font-size: 10.5px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.btn-logout { color: #9fb0c0; text-decoration: none; font-size: 13px; font-weight: 600; }
.btn-logout:hover { color: var(--red); }

/* ---------- LAYOUT ---------- */
.container { padding: 26px; max-width: 1320px; margin: 0 auto; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 20px; }
.footbar { text-align: center; color: var(--ink-soft); font-size: 12px; padding: 24px; }

/* ---------- KPI CARDS ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px,1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); border-left: 5px solid var(--teal); }
.kpi-blue { border-color: var(--blue); } .kpi-green { border-color: var(--green); }
.kpi-purple { border-color: var(--purple); } .kpi-orange { border-color: var(--orange); }
.kpi-red { border-color: var(--red); }
.kpi-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi-value { font-size: 29px; font-weight: 700; font-family: 'Roboto Mono', monospace; margin-top: 4px; white-space: nowrap; }
.kpi-foot { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px){ .dash-cols { grid-template-columns: 1fr; } }

/* ---------- PANELS / TABLES ---------- */
.panel { background: var(--surface); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin-bottom: 14px; }
.muted { color: var(--ink-soft); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar input, .toolbar select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line);
    color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .danger { color: var(--red); font-weight: 700; }
.tbl .num { font-family: 'Roboto Mono', monospace; text-align: right; }

.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; display: inline-block; }
.pill-ok, .pill-em_dia { background: #dcfce7; color: #15803d; }
.pill-a_vencer { background: #dbeafe; color: #1d4ed8; }
.pill-baixo { background: #fef3c7; color: #b45309; }
.pill-inadimplente, .pill-zerado { background: #fee2e2; color: #b91c1c; }
.pill-inativa, .pill-sem_mensalidade { background: #e5e7eb; color: #4b5563; }
.pill-avulso { background: #e0f2fe; color: #0369a1; }
.pill-mensalista { background: #ede9fe; color: #6d28d9; }
.pill-aberto { background: #dcfce7; color: #15803d; }
.pill-pago { background: #dbeafe; color: #1d4ed8; }

/* ---------- BUTTONS ---------- */
.btn { font-family: inherit; font-weight: 600; font-size: 13.5px; padding: 10px 16px;
    border: none; border-radius: var(--radius); cursor: pointer; transition: .15s; background: var(--surface-2); color: var(--ink); }
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dk); }
.btn-amber { background: var(--amber); color: #3a2a00; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-lg { padding: 16px 22px; font-size: 17px; }

/* ---------- FORMS ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: var(--ink); }
.field input, .field select, .field textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
    border-radius: 8px; font-family: inherit; font-size: 14px; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37,99,235,.13); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px){ .grid-2,.grid-3 { grid-template-columns: 1fr; } }

.alert { padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.alert.erro { background: #fee2e2; color: #b91c1c; }
.alert.ok { background: #dcfce7; color: #15803d; }
.alert.warn { background: #fef3c7; color: #b45309; }

/* ---------- MODAL ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,32,.55); display: none;
    place-items: center; z-index: 100; padding: 20px; }
.modal-bg.show { display: grid; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end;
    position: sticky; bottom: 0; background: #fff; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink-soft); line-height: 1; }

/* ---------- TOAST ---------- */
#toast { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 10px; box-shadow: var(--shadow-lg);
    font-size: 13.5px; font-weight: 600; animation: slidein .25s ease; min-width: 240px; }
.toast.ok { background: var(--green); } .toast.erro { background: var(--red); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }

/* =====================================================================
   PÁTIO
   ===================================================================== */
.patio-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.patio-head .occ { margin-left: auto; display: flex; gap: 18px; }
.occ-stat { text-align: center; }
.occ-stat .n { font-size: 26px; font-weight: 700; font-family: 'Roboto Mono', monospace; }
.occ-stat .l { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.occ-stat.livre .n { color: var(--green); }
.occ-stat.ocup .n { color: var(--red); }

.patio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 8px; }
.vaga { aspect-ratio: 1 / .82; border-radius: 12px; border: 2px solid var(--line); background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    cursor: pointer; transition: .15s; position: relative; padding: 6px; }
.vaga:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.vaga .codigo { font-weight: 700; font-family: 'Roboto Mono', monospace; font-size: 15px; }
.vaga .icone { font-size: 22px; line-height: 1; }
.vaga .placa { font-size: 10.5px; font-family: 'Roboto Mono', monospace; color: var(--ink-soft); }
.vaga.livre { border-color: #bbf7d0; background: #f0fdf4; }
.vaga.livre .codigo { color: var(--green); }
.vaga.ocupada { border-color: #fecaca; background: #fef2f2; }
.vaga.ocupada .codigo { color: var(--red); }
.vaga.mensalista { border-color: #ddd6fe; background: #f5f3ff; }
.vaga.mensalista .codigo { color: var(--purple); }
.vaga .tempo { font-size: 10px; color: var(--ink-soft); font-family: 'Roboto Mono', monospace; }
.setor-tag { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--ink-soft); margin: 4px 0 18px; flex-wrap: wrap; }
.legenda .dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.dot-livre { background: #bbf7d0; } .dot-ocup { background: #fecaca; } .dot-mens { background: #ddd6fe; }

/* lista de veiculos no patio */
.tempo-badge { font-family: 'Roboto Mono', monospace; font-weight: 700; }

/* cobranca / saida */
.calc-box { background: var(--surface-2); border-radius: 12px; padding: 18px; margin: 14px 0; }
.calc-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13.5px; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line);
    margin-top: 10px; padding-top: 12px; }
.calc-total strong { font-size: 34px; font-family: 'Roboto Mono', monospace; color: var(--teal); }
.pay-methods { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 12px 0; }
.pay-btn { padding: 13px 8px; border: 2px solid var(--line); background: #fff; border-radius: 10px;
    cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; }
.pay-btn:hover { border-color: var(--teal); }
.pay-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width:600px){ .pay-methods { grid-template-columns: repeat(2,1fr); } }

.toler-banner { background: #fef3c7; color: #b45309; border-radius: 10px; padding: 14px;
    text-align: center; font-weight: 600; margin: 12px 0; }
.toler-count { font-family: 'Roboto Mono', monospace; font-size: 26px; font-weight: 700; }

/* tarifa faixas editor */
.faixa-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.faixa-row input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 13px; width: 100%; }

/* barras de relatorio */
.report-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px;
    background: var(--surface); padding: 16px; border-radius: 12px; box-shadow: var(--shadow); }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-row .bar-label { width: 90px; font-size: 13px; font-family: 'Roboto Mono', monospace; }
.bar-track { flex: 1; background: var(--surface-2); border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal); border-radius: 6px; }
.bar-row .bar-val { width: 120px; text-align: right; font-family: 'Roboto Mono', monospace; font-weight: 700; font-size: 13px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.autocomplete { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--line);
    border-radius: 0 0 10px 10px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 280px; overflow-y: auto; }
.autocomplete-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.autocomplete-item:hover, .autocomplete-item.hl { background: var(--surface-2); }

/* =====================================================================
   IMPRESSÃO DO TICKET (80mm e A4)
   ===================================================================== */
.print-area { display: none; }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { display: block; position: absolute; left: 0; top: 0; width: 100%; }
    .topbar, .footbar, .no-print { display: none !important; }
}

/* layout do cupom — controlado por classe no .print-area */
.cupom { font-family: 'Roboto Mono', monospace; color: #000; padding: 6mm; }
.cupom.modo-80mm { width: 72mm; font-size: 11px; }
.cupom.modo-a4 { width: 180mm; font-size: 13px; padding: 18mm; }
.cupom h2 { text-align: center; font-size: 1.3em; margin-bottom: 4px; }
.cupom .c-sub { text-align: center; margin-bottom: 10px; font-size: .9em; }
.cupom .c-line { display: flex; justify-content: space-between; padding: 2px 0; }
.cupom .c-hr { border-top: 1px dashed #000; margin: 8px 0; }
.cupom .c-big { text-align: center; font-size: 1.8em; font-weight: 700; letter-spacing: 2px; margin: 8px 0; }
.cupom .c-foot { text-align: center; margin-top: 12px; font-size: .85em; }
.cupom .c-qr { text-align: center; margin: 10px 0 6px; }
.cupom .c-qr img { width: 42mm; height: auto; image-rendering: pixelated; }
.cupom .c-qr-cap { font-size: .78em; margin-top: 2px; }

/* =====================================================================
   LEITOR DE QR (CHECK-OUT POR CÂMERA)
   ===================================================================== */
.qr-reader { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; min-height: 60px; }
.qr-reader video, .qr-reader img { width: 100% !important; height: auto !important; display: block; }
.qr-reader__dashboard_section_csr button,
.qr-reader button { font-family: inherit !important; font-weight: 600; font-size: 13.5px;
    padding: 9px 14px; border: none; border-radius: var(--radius); cursor: pointer;
    background: var(--teal); color: #fff; margin: 6px 4px; }
.qr-reader select { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px;
    font-family: inherit; font-size: 13.5px; margin: 4px 0; }
.qr-reader a { color: var(--teal); }
.qr-reader__dashboard_section { padding: 10px !important; }

/* =====================================================================
   PDV / PRODUTOS / ESTOQUE
   ===================================================================== */

/* base p/ .search usado fora da .toolbar (ex.: select na saída) */
.search { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px;
    font-family: inherit; font-size: 14px; background: #fff; }
.search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37,99,235,.13); }

/* pill complementar (situação de estoque sem controle) */
.pill-na { background: #e5e7eb; color: #4b5563; }

/* ---------- LAYOUT DO PDV (catálogo | carrinho) ---------- */
.pdv-layout { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.pdv-catalogo { margin-bottom: 0; }
.pdv-carrinho { margin-bottom: 0; position: sticky; top: 78px; }
@media (max-width: 900px){ .pdv-layout { grid-template-columns: 1fr; } .pdv-carrinho { position: static; } }

/* chips de categoria */
.pdv-cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 7px 15px; border: 1.5px solid var(--line); background: #fff; border-radius: 20px;
    cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ink-soft); transition: .15s; }
.chip:hover { border-color: var(--teal); color: var(--ink); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* grade de produtos */
.pdv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.pdv-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left;
    background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px;
    cursor: pointer; font-family: inherit; transition: .15s; min-height: 104px; }
.pdv-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow); }
.pdv-card.off { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.pdv-card.off:hover { transform: none; border-color: var(--line); box-shadow: none; }
.pdv-card-nome { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pdv-card-preco { font-size: 17px; font-weight: 700; color: var(--teal); margin-top: auto; }
.pdv-estoque { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .3px; background: #dcfce7; color: #15803d; }
.pdv-estoque.baixo { background: #fef3c7; color: #b45309; }
.pdv-estoque.zero { background: #fee2e2; color: #b91c1c; }
.pdv-estoque.na { background: #e5e7eb; color: #4b5563; }

/* ---------- CARRINHO (PDV e saída) ---------- */
.pdv-cart-list { margin-bottom: 14px; max-height: 42vh; overflow-y: auto; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: none; }
.cart-row.compact { padding: 7px 0; }
.cart-info { min-width: 0; }
.cart-nome { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-stepper { display: flex; align-items: center; gap: 4px; }
.cart-stepper button { width: 28px; height: 28px; border: 1.5px solid var(--line); background: #fff;
    border-radius: 7px; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1; color: var(--ink);
    display: grid; place-items: center; transition: .15s; }
.cart-stepper button:hover { border-color: var(--teal); color: var(--teal); }
.cart-stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 13.5px; }
.cart-total { font-weight: 700; font-size: 14px; min-width: 74px; text-align: right; }
.cart-del { background: none; border: none; color: var(--ink-soft); font-size: 20px; cursor: pointer;
    line-height: 1; padding: 0 2px; transition: .15s; }
.cart-del:hover { color: var(--red); }

/* ---------- CONSUMO NA SAÍDA (checkout do carro) ---------- */
.saida-consumo { background: var(--surface-2); border-radius: 12px; padding: 14px; margin: 14px 0; }
.saida-consumo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.saida-consumo-head > span { font-weight: 700; font-size: 13px; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: .4px; }
.saida-cart { margin-top: 4px; }

/* ---------- KARDEX (histórico de movimentos) ---------- */
.kardex { margin-top: 8px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.kardex-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center;
    padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.kardex-row:last-child { border-bottom: none; }
.kardex-row:hover { background: var(--surface-2); }
.kardex-tipo { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.k-entrada { background: #dcfce7; color: #15803d; }
.k-saida   { background: #fee2e2; color: #b91c1c; }
.k-ajuste  { background: #dbeafe; color: #1d4ed8; }
.kardex-origem { color: var(--ink-soft); font-size: 12px; text-transform: capitalize; }

/* ---------- LOGO / BRAND (alinhado ao site) ---------- */
.brand { display: flex; align-items: center; }
.brand a { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.login-logo { display: block; margin: 2px auto 10px; height: 96px; width: auto; }

/* =====================================================================
   RESPONSIVIDADE / MOBILE  (refatoração)
   ===================================================================== */

/* --- base de segurança p/ telas pequenas --- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; }
* { -webkit-tap-highlight-color: rgba(37,99,235,.12); }

/* container rolável para qualquer tabela (injetado via JS) */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* botão do menu (oculto no desktop) */
.nav-toggle { display: none; background: rgba(255,255,255,.08); color: #fff; border: none;
    width: 42px; height: 42px; border-radius: 10px; font-size: 22px; line-height: 1;
    cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle:hover { background: rgba(255,255,255,.16); }

/* ===================== TABLET / NAV COLAPSÁVEL (<= 880px) ===================== */
@media (max-width: 1180px) {   /* menu ☰: celular, tablet e notebook pequeno */
    .topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 14px; gap: 12px; }
    .brand { flex: 1; }
    .brand img { height: 30px; }
    .nav-toggle { display: inline-flex; margin-left: auto; }

    .nav { display: none; order: 3; flex-basis: 100%; width: 100%;
        flex-direction: column; gap: 3px; overflow: visible; padding: 4px 0 8px; }
    .topbar.nav-open .nav { display: flex; }
    .nav a { padding: 13px 14px; font-size: 15px; border-radius: 8px; }

    .user-box { display: none; order: 4; flex-basis: 100%; width: 100%;
        justify-content: space-between; align-items: center; gap: 10px;
        padding: 12px 4px 6px; border-top: 1px solid rgba(255,255,255,.12); }
    .topbar.nav-open .user-box { display: flex; }
    .btn-logout { padding: 8px 14px; border: 1.5px solid rgba(255,255,255,.2); border-radius: 8px; }
}

/* ===================== CELULAR (<= 560px) ===================== */
@media (max-width: 560px) {
    .container { padding: 14px; }
    .page-title { font-size: 20px; margin-bottom: 14px; }
    .footbar { padding: 18px 14px; }

    /* evita zoom automático no iOS ao focar campos */
    input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }

    /* KPIs: 2 por linha, mais compactos */
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
    .kpi { padding: 14px; border-left-width: 4px; }
    .kpi-value { font-size: 23px; }
    .kpi-label { font-size: 11px; }
    .kpi-foot { font-size: 11.5px; }

    /* painéis e tabelas */
    .panel { padding: 14px; border-radius: 12px; }
    .panel h2 { font-size: 15px; }
    .table-wrap { border: 1px solid var(--line); border-radius: 12px; }
    .tbl { font-size: 13px; }
    .tbl th, .tbl td { padding: 10px; white-space: nowrap; }

    /* toolbars: tudo empilhado e em largura cheia */
    .toolbar { gap: 8px; }
    .toolbar .search, .toolbar input, .toolbar select { flex: 1 1 100%; min-width: 0; width: 100%; }
    .toolbar .btn { width: 100%; }

    /* botões com alvo de toque confortável */
    .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .btn-sm { min-height: 34px; }

    /* modais viram "bottom sheet" de tela cheia */
    .modal-bg { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
    .modal-head { padding: 16px; }
    .modal-head h3 { font-size: 17px; }
    .modal-body { padding: 16px; }
    .modal-foot { padding: 14px 16px; gap: 8px; }
    .modal-foot .btn { flex: 1; }

    /* toast em largura cheia */
    #toast { left: 12px; right: 12px; bottom: 12px; }
    .toast { min-width: 0; width: 100%; }

    /* PÁTIO */
    .patio-head { gap: 10px; }
    .patio-head .page-title { flex: 1 1 100%; margin: 0; }
    .patio-head > .btn { flex: 1; }
    .patio-head .occ { margin-left: 0; width: 100%; justify-content: space-around;
        background: var(--surface); border-radius: 12px; padding: 12px 8px; box-shadow: var(--shadow); }
    .occ-stat .n { font-size: 22px; }
    .patio-grid { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
    .vaga .codigo { font-size: 14px; }
    .vaga .icone { font-size: 20px; }

    /* cobrança / pagamento */
    .calc-total strong { font-size: 28px; }
    .pay-methods { grid-template-columns: repeat(2, 1fr); }
    .cart-stepper button { width: 34px; height: 34px; }

    /* PDV / produtos */
    .pdv-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
    .pdv-card { min-height: 94px; padding: 12px; }
    .pdv-card-preco { font-size: 16px; }
    .pdv-carrinho { position: static; }

    /* relatórios */
    .report-filters { flex-direction: column; align-items: stretch; gap: 10px; }
    .report-filters .field, .report-filters .btn { width: 100%; }
    .bar-row .bar-label { width: 64px; font-size: 12px; }
    .bar-row .bar-val { width: 92px; font-size: 12px; }

    /* editor de faixas de tarifa */
    .faixa-row { grid-template-columns: 1fr 1fr; }
    .faixa-row > *:last-child { grid-column: 1 / -1; }

    /* kardex em telas estreitas */
    .kardex-row { grid-template-columns: auto 1fr auto; row-gap: 2px; }
}

/* telas muito estreitas (<= 360px): KPIs em 1 coluna */
@media (max-width: 360px) {
    .cards-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   SAAS — cadastro, trial, bloqueio e painel de administração
   ===================================================================== */
.login-card-wide { max-width: 560px; }
.login-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .login-grid2 { grid-template-columns: 1fr; } }
.login-help { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.login-cta { margin-top: 18px; font-size: 14px; color: var(--ink-soft); text-align: center; }
.login-cta a { color: var(--blue); font-weight: 700; text-decoration: none; }
.login-cta a:hover { text-decoration: underline; }

.assinatura-box { background: var(--surface-2, #f4f7fc); border: 1px solid var(--line);
    border-radius: 14px; padding: 16px; margin-top: 18px; text-align: left; }
.assinatura-linha { display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 14px; }

/* faixa de aviso do período de teste */
.trial-bar { background: #fef3c7; color: #92400e; font-size: 13.5px; font-weight: 600;
    padding: 10px 26px; text-align: center; }
.trial-bar strong { color: #78350f; }

/* painel do SaaS */
.topbar-admin { background: #0b1530; }
.admin-tag { margin-left: 10px; background: var(--blue); color: #fff; font-size: 11px;
    font-weight: 700; letter-spacing: .5px; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; }
.acoes-admin { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acoes-admin form { margin: 0; }
.inline-form { display: inline-flex; gap: 4px; align-items: center; }
.inline-form input, .inline-form select { padding: 5px 7px; border: 1.5px solid var(--line);
    border-radius: 7px; font-family: inherit; font-size: 13px; }
.pill-trial     { background: #fef3c7; color: #92400e; }
.pill-ativo     { background: #dcfce7; color: #166534; }
.pill-bloqueado { background: #e5e7eb; color: #374151; }
.pill-expirado  { background: #fee2e2; color: #b91c1c; }
@media (max-width: 880px) { .acoes-admin { flex-direction: column; align-items: stretch; } }

/* ---------- cadastro v2 / edição de cliente ---------- */
.form-secao { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--blue); margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.login-form .form-secao:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.login-grid-cep    { display: grid; grid-template-columns: 150px 1fr; gap: 0 14px; }
.login-grid-cidade { display: grid; grid-template-columns: 1fr 110px; gap: 0 14px; }
.login-card select { width: 100%; padding: 13px 12px; font-size: 15px; background: #fff;
    border: 1.5px solid var(--line); border-radius: 12px; font-family: inherit; }
.field-erro { display: block; color: #b91c1c; font-size: 12px; font-weight: 600; margin-top: 5px; }
.has-erro input, .has-erro select { border-color: #dc2626 !important; background: #fff7f7; }
@media (max-width: 560px) { .login-grid-cep, .login-grid-cidade { grid-template-columns: 1fr; } }

.page-head-row { display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.form-admin .panel { margin-bottom: 16px; }
.form-admin .grid-3 { margin-bottom: 4px; }
.field-check { display: flex; align-items: center; gap: 10px; padding-top: 26px; }
.field-check input { width: auto; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 6px 0 20px; }
.link-cliente { color: var(--ink); text-decoration: none; }
.link-cliente:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 560px) { .form-admin .grid-3 > * { grid-column: auto !important; }
    .form-actions .btn { flex: 1; } }

/* ---------- faturas / posição / assinatura ---------- */
.fatura-bar { background: #fee2e2; color: #991b1b; }
.fatura-bar a { color: #991b1b; font-weight: 700; }
.user-box .btn-logout.on { color: #fff; }
.plano-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.plano-valor { font-family: 'Roboto Mono', monospace; font-size: 30px; font-weight: 700; color: var(--ink); margin: 2px 0; }
.plano-valor span { font-size: 15px; color: var(--ink-soft); font-weight: 600; }
.cliente-resumo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.filtro-mes { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.filtro-mes input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; }

/* valores monetários nunca quebram; botões-link sem sublinhado */
.tbl td.num { white-space: nowrap; }
a.btn { text-decoration: none; }
/* coluna de ações dentro de tabela: continua sendo célula (alinha o fundo da linha) */
td.acoes-admin { display: table-cell; }
td.acoes-admin > * { display: inline-flex; vertical-align: middle; margin: 3px 6px 3px 0; }

/* ---------- endereço: número / complemento / bairro ---------- */
.login-grid-num { display: grid; grid-template-columns: 150px 1fr; gap: 0 14px; }
.grid-cep    { display: grid; grid-template-columns: 170px 1fr; gap: 0 16px; }
.grid-cidade { display: grid; grid-template-columns: 1fr 110px; gap: 0 16px; }
@media (max-width: 560px) {
    .login-grid-num, .grid-cep, .grid-cidade { grid-template-columns: 1fr; }
}

/* =====================================================================
   MENU DE AÇÕES (⋮) — grades no celular (ver app.js)
   ===================================================================== */
.acoes-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
td.acoes-admin .acoes-inline > * { margin: 0; }
.tbl td .acoes-toggle, [data-acoes-menu] .acoes-toggle { display: none !important; }

.acoes-toggle {
    width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid var(--line); background: #fff; color: var(--ink);
    font-size: 22px; font-weight: 700; line-height: 1;
    align-items: center; justify-content: center; padding: 0;
}
.acoes-toggle.on, .acoes-toggle:active { background: var(--blue); border-color: var(--blue); color: #fff; }

@media (max-width: 760px) {
    .acoes-cel > .acoes-inline { display: none !important; }
    .tbl td .acoes-toggle, [data-acoes-menu] .acoes-toggle { display: inline-flex !important; }

    /* a coluna de ações fica presa à direita: nada de arrastar a tabela */
    .tbl td.acoes-cel, .tbl th.acoes-th {
        position: sticky; right: 0; z-index: 1; background: var(--surface);
        width: 56px; min-width: 56px; padding-left: 8px; padding-right: 8px; text-align: center;
        box-shadow: -10px 0 12px -10px rgba(15,23,42,.28);
    }
    .tbl thead th.acoes-th { background: var(--surface); color: transparent; }
    /* ação única: mantém o botão, só fixa a coluna */
    .tbl td.acoes-cel.acoes-unica { width: auto; min-width: 0; }
    .tbl tbody tr:hover td.acoes-cel { background: var(--surface-2); }
    [data-acoes-menu].acoes-cel { margin-left: auto; }
}

.acoes-pop {
    position: fixed; z-index: 2000; min-width: 210px; max-width: calc(100vw - 16px);
    background: #fff; border-radius: 14px; padding: 6px;
    box-shadow: 0 18px 44px rgba(15,23,42,.28), 0 0 0 1px rgba(15,23,42,.06);
    display: flex; flex-direction: column; gap: 2px;
    animation: acoesIn .12s ease-out;
}
@keyframes acoesIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* botões e links viram itens de menu */
.acoes-pop > .btn, .acoes-pop > a.btn {
    display: flex !important; width: 100%; justify-content: flex-start; text-align: left;
    background: transparent !important; border: 0 !important; box-shadow: none !important;
    color: var(--ink) !important; font-size: 15px; font-weight: 600;
    min-height: 46px; padding: 12px 14px; border-radius: 10px; margin: 0;
}
.acoes-pop > .btn:active, .acoes-pop > .btn:hover { background: var(--surface-2) !important; }
.acoes-pop > .btn-danger { color: var(--red) !important; }
.acoes-pop > .btn-amber  { color: #b45309 !important; }
.acoes-pop > .btn-primary { color: var(--blue) !important; }
/* "×" -> "Excluir" (texto vem de data-rotulo) */
.acoes-pop > .btn[data-rotulo] { font-size: 0 !important; }
.acoes-pop > .btn[data-rotulo]::after { content: attr(data-rotulo); font-size: 15px; }
/* título dos formulários dentro do menu (painel admin) */
.acoes-pop > form[data-rotulo]::before {
    content: attr(data-rotulo); flex-basis: 100%; font-size: 12px; font-weight: 700;
    color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px;
}

/* formulários do painel admin (baixa, +dias, gerar cobrança) dentro do menu */
.acoes-pop > form {
    display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center;
    padding: 10px; border-top: 1px solid var(--line); margin: 0;
}
.acoes-pop > form:first-child { border-top: 0; }
.acoes-pop > form input, .acoes-pop > form select { flex: 1 1 110px; min-height: 40px; font-size: 15px !important; }
.acoes-pop > form .btn { flex: 1 1 100%; min-height: 42px; justify-content: center; }

/* menu compacto em telas médias (cabe tudo sem rolar) */
@media (min-width: 1181px) and (max-width: 1480px) {
    .topbar { gap: 12px; padding-left: 16px; padding-right: 16px; }
    .brand img { height: 26px; }
    .nav { gap: 1px; }
    .nav a { padding: 7px 8px; font-size: 13px; }
    .user-box { gap: 8px; font-size: 13px; }
    .user-box .user-perfil { display: none; }
}
@media (min-width: 1181px) and (max-width: 1240px) {
    .user-box .user-name { display: none; }
    .nav a { padding: 6px 6px; font-size: 12.5px; }
}

/* =====================================================================
   LAVAÇÃO — agenda, semana e fila
   ===================================================================== */
.lav-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lav-head-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.lav-resumo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.lav-res-item { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
    border-left: 5px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
.lav-res-item .n { font-family: 'Roboto Mono', monospace; font-size: 26px; font-weight: 700; }
.lav-res-item .l { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.lav-em { border-left-color: #16a34a; } .lav-fila { border-left-color: #f59e0b; }
.lav-ag { border-left-color: var(--blue); } .lav-ok { border-left-color: #94a3b8; }

.lav-barra { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; }
.seg-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px;
    color: var(--ink-soft); cursor: pointer; font-family: inherit; }
.seg-btn.on { background: var(--blue); color: #fff; }
.lav-nav { display: flex; gap: 6px; align-items: center; }
.lav-nav input[type=date] { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; }
.lav-titulo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
    font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.exp { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; font-weight: 700; }
.exp.aberto { background: #dcfce7; color: #166534; } .exp.fechado { background: #fee2e2; color: #b91c1c; }
.exp.pausa { background: #fef3c7; color: #92400e; }
.atd-liberado { color: #0f766e; font-weight: 600; }
.exps { display: flex; gap: 6px; flex-wrap: wrap; }
.sem-pausa { font-size: 10.5px; color: #92400e; grid-column: 1; }
/* pausas fixas (configurar agenda) */
.pausas-lista { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pausa-vazia { margin: 0; }
.pausa-item { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface-2, #f8fafc); }
.pausa-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pausa-linha input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; min-width: 0; }
.pausa-linha .p-nome { flex: 1 1 140px; }
.pausa-linha .p-ini, .pausa-linha .p-fim { width: 132px; }
.dias-mini { margin-bottom: 0; gap: 4px; }
.dias-mini .dia-chk span { min-width: 40px; padding: 6px 4px; font-size: 12px; }
.pausas-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.vazio { color: var(--ink-soft); padding: 18px 4px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* cartão de atendimento */
.atd-lista { display: flex; flex-direction: column; gap: 10px; }
.atd { display: grid; grid-template-columns: 74px 1fr auto auto; gap: 14px; align-items: center;
    border: 1.5px solid var(--line); border-left-width: 5px; border-radius: 14px; padding: 12px 14px; background: #fff; }
.atd-hora { text-align: center; line-height: 1.15; }
.atd-hora b { display: block; font-family: 'Roboto Mono', monospace; font-size: 18px; }
.atd-hora small { color: var(--ink-soft); font-size: 11.5px; }
.atd-info { min-width: 0; }
.atd-nome { font-weight: 700; font-size: 15px; }
.atd-sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.atd-sub2 { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.atd-obs { font-size: 12.5px; margin-top: 4px; background: #fffbeb; color: #92400e; border-radius: 6px; padding: 3px 8px; display: inline-block; }
.atd-tel { color: var(--blue); font-weight: 600; text-decoration: none; }
.atd-acoes { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.tag-online { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
    background: #e0f2fe; color: #0369a1; padding: 2px 7px; border-radius: 99px; vertical-align: middle; }
.st-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.st-pill.st-agendado { background: #dbeafe; color: #1e40af; }
.st-pill.st-na_fila { background: #fef3c7; color: #92400e; }
.st-pill.st-em_atendimento { background: #dcfce7; color: #166534; }
.st-pill.st-concluido { background: #f1f5f9; color: #475569; }
.st-pill.st-cancelado, .st-pill.st-faltou { background: #fee2e2; color: #b91c1c; }
.atd.st-agendado { border-left-color: var(--blue); }
.atd.st-na_fila { border-left-color: #f59e0b; background: #fffdf5; }
.atd.st-em_atendimento { border-left-color: #16a34a; background: #f6fef9; }
.atd.st-concluido { border-left-color: #cbd5e1; opacity: .8; }
.atd.st-cancelado, .atd.st-faltou { border-left-color: #fca5a5; opacity: .65; }
.atd-outros { margin-top: 14px; }
.atd-outros summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
/* menu ⋮ sempre visível nos cartões (ações secundárias) */
[data-acoes-menu="sempre"] .acoes-toggle { display: inline-flex !important; }
[data-acoes-menu="sempre"].acoes-cel > .acoes-inline { display: none !important; }

/* semana */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sem-dia { background: var(--surface-2, #f4f7fc); border-radius: 12px; min-height: 180px; display: flex; flex-direction: column; overflow: hidden; }
.sem-dia.hoje { box-shadow: inset 0 0 0 2px var(--blue); }
.sem-dia.fechado { opacity: .55; }
.sem-cab { border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; padding: 10px 10px 8px;
    display: grid; grid-template-columns: 1fr auto; row-gap: 2px; border-bottom: 1px solid var(--line); }
.sem-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }
.sem-num { font-weight: 800; font-size: 16px; grid-column: 1; }
.sem-exp { font-size: 11px; color: var(--ink-soft); grid-column: 1; }
.sem-qtd { grid-row: 1 / span 3; grid-column: 2; align-self: center; background: var(--blue); color: #fff; border-radius: 99px;
    font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 6px; }
.sem-qtd:empty { display: none; }
.sem-itens { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.sem-item { border: 0; text-align: left; cursor: pointer; font-family: inherit; font-size: 12px; background: #fff;
    border-left: 4px solid var(--blue); border-radius: 7px; padding: 5px 7px; line-height: 1.3; }
.sem-item b { font-family: 'Roboto Mono', monospace; }
.sem-item small { display: block; color: var(--ink-soft); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sem-item.st-na_fila { border-left-color: #f59e0b; } .sem-item.st-em_atendimento { border-left-color: #16a34a; }
.sem-item.st-concluido { border-left-color: #cbd5e1; opacity: .7; }
.sem-vazio { color: #cbd5e1; text-align: center; padding: 10px 0; }

/* fila agora */
.fila-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fila-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fila-col h3 span { background: var(--surface-2, #f4f7fc); border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.fila-col .atd { grid-template-columns: 60px 1fr; }
.fila-col .atd-st { display: none; }
.fila-col .atd-acoes { grid-column: 1 / -1; justify-content: flex-start; }

/* horários livres no formulário */
.slots-box { margin: -4px 0 14px; }
.slots-tit { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-family: 'Roboto Mono', monospace;
    font-weight: 700; font-size: 13px; cursor: pointer; }
.slot.on, .slot:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* configurar agenda */
.cfg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cfg-cols .panel { margin-bottom: 16px; }
.dias-sem { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.dia-chk input { display: none; }
.dia-chk span { display: inline-block; min-width: 52px; text-align: center; padding: 10px 8px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid var(--line); font-weight: 700; font-size: 13px; color: var(--ink-soft); background: #fff; }
.dia-chk input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.link-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.link-tit { font-weight: 700; margin-bottom: 4px; }
.link-box p { font-size: 12.5px; margin-bottom: 10px; }
.link-linha { display: flex; gap: 6px; align-items: center; }
.link-linha input { flex: 1; min-width: 0; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 12.5px;
    font-family: 'Roboto Mono', monospace; background: var(--surface-2, #f4f7fc); }
.btn-link { border: 0; background: none; color: var(--ink-soft); font-size: 12px; text-decoration: underline; cursor: pointer; margin-top: 8px; padding: 0; font-family: inherit; }

@media (max-width: 1100px) {
    .semana { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .fila-grid, .cfg-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .lav-resumo { grid-template-columns: repeat(2, 1fr); }
    .lav-head-acoes { width: 100%; }
    .lav-head-acoes .btn-primary, .lav-head-acoes .btn-amber { flex: 1 1 45%; }
    .lav-head-acoes .btn-ghost { flex: 1 1 45%; }
    .lav-barra { flex-direction: column; align-items: stretch; }
    .seg { width: 100%; } .seg-btn { flex: 1; }
    .lav-nav { justify-content: space-between; }
    .lav-nav input[type=date] { flex: 1; }
    .atd { grid-template-columns: 58px 1fr auto; gap: 10px; padding: 10px; }
    .atd-st { grid-column: 2; grid-row: 2; }
    .atd-acoes { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }
    .semana { grid-template-columns: 1fr; }
    .sem-dia { min-height: 0; }
    .sem-cab { grid-template-columns: auto auto 1fr auto; column-gap: 8px; align-items: center; }
    .sem-num, .sem-exp, .sem-pausa { grid-column: auto; }
    .sem-qtd { grid-row: auto; grid-column: auto; }
    .link-linha { flex-wrap: wrap; } .link-linha input { flex-basis: 100%; }
}
/* colunas da configuração não podem crescer além da tela (link longo) */
.cfg-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cfg-cols > div { min-width: 0; }
@media (max-width: 1100px) { .cfg-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pix (faturas do SaaS) ---------- */
.pix-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pix-box img { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pix-dados { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.pix-dados span { display: block; font-size: 11.5px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.pix-dados strong { word-break: break-all; }
.pix-cc { width: 100%; font-family: 'Roboto Mono', monospace; font-size: 12px; padding: 10px; border: 1.5px solid var(--line);
    border-radius: 10px; background: var(--surface-2, #f4f7fc); resize: none; word-break: break-all; }
.pix-modal .pix-valor { text-align: center; font-family: 'Roboto Mono', monospace; font-size: 30px; font-weight: 700; }
.pix-qr { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
/* tela de acesso bloqueado */
.fat-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.fat-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; }
.fat-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.btn-pix { width: 100%; margin-top: 10px; padding: 11px; border: 0; border-radius: 10px; background: #00a868; color: #fff;
    font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-pix:hover { filter: brightness(.95); }
.pix-inline { margin-top: 12px; text-align: center; }
.pix-inline .pix-qr { width: 200px; margin-bottom: 10px; }
.assinatura-linha strong, .fat-linha strong { white-space: nowrap; }
.fat-ref { display: block; font-size: 11px; color: var(--ink-soft); }

/* ---------- busca enquanto digita (autocompletar) ---------- */
.ac-wrap { position: relative; }
.ac-wrap input { width: 100%; }
.ac-wrap input.ac-ok { border-color: #16a34a; background: #f6fef9; }
.ac-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff;
    border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 16px 36px rgba(15,23,42,.16);
    max-height: 270px; overflow-y: auto; padding: 4px; }
.ac-op { padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.3; }
.ac-op small { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 1px; }
.ac-op.on, .ac-op:hover { background: #eff6ff; }
.ac-novo { color: var(--blue); font-weight: 700; border-top: 1px solid var(--line); margin-top: 2px; border-radius: 0 0 8px 8px; }
.ac-aviso { padding: 9px 11px; color: var(--ink-soft); font-size: 13px; }
.ac-sel { font-size: 12.5px; color: #15803d; margin-top: 5px; min-height: 0; }
.ac-sel:empty { display: none; }
.ac-alerta { color: #b45309; font-weight: 600; }

/* cadastro rápido dentro do formulário */
.inline-novo { margin-top: 10px; border: 1.5px dashed #93c5fd; background: #f8fbff; border-radius: 12px; padding: 12px 12px 6px; }
.inline-tit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); margin-bottom: 8px; }
.inline-novo .field { margin-bottom: 8px; }
.inline-acoes { display: flex; justify-content: flex-end; gap: 8px; margin: 4px 0 6px; }
.inline-dica { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.inline-dica:empty { display: none; }
@media (max-width: 560px) { .inline-acoes .btn { flex: 1; } }
input[style*="uppercase"]::placeholder { text-transform: none; }

/* ---------- Pix na saída do pátio ---------- */
.pix-cobranca { margin: 12px 0 4px; }
.pixc { display: flex; gap: 14px; align-items: center; background: #f0fdf4; border: 1.5px solid #86efac; border-radius: 14px; padding: 12px; }
.pixc-qr { width: 150px; height: 150px; background: #fff; border-radius: 10px; border: 1px solid #bbf7d0; cursor: zoom-in; flex: 0 0 auto; }
.pixc-info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pixc-valor { font-family: 'Roboto Mono', monospace; font-size: 24px; font-weight: 700; color: #166534; }
.pixc-rec { font-size: 12.5px; color: var(--ink-soft); }
.pixc-nota { font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 7px 10px; margin-top: 8px; }
.pixc-load, .pixc-aviso { font-size: 13px; color: var(--ink-soft); background: var(--surface-2, #f4f7fc); border-radius: 10px; padding: 12px; }
.pixc-aviso a { color: var(--blue); font-weight: 700; }
.pixc-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(15,29,61,.92); display: grid; place-items: center; padding: 16px; }
.pixc-tela { background: #fff; border-radius: 22px; padding: 26px 22px; text-align: center; width: min(420px, 100%);
    display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pixc-tela img { width: min(320px, 78vw); height: auto; }
.pixc-tit { font-size: 15px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; }
.pixc-grande { font-family: 'Roboto Mono', monospace; font-size: 38px; font-weight: 800; color: #166534; }
.pixc-dica { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
@media (max-width: 560px) {
    .pixc { flex-direction: column; text-align: center; }
    .pixc-info { width: 100%; align-items: stretch; }
}

/* ---------- reserva online aguardando Pix ---------- */
.atd.st-aguardando_pagamento { border-left-color: #a855f7; border-style: dashed; border-left-style: solid; background: #fcfaff; }
.st-pill.st-aguardando_pagamento { background: #f3e8ff; color: #6b21a8; }
.atd.st-expirado { border-left-color: #cbd5e1; opacity: .6; }
.st-pill.st-expirado { background: #f1f5f9; color: #64748b; }
.atd-pix { color: #6b21a8; font-weight: 600; }
.atd-pago { color: #15803d; font-weight: 600; }
.sem-item.st-aguardando_pagamento { border-left-color: #a855f7; background: #fcfaff; }

/* módulos do cliente (super admin) */
.modulos-opcoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.modulo-op { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; }
.modulo-op input { position: absolute; opacity: 0; pointer-events: none; }
.modulo-op strong { font-size: 15px; }
.modulo-op span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.modulo-op.on { border-color: var(--blue); background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tag-modulo { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #f1f5f9; color: #334155; }
.tag-estacionamento { background: #dbeafe; color: #1e40af; } .tag-lavacao { background: #ccfbf1; color: #0f766e; }
@media (max-width: 760px) { .modulos-opcoes { grid-template-columns: 1fr; } }

/* cadastro: escolha do plano */
.planos { display: grid; gap: 8px; }
.plano, .login-field label.plano { display: flex; margin-bottom: 0; font-weight: normal; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; position: relative; transition: border-color .15s, background .15s; }
.plano:hover { border-color: #93c5fd; }
.plano input { position: absolute; opacity: 0; pointer-events: none; }
.plano-ic { font-size: 24px; line-height: 1; }
.plano-txt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.plano-txt strong { font-size: 15px; color: var(--ink); }
.plano-txt small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.plano.on, .login-field label.plano.on { border-color: var(--blue); background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.plano:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.has-erro .plano { border-color: #fca5a5; }

/* ====================================================================
   RELATÓRIOS por área (Pátio / Lavação / Loja / Visão geral)
   ==================================================================== */
.rel-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rel-topo .page-title { margin: 0; }
.rel-acoes { display: flex; gap: 8px; }
.rel-filtros { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.rel-linha { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.rel-rot { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; min-width: 64px; }
.rel-filtros .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rel-filtros .chip { padding: 6px 13px; font-size: 13px; cursor: pointer; }
.rel-custom { align-items: flex-end; padding-left: 78px; }
.rel-custom[hidden] { display: none !important; }
.rel-kpis { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.rel-painel-tab { padding-top: 10px; padding-bottom: 10px; }
.rel-painel-tab .rel-tabela { margin-top: 0; }
.rel-periodo { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.rel-periodo b { color: var(--ink); }

.rel-abas { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 4px 0 18px; overflow-x: auto; }
.rel-aba { background: none; border: 0; padding: 11px 18px; font: inherit; font-weight: 600; font-size: 14.5px; color: var(--ink-soft);
           cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.rel-aba:hover { color: var(--ink); }
.rel-aba.on { color: var(--ink); border-bottom-color: var(--teal); }
.rel-aba[data-aba="patio"].on { border-bottom-color: #2a78d6; }
.rel-aba[data-aba="lavacao"].on { border-bottom-color: #1baf7a; }
.rel-aba[data-aba="loja"].on { border-bottom-color: #eb6834; }

#relConteudo { transition: opacity .15s; }
#relConteudo.rel-carregando { opacity: .45; pointer-events: none; }
.rel-kpi .kpi-value { font-size: 25px; }
.rel-kpi-comp { margin-top: 6px; font-size: 12.5px; }
.rel-delta { font-weight: 700; white-space: nowrap; }
.rel-delta.bom { color: #15803d; }
.rel-delta.ruim { color: #b91c1c; }
.rel-delta.neutro { color: var(--ink-soft); font-weight: 500; }
.rel-delta-txt { color: var(--ink-soft); }

.rel-painel-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rel-painel h2 { font-size: 15.5px; margin-bottom: 12px; }
.rel-graf { width: 100%; min-height: 190px; }
.rel-graf svg { display: block; overflow: visible; }
.rel-grade { stroke: #eef1f5; stroke-width: 1; }
.rel-grade.base { stroke: #cbd5e1; }
.rel-eixo { font-size: 11px; fill: var(--ink-soft); font-family: inherit; }
.rel-valor { font-size: 11px; font-weight: 700; fill: var(--ink); }
.rel-alvo { fill: transparent; cursor: crosshair; }
.rel-alvo.hover { fill: rgba(15,29,61,.05); }
.rel-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.rel-legenda i, .rel-tip i, .rel-bola { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rel-nota { font-size: 12.5px; margin-top: 10px; }

.rel-tip { position: fixed; z-index: 3000; pointer-events: none; background: #0f1d3d; color: #fff; font-size: 12.5px; line-height: 1.5;
           padding: 8px 11px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 260px; }
.rel-tip .tip-tit { font-weight: 700; margin-bottom: 2px; color: #cbd5e1; font-size: 12px; }
.rel-tip .tip-total { border-top: 1px solid rgba(255,255,255,.2); margin-top: 4px; padding-top: 4px; }

.rel-rank { display: flex; flex-direction: column; gap: 9px; }
.rel-rank-l { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 10px; cursor: default; border-radius: 6px; }
.rel-rank-l.hover { background: #f6f8fb; }
.rel-rank-n { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-rank-b { height: 12px; background: #f1f4f8; border-radius: 0 4px 4px 0; }
.rel-rank-b span { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.rel-rank-v { font-family: 'Roboto Mono', monospace; font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; min-width: 92px; }
.rel-rank-v small { display: block; font-family: 'Sora', system-ui, sans-serif; font-weight: 400; font-size: 11.5px; color: var(--ink-soft); }

.rel-calor { display: grid; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.rel-calor-h { font-size: 10.5px; color: var(--ink-soft); text-align: center; }
.rel-calor-d { font-size: 12px; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; }
.rel-calor-c { height: 24px; border-radius: 4px; background: #f1f4f8; }
.rel-calor-c.hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.rel-calor-esc { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); margin-top: 10px; flex-wrap: wrap; }
.rel-calor-esc i { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }

.rel-tabela { margin-top: 10px; }
.rel-tabela summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--teal); padding: 4px 0; }
.rel-tabela .tbl { margin-top: 8px; }
.rel-tabela tfoot td { border-top: 2px solid var(--line); }
.rel-painel .tbl tfoot td { padding: 10px 12px; }

@media (max-width: 760px) {
    .rel-custom { padding-left: 0; }
    .rel-periodo { margin-left: 0; flex: 1 1 100%; }
    .rel-rot { min-width: 0; flex: 1 1 100%; }
    .rel-filtros .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
    .rel-filtros .chip { white-space: nowrap; }
    .rel-rank-l { grid-template-columns: 1fr auto; }
    .rel-rank-b { grid-column: 1 / -1; grid-row: 2; }
    .rel-kpi .kpi-value { font-size: 20px; }
}
@media print {
    .rel-filtros .chips, .rel-acoes, .rel-abas, .rel-custom, .rel-tabela summary { display: none !important; }
    .rel-tabela[open] summary { display: none; }
    .rel-painel { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- Saída: valor do estacionamento editável ---------- */
.calc-total.valor-estac { align-items: center; gap: 12px; }
.calc-total.valor-estac label { font-weight: 600; }
.calc-total.valor-estac label small { font-weight: 400; font-size: 12px; }
.valor-editavel { width: 190px; max-width: 55%; text-align: right; font-size: 24px !important; font-weight: 700;
                  color: var(--teal); padding: 6px 10px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; }
.valor-editavel:hover { border-color: var(--teal); }
.valor-editavel:focus { border-style: solid; border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.ajuste-info { font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 10px; margin-top: 6px; }
.link-btn { background: none; border: 0; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; padding: 0 0 0 6px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Relatórios: relação de saídas por dia ---------- */
.rel-dia .rel-linha { gap: 8px; }
.rel-dia-input { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.rel-dia .btn-sm { font-size: 18px; line-height: 1; padding: 4px 12px; }
.rel-saidas td { vertical-align: top; }
.rel-sub { font-size: 11.5px; margin-top: 2px; }
.rel-h2-sub { font-size: 13px; font-weight: 500; margin-left: 8px; }
.rel-total-dia { font-size: 16px; }
.rel-print-tit { display: none; }
@media print {
    .rel-dia { display: none !important; }
    .rel-print-tit { display: block; font-size: 16px; margin-bottom: 12px; }
    .rel-saidas { font-size: 11px; }
}
.rel-filtros[hidden], .rel-dia[hidden] { display: none !important; }
