/* GMP-Sys — as cores --primary/--secondary/--accent vêm de cada clínica (Theme::vars) */
:root {
  --bg: #f6f5fa; --card: #fff; --text: #1f1f29; --muted: #6b6b7b; --line: #e9e7f0;
  --ok: #15803d; --warn: #b45309; --danger: #dc2626; --info: #2563eb;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,20,40,.04), 0 6px 20px rgba(20,20,40,.05);
  --soft: color-mix(in srgb, var(--primary) 9%, #fff);
  --soft-2: color-mix(in srgb, var(--primary) 16%, #fff);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: .4rem; }
code { background: var(--soft); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger) !important; }
.text-ok { color: var(--ok); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Layout ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; transition: transform .2s; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; flex: none; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: .4rem .7rem; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 10px; color: #3f3f4e; font-weight: 500; }
.nav a:hover { background: var(--soft); text-decoration: none; }
.nav a.active { background: var(--primary); color: var(--primary-ink); }
.nav a.nav-admin { margin-top: .8rem; border: 1px dashed var(--line); color: var(--muted); }
.side-foot { display: flex; align-items: center; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; color: var(--text); }
.me:hover { text-decoration: none; }
.me span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.me small { color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--secondary); color: var(--secondary-ink); font-weight: 700; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.main { margin-left: 248px; min-height: 100vh; }
.topbar { display: none; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1640px; }
.impersonate { background: var(--accent); color: #1f1f29; padding: .5rem 2rem; font-size: .9rem; }
.impersonate a { color: inherit; font-weight: 700; text-decoration: underline; }
.nav-overlay { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  #nav-toggle:checked ~ .sidebar { transform: none; }
  #nav-toggle:checked ~ .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 20; }
  .main { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); padding: .5rem 1rem; }
  .topbar-title { font-weight: 600; }
  .content { padding: 1rem 1rem 3rem; }
  .impersonate { padding: .5rem 1rem; }
}

/* ---------- Componentes ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head p { margin: .2rem 0 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; margin-bottom: 1rem; }
.card.p0 { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head.pad { padding: 1rem 1.2rem 0; }
.card-head a { font-size: .9rem; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.stack > .card { margin-bottom: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.grid-main > .card, .grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid-main, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, #000); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; padding: .75rem; }
.btn.active { background: var(--soft-2); border-color: color-mix(in srgb, var(--primary) 30%, #fff); color: var(--primary); }
.btn.wa, .icon-btn.wa { color: #128c4b; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.danger-zone { margin-top: .5rem; }

input, select, textarea { width: 100%; font: inherit; color: inherit; padding: .55rem .7rem; border: 1px solid #d9d6e3; border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=color] { height: 42px; padding: 3px; cursor: pointer; }
input[type=file] { padding: .4rem; }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label { font-size: .85rem; font-weight: 600; color: #4a4a5a; }
.field small { font-size: .8rem; }
label.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; }
label.inline input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: .8rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input, .toolbar select { width: auto; min-width: 0; }
.toolbar input[type=search] { flex: 1; max-width: 360px; }
.toolbar form.toolbar { margin: 0; }
.toolbar-label { font-size: 1rem; }
.spacer { flex: 1; }
.segmented { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: .45rem .9rem; border-radius: 8px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.quick-new { margin-top: .4rem; }
.quick-new summary { cursor: pointer; color: var(--primary); font-size: .85rem; font-weight: 600; }
.quick-new .form-grid { margin-top: .6rem; }

.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); background: #fbfbfd; white-space: nowrap; }
.table td { padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfbff; }
.table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.table.items input, .table.items select { padding: .4rem .5rem; }
.table.items td { padding: .5rem .6rem; }
.table form { margin: 0; }
.empty { color: var(--muted); padding: 1.2rem; margin: 0; text-align: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .5rem; }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #f1f0f5; color: #4a4a5a; white-space: nowrap; }
.badge-ok, .st-atendido, .sale-aprovado { background: #dcfce7; color: #166534; }
.badge-warn, .st-agendado { background: #fef3c7; color: #92400e; }
.badge-danger, .st-faltou, .sale-cancelado { background: #fee2e2; color: #991b1b; }
.st-confirmado, .sale-orcamento { background: #dbeafe; color: #1e40af; }
.st-cancelado { background: #f1f0f5; color: #6b6b7b; }
.status-select { width: auto; padding: .25rem .5rem; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 0; cursor: pointer; }
.swatch, .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); vertical-align: middle; margin-right: .5rem; }
.swatch { width: 18px; height: 18px; border-radius: 6px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .15rem; border-top: 3px solid var(--primary); }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi strong { font-size: 1.45rem; letter-spacing: -.01em; }
.kpi small { color: var(--muted); }
.kpi-ok { border-top-color: var(--ok); }
.kpi-danger { border-top-color: var(--danger); }

.row-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.note { background: var(--soft); padding: .7rem .9rem; border-radius: 10px; margin: .8rem 0 0; }

/* Início */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: .9rem; padding: .65rem 0 .65rem .8rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--c); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-weight: 700; width: 3rem; flex: none; }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-body small { color: var(--muted); }
.tl-actions { display: flex; gap: .3rem; align-items: center; }

/* Agenda */
.agenda { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.agenda.side-collapsed { grid-template-columns: minmax(0, 1fr); }
.agenda.side-collapsed .agenda-side { display: none; }
.agenda-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.mini-cal-head a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); font-size: 1.1rem; }
.mini-cal-head a:hover { background: var(--soft); text-decoration: none; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-cal-grid .wd { font-size: .72rem; color: var(--muted); font-weight: 600; padding: .2rem 0; }
.mini-cal-grid a { display: block; padding: .3rem 0; border-radius: 8px; color: var(--text); font-size: .85rem; }
.mini-cal-grid a:hover { background: var(--soft); text-decoration: none; }
.mini-cal-grid a.out { color: #b7b5c2; }
.mini-cal-grid a.range { background: var(--soft); }
.mini-cal-grid a.today { background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.filters { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head strong { font-size: 1.05rem; }
.filters-head a { font-weight: 600; font-size: .9rem; }
.legend-status { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--muted); }
.legend-status span { display: inline-flex; align-items: center; gap: .3rem; }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sd-agendado { background: #e0b77a; }
.sd-confirmado { background: #3fb67b; }
.sd-atendido { background: #3b82f6; }
.sd-faltou { background: #ef4444; }
.sd-cancelado { background: #a1a1aa; }

.agenda-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.agenda-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.agenda-bar .icon-btn { position: relative; font-size: 1.3rem; color: var(--text); }
.agenda-bar .icon-btn:hover { text-decoration: none; }
.agenda-label { font-size: 1.05rem; margin-left: .3rem; }
.view-select { width: auto; font-weight: 600; }
.pill { position: absolute; top: -2px; right: -4px; background: var(--primary); color: var(--primary-ink); font-size: .65rem; border-radius: 99px; padding: 0 5px; line-height: 16px; }

.cal-scroll { overflow: auto; max-height: calc(100vh - 150px); min-height: 420px; }
.cal { min-width: calc(56px + var(--cols) * 120px); }
.cal-head, .cal-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(120px, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 4; background: var(--card); border-bottom: 1px solid var(--line); }
.cal-corner { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); position: sticky; left: 0; z-index: 1; }
.cal-colhead { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .8rem .3rem; border-left: 1px solid var(--line); min-width: 0; }
.cal-colhead a { display: flex; align-items: baseline; gap: .4rem; color: var(--text); }
.cal-colhead a:hover { text-decoration: none; }
.cal-colhead strong { font-size: 1.25rem; padding: .1rem .35rem; border-radius: 9px; }
.cal-colhead span { color: var(--muted); }
.cal-colhead.today strong { background: var(--primary); color: var(--primary-ink); }
.prof-head { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift { color: var(--primary); display: inline-flex; cursor: help; }
.gift .ic { width: 16px; height: 16px; }
.cal-times { position: sticky; left: 0; z-index: 3; background: var(--card); }
.cal-time { height: var(--slot-h); font-size: .78rem; color: var(--muted); text-align: right; padding-right: .5rem; transform: translateY(-.55em); }
.cal-time:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-col.today { background: color-mix(in srgb, var(--primary) 4%, #fff); }
.slot { display: block; height: var(--slot-h); border-bottom: 1px dashed #efedf4; position: relative; }
.slot.hour-end { border-bottom: 1px solid var(--line); }
.slot:hover { background: var(--soft); text-decoration: none; }
.slot:hover::after { content: "+ " attr(data-h); position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 600; color: var(--primary); }
.ev { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: .3rem .45rem; overflow: hidden; border-radius: 4px 8px 8px 4px;
  background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 4px solid color-mix(in srgb, var(--c) 70%, #fff); color: #34334a; font-size: .8rem; line-height: 1.35; box-shadow: 0 1px 2px rgba(20,20,40,.06); }
.ev:hover { text-decoration: none; filter: brightness(.96); z-index: 3; }
.ev strong, .ev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev strong { display: flex; align-items: center; gap: .35rem; font-size: .84rem; }
.ev-sm span { display: none; }
.ev.st-cancelado, .ev.st-faltou { opacity: .55; }
.ev.st-cancelado strong { text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-wd { padding: .6rem; text-align: center; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.mcell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .35rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell.out { background: #fbfbfd; }
.mcell.out .mday { color: #b7b5c2; }
.mcell-top { display: flex; align-items: center; gap: .3rem; }
.mday { font-weight: 700; color: var(--text); padding: .05rem .35rem; border-radius: 7px; }
.mcell.today .mday { background: var(--primary); color: var(--primary-ink); }
.madd { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; opacity: 0; font-weight: 700; }
.mcell:hover .madd { opacity: 1; background: var(--soft); text-decoration: none; }
.mchip { display: flex; align-items: center; gap: .3rem; font-size: .76rem; padding: .1rem .35rem; border-radius: 5px; background: color-mix(in srgb, var(--c) 14%, #fff); color: #34334a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mchip:hover { text-decoration: none; filter: brightness(.96); }
.mmore { font-size: .75rem; font-weight: 600; padding-left: .35rem; }

.fab { position: fixed; right: 2rem; bottom: 2rem; width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 2rem; line-height: 1; box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 45%, transparent); z-index: 15; }
.fab:hover { text-decoration: none; transform: scale(1.05); }

.modal { border: 0; border-radius: 16px; padding: 0; width: min(720px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: 0 24px 80px rgba(20,10,50,.25); }
.modal::backdrop { background: rgba(25,20,45,.45); }
.modal-body { padding: 1.3rem 1.4rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.modal-head h2 { font-size: 1.15rem; }
.modal-head .icon-btn { font-size: 1.5rem; }

@media (max-width: 900px) {
  .agenda { grid-template-columns: minmax(0, 1fr); }
  .agenda-side { display: none; position: static; max-height: none; }
  .agenda.side-open .agenda-side { display: block; }
  .agenda.side-collapsed .agenda-side { display: none; }
  .agenda.side-collapsed.side-open .agenda-side { display: block; }
  .cal-scroll { max-height: calc(100vh - 190px); }
  .mcell { min-height: 80px; }
  .mchip { font-size: .7rem; }
  .fab { right: 1rem; bottom: 1rem; }
}

/* Autocomplete de clientes */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 15; max-height: 280px; overflow-y: auto; }
.ac-list button { display: block; width: 100%; text-align: left; padding: .55rem .8rem; background: none; border: 0; font: inherit; cursor: pointer; }
.ac-list button:hover, .ac-list button:focus { background: var(--soft); }
.ac-list small { color: var(--muted); margin-left: .4rem; }

/* Vendas */
.totals { display: flex; justify-content: flex-end; gap: 2rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.totals .total strong { font-size: 1.3rem; color: var(--primary); }
.dl-inline { grid-template-columns: auto 1fr; }
.w-xs { width: 70px; }
.w-sm { width: 110px; }

/* Cliente */
.profile-head { display: flex; align-items: center; gap: 1rem; }
.records { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.record { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.record header { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.record header form { margin-left: auto; }
.record-body { white-space: normal; }

/* Configurações */
.identity { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; align-items: start; }
.identity-preview img, .avatar-placeholder { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 4px solid var(--soft-2); display: grid; place-items: center; color: var(--muted); background: var(--bg); }
.swatches { display: flex; gap: .4rem; margin-top: .8rem; justify-content: center; }
.swatches span { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); }
.shortcut { display: flex; flex-direction: column; color: var(--text); }
.shortcut:hover { text-decoration: none; border-color: var(--primary); }
.shortcut span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .identity { grid-template-columns: 1fr; justify-items: center; } }

/* Relatórios */
.bars { display: flex; align-items: flex-end; gap: .5rem; height: 200px; padding-top: .5rem; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: 40%; max-width: 22px; border-radius: 5px 5px 0 0; min-height: 2px; }
.bar-ok, .lg-ok { background: var(--primary); }
.bar-danger, .lg-danger { background: var(--secondary); opacity: .75; }
.bar-col small { color: var(--muted); font-size: .75rem; }
.legend { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: .5rem; }
.hbar { margin-bottom: .7rem; }
.hbar-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: .25rem; }
.hbar-track { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 99px; }

/* Login */
body.guest { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 45%),
  radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--secondary) 18%, transparent), transparent 45%), var(--bg); }
.guest-wrap { width: 100%; max-width: 400px; padding: 1rem; }
.auth-card { background: var(--card); border-radius: 18px; box-shadow: 0 20px 60px rgba(30,20,60,.12); padding: 2rem; }
.auth-logo { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; }
.auth-logo .brand-mark { width: 48px; height: 48px; }
.auth-logo strong { display: block; font-size: 1.4rem; letter-spacing: -.02em; }
.auth-logo small { color: var(--muted); }
.auth-foot { text-align: center; color: var(--muted); font-size: .85rem; }
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state h1 { font-size: 3rem; color: var(--primary); }

/* WhatsApp automático */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.grid-4 > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
.weekdays { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding-top: .2rem; }
.qr-box { display: grid; place-items: center; min-height: 260px; background: var(--bg); border-radius: 12px; margin-bottom: 1rem; }
.qr-box img { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 10px; }
.steps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); }
.steps li { margin-bottom: .2rem; }
.msg-cell { max-width: 360px; color: var(--muted); font-size: .88rem; }
