/* =====================================================================
   BarberPro — UI moderna, responsiva, tema escuro/claro
   ===================================================================== */
:root, [data-theme="dark"] {
  --bg: #0c0e12;
  --bg-2: #12151b;
  --surface: #171b22;
  --surface-2: #1e232c;
  --border: #262c37;
  --text: #e9ecf1;
  --text-2: #a3abb9;
  --muted: #6b7484;
  --gold: #d6a756;
  --gold-2: #f0c879;
  --gold-soft: rgba(214, 167, 86, .14);
  --on-gold: #1a1408;
  --success: #3ccf91; --success-soft: rgba(60, 207, 145, .13);
  --danger: #ff6474;  --danger-soft: rgba(255, 100, 116, .13);
  --warning: #f7b955; --warning-soft: rgba(247, 185, 85, .14);
  --info: #5aa9ff;    --info-soft: rgba(90, 169, 255, .13);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 260px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f2ee;
  --bg-2: #ebe8e2;
  --surface: #ffffff;
  --surface-2: #f7f5f1;
  --border: #e4dfd6;
  --text: #1b1d22;
  --text-2: #555c68;
  --muted: #8b919c;
  --gold: #b8862f;
  --gold-2: #9a6d1e;
  --gold-soft: rgba(184, 134, 47, .12);
  --on-gold: #1a1408;
  --shadow: 0 10px 30px rgba(40, 30, 10, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
small, .text-muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.text-gold { color: var(--gold); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mb-2{margin-bottom:16px}
.flex { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; position: fixed; inset: 0 auto 0 0; z-index: 40;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 18px; color: var(--text); }
.brand strong { display: block; font-family: 'Playfair Display', serif; font-size: 19px; letter-spacing: .01em; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 500; margin-bottom: 2px; transition: .15s;
}
.nav a i { font-size: 17px; width: 20px; text-align: center; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--gold-soft); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.nav a span { flex: 1; }
.pill { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--gold); color: var(--on-gold); }
.pill.danger { background: var(--danger); color: #fff; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }
.sidebar-foot .who { flex: 1; line-height: 1.2; min-width: 0; }
.sidebar-foot .who strong { display: block; font-size: 13.5px; }
.sidebar-foot .who small { font-size: 11.5px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 21px; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.global-search { position: relative; }
.global-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.global-search input { width: 260px; padding-left: 36px; }
.menu-btn { display: none; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.backdrop { display: none; }
.fab { display: none; }

/* ---------- Componentes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.grid > .card + .card, .grid > .card, .barbers > *, .queue > * { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.card-head h3 i { color: var(--gold); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 18px 20px 0; }

.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; } .span-full { grid-column: 1 / -1; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.kpi .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-size: 19px; margin-bottom: 12px; }
.kpi .ico.success { background: var(--success-soft); color: var(--success); }
.kpi .ico.info { background: var(--info-soft); color: var(--info); }
.kpi .ico.danger { background: var(--danger-soft); color: var(--danger); }
.kpi .ico.warning { background: var(--warning-soft); color: var(--warning); }
.kpi .label { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 9px 16px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: 13.5px;
  transition: .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn-primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--on-gold); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 25%, transparent); }
.btn-primary:hover { filter: brightness(1.06); color: var(--on-gold); }
.btn-success { background: var(--success); color: #062716; border-color: transparent; }
.btn-success:hover { color: #062716; filter: brightness(1.06); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-wa { background: #25d366; color: #05300f; border-color: transparent; }
.btn-wa:hover { color: #05300f; filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 16px;
}
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.icon-btn.wa { color: #25d366; } .icon-btn.wa:hover { border-color: #25d366; }
.icon-btn.sm { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }

/* Formulários */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--gold); }
input[readonly] { opacity: .75; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-grid > * { grid-column: span 6; }
.form-grid .c-2 { grid-column: span 2; } .form-grid .c-3 { grid-column: span 3; } .form-grid .c-4 { grid-column: span 4; }
.form-grid .c-5 { grid-column: span 5; } .form-grid .c-8 { grid-column: span 8; } .form-grid .c-12 { grid-column: span 12; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon > input { padding-left: 36px; }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters > div { min-width: 150px; flex: 1; }
.filters .actions { flex: 0; display: flex; gap: 8px; min-width: auto; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--border); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table tr.clickable { cursor: pointer; }
.person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.person strong { display: block; font-weight: 600; }
.person small { display: block; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); margin: 2px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--on-gold); font-weight: 800; font-size: 13px; object-fit: cover;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.stars.sm { font-size: 12px; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid transparent; }
.alert i { font-size: 18px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty i { font-size: 42px; color: var(--gold); opacity: .6; display: block; margin-bottom: 10px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 16px; color: var(--text-2); font-weight: 600; border: 0; background: none; cursor: pointer; font: inherit; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--gold); border-color: var(--gold); }
.tab-pane { display: none; } .tab-pane.active { display: block; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); color: var(--text-2); }
.pager a.active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { min-width: 0; }

.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; } .dl dd { margin: 0; font-weight: 500; }

.progress { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }

.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* Modal (dialog nativo) */
dialog.modal {
  border: 1px solid var(--border); border-radius: 20px; padding: 0; background: var(--surface); color: var(--text);
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
dialog.modal.sm { width: min(480px, calc(100vw - 24px)); }
dialog.modal.lg { width: min(1040px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(5, 6, 9, .65); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: pop .18s ease; display: flex; flex-direction: column; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 20px 20px; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--success); box-shadow: var(--shadow); animation: slide .25s ease; }
.toast.error { border-left-color: var(--danger); } .toast.warning { border-left-color: var(--warning); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Atendimentos (fila) ---------- */
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.ticket::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--info); }
.ticket .timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--info); }
.ticket .total { font-size: 22px; font-weight: 800; }
.ticket .foot { display: flex; gap: 8px; margin-top: auto; }

