/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ---------- Reset ---------- */
/* O atributo hidden é anulado por qualquer regra de display de author
   (ex.: .btn, .whatsapp-qr-box) — esta regra garante que [hidden] some
   de fato, em todo o painel. */
[hidden] {
    display: none !important;
}

/* ---------- Auth page ---------- */
/* Public site body: flex column so the footer sticks to the bottom even with little content */
.site-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-body>.site-header {
    flex-shrink: 0;
}

.site-body>main,
.site-body>.blog-list,
.site-body>.blog-article {
    flex: 1 0 auto;
}

.site-body>.site-footer {
    flex-shrink: 0;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--navy), var(--navy-dark));
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-brand h1 {
    font-size: 1.4rem;
    margin: 0.75rem 0 0.25rem;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0 0 1.75rem;
}

.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.auth-form {
    display: grid;
    gap: 16px;
    text-align: left;
}

.auth-field label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--gold);
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-back {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-back:hover {
    color: var(--navy);
}

/* ---------- Dashboard ---------- */
.dashboard-page {
    min-height: 100vh;
    background: var(--bg);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-toggle__icon--dark {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--light {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--dark {
    display: block;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
    padding: 32px 0;
}

.dashboard-header h1 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 4px 0 0;
    font-size: 0.9rem;
}

.dashboard-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header__actions {
    display: flex;
    gap: 12px;
}

.dashboard-header__actions .btn--ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.dashboard-header__actions .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dashboard-main {
    padding: 32px 24px 64px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.metric-card__label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-card__value {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text);
}

.metric-card--positive .metric-card__value {
    color: #16a34a;
}

.metric-card--negative .metric-card__value {
    color: #dc2626;
}

.metric-card--neutral .metric-card__value {
    color: var(--text);
}

.dashboard-metrics--3 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-metrics--auto {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-charts--3 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-charts--2 {
    grid-template-columns: 1fr 1fr;
}

.dashboard-charts--1 {
    grid-template-columns: 1fr;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chart-card--wide {
    grid-column: span 1;
}

.chart-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.chart-card h3 .chart-card__icon {
    margin-right: 6px;
}

.chart-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.chart-card__header h3 {
    margin: 0;
}

.chart-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.chart-card--scrollable {
    min-width: 0;
}

.chart-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.chart-scroll-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Edge */
}

.chart-scroll-wrapper:active {
    cursor: grabbing;
}

.chart-scroll-wrapper>div[id^="chart-"] {
    min-width: min(3200px, 100%) !important;
    height: 420px;
    width: 100%;
}

.chart-scroll-wrapper canvas {
    width: 100% !important;
    height: 420px !important;
}

/* Touch drag scroll helper */
.chart-scroll-wrapper.is-dragging {
    cursor: grabbing;
}

.dashboard-section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

[data-theme="dark"] .dashboard-section-title {
    color: #e2e8f0;
}

.dashboard-group {
    background: rgba(212, 197, 169, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 24px 32px;
    margin-bottom: 32px;
}

[data-theme="dark"] .dashboard-group {
    background: rgba(30, 41, 59, 0.55);
    border-color: var(--border);
}

.dashboard-group:first-of-type {
    margin-top: 0;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 28px;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.summary-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.summary-list {
    display: grid;
    gap: 10px;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.summary-list li:last-child {
    border-bottom: none;
}

.summary-list strong {
    color: var(--navy);
    font-family: var(--font-heading);
}

.dashboard-table {
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    /* Required for sticky header */
    border-spacing: 0;
    font-size: 0.88rem;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 10px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
    width: auto;
}

.data-table th:last-child,
.data-table td:last-child {
    width: 140px;
    text-align: right;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table th.data-table__sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
    transition: color 0.15s ease;
}

.data-table th.data-table__sortable:hover {
    color: var(--navy);
}

.data-table th.data-table__sortable::after {
    content: "\2195";
    position: absolute;
    right: 6px;
    opacity: 0.35;
    font-size: 0.85em;
}

.data-table th.data-table__sortable--asc::after {
    content: "\2191";
    opacity: 1;
    color: var(--gold);
}

.data-table th.data-table__sortable--desc::after {
    content: "\2193";
    opacity: 1;
    color: var(--gold);
}

[data-theme="dark"] .data-table th.data-table__sortable:hover {
    color: #fff;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(74, 55, 40, 0.05);
    /* Subtle brand-color highlight */
    cursor: default;
}

.data-table td {
    transition: color 0.2s;
}

.data-table th {
    color: var(--text-muted);
}

.data-table th.data-table__sortable {
    color: var(--navy);
}

.data-table th.data-table__sortable:hover {
    color: var(--navy);
}

.data-table th.data-table__sortable::after {
    content: "\2195";
    position: absolute;
    right: 6px;
    opacity: 0.35;
    font-size: 0.85em;
}

.data-table th.data-table__sortable--asc::after {
    content: "\2191";
    opacity: 1;
    color: var(--gold);
}

.data-table th.data-table__sortable--desc::after {
    content: "\2193";
    opacity: 1;
    color: var(--gold);
}

[data-theme="dark"] .data-table th.data-table__sortable:hover {
    color: #fff;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tbody tr:hover {
    background: var(--bg);
}

[data-theme="dark"] .data-table th {
    color: #94a3b8;
    border-bottom-color: var(--border);
}

[data-theme="dark"] .data-table td {
    color: #e2e8f0;
    border-bottom-color: var(--border);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

@media (max-width: 960px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .dashboard-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dashboard-page {
    background: var(--bg);
}

[data-theme="dark"] .metric-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .summary-card {
    background: var(--surface);
}

[data-theme="dark"] .metric-card__value {
    color: #f1f5f9;
}

[data-theme="dark"] .chart-card h3,
[data-theme="dark"] .summary-card h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .summary-list li {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .summary-list strong {
    color: #e6c15a;
}

/* ---------- Design tokens ---------- */
:root {
    --navy: #4A3728;
    --navy-light: #4A3728;
    --navy-dark: #4A3728;
    --gold: #C9A15C;
    --gold-light: #C9A15C;
    --accent: #B98D5E;
    --green: #25d366;
    --bg: #FAF6EF;
    --surface: #E9DEC9;
    --text: #2C2A26;
    --text-muted: #6B5D4F;
    --border: #D4C5A9;
    --shadow-sm: 0 2px 10px rgba(74, 55, 40, 0.08);
    --shadow-md: 0 12px 32px rgba(74, 55, 40, 0.12);
    --shadow-lg: 0 24px 60px rgba(74, 55, 40, 0.18);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --font-heading: "Poppins", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
}

/* ---------- Dark theme overrides (must come after :root) ---------- */
[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dashboard-page {
    background: var(--bg);
}

[data-theme="dark"] .metric-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .summary-card {
    background: var(--surface);
}

[data-theme="dark"] .metric-card__value {
    color: #f1f5f9;
}

[data-theme="dark"] .chart-card h3,
[data-theme="dark"] .summary-card h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .summary-list li {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .summary-list strong {
    color: #e6c15a;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin: 0 0 0.5em;
    line-height: 1.2;
}

p {
    margin: 0 0 1em;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75em;
}

.text-gradient {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-head--light .eyebrow,
.section-head--light h2 {
    color: #fff;
}

.section-lead {
    color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 999px;
    padding: 0.85rem 1.6rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.02rem;
}

.btn--sm {
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
}

.btn--primary {
    background: var(--green);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}

.btn--ghost:hover {
    background: var(--navy);
    color: #fff;
    transform: translateY(-2px);
}

.btn--ghost-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn--ghost-light:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn--danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn--ghost.btn--danger {
    background: transparent;
    color: #dc2626;
    border-color: #fecaca;
}

.btn--ghost.btn--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(246, 247, 251, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.brand__mark-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.brand__text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
}

.brand__text small {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 500;
}

.site-nav a:not(.btn) {
    position: relative;
    color: var(--text);
}

.site-nav a:not(.btn):hover {
    color: var(--navy);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
}

.nav-burger span {
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    padding: 80px 0 60px;
}

.hero__glow {
    position: absolute;
    top: -180px;
    right: -160px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.25), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    margin-bottom: 0.4em;
}

.hero__lead {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 46ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 1.75rem 0;
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero__media {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero__photo-frame {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--navy), var(--navy-light));
    padding: 10px;
    box-shadow: var(--shadow-lg);
}

.hero__photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-lg) - 6px);
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    border: 1px dashed rgba(230, 193, 90, 0.5);
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 4rem;
}

.hero__photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 6px);
    image-rendering: high-quality;
}

.hero__badge {
    position: absolute;
    left: -10px;
    bottom: 24px;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.hero__badge strong {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--navy);
}

.hero__badge span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- Stats ---------- */
.stats {
    background: var(--navy);
    padding: 40px 0;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat__number {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.1rem;
    color: var(--gold-light);
}

.stat__label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

/* ---------- About ---------- */
.about {
    padding: 100px 0;
}

.about__inner {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: center;
}

.about__photo-placeholder {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--navy), var(--navy-light));
    display: grid;
    place-items: center;
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3.5rem;
    box-shadow: var(--shadow-md);
}

.about__photo-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about__list {
    display: grid;
    gap: 10px;
    margin-top: 1.25rem;
}

.about__list li {
    position: relative;
    padding-left: 28px;
    color: var(--text);
}

.about__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

.about__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.about__cta svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ---------- Services ---------- */
.services {
    padding: 100px 0;
    background: var(--surface);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.service-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5em;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin: 0;
}

/* ---------- Why ---------- */
.why {
    padding: 100px 0;
    background: linear-gradient(160deg, var(--navy), var(--navy-dark));
}

.why__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.why-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 28px 22px;
    color: #fff;
    text-align: center;
}

.why-card__icon {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
}

.why-card h3 {
    color: #fff;
    font-size: 1.02rem;
}

.why-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin: 0;
}

/* ---------- Process ---------- */
.process {
    padding: 100px 0;
}

.process__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.process-step {
    position: relative;
    padding: 32px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.process-step__number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

.process-step h3 {
    font-size: 1.02rem;
}

.process-step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ---------- Testimonials ---------- */
.testimonials {
    padding: 100px 0;
    background: var(--surface);
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    margin: 0;
    padding: 28px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-style: italic;
    color: var(--text);
}

.testimonial-card footer {
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--navy);
}

.testimonial-card__stars {
    color: var(--gold, var(--accent));
    margin-left: 4px;
}

.testimonials__google-link {
    text-align: center;
    margin: 32px 0 0;
    font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq {
    padding: 100px 0;
}

.faq__list {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.faq__empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-category {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-category__title {
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    padding: 16px 22px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-category__title::-webkit-details-marker {
    display: none;
}

.faq-category__title::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--gold);
}

.faq-category[open] .faq-category__title {
    border-bottom: 1px solid var(--border);
}

.faq-category[open] .faq-category__title::after {
    content: "−";
}

.faq-category__items {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
}

.faq-item summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--navy);
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    font-size: 1.3rem;
    color: var(--gold);
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin: 0.9rem 0 0;
    color: var(--text-muted);
}

/* ---------- CTA ---------- */
.cta {
    padding: 90px 0;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    text-align: center;
}

.cta__inner {
    max-width: 680px;
}

.cta h2 {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 0 28px;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer .brand__text {
    color: #fff;
}

.site-footer__contact p {
    margin: 0 0 6px;
    font-size: 0.92rem;
}

.site-footer__legal {
    font-size: 0.82rem;
    text-align: right;
}

.site-footer__disclaimer {
    opacity: 0.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {

    .hero__inner,
    .about__inner {
        grid-template-columns: 1fr;
    }

    .hero__media {
        order: -1;
    }

    .services__grid,
    .why__grid,
    .process__steps,
    .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .site-footer__legal {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .nav-burger {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 24px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-nav a {
        width: 100%;
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
    }

    .site-nav .btn {
        margin: 14px 0;
    }

    .nav-toggle:checked~.site-nav {
        max-height: 400px;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services__grid,
    .why__grid,
    .process__steps,
    .testimonials__grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Admin panel shell ---------- */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--navy), var(--navy-dark));
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
}

.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-sidebar__brand-text strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.2;
}

.admin-sidebar__brand-text small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
}

.admin-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 4px;
    overflow-y: auto;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.92rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-nav__link--active {
    background: rgba(201, 162, 39, 0.18);
    color: var(--gold-light);
}

.admin-sidebar__footer {
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-sidebar__link {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 0;
}

.admin-sidebar__link:hover {
    color: #fff;
}

.admin-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.admin-topbar__title {
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
}

.admin-burger span {
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
}

.admin-main {
    padding: 28px;
    flex: 1;
}

.admin-flash {
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.admin-flash--notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.admin-flash--alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ---------- Admin panel text colors (light mode) ---------- */
.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell h4 {
    color: var(--text);
}

.admin-shell strong {
    color: var(--text);
}

.admin-shell .schedule-date-btn {
    color: var(--text);
}

.admin-shell .btn--ghost {
    border-color: var(--text-muted);
    color: var(--text);
}

.admin-shell .btn--ghost:hover {
    background: var(--text-muted);
    color: #fff;
}

/* ---------- Toast notifications ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: min(380px, calc(100vw - 40px));
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

.toast--show {
    opacity: 1;
    transform: translateX(0);
}

.toast--notice {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.toast--alert {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.toast__icon {
    font-size: 1.1rem;
    line-height: 1;
}

.toast__msg {
    flex: 1;
}

.toast__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast__close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ---------- Admin page header (toolbar) ---------- */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-toolbar__title h2 {
    margin: 0;
    font-size: 1.4rem;
}

.admin-toolbar__title p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.admin-toolbar__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Admin search/filter bar ---------- */
.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.admin-filters .filter-group {
    flex: 1 1 180px;
    min-width: 160px;
}

.admin-filters .filter-group.actions {
    flex: 0 0 auto;
}

.admin-filters input,
.admin-filters select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.admin-filters input:focus,
.admin-filters select:focus {
    border-color: var(--gold);
}

/* ---------- Admin card (wraps tables/forms) ---------- */
.admin-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

/* ---------- Admin forms ---------- */
.admin-form {
    display: grid;
    gap: 18px;
    max-width: 640px;
}

.admin-form__row {
    display: grid;
    gap: 6px;
}

.admin-form__row--2 {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-form label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="tel"],
.admin-form input[type="number"],
.admin-form input[type="date"],
.admin-form input[type="time"],
.admin-form input[type="datetime-local"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--gold);
}

.admin-form textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--font-body);
}

.admin-form__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-form__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-form__error {
    color: #b91c1c;
    font-size: 0.82rem;
}

/* ---------- Status badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge--pendente {
    background: #fef3c7;
    color: #92400e;
}

.badge--confirmado {
    background: #d1fae5;
    color: #065f46;
}

.badge--cancelado {
    background: #f1f5f9;
    color: #475569;
}

.badge--rejeitado {
    background: #fee2e2;
    color: #991b1b;
}

.badge--sim {
    background: #d1fae5;
    color: #065f46;
}

.badge--nao {
    background: #f1f5f9;
    color: #475569;
}

/* ---------- Action links in tables ---------- */
.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions a,
.admin-actions button,
.admin-actions .btn {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--navy);
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.admin-actions a:hover,
.admin-actions button:hover,
.admin-actions .btn:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.admin-actions .admin-actions--danger,
.admin-actions .btn--ghost.btn--danger {
    color: #dc2626;
    border-color: #fecaca;
}

.admin-actions .admin-actions--danger:hover,
.admin-actions .btn--ghost.btn--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* ---------- Empty state ---------- */
.admin-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

/* ---------- Process timeline (legal processes flow) ---------- */
.process-timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.process-timeline,
.process-stage-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.process-stage-children {
    margin-top: 14px;
    padding-left: 26px;
    border-left: 2px solid var(--border);
}

.process-stage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.process-stage-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.process-stage-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.process-stage-card__type {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
}

.process-stage-card__dates {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.process-stage-card__date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.process-stage-card__obs {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

.process-stage-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.process-stage-card__actions .btn {
    font-size: 0.78rem;
    padding: 4px 10px;
}

[data-theme="dark"] .process-stage-card {
    background: var(--navy-light);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .process-stage-children {
    border-left-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .process-stage-card__type {
    color: var(--text);
}

/* ---------- Schedule grid (agenda) ---------- */
.schedule-grid {
    display: grid;
    gap: 12px;
}

.schedule-day {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.schedule-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.schedule-day__date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.schedule-day__count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 999px;
}

.schedule-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.schedule-slot {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.schedule-slot--expediente {
    background: #d1fae5;
    color: #065f46;
}

.schedule-slot--bloqueio {
    background: #fee2e2;
    color: #991b1b;
}

.schedule-slot--agendado {
    background: #fef3c7;
    color: #92400e;
}

/* ---------- Public scheduling page ---------- */
.schedule-page {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--bg), #fff);
    padding: 60px 24px;
}

.schedule-page__card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
}

.schedule-page__card h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.5em;
}

.schedule-page__card .section-lead {
    text-align: center;
    margin-bottom: 2rem;
}

.schedule-dates {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.schedule-date-btn {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.schedule-date-btn:hover {
    border-color: var(--gold);
}

.schedule-date-btn--active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.schedule-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.schedule-slot-btn {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
    text-align: center;
    transition: all 0.15s ease;
}

.schedule-slot-btn:hover {
    border-color: var(--gold);
    background: var(--bg);
}

.schedule-slot-btn--selected {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.schedule-slot-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- Settings sections ---------- */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.settings-section p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

/* ---------- Photo grid ---------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.photo-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
}

.photo-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.photo-item__body {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.photo-item__title {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Admin responsive ---------- */
@media (max-width: 960px) {
    .admin-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        transition: left 0.25s ease;
    }

    .admin-sidebar--open {
        left: 0;
    }

    .admin-burger {
        display: flex;
    }

    .admin-main {
        padding: 20px 16px;
    }
}

@media (max-width: 600px) {
    .admin-form__row--2 {
        grid-template-columns: 1fr;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Dark theme for admin ---------- */
[data-theme="dark"] .admin-topbar {
    background: var(--surface);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .admin-topbar__title {
    color: #f1f5f9;
}

[data-theme="dark"] .admin-burger span {
    background: #e2e8f0;
}

[data-theme="dark"] .admin-card {
    background: var(--surface);
}

[data-theme="dark"] .admin-form label {
    color: #e2e8f0;
}

[data-theme="dark"] .admin-form input,
[data-theme="dark"] .admin-form select,
[data-theme="dark"] .admin-form textarea,
[data-theme="dark"] .admin-filters input,
[data-theme="dark"] .admin-filters select {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .admin-actions a,
[data-theme="dark"] .admin-actions button {
    background: var(--surface);
    border-color: var(--border);
    color: #e2e8f0;
}

[data-theme="dark"] .admin-actions a:hover,
[data-theme="dark"] .admin-actions button:hover {
    background: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .schedule-day {
    background: var(--surface);
}

[data-theme="dark"] .schedule-day__date {
    color: #f1f5f9;
}

[data-theme="dark"] .schedule-day__count {
    background: #0f172a;
    color: #94a3b8;
}

[data-theme="dark"] .card-title {
    color: #f1f5f9;
}

[data-theme="dark"] .schedule-date-btn,
[data-theme="dark"] .schedule-slot-btn {
    background: var(--surface);
    border-color: var(--border);
    color: #e2e8f0;
}

[data-theme="dark"] .photo-item {
    background: var(--surface);
    border-color: var(--border);
}

/* Dark mode: fix ghost buttons and admin action buttons visibility */
[data-theme="dark"] .btn--ghost {
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .btn--ghost:hover {
    background: #334155;
    color: #fff;
}

[data-theme="dark"] .admin-actions a,
[data-theme="dark"] .admin-actions button {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .admin-actions a:hover,
[data-theme="dark"] .admin-actions button:hover {
    background: #334155;
}

[data-theme="dark"] .admin-actions .admin-actions--danger {
    color: #f87171;
    border-color: #7f1d1d;
}

[data-theme="dark"] .admin-actions .admin-actions--danger:hover {
    background: #450a0a;
}

[data-theme="dark"] .admin-flash--notice {
    background: #052e16;
    border-color: #14532d;
    color: #86efac;
}

[data-theme="dark"] .admin-flash--alert {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .badge--pendente {
    background: #78350f;
    color: #fcd34d;
}

[data-theme="dark"] .badge--confirmado,
[data-theme="dark"] .badge--sim {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .badge--cancelado,
[data-theme="dark"] .badge--nao {
    background: #1e293b;
    color: #94a3b8;
}

[data-theme="dark"] .badge--rejeitado {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .schedule-slot--expediente {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .schedule-slot--bloqueio {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .schedule-slot--agendado {
    background: #78350f;
    color: #fcd34d;
}

/* Blog article styles */
.blog-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px;
}

.blog-article h1 {
    font-size: 2rem;
    margin-bottom: 0.5em;
}

.blog-article__meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.blog-article__content {
    line-height: 1.8;
}

.blog-article__content p {
    margin-bottom: 1.2em;
}

.blog-list {
    padding: 60px 24px;
}

.blog-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5em;
}

.blog-card__meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.blog-card__resumo {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ---------- Dark mode: fix invisible headers and labels ---------- */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #f1f5f9;
}

/* ---------- Collapsible admin sections ---------- */
.collapsible {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}

.collapsible.is-open {
    border-color: var(--gold);
    overflow: visible;
}

.collapsible__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    text-align: left;
    transition: background 0.15s ease;
}

.collapsible__trigger:hover {
    background: rgba(201, 162, 92, 0.08);
}

.collapsible__trigger-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--gold);
    transition: transform 0.2s ease;
}

.collapsible.is-open .collapsible__trigger-icon {
    transform: rotate(90deg);
}

.collapsible__content {
    display: none;
    overflow: hidden;
    padding: 0 20px;
}

.collapsible.is-open .collapsible__content {
    display: block;
    padding: 0 20px 20px;
}

/* ---------- Dark mode collapsible ---------- */
[data-theme="dark"] .collapsible__trigger {
    color: #f1f5f9;
}

[data-theme="dark"] .collapsible__trigger:hover {
    background: rgba(230, 193, 90, 0.08);
}

[data-theme="dark"] .collapsible.is-open {
    border-color: #e6c15a;
}

/* ---------- Sortable list items ---------- */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sortable-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sortable-item:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}

.sortable-item.is-dragging {
    opacity: 0.6;
    cursor: grabbing;
}

.sortable-item__handle {
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: grab;
    line-height: 1;
    padding-top: 2px;
    flex-shrink: 0;
}

.sortable-item__body {
    flex: 1;
    min-width: 0;
}

.sortable-item__body strong {
    color: var(--text);
}

.sortable-item__body p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 4px 0 0;
}

[data-theme="dark"] .sortable-item__body strong {
    color: #e2e8f0;
}

[data-theme="dark"] .sortable-item__handle {
    color: #64748b;
}

[data-theme="dark"] .sortable-item:hover {
    border-color: #e6c15a;
}

.collapsible__content .admin-card {
    margin-bottom: 0;
    box-shadow: none;
    border: 1px solid var(--border);
}

[data-theme="dark"] .collapsible {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .collapsible__trigger {
    color: #f1f5f9;
}

[data-theme="dark"] .collapsible__trigger:hover {
    background: rgba(148, 163, 184, 0.08);
}

/* ---------- WhatsApp message field ---------- */
.whatsapp-message-field {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    background: var(--bg);
    margin-bottom: 16px;
}

.whatsapp-message-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.whatsapp-message-field__header label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.whatsapp-message-field__variables {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
}

.whatsapp-variable {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(37, 211, 102, 0.12);
    color: #075e54;
    border: 1px solid rgba(37, 211, 102, 0.35);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.whatsapp-variable:hover {
    background: rgba(37, 211, 102, 0.22);
    transform: translateY(-1px);
}

.whatsapp-message-field__input {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    background: var(--surface);
    color: var(--text);
    resize: vertical;
    outline: none;
    margin-bottom: 14px;
    line-height: 1.5;
}

.whatsapp-message-field__input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.whatsapp-message-field__preview {
    background: #e5ddd5;
    border-radius: var(--radius-sm);
    padding: 14px;
}

.whatsapp-message-field__preview strong {
    display: block;
    font-size: 0.75rem;
    color: #54656f;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.whatsapp-message-field__preview-body {
    position: relative;
    background: #dcf8c6;
    color: #111b21;
    padding: 10px 12px;
    border-radius: 0 12px 12px 12px;
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.whatsapp-message-field__preview-body::after {
    content: "";
    position: absolute;
    top: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #dcf8c6 transparent transparent;
}

[data-theme="dark"] .whatsapp-message-field {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .whatsapp-message-field__header label {
    color: #f1f5f9;
}

[data-theme="dark"] .whatsapp-message-field__input {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .whatsapp-message-field__preview {
    background: #1f2c34;
}

[data-theme="dark"] .whatsapp-message-field__preview strong {
    color: #94a3b8;
}

[data-theme="dark"] .whatsapp-message-field__preview-body {
    background: #005c4b;
    color: #e2e8f0;
}

[data-theme="dark"] .whatsapp-message-field__preview-body::after {
    border-color: transparent #005c4b transparent transparent;
}

[data-theme="dark"] .admin-card h3,
[data-theme="dark"] .admin-card h4 {
    color: #f1f5f9;
}

[data-theme="dark"] .metric-card__label {
    color: #cbd5e1;
}

[data-theme="dark"] .metric-card__value {
    color: #f8fafc;
}

[data-theme="dark"] .chart-card h3,
[data-theme="dark"] .summary-card h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .summary-list li span {
    color: #cbd5e1;
}

[data-theme="dark"] .summary-list strong {
    color: #e6c15a;
}

[data-theme="dark"] .data-table th {
    color: #cbd5e1;
}

[data-theme="dark"] .data-table td {
    color: #e2e8f0;
}

[data-theme="dark"] .admin-empty {
    color: #94a3b8;
}

[data-theme="dark"] .admin-toolbar__title p {
    color: #94a3b8;
}

[data-theme="dark"] .section-lead {
    color: #94a3b8;
}

/* ---------- Admin Options Tab ---------- */
.admin-options-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--navy);
}

.tab-btn.active {
    color: var(--navy);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
}

.admin-options-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .admin-options-grid {
        grid-template-columns: 1fr;
    }
}

.sticky-card {
    position: sticky;
    top: 24px;
}

.admin-options-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-options-lists--two-rows {
    grid-template-columns: 1fr;
}

.admin-options-lists--two-rows .admin-options-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .admin-options-lists,
    .admin-options-lists--two-rows .admin-options-row {
        grid-template-columns: 1fr;
    }
}

.option-help-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.text-right {
    text-align: right;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.action-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--navy);
}

.action-link.edit {
    color: #4f46e5;
}

[data-theme="dark"] .action-link.edit {
    color: #a5b4fc;
}

.action-link.danger {
    color: #dc2626;
    border: none;
    background: transparent;
    cursor: pointer;
}

.action-link.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* Simple icon placeholders if actual icons are not imported */
.icon-edit::before {
    content: "✎";
    font-weight: bold;
}

.icon-delete::before {
    content: "🗑";
}

/* Pagination bar (Pagy 43 — nav.pagy.series-nav) */
.pagination-bar {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-bar nav.pagy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.pagination-bar nav.pagy a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

/* Normal page links */
.pagination-bar nav.pagy a[href]:not([aria-disabled="true"]):hover {
    background: rgba(74, 55, 40, 0.08);
    border-color: var(--border);
    color: var(--navy);
}

/* Active page — aria-current="page", no href */
.pagination-bar nav.pagy a[aria-current="page"] {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

/* Disabled (prev when on page 1, next when on last page) */
.pagination-bar nav.pagy a[aria-disabled="true"]:not([aria-current="page"]):not([role="separator"]) {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}

/* Ellipsis / gap separator */
.pagination-bar nav.pagy a[role="separator"] {
    color: var(--text-muted);
    cursor: default;
    background: transparent;
    min-width: 28px;
}

/* Prev / Next arrows */
.pagination-bar nav.pagy a[aria-label="Previous"],
.pagination-bar nav.pagy a[aria-label="Next"] {
    font-size: 0.9rem;
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] .pagination-bar nav.pagy a {
    color: #e2e8f0;
}

[data-theme="dark"] .pagination-bar nav.pagy a[href]:not([aria-disabled="true"]):hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .pagination-bar nav.pagy a[aria-current="page"] {
    background: #e6c15a;
    color: #1e293b;
}

[data-theme="dark"] .pagination-bar nav.pagy a[aria-disabled="true"]:not([aria-current="page"]):not([role="separator"]) {
    color: #64748b;
    opacity: 0.5;
}

[data-theme="dark"] .pagination-bar nav.pagy a[role="separator"] {
    color: #64748b;
}

/* ---------- Admin Extensions (Leads & Options) ---------- */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.filter-group.actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

/* Quick filter chips */
.quick-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-filter-chip:hover,
.quick-filter-chip.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.quick-filter-chip i {
    font-size: 0.75rem;
}

/* Modern Table */
.table-responsive {
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    .table-responsive {
        overflow-x: auto;
    }
}

.modern-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto;
}

.modern-thead th {
    background: rgba(74, 55, 40, 0.05);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 12px 16px;
    vertical-align: middle;
}

.modern-tr td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.modern-tr {
    transition: all 0.2s ease;
}

.modern-tr:hover {
    background: rgba(74, 55, 40, 0.03) !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.lead-name-cell {
    font-weight: 600;
}

.lead-link {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lead-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

[data-theme="dark"] .lead-link {
    color: #e2e8f0;
}

[data-theme="dark"] .lead-link:hover {
    color: #e6c15a;
}

/* Phone cell: keep default table-cell display so the <td> fills the full row
   height and its bottom border stays aligned with every other column.
   Inner elements use inline-flex for the icon+number layout. */
.lead-phone-cell {
    white-space: nowrap;
}

.lead-phone-cell .phone-number,
.lead-phone-cell .whatsapp-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.phone-number {
    color: var(--text);
}

.whatsapp-link {
    color: var(--green);
    border-color: transparent;
}

.whatsapp-link:hover {
    background: transparent;
    color: #1eb04f;
    border-color: transparent;
}

[data-theme="dark"] .whatsapp-link {
    color: #25d366;
}

[data-theme="dark"] .whatsapp-link:hover {
    color: #4ade80;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.text-right {
    text-align: right;
}

.table-note {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: rgba(74, 55, 40, 0.02);
}

.table-note i {
    margin-right: 4px;
}

/* Action Links - FIXED SIZE AND ALIGNMENT */
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--navy);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.action-link i {
    font-size: 0.9rem;
    display: block;
}

.action-link:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    transform: translateY(-2px);
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* Lead Show Page Layout */
.admin-main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    align-items: start;
}

.lead-summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-weight: 500;
    color: var(--text);
}

.info-item.full-width {
    grid-column: span 2;
}

.obs-text {
    font-style: italic;
    color: var(--text-muted);
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Action buttons grid (show page) */
.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.action-buttons-grid .btn {
    justify-content: center;
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 8px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 44px;
    bottom: -24px;
    width: 2px;
    background: var(--border);
}

.timeline-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.timeline-icon--blue {
    background: #3b82f6;
}

.timeline-icon--gold {
    background: var(--gold);
    color: var(--navy);
}

.timeline-icon--green {
    background: #22c55e;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-header {
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
}

.timeline-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Chat Bubbles */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    position: relative;
    line-height: 1.45;
}

.chat-bubble.user {
    align-self: flex-start;
    background: var(--surface);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

.chat-bubble.assistant {
    align-self: flex-end;
    background: var(--navy);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble__header {
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.7;
    font-weight: 600;
}

.chat-bubble__content p {
    margin-bottom: 0.5em;
}

.chat-bubble__content p:last-child {
    margin-bottom: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Options chips */
.options-chips-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 4px;
}

.option-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.option-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.option-chip:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.chip-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.chip-actions .action-link {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.8rem;
}

/* Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.badge--sim {
    background: #dcfce7;
    color: #166534;
}

.badge--nao {
    background: #fee2e2;
    color: #991b1b;
}

.badge--em-andamento {
    background: #fef9c3;
    color: #854d0e;
}

.badge--fechado {
    background: #f1f5f9;
    color: #475569;
}

.badge--aberto {
    background: #dbeafe;
    color: #1e40af;
}

@media (max-width: 800px) {
    .admin-main-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-item.full-width {
        grid-column: span 1;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .quick-filter-chips {
        gap: 6px;
    }

    .quick-filter-chip {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .admin-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filters .filter-group,
    .admin-filters .filter-group.actions {
        flex: 1 1 auto;
        width: 100%;
    }

    .admin-filters .filter-group.actions {
        justify-content: flex-start;
    }
}

/* ---------- WhatsApp link in leads table: inline green icon, not the 36x36 box ---------- */
.whatsapp-link.action-link {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 2px 4px;
    border: none;
    background: transparent;
    color: var(--green);
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transform: none;
}

.whatsapp-link.action-link:hover {
    background: transparent;
    color: #1eb04f;
    border-color: transparent;
    transform: none;
}

[data-theme="dark"] .whatsapp-link.action-link {
    color: #25d366;
}

[data-theme="dark"] .whatsapp-link.action-link:hover {
    color: #4ade80;
}

/* ---------- Dark mode: action-link base color ---------- */
[data-theme="dark"] .action-link {
    color: #cbd5e1;
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .action-link:hover {
    background: #475569;
    color: #fff;
    border-color: #64748b;
}

/* ---------- Process type badges ---------- */
.process-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.process-type-badge i {
    font-size: 0.72rem;
}

.process-type-badge--administrativo {
    background: #dbeafe;
    color: #1e40af;
}

.process-type-badge--judicial {
    background: #f3e8ff;
    color: #6b21a8;
}

[data-theme="dark"] .process-type-badge--administrativo {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .process-type-badge--judicial {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
}

/* ---------- Stage count pill ---------- */
.stage-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--border);
    color: var(--text);
    font-weight: 700;
    font-size: 0.82rem;
    font-family: var(--font-heading);
}

[data-theme="dark"] .stage-count {
    background: #334155;
    color: #e2e8f0;
}

/* ---------- Badge icons ---------- */
.badge i {
    margin-right: 5px;
    font-size: 0.78rem;
}

/* ---------- Process timeline redesign ---------- */
.process-timeline-wrap {
    position: relative;
    padding-left: 4px;
}

.process-stage-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.process-stage-card:hover {
    box-shadow: var(--shadow-md);
}

/* Semantic left-border color by status */
.process-stage-card--confirmado {
    border-left-color: #16a34a;
}

.process-stage-card--rejeitado {
    border-left-color: #dc2626;
}

.process-stage-card--pendente {
    border-left-color: var(--gold);
}

[data-theme="dark"] .process-stage-card--confirmado {
    border-left-color: #22c55e;
}

[data-theme="dark"] .process-stage-card--rejeitado {
    border-left-color: #ef4444;
}

[data-theme="dark"] .process-stage-card--pendente {
    border-left-color: #e6c15a;
}

/* Stage icon */
.process-stage-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.process-stage-card--confirmado .process-stage-card__icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.process-stage-card--rejeitado .process-stage-card__icon {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.process-stage-card--pendente .process-stage-card__icon {
    background: rgba(201, 161, 92, 0.15);
    color: var(--gold);
}

[data-theme="dark"] .process-stage-card--confirmado .process-stage-card__icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

[data-theme="dark"] .process-stage-card--rejeitado .process-stage-card__icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

[data-theme="dark"] .process-stage-card--pendente .process-stage-card__icon {
    background: rgba(230, 193, 90, 0.15);
    color: #e6c15a;
}

[data-theme="dark"] .process-stage-card__type {
    color: #f1f5f9;
}

.process-stage-card__date i {
    margin-right: 3px;
    font-size: 0.72rem;
    opacity: 0.7;
}

/* Children connector line */
.process-stage-children {
    margin-top: 14px;
    padding-left: 26px;
    border-left: 2px solid var(--border);
    list-style: none;
    margin: 0;
    padding: 0;
    padding-left: 26px;
}

[data-theme="dark"] .process-stage-children {
    border-left-color: #475569;
}

/* ---------- Form label icons ---------- */
.info-label-icon {
    margin-right: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ---------- Danger button variant ---------- */
.btn--danger {
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.btn--danger:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
}

[data-theme="dark"] .btn--danger {
    color: #f87171 !important;
    border-color: #7f1d1d !important;
}

[data-theme="dark"] .btn--danger:hover {
    background: #450a0a !important;
    color: #fca5a5 !important;
}

/* ---------- Process show page header icons ---------- */
.admin-card h3 i,
.admin-toolbar h2 i {
    margin-right: 6px;
}

[data-theme="dark"] .process-stage-card__obs i {
    color: var(--text-muted);
}

/* ---------- Form label icons ---------- */
.admin-form label i {
    margin-right: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    opacity: 0.7;
    width: 1em;
    text-align: center;
}

/* ---------- Button icons ---------- */
.btn i {
    margin-right: 5px;
}

.btn--sm i {
    margin-right: 4px;
    font-size: 0.82rem;
}

/* Submit button with icon */
.btn[type="submit"] {
    display: inline-flex;
    align-items: center;
}

/* ---------- Blog category badge ---------- */
.blog-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(201, 161, 92, 0.12);
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.blog-category-badge i {
    font-size: 0.7rem;
}

[data-theme="dark"] .blog-category-badge {
    background: rgba(230, 193, 90, 0.12);
    color: #e6c15a;
}

/* ---------- Blog publish toggle ---------- */
.blog-publish-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.blog-publish-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.blog-publish-toggle i {
    color: var(--gold);
}

[data-theme="dark"] .blog-publish-toggle {
    color: #e2e8f0;
}

/* ---------- Blog content preview ---------- */
.blog-content-preview {
    line-height: 1.8;
    color: var(--text);
}

.blog-content-preview p {
    margin-bottom: 12px;
}

[data-theme="dark"] .blog-content-preview {
    color: #e2e8f0;
}

/* ---------- Blog status badges (published/draft) ---------- */
.badge--sim i,
.badge--nao i {
    font-size: 0.72rem;
}

/* ---------- Finance value color coding ---------- */
.finance-value {
    font-weight: 700;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.data-table td.finance-value--positive {
    color: #16a34a;
}

.data-table td.finance-value--negative {
    color: #dc2626;
}

[data-theme="dark"] .data-table td.finance-value--positive {
    color: #4ade80;
}

[data-theme="dark"] .data-table td.finance-value--negative {
    color: #f87171;
}

/* ---------- Metric card label icons ---------- */
.metric-card__label i {
    margin-right: 4px;
    font-size: 0.72rem;
    opacity: 0.7;
}

/* ---------- Sticky save bar ---------- */
.admin-sticky-save {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px;
    margin: 20px -24px -24px;
    background: linear-gradient(to top, var(--bg) 60%, transparent);
    z-index: 100;
}

[data-theme="dark"] .admin-sticky-save {
    background: linear-gradient(to top, #0f172a 60%, transparent);
}

/* ---------- Content section divider ---------- */
.content-section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.content-section-divider__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(201, 161, 92, 0.12);
    color: var(--gold);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.content-section-divider__label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .content-section-divider {
    border-bottom-color: #334155;
}

[data-theme="dark"] .content-section-divider__icon {
    background: rgba(230, 193, 90, 0.12);
    color: #e6c15a;
}

[data-theme="dark"] .content-section-divider__label {
    color: #f1f5f9;
}

/* ---------- Content section count badge ---------- */
.content-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--border);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-left: 6px;
}

[data-theme="dark"] .content-section-count {
    background: #334155;
    color: #cbd5e1;
}

/* ---------- Content add form ---------- */
.content-add-form {
    background: rgba(201, 161, 92, 0.06);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.content-add-form__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.content-add-form__title i {
    color: var(--gold);
    margin-right: 4px;
}

[data-theme="dark"] .content-add-form {
    background: rgba(230, 193, 90, 0.06);
    border-color: #475569;
}

/* ---------- Content items title ---------- */
.content-items-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-items-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--border);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 700;
}

[data-theme="dark"] .content-items-count {
    background: #334155;
    color: #cbd5e1;
}

/* ---------- Sortable item emoji ---------- */
.sortable-item__emoji {
    font-size: 1.1rem;
}

/* ---------- Dark mode: quick-filter-chip ---------- */
[data-theme="dark"] .quick-filter-chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .quick-filter-chip:hover,
[data-theme="dark"] .quick-filter-chip.active {
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}

/* ---------- Dark mode: action-link.btn--danger ---------- */
.action-link.btn--danger {
    color: #dc2626;
    border-color: #fecaca;
}

.action-link.btn--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

[data-theme="dark"] .action-link.btn--danger {
    color: #f87171;
    border-color: #7f1d1d;
    background: transparent;
}

[data-theme="dark"] .action-link.btn--danger:hover {
    background: #450a0a;
    color: #fca5a5;
    border-color: #991b1b;
}

/* ---------- FAQ / sortable dark mode refinements ---------- */
[data-theme="dark"] .sortable-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .sortable-item.is-dragging {
    background: #334155;
}

[data-theme="dark"] .quick-filter-chip {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

[data-theme="dark"] .quick-filter-chip:hover,
[data-theme="dark"] .quick-filter-chip.active {
    background: #4A3728;
    border-color: #e6c15a;
    color: #f1f5f9;
}

/* ===== WhatsApp connection (Evolution API) ===== */
.whatsapp-status-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm, 10px);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-status-box code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.82rem;
    word-break: break-all;
}

.whatsapp-status-box[data-state="connected"] {
    border-color: rgba(37, 211, 102, 0.55);
    background: rgba(37, 211, 102, 0.10);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.10);
}

.whatsapp-status-box[data-state="connected"] > i { color: var(--green, #25d366); }

.whatsapp-status-box[data-state="offline"] {
    border-color: rgba(229, 72, 77, 0.55);
    background: rgba(229, 72, 77, 0.08);
}

.whatsapp-status-box[data-state="offline"] > i { color: #e5484d; }

.whatsapp-status-box[data-state="waiting"] {
    border-color: rgba(217, 119, 6, 0.55);
    background: rgba(217, 119, 6, 0.08);
}

.whatsapp-status-box[data-state="waiting"] .whatsapp-status-box__spinner {
    border-color: rgba(217, 119, 6, 0.25);
    border-top-color: #d97706;
}

.whatsapp-status-box[data-state="idle"] > i,
.whatsapp-status-box[data-state="closed"] > i { color: var(--accent, #B98D5E); }

.whatsapp-status-box__spinner {
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--accent, #B98D5E);
    border-radius: 50%;
    animation: whatsapp-spin 0.8s linear infinite;
}

@keyframes whatsapp-spin {
    to { transform: rotate(360deg); }
}

/* Dark mode: tintes mais visíveis sobre o --surface escuro e "waiting"
   adota o dourado do painel em vez do âmbar (combina com o tema) */
[data-theme="dark"] .whatsapp-status-box code {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .whatsapp-status-box[data-state="connected"] {
    border-color: rgba(37, 211, 102, 0.6);
    background: rgba(37, 211, 102, 0.14);
}

[data-theme="dark"] .whatsapp-status-box[data-state="offline"] {
    background: rgba(229, 72, 77, 0.12);
}

[data-theme="dark"] .whatsapp-status-box[data-state="waiting"] {
    border-color: rgba(230, 193, 90, 0.6);
    background: rgba(230, 193, 90, 0.10);
}

[data-theme="dark"] .whatsapp-status-box[data-state="waiting"] .whatsapp-status-box__spinner {
    border-color: rgba(230, 193, 90, 0.3);
    border-top-color: #e6c15a;
}

.whatsapp-qr-box {
    margin-top: 16px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    /* off-white levemente quente: integra com a paleta creme sem "frieza"
       de branco puro (o QR em si fica no quadro branco da __img) */
    background: #FDFCF8;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 18px);
    box-shadow: var(--shadow-sm);
}

.whatsapp-qr-box__img {
    width: 240px;
    height: 240px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    /* "respiração" verde sutil: sinal de que o QR está vivo e esperando o scan */
    animation: whatsapp-qr-pulse 2.4s ease-in-out infinite;
}

@keyframes whatsapp-qr-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
    50% { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.16); }
}

.whatsapp-qr-box__hint {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted, #6B5D4F);
    margin: 0;
    max-width: 460px;
    text-align: center;
    line-height: 1.5;
}

.whatsapp-qr-box__code {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text);
}

.whatsapp-qr-box__code strong {
    letter-spacing: 0.18em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Dark mode: card escuro com moldura dourada sutil; o QR mantém o fundo
   branco do PNG e ganha cantos arredondados pra "emoldurar" o quadro */
[data-theme="dark"] .whatsapp-qr-box {
    background: var(--surface);
    border-color: rgba(230, 193, 90, 0.35);
    box-shadow: 0 0 0 4px rgba(230, 193, 90, 0.05), var(--shadow-md);
}

/* Botão "Conectar WhatsApp": verde suave, coerente com o estado connected */
.btn--whatsapp {
    background: rgba(37, 211, 102, 0.14);
    border: 2px solid rgba(37, 211, 102, 0.45);
    color: #128C4B;
}

.btn--whatsapp:hover:not(:disabled) {
    background: rgba(37, 211, 102, 0.22);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn--whatsapp:disabled {
    opacity: 0.6;
    cursor: default;
}

[data-theme="dark"] .btn--whatsapp {
    background: rgba(37, 211, 102, 0.16);
    border-color: rgba(37, 211, 102, 0.5);
    color: #6ee7a8;
}

[data-theme="dark"] .btn--whatsapp:hover:not(:disabled) {
    background: rgba(37, 211, 102, 0.24);
}

/* ============================================================
   WhatsApp Inbox (aba de conversas com clientes)
   ============================================================ */

.inbox {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .inbox {
        grid-template-columns: 1fr;
    }
}

/* ---------- status badge + switch (toolbar) ---------- */

.inbox-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.inbox-status-badge::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

.inbox-status-badge[data-state="connected"] {
    background: rgba(37, 211, 102, 0.14);
    border-color: rgba(37, 211, 102, 0.45);
    color: #128C4B;
}

.inbox-status-badge[data-state="connected"]::before {
    background: #25d366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.inbox-status-badge[data-state="waiting"] {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #b45309;
}

.inbox-status-badge[data-state="waiting"]::before {
    background: #f59e0b;
    animation: inbox-pulse 1.2s ease-in-out infinite;
}

.inbox-status-badge[data-state="offline"] {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

.inbox-status-badge[data-state="offline"]::before {
    background: #ef4444;
}

@keyframes inbox-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

[data-theme="dark"] .inbox-status-badge[data-state="connected"] { color: #6ee7a8; }
[data-theme="dark"] .inbox-status-badge[data-state="waiting"] { color: #fcd34d; }
[data-theme="dark"] .inbox-status-badge[data-state="offline"] { color: #fca5a5; }

.inbox-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.inbox-switch__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inbox-switch__control {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 23px;
    flex: none;
}

.inbox-switch__control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.inbox-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.inbox-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.inbox-switch__control input:checked + .inbox-switch__track {
    background: #128C4B;
}

.inbox-switch__control input:checked + .inbox-switch__track::after {
    transform: translateX(19px);
}

.inbox-switch__control input:focus-visible + .inbox-switch__track {
    box-shadow: 0 0 0 3px rgba(18, 140, 75, 0.3);
}

[data-theme="dark"] .inbox-switch__track {
    background: #475569;
}

/* ---------- list pane ---------- */

.inbox__list {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 220px);
    min-height: 420px;
}

[data-theme="dark"] .inbox__list {
    background: #111827;
}

.inbox__list-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.inbox__chats {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.inbox__chat {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.inbox__chat:hover {
    background: rgba(74, 55, 40, 0.05);
}

.inbox__chat.active {
    background: rgba(74, 55, 40, 0.1);
    box-shadow: inset 3px 0 0 var(--gold);
}

[data-theme="dark"] .inbox__chat:hover {
    background: rgba(148, 163, 184, 0.07);
}

[data-theme="dark"] .inbox__chat.active {
    background: rgba(148, 163, 184, 0.12);
}

.inbox__chat-avatar {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-light, #5d4636));
    color: #fff;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

/* foto de perfil do contato (sobrepõe o ícone; onerror remove e o ícone volta) */
.inbox__chat-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inbox__chat-main {
    flex: 1;
    min-width: 0;
}

.inbox__chat-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.inbox__chat-name {
    font-size: 0.9rem;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .inbox__chat-name {
    color: #e2e8f0;
}

.inbox__chat-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex: none;
}

.inbox__chat-preview {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox__chat-preview.is-own {
    color: var(--gold);
}

.inbox__empty {
    padding: 24px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- thread pane ---------- */

.inbox__thread {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 220px);
    min-height: 420px;
    position: relative;
}

[data-theme="dark"] .inbox__thread {
    background: #111827;
}

.inbox__thread-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.inbox__thread-header i {
    color: #25d366;
}

.inbox__thread-header strong {
    color: var(--navy);
}

[data-theme="dark"] .inbox__thread-header strong {
    color: #e2e8f0;
}

.inbox__messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background:
        radial-gradient(circle at 20% 20%, rgba(74, 55, 40, 0.03) 0, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(74, 55, 40, 0.03) 0, transparent 40%);
}

[data-theme="dark"] .inbox__messages {
    background:
        radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.04) 0, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(148, 163, 184, 0.04) 0, transparent 40%);
}

.inbox__no-messages {
    margin: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.inbox__msg {
    display: flex;
    flex-direction: column;
    max-width: 72%;
    align-self: flex-start;
}

.inbox__msg.is-own {
    align-self: flex-end;
    align-items: flex-end;
}

.inbox__bubble {
    padding: 9px 13px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.inbox__msg.is-own .inbox__bubble {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.35);
}

[data-theme="dark"] .inbox__bubble {
    background: #1e293b;
}

[data-theme="dark"] .inbox__msg.is-own .inbox__bubble {
    background: rgba(37, 211, 102, 0.14);
}

.inbox__sender {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2px;
}

.inbox__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.inbox__msg-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 4px;
}

/* ---------- composer ---------- */

.inbox__composer {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: rgba(74, 55, 40, 0.03);
}

[data-theme="dark"] .inbox__composer {
    background: rgba(148, 163, 184, 0.05);
}

.inbox__composer-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
    background: #fff;
    color: inherit;
}

.inbox__composer-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 161, 92, 0.2);
}

[data-theme="dark"] .inbox__composer-input {
    background: #0f172a;
    color: #e2e8f0;
}

.inbox__composer-btn {
    border-radius: 999px;
    padding: 10px 18px;
    flex: none;
}

.inbox__composer-emoji {
    border-radius: 999px;
    padding: 10px 14px;
    flex: none;
    font-size: 1.05rem;
    line-height: 1;
}

/* picker de emoji: flutua acima do composer */
.inbox__emoji-picker {
    position: absolute;
    right: 14px;
    bottom: 64px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    width: 336px;
    max-height: 230px;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] .inbox__emoji-picker {
    background: #1e293b;
}

.inbox__emoji-picker button {
    font-size: 1.25rem;
    line-height: 1;
    padding: 6px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
}

.inbox__emoji-picker button:hover {
    background: rgba(201, 161, 92, 0.2);
}

/* reações de mensagem: selos abaixo da bolha, estilo WhatsApp */
.inbox__reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
    padding: 0 4px;
}

.inbox__reaction {
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 2px 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .inbox__reaction {
    background: #1e293b;
}

.inbox__reaction.is-own {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold);
}

.inbox__reaction--more {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ---------- per-conversation auto-reply (toggle no thread + ícone na lista) ---------- */

.inbox__thread-title {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.inbox__thread-title strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-switch--mini .inbox-switch__label {
    font-size: 0.75rem;
}

.inbox-switch--mini .inbox-switch__control {
    width: 34px;
    height: 19px;
}

.inbox-switch--mini .inbox-switch__track::after {
    width: 13px;
    height: 13px;
}

.inbox-switch--mini .inbox-switch__control input:checked + .inbox-switch__track::after {
    transform: translateX(15px);
}

.inbox__chat-autoreply {
    font-size: 0.66rem;
    flex: none;
    margin-left: 2px;
}

.inbox__chat-autoreply.is-on {
    color: #128C4B;
}

.inbox__chat-autoreply.is-off {
    color: var(--text-muted);
    opacity: 0.55;
    position: relative;
}

.inbox__chat-autoreply.is-off::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    height: 1.5px;
    background: var(--text-muted);
    transform: rotate(-45deg);
}

/* ---------- media no thread ---------- */

.inbox__media {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 2px;
}

.inbox__media:only-child {
    margin-bottom: 0;
}

.inbox__media-img {
    max-width: 260px;
    max-height: 260px;
    border-radius: 8px;
    display: block;
    cursor: zoom-in;
}

.inbox__media-video {
    max-width: 280px;
    max-height: 220px;
    border-radius: 8px;
    display: block;
    background: #000;
}

.inbox__media-audio {
    width: 240px;
    height: 38px;
}

.inbox__media-download {
    flex: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.inbox__media-download:hover {
    color: var(--navy);
    border-color: var(--gold);
}

[data-theme="dark"] .inbox__media-download:hover {
    color: #e2e8f0;
}

.inbox__media-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 240px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(74, 55, 40, 0.06);
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox__media-chip i {
    color: var(--gold);
    flex: none;
}

[data-theme="dark"] .inbox__media-chip {
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
}

/* ---------- avatar no header do thread ---------- */

.inbox__thread-avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-light, #5d4636));
    color: #fff;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.inbox__thread-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- chip "mídia indisponível" ---------- */
/* O servidor do WhatsApp para de servir mídia de mensagens antigas
   (a URL expira lá e a busca volta 403). Mostra um chip no lugar do
   elemento quebrado, com o link de download ainda disponível. */

.inbox__media-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 260px;
    padding: 8px 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(74, 55, 40, 0.06);
    color: var(--text-muted);
    font-size: 0.8rem;
}

[data-theme="dark"] .inbox__media-unavailable {
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
}

.inbox__media-unavailable i {
    color: var(--gold);
    flex: none;
}

/* ---------- Página Dados: importação + zona de perigo ---------- */
.admin-data-container {
    display: grid;
    gap: 1.25rem;
    max-width: 760px;
}

.admin-card--danger {
    border: 1px solid rgba(220, 38, 38, 0.35);
}

.admin-card--danger h3 {
    color: #dc2626;
}

.admin-form input[type="file"] {
    width: 100%;
    padding: 0.55rem;
    margin-top: 0.35rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}

/* ---------- Modais de confirmação (wipe) ---------- */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 1rem;
}

.admin-modal-overlay[hidden] {
    display: none;
}

.admin-modal {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.admin-modal h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.admin-modal p {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.admin-modal ul {
    margin: 0 0 0.75rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.admin-modal__irreversivel {
    color: #dc2626;
    font-weight: 700;
}

.admin-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.admin-modal input[type="text"] {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.06em;
}