/* ==========================================================================
   Investing Solar — design system
   1. Tokens   2. Base   3. Componentes   4. Shell (sidebar/topbar)
   5. Páginas do painel   6. Autenticação   7. Página inicial   8. Movimento
   Carregado depois do Bootstrap 5.3.3 e do Font Awesome 5.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --border: #e6e8ee;
  --border-strong: #d5d9e1;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #7c8799;

  --navy-950: #060f1c;
  --navy-900: #0a1628;
  --navy-800: #112038;
  --navy-700: #1b2e4b;

  --primary: #f2b30a;
  --primary-hover: #dca007;
  --primary-soft: #fff7df;
  --primary-ink: #1a1405;
  --primary-text: #8a5d00;
  --grad-brand: linear-gradient(135deg, #f7c93a, #f2a50a);

  --success: #15803d;  --success-soft: #ecfdf3;
  --warning: #b45309;  --warning-soft: #fffbeb;
  --danger:  #b91c1c;  --danger-soft:  #fef2f2;
  --info:    #1d4ed8;  --info-soft:    #eff6ff;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.75rem;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 32px -8px rgba(10, 22, 40, .18);
  --shadow-lg: 0 24px 60px -12px rgba(10, 22, 40, .28);
  --ring: 0 0 0 3px rgba(242, 179, 10, .3);

  --sidebar-w: 232px;
  --sidebar-w-mini: 76px;
  --topbar-h: 64px;
  --ease: .18s ease;

  --photo: url('../img/usina.webp'), url('../img/usina-fallback.svg');

  /* ponte com o Bootstrap (5.3 lê as cores de link em RGB) */
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius);
  --bs-primary: var(--primary);
  --bs-link-color: var(--primary-text);
  --bs-link-color-rgb: 138, 93, 0;
  --bs-link-hover-color: var(--text);
  --bs-link-hover-color-rgb: 15, 23, 42;
}

/* 2. Base ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: var(--fs-md); line-height: 1.55; color: var(--text);
  background: radial-gradient(1200px 500px at 100% -10%, rgba(242, 179, 10, .08), transparent 60%), var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 650; letter-spacing: -.015em; }
h1 { letter-spacing: -.03em; }
a { text-decoration: none; font-weight: 500; transition: color var(--ease); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
hr { border-color: var(--border); opacity: 1; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
.text-muted, .text-secondary { color: var(--muted) !important; }
.num { font-variant-numeric: tabular-nums; }

/* 3. Componentes ----------------------------------------------------------- */
/* Botões: primary · secondary · outline · ghost · danger */
.btn {
  --bs-btn-padding-y: .55rem; --bs-btn-padding-x: 1rem;
  --bs-btn-font-size: var(--fs-sm); --bs-btn-font-weight: 600; --bs-btn-border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 40px; line-height: 1.2;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform .08s ease, filter var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn-sm { min-height: 34px; --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .75rem; }
.btn-lg { min-height: 50px; --bs-btn-font-size: var(--fs-md); --bs-btn-padding-x: 1.4rem; }
.btn-primary {
  --bs-btn-color: var(--primary-ink); --bs-btn-bg: transparent; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--primary-ink); --bs-btn-hover-bg: transparent; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--primary-ink); --bs-btn-active-bg: transparent; --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--primary-ink); --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: transparent;
  background-image: var(--grad-brand); border: 0; box-shadow: 0 6px 16px -6px rgba(242, 165, 10, .75);
}
.btn-primary:hover { filter: brightness(1.05) saturate(1.05); box-shadow: 0 10px 22px -8px rgba(242, 165, 10, .85); }
.btn-secondary {
  --bs-btn-color: var(--text); --bs-btn-bg: #eef0f4; --bs-btn-border-color: #eef0f4;
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: #e3e6ec; --bs-btn-hover-border-color: #e3e6ec;
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: #dadee6; --bs-btn-active-border-color: #dadee6;
}
.btn-outline-secondary {
  --bs-btn-color: var(--text); --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--text);
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: var(--surface-2); --bs-btn-active-border-color: var(--text);
}
.btn-outline-light {
  --bs-btn-color: #fff; --bs-btn-bg: transparent; --bs-btn-border-color: rgba(255, 255, 255, .32);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .1); --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: rgba(255, 255, 255, .16); --bs-btn-active-border-color: #fff;
}
.btn-ghost {
  --bs-btn-color: var(--text-2); --bs-btn-bg: transparent; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: #eef0f4; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: #e3e6ec; --bs-btn-active-border-color: transparent;
}
.btn-danger {
  --bs-btn-color: #fff; --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #991b1b; --bs-btn-hover-border-color: #991b1b;
}
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid; border-color: var(--primary-ink) transparent var(--primary-ink) transparent; animation: spin .7s linear infinite;
}

