/* ===== Design system · conceito Enerzee Recharge (verde profundo + lima) ===== */
:root, [data-theme="dark"] {
  --ef-bg: #060d08; --ef-fg: #f4f7ef; --ef-card: #0f1d13; --ef-card-muted: #0b170e; --ef-muted-fg: #9fb3a0;
  --ef-border: rgba(196, 255, 92, 0.14); --ef-border-strong: rgba(196, 255, 92, 0.28); --ef-input-bg: #081209;
  --ef-ring: #c6f135; --ef-primary: #c6f135; --ef-primary-fg: #08150a; --ef-primary-hover: #d7ff5c;
  --ef-accent: rgba(198, 241, 53, 0.10); --ef-accent-fg: #c6f135; --ef-lime-dim: #8fae2d;
  --ef-sidebar: #081209; --ef-sidebar-fg: #9fb3a0; --ef-sidebar-accent: rgba(198, 241, 53, 0.12); --ef-sidebar-accent-fg: #c6f135; --ef-sidebar-border: rgba(196, 255, 92, 0.14);
  --ef-destructive: #f87171; --ef-destructive-muted: rgba(248, 113, 113, 0.12); --ef-success: #c6f135; --ef-success-muted: rgba(198, 241, 53, 0.10);
  --ef-warning: #fbbf24; --ef-warning-muted: rgba(251, 191, 36, 0.12); --ef-info: #7dd3fc; --ef-info-muted: rgba(125, 211, 252, 0.12);
  --ef-shadow: none; --ef-radius: 14px; --ef-star: #c6f135;
  --ef-font-head: "Space Grotesk", Inter, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --ef-bg: #f4f7ef; --ef-fg: #0c1a10; --ef-card: #ffffff; --ef-card-muted: #eef3e6; --ef-muted-fg: #5b6f5e;
  --ef-border: rgba(40, 70, 20, 0.14); --ef-border-strong: rgba(40, 70, 20, 0.28); --ef-input-bg: #ffffff;
  --ef-ring: #6b8f12; --ef-primary: #c6f135; --ef-primary-fg: #08150a; --ef-primary-hover: #b8e224;
  --ef-accent: rgba(143, 174, 45, 0.12); --ef-accent-fg: #3f5510; --ef-lime-dim: #5f7d14;
  --ef-sidebar: #ffffff; --ef-sidebar-fg: #3f4f42; --ef-sidebar-accent: rgba(143, 174, 45, 0.16); --ef-sidebar-accent-fg: #2f4208; --ef-sidebar-border: rgba(40, 70, 20, 0.14);
  --ef-destructive: #dc2626; --ef-destructive-muted: #fef2f2; --ef-success: #4d7c0f; --ef-success-muted: rgba(143, 174, 45, 0.14);
  --ef-warning: #b45309; --ef-warning-muted: #fffbeb; --ef-info: #1d4ed8; --ef-info-muted: #eff6ff;
  --ef-shadow: 0 1px 2px 0 rgb(12 26 16 / 0.05); --ef-star: #6b8f12;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--ef-bg); color: var(--ef-fg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
svg.i { width: 1rem; height: 1rem; flex-shrink: 0; }
svg.i-sm { width: 0.875rem; height: 0.875rem; }
svg.i-lg { width: 1.25rem; height: 1.25rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Layout ===== */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; }
.content { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1rem 6rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ef-border); background: var(--ef-card); padding: 0.75rem 1rem; position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; padding: 0.25rem 0.5rem; }
.brand-mark { display: flex; width: 2.25rem; height: 2.25rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 0.5rem; border: 1px solid var(--ef-border); background: var(--ef-accent); color: var(--ef-primary); box-shadow: var(--ef-shadow); }
.brand-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { font-size: 11px; color: var(--ef-muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ef-border); background: var(--ef-card); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.6rem 0.25rem; font-size: 11px; color: var(--ef-muted-fg); }
.bottomnav a.active { color: var(--ef-primary); background: var(--ef-accent); font-weight: 500; }
.bottomnav svg.i { width: 1.25rem; height: 1.25rem; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0.75rem 0.5rem; overflow-y: auto; flex: 1; }
.nav-link { display: flex; align-items: center; gap: 0.5rem; border-radius: 0.375rem; padding: 0.5rem; font-size: 0.875rem; color: var(--ef-sidebar-fg); transition: background .15s, color .15s; }
.nav-link svg.i { opacity: .8; }
.nav-link:hover, .nav-sub a:hover { background: var(--ef-sidebar-accent); color: var(--ef-sidebar-accent-fg); }
.nav-link.active { background: var(--ef-sidebar-accent); color: var(--ef-sidebar-accent-fg); font-weight: 500; }
.nav-sub { list-style: none; margin: 2px 0 4px 0.75rem; padding: 0 0 0 0.5rem; border-left: 1px solid var(--ef-sidebar-border); }
.nav-sub a { display: block; border-radius: 0.375rem; padding: 0.375rem 0.5rem; font-size: 0.75rem; color: var(--ef-muted-fg); }
.nav-sub a.active { color: var(--ef-sidebar-accent-fg); font-weight: 500; }
.side-user { border-top: 1px solid var(--ef-sidebar-border); padding: 0.75rem 1rem; }
.side-user .kicker { margin-bottom: 0.25rem; }
.side-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 16rem 1fr; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--ef-sidebar-border); background: var(--ef-sidebar); }
  .sidebar .brand { padding: 1rem; border-bottom: 1px solid var(--ef-sidebar-border); }
  .topbar, .bottomnav { display: none; }
  .content { padding: 2rem 2rem 3rem; }
}

