/* ===== QuadraHub — identidade visual (cores trocadas pela marca de cada arena) ===== */
:root {
  --laranja: #F98B00;
  --laranja-escuro: #E06A00;
  --laranja-suave: #FFEFD6;
  --preto: #0B0B0B;
  --on-primary: #0B0B0B;
  --nav: #0B0B0B;
  --on-nav: #E6E6E6;
  --qh-teal: #073D4A;
  --qh-yellow: #FFD400;
  --grafite: #1F1F1F;
  --cinza: #6B6B6B;
  --prata: #D9D9D9;
  --gelo: #F7F7F7;
  --branco: #FFFFFF;
  --pago-bg: #E3F5EA; --pago-fg: #146C3C;
  --pend-bg: #FFF4CC; --pend-fg: #7A5A00;
  --venc-bg: #FDE7E5; --venc-fg: #9E2A20;
  --bloq-bg: #EEEEEE; --bloq-fg: #555555;
  --raio: 12px;
  --sombra: 0 2px 10px rgba(0,0,0,.08);
  --nav-w: 224px;
  --fonte: "Inter", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --fonte-titulo: "Montserrat", "Poppins", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--fonte); color: var(--grafite); background: var(--gelo);
  line-height: 1.45; min-height: 100vh;
}
h1, h2, h3 { font-family: var(--fonte-titulo); margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--grafite); }
a.btn, a.nav-item, a.icon-btn { text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
small, .muted { color: var(--cinza); }
.muted { font-size: .9rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--laranja-escuro); outline-offset: 2px; }