/* Formulários */
.form-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); margin-bottom: .4rem; }
.form-text { font-size: var(--fs-xs); color: var(--muted); }
.form-control, .form-select, .input-group-text {
  min-height: 44px; font-size: var(--fs-md); color: var(--text); background-color: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .6rem .85rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-select { padding-right: 2.4rem; background-position: right .85rem center; }
.form-select-sm { min-height: 38px; font-size: var(--fs-sm); }
textarea.form-control { min-height: 96px; }
.form-control::placeholder { color: #a3acba; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: var(--ring); background-color: var(--surface); color: var(--text); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-2); color: var(--text-2); }
.form-control.is-invalid { border-color: var(--danger); background-image: none; padding-right: .85rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .18); }
.invalid-feedback { font-size: var(--fs-xs); color: var(--danger); margin-top: .35rem; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-text { background: var(--surface-2); color: var(--text-2); font-weight: 500; }
.input-group > .btn { min-height: 44px; }
.form-check-input { width: 1.15em; height: 1.15em; border-color: var(--border-strong); }
.form-switch .form-check-input { width: 2.1em; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: var(--ring); border-color: var(--primary); }
.field-toggle { cursor: pointer; background: var(--surface); border-left: 0; color: var(--muted); }
.field-toggle:hover { color: var(--text); }

/* Cards */
.card { background: var(--surface); border: 1px solid rgba(15, 23, 42, .07); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
.card-title { font-size: var(--fs-lg); font-weight: 650; margin: 0; color: var(--text); }
.card-body { padding: 1.25rem; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-title-row h2 { font-size: var(--fs-lg); font-weight: 650; margin: 0; }
a.card, .card-link { color: inherit; text-decoration: none; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
a.card:hover, .card-link:hover { color: inherit; text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: rgba(242, 179, 10, .5); }
.link-more { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }

/* KPI */
.kpi { position: relative; overflow: hidden; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; height: 100%; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 179, 10, .12), transparent 70%); pointer-events: none; }
.kpi-label { display: flex; align-items: center; gap: .55rem; font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.kpi-label i { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: .85rem; }
.kpi-value { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-hint { font-size: var(--fs-xs); color: var(--muted); }
.kpi.is-accent .kpi-label i { background: var(--primary-soft); color: var(--primary-text); }
.kpi.is-success .kpi-label i { background: var(--success-soft); color: var(--success); }
.kpi.is-info .kpi-label i { background: var(--info-soft); color: var(--info); }
.kpi.is-danger .kpi-label i { background: var(--danger-soft); color: var(--danger); }

/* Tabelas: no celular viram cartões empilhados (rótulos vêm do ui.js) */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #fbfcfe; margin: 0; font-size: var(--fs-sm); color: var(--text); vertical-align: middle; }
.table > :not(caption) > * > * { padding: .85rem 1.25rem; border-bottom-color: var(--border); white-space: nowrap; }
.table thead th { background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .cell-sub { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.table-actions { display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 767.98px) {
  .table-responsive .table thead { display: none; }
  .table-responsive .table tbody tr { display: block; padding: .5rem 0; border-bottom: 1px solid var(--border); }
  .table-responsive .table tbody tr:last-child { border-bottom: 0; }
  .table-responsive .table tbody td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 1rem; border: 0; white-space: normal; text-align: right; }
  .table-responsive .table tbody td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  .table-responsive .table tbody td[colspan] { display: block; text-align: center; }
  .table-responsive .table tbody td[colspan]::before, .table-responsive .table tbody td:not([data-label])::before, .table-responsive .table tbody td[data-label=""]::before { content: none; }
}

/* Status */
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); font-weight: 600; padding: .25rem .65rem; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-success { color: var(--success); background: var(--success-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-danger  { color: var(--danger);  background: var(--danger-soft); }
.status-info    { color: var(--info);    background: var(--info-soft); }
.status-neutral { color: var(--text-2);  background: #eef0f4; }

/* Alertas, avisos e estados vazios */
.alert { border-radius: var(--radius); border: 1px solid transparent; font-size: var(--fs-sm); padding: .85rem 1rem; }
.alert-success { background: var(--success-soft); color: #14532d; border-color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); color: #78350f; border-color: #fde68a; }
.alert-danger  { background: var(--danger-soft);  color: #7f1d1d; border-color: #fecaca; }
.notice { display: flex; gap: .75rem; align-items: flex-start; background: var(--primary-soft); border: 1px solid #f6e3a6; border-radius: var(--radius); padding: .75rem 1rem; font-size: var(--fs-sm); color: #5c4200; }
.notice i { margin-top: .2rem; color: var(--primary-text); }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 1.5rem; color: var(--border-strong); margin-bottom: .6rem; display: block; }
.empty-state strong { display: block; color: var(--text-2); font-weight: 600; margin-bottom: .15rem; }

/* Dropdown, modal, acordeão, chips, progresso */
.dropdown-menu { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .4rem; font-size: var(--fs-sm); min-width: 220px; }
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 500; }
.dropdown-item i { width: 16px; color: var(--muted); text-align: center; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-item.text-danger, .dropdown-item.text-danger i { color: var(--danger); }
.dropdown-divider { border-color: var(--border); margin: .4rem 0; }
.modal-content { border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
.modal-title { font-size: var(--fs-lg); font-weight: 650; }
.modal-body { padding: 1.25rem; }
.modal-footer { border-top: 1px solid var(--border); padding: .9rem 1.25rem; gap: .5rem; }
.modal-backdrop.show { opacity: .5; background: var(--navy-950); }
.btn-close:focus { box-shadow: var(--ring); }
.accordion { --bs-accordion-border-color: var(--border); --bs-accordion-btn-focus-box-shadow: var(--ring); --bs-accordion-active-bg: var(--primary-soft); --bs-accordion-active-color: var(--text); --bs-accordion-border-radius: 14px; --bs-accordion-inner-border-radius: 14px; }
.accordion-item { border-radius: 14px !important; overflow: hidden; margin-bottom: .6rem; border: 1px solid var(--border) !important; }
.accordion-button { font-weight: 600; font-size: var(--fs-md); padding: 1.05rem 1.25rem; }
.accordion-body { font-size: var(--fs-md); padding: 0 1.25rem 1.15rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border: 1px solid var(--border-strong); border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow-sm); transition: background var(--ease), border-color var(--ease), color var(--ease); }
.chip:hover { text-decoration: none; border-color: var(--text); color: var(--text); }
.chip.active { background: var(--grad-brand); border-color: transparent; color: var(--primary-ink); }
.chip .count { font-size: var(--fs-xs); opacity: .7; }
.progress { height: 6px; background: #eef0f4; border-radius: 999px; }
.progress-bar { background: var(--primary); border-radius: 999px; }
.pix-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); }
.spinner-border { color: var(--primary); }

/* Toasts */
.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; width: min(380px, calc(100vw - 2rem)); }
.toast-item { display: flex; gap: .75rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--info); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .8rem 1rem; font-size: var(--fs-sm); animation: pop .18s ease; transition: opacity .25s; }
.toast-item i { margin-top: .15rem; }
.toast-item.success { border-left-color: var(--success); }
.toast-item.success i { color: var(--success); }
.toast-item.error { border-left-color: var(--danger); }
.toast-item.error i { color: var(--danger); }
.toast-item strong { display: block; font-weight: 650; }

/* 4. Shell ----------------------------------------------------------------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040; color: #b6c2d6;
  background: radial-gradient(500px 300px at 0% 0%, rgba(242, 179, 10, .12), transparent 60%), linear-gradient(180deg, #0b1a30, #070f1d);
  border-right: 1px solid rgba(255, 255, 255, .04);
  display: flex; flex-direction: column; transition: width var(--ease), transform var(--ease);
}
.sidebar-brand { height: var(--topbar-h); padding: 0 1.25rem; display: flex; align-items: center; flex-shrink: 0; }
.sidebar-brand a { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.sidebar-brand a:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(242, 165, 10, .35)); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: .5rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: var(--navy-700) transparent; }
.nav-group { margin-top: 1.25rem; }
.nav-group:first-child { margin-top: .25rem; }
.nav-label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #6f7f99; padding: 0 .75rem .5rem; white-space: nowrap; }
.nav-link-ui { position: relative; display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; margin-bottom: 2px; border-radius: var(--radius); color: #b6c2d6; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; transition: background var(--ease), color var(--ease); }
.nav-link-ui i { width: 20px; text-align: center; font-size: .95rem; flex-shrink: 0; color: #7f8fa9; transition: color var(--ease); }
.nav-link-ui:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link-ui:hover i { color: #cfd8e6; }
.nav-link-ui.active { background: linear-gradient(90deg, rgba(242, 179, 10, .2), rgba(242, 179, 10, .04)); color: #fff; }
.nav-link-ui.active i { color: var(--primary); }
.nav-link-ui.active::before { content: ""; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar-foot { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-card { margin: .5rem .75rem .75rem; padding: 1rem; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(200px 120px at 100% 0%, rgba(242, 179, 10, .35), transparent 70%), var(--navy-800); border: 1px solid rgba(242, 179, 10, .3); }
.side-card small { color: #b6c2d6; display: block; font-size: var(--fs-xs); }
.side-card strong { display: block; font-size: 1.15rem; margin-bottom: .75rem; font-variant-numeric: tabular-nums; }
.side-card .btn { width: 100%; }

.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin var(--ease); }
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--topbar-h); display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; background: rgba(255, 255, 255, .8); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid rgba(15, 23, 42, .06); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); border-radius: var(--radius); transition: background var(--ease), color var(--ease); }
.icon-btn:hover { background: #eef0f4; color: var(--text); }
.breadcrumbs { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--text); text-decoration: none; }
.breadcrumbs .current { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs i { font-size: .6rem; }
.topbar-spacer { flex: 1; }
.balance-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; font-size: var(--fs-sm); background: var(--surface); color: var(--text); white-space: nowrap; flex-shrink: 0; }
.balance-chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.balance-chip span { color: var(--muted); }
.balance-chip strong { font-variant-numeric: tabular-nums; }
.user-btn { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; color: var(--text); }
.user-btn:hover { background: #eef0f4; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.25rem; }
.user-btn .user-name { font-size: var(--fs-sm); font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-head { padding: .6rem .7rem .7rem; }
.user-menu-head strong { display: block; font-size: var(--fs-sm); }
.user-menu-head small { color: var(--muted); }

.app-content { flex: 1; padding: 1.5rem 1.5rem 3rem; }
.container-ui { max-width: 1380px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.03em; margin: 0; line-height: 1.2; }
.page-sub { color: var(--text-2); font-size: var(--fs-sm); margin: .25rem 0 0; }
.section-title { font-size: var(--fs-lg); font-weight: 650; margin: 0 0 .85rem; }
.app-footer { padding: 1.25rem 1.5rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; }

/* Grid principal + coluna lateral */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.layout-2 > aside { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: calc(var(--topbar-h) + 1rem); }
.stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 1199.98px) { .layout-2 { grid-template-columns: 1fr; } .layout-2 > aside { position: static; } }

/* Sidebar recolhida (desktop) */
@media (min-width: 992px) {
  .app.is-collapsed .sidebar { width: var(--sidebar-w-mini); }
  .app.is-collapsed .app-main { margin-left: var(--sidebar-w-mini); }
  .app.is-collapsed .brand-name, .app.is-collapsed .nav-label, .app.is-collapsed .nav-link-ui span, .app.is-collapsed .side-card { display: none; }
  .app.is-collapsed .sidebar-brand { justify-content: center; padding: 0; }
  .app.is-collapsed .nav-link-ui { justify-content: center; padding: .7rem 0; }
  .app.is-collapsed .nav-group { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .07); }
  .app.is-collapsed .nav-group:first-child { border-top: 0; padding-top: 0; }
}

/* Tablet e celular: sidebar vira gaveta e aparece a barra inferior */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(6, 15, 28, .5); z-index: 1035; }
.tabbar { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: min(256px, 80vw); box-shadow: var(--shadow-md); }
  .app.is-open .sidebar { transform: none; }
  .app.is-open .sidebar-backdrop { display: block; }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .app-content { padding: 1.25rem 1rem 6.5rem; }
  .user-btn .user-name { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem 0; font-size: .6875rem; font-weight: 600; color: var(--muted); border-radius: var(--radius); }
  .tabbar a i { font-size: 1.05rem; }
  .tabbar a:hover { text-decoration: none; color: var(--text); }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active i { color: var(--primary-hover); }
}
@media (max-width: 575.98px) {
  :root { --fs-2xl: 1.5rem; --fs-xl: 1.3rem; }
  .balance-chip span { display: none; }
}

/* 5. Páginas do painel ----------------------------------------------------- */
.hero { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 1.75rem 2rem; display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg);
  background: linear-gradient(110deg, rgba(10, 22, 40, .94) 0%, rgba(10, 22, 40, .72) 60%, rgba(10, 22, 40, .35) 100%), var(--photo); background-size: cover; background-position: center; }
.hero-label { color: #a9b6cc; font-size: var(--fs-sm); }
.hero-value { font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.photo-banner { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 1.75rem; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; box-shadow: var(--shadow-lg);
  background: linear-gradient(100deg, rgba(6, 15, 28, .92) 0%, rgba(6, 15, 28, .65) 55%, rgba(6, 15, 28, .25) 100%), var(--photo); background-size: cover; background-position: center; }
.photo-banner h1, .photo-banner h2 { color: #fff; margin: 0; }
.photo-banner .sub { color: #cbd6e8; max-width: 52ch; margin: .25rem 0 0; font-size: var(--fs-sm); }
.banner-stats { display: flex; flex-wrap: wrap; gap: 1.25rem 2.25rem; }
.banner-stats div { font-size: var(--fs-xs); color: #b6c5dc; text-transform: uppercase; letter-spacing: .05em; }
.banner-stats strong { display: block; font-size: 1.5rem; color: #fff; letter-spacing: -.02em; text-transform: none; font-variant-numeric: tabular-nums; }

/* Gráficos */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; align-items: end; height: 160px; }
.bars .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: .35rem; font-size: .6875rem; color: var(--muted); }
.bars .bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--primary), #f7d36b); min-height: 4px; }
.bars .bar:hover i { opacity: .8; }
.hbar { display: grid; grid-template-columns: 38px 1fr auto; gap: .75rem; align-items: center; padding: .5rem 0; font-size: var(--fs-sm); color: inherit; }
.hbar:hover { text-decoration: none; color: inherit; }
.hbar .track { height: 8px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--navy-700); border-radius: 999px; }

/* Listas e blocos auxiliares */
.mini-list { list-style: none; margin: 0; padding: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.25rem; }
.users-search { display: flex; gap: .5rem; align-items: flex-start; max-width: 640px; }
.users-search .field { flex: 1; }
.users-search .field > .form-control { min-height: 44px; border-radius: var(--radius); }
.users-search .field > i { top: 22px; }
.users-search .btn { min-height: 44px; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .sub { color: var(--muted); font-size: var(--fs-xs); display: block; }
.tip { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.25rem; font-size: var(--fs-sm); color: var(--text-2); }
.tip + .tip { padding-top: 0; }
.tip i { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary-text); }
.tip strong { display: block; color: var(--text); }
.eco { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: 1.25rem; }
.eco div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem; }
.eco small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.eco strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.invite { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--navy-900); border-radius: var(--radius-lg); color: #fff; }
.invite h3 { color: #fff; font-size: var(--fs-lg); margin: 0 0 .15rem; }
.invite p { margin: 0; color: #a9b6cc; font-size: var(--fs-sm); }
.data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 1.25rem; }
.data-grid div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; min-width: 0; }
.data-grid small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.data-grid strong { font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 767.98px) { .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps-list { list-style: none; margin: 0; padding: .25rem 1.25rem 1.25rem; counter-reset: s; display: grid; gap: .9rem; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: .75rem; font-size: var(--fs-sm); color: var(--text-2); }
.steps-list li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: var(--fs-xs); }
.steps-list strong { display: block; color: var(--text); }

/* Cartão de usina */
.product { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.product-media { position: relative; height: 160px; background: #dfe8f5; overflow: hidden; border-bottom: 1px solid var(--border); }
.plant-art { display: block; width: 100%; height: 100%; transition: transform .6s ease; }
.card-link:hover .plant-art { transform: scale(1.06); }
.media-badge, .media-rate { position: absolute; top: 12px; font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; backdrop-filter: blur(8px); }
.media-badge { left: 12px; background: rgba(6, 15, 28, .6); color: #fff; }
.media-badge i { margin-right: .35rem; color: var(--primary); }
.media-rate { right: 12px; background: rgba(255, 255, 255, .92); color: var(--success); }
.product-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.product-title { font-size: 1.1rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.product-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.product-meta small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.product-meta strong { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.product-rate { color: var(--success); font-weight: 650; font-size: var(--fs-sm); }
.plant-cover { position: relative; height: 240px; background: linear-gradient(0deg, rgba(6, 15, 28, .6), transparent 60%), var(--photo); background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 1.25rem; color: #fff; }
.sort-select { min-width: 230px; }

/* 6. Autenticação ---------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--surface); }

/* coluna da foto */
.auth-aside { color: #fff; padding: 2.5rem clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: linear-gradient(180deg, rgba(6, 15, 28, .5) 0%, rgba(6, 15, 28, .78) 45%, rgba(6, 15, 28, .95) 100%), var(--photo); background-size: cover; background-position: center; }
.auth-brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; font-size: 1.2rem; }
.auth-brand:hover { color: #fff; text-decoration: none; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-aside h2 { color: #fff; font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.08; max-width: 15ch; margin-bottom: 1rem; }
.auth-aside h2 em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-aside .lead-text { color: #c3cee0; font-size: 1.05rem; max-width: 42ch; margin: 0; }
.auth-features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .75rem; max-width: 440px; }
.auth-features li { display: flex; gap: .9rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); }
.auth-features i { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--grad-brand); color: var(--primary-ink); }
.auth-features b { display: block; color: #fff; font-size: var(--fs-md); font-weight: 650; }
.auth-features span { color: #b9c5d8; font-size: var(--fs-sm); }
.auth-aside-foot { color: rgba(255, 255, 255, .55); font-size: var(--fs-xs); }

/* coluna do formulário */
.auth-main { display: flex; flex-direction: column; min-height: 100vh; padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: radial-gradient(700px 360px at 100% 0%, rgba(242, 179, 10, .1), transparent 60%), var(--surface); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.auth-back { display: inline-flex; align-items: center; gap: .5rem; margin-left: -.75rem; padding: .5rem .75rem; border-radius: var(--radius); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.auth-back:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .3rem .75rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.auth-card h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.035em; margin: 0 0 .4rem; }
.auth-card .lead { color: var(--text-2); font-size: var(--fs-md); margin-bottom: 1.75rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .5rem 0 1.5rem; font-size: var(--fs-sm); }
.auth-row .hint { color: var(--muted); font-size: var(--fs-xs); }
.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.75rem 0 1rem; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; color: var(--muted); font-size: var(--fs-xs); }
.auth-foot a { color: var(--text-2); font-weight: 600; }
.auth-alert { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.25rem; }
.auth-alert i { margin-top: .15rem; }
.auth-invite { margin-bottom: 1.5rem; }
.auth-invite > summary { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none; color: var(--primary-text); font-size: var(--fs-sm); font-weight: 600; border-radius: 6px; }
.auth-invite > summary::-webkit-details-marker { display: none; }
.auth-invite > summary::after { content: "\f107"; font-family: "Font Awesome 5 Free"; font-weight: 900; transition: transform var(--ease); }
.auth-invite > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.auth-invite[open] > summary { margin-bottom: .6rem; }
.auth-invite[open] > summary::after { transform: rotate(180deg); }
@media (min-width: 992px) { .auth-aside { position: sticky; top: 0; height: 100vh; } }  /* a foto fica parada se o formulário rolar */

/* campos com ícone (o ícone fica alinhado ao campo mesmo quando aparece mensagem de erro abaixo) */
.field { position: relative; }
.field > .form-control { min-height: 50px; padding-left: 2.75rem; border-radius: 14px; }
.field > i { position: absolute; left: 1rem; top: 25px; transform: translateY(-50%); color: var(--muted); font-size: .95rem; pointer-events: none; transition: color var(--ease); }
.field:focus-within > i { color: var(--primary-text); }
.field.has-action > .form-control { padding-right: 3rem; }
.field-action { position: absolute; right: .35rem; top: 25px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.field-action:hover { background: var(--surface-2); color: var(--text); }
.caps-warn { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; color: var(--warning); font-size: var(--fs-xs); font-weight: 600; }
.caps-warn[hidden] { display: none; }

/* medidor de força da senha */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .55rem; }
.pw-meter i { height: 4px; border-radius: 999px; background: var(--border); transition: background var(--ease); }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: #65a30d; }
.pw-meter[data-score="4"] i { background: var(--success); }
.pw-hint { display: flex; justify-content: space-between; gap: 1rem; margin-top: .35rem; color: var(--muted); font-size: var(--fs-xs); }
.pw-hint b { font-weight: 600; color: var(--text-2); }
.match-hint { margin-top: .35rem; font-size: var(--fs-xs); font-weight: 600; }
.match-hint.ok { color: var(--success); }
.match-hint.bad { color: var(--danger); }

/* autopreenchimento do navegador com as cores do tema (o Chrome pinta o campo de azul-acinzentado) */
input:-webkit-autofill, input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; transition: background-color 9999s ease-out 0s;
}
input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset, var(--ring); }

@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-aside { padding: 1.25rem 1.25rem 1.5rem; gap: 1rem; }
  .auth-aside h2 { font-size: 1.6rem; margin: 0; }
  .auth-aside .lead-text, .auth-features, .auth-aside-foot { display: none; }
  .auth-main { min-height: 0; padding-top: .75rem; }
  .auth-center { align-items: flex-start; padding-top: 1.25rem; }
  .auth-card h1 { font-size: 1.7rem; }
}

/* 7. Página inicial -------------------------------------------------------- */
.lp { background: var(--surface); color: var(--text); overflow-x: hidden; }
.lp-nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 5vw, 4rem); color: #fff; transition: background var(--ease), box-shadow var(--ease); }
.lp-nav.scrolled { background: rgba(6, 15, 28, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.lp-nav .brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.lp-nav .brand:hover { text-decoration: none; color: #fff; }
.lp-links { display: flex; gap: 1.75rem; font-size: var(--fs-sm); }
.lp-links a { color: #dbe5f5; }
.lp-links a:hover { color: #fff; text-decoration: none; }
@media (max-width: 991.98px) { .lp-links { display: none; } }

.lp-hero { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 3rem; padding: 120px clamp(1rem, 5vw, 4rem) 150px; color: #fff;
  background: radial-gradient(900px 400px at 85% 10%, rgba(242, 179, 10, .2), transparent 60%), linear-gradient(95deg, rgba(6, 15, 28, .93) 0%, rgba(6, 15, 28, .7) 50%, rgba(6, 15, 28, .25) 100%), var(--photo); background-size: cover; background-position: center; }
.lp-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.3rem); line-height: 1.04; font-weight: 750; letter-spacing: -.04em; max-width: 15ch; text-wrap: balance; }
.lp-hero h1 em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero .lead { color: #cbd6e8; font-size: 1.15rem; max-width: 50ch; margin: 1.25rem 0 2rem; }
.lp-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); font-size: var(--fs-sm); margin-bottom: 1.25rem; }
.lp-pill i { color: var(--primary); }
.lp-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.75rem; font-size: var(--fs-sm); color: #cbd6e8; }
.lp-checks i { color: var(--primary); margin-right: .4rem; }

/* prévia do painel (ilustrativa) */
.preview { justify-self: end; width: min(420px, 100%); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 24px; padding: 1.25rem; backdrop-filter: blur(16px); box-shadow: var(--shadow-lg); }
.preview-card { background: #fff; color: var(--text); border-radius: 18px; padding: 1.1rem 1.25rem; }
.preview-card + .preview-card { margin-top: .75rem; }
.preview-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.preview-big { font-size: 1.9rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: .2rem 0 .75rem; }
.preview-big small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.preview .bars { height: 80px; gap: .3rem; }
.preview .bars .bar { font-size: .6rem; }
.preview-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: var(--fs-sm); padding: .45rem 0; }
.preview-row + .preview-row { border-top: 1px solid var(--border); }
.preview-row span { display: flex; align-items: center; gap: .6rem; color: var(--text-2); }
.preview-row span i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-size: .8rem; }
.preview-note { text-align: center; color: rgba(255, 255, 255, .6); font-size: .7rem; margin-top: .75rem; }

.lp-trust { position: relative; z-index: 2; margin: -70px clamp(1rem, 5vw, 4rem) 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.lp-trust div { display: flex; gap: .85rem; align-items: center; padding: 1.25rem 1.4rem; border-right: 1px solid var(--border); }
.lp-trust div:last-child { border-right: 0; }
.lp-trust i { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--grad-brand); color: var(--primary-ink); }
.lp-trust b { display: block; font-size: var(--fs-md); }
.lp-trust span { font-size: var(--fs-xs); color: var(--muted); }

.lp-section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 4rem); }
.lp-section.alt { background: linear-gradient(180deg, #f3f5f9, #eaf0f8); }
.lp-section.dark { background: radial-gradient(800px 360px at 0% 0%, rgba(242, 179, 10, .12), transparent 60%), var(--navy-950); color: #fff; }
.lp-section.dark h2, .lp-section.dark h3 { color: #fff; }
.lp-inner { max-width: 1240px; margin: 0 auto; }
.lp-head { max-width: 680px; margin-bottom: 2.5rem; }
.lp-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lp-eyebrow { color: var(--primary-text); font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; }
.lp-section.dark .lp-eyebrow { color: var(--primary); }
.lp-title { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 750; letter-spacing: -.035em; margin: .5rem 0 .75rem; text-wrap: balance; }
.lp-sub { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.lp-section.dark .lp-sub { color: #a9b6cc; }

.why { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.75rem; height: 100%; box-shadow: var(--shadow-sm); }
.why i { font-size: 1.6rem; color: var(--primary); margin-bottom: 1rem; display: block; }
.why h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; }
.why p { color: var(--text-2); margin: 0; font-size: var(--fs-md); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 23px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px); }
.step { position: relative; text-align: center; padding: 0 .5rem; }
.step .n { width: 48px; height: 48px; margin: 0 auto 1.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: var(--primary-ink); font-weight: 800; box-shadow: 0 0 0 6px #fff, 0 8px 18px -6px rgba(242, 165, 10, .7); position: relative; }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .35rem; }
.step p { color: var(--text-2); font-size: var(--fs-sm); margin: 0 auto; max-width: 26ch; }
@media (max-width: 767.98px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; } .steps::before { display: none; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 991.98px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .85rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; color: var(--text-2); }
.checklist li i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); font-size: .7rem; margin-top: .1rem; }
.checklist strong { color: var(--text); }
.mock { background: var(--surface-2); border: 1px solid var(--border); border-radius: 24px; padding: 1.25rem; box-shadow: var(--shadow-lg); }
.mock-top { display: flex; gap: .4rem; margin-bottom: 1rem; }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: .75rem; }
.mock-tile { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem; }
.mock-tile small { display: block; color: var(--muted); font-size: .7rem; }
.mock-tile b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mock-chart { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.mock-chart .bars { height: 120px; }

.feature { padding: 1.4rem; border-radius: 20px; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .1); transition: transform .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); border-color: rgba(242, 179, 10, .5); }
.feature i.ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 1rem; background: var(--grad-brand); color: var(--primary-ink); font-size: 1.1rem; }
.feature h3 { font-size: var(--fs-lg); margin-bottom: .35rem; }
.feature p { color: #a9b6cc; font-size: var(--fs-sm); margin: 0; }

.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 991.98px) { .faq-grid { grid-template-columns: 1fr; } }
.help-card { margin-top: 1.5rem; display: flex; gap: .9rem; align-items: center; padding: 1rem 1.15rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.help-card i { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.help-card span { color: var(--text-2); font-size: var(--fs-sm); }

.lp-cta { border-radius: 28px; padding: clamp(2.25rem, 5vw, 3.75rem); color: #fff; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg);
  background: linear-gradient(100deg, rgba(6, 15, 28, .93), rgba(6, 15, 28, .65)), var(--photo); background-size: cover; background-position: center; }
.lp-cta h2 { color: #fff; margin: 0 0 .35rem; font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 750; letter-spacing: -.03em; }
.lp-cta p { color: #cbd6e8; margin: 0; }

.lp-footer { background: var(--navy-950); color: #8896ad; padding: 3.5rem clamp(1rem, 5vw, 4rem) 2rem; font-size: var(--fs-sm); }
.lp-footer-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.lp-footer h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.lp-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.lp-footer a { color: #cbd6e8; font-weight: 400; }
.lp-footer .legal { max-width: 1240px; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: var(--fs-xs); line-height: 1.6; }
@media (max-width: 767.98px) { .lp-footer-grid { grid-template-columns: 1fr 1fr; } .lp-footer-grid > :first-child { grid-column: 1 / -1; } }

@media (max-width: 991.98px) {
  .lp-hero { grid-template-columns: 1fr; padding: 110px 1.25rem 4rem; min-height: auto;
    background: linear-gradient(180deg, rgba(6, 15, 28, .9), rgba(6, 15, 28, .78)), var(--photo); background-size: cover; background-position: center; }
  .preview { justify-self: stretch; width: auto; }
  .lp-trust { grid-template-columns: 1fr 1fr; margin: -2rem 1rem 0; }
  .lp-trust div:nth-child(2) { border-right: 0; }
  .lp-trust div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 575.98px) {
  .lp-trust { grid-template-columns: 1fr; }
  .lp-trust div { border-right: 0; border-bottom: 1px solid var(--border); }
  .lp-trust div:last-child { border-bottom: 0; }
  .mock-grid { grid-template-columns: 1fr 1fr; }
}

/* Suporte e notificações ---------------------------------------------------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-size: .68rem; font-weight: 800; font-style: normal; }
.app.is-collapsed .nav-badge { position: absolute; top: 4px; right: 10px; min-width: 16px; height: 16px; font-size: .6rem; padding: 0 4px; }

.notif-btn { position: relative; }
.notif-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-count[hidden] { display: none; }
.notif-menu { width: min(360px, calc(100vw - 2rem)); padding: 0; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.notif-head .btn { min-height: 28px; font-size: var(--fs-xs); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-list.full { max-height: none; }
.notif-item { display: grid; grid-template-columns: 34px 1fr; gap: .7rem; padding: .75rem .9rem; color: var(--text); border-bottom: 1px solid var(--border); font-weight: 400; position: relative; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.notif-item > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: .85rem; }
.notif-item.unread > i { background: var(--primary-soft); color: var(--primary-text); }
.notif-item.unread::after { content: ""; position: absolute; right: .9rem; top: 1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif-item strong { display: block; font-size: var(--fs-sm); font-weight: 600; padding-right: 1rem; }
.notif-item:not(.unread) strong { font-weight: 500; color: var(--text-2); }
.notif-item span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-xs); color: var(--text-2); }
.notif-item small { font-size: .7rem; color: var(--muted); }
.notif-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.notif-empty i { display: block; font-size: 1.4rem; margin-bottom: .5rem; color: var(--border-strong); }
.notif-all { display: block; text-align: center; padding: .65rem; border-top: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 600; }
.notif-all:hover { background: var(--surface-2); text-decoration: none; }

.support-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1025; display: inline-flex; align-items: center; gap: .55rem; height: 52px; padding: 0 1.2rem 0 1.05rem; border: 0; border-radius: 999px; background: var(--grad-brand); color: var(--primary-ink); font-weight: 700; font-size: var(--fs-sm); box-shadow: 0 12px 28px -8px rgba(242, 165, 10, .75), 0 2px 6px rgba(10, 22, 40, .2); transition: transform .15s ease, box-shadow .15s ease; }
.support-fab i { font-size: 1.15rem; }
.support-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(242, 165, 10, .85), 0 2px 6px rgba(10, 22, 40, .2); }
.support-fab:focus-visible { box-shadow: var(--ring), 0 12px 28px -8px rgba(242, 165, 10, .75); }
@media (max-width: 991.98px) {
  .support-fab { bottom: calc(5.25rem + env(safe-area-inset-bottom)); right: 1rem; width: 52px; padding: 0; justify-content: center; }
  .support-fab span { display: none; }
}

.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-list li + li { border-top: 1px solid var(--border); }
.ticket-list a { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; color: var(--text); font-weight: 400; }
.ticket-list a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.ticket-list a.is-new { background: var(--primary-soft); }
.ticket-main { min-width: 0; }
.ticket-top { display: flex; gap: .5rem; align-items: baseline; }
.ticket-top strong { font-weight: 600; }
.ticket-preview { color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: .15rem 0; }
.ticket-meta { color: var(--muted); font-size: var(--fs-xs); }

.thread { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 82%; }
.msg.mine { align-self: flex-end; }
.msg-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; font-size: var(--fs-sm); }
.msg.mine .msg-head { flex-direction: row-reverse; }
.msg-head .avatar { width: 28px; height: 28px; font-size: .75rem; }
.avatar.is-staff { background: var(--grad-brand); color: var(--primary-ink); }
.msg-head small { color: var(--muted); font-size: var(--fs-xs); }
.msg-body { padding: .8rem 1rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-md); line-height: 1.5; }
.msg.theirs .msg-body { border-top-left-radius: 4px; }
.msg.mine .msg-body { background: var(--primary-soft); border-color: rgba(242, 179, 10, .35); border-top-right-radius: 4px; }
.reply-box { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--border); }
@media (max-width: 575.98px) { .msg { max-width: 94%; } .ticket-list a { flex-direction: column; } }

/* 8. Modo escuro ----------------------------------------------------------- */
/* Ativado por <html data-theme="dark"> (botão de tema; padrão segue o sistema). */
[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #121a2b;
  --surface-2: #172238;
  --border: #243149;
  --border-strong: #34445f;
  --text: #e6ebf4;
  --text-2: #aab6c9;
  --muted: #8392a9;
  --hover: #1d2840;

  --primary-soft: rgba(242, 179, 10, .14);
  --primary-text: #f5c542;
  --success: #4ade80;  --success-soft: rgba(74, 222, 128, .12);
  --warning: #fbbf24;  --warning-soft: rgba(251, 191, 36, .12);
  --danger:  #f87171;  --danger-soft:  rgba(248, 113, 113, .12);
  --info:    #60a5fa;  --info-soft:    rgba(96, 165, 250, .12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 32px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);

  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--border);
  --bs-link-color: var(--primary-text);
  --bs-link-color-rgb: 245, 197, 66;
  --bs-link-hover-color: #fff;
  --bs-link-hover-color-rgb: 255, 255, 255;
  --bs-secondary-color: var(--muted);
  --bs-emphasis-color: var(--text);
  color-scheme: dark;
}
[data-theme="dark"] body { background: radial-gradient(1200px 500px at 100% -10%, rgba(242, 179, 10, .06), transparent 60%), var(--bg); }
[data-theme="dark"] .card { border-color: var(--border); }
[data-theme="dark"] a.card:hover, [data-theme="dark"] .card-link:hover { border-color: rgba(242, 179, 10, .45); }
[data-theme="dark"] .topbar { background: rgba(18, 26, 43, .82); border-bottom-color: var(--border); }
[data-theme="dark"] .tabbar { background: rgba(18, 26, 43, .96); border-top-color: var(--border); }
[data-theme="dark"] .icon-btn:hover, [data-theme="dark"] .user-btn:hover { background: var(--hover); }
[data-theme="dark"] .btn-secondary {
  --bs-btn-color: var(--text); --bs-btn-bg: var(--hover); --bs-btn-border-color: var(--hover);
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: #253250; --bs-btn-hover-border-color: #253250;
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: #2b3a5c; --bs-btn-active-border-color: #2b3a5c;
}
[data-theme="dark"] .btn-ghost { --bs-btn-hover-bg: var(--hover); --bs-btn-active-bg: #253250; }
[data-theme="dark"] .status-neutral { background: var(--hover); }
[data-theme="dark"] .progress, [data-theme="dark"] .hbar .track { background: var(--hover); }
[data-theme="dark"] .hbar .track i { background: #5b7bb3; }
[data-theme="dark"] .table { --bs-table-hover-bg: var(--surface-2); --bs-table-color: var(--text); --bs-table-hover-color: var(--text); }
[data-theme="dark"] .form-control::placeholder { color: #66748c; }
[data-theme="dark"] .alert-success { background: var(--success-soft); color: #bbf7d0; border-color: rgba(74, 222, 128, .3); }
[data-theme="dark"] .alert-warning { background: var(--warning-soft); color: #fde68a; border-color: rgba(251, 191, 36, .3); }
[data-theme="dark"] .alert-danger { background: var(--danger-soft); color: #fecaca; border-color: rgba(248, 113, 113, .3); }
[data-theme="dark"] .notice { background: var(--primary-soft); border-color: rgba(242, 179, 10, .3); color: #f3dfa2; }
[data-theme="dark"] .modal-content, [data-theme="dark"] .dropdown-menu { background: var(--surface); }
[data-theme="dark"] .modal-backdrop.show { opacity: .7; }
[data-theme="dark"] .accordion { --bs-accordion-bg: var(--surface); --bs-accordion-color: var(--text); --bs-accordion-btn-color: var(--text); --bs-accordion-active-color: var(--text); }
[data-theme="dark"] .auth-main { background: radial-gradient(600px 300px at 100% 0%, rgba(242, 179, 10, .08), transparent 60%), var(--surface); }
[data-theme="dark"] .product-media { background: var(--surface-2); }
[data-theme="dark"] .media-rate { background: rgba(18, 26, 43, .88); }
[data-theme="dark"] .bars .bar i { background: linear-gradient(180deg, var(--primary), #b98a12); }
[data-theme="dark"] .kpi::after { background: radial-gradient(circle, rgba(242, 179, 10, .1), transparent 70%); }
/* página inicial */
[data-theme="dark"] .lp-trust { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .lp-trust div { border-color: var(--border) !important; }
[data-theme="dark"] .lp-section.alt { background: linear-gradient(180deg, #0e1626, #0b1220); }
[data-theme="dark"] .step .n { box-shadow: 0 0 0 6px #0e1626, 0 8px 18px -6px rgba(242, 165, 10, .5); }
[data-theme="dark"] .steps::before { background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px); }
[data-theme="dark"] .preview-card, [data-theme="dark"] .mock-tile, [data-theme="dark"] .mock-chart { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .mock { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .mock-top i { background: var(--border-strong); }
[data-theme="dark"] .preview-row + .preview-row { border-color: var(--border); }

/* Botão de tema */
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.theme-toggle.on-dark { color: #dbe5f5; }
.theme-toggle.on-dark:hover { background: rgba(255, 255, 255, .1); color: #fff; }
/* interruptor do modo escuro no menu do usuário (só visual; o estado vem de <html data-theme>) */
.ui-switch { margin-left: auto; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; flex-shrink: 0; transition: background var(--ease); }
.ui-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--ease); }
[data-theme="dark"] .ui-switch { background: var(--primary); }
[data-theme="dark"] .ui-switch::after { transform: translateX(14px); }
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: background-color .25s ease, border-color .25s ease, color .25s ease !important; }

/* 9. Movimento ------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app-content .container-ui { animation: fade-in .3s ease both; }
.lp-hero > * { animation: fade-in .5s ease both; }
.lp-hero > .preview { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
