/* ===== GP Lava — design system ===== */
:root{
  --coral:#E0584A; --coral-dark:#C5453A; --coral-600:#D24E41;
  --coral-soft:#FCEDEB; --coral-tint:#F8DBD7;
  --ink:#1E2330; --muted:#6B7280; --muted-2:#9AA1AC;
  --line:#ECEEF1; --line-2:#E2E5EA;
  --bg:#F4F5F7; --card:#FFFFFF;
  --green:#1E9E6A; --green-soft:#E5F4EE;
  --amber:#B7791F; --amber-soft:#FBF1DD;
  --blue:#2563EB; --blue-soft:#E7EEFE;
  --radius:16px; --radius-sm:11px;
  --shadow:0 1px 2px rgba(20,25,40,.05), 0 6px 22px rgba(20,25,40,.06);
  --shadow-lg:0 10px 40px rgba(20,25,40,.12);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:'Segoe UI',-apple-system,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink);
  -webkit-font-smoothing:antialiased; font-size:15px; line-height:1.45;
}
button{font-family:inherit; cursor:pointer; border:none; background:none}
input,select{font-family:inherit; font-size:15px}
a{color:inherit; text-decoration:none}

/* ===== App shell ===== */
.app{display:flex; min-height:100vh}

/* Sidebar (desktop) */
.sidebar{
  width:248px; flex-shrink:0; background:var(--card);
  border-right:1px solid var(--line); padding:22px 16px;
  display:flex; flex-direction:column; gap:6px;
  position:sticky; top:0; height:100vh;
}
.brand{display:flex; align-items:center; gap:11px; padding:4px 8px 20px}
.brand img{width:40px; height:50px}
.brand .bt{font-weight:800; font-size:18px; letter-spacing:-.4px}
.brand .bt span{color:var(--coral)}
.brand .bs{font-size:11.5px; color:var(--muted-2); font-weight:600; letter-spacing:.3px; text-transform:uppercase}
.nav-group{font-size:11px; font-weight:700; color:var(--muted-2); text-transform:uppercase; letter-spacing:.6px; padding:14px 12px 6px}
.nav-item{
  display:flex; align-items:center; gap:12px; padding:11px 12px;
  border-radius:11px; color:#454B59; font-weight:600; font-size:14.5px;
  transition:background .12s,color .12s;
}
.nav-item svg{width:20px; height:20px; stroke-width:2; flex-shrink:0}
.nav-item:hover{background:var(--bg)}
.nav-item.active{background:var(--coral-soft); color:var(--coral-dark)}
.nav-item.active svg{color:var(--coral)}
.sidebar .spacer{flex:1}
.side-card{
  background:linear-gradient(135deg,var(--coral),#E8705F); color:#fff;
  border-radius:14px; padding:14px 16px; font-size:13px;
}
.side-card b{display:block; font-size:14px; margin-bottom:3px}
.side-card span{opacity:.9; font-size:12.5px}

/* Main */
.main{flex:1; min-width:0; display:flex; flex-direction:column}
.topbar{
  display:none; align-items:center; gap:12px;
  background:var(--card); border-bottom:1px solid var(--line);
  padding:13px 16px; position:sticky; top:0; z-index:30;
}
.topbar img{width:30px; height:38px}
.topbar .tt{font-weight:800; font-size:17px}
.topbar .tt span{color:var(--coral)}
.content{padding:26px 30px 40px; max-width:1120px; width:100%; margin:0 auto}

.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:22px; flex-wrap:wrap}
.page-head h1{font-size:23px; font-weight:800; letter-spacing:-.5px}
.page-head p{color:var(--muted); font-size:14px; margin-top:3px}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 18px; border-radius:11px; font-weight:700; font-size:14.5px;
  transition:.13s; white-space:nowrap;
}
.btn svg{width:18px; height:18px; stroke-width:2.2}
.btn-primary{background:var(--coral); color:#fff; box-shadow:0 4px 14px rgba(224,88,74,.32)}
.btn-primary:hover{background:var(--coral-dark)}
.btn-ghost{background:var(--card); color:var(--ink); border:1px solid var(--line-2)}
.btn-ghost:hover{background:var(--bg)}
.btn-sm{padding:8px 13px; font-size:13.5px; border-radius:9px}
.btn-block{width:100%}

/* ===== Cards ===== */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow)}
.card-pad{padding:20px 22px}
.card-head{display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid var(--line)}
.card-head h3{font-size:15.5px; font-weight:800}
.card-head .sub{font-size:12.5px; color:var(--muted)}