.item-row { display: grid; grid-template-columns: 1fr 110px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-row.prod { grid-template-columns: 1fr 80px 110px 36px; }
.pay-row { display: grid; grid-template-columns: 1fr 140px 36px; gap: 8px; margin-bottom: 8px; }
.summary { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.summary .row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text-2); }
.summary .row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; color: var(--text); font-size: 20px; font-weight: 800; }
.summary .row.total span:last-child { color: var(--gold); }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pay-methods button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.pay-methods button i { font-size: 20px; color: var(--gold); }
.pay-methods button:hover { border-color: var(--gold); color: var(--text); }
.restante { padding: 10px 14px; border-radius: 10px; font-weight: 700; display: flex; justify-content: space-between; }
.restante.ok { background: var(--success-soft); color: var(--success); }
.restante.pend { background: var(--warning-soft); color: var(--warning); }
.restante.over { background: var(--info-soft); color: var(--info); }

/* Perfil / ficha */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head h2 { font-size: 22px; }
.profile-head .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; margin-top: 4px; }
.profile-head .meta i { color: var(--gold); margin-right: 4px; }

/* Barber cards */
.barbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.barber-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); transition: .2s; }
.barber-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.barber-card .avatar { margin: 0 auto 10px; }
.barber-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.barber-card .stats strong { display: block; font-size: 15px; }
.barber-card .stats small { font-size: 11px; }