/* Sheet (menu mobile / painel lateral) */
.sheet-overlay { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgb(0 0 0 / .5); }
.sheet { display: flex; height: 100%; width: 100%; max-width: 28rem; flex-direction: column; border-left: 1px solid var(--ef-border); background: var(--ef-card); animation: slidein .18s ease-out; }
.sheet.left { border-left: 0; border-right: 1px solid var(--ef-border); max-width: 18rem; margin-right: auto; animation-name: slideinl; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--ef-border); }
.sheet-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.sheet-foot { border-top: 1px solid var(--ef-border); padding: 0.75rem 1.25rem; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
@keyframes slideinl { from { transform: translateX(-30px); opacity: 0; } }

/* ===== Componentes ===== */
.card { background: var(--ef-card); box-shadow: var(--ef-shadow); border-radius: var(--ef-radius); border: 1px solid var(--ef-border); }
.card-muted { background: var(--ef-card-muted); border-radius: var(--ef-radius); border: 1px solid var(--ef-border); }
.pad { padding: 1rem; } .pad-lg { padding: 1.25rem; }
@media (min-width: 640px) { .pad-lg { padding: 1.5rem; } }
.kicker { font-size: .75rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ef-muted-fg); }
.title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
@media (min-width: 640px) { .title { font-size: 1.75rem; } }
.h2 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .375rem; }
.h3 { font-size: .875rem; font-weight: 600; }
.lead { font-size: .875rem; color: var(--ef-muted-fg); line-height: 1.5; }
.muted { color: var(--ef-muted-fg); }
.small { font-size: .75rem; } .xs { font-size: 11px; }
.big { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.strong { font-weight: 600; } .medium { font-weight: 500; }
.danger-text { color: var(--ef-destructive); } .success-text { color: var(--ef-success); } .warning-text { color: var(--ef-warning); }
.page-head { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.row { display: flex; align-items: center; gap: .5rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: .75rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
@media (min-width: 640px) { .sm-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sm-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stat { padding: .875rem 1rem; }
.stat .lbl { display: flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--ef-muted-fg); }
.stat .val { font-size: 1.5rem; font-weight: 600; margin-top: .125rem; }
.divider { border: 0; border-top: 1px solid var(--ef-border); margin: 1rem 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; border-radius: calc(var(--ef-radius) - 2px); font-size: .875rem; font-weight: 500; padding: .5rem 1rem; transition: opacity .15s, background .15s; cursor: pointer; border: 1px solid transparent; white-space: nowrap; line-height: 1.25rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ef-primary); color: var(--ef-primary-fg); }
.btn-primary:hover:not(:disabled) { opacity: .92; }
.btn-secondary { background: var(--ef-accent); color: var(--ef-fg); border-color: var(--ef-border); }
.btn-secondary:hover:not(:disabled) { background: var(--ef-card-muted); }
.btn-outline { border-color: var(--ef-border); background: var(--ef-card); color: var(--ef-fg); }
.btn-outline:hover:not(:disabled) { background: var(--ef-accent); }
.btn-ghost { background: transparent; color: var(--ef-fg); }
.btn-ghost:hover:not(:disabled) { background: var(--ef-accent); }
.btn-destructive { background: var(--ef-destructive); color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.btn-whatsapp:hover:not(:disabled) { background: #20bd5a; border-color: #20bd5a; }
.btn-success-outline { border-color: var(--ef-border); background: var(--ef-success-muted); color: var(--ef-success); }
.btn-sm { font-size: .75rem; padding: .375rem .75rem; }
.btn-lg { font-size: 1rem; padding: .625rem 1.25rem; }
.btn-icon { padding: .5rem; width: 2.25rem; height: 2.25rem; }
.btn-icon.btn-sm { width: 1.875rem; height: 1.875rem; padding: .375rem; }
.btn-block { width: 100%; }
@media (min-width: 640px) { .sm-auto { width: auto; } }
.btn-group { display: inline-flex; align-items: stretch; border-radius: calc(var(--ef-radius) - 2px); border: 1px solid var(--ef-border); overflow: hidden; }
.btn-group > .btn { border-radius: 0; border: 0; }
.btn-group > .btn:not(:last-child) { border-right: 1px solid var(--ef-border); }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ef-border); margin-bottom: 1.25rem; }
.link { color: var(--ef-fg); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { opacity: .85; }

.input, .select, .textarea { width: 100%; border-radius: calc(var(--ef-radius) - 2px); border: 1px solid var(--ef-border); background: var(--ef-input-bg); color: var(--ef-fg); padding: .5rem .75rem; font-size: .875rem; line-height: 1.25rem; transition: box-shadow .15s, border-color .15s; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; padding-right: 2rem; }
.textarea { min-height: 5rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ef-muted-fg); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: transparent; box-shadow: 0 0 0 2px var(--ef-ring); }
.label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; }
.hint { font-size: .75rem; color: var(--ef-muted-fg); margin-top: .25rem; }
.field + .field { margin-top: .875rem; }
.check { display: flex; align-items: center; gap: .625rem; padding: .625rem .75rem; border: 1px solid var(--ef-border); border-radius: var(--ef-radius); background: var(--ef-card); cursor: pointer; }
.check > input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--ef-primary); flex-shrink: 0; }
.check.done { background: var(--ef-success-muted); border-color: transparent; }

.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 9999px; padding: .125rem .625rem; font-size: .6875rem; font-weight: 500; border: 1px solid var(--ef-border); background: var(--ef-accent); color: var(--ef-accent-fg); white-space: nowrap; }
.badge-success { background: var(--ef-success-muted); color: var(--ef-success); border-color: transparent; }
.badge-warning { background: var(--ef-warning-muted); color: var(--ef-warning); border-color: transparent; }
.badge-destructive { background: var(--ef-destructive-muted); color: var(--ef-destructive); border-color: transparent; }
.badge-info { background: var(--ef-info-muted); color: var(--ef-info); border-color: transparent; }
.badge-muted { background: var(--ef-card-muted); color: var(--ef-muted-fg); border-color: transparent; }
.filter { border-radius: 9999px; padding: .25rem .75rem; font-size: .75rem; border: 1px solid var(--ef-border); background: var(--ef-card); color: var(--ef-muted-fg); transition: background .15s, color .15s; }
.filter:hover { background: var(--ef-accent); color: var(--ef-fg); }
.filter.active { background: var(--ef-primary); color: var(--ef-primary-fg); border-color: transparent; }
.alert-error { font-size: .875rem; color: var(--ef-destructive); }
.alert-success { font-size: .875rem; color: var(--ef-success); }
.progress { height: .375rem; width: 100%; overflow: hidden; border-radius: 9999px; background: var(--ef-accent); }
.progress > div { height: 100%; border-radius: 9999px; background: var(--ef-primary); transition: width .2s; }
.empty { padding: 2rem; text-align: center; color: var(--ef-muted-fg); font-size: .875rem; }
.empty-box { border: 1px dashed var(--ef-border); border-radius: var(--ef-radius); }

.table-wrap { overflow-x: auto; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); }
.table { width: 100%; border-collapse: collapse; }
.table thead { border-bottom: 1px solid var(--ef-border); background: var(--ef-card-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ef-muted-fg); }
.table td, .table th { padding: .75rem 1rem; text-align: left; font-size: .875rem; vertical-align: middle; }
.table th { font-weight: 500; font-size: .75rem; }
.table tbody tr { border-bottom: 1px solid var(--ef-border); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--ef-accent); }
.table tbody tr.clickable { cursor: pointer; }

.dialog-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / .6); padding: 1rem; }
.dialog { width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); box-shadow: 0 10px 40px rgb(0 0 0 / .2); padding: 1.25rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dialog-head h3 { font-size: 1.125rem; font-weight: 600; }
.dialog-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }

.help { position: relative; display: inline-flex; vertical-align: middle; }
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.125rem; height: 1.125rem; border-radius: 9999px; border: 1px solid var(--ef-border); background: var(--ef-card-muted); color: var(--ef-muted-fg); cursor: help; font-size: 10px; font-weight: 600; }
.help-btn:hover, .help-btn:focus-visible { outline: none; border-color: var(--ef-primary); color: var(--ef-primary); background: var(--ef-accent); }
.help-panel { position: fixed; z-index: 9999; width: max(220px, min(18rem, 80vw)); padding: .625rem .75rem; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); color: var(--ef-muted-fg); box-shadow: 0 8px 24px rgb(0 0 0 / .12); font-size: .75rem; line-height: 1.45; font-weight: 400; text-transform: none; letter-spacing: 0; }
.help-panel b { display: block; margin-bottom: .25rem; font-weight: 600; color: var(--ef-fg); }

.toast-wrap { position: fixed; z-index: 99; left: 50%; bottom: 5rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
@media (min-width: 1024px) { .toast-wrap { bottom: 1.5rem; } }
.toast { pointer-events: auto; background: var(--ef-fg); color: var(--ef-bg); padding: .6rem 1rem; border-radius: var(--ef-radius); font-size: .875rem; box-shadow: 0 8px 24px rgb(0 0 0 / .2); animation: toastin .2s ease-out; }
.toast.error { background: var(--ef-destructive); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

.stars { display: inline-flex; gap: 2px; }
.star { color: var(--ef-border); line-height: 0; }
.star.on { color: var(--ef-star); }
button.star:hover { color: var(--ef-primary); }
.star svg { width: 1rem; height: 1rem; fill: currentColor; stroke: currentColor; }

/* Blocos específicos */
.queue-group { border-radius: var(--ef-radius); border: 1px solid var(--ef-border); padding: 1rem; }
.queue-group.overdue { background: var(--ef-destructive-muted); border-color: color-mix(in srgb, var(--ef-destructive) 35%, transparent); }
.queue-group.today { background: var(--ef-success-muted); border-color: color-mix(in srgb, var(--ef-success) 30%, transparent); }
.queue-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; border-radius: calc(var(--ef-radius) - 2px); background: var(--ef-card-muted); border: 1px solid var(--ef-border); margin-top: .5rem; }
.queue-item:hover { border-color: var(--ef-primary); }
.step { display: flex; gap: .75rem; padding: .875rem; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); }
.step.done { background: var(--ef-success-muted); border-color: transparent; }
.step-num { display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 9999px; background: var(--ef-card-muted); font-size: .75rem; font-weight: 600; color: var(--ef-muted-fg); }
.step.done .step-num { background: var(--ef-primary); color: var(--ef-primary-fg); }
.quote-card { border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card-muted); padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.vision-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .vision-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vision-card { border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); overflow: hidden; display: flex; flex-direction: column; }
.vision-img { aspect-ratio: 4 / 3; background: var(--ef-card-muted) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ef-muted-fg); }
.vision-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.vision-thumbs .vision-img { border-radius: calc(var(--ef-radius) - 2px); }
.suggestion { border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); padding: .75rem; text-align: left; transition: border-color .15s, background .15s; width: 100%; }
.suggestion:hover { border-color: var(--ef-primary); background: var(--ef-accent); }
.lesson-item { display: flex; align-items: center; gap: .625rem; padding: .625rem .75rem; border-radius: calc(var(--ef-radius) - 2px); width: 100%; text-align: left; }
.lesson-item:hover { background: var(--ef-accent); }
.lesson-item.active { background: var(--ef-success-muted); }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--ef-radius); background: #000; }
.timeline { position: relative; }
.timeline-item { border-radius: calc(var(--ef-radius) - 2px); background: var(--ef-card-muted); padding: .625rem .75rem; }
.collapse-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; text-align: left; }
.chev { transition: transform .15s; }
.open > .collapse-head .chev { transform: rotate(180deg); }
.icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: .5rem; background: var(--ef-accent); color: var(--ef-primary); flex-shrink: 0; }
.next-steps { margin-top: 2rem; }