/* KPI cards */
.kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px}
.kpi{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow)}
.kpi .ico{width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; margin-bottom:13px}
.kpi .ico svg{width:20px; height:20px; stroke-width:2.1}
.kpi .lbl{font-size:12.5px; color:var(--muted); font-weight:600}
.kpi .val{font-size:25px; font-weight:800; letter-spacing:-.6px; margin-top:2px}
.kpi .val small{font-size:14px; font-weight:700; color:var(--muted-2)}
.ic-coral{background:var(--coral-soft); color:var(--coral)}
.ic-green{background:var(--green-soft); color:var(--green)}
.ic-blue{background:var(--blue-soft); color:var(--blue)}
.ic-amber{background:var(--amber-soft); color:var(--amber)}

/* ===== Tables ===== */
.tbl-wrap{overflow-x:auto}
table{width:100%; border-collapse:collapse}
th{
  text-align:left; font-size:11.5px; font-weight:700; color:var(--muted-2);
  text-transform:uppercase; letter-spacing:.4px; padding:11px 16px; border-bottom:1px solid var(--line); white-space:nowrap;
}
td{padding:13px 16px; border-bottom:1px solid var(--line); font-size:14px; vertical-align:middle}
tr:last-child td{border-bottom:none}
tbody tr{transition:background .1s}
tbody tr:hover{background:#FAFBFC}
.t-num{display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; background:var(--bg); border-radius:8px; font-size:12.5px; font-weight:700; color:var(--muted)}
.t-strong{font-weight:700}
.t-mut{color:var(--muted)}
.t-val{font-weight:800; font-variant-numeric:tabular-nums}

.plate{
  display:inline-flex; align-items:center; gap:5px; font-family:'Consolas','SF Mono',monospace;
  font-weight:700; font-size:12.5px; letter-spacing:.5px; background:#1E2330; color:#fff;
  padding:4px 9px; border-radius:6px; text-transform:uppercase;
}
.plate::before{content:""; width:6px; height:6px; border-radius:50%; background:#3B82F6}

/* lista de lavagens em cards (mobile) */
.lav-cards{display:none}
.lcard{padding:13px 16px; border-bottom:1px solid var(--line)}
.lcard:last-child{border-bottom:none}
.lc-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.lc-top .t-val{font-size:16px}
.lc-mid{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px}
.lc-mid .t-strong{font-size:15px}
.lc-bot{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.lc-bot .t-mut{font-size:12.5px}
.lc-meta{font-size:12px; color:var(--muted-2); margin-left:auto; font-weight:600}

/* badges */
.badge{display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700}
.badge .dot{width:7px;height:7px;border-radius:50%}
.bg-pix{background:var(--green-soft); color:#157A50}
.bg-pix .dot{background:#1E9E6A}
.bg-credito{background:var(--blue-soft); color:#1D4ED8}
.bg-credito .dot{background:#2563EB}
.bg-debito{background:#EDE9FE; color:#6D28D9}
.bg-debito .dot{background:#7C3AED}
.bg-dinheiro{background:var(--amber-soft); color:#8A5A12}
.bg-dinheiro .dot{background:#B7791F}
.bg-boleto{background:#E9EEF3; color:#475569}
.bg-boleto .dot{background:#64748B}
.bg-pendente{background:var(--coral-soft); color:var(--coral-dark)}
.bg-pendente .dot{background:var(--coral)}

.tipo{display:inline-flex; align-items:center; gap:7px; font-weight:600; font-size:13.5px}
.tipo .tg{width:24px;height:24px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#fff}
.tg-completa{background:var(--coral)}
.tg-ducha{background:#3B82F6}
.tg-simples{background:#64748B}
.tg-cera{background:#B7791F}

/* ===== Forms ===== */
.field{margin-bottom:16px}
.field label{display:block; font-size:13px; font-weight:700; color:#3C424F; margin-bottom:7px}
.field .hint{font-size:12px; color:var(--muted-2); font-weight:500; margin-left:6px}
.inp{
  width:100%; padding:12px 14px; border:1.5px solid var(--line-2); border-radius:11px;
  background:#fff; transition:.13s; color:var(--ink);
}
.inp:focus{outline:none; border-color:var(--coral); box-shadow:0 0 0 3px var(--coral-soft)}
.inp::placeholder{color:var(--muted-2)}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}

/* tipo selector */
.opt-row{display:grid; grid-template-columns:repeat(4,1fr); gap:10px}
.opt{
  border:1.5px solid var(--line-2); border-radius:12px; padding:13px 8px; text-align:center;
  font-weight:700; font-size:13.5px; transition:.12s; background:#fff; color:#454B59;
}
.opt small{display:block; font-weight:500; font-size:11px; color:var(--muted-2); margin-top:2px}
.opt:hover{border-color:var(--coral-tint)}
.opt.sel{border-color:var(--coral); background:var(--coral-soft); color:var(--coral-dark)}
.pay-row{display:grid; grid-template-columns:repeat(5,1fr); gap:9px}
.pay{
  border:1.5px solid var(--line-2); border-radius:11px; padding:11px 6px; text-align:center;
  font-weight:700; font-size:13px; transition:.12s; background:#fff; color:#454B59;
}
.pay.sel{border-color:var(--coral); background:var(--coral-soft); color:var(--coral-dark)}

/* autocomplete */
.ac-wrap{position:relative}
.ac-list{
  position:absolute; top:calc(100% + 5px); left:0; right:0; background:#fff;
  border:1px solid var(--line-2); border-radius:12px; box-shadow:var(--shadow-lg);
  z-index:50; overflow:hidden; max-height:230px; overflow-y:auto;
}
.ac-item{padding:11px 14px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:10px; border-bottom:1px solid var(--line)}
.ac-item:last-child{border-bottom:none}
.ac-item:hover{background:var(--coral-soft)}
.ac-item .ai-main{font-weight:700; font-size:14px}
.ac-item .ai-sub{font-size:12px; color:var(--muted)}
.ac-hit{display:flex; align-items:center; gap:7px; margin-top:8px; font-size:12.5px; color:var(--green); font-weight:600; background:var(--green-soft); padding:8px 11px; border-radius:9px}
.ac-hit svg{width:15px;height:15px}

/* pay breakdown */
.bd-row{display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--line)}
.bd-row:last-child{border-bottom:none}
.bd-left{display:flex; align-items:center; gap:10px}
.bd-bar{height:6px; border-radius:3px; background:var(--line); margin-top:6px; overflow:hidden}
.bd-bar i{display:block; height:100%; border-radius:3px}

/* mini bars (semana) */
.week{display:flex; align-items:stretch; gap:10px; height:150px; padding-top:22px}
.week .col{flex:1; display:flex; flex-direction:column; height:100%}
.week .bar-area{flex:1; display:flex; align-items:flex-end; justify-content:center; min-height:0}
.week .bar{width:100%; max-width:38px; background:var(--coral-tint); border-radius:8px 8px 4px 4px; transition:.2s; position:relative; min-height:4px}
.week .bar.today{background:var(--coral)}
.week .bar .bv{position:absolute; top:-19px; left:50%; transform:translateX(-50%); font-size:10.5px; font-weight:700; color:var(--muted); white-space:nowrap}
.week .day{font-size:11.5px; color:var(--muted-2); font-weight:600; text-align:center; padding-top:8px}

/* filters */
.filters{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:18px}
.filters .inp{width:auto}
.seg{display:inline-flex; background:var(--bg); border:1px solid var(--line-2); border-radius:11px; padding:3px}
.seg button{padding:8px 15px; border-radius:8px; font-weight:700; font-size:13.5px; color:var(--muted)}
.seg button.on{background:#fff; color:var(--coral-dark); box-shadow:var(--shadow)}

.summary-strip{display:flex; gap:22px; flex-wrap:wrap; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:15px 22px; margin-bottom:18px; box-shadow:var(--shadow)}
.summary-strip .si{display:flex; flex-direction:column}
.summary-strip .si .l{font-size:11.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.3px}
.summary-strip .si .v{font-size:20px; font-weight:800; letter-spacing:-.4px}
.summary-strip .vline{width:1px; align-self:stretch; background:var(--line-2)}

/* empty */
.empty{text-align:center; padding:50px 20px; color:var(--muted)}
.empty svg{width:46px; height:46px; color:var(--muted-2); margin-bottom:12px}

/* customer cards */
.cust-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px}
.cust{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 18px; box-shadow:var(--shadow)}
.cust .ch{display:flex; align-items:center; gap:12px; margin-bottom:12px}
.cust .av{width:42px;height:42px;border-radius:50%; background:var(--coral-soft); color:var(--coral-dark); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px}
.cust .cn{font-weight:800; font-size:15px}
.cust .cp{font-size:12.5px; color:var(--muted)}
.cust .cv{display:flex; align-items:center; justify-content:space-between; padding-top:11px; border-top:1px solid var(--line); margin-top:4px; font-size:13px}

/* toast */
.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(120px);
  background:var(--ink); color:#fff; padding:13px 20px; border-radius:13px; font-weight:600; font-size:14px;
  box-shadow:var(--shadow-lg); z-index:200; display:flex; align-items:center; gap:10px; transition:transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.toast.show{transform:translateX(-50%) translateY(0)}
.toast svg{width:18px;height:18px;color:#5EE0A0}

/* modal */
.modal-bg{position:fixed; inset:0; background:rgba(20,25,40,.45); backdrop-filter:blur(2px); z-index:100; display:flex; align-items:center; justify-content:center; padding:18px; opacity:0; pointer-events:none; transition:.2s}
.modal-bg.show{opacity:1; pointer-events:auto}
.modal{background:#fff; border-radius:18px; width:100%; max-width:440px; box-shadow:var(--shadow-lg); transform:translateY(14px); transition:.2s}
.modal-bg.show .modal{transform:translateY(0)}
.modal-head{padding:18px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between}
.modal-head h3{font-size:17px; font-weight:800}
.modal-body{padding:22px}
.modal-foot{padding:14px 22px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end}
.x-btn{width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--muted)}
.x-btn:hover{background:var(--bg)}

/* bottom nav (mobile) */
.botnav{display:none}

@media(max-width:860px){
  .sidebar{display:none}
  .topbar{display:flex}
  .tbl-wrap{display:none}
  .lav-cards{display:block}
  .content{padding:18px 16px 96px}
  .kpis{grid-template-columns:1fr 1fr; gap:12px}
  .kpi .val{font-size:22px}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .page-head h1{font-size:20px}
  .opt-row{grid-template-columns:1fr 1fr}
  .pay-row{grid-template-columns:1fr 1fr 1fr}
  .dash-2{grid-template-columns:1fr !important}
  .summary-strip{gap:14px 18px}
  .botnav{
    display:flex; position:fixed; bottom:0; left:0; right:0; background:var(--card);
    border-top:1px solid var(--line); padding:8px 6px calc(8px + env(safe-area-inset-bottom)); z-index:40;
    box-shadow:0 -2px 16px rgba(20,25,40,.06);
  }
  .botnav a{flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:5px; color:var(--muted-2); font-size:10.5px; font-weight:700}
  .botnav a svg{width:23px;height:23px; stroke-width:2}
  .botnav a.active{color:var(--coral)}
  .botnav .fab{transform:translateY(-14px)}
  .botnav .fab .fb{width:50px;height:50px;border-radius:16px;background:var(--coral); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 18px rgba(224,88,74,.4)}
  .botnav .fab .fb svg{width:26px;height:26px}
}
.dash-2{display:grid; grid-template-columns:1.4fr 1fr; gap:18px}
.mt18{margin-top:18px}
.hide-sm{}
@media(max-width:860px){ .hide-sm{display:none} }