/* Rank */
.rank { counter-reset: r; }
.rank li::before { counter-increment: r; content: counter(r); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 12px; flex-shrink: 0; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--gold) 35%, transparent), transparent 45%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 50%),
    repeating-linear-gradient(135deg, #14100a 0 22px, #17120b 22px 44px);
  color: #f5ecd9;
}
.auth-art h2 { font-family: 'Playfair Display', serif; font-size: 46px; line-height: 1.1; max-width: 460px; }
.auth-art h2 span { color: var(--gold); }
.auth-art p { color: #cdbf9f; max-width: 440px; font-size: 15px; }
.auth-art .pole { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); width: 46px; height: 260px; border-radius: 24px; background: repeating-linear-gradient(-45deg, #c0392b 0 18px, #fff 18px 36px, #2a5db0 36px 54px, #fff 54px 72px); box-shadow: 0 0 0 6px #2a2216, 0 0 60px color-mix(in srgb, var(--gold) 35%, transparent); animation: pole 3s linear infinite; background-size: 100% 204px; }
@keyframes pole { to { background-position: 0 204px; } }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 26px; margin-bottom: 4px; }
.auth-box > p { color: var(--text-2); margin: 0 0 26px; }
.auth-box .field { margin-bottom: 16px; }
.auth-box .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-links { display: flex; justify-content: space-between; margin: 4px 0 20px; font-size: 13px; }
.pass-wrap { position: relative; }
.pass-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.strength { height: 5px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; transition: .2s; }

/* Marca própria */
.brand-logo { display: block; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.brand.no-logo { padding-left: 24px; }
.brand-mark { display: flex; gap: 12px; align-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.swatches button.on { outline: 2px solid var(--text); outline-offset: 2px; }
.color-pick { display: flex; gap: 12px; align-items: center; }
.color-pick input[type=color] { width: 44px; height: 44px; padding: 4px; border-radius: 10px; cursor: pointer; background: var(--bg-2); flex-shrink: 0; }
.color-pick input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.logo-drop { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-2); }
.logo-drop .ph { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 24px; flex-shrink: 0; overflow: hidden; }
.logo-drop .ph img { max-width: 100%; max-height: 100%; object-fit: contain; }
.serif { font-family: 'Playfair Display', serif; }
.preview-login { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; min-height: 190px; }
.preview-login .art { background: radial-gradient(circle at 20% 20%, var(--gold-soft), transparent 60%), #15110a; color: #f5ecd9; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.preview-login .frm { background: var(--bg); padding: 16px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.preview-login .fake { height: 26px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border); }

/* Página pública de avaliação */
.public { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%), var(--bg); }
.rate-card { width: 100%; max-width: 460px; text-align: center; }
.rate-stars { display: flex; justify-content: center; gap: 8px; flex-direction: row-reverse; margin: 18px 0; }
.rate-stars input { display: none; }
.rate-stars label { font-size: 42px; color: var(--border); cursor: pointer; margin: 0; transition: .15s; }
.rate-stars label:hover, .rate-stars label:hover ~ label, .rate-stars input:checked ~ label { color: var(--gold); transform: scale(1.05); }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search input { width: 200px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .g-main, .g-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 720px) {
  .content { padding: 18px 14px 90px; }
  .topbar { padding: 12px 14px; gap: 10px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { display: none; }
  .global-search { display: none; }
  .hide-sm { display: none !important; }
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-grid > *, .form-grid [class*="c-"] { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; } .kpi .value { font-size: 19px; } .kpi .ico { width: 34px; height: 34px; font-size: 16px; margin-bottom: 8px; }
  .card { padding: 16px; }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--on-gold); font-size: 24px; box-shadow: 0 10px 25px color-mix(in srgb, var(--gold) 40%, transparent); }
  .toasts { left: 14px; right: 14px; bottom: 86px; } .toast { min-width: 0; max-width: none; }
  .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 8px; }
  .item-row.prod { grid-template-columns: 1fr 64px 90px 36px; }
  .pay-methods { grid-template-columns: repeat(3, 1fr); }
  /* tabelas viram cards */
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; font-weight: 600; }
  .table.responsive td.main-cell { display: block; text-align: left; } .table.responsive td.main-cell::before { display: none; }
  .table.responsive .actions { justify-content: flex-end; }
  .modal-body { padding: 16px; }
}

/* ---------- Impressão ---------- */
@media print {
  .sidebar, .topbar, .fab, .toasts, .filters, .no-print, .btn, .icon-btn { display: none !important; }
  .main { margin: 0; } .content { padding: 0; }
  body { background: #fff; color: #000; }
  .card, .kpi { box-shadow: none; border-color: #ccc; background: #fff; break-inside: avoid; }
  .tab-pane { display: block !important; }
}
.table td.right, .table th.right { white-space: nowrap; }
.brand > span { min-width: 0; }
.brand strong { overflow-wrap: anywhere; line-height: 1.2; }
.sidebar .brand-logo { max-width: 72px !important; object-fit: contain; }

/* Cloudflare Turnstile */
.ts-box { margin: 2px 0 18px; min-height: 65px; }
.ts-box .cf-turnstile { width: 100%; }
/* Permissões */
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table .grp td { background: var(--bg-2); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; padding: 8px 14px; text-align: left; }
.perm-table input[type=checkbox], .perm-list input[type=checkbox] { width: 20px; height: 20px; cursor: pointer; }
.perm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.perm-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); margin: 0; font-size: 14px; color: var(--text); cursor: pointer; font-weight: 500; }
.perm-list label i { color: var(--gold); width: 18px; text-align: center; }
.perm-list .grp { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; margin-top: 8px; }
.perm-list.disabled { opacity: .45; pointer-events: none; }
@media (max-width: 720px) { .perm-list { grid-template-columns: 1fr; } }

/* Painel do supervisor */
.sup-page { min-height: 100vh; background: radial-gradient(ellipse at 50% -10%, var(--gold-soft), transparent 55%), var(--bg); }
.sup-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--border); }
.sup-main { max-width: 780px; margin: 48px auto; padding: 0 16px; }
.sup-card { padding: 26px 22px; }
.sup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.sup-opt { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; font-weight: 500; color: var(--text); cursor: pointer; padding: 4px 0; }
.sup-opt input { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
@media (max-width: 720px) { .sup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sup-top { padding: 12px 14px; } .sup-main { margin: 24px auto; } }
@media (max-width: 420px) { .sup-grid { grid-template-columns: 1fr; } }
