/* =====================================================================
   BrinqueAluga — design system "Premium moderno" (claro + escuro)
   ===================================================================== */
:root {
  --primary: #0b5ed7;
  --accent: #00b4ff;
  --sol: #ffb300;
  --primary-600: color-mix(in srgb, var(--primary) 85%, #000);
  --primary-50: color-mix(in srgb, var(--primary) 8%, var(--surface-solid));
  --primary-100: color-mix(in srgb, var(--primary) 16%, var(--surface-solid));
  --grad: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 55%, var(--accent)) 100%);
  --grad-soft: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));

  --bg: #f3f4fa;
  --surface: rgba(255, 255, 255, .74);
  --surface-solid: #ffffff;
  --surface-2: rgba(244, 245, 251, .75);
  --glass-border: rgba(255, 255, 255, .7);
  --border: rgba(15, 23, 42, .075);
  --border-strong: rgba(15, 23, 42, .14);
  --text: #0f172a;
  --text-2: #475569;
  --muted: #8a93a8;
  --input: #ffffff;

  --green: #10b981; --green-50: color-mix(in srgb, #10b981 12%, var(--surface-solid)); --green-t: #047857;
  --red: #ef4444; --red-50: color-mix(in srgb, #ef4444 11%, var(--surface-solid)); --red-t: #b91c1c;
  --amber: #f59e0b; --amber-50: color-mix(in srgb, #f59e0b 14%, var(--surface-solid)); --amber-t: #b45309;
  --blue: #3b82f6; --blue-50: color-mix(in srgb, #3b82f6 11%, var(--surface-solid)); --blue-t: #1d4ed8;
  --cyan: #06b6d4; --cyan-50: color-mix(in srgb, #06b6d4 12%, var(--surface-solid)); --cyan-t: #0e7490;
  --pink: #ec4899; --pink-50: color-mix(in srgb, #ec4899 11%, var(--surface-solid)); --pink-t: #be185d;
  --gray-50: color-mix(in srgb, var(--text) 5%, var(--surface-solid));

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -10px rgba(15, 23, 42, .12);
  --shadow-lg: 0 30px 70px -20px rgba(15, 23, 42, .35);
  --glow: 0 10px 30px -8px color-mix(in srgb, var(--primary) 55%, transparent);
  --blur: saturate(160%) blur(18px);
  --sidebar: 260px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
[data-tema="escuro"] {
  --bg: #090b14;
  --surface: rgba(23, 26, 42, .66);
  --surface-solid: #151827;
  --surface-2: rgba(30, 34, 54, .6);
  --glass-border: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #eef0f8;
  --text-2: #b2b8cc;
  --muted: #767e98;
  --input: #10131f;
  --green-t: #34d399; --red-t: #f87171; --amber-t: #fbbf24; --blue-t: #60a5fa; --cyan-t: #22d3ee; --pink-t: #f472b6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); font-size: 14.5px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5; transition: background .3s, color .3s;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 8% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 60%),
    radial-gradient(700px 600px at 70% 110%, color-mix(in srgb, #06b6d4 10%, transparent), transparent 60%);
}
a { color: var(--primary); text-decoration: none; }
[data-tema="escuro"] a { color: color-mix(in srgb, var(--primary) 55%, #fff); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 750; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.strong { font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-green { color: var(--green-t); } .text-red { color: var(--red-t); } .text-amber { color: var(--amber-t); }

/* ---------- animações */
@keyframes subir { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes crescer { from { transform: scaleY(0); } }
@keyframes desenhar { from { stroke-dashoffset: 2000; } }
@keyframes brilho { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes flutuar { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.view > * { animation: subir .5s cubic-bezier(.2, .8, .2, 1) both; }
.view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; } .view > *:nth-child(5) { animation-delay: .2s; }
.stats > * { animation: subir .5s cubic-bezier(.2, .8, .2, 1) both; }
.stats > *:nth-child(2) { animation-delay: .03s; } .stats > *:nth-child(3) { animation-delay: .06s; } .stats > *:nth-child(4) { animation-delay: .09s; }
.stats > *:nth-child(5) { animation-delay: .12s; } .stats > *:nth-child(6) { animation-delay: .15s; } .stats > *:nth-child(7) { animation-delay: .18s; }
.stats > *:nth-child(8) { animation-delay: .21s; } .stats > *:nth-child(9) { animation-delay: .24s; } .stats > *:nth-child(10) { animation-delay: .27s; }
.stats > *:nth-child(11) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; z-index: 40;
  background: var(--surface); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; color: var(--text); }
.brand-logo { width: 40px; height: 40px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; font-size: 20px; flex: none; overflow: hidden; box-shadow: var(--glow); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-aluga { color: var(--sol); }
.brand b { font-size: 16.5px; display: block; letter-spacing: -.02em; font-weight: 800; }
.brand small { color: var(--muted); font-size: 11.5px; display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14px; transition: .18s; position: relative; }
.nav a:hover { background: var(--primary-50); color: var(--text); transform: translateX(2px); }
.nav a.active { background: var(--grad); color: #fff !important; box-shadow: var(--glow); }
.nav .ico { width: 24px; height: 24px; display: grid; place-items: center; font-size: 15px; border-radius: 8px; }
.nav a.active .ico { background: rgba(255, 255, 255, .2); }
.nav .badge-count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; box-shadow: 0 4px 10px -2px rgba(239, 68, 68, .5); }
.nav a.active .badge-count { background: #fff; color: var(--primary); }
.sidebar-foot { margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; transition: .15s; }
.user-chip:hover { background: var(--primary-50); }
.avatar { width: 36px; height: 36px; border-radius: 12px; background: var(--grad-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 13px; border: 1px solid var(--border); }
[data-tema="escuro"] .avatar { color: color-mix(in srgb, var(--primary) 50%, #fff); }
.user-chip b { color: var(--text); font-size: 13px; display: block; }
.user-chip small { font-size: 11.5px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 16px 32px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 23px; }
.topbar .title small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 500; }
.topbar .title small::first-letter { text-transform: uppercase; }
.btn.menu-btn { display: none; }
.tema-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 17px; display: grid; place-items: center; transition: .2s; backdrop-filter: var(--blur); }
.tema-btn:hover { transform: rotate(-15deg) scale(1.05); box-shadow: var(--shadow); }
.view { padding: 8px 32px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .grow h1 { font-size: 22px; }

/* ---------- superfícies (vidro) */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); position: relative;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 var(--glass-border); }
.card-pad { padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 18px 20px; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin: 4px 0 10px; }

/* ---------- indicadores */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 16px; }
.stats.dash { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats.dash > .stat:first-child { grid-column: span 2; }
.stats.dash > .stat:first-child .val { font-size: 34px; }
@media (max-width: 1350px) { .stats.dash { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; box-shadow: var(--shadow-sm);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--grad-soft); opacity: .7; pointer-events: none; }
.stat[data-href] { cursor: pointer; }
.stat[data-href]:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.stat .lbl { color: var(--text-2); font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 9px; position: relative; z-index: 1; }
.stat .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; background: var(--primary-50); flex: none; border: 1px solid var(--border); }
.stat .val { font-size: 26px; font-weight: 800; letter-spacing: -.03em; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.stat.hl {
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 50%, var(--accent)), var(--primary));
  background-size: 220% 220%; animation: subir .5s both, brilho 9s ease-in-out infinite; color: #fff; border: 0; box-shadow: var(--glow);
}
.stat.hl::after { background: rgba(255, 255, 255, .14); width: 180px; height: 180px; right: -50px; top: -60px; }
.stat.hl .lbl, .stat.hl .sub { color: rgba(255, 255, 255, .88); }
.stat.hl .ic { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .25); }
.ic.green { background: var(--green-50); } .ic.red { background: var(--red-50); } .ic.amber { background: var(--amber-50); }
.ic.blue { background: var(--blue-50); } .ic.cyan { background: var(--cyan-50); } .ic.pink { background: var(--pink-50); }

/* ---------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); font-weight: 650; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s, filter .2s; text-decoration: none !important;
}
.btn:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong)); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff !important; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.green { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: #fff !important; box-shadow: 0 10px 24px -10px rgba(16, 185, 129, .7); }
.btn.wa { background: linear-gradient(135deg, #25d366, #16a34a); border-color: transparent; color: #fff !important; box-shadow: 0 10px 24px -10px rgba(37, 211, 102, .7); }
.btn.green:hover, .btn.wa:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red-t); border-color: color-mix(in srgb, var(--red) 30%, transparent); background: var(--surface-solid); }
.btn.danger:hover { background: var(--red-50); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--primary-50); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; background: var(--gray-50); border-radius: 13px; padding: 4px; gap: 2px; border: 1px solid var(--border); }
.btn-group button { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--text-2); cursor: pointer; transition: .2s; }
.btn-group button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }

/* ---------- formulários */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 42px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 0 13px; background: var(--input);
  outline: none; transition: .18s; font-size: 14.5px; color: var(--text);
}
.field textarea, textarea.input { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border-strong)); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; }
.c9 { grid-column: span 9; } .c2 { grid-column: span 2; } .c5 { grid-column: span 5; } .c7 { grid-column: span 7; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.search { position: relative; }
.search input { padding-left: 38px; }
.search::before { content: "🔍"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .5; z-index: 1; }
.input-money { position: relative; }
.input-money::before { content: "R$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 700; z-index: 1; }
.input-money input { padding-left: 36px; }

/* ---------- chips e badges */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border-strong); background: var(--surface-solid); border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 650; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: .18s; }
.chip:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--text); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.chip .n { opacity: .7; margin-left: 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--gray-50); color: var(--text-2); border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.badge.plain::before { display: none; }
.b-gray { background: var(--gray-50); color: var(--text-2); }
.b-amber { background: var(--amber-50); color: var(--amber-t); }
.b-blue { background: var(--blue-50); color: var(--blue-t); }
.b-violet { background: var(--primary-50); color: var(--primary); }
[data-tema="escuro"] .b-violet { color: color-mix(in srgb, var(--primary) 50%, #fff); }
.b-cyan { background: var(--cyan-50); color: var(--cyan-t); }
.b-green { background: var(--green-50); color: var(--green-t); }
.b-red { background: var(--red-50); color: var(--red-t); }
.b-pink { background: var(--pink-50); color: var(--pink-t); }
.b-dark { background: var(--gray-50); color: var(--text-2); }

/* ---------- tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: transparent; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); transition: background .15s; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.li .when { width: 58px; text-align: center; flex: none; padding: 6px 0; border-radius: 12px; background: var(--grad-soft); }
.li .when b { display: block; font-size: 15px; font-weight: 800; }
.li .when small { color: var(--muted); font-size: 10.5px; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.thumb { width: 48px; height: 48px; border-radius: 13px; object-fit: cover; background: var(--gray-50); flex: none; display: grid; place-items: center; font-size: 20px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .em { font-size: 42px; margin-bottom: 10px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12)); }
.empty b { color: var(--text-2); display: block; margin-bottom: 4px; font-size: 15px; }

/* ---------- produtos */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .25s, box-shadow .25s; backdrop-filter: var(--blur); box-shadow: var(--shadow-sm); }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.pcard .ph { aspect-ratio: 4/3; background: var(--gray-50); position: relative; display: grid; place-items: center; font-size: 46px; overflow: hidden; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .5s; }
.pcard:hover .ph img { transform: scale(1.05); }
.pcard .ph .badge { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(8px); background: color-mix(in srgb, var(--surface-solid) 85%, transparent); }
.pcard .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard .price { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.pcard.off { opacity: .55; }
.meter { height: 7px; background: var(--gray-50); border-radius: 99px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* ---------- novo pedido */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.pick { border: 1.5px solid var(--border); border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; background: var(--surface-solid); transition: .18s; }
.pick:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.pick.sel { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.pick.indisp { opacity: .45; }
.pick .nm { font-size: 13.5px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 11px; overflow: hidden; background: var(--surface-solid); }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 16px; font-weight: 800; color: var(--primary); transition: background .15s; }
.qty button:hover:not(:disabled) { background: var(--primary-50); }
.qty button:disabled { color: var(--border-strong); cursor: default; }
.qty span { min-width: 26px; text-align: center; font-weight: 800; }
.summary { position: sticky; top: 92px; }
.sum-line { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; color: var(--text-2); gap: 10px; }
.sum-line.total { border-top: 1px dashed var(--border-strong); margin-top: 8px; padding-top: 14px; font-size: 22px; color: var(--text); font-weight: 800; letter-spacing: -.02em; }

/* ---------- autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; animation: pop .15s; }
.ac-item { padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.ac-item:hover, .ac-item.hi { background: var(--primary-50); }
.ac-item:last-child { border-bottom: 0; }

/* ---------- status do pedido */
.stepper { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.stepper .st { flex: 1; min-width: 92px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); position: relative; padding-top: 20px; }
.stepper .st::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 7px; border-radius: 99px; background: var(--gray-50); }
.stepper .st.done::before { background: var(--grad); }
.stepper .st.cur { color: var(--primary); }
[data-tema="escuro"] .stepper .st.cur { color: color-mix(in srgb, var(--primary) 50%, #fff); }
.stepper .st.cur::before { background: var(--grad); box-shadow: var(--glow); }

/* ---------- agenda */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow { padding: 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; border-bottom: 1px solid var(--border); }
.cal .day { min-height: 116px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 7px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; transition: background .15s; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.cal .day.out { background: color-mix(in srgb, var(--text) 2%, transparent); }
.cal .day.out .dn { color: var(--muted); opacity: .6; }
.cal .day .dn { font-size: 12.5px; font-weight: 800; color: var(--text-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; }
.cal .day.today .dn { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.ev { font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid currentColor; transition: transform .15s; }
.ev:hover { transform: translateX(2px); }
.ev.more { background: transparent; border: 0; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.week .wd { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; min-height: 250px; padding: 12px; display: flex; flex-direction: column; gap: 7px; backdrop-filter: var(--blur); box-shadow: var(--shadow-sm); }
.week .wd.today { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.week .wd h4 { font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.week .wd h4 b { display: block; font-size: 22px; color: var(--text); letter-spacing: -.02em; }
.evc { border-radius: 11px; padding: 8px 10px; font-size: 12px; cursor: pointer; border-left: 3px solid currentColor; transition: transform .15s; }
.evc:hover { transform: translateY(-2px); }
.evc b { display: block; color: var(--text); font-size: 12.5px; }
.evc span { color: var(--text-2); }

/* ---------- entregas */
.dcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.dcard .time { font-size: 26px; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addr { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }

/* ---------- abas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 11px 15px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14px; transition: .15s; border-radius: 10px 10px 0 0; }
.tabs button:hover { color: var(--text); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
[data-tema="escuro"] .tabs button.on { color: color-mix(in srgb, var(--primary) 50%, #fff); }
.tabs button .n { background: var(--gray-50); border-radius: 99px; padding: 1px 8px; font-size: 11.5px; margin-left: 6px; color: var(--text-2); }

/* ---------- modal */
.overlay { position: fixed; inset: 0; background: rgba(8, 10, 22, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; width: 100%; max-width: 640px; box-shadow: var(--shadow-lg); animation: pop .25s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.modal.lg { max-width: 920px; } .modal.sm { max-width: 440px; } .modal.xl { max-width: 1100px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: 18px; }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 22px 22px; flex-wrap: wrap; }

/* ---------- toast */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: color-mix(in srgb, #0f172a 92%, transparent); color: #fff; padding: 13px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; max-width: 400px; animation: pop .25s; display: flex; gap: 10px; align-items: center; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .08); }
.toast.err { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.toast.ok { background: linear-gradient(135deg, #10b981, #047857); }

/* ---------- gráficos */
.chart { width: 100%; display: block; overflow: visible; }
.chart-box { width: 100%; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-weight: 600; }
.chart .bar { fill: var(--primary); transition: opacity .15s; transform-box: fill-box; transform-origin: bottom; animation: crescer .7s cubic-bezier(.2, .8, .2, 1) both; }
.chart .bar:hover { opacity: .75; }
.chart polyline { stroke-dasharray: 2000; animation: desenhar 1.4s ease-out both; }
.chart .grid line { stroke: var(--border); stroke-dasharray: 3 4; }
.hbars { display: flex; flex-direction: column; gap: 13px; }
.hbar .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.hbar .trk { height: 10px; border-radius: 99px; background: var(--gray-50); overflow: hidden; }
.hbar .trk i { display: block; height: 100%; border-radius: 99px; background: var(--primary); animation: barra .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes barra { from { transform: scaleX(0); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: fixed; z-index: 300; background: color-mix(in srgb, #0f172a 92%, transparent); color: #fff; font-size: 12px; padding: 7px 11px; border-radius: 10px; pointer-events: none; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); }

/* ---------- diversos */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.alert { padding: 13px 15px; border-radius: 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; border: 1px solid transparent; }
.alert.warn { background: var(--amber-50); color: var(--amber-t); border-color: color-mix(in srgb, var(--amber) 22%, transparent); }
.alert.info { background: var(--blue-50); color: var(--blue-t); border-color: color-mix(in srgb, var(--blue) 18%, transparent); }
.alert.danger { background: var(--red-50); color: var(--red-t); border-color: color-mix(in srgb, var(--red) 20%, transparent); }
.alert.success { background: var(--green-50); color: var(--green-t); border-color: color-mix(in srgb, var(--green) 22%, transparent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.gallery .gi { position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 1; background: var(--gray-50); border: 1px solid var(--border); display: grid; place-items: center; text-align: center; font-size: 12px; padding: 4px; }
.gallery .gi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .3s; }
.gallery .gi:hover img { transform: scale(1.05); }
.gallery .gi .x { position: absolute; top: 5px; right: 5px; background: rgba(0, 0, 0, .55); color: #fff; border: 0; width: 26px; height: 26px; border-radius: 9px; cursor: pointer; z-index: 2; backdrop-filter: blur(6px); }
.upload { border: 2px dashed var(--border-strong); border-radius: 13px; display: grid; place-items: center; aspect-ratio: 1; cursor: pointer; color: var(--muted); font-weight: 650; font-size: 12.5px; text-align: center; padding: 6px; transition: .18s; }
.upload:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.photo-input { width: 100%; aspect-ratio: 4/3; border-radius: 16px; border: 2px dashed var(--border-strong); display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--surface-2); color: var(--muted); font-weight: 650; position: relative; transition: .18s; }
.photo-input:hover { border-color: var(--primary); }
.photo-input img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); min-width: 250px; padding: 6px; z-index: 50; animation: pop .15s; }
.dropdown-menu button, .dropdown-menu a { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text); font-size: 14px; }
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--primary-50); }
.fab { display: none; }
.bottom-nav { display: none; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 60px auto; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.color-dot { width: 32px; height: 32px; border-radius: 11px; border: 3px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; transition: transform .15s; }
.color-dot:hover { transform: scale(1.1); }
.color-dot.on { box-shadow: 0 0 0 2px var(--text); }
.plan-card { border: 2px solid var(--border); border-radius: 18px; padding: 20px; cursor: pointer; background: var(--surface-solid); transition: .2s; display: flex; flex-direction: column; gap: 8px; }
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-card.on { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow); }
.plan-card .pv { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.plan-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
#aviso-assinatura .alert { margin: 0 32px 12px !important; }

/* ---------- login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; position: relative; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate;
  background: radial-gradient(900px 600px at 0% 0%, #7c3aed 0, transparent 60%), radial-gradient(700px 500px at 100% 100%, #db2777 0, transparent 55%), radial-gradient(600px 500px at 90% 10%, #0ea5e9 0, transparent 50%), #140c33;
}
.auth-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.035em; max-width: 540px; font-weight: 800; }
.auth-hero h1 em { font-style: normal; background: linear-gradient(90deg, #f0abfc, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { color: rgba(255, 255, 255, .78); font-size: 16px; max-width: 480px; margin-top: 18px; }
.auth-hero .brand { color: #fff; }
.auth-hero .brand small { color: rgba(255, 255, 255, .6); }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 540px; margin-top: 34px; }
.auth-feats div { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 14px 16px; font-size: 13.5px; font-weight: 650; backdrop-filter: blur(10px); transition: .2s; }
.auth-feats div:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.auth-feats div span { font-size: 20px; display: block; margin-bottom: 6px; }
.balloons { display: none; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 34px; box-shadow: var(--shadow-lg); backdrop-filter: var(--blur); animation: pop .4s cubic-bezier(.2, .8, .2, 1); }
.auth-box h2 { font-size: 26px; margin-bottom: 6px; letter-spacing: -.03em; }
.auth-tema { position: absolute; top: 20px; right: 20px; }

/* tela de abertura (splash) */
#splash { position: fixed; inset: 0; z-index: 1000; background: #0b56d8; display: grid; place-items: center; overflow: hidden; transition: opacity .55s ease, transform .55s ease; }
#splash::before { content: ""; position: absolute; inset: -40px; background: url(/img/capa.jpg) center / cover no-repeat; filter: blur(30px) saturate(1.2); }
#splash img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: splashZoom 1.6s cubic-bezier(.2, .8, .2, 1) both; }
#splash .splash-load { position: absolute; bottom: calc(40px + env(safe-area-inset-bottom)); left: 50%; width: 120px; height: 5px; margin-left: -60px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
#splash .splash-load::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 99px; background: #ffc21a; animation: splashBarra 1s ease-in-out infinite; }
#splash.sair { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes splashZoom { from { transform: scale(1.08); opacity: .4; } }
@keyframes splashBarra { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* capa (imagem da marca) */
.auth-hero:has(.auth-capa) { padding: 0; background: #0b56d8; justify-content: center; align-items: center; }
.auth-hero:has(.auth-capa)::before { opacity: 1; mask-image: none; background: url(/img/capa.jpg) center / cover no-repeat; filter: blur(28px) saturate(1.2); transform: scale(1.15); }
.auth-capa { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35)); }

/* ---------- impressão (documentos sempre claros) */
.doc { background: #fff; color: #111; font-size: 13.5px; line-height: 1.55; }
.doc h1 { font-size: 20px; text-align: center; margin: 14px 0 4px; }
.doc .doc-head { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid #111; padding-bottom: 12px; }
.doc .doc-head img { width: 64px; height: 64px; object-fit: contain; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.doc th, .doc td { border: 1px solid #bbb; padding: 6px 8px; text-align: left; font-size: 13px; color: #111; }
.doc th { background: #f2f2f2; }
.doc .clausulas { white-space: pre-wrap; margin-top: 8px; }
.doc .assin { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 46px; text-align: center; }
.doc .assin div { border-top: 1px solid #111; padding-top: 6px; font-size: 12.5px; }
.doc .assin img { max-height: 70px; margin: 0 auto -8px; }
.doc .chart { height: auto; }
.doc .card, .doc .stat { background: #fff; backdrop-filter: none; box-shadow: none; color: #111; }
.doc-wrap { background: var(--gray-50); padding: 24px; border-radius: 16px; }
.doc-page { background: #fff; max-width: 800px; margin: 0 auto; padding: 44px 52px; box-shadow: var(--shadow); border-radius: 6px; }
#print-area { display: none; }
@media print {
  body { background: #fff; }
  body::before { display: none; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block !important; }
  #print-area .doc-page { box-shadow: none; padding: 0; max-width: none; }
  .no-print { display: none !important; }
  @page { margin: 16mm; }
}

/* ---------- responsivo */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1400px) { @media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); background: var(--surface-solid); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(8, 10, 22, .45); z-index: 35; backdrop-filter: blur(3px); }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .topbar .title h1 { font-size: 19px; }
  .topbar .hide-m { display: none; }
  .tema-btn { width: 36px; height: 36px; }
  .view { padding: 4px 14px 112px; }
  #aviso-assinatura .alert { margin: 0 14px 10px !important; flex-wrap: wrap; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .stats, .stats.dash { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .val { font-size: 19px; }
  .stats.dash > .stat:first-child .val { font-size: 28px; }
  .stat .lbl { font-size: 12px; }
  .stat .ic { width: 28px; height: 28px; font-size: 13px; border-radius: 9px; }
  .form-grid > * { grid-column: span 12 !important; }
  .form-grid > .m6 { grid-column: span 6 !important; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard .bd { padding: 10px 12px 12px; }
  .pcard .price { font-size: 15.5px; }
  .picker { grid-template-columns: 1fr; }
  .summary { position: static; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal, .modal.lg, .modal.sm, .modal.xl { max-width: none; border-radius: 24px 24px 0 0; max-height: 94vh; overflow-y: auto; animation: subir .3s cubic-bezier(.2, .8, .2, 1); }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .modal-head { position: sticky; top: 0; background: var(--surface-solid); z-index: 2; border-radius: 24px 24px 0 0; }
  .page-head { margin-bottom: 14px; }
  .page-head .grow h1 { font-size: 20px; }
  .page-head > .btn:not(.keep) { flex: 1 1 auto; }
  .page-head > :not(.btn):not(.btn-group):not(.dropdown) { flex: 1 1 100%; }
  .page-head .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .page-head .row input.input { flex: 1; width: auto !important; min-width: 0; }
  .li.wrap-m { flex-wrap: wrap; }
  .li.wrap-m > .grow { flex-basis: calc(100% - 60px); }
  .cal .day { min-height: 66px; padding: 4px; }
  .cal .ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; border: 0; background: currentColor !important; opacity: .7; }
  .cal .ev.more { font-size: 10px; height: auto; background: transparent !important; }
  .week { grid-template-columns: 1fr; }
  .week .wd { min-height: 0; }
  .kv { grid-template-columns: 110px 1fr; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 30; justify-content: space-around;
    background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border); border-radius: 22px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom) / 2); box-shadow: var(--shadow-lg);
  }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 5px 0; border: 0; background: transparent; cursor: pointer; border-radius: 14px; transition: .2s; }
  .bottom-nav .ico { font-size: 19px; line-height: 1.2; filter: grayscale(1); opacity: .65; transition: .2s; }
  .bottom-nav a.active { color: var(--primary); background: var(--primary-50); }
  [data-tema="escuro"] .bottom-nav a.active { color: color-mix(in srgb, var(--primary) 50%, #fff); }
  .bottom-nav a.active .ico { filter: none; opacity: 1; transform: translateY(-1px); }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; background: var(--grad); color: #fff; font-size: 28px; border: 0; box-shadow: var(--glow); z-index: 31; cursor: pointer; transition: transform .2s; }
  .fab:active { transform: scale(.94); }
  .toasts { left: 14px; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 30px 22px 70px; }
  .auth-hero:has(.auth-capa) { height: 46vh; min-height: 300px; }
  .auth-capa { object-fit: cover; object-position: center 47%; filter: none; }
  .auth-hero h1 { font-size: 30px; }
  .auth-hero p { font-size: 14.5px; }
  .auth-feats { display: none; }
  .auth-form { padding: 0 14px 40px; margin-top: -46px; place-items: start center; }
  .auth-box { padding: 24px 20px; }
  .auth-tema { top: 16px; right: 16px; }
  .doc-page { padding: 22px 18px; }
  .doc-wrap { padding: 8px; }
  table.table.resp thead { display: none; }
  table.table.resp, table.table.resp tbody, table.table.resp tr, table.table.resp td { display: block; width: 100%; }
  table.table.resp tr { border-bottom: 1px solid var(--border); padding: 12px 16px; }
  table.table.resp td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.table.resp td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; font-weight: 650; text-align: left; }
  table.table.resp td.main-cell { font-size: 15px; font-weight: 750; text-align: left; justify-content: flex-start; }
  table.table.resp td.main-cell::before { display: none; }
  table.table.resp td.num { text-align: right; }
  table.table.resp tbody tr:hover td { background: transparent; }
}
@media (max-width: 380px) { .stats { grid-template-columns: 1fr 1fr; } .stat .val { font-size: 17px; } }