/* ===== Layout ===== */
#app { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.nav {
  background: var(--nav); color: var(--on-nav); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.nav-logo { padding: 18px 16px 10px; display: flex; align-items: center; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-items { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: var(--on-nav); text-decoration: none; font-weight: 600; font-size: .95rem; border: 0; background: none; text-align: left;
}
.nav-item svg { width: 22px; height: 22px; flex: none; }
@media (hover: hover) { .nav-item:hover { background: rgba(127,127,127,.25); } }
.nav-item.active { background: var(--laranja); color: var(--on-primary); }
.nav-bottom { margin-top: auto; padding: 8px; }
.nav-estab { padding: 0 12px 10px; font-size: .8rem; color: var(--on-nav); opacity: .65; }
.nav-logo .nav-name { color: var(--on-nav); font-family: var(--fonte-titulo); font-weight: 800; font-size: 1.05rem; line-height: 1.15; }

.main { min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--cinza); margin-top: 2px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Topbar mobile + bottom nav */
.topbar { display: none; }
.bottomnav { display: none; }
.fab { display: none; }

@media (min-width: 900px) { .mobile-only { display: none !important; } }
@media (max-width: 899px) {
  #app { grid-template-columns: 1fr; }
  .nav { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; background: var(--nav);
    padding: 0 12px; height: 56px; position: sticky; top: 0; z-index: 20;
  }
  .topbar img { height: 34px; width: auto; display: block; }
  .topbar .icon-btn { color: var(--on-nav); }
  .topbar .nav-name { color: var(--on-nav); font-family: var(--fonte-titulo); font-weight: 800; }
  .page { padding: 16px 16px 110px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--nav); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav .nav-item { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: .8rem; font-weight: 600; align-items: center; border-radius: 10px; }
  .bottomnav .nav-item svg { width: 22px; height: 22px; }
  .fab {
    display: flex; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 19;
    height: 52px; padding: 0 20px; border-radius: 26px; background: var(--laranja); color: var(--on-primary); border: 0;
    font-weight: 800; align-items: center; gap: 8px; box-shadow: 0 6px 16px rgba(0,0,0,.25);
  }
  .fab svg { width: 20px; height: 20px; }
  .page-head .actions.desktop-only { display: none; }
}

/* ===== Componentes ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1.5px solid var(--prata); background: var(--branco); color: var(--grafite); font-weight: 600;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
@media (hover: hover) { .btn:hover { background: #F0F0F0; } }
.btn.primary { background: var(--laranja); color: var(--on-primary); border-color: var(--laranja); font-weight: 800; }
@media (hover: hover) { .btn.primary:hover { background: var(--laranja-escuro); border-color: var(--laranja-escuro); } }
.btn.danger { color: var(--venc-fg); border-color: #F1C2BE; background: #fff; }
@media (hover: hover) { .btn.danger:hover { background: var(--venc-bg); } }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; display: inline-flex; align-items: center;
  justify-content: center; color: var(--grafite);
}
.icon-btn svg { width: 22px; height: 22px; }
@media (hover: hover) { .icon-btn:hover { background: rgba(0,0,0,.06); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--laranja-escuro); font-weight: 600; text-decoration: underline; }

.card { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 14px 16px; min-width: 0; }
.kpi .label { color: var(--cinza); font-size: .85rem; font-weight: 600; }
.kpi .value { font-family: var(--fonte-titulo); font-size: 1.45rem; font-weight: 800; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .note { color: var(--cinza); font-size: .82rem; margin-top: 2px; }
@media (max-width: 899px) { .kpis, .kpis.three { grid-template-columns: repeat(2, 1fr); gap: 10px; } .kpi .value { font-size: 1.25rem; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--prata); background: var(--branco);
  font-weight: 600; font-size: .92rem; color: var(--grafite); display: inline-flex; align-items: center; gap: 6px;
}
@media (hover: hover) { .chip:hover { background: #F0F0F0; } }
.chip.on { background: var(--preto); color: #fff; border-color: var(--preto); }
.chip.on.orange { background: var(--laranja); color: var(--on-primary); border-color: var(--laranja); }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tag.pago { background: var(--pago-bg); color: var(--pago-fg); }
.tag.parcial { background: var(--pend-bg); color: var(--pend-fg); }
.tag.pendente { background: var(--pend-bg); color: var(--pend-fg); }
.tag.vencido { background: var(--venc-bg); color: var(--venc-fg); }
.tag.cancelado, .tag.bloqueado, .tag.neutro { background: var(--bloq-bg); color: var(--bloq-fg); }
.tag.repor { background: var(--venc-bg); color: var(--venc-fg); }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #EFEFEF; min-height: 56px;
}
.row:first-child { border-top: 0; }
.row.clickable { cursor: pointer; }
@media (hover: hover) { .row.clickable:hover { background: #FAFAFA; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; } }
.row .grow { flex: 1; min-width: 0; }
.row > svg { width: 20px; height: 20px; flex: none; color: var(--cinza); }
svg { max-width: 100%; }
.row .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--cinza); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amount { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .amount.in { color: var(--pago-fg); }
.row .amount.out { color: var(--venc-fg); }
.row .time { font-weight: 800; width: 52px; flex: none; font-variant-numeric: tabular-nums; }
.row.now { background: var(--laranja-suave); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }

.empty { text-align: center; padding: 28px 12px; color: var(--cinza); }
.empty p { margin-bottom: 12px; }

.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; min-height: 46px; padding: 0 14px 0 42px; border-radius: 12px; border: 1.5px solid var(--prata); background: #fff; }
.search svg { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; color: var(--cinza); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid #ECECEC; margin: 14px 0; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--cinza); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tab.on { color: var(--grafite); border-bottom-color: var(--laranja); }

.alert { background: var(--laranja-suave); border-radius: var(--raio); padding: 12px 16px; margin-bottom: 16px; }
.alert .row { border-top-color: rgba(0,0,0,.06); min-height: 44px; padding: 8px 0; }
.alert h3 { margin-bottom: 4px; }

/* ===== Formulários ===== */
.field { margin-bottom: 14px; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=password], .field input[type=search], .field input[type=number], .field input[type=date], .field input[type=time], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--prata); border-radius: 10px; background: #fff;
}
.field textarea { padding: 10px 12px; min-height: 70px; resize: vertical; }
.field .err { color: var(--venc-fg); font-size: .86rem; margin-top: 6px; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--venc-fg); }
.field.invalid .err { display: block; }
.field .help { color: var(--cinza); font-size: .82rem; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 0; }
.switch label { font-weight: 600; }
.switch input { width: 46px; height: 26px; appearance: none; background: var(--prata); border-radius: 13px; position: relative; cursor: pointer; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--laranja); }
.switch input:checked::after { left: 23px; }
.more { border-top: 1px dashed var(--prata); margin-top: 8px; padding-top: 10px; }
.more > summary { cursor: pointer; font-weight: 600; color: var(--cinza); list-style: none; padding: 6px 0; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "▸ "; }
.more[open] > summary::before { content: "▾ "; }
.money-big { font-family: var(--fonte-titulo); font-size: 1.6rem; font-weight: 800; text-align: center; margin: 4px 0 12px; }
.inline-note { background: var(--gelo); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-bottom: 12px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days .chip { min-height: 36px; padding: 0 11px; }

/* Busca de cliente */
.cust-box { position: relative; }
.cust-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff; border: 1.5px solid var(--prata); border-radius: 10px; box-shadow: var(--sombra); max-height: 220px; overflow: auto; }
.cust-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; }
@media (hover: hover) { .cust-results button:hover, .cust-results button.hl { background: var(--gelo); } }
.cust-results .new { color: var(--laranja-escuro); font-weight: 700; }
.cust-sel { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--preto); border-radius: 10px; background: #fff; font-weight: 700; }
.cust-sel small { font-weight: 500; }

/* ===== Modal / sheet ===== */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 500px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px 20px; position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-body { padding: 4px 20px 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 20px; position: sticky; bottom: 0; background: #fff; }
.modal-foot .left { margin-right: auto; }
@media (max-width: 899px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .modal-foot .left { margin: 0; }
}

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 60; background: var(--preto); color: #fff;
  padding: 12px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  max-width: calc(100vw - 32px);
}
.toast.err { background: var(--venc-fg); }
.toast button { background: none; border: 0; color: var(--laranja); font-weight: 800; padding: 0; }
@media (max-width: 899px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ===== Agenda ===== */
.agenda-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.agenda-bar .date-nav { display: flex; align-items: center; gap: 4px; }
.agenda-bar .date-label { font-weight: 800; font-family: var(--fonte-titulo); min-width: 150px; text-align: center; background: none; border: 0; padding: 8px; border-radius: 8px; }
@media (hover: hover) { .agenda-bar .date-label:hover { background: #ECECEC; } }
.agenda-bar input[type=date] { min-height: 44px; border: 1.5px solid var(--prata); border-radius: 10px; padding: 0 10px; background: #fff; font-weight: 700; font-family: var(--fonte-titulo); color: var(--grafite); }
.grid-wrap { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); overflow: auto; max-height: calc(100vh - 230px); position: relative; }
.agrid { display: grid; min-width: max-content; }
.agrid .corner { position: sticky; top: 0; left: 0; z-index: 4; background: #fff; border-bottom: 1px solid #ECECEC; }
.agrid .colhead { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid #ECECEC; border-left: 1px solid #F1F1F1; padding: 10px 8px; font-weight: 800; text-align: center; font-size: .9rem; }
.agrid .colhead small { display: block; font-weight: 500; color: var(--cinza); font-size: .8rem; }
.agrid .colhead.today { color: var(--laranja-escuro); }
.agrid .gutter { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid #ECECEC; }
.agrid .gutter .t { height: var(--rowh); font-size: .8rem; color: var(--cinza); padding: 0 6px; text-align: right; font-variant-numeric: tabular-nums; transform: translateY(-8px); }
.agrid .col { position: relative; border-left: 1px solid #F1F1F1; }
.agrid .slot { height: var(--rowh); border-top: 1px solid #F3F3F3; cursor: pointer; }
.agrid .slot:nth-child(odd) { border-top-color: #E6E6E6; }
@media (hover: hover) { .agrid .slot:hover { background: var(--laranja-suave); } }
.agrid .slot.off { background: repeating-linear-gradient(135deg, #F7F7F7 0 6px, #F0F0F0 6px 12px); cursor: not-allowed; }
@media (hover: hover) { .agrid .slot.off:hover { background: repeating-linear-gradient(135deg, #F7F7F7 0 6px, #F0F0F0 6px 12px); } }
.agrid .slot.past { background: #FBFBFB; }
.evt {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 8px; font-size: .82rem; overflow: hidden; cursor: pointer;
  border: 1.5px solid transparent; line-height: 1.25; z-index: 1;
}
.evt b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt span { display: block; color: inherit; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.evt.pago { background: var(--pago-bg); color: var(--pago-fg); border-color: #BDE5CC; }
.evt.pendente, .evt.parcial { background: var(--pend-bg); color: var(--pend-fg); border-color: #EDD98A; }
.evt.vencido { background: var(--venc-bg); color: var(--venc-fg); border-color: #F1C2BE; }
.evt.aconfirmar { border-style: dashed; border-color: #999; background: #fff; color: var(--grafite); }
.evt.bloqueio { background: repeating-linear-gradient(135deg, #E9E9E9 0 6px, #DDDDDD 6px 12px); color: var(--bloq-fg); cursor: pointer; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--laranja); z-index: 2; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--laranja); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--cinza); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid rgba(0,0,0,.1); }

/* ===== Venda rápida ===== */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.prod-btn { border: 1.5px solid var(--prata); background: #fff; border-radius: 12px; padding: 10px; text-align: left; min-height: 72px; display: flex; flex-direction: column; justify-content: space-between; }
.prod-btn b { display: block; font-size: .92rem; line-height: 1.2; }
.prod-btn small { color: var(--cinza); }
.prod-btn.in { border-color: var(--laranja); background: var(--laranja-suave); }
.prod-btn:disabled { opacity: .45; }
.cart .row { min-height: 48px; padding: 8px 0; }
.qty { display: inline-flex; align-items: center; gap: 2px; }
.qty button { width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--prata); background: #fff; font-weight: 800; font-size: 1.1rem; }
.qty b { min-width: 28px; text-align: center; }

/* ===== Gráfico ===== */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--fonte); fill: var(--cinza); font-size: 12px; }

/* ===== Onboarding ===== */
.onb { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--nav); padding: 24px 16px; }
.onb-card { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; padding: 28px 24px; }
.onb-logo { display: block; width: 100%; max-width: 360px; margin: 0 auto 20px; }
.onb-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.onb-steps i { width: 28px; height: 5px; border-radius: 3px; background: var(--prata); }
.onb-steps i.on { background: var(--laranja); }
.onb h1 { text-align: center; margin-bottom: 6px; }
.onb .lead { text-align: center; color: var(--cinza); margin-bottom: 18px; }
.onb .foot { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }

/* ===== Configurações ===== */
.settings-foot { text-align: center; color: var(--cinza); font-size: 12px; margin-top: 32px; }
.config-list .row { align-items: flex-start; }

/* Tabela simples */
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-top: 1px solid #EFEFEF; }
table.t th { color: var(--cinza); font-weight: 600; font-size: .82rem; border-top: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }

@media print { .nav, .topbar, .bottomnav, .fab, .toast { display: none !important; } }

/* ===== Login / primeiro acesso (QuadraHub) ===== */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--qh-teal); padding: 24px 16px; }
.auth-card { background: #fff; border-radius: 20px; width: 100%; max-width: 440px; padding: 28px 24px; }
.auth-logo { display: block; width: 100%; max-width: 300px; margin: 0 auto 20px; background: var(--qh-teal); border-radius: 14px; padding: 16px 20px; }
.auth h1 { text-align: center; margin-bottom: 4px; }
.auth .lead { text-align: center; color: var(--cinza); margin-bottom: 18px; }
.auth .links { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.auth .code { font-family: var(--fonte-titulo); font-size: 2rem; letter-spacing: .3em; text-align: center; font-weight: 800; }
.auth-foot { text-align: center; color: rgba(255,255,255,.7); font-size: 12px; margin-top: 16px; }

/* ===== Faixa "entrou como" ===== */
.impersonate { background: var(--qh-yellow); color: var(--qh-teal); font-weight: 700; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 21; }
.impersonate .btn { min-height: 34px; padding: 0 12px; font-size: .88rem; }
@media (max-width: 899px) { .impersonate { position: static; } }

/* ===== Admin QuadraHub ===== */
.admin { --laranja: #FFD400; --laranja-escuro: #E6BF00; --laranja-suave: #FFF8CC; --on-primary: #073D4A; --nav: #073D4A; --on-nav: #DCE9EC; }
.admin .nav-logo img { height: 34px; }
.admin .nav-item.active { color: #073D4A; }
.plan-bar { height: 8px; background: #E9EEF0; border-radius: 4px; overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--qh-teal); }
.plan-bar i.full { background: var(--venc-fg); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ===== Mês ===== */
.month { display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.month .dow { padding: 10px 6px; text-align: center; font-weight: 700; color: var(--cinza); font-size: .82rem; border-bottom: 1px solid #ECECEC; }
.month .day { min-height: 92px; border-top: 1px solid #F1F1F1; border-left: 1px solid #F1F1F1; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.month .day:nth-child(7n+1) { border-left: 0; }
.month .day.other { background: #FAFAFA; color: #B0B0B0; }
.month .day.today .num { background: var(--laranja); color: var(--on-primary); }
.month .day .num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; }
.month .day .cnt { font-size: .8rem; color: var(--cinza); }
.month .day .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.month .day .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.month .day .dots i.pago { background: #2FB36E; } .month .day .dots i.pendente, .month .day .dots i.parcial { background: #E5B800; } .month .day .dots i.vencido { background: var(--venc-fg); }
@media (hover: hover) { .month .day:hover { background: var(--laranja-suave); } }
@media (max-width: 899px) { .month .day { min-height: 64px; padding: 4px; } .month .day .cnt { display: none; } }

/* ===== PDV (Lanchonete) ===== */
.pdv { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.pdv .prod-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pdv .cart-card { position: sticky; top: 16px; }
@media (max-width: 899px) { .pdv { grid-template-columns: 1fr; } .pdv .cart-card { position: static; } }

/* ===== Conciliação ===== */
.recon-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.recon-head .kpi .value { font-size: 1.15rem; }
.recon-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--pago-fg); flex: none; margin: 0; }
.recon-row.done .title { color: var(--cinza); text-decoration: line-through; }
@media (max-width: 899px) { .recon-head { grid-template-columns: 1fr; } }

/* ===== Temas (configurações) ===== */
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-btn { width: 76px; border: 2px solid transparent; border-radius: 12px; padding: 4px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; }
.theme-btn .sw { width: 64px; height: 40px; border-radius: 8px; display: flex; overflow: hidden; }
.theme-btn .sw i { flex: 1; }
.theme-btn.on { border-color: var(--grafite); }
.logo-preview { height: 56px; display: flex; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--nav); margin-bottom: 10px; }
.logo-preview img { max-height: 40px; max-width: 220px; }
.logo-preview span { color: #fff; font-family: var(--fonte-titulo); font-weight: 800; }

/* ===== Acessos ===== */
.access { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.access label { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1.5px solid var(--prata); border-radius: 10px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.access label input { width: 18px; height: 18px; accent-color: var(--laranja-escuro); margin: 0; }
.access label.on { border-color: var(--grafite); background: var(--gelo); }

.kind-btn { justify-content: flex-start; min-height: 64px; margin-bottom: 8px; text-align: left; white-space: normal; gap: 12px; }
.kind-btn > svg:first-child { width: 24px; height: 24px; color: var(--qh-teal); flex: none; }
.kind-btn > svg:last-child { width: 18px; height: 18px; color: var(--cinza); flex: none; }
.kind-btn .grow { flex: 1; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px !important; }
.pw-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; color: var(--cinza); display: inline-flex; align-items: center; justify-content: center; }
.pw-wrap .eye svg { width: 20px; height: 20px; }
.pw-wrap .eye.on { color: var(--grafite); }
.auth .keep { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; font-size: .92rem; margin: -4px 0 10px; cursor: pointer; }
.auth .keep input { width: 20px; height: 20px; accent-color: var(--qh-teal); margin: 0; }
.auth .office { display: flex; justify-content: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #ECECEC; }
.auth .office .btn { gap: 8px; }

.auth .link-btn { color: var(--qh-teal); }
.auth .office .btn img { background: var(--qh-teal); border-radius: 50%; padding: 2px; height: 24px !important; width: 24px; }

.onb-name { color: #fff; font-family: var(--fonte-titulo); font-weight: 800; font-size: 1.6rem; text-align: center; padding: 22px 16px; border-radius: 14px; margin-bottom: 20px; }

.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 52px; height: 46px; padding: 2px; border: 1.5px solid var(--prata); border-radius: 10px; background: #fff; cursor: pointer; }
.theme-sample { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.theme-sample .chip { cursor: default; }


/* ===== Versão com servidor ===== */
.plan-banner { padding: 10px 16px; font-weight: 600; font-size: .92rem; text-align: center; }
.plan-banner.warn { background: var(--pend-bg); color: var(--pend-fg); }
.plan-banner.block { background: var(--venc-bg); color: var(--venc-fg); }
body.saving { cursor: progress; }
.btn.loading { opacity: .7; cursor: progress; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