/* Rodapé */
.footer { margin-top: 2.5rem; border-top: 1px solid var(--ef-border); padding-top: 2rem; padding-bottom: 1.5rem; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: auto 1fr; align-items: center; } .footer-grid .right { text-align: right; } .footer-grid .social { justify-content: flex-end; } }
.footer .left { display: flex; justify-content: center; }
@media (min-width: 768px) { .footer .left { justify-content: flex-start; } }
.footer-logo { width: min(160px, 40vw); filter: brightness(0); opacity: .9; }
[data-theme="dark"] .footer-logo { filter: none; }
.footer .right { text-align: center; font-size: .875rem; color: var(--ef-muted-fg); }
.social { display: flex; justify-content: center; gap: .5rem; margin-top: .75rem; }
.social a { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 9999px; border: 1px solid var(--ef-border); color: var(--ef-muted-fg); transition: color .15s, border-color .15s, background .15s; }
.social a:hover { border-color: var(--ef-primary); color: var(--ef-primary); background: var(--ef-accent); }
.copyright { margin-top: 1.5rem; border-top: 1px solid var(--ef-border); padding-top: 1rem; text-align: center; font-size: .72rem; color: var(--ef-muted-fg); }

/* Telas públicas (login/cadastro) */
.auth-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ef-border); background: var(--ef-card); padding: .75rem 1rem; }
.auth-wrap { max-width: 28rem; margin: 2.5rem auto 0; padding: 0 1rem; }
.auth-card { padding: 1.5rem; }
@media (min-width: 640px) { .auth-card { padding: 2rem; } }
.loading { display: flex; align-items: center; justify-content: center; min-height: 40vh; color: var(--ef-muted-fg); gap: .5rem; }
.spin { animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
section[id] { scroll-margin-top: 5rem; }

.row > .input, .row > .select { flex: 1; min-width: 0; }
.check form.row { margin-top: .5rem; }
.collapse-head > div { min-width: 0; }

/* ===== Camada visual Recharge ===== */
body { font-size: 14.5px; }
::selection { background: var(--ef-primary); color: var(--ef-primary-fg); }
:focus-visible { outline: 2px solid var(--ef-ring); outline-offset: 2px; }
.big, .h2, .dialog-head h3, .brand-name, .stat .val { font-family: var(--ef-font-head); letter-spacing: -0.015em; }
.title { letter-spacing: -0.025em; }
.title { font-weight: 600; font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.12; }
.big, .stat .val { color: var(--ef-primary); font-weight: 600; }
[data-theme="light"] .big, [data-theme="light"] .stat .val { color: var(--ef-fg); }
.kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; letter-spacing: .12em; color: var(--ef-lime-dim); }
.lead { font-size: .9375rem; line-height: 1.65; }

.card { border-color: var(--ef-border); }
.card:hover { border-color: var(--ef-border-strong); }
.card, .card-muted, .quote-card, .step, .queue-group, .vision-card, .suggestion, .check, .table-wrap, .dialog { transition: border-color .15s ease; }

.btn { border-radius: 999px; font-weight: 600; transition: transform .12s ease, background .15s, border-color .15s, color .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { font-family: var(--ef-font-head); font-weight: 700; }
.btn-primary:hover:not(:disabled) { opacity: 1; background: var(--ef-primary-hover); }
.btn-outline { background: transparent; border-color: var(--ef-border-strong); }
.btn-outline:hover:not(:disabled) { background: transparent; border-color: var(--ef-primary); color: var(--ef-primary); }
[data-theme="light"] .btn-outline:hover:not(:disabled) { color: var(--ef-accent-fg); border-color: var(--ef-ring); }
.btn-secondary { background: var(--ef-accent); border-color: var(--ef-border); }
.btn-lg { padding: .75rem 1.5rem; }
.btn-group { border-radius: 999px; }
.filter { border-radius: 999px; padding: .35rem .85rem; }

.input, .select, .textarea { border-radius: 10px; border-color: var(--ef-border-strong); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { box-shadow: 0 0 0 2px var(--ef-ring); }

.topbar, .auth-top { background: color-mix(in srgb, var(--ef-bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bottomnav { background: color-mix(in srgb, var(--ef-bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand-mark { border-radius: 10px; border-color: var(--ef-border-strong); background: var(--ef-accent); color: var(--ef-primary); box-shadow: none; }
[data-theme="light"] .brand-mark { color: var(--ef-accent-fg); }
.nav-link { border-radius: 10px; padding: .55rem .625rem; }
.nav-link.active { box-shadow: inset 2px 0 0 var(--ef-primary); }

.icon-circle { border-radius: 10px; border: 1px solid var(--ef-border-strong); }
[data-theme="light"] .icon-circle { color: var(--ef-accent-fg); }
.progress { background: var(--ef-card-muted); }
.step.done, .check.done, .lesson-item.active { background: var(--ef-success-muted); border-color: var(--ef-border-strong); }
.table thead { background: transparent; letter-spacing: .1em; }
.table tbody tr:hover { background: var(--ef-accent); }
.dialog { border-color: var(--ef-border-strong); box-shadow: 0 20px 60px rgb(0 0 0 / .45); }
.sheet { background: var(--ef-bg); }
.toast { background: var(--ef-primary); color: var(--ef-primary-fg); font-weight: 600; border-radius: 999px; padding: .6rem 1.1rem; }

/* Cabeçalho de página com brilho suave, como o hero do site */
.content { position: relative; }
.content::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 320px; pointer-events: none; z-index: -1;
  background: radial-gradient(700px 280px at 20% 0%, color-mix(in srgb, var(--ef-primary) 9%, transparent), transparent 70%); }
.main { position: relative; z-index: 0; }
.auth-wrap { position: relative; }
.auth-wrap::before { content: ''; position: absolute; inset: -4rem -40vw auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--ef-primary) 10%, transparent), transparent 70%); }
.auth-card { border-radius: 22px; border-color: var(--ef-border-strong); }

.footer, .copyright { border-color: var(--ef-border); }
.social a:hover { color: var(--ef-primary); }
[data-theme="light"] .social a:hover { color: var(--ef-accent-fg); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* Vitrine da home */
.vitrine { display: block; position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--ef-border-strong); background: #06120a; transition: border-color .15s, transform .15s; }
.vitrine img { display: block; width: 100%; height: auto; aspect-ratio: 1024 / 434; object-fit: cover; object-position: left center; }
.vitrine:hover { border-color: var(--ef-primary); }
.vitrine:active { transform: scale(.995); }
@media (max-width: 560px) { .vitrine img { aspect-ratio: auto; height: 200px; } }

/* Agenda de eventos */
.event { display: flex; gap: 1rem; padding: 1.25rem; align-items: flex-start; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 4rem; height: 4.25rem; border-radius: 12px; border: 1px solid var(--ef-border-strong); background: var(--ef-accent); }
.event-date .d { font-family: var(--ef-font-head); font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--ef-primary); }
[data-theme="light"] .event-date .d { color: var(--ef-accent-fg); }
.event-date .m { margin-top: .25rem; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ef-muted-fg); }
.event.past { opacity: .7; }
.past-events > summary { cursor: pointer; list-style: none; }
.past-events > summary::-webkit-details-marker { display: none; }
@media (max-width: 480px) { .event { padding: 1rem; gap: .75rem; } .event-date { width: 3.25rem; height: 3.75rem; } }

/* Criativo do evento (lateral esquerda) */
.event.has-creative { padding: 0; gap: 0; overflow: hidden; align-items: stretch; }
.event.has-creative .event-body { padding: 1.25rem; }
.event-creative { position: relative; flex-shrink: 0; width: 13rem; min-height: 13rem; align-self: stretch; background: var(--ef-card-muted); border-right: 1px solid var(--ef-border); overflow: hidden; }
.event-creative img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-creative .event-date { position: absolute; left: .75rem; top: .75rem; width: 3.25rem; height: 3.5rem; background: color-mix(in srgb, var(--ef-bg) 82%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.event-creative .event-date .d { font-size: 1.25rem; }
.event-creative.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--ef-muted-fg); font-size: .75rem; font-weight: 500; border: 0; border-right: 1px dashed var(--ef-border-strong); cursor: pointer; transition: color .15s, background .15s; }
.event-creative.empty:hover { color: var(--ef-primary); background: var(--ef-accent); }
.event-creative-preview { aspect-ratio: 1 / 1; max-width: 14rem; border-radius: 12px; border: 1px dashed var(--ef-border-strong); background: var(--ef-card-muted) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ef-muted-fg); }
@media (max-width: 600px) {
  .event.has-creative { flex-direction: column; }
  .event-creative { width: 100%; min-height: 0; aspect-ratio: 1 / 1; border-right: 0; border-bottom: 1px solid var(--ef-border); }
  .event-creative.empty { aspect-ratio: auto; height: 6rem; border-right: 0; border-bottom: 1px dashed var(--ef-border-strong); }
}

/* Símbolo Enerzee no cabeçalho */
.brand-symbol { width: 1.5rem; height: 1.5rem; }
[data-theme="light"] .bottomnav a.active { color: var(--ef-accent-fg); }
[data-theme="light"] .bottomnav a.active { background: var(--ef-sidebar-accent); }

/* Card de dica (fila de follow-ups) */
.tip-card { display: flex; align-items: center; gap: 1rem; border-style: dashed; border-color: var(--ef-border-strong); background: var(--ef-accent); }
.tip-card .icon-circle { width: 2.5rem; height: 2.5rem; }
@media (max-width: 600px) { .tip-card { flex-direction: column; align-items: flex-start; } .tip-card .btn { width: 100%; } }

/* Botões de atendimento no rodapé */
.support-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .875rem; }
@media (min-width: 768px) { .support-actions { justify-content: flex-end; } }

/* Metas da semana e do mês */
.goal-bars { display: grid; gap: .5rem; }
.goal-bar .progress { margin-top: .25rem; }

/* ===== Ambiente admin ===== */
:root, [data-theme="dark"] { --ef-chart: #c6f135; }
[data-theme="light"] { --ef-chart: #6b8f12; }
.admin-badge { margin-left: .25rem; vertical-align: middle; font-family: Inter, sans-serif; letter-spacing: .04em; background: var(--ef-primary); color: var(--ef-primary-fg); border-color: transparent; }
.admin-content { max-width: 80rem; }
.seg { display: flex; flex-wrap: wrap; gap: .375rem; }
.kpi .val { font-size: 1.75rem; }
.delta { display: inline-flex; align-items: center; gap: .25rem; margin-top: .25rem; font-size: .75rem; font-weight: 600; }
.delta.up { color: var(--ef-success); } .delta.down { color: var(--ef-destructive); } .delta.muted { font-weight: 500; }
@media (min-width: 1024px) { .lg-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--ef-border); stroke-width: 1; }
.chart .axis { stroke: var(--ef-border-strong); stroke-width: 1; }
.chart .tick { fill: var(--ef-muted-fg); font-size: 11px; font-family: Inter, sans-serif; }
.chart .bar { fill: var(--ef-chart); transition: opacity .12s; }
.chart .hit { fill: transparent; }
.chart .col.on .hit { fill: var(--ef-accent); }
.chart:hover .col:not(.on) .bar { opacity: .55; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: var(--ef-card); border: 1px solid var(--ef-border-strong); border-radius: 10px; padding: .4rem .6rem; font-size: .75rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 8px 24px rgb(0 0 0 / .25); }
.chart-tip b { font-size: .9rem; } .chart-tip span { color: var(--ef-muted-fg); }
.funnel { display: grid; gap: .875rem; }
.funnel-track { height: .5rem; border-radius: 999px; background: var(--ef-card-muted); overflow: hidden; margin-top: .3rem; }
.funnel-track > div { height: 100%; border-radius: 999px; background: var(--ef-chart); min-width: 2px; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table th { white-space: nowrap; }
.admin-table tfoot td { border-top: 1px solid var(--ef-border-strong); padding: .75rem 1rem; font-size: .875rem; }
.th-sort { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.th-sort:hover { color: var(--ef-fg); }
.admin-table td:first-child, .admin-table th:first-child { position: sticky; left: 0; background: var(--ef-card); z-index: 1; }
.admin-table td:first-child p.medium { white-space: nowrap; }
.admin-table td:nth-child(2) { white-space: nowrap; }

/* Admin · listas e controles */
.lesson-admin { display: flex; align-items: center; gap: .5rem; padding: .625rem .5rem; border-top: 1px solid var(--ef-border); }
.lesson-admin:first-child { border-top: 0; }
.lesson-admin.inactive .grow, .content-row.inactive .grow { opacity: .55; }
.lesson-admin .xs svg.i-sm { width: .75rem; height: .75rem; vertical-align: -1px; }
.content-row { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; }
.content-row .badge { display: inline-flex; }
@media (max-width: 640px) { .content-row, .lesson-admin { flex-wrap: wrap; } .content-row > .row { width: 100%; justify-content: flex-end; } }
.setting-row { display: flex; align-items: center; gap: 1rem; padding: .875rem 0; border-top: 1px solid var(--ef-border); cursor: pointer; }
.setting-row:first-of-type { border-top: 0; }
.switch { position: relative; flex-shrink: 0; width: 2.75rem; height: 1.5rem; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ef-card-muted); border: 1px solid var(--ef-border-strong); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--ef-muted-fg); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--ef-primary); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(1.25rem); background: var(--ef-primary-fg); }
.switch input:focus-visible + span { outline: 2px solid var(--ef-ring); outline-offset: 2px; }
.switch input:disabled + span { opacity: .6; }
.btn:disabled.btn-icon { opacity: .3; }
.filter.active .muted { color: inherit; opacity: .7; }
[hidden] { display: none !important; }

/* Importar da agenda */
.howto { border-top: 1px solid var(--ef-border); padding: .75rem 0 0; margin-top: .75rem; }
.howto > summary { cursor: pointer; font-size: .875rem; }
.howto ol { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .375rem; }
.howto p { margin-top: .5rem; }
.import-list { display: grid; gap: .375rem; max-height: 50vh; overflow-y: auto; padding-right: .25rem; }
.wa-pick { display: grid; gap: .375rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ef-border); }

/* Envio de mensagens: rolagem interna, mesma altura da Gamificação */
.msg-card { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.msg-scroll { overflow-y: auto; overscroll-behavior: contain; max-height: 16rem; -webkit-mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); padding-bottom: 1rem; padding-right: .25rem; scrollbar-width: thin; scrollbar-color: var(--ef-border-strong) transparent; }
.msg-scroll:focus-visible { outline: 2px solid var(--ef-ring); outline-offset: 2px; border-radius: 10px; }
@media (min-width: 1024px) {
  /* a altura da linha vem da Gamificação; a lista de mensagens ocupa o espaço que sobrar e rola */
  .msg-scroll { flex: 1 1 0; height: 0; min-height: 12rem; max-height: none; }
}

/* Dados de UC */
.chart .line { fill: none; stroke: var(--ef-chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--ef-border-strong); stroke-width: 1; }
.chart .dot { fill: var(--ef-chart); stroke: var(--ef-card); stroke-width: 2; }
.chart .tick.lbl { fill: var(--ef-fg); font-size: 12px; }
.chart .tick.val { fill: var(--ef-muted-fg); font-variant-numeric: tabular-nums; }
.chart .cross, .chart .dot { opacity: 0; transition: opacity .1s; }
.chart:hover .cross, .chart:hover .dot { opacity: 1; }
.goal-sum { font-family: var(--ef-font-head); font-size: 1.25rem; font-weight: 600; margin-top: .125rem; }
.week-dots { display: flex; flex-wrap: wrap; gap: .25rem; }
.week-dot { font-size: .6875rem; font-weight: 600; padding: .125rem .5rem; border-radius: 999px; border: 1px dashed var(--ef-border-strong); color: var(--ef-muted-fg); }
.week-dot.on { border-style: solid; background: var(--ef-accent); color: var(--ef-accent-fg); }
.week-dot.now { outline: 2px solid var(--ef-ring); outline-offset: 1px; }

/* Compromisso ligado à meta semanal */
.week-link { margin-top: 1rem; padding: .875rem 1rem; border-radius: 12px; border: 1px solid var(--ef-border-strong); background: var(--ef-accent); }
.week-link.empty { border-style: dashed; background: transparent; }
.week-link-rows { display: grid; gap: .375rem; margin-top: .5rem; }
.week-link-row { display: grid; grid-template-columns: minmax(6.5rem, 1fr) auto auto minmax(5.5rem, auto); align-items: center; gap: .75rem; padding: .375rem 0; border-top: 1px solid var(--ef-border); }
.week-link-row:first-child { border-top: 0; }
.week-link-row > :last-child { text-align: right; }
@media (max-width: 520px) { .week-link-row { grid-template-columns: 1fr auto; } .week-link-row > :nth-child(2) { grid-column: 1; grid-row: 2; } .week-link-row > :last-child { grid-row: 2; } }
.sug-hint { display: block; margin-top: .25rem; font-size: .6875rem; color: var(--ef-muted-fg); }
.sug-hint b { color: var(--ef-fg); }

/* Material de Apoio */
.mat-group + .mat-group { margin-top: 1.75rem; }
.mat-card { display: flex; gap: 1rem; padding: 1rem 1.125rem; align-items: flex-start; }
.mat-type { flex-shrink: 0; width: 3rem; height: 3.5rem; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .625rem; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--ef-border-strong); background: var(--ef-accent); color: var(--ef-accent-fg); }
.mat-type.sm { width: 2.25rem; height: 2.5rem; font-size: .5625rem; }
.mat-type.pdf { background: color-mix(in srgb, #f87171 16%, transparent); color: #fca5a5; border-color: color-mix(in srgb, #f87171 35%, transparent); }
.mat-type.video { background: var(--ef-info-muted); color: var(--ef-info); border-color: color-mix(in srgb, var(--ef-info) 35%, transparent); }
.mat-type.img { background: var(--ef-warning-muted); color: var(--ef-warning); border-color: color-mix(in srgb, var(--ef-warning) 35%, transparent); }
[data-theme="light"] .mat-type.pdf { color: #b91c1c; }
.drop { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1.25rem; border: 1px dashed var(--ef-border-strong); border-radius: 12px; cursor: pointer; color: var(--ef-muted-fg); font-size: .875rem; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--ef-primary); background: var(--ef-accent); color: var(--ef-fg); }

/* ===== Rede unilevel ===== */
.uni { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.uni > * { min-width: 0; }
.uni-search { position: relative; width: 20rem; max-width: 100%; }
.uni-results { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: var(--ef-card); border: 1px solid var(--ef-border-strong); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .25); max-height: 20rem; overflow-y: auto; padding: .25rem; }
.uni-hit { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; width: 100%; text-align: left; padding: .5rem .625rem; border-radius: 8px; }
.uni-hit:hover, .uni-hit:focus-visible { background: var(--ef-accent); outline: none; }
.uni-hit .xs { width: 100%; }
.uni-path { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .8125rem; }
.uni-path:empty { display: none; }
.uni-path .sep { color: var(--ef-muted-fg); }
.uni-path [aria-current] { font-weight: 600; }
.uni-bar { display: grid; grid-template-columns: 2.75rem minmax(6rem, 1fr); align-items: center; gap: .5rem; min-width: 10rem; }
.uni-bar b { font-variant-numeric: tabular-nums; font-size: .8125rem; text-align: right; }
.uni-track { height: .5rem; border-radius: 999px; background: var(--ef-card-muted); overflow: hidden; }
.uni-track i { display: block; height: 100%; border-radius: 999px; background: var(--ef-chart); min-width: 2px; }
.uni-tree { margin-top: .75rem; }
.uni-node { --indent: 1.25rem; }
.uni-row { display: grid; grid-template-columns: 1.75rem 2.25rem minmax(10rem, 1fr) auto 2rem; align-items: center; gap: .625rem; padding: .625rem .5rem .625rem calc(var(--lvl) * var(--indent) + .25rem); border-top: 1px solid var(--ef-border); position: relative; transition: background .15s; }
.uni-tree > .uni-node:first-child > .uni-row { border-top: 0; }
.uni-row:hover { background: color-mix(in srgb, var(--ef-accent) 60%, transparent); }
.uni-row::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--lvl) * var(--indent) - .375rem); border-left: 1px dashed var(--ef-border-strong); display: var(--guide, block); }
.uni-node[style*="--lvl:0"] > .uni-row::before { display: none; }
.uni-toggle { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; color: var(--ef-muted-fg); border: 1px solid var(--ef-border); background: var(--ef-card); transition: transform .15s, color .15s, border-color .15s; }
.uni-toggle:hover, .uni-toggle:focus-visible { color: var(--ef-primary); border-color: var(--ef-primary); outline: none; }
.uni-toggle.empty { border: 0; background: none; }
.uni-node[aria-expanded="true"] > .uni-row .uni-toggle { transform: rotate(90deg); color: var(--ef-primary); }
.uni-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ef-accent); color: var(--ef-accent-fg); font-size: .75rem; font-weight: 700; border: 1px solid var(--ef-border-strong); }
.uni-who { min-width: 0; }
.uni-who .medium { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.uni-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.uni-metrics { display: grid; grid-template-columns: repeat(6, minmax(3.5rem, auto)); gap: .25rem .75rem; margin: 0; text-align: right; }
.uni-metrics dt { font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ef-muted-fg); white-space: nowrap; }
.uni-metrics dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .875rem; white-space: nowrap; }
.uni-metrics dd small { font-weight: 400; color: var(--ef-muted-fg); font-size: .6875rem; }
.uni-focus { width: 2rem; }
.uni-more { margin: .5rem 0 .5rem calc(var(--lvl) * 1.25rem + 2.5rem); }
.uni-empty, .uni-loading { padding: .75rem .5rem; }
.uni-hl > .uni-row { background: var(--ef-accent); box-shadow: inset 3px 0 0 var(--ef-primary); }
@media (max-width: 900px) {
  .uni-row { grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr) 2rem; }
  .uni-metrics { grid-column: 3 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: left; }
  .uni-node { --indent: .75rem; }
  .uni-focus { grid-row: 1; grid-column: 4; }
}

/* ===== Meus diretos ===== */
.dir-list { display: grid; gap: .75rem; }
@media (min-width: 1100px) { .dir-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dir-card { border: 1px solid var(--ef-border); border-radius: 14px; background: var(--ef-card-muted); padding: 1rem; display: grid; gap: .75rem; align-content: start; }
.dir-card.off { opacity: .7; }
.dir-head { display: flex; align-items: center; gap: .75rem; }
.dir-name { display: flex; align-items: center; gap: .375rem; min-width: 0; }
.dir-name .truncate { min-width: 0; }
.dir-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem .75rem; margin: 0; padding-top: .75rem; border-top: 1px solid var(--ef-border); }
.dir-metrics dt { font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ef-muted-fg); }
.dir-metrics dd { margin: .125rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dir-metrics dd small { font-weight: 400; color: var(--ef-muted-fg); font-size: .6875rem; }
@media (max-width: 520px) { .dir-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dir-head { flex-wrap: wrap; } .dir-head .grow { flex-basis: calc(100% - 3.25rem); } .dir-head .btn { margin-left: 3rem; } .dir-name .truncate { white-space: normal; } }
/* Rede por nível: 7 níveis visíveis, rolagem interna, cabeçalho e total fixos */
.uni-levels.scrolls { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ef-border-strong) transparent; }
.uni-levels thead th { position: sticky; top: 0; z-index: 2; background: var(--ef-card); }
.uni-levels tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--ef-card); box-shadow: 0 -1px 0 var(--ef-border-strong); }
.uni-levels thead th:first-child, .uni-levels tfoot td:first-child { z-index: 3; }
.dir-visits { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; }
.dir-visits > .xs { display: inline-flex; align-items: center; gap: .25rem; margin-right: .25rem; }
.dir-visit { font-size: .75rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--ef-border); color: var(--ef-muted-fg); }
.dir-visit b { font-variant-numeric: tabular-nums; color: var(--ef-fg); }
.dir-visit.on { border-color: var(--ef-border-strong); background: var(--ef-accent); }
.dir-visit.on b { color: var(--ef-primary); }
[data-theme="light"] .dir-visit.on b { color: var(--ef-accent-fg); }
.dialog-foot { flex-wrap: wrap; }

/* Card "Próximo follow-up" clicável (abre a edição de data e estágio) */
.fu-edit { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.fu-edit:hover, .fu-edit:focus-visible { border-color: var(--ef-primary); }
.fu-edit-hint { display: inline-flex; align-items: center; gap: .25rem; color: var(--ef-primary); font-weight: 500; }

/* Status do contato editável (badge com select nativo por cima) */
.status-pick { position: relative; cursor: pointer; padding-right: .375rem; transition: box-shadow .15s; }
.status-pick:hover, .status-pick:focus-within { box-shadow: 0 0 0 2px var(--ef-primary); }
.status-pick select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; outline: none; }
.status-pick select option { color: var(--ef-fg); background: var(--ef-card); }
.status-pick .i-sm { width: .8rem; height: .8rem; pointer-events: none; }

/* PWA: convite "Instalar o app" */
.install-banner { position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .75rem; padding: .75rem .75rem .75rem .875rem; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); animation: ib-in .25s ease-out; }
.install-banner img { border-radius: .625rem; flex: none; }
.install-banner .i-sm { vertical-align: -2px; }
@media (min-width: 1024px) { .install-banner { left: auto; right: 1.5rem; bottom: 1.5rem; width: 24rem; } }
@keyframes ib-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .install-banner { animation: none; } }
.install-banner .grow { flex: 1 1 auto; min-width: 0; }
.install-banner .grow p { white-space: normal; overflow-wrap: anywhere; }
.install-banner .btn { flex: none; }

/* App instalado (PWA): menu em ícones, tela cheia */
.launcher { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--ef-bg); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); overflow-y: auto; animation: launcher-in .18s ease-out; }
.launcher.closing { animation: launcher-out .15s ease-in forwards; }
.launcher-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--ef-border); position: sticky; top: 0; background: var(--ef-bg); z-index: 1; }
.launcher-body { flex: 1; width: 100%; max-width: 34rem; margin: 0 auto; padding: 1.25rem 1rem 1.5rem; display: flex; flex-direction: column; }
.launcher-hello { color: var(--ef-muted-fg); font-size: .9375rem; margin: 0 0 1.25rem; }
.launcher-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem .75rem; }
@media (min-width: 480px) { .launcher-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.launcher-tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none; color: var(--ef-fg); border-radius: 1rem; padding: .375rem .25rem; -webkit-tap-highlight-color: transparent; }
.launcher-tile:focus-visible { outline: 2px solid var(--ef-primary); outline-offset: 2px; }
.launcher-icon { width: 4rem; height: 4rem; border-radius: 1.125rem; display: grid; place-items: center; color: #c6f135; background: radial-gradient(circle at 30% 20%, #1a4024, #060d08 78%); border: 1px solid rgba(198, 241, 53, .14); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transition: transform .12s ease, box-shadow .12s ease; }
.launcher-icon .i { width: 1.75rem; height: 1.75rem; }
.launcher-tile:hover .launcher-icon { transform: translateY(-2px); }
.launcher-tile:active .launcher-icon { transform: scale(.94); }
.launcher-tile.active .launcher-icon { background: #c6f135; color: #08150a; border-color: #c6f135; }
.launcher-label { font-size: .75rem; font-weight: 500; line-height: 1.25; text-align: center; max-width: 6.5rem; }
.launcher-tile.active .launcher-label { color: var(--ef-fg); font-weight: 600; }
.launcher-foot { margin-top: auto; padding-top: 2rem; display: flex; justify-content: center; gap: .5rem; }
@keyframes launcher-in { from { opacity: 0; transform: scale(.98); } }
@keyframes launcher-out { to { opacity: 0; transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .launcher, .launcher.closing, .launcher-icon { animation: none; transition: none; } }
.launcher:focus { outline: none; }

/* Meu dia: atalhos rápidos (ícones quadrados) abaixo do checklist */
.quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .75rem .125rem; border-radius: var(--ef-radius); border: 1px solid var(--ef-border); background: var(--ef-card); color: var(--ef-fg); text-decoration: none; transition: border-color .15s, transform .12s; -webkit-tap-highlight-color: transparent; }
.quick-link:hover, .quick-link:focus-visible { border-color: var(--ef-primary); }
.quick-link:focus-visible { outline: 2px solid var(--ef-primary); outline-offset: 2px; }
.quick-link:active { transform: scale(.97); }
.quick-icon { flex: none; width: 3.25rem; height: 3.25rem; border-radius: .875rem; display: grid; place-items: center; color: #c6f135; background: radial-gradient(circle at 30% 20%, #1a4024, #060d08 78%); border: 1px solid rgba(198, 241, 53, .14); }
.quick-icon .i { width: 1.5rem; height: 1.5rem; }
.quick-label { font-size: .6875rem; font-weight: 500; line-height: 1.25; text-align: center; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .quick-links { gap: .75rem; } .quick-link { flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .875rem 1rem; } .quick-label { text-align: left; font-size: .875rem; } }
@media (prefers-reduced-motion: reduce) { .quick-link { transition: none; } }
.uni-tree-tools { flex-wrap: wrap; min-width: 0; max-width: 100%; }
/* Grupos de botões/filtros no cabeçalho dos cards quebram linha em telas estreitas (em vez de empurrar a página para o lado) */
.between > .row { flex-wrap: wrap; min-width: 0; }

/* Simulador de conta */
.sim { max-width: 40rem; }
.sim-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .375rem; min-height: 8.5rem; padding: 1.25rem; text-align: center; border: 1.5px dashed var(--ef-border-strong); border-radius: var(--ef-radius); background: var(--ef-card-muted); cursor: pointer; transition: border-color .15s, background .15s; }
.sim-drop .i { width: 1.75rem; height: 1.75rem; color: var(--ef-primary); }
.sim-drop span { font-weight: 500; overflow-wrap: anywhere; }
.sim-drop:hover, #sim-file:focus-visible + .sim-drop, .sim-drop.has-file { border-color: var(--ef-primary); }
.sim-drop.has-file { background: var(--ef-accent); }
.sim-drop:has(+ #sim-file:focus-visible) { outline: 2px solid var(--ef-primary); outline-offset: 2px; }
.btn-lg { min-height: 3rem; font-size: 1rem; }
.sim form .btn-lg { width: 100%; justify-content: center; }
.sim-status { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.sim-box { border-radius: var(--ef-radius); background: var(--ef-card-muted); border: 1px solid var(--ef-border); padding: 1rem 1.125rem; }
.sim-big { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--ef-accent-fg); letter-spacing: -.01em; }
.sim-big span { display: block; margin-top: .25rem; font-size: .9375rem; font-weight: 500; color: var(--ef-muted-fg); letter-spacing: 0; }
.sim-eco { margin-top: .375rem; }
.sim-facts { margin-top: .5rem; }
.sim-result.ok { border-color: color-mix(in srgb, var(--ef-success) 45%, var(--ef-border)); }
.sim-rules td { vertical-align: middle; } .sim-rules .input, .sim-rules .select { min-width: 4.5rem; }
.sim-rules td:first-child .input { min-width: 10rem; }

/* Campanha 7x7: card da jornada no Meu dia */
[data-jornada]:empty { display: none; }
.j7 { border-color: color-mix(in srgb, var(--ef-primary) 35%, var(--ef-border)); background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--ef-primary) 9%, transparent), transparent 60%), var(--ef-card); }
.j7-prize { display: flex; gap: .5rem; align-items: flex-start; } .j7-prize .i { flex: none; margin-top: .15rem; color: var(--ef-primary); }
.j7-goals { gap: .75rem; }
.j7-list { list-style: none; margin: .625rem 0 0; padding: 0; display: grid; gap: .625rem; }
.j7-goal .progress { margin-top: .3rem; }
.j7-regs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.j7-regs li { display: flex; align-items: center; gap: .75rem; padding: .625rem .75rem; border-radius: 12px; border: 1px solid var(--ef-border); background: var(--ef-card-muted); }
.j7-n { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--ef-primary); color: var(--ef-primary-fg); font-size: .75rem; font-weight: 700; }

/* ===== Campanha 7x7 · card "Grande Prêmio": cockpit de F1 com as cores do Hub (fontes/variáveis só dentro do card) ===== */
.gp {
  --f1-glow: 0 0 18px color-mix(in srgb, var(--ef-primary) 45%, transparent);
  --f1-line: color-mix(in srgb, var(--ef-primary) 22%, transparent);
  --f1-line-strong: color-mix(in srgb, var(--ef-primary) 55%, transparent);
  --f1-font-hud: "Orbitron", "Space Grotesk", sans-serif;
}
[data-theme="light"] .gp { --f1-line: color-mix(in srgb, var(--ef-accent-fg) 20%, transparent); --f1-line-strong: color-mix(in srgb, var(--ef-accent-fg) 50%, transparent); }

.gp { border-color: var(--f1-line-strong); }
.gp-wheel { position: relative; display: block; width: 100%; text-align: left; font: inherit; color: var(--ef-fg); cursor: pointer; padding: 1rem 1rem 1.125rem; border: 1px solid var(--f1-line-strong);
  border-radius: 26px 26px 40px 40px / 26px 26px 52px 52px; overflow: hidden;
  background: radial-gradient(100% 70% at 50% 0%, color-mix(in srgb, var(--ef-primary) 14%, transparent), transparent 60%), linear-gradient(180deg, color-mix(in srgb, var(--ef-card) 94%, #000), color-mix(in srgb, var(--ef-bg) 92%, #000));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ef-primary) 30%, transparent), 0 18px 40px -20px color-mix(in srgb, var(--ef-primary) 55%, transparent); transition: transform .12s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.gp-wheel::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); } /* linhas de varredura */
.gp-wheel:hover { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ef-primary) 45%, transparent), 0 20px 46px -16px color-mix(in srgb, var(--ef-primary) 70%, transparent); }
.gp-wheel:active { transform: scale(.995); }
.gp-wheel:focus-visible { outline: 2px solid var(--ef-primary); outline-offset: 3px; }
[data-theme="light"] .gp-wheel { color: #f4f7ef; background: radial-gradient(100% 70% at 50% 0%, rgba(198,241,53,.16), transparent 60%), linear-gradient(180deg, #10200f, #060d08); }

/* luzes de troca de marcha em tons institucionais: verde → lima → branco incandescente */
.gp-leds { position: relative; display: flex; justify-content: center; gap: 5px; margin-bottom: .75rem; }
.gp-led { width: 24px; height: 8px; transform: skewX(-20deg); border-radius: 2px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.gp-led.on.g { background: #3fae3f; box-shadow: 0 0 10px #3fae3f; }
.gp-led.on.r { background: #c6f135; box-shadow: 0 0 12px #c6f135; }
.gp-led.on.p { background: #f4ffd6; box-shadow: 0 0 14px #e8ff9a, 0 0 4px #fff; }
.gp-wheel.full .gp-led.on { animation: gp-blink .5s steps(2) infinite; }

.gp-screen { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; padding: .75rem .875rem; border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.35)); border: 1px solid color-mix(in srgb, #c6f135 22%, transparent); box-shadow: inset 0 0 24px rgba(198,241,53,.06); }
.gp-cell { display: flex; flex-direction: column; gap: .125rem; }
.gp-cell.r { text-align: right; align-items: flex-end; }
.gp-cell b { font-family: var(--f1-font-hud); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; color: #f4f7ef; }
.gp-cell small { font-family: var(--f1-font-hud); font-size: .5rem; letter-spacing: .2em; color: #9fb3a0; text-transform: uppercase; font-weight: 600; }
.gp-gear { text-align: center; line-height: 1; }
.gp-gear b { display: block; font-family: var(--f1-font-hud); font-size: 3.25rem; font-weight: 900; color: #c6f135; text-shadow: 0 0 22px rgba(198, 241, 53, .65), 0 0 2px #fff; font-variant-numeric: tabular-nums; }
.gp-gear small { font-family: var(--f1-font-hud); font-size: .5rem; letter-spacing: .22em; color: #c6f135; opacity: .8; font-weight: 600; text-transform: uppercase; }
.gp-ok { color: #c6f135 !important; } .gp-late { color: #fbbf24 !important; }
.gp-grips { position: absolute; top: 34%; width: 10px; height: 44%; border-radius: 6px; background: repeating-linear-gradient(180deg, rgba(198,241,53,.18) 0 2px, transparent 2px 6px); }
.gp-grips.l { left: 4px; } .gp-grips.r { right: 4px; }

/* pista holográfica */
.gp-track { --carw: clamp(104px, 15%, 150px); position: relative; display: block; margin-top: .875rem; height: clamp(72px, 8vw, 92px); border-radius: 8px; overflow: hidden;
  background: linear-gradient(180deg, rgba(198,241,53,.05), transparent 40%, transparent 60%, rgba(198,241,53,.05)), linear-gradient(90deg, rgba(198,241,53,.07) 1px, transparent 1px) 0 0 / 22px 100%, #050906;
  border: 1px solid rgba(198,241,53,.14); perspective: 400px; }
.gp-track::before, .gp-track::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, rgba(198,241,53,.15), #c6f135 var(--p), rgba(198,241,53,.15) var(--p)); box-shadow: 0 0 10px rgba(198,241,53,.5); }
.gp-track::before { top: 8px; } .gp-track::after { bottom: 8px; }
.gp-lane { position: absolute; left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, rgba(198,241,53,.35) 0 10px, transparent 10px 22px); }
.gp-sector { position: absolute; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, transparent, rgba(198,241,53,.25), transparent); }
.gp-sector span { position: absolute; top: 2px; left: 5px; font-family: var(--f1-font-hud); font-size: .5rem; font-weight: 600; letter-spacing: .12em; color: rgba(244,247,239,.4); }
.gp-sector.done span { color: #c6f135; text-shadow: 0 0 6px rgba(198,241,53,.7); }
.gp-start { position: absolute; top: 10px; bottom: 10px; left: 8px; width: 2px; background: #c6f135; box-shadow: 0 0 8px #c6f135; opacity: .6; }
.gp-finish { position: absolute; top: 10px; bottom: 10px; right: 0; width: 16px; background: conic-gradient(#c6f135 25%, transparent 0 50%, #c6f135 0 75%, transparent 0) 0 0 / 8px 8px; opacity: .75; filter: drop-shadow(0 0 4px rgba(198,241,53,.6)); }
.gp-car { position: absolute; top: 54%; width: var(--carw); transform: translate(-100%, -50%); filter: drop-shadow(0 8px 6px rgba(0,0,0,.75)); }
.gp-track.anim .gp-car { animation: gp-drive 1.7s cubic-bezier(.3, .9, .3, 1) both; }
.gp-car svg { display: block; width: 100%; height: auto; overflow: visible; }
.gp-trail { position: absolute; top: 50%; left: 0; width: max(0px, calc(var(--p) - var(--carw) * .92)); height: 18px; transform: translateY(-50%); background: linear-gradient(90deg, transparent 10%, rgba(198,241,53,.45)); -webkit-mask: repeating-linear-gradient(180deg, #000 0 2px, transparent 2px 5px); mask: repeating-linear-gradient(180deg, #000 0 2px, transparent 2px 5px); }
.gp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .625rem; font-family: var(--f1-font-hud); font-size: .5625rem; letter-spacing: .18em; text-transform: uppercase; color: #9fb3a0; }
.gp-foot .gp-more { color: #c6f135; font-weight: 700; display: inline-flex; align-items: center; gap: .125rem; text-shadow: 0 0 8px rgba(198,241,53,.5); }

/* bandeiras de ritmo (institucional: lima = ok, âmbar = atenção) */
.gp-flag { display: flex; align-items: center; gap: .5rem; font-family: var(--f1-font-hud); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .625rem; padding: .625rem .75rem; border-radius: 3px; }
.gp-flag.green { background: var(--ef-success-muted); color: var(--ef-success); box-shadow: inset 2px 0 0 var(--ef-success); }
.gp-flag.yellow { background: var(--ef-warning-muted); color: var(--ef-warning); box-shadow: inset 2px 0 0 var(--ef-warning); }

/* telemetria das metas: conta-giros com néon */
.gp-tele { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: .625rem; margin-top: .625rem; }
.gp-gauge { text-align: center; }
.gp-gauge svg { width: 100%; max-width: 84px; height: auto; aspect-ratio: 84 / 50; display: block; margin: 0 auto; overflow: visible; }
.gp-gauge svg path:last-child { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--ef-primary) 70%, transparent)); }
.gp-gauge .val { font-family: var(--f1-font-hud); font-size: .9375rem; font-weight: 700; margin-top: -1.25rem; font-variant-numeric: tabular-nums; }
.gp-gauge .val small { font-size: .625rem; color: var(--ef-muted-fg); font-weight: 600; }
.gp-gauge .lbl { font-family: var(--f1-font-hud); font-size: .5rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ef-muted-fg); font-weight: 600; margin-top: .25rem; }
.gp-gauge.ok .val { color: var(--ef-accent-fg); }
.gp-podium { display: flex; gap: .625rem; align-items: flex-start; padding: .625rem .75rem; border-radius: 3px; background: linear-gradient(90deg, var(--ef-accent), transparent); box-shadow: inset 2px 0 0 var(--ef-primary); }
.gp-podium .i { color: var(--ef-accent-fg); flex: none; margin-top: .125rem; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ef-primary) 60%, transparent)); }
.gp .card-muted .medium { font-family: var(--f1-font-hud); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

@keyframes gp-drive { from { left: 0; } }
@keyframes gp-blink { 50% { opacity: .35; } }
@keyframes f1-scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .gp-track.anim .gp-car, .gp-wheel.full .gp-led.on, .topbar::after, .auth-top::after { animation: none; } }
/* rodas girando e luz traseira */
.gp-rim { transform-box: fill-box; transform-origin: center; animation: gp-spin .6s linear infinite; }
.gp-car { filter: drop-shadow(0 0 6px rgba(198,241,53,.35)); }
@keyframes gp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gp-rim { animation: none; } }

/* Dados de UC: filtros de concessionária e município (ANEEL) */
.uc-aneel { padding-top: .75rem; border-top: 1px dashed var(--ef-border); }
.uc-search { position: relative; }
.uc-results { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(26rem, 100%); max-height: 18rem; overflow: auto; background: var(--ef-card); border: 1px solid var(--ef-border-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); padding: .25rem; }
.uc-hit { display: flex; flex-direction: column; align-items: flex-start; gap: .125rem; width: 100%; text-align: left; padding: .5rem .625rem; border-radius: 8px; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.uc-hit:hover, .uc-hit:focus-visible { background: var(--ef-accent); outline: none; }
.uc-off { opacity: .4; pointer-events: none; }
.uc-note { display: flex; gap: .375rem; align-items: flex-start; }
.uc-note .i { flex: none; margin-top: .15rem; }
[data-unpick] .i { width: .75rem; height: .75rem; }
.select:disabled, .input:disabled { opacity: .5; cursor: not-allowed; }
/* Dados de UC: resumo cativo × livre e colunas agrupadas */
.uc-mix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; margin-top: .875rem; }
.uc-mix-item { padding: .625rem .75rem; border-radius: 10px; border: 1px solid var(--ef-border); background: var(--ef-card-muted); }
.uc-mix-item.liv { border-color: color-mix(in srgb, var(--ef-primary) 40%, var(--ef-border)); }
.uc-split .uc-grp { text-align: center; border-bottom: 1px solid var(--ef-border); }

/* ===== App instalado e telas de qualquer tamanho =====
   - altura real da tela (dvh) em vez de vh, que no celular inclui a barra do navegador;
   - campos com 16px em telas de toque: abaixo disso o iPhone dá zoom ao tocar e o app "estoura" a tela;
   - margens do entalhe (notch) e dos cantos arredondados, inclusive com o celular deitado;
   - nada rola para o lado. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; max-width: 100%; }
.shell { min-height: 100vh; min-height: 100dvh; }
@media (min-width: 1024px) { .sidebar { height: 100vh; height: 100dvh; } }
.dialog { max-height: 90vh; max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.dialog-overlay { padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.sheet { height: 100vh; height: 100dvh; padding-top: env(safe-area-inset-top); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); }
.topbar { padding-top: max(.75rem, env(safe-area-inset-top)); padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.content { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.bottomnav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
img, svg, video { max-width: 100%; }
@media (pointer: coarse), (max-width: 767px) {
  .input, .select, .textarea, input[type="search"], input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="tel"], input[type="date"], input[type="datetime-local"] { font-size: 16px; }
}
/* celular deitado: menos altura, então barra de baixo e topo mais baixos */
@media (orientation: landscape) and (max-height: 500px) {
  .topbar { padding-top: max(.375rem, env(safe-area-inset-top)); padding-bottom: .375rem; }
  .bottomnav a { flex-direction: row; justify-content: center; gap: .375rem; padding: .375rem .25rem; }
  .content { padding-bottom: 4rem; }
  .launcher-body { max-width: 56rem; padding-top: .75rem; }
  .launcher-hello { margin-bottom: .75rem; }
  .launcher-grid { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .75rem .5rem; }
  .launcher-foot { padding-top: 1rem; }
  .launcher-icon { width: 3.25rem; height: 3.25rem; }
}
/* aviso de versão nova (usa o mesmo cartão do "Instale o app") */
.update-banner { z-index: 65; border-color: color-mix(in srgb, var(--ef-primary) 55%, var(--ef-border)); }
.update-icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: .75rem; display: grid; place-items: center; background: var(--ef-accent); color: var(--ef-accent-fg); }
