:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --border: #2d3a4f;
    --text: #e8eef7;
    --muted: #8b9cb3;
    --accent: #3d8bfd;
    --accent-hover: #5ba3ff;
    --danger: #f07178;
    --danger-text: #ffb4b8;
    --alert-error-bg: rgba(240, 113, 120, 0.15);
    --banner-bg: rgba(255, 193, 7, 0.12);
    --banner-border: #a67c00;
    --banner-text: #ffd666;
    --radius: 10px;
    font-family: "Segoe UI", system-ui, sans-serif;
}

html[data-theme='light'] {
    color-scheme: light;
    --bg: #eef2f7;
    --surface: #ffffff;
    --border: #cdd8e8;
    --text: #142033;
    --muted: #5c7088;
    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --danger: #dc2626;
    --danger-text: #991b1b;
    --alert-error-bg: rgba(220, 38, 38, 0.1);
    --banner-bg: rgba(234, 179, 8, 0.12);
    --banner-border: #ca8a04;
    --banner-text: #854d0e;
}

html {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

code {
    background: var(--surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.85rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.theme-toggle:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle .theme-toggle__moon {
    display: none;
}

html[data-theme='light'] .theme-toggle .theme-toggle__sun {
    display: none;
}

html[data-theme='light'] .theme-toggle .theme-toggle__moon {
    display: block;
}

.theme-toggle--fixed {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

.top-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.auth-card__brand {
    margin: 0 0 0.75rem;
    text-align: center;
    line-height: 0;
}

.brand-logo-pair {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.brand-logo-pair--login {
    width: 100%;
}

.brand-logo-pair > .brand-logo {
    flex-shrink: 0;
}

.brand-logo {
    height: auto;
    max-width: 100%;
    display: inline-block;
    vertical-align: middle;
}

.brand-logo--login {
    max-width: min(272px, 100%);
    width: auto;
}

.brand-logo--header {
    max-height: 40px;
    width: auto;
    display: block;
}

html[data-theme='light'] .brand-logo--for-dark-theme {
    display: none !important;
}

html:not([data-theme='light']) .brand-logo--for-light-theme {
    display: none !important;
}

html:not([data-theme='light']) .brand-logo.brand-logo--header.brand-logo--for-dark-theme,
html:not([data-theme='light']) .brand-logo.brand-logo--login.brand-logo--for-dark-theme {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stack label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.btn {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
}

.btn.primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn.secondary {
    background: var(--border);
    color: var(--text);
}

.btn.secondary:hover:not(:disabled) {
    filter: brightness(1.1);
}

.btn.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn.ghost:not(:disabled) {
    color: var(--text);
}

.btn.ghost:not(:disabled):hover {
    background: color-mix(in srgb, var(--border) 55%, transparent);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-error {
    background: var(--alert-error-bg);
    border: 1px solid var(--danger);
    color: var(--danger-text);
}

.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Barra global (todas as áreas autenticadas) */
.app-navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.app-navbar__shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.55rem 1rem;
    max-width: 1480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.app-navbar__brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
}

.app-navbar__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.app-navbar__user {
    font-size: 0.8rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-navbar__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
}

.app-navbar__menu-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.app-navbar__menu-icon {
    display: block;
}

.app-navbar__panel {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

.app-navbar__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    margin-right: auto;
}

.app-navbar__link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border: 1px solid transparent;
    white-space: nowrap;
}

.app-navbar__link:hover {
    background: rgba(128, 128, 128, 0.08);
    color: var(--accent);
}

.app-navbar__link.is-active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.app-navbar__link--return {
    margin-right: 0.35rem;
    font-weight: 600;
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .app-navbar__link.is-active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.22);
}

.app-navbar__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.app-navbar__tools .theme-toggle {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
}

.btn--nav {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
}

.app-navbar__logout {
    display: inline-flex;
}

@media (max-width: 768px) {
    .app-navbar__menu-btn {
        display: inline-flex;
    }

    .app-navbar__panel {
        display: none;
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        padding-top: 0.65rem;
        margin-top: 0.15rem;
        border-top: 1px solid var(--border);
        gap: 0.75rem;
    }

    .app-navbar__panel.is-open {
        display: flex;
    }

    .app-navbar__links {
        flex-direction: column;
        align-items: stretch;
        margin-right: 0;
        gap: 0.2rem;
    }

    .app-navbar__link {
        justify-content: flex-start;
        white-space: normal;
    }

    .app-navbar__tools {
        justify-content: flex-end;
        padding-top: 0.25rem;
        border-top: 1px dashed var(--border);
    }
}

@media (min-width: 769px) {
    .app-navbar__panel {
        display: flex !important;
    }
}

/* Legado: telas antigas ainda podem usar .top-bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.top-bar__brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    min-width: 0;
}

.top-bar__user {
    font-size: 0.85rem;
}

.inline-form {
    margin: 0;
}

.banner-warn {
    background: var(--banner-bg);
    border-bottom: 1px solid var(--banner-border);
    padding: 0.75rem 1.25rem;
    color: var(--banner-text);
    font-size: 0.9rem;
}

.is-hidden,
.prospeccao-wa-validation-banner.is-hidden {
    display: none !important;
}

.prospeccao-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr min(380px, 38vw);
    gap: 0;
    min-height: 0;
}

@media (max-width: 960px) {
    .prospeccao-layout {
        grid-template-columns: 1fr;
    }
}

.map-panel {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    border-right: 1px solid var(--border);
}

.prospeccao-search-loading {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.prospeccao-search-loading.is-hidden {
    display: none;
}

.prospeccao-search-loading__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 28, 0.58);
    backdrop-filter: blur(4px);
}

.prospeccao-search-loading__card {
    position: relative;
    z-index: 1;
    width: min(360px, 100%);
    padding: 1.35rem 1.5rem 1.25rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius, 0.75rem) + 2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.prospeccao-search-loading__spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1rem;
    border: 3px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: prospeccao-search-spin 0.85s linear infinite;
}

.prospeccao-search-loading__title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.prospeccao-search-loading__msg {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
}

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

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.search-bar .grow {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.search-bar__sep {
    width: 1px;
    align-self: stretch;
    min-height: 2rem;
    background: var(--border);
    margin: 0 .15rem;
}

.search-bar__saved-filter {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .75rem;
    color: var(--muted);
}

.search-bar__saved-filter select {
    min-width: 10rem;
}

.map-status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.35rem 0.5rem 0.5rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.map-status-legend__title {
    font-weight: 600;
    color: var(--text);
}

.map-status-legend__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.map-status-legend__list li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.map-status-legend__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sidebar-saved-filter {
    margin: 0 0 0.65rem;
}

.sidebar-saved-filter.is-hidden {
    display: none;
}

.sidebar-saved-filter__label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.sidebar-saved-filter__label select {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
}

#sidebar-results-hint.is-hidden {
    display: none;
}

.search-bar .btn-more-plus {
    min-width: 2.35rem;
    padding: 0.5rem 0.65rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
}

.map-canvas {
    flex: 1;
    min-height: 420px;
    width: 100%;
}

.map-canvas.is-drawing-area,
.map-canvas.is-drawing-area .gm-style > div {
    cursor: crosshair !important;
}

/* InfoWindow: contraste + cartão elegante (herança do body do app é clara) */
.map-canvas .gm-style .gm-style-iw-c,
.map-canvas .gm-style .gm-style-iw-d {
    color: #1a2332 !important;
    overflow: visible !important;
}

/* Balão padrão do Maps usa padding assimétrico — equilibra e centraliza o cartão */
.map-canvas .gm-style .gm-style-iw-c {
    /* padding direito = padding esquerdo */
    padding: 10px 10px 14px 10px !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: 460px !important;
    min-width: 0 !important;
}

.map-canvas .gm-style .gm-style-iw-d {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 2px 6px 6px !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: 440px !important;
    min-width: 0 !important;
}

/* Botão de fechar (X) não deve “reservar” coluna de largura */
.map-canvas .gm-style .gm-style-iw-c > button.gm-ui-hover-effect {
    right: 8px !important;
    top: 8px !important;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw {
    box-sizing: border-box;
    flex-shrink: 0;
    width: min(100%, 420px, 88vw);
    min-width: 0;
    margin: 0;
    padding: 12px 14px 10px;
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #1a2332;
    line-height: 1.45;
    background: #fff;
    border: 1px solid #c5d0e0;
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 18px rgba(15, 23, 42, 0.09),
        0 0 0 1px rgba(15, 23, 42, 0.04);
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__title {
    margin: 0 0 2px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: #0f172a;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    font-size: 0.8125rem;
    color: #475569;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__row:first-of-type {
    margin-top: 12px;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__ico {
    flex-shrink: 0;
    margin-top: 1px;
    color: #4f6fc9;
    opacity: 0.92;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__row-text {
    flex: 1;
    min-width: 0;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__phone {
    color: #0f172a;
    font-weight: 600;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__rating-num {
    font-weight: 700;
    color: #b45309;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__rating-meta {
    color: #64748b;
    font-weight: 500;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__badge {
    display: inline-block;
    margin-top: 1px;
    padding: 5px 11px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #3730a3;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__btn--maps {
    background: #e8f0fe;
    color: #1557b0 !important;
    border-color: rgba(21, 87, 176, 0.18);
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__btn--wa {
    background: #25d366;
    color: #fff !important;
    border-color: rgba(18, 140, 126, 0.35);
}

.map-canvas .gm-style .gm-style-iw-d .prospeccao-iw__btn--site {
    background: #f1f5f9;
    color: #334155 !important;
    border-color: #e2e8f0;
}

.hint {
    padding: 0.35rem 1rem 0.75rem;
    font-size: 0.85rem;
    margin: 0;
}

.sidebar {
    background: var(--surface);
    overflow: auto;
    padding: 1rem 1rem 2rem;
    max-height: calc(100vh - 52px);
}

.sidebar h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.sidebar-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.leads-count {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 600;
}

.leads-count.is-hidden {
    display: none;
}

.results-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.result-card:hover,
.result-card.active {
    border-color: var(--accent);
}

.result-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.result-status-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin: 0 0 0.35rem;
}

.lead-discovery-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin: 0 0 0.35rem;
}

.lead-discovery-tag--missing {
    color: var(--muted);
    font-weight: 500;
    background: color-mix(in srgb, var(--muted) 8%, var(--surface));
    border-color: color-mix(in srgb, var(--muted) 22%, var(--border));
}

.lead-structure-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0f766e;
    background: color-mix(in srgb, #0f766e 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #0f766e 24%, var(--border));
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin: 0 0.35rem 0.35rem 0;
}

.lead-structure-count {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #1d4ed8;
    background: color-mix(in srgb, #1d4ed8 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #1d4ed8 24%, var(--border));
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin: 0 0.35rem 0.35rem 0;
    text-decoration: none;
}

.lead-structure-count:hover {
    text-decoration: underline;
}

.lead-structure-pipeline {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #7c3aed;
    background: color-mix(in srgb, #7c3aed 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #7c3aed 24%, var(--border));
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin: 0 0.35rem 0.35rem 0;
    text-decoration: none;
}

.lead-structure-pipeline:hover {
    text-decoration: underline;
}

.kanban-card .lead-structure-tag,
.kanban-card .lead-structure-count,
.kanban-card .lead-structure-pipeline {
    margin-bottom: 0.25rem;
}

.result-card .addr {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.prospeccao-wa-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

.prospeccao-wa-badge--ok {
    background: color-mix(in srgb, #22c55e 22%, transparent);
    color: #86efac;
}

.prospeccao-wa-badge--no {
    background: color-mix(in srgb, #94a3b8 18%, transparent);
    color: var(--muted);
}

.prospeccao-wa-badge--unknown {
    background: color-mix(in srgb, #eab308 20%, transparent);
    color: #fde047;
}

.result-actions .result-wa-link {
    color: #22c55e;
    font-weight: 600;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.result-actions a {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}

.result-actions a:hover {
    text-decoration: underline;
}

/* Dashboard: termômetro de cota (uso vs limite) */
.quota-meter {
    height: 8px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.quota-meter__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.quota-meter__fill--low {
    background: #22c55e;
}

.quota-meter__fill--mid {
    background: #eab308;
}

.quota-meter__fill--high {
    background: #ef4444;
}

.quota-meter__label {
    font-size: 0.72rem;
    color: var(--muted);
    display: block;
    white-space: nowrap;
}

/* Consumo (empresa): largura ampla para tabela de SKUs sem encolher à esquerda */
.usage-dashboard {
    width: 100%;
    max-width: min(100%, 1520px);
    margin-left: auto;
    margin-right: auto;
    padding: 1rem clamp(0.75rem, 2.5vw, 2rem);
    box-sizing: border-box;
}

.usage-dashboard__table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.usage-dashboard__table {
    width: 100%;
    min-width: 72rem;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 0.875rem;
}

.usage-dashboard__table th,
.usage-dashboard__table td {
    padding: 0.55rem 0.65rem;
    vertical-align: top;
    text-align: left;
}

.usage-dashboard__table thead tr {
    border-bottom: 1px solid var(--border);
}

.usage-dashboard__table tbody tr {
    border-bottom: 1px solid var(--border);
}

.usage-dashboard__table tbody tr:last-child {
    border-bottom: none;
}

.usage-dashboard__table th {
    font-weight: 600;
    white-space: nowrap;
}

.usage-dashboard__sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    word-break: break-word;
    max-width: 11rem;
}

.usage-dashboard__meter {
    min-width: 7.5rem;
}

/* Prospecção: cotas em uma faixa horizontal fina (pouca altura para o mapa) */
.usage-inline-banner {
    padding: 0.3rem 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
}

.usage-inline-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
    row-gap: 0.25rem;
}

.usage-inline-toolbar__title {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

.usage-inline-toolbar__link {
    font-size: 0.7rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
}

.usage-inline-toolbar__link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .usage-inline-toolbar__link {
        margin-left: 0;
        flex-basis: 100%;
    }
}

.usage-inline-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.usage-inline-metric__lbl {
    color: var(--muted);
    font-size: 0.68rem;
    flex-shrink: 0;
    width: 1.75rem;
}

.usage-inline-metric__val {
    color: var(--text);
    font-size: 0.68rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.usage-inline-metric__pct {
    color: var(--muted);
    font-size: 0.65rem;
}

.quota-meter--inline {
    width: 48px;
    min-width: 48px;
    height: 4px;
    margin: 0;
    flex-shrink: 0;
}

.banner-quota {
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    border-bottom: 1px solid var(--border);
}

.banner-quota--warning {
    background: rgba(234, 179, 8, 0.14);
    color: var(--text);
}

html[data-theme='light'] .banner-quota--warning {
    background: rgba(234, 179, 8, 0.2);
}

.banner-quota--danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--text);
}

html[data-theme='light'] .banner-quota--danger {
    background: rgba(239, 68, 68, 0.12);
}

.banner-ok {
    padding: 0.65rem 1rem;
    margin: 0 0 1rem 0;
    border-radius: var(--radius);
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
    color: var(--text);
    font-size: 0.9rem;
}

.admin-main {
    padding: 1rem 1rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.admin-subnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.admin-subnav a {
    flex: 0 0 auto;
}

.admin-nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-nav a:hover {
    text-decoration: underline;
}

.admin-page-title {
    font-size: 1.35rem;
    margin: 0 0 0.75rem 0;
}

.admin-subtitle {
    font-size: 1.05rem;
    margin: 0 0 0.65rem 0;
    font-weight: 600;
}

.usage-report-filter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.65rem 1rem;
    align-items: start;
}

.usage-report-filter .usage-report-filter__grid label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin-top: 0;
}

.usage-report-table th,
.usage-report-table td {
    text-align: right;
}

.usage-report-table th:first-child,
.usage-report-table td:first-child {
    text-align: left;
}

.admin-toolbar {
    margin: 0 0 1rem 0;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.admin-card:hover {
    border-color: var(--accent);
}

.admin-card strong {
    font-size: 1rem;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table__details {
    max-width: 280px;
    word-break: break-word;
    font-size: 0.75rem;
    color: var(--muted);
}

.admin-form label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form input[type="datetime-local"],
.admin-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0.25rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.usage-report-filter .usage-report-filter__grid label > input[type="date"],
.usage-report-filter .usage-report-filter__grid label > select {
    margin-top: 0;
}

.admin-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    cursor: pointer;
    color: var(--text);
}

.admin-check input {
    margin-top: 0.2rem;
}

.admin-fieldset {
    margin-top: 1rem;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-fieldset legend {
    padding: 0 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.admin-quota-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.lead-structure-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lead-structure-modal.is-hidden {
    display: none;
}

.lead-structure-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.lead-structure-modal__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.15rem 1.15rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.lead-structure-modal__head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.lead-structure-step label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.65rem 0;
    font-size: 0.9rem;
}

.lead-structure-step textarea,
.lead-structure-step input,
.lead-structure-step select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg);
    color: var(--text);
}

.lead-structure-existing {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    background: var(--surface-muted, #f4f6f8);
}

.lead-structure-existing__list {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
}

.lead-whatsapp-panel {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

.lead-whatsapp-panel__title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.lead-whatsapp-messages {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    padding: 0.35rem;
    background: color-mix(in srgb, var(--border) 25%, transparent);
    border-radius: 4px;
}

.lead-whatsapp-msg {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.lead-whatsapp-msg--out {
    text-align: right;
}

.lead-whatsapp-msg__body {
    display: inline-block;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    background: color-mix(in srgb, #22c55e 18%, var(--surface));
}

.lead-whatsapp-msg--in .lead-whatsapp-msg__body {
    background: color-mix(in srgb, #3b82f6 15%, var(--surface));
}

.lead-whatsapp-msg__time {
    display: block;
    font-size: 0.72rem;
}

.lead-whatsapp-notice {
    margin: 0 0 0.35rem 0;
    color: var(--muted, #6b7280);
}

.lead-whatsapp-compose {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-end;
}

.lead-whatsapp-compose[hidden],
.lead-whatsapp-notice[hidden] {
    display: none !important;
}

.lead-whatsapp-compose textarea {
    flex: 1 1 160px;
    min-height: 2.5rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

.lead-structure-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

#lead-structure-units-range {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

/* —— Módulo Conversas (inbox WhatsApp) —— */
.conversas-page {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    box-sizing: border-box;
}

.conversas-page__header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: space-between;
    margin: 1rem 0;
}

.conversas-page__title {
    margin: 0;
    font-size: 1.25rem;
}

.conversas-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 0.75rem;
    min-height: 62vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}

.conversas-list-panel {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.conversas-list-toolbar {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.conversas-search,
.conversas-filter {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    box-sizing: border-box;
}

.conversas-list {
    overflow-y: auto;
    flex: 1;
}

.conversas-list-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.conversas-list-item:hover {
    background: color-mix(in srgb, var(--border) 35%, transparent);
}

.conversas-list-item.is-active {
    background: color-mix(in srgb, #3b82f6 12%, var(--surface));
}

.conversas-list-item--unread .conversas-list-item__name {
    font-weight: 700;
}

.conversas-list-item__top {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    align-items: baseline;
}

.conversas-list-item__preview {
    display: block;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversas-list-item__meta {
    display: block;
    margin-top: 0.25rem;
}

.conversas-detail-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.conversas-detail-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.conversas-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 62vh;
}

.conversas-detail__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.conversas-detail__title {
    margin: 0;
    font-size: 1.05rem;
}

.conversas-detail__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.conversas-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.65rem 0.75rem;
    background: color-mix(in srgb, var(--border) 20%, transparent);
}

.conversas-msg {
    margin-bottom: 0.45rem;
    max-width: 85%;
}

.conversas-msg--out {
    margin-left: auto;
    text-align: right;
}

.conversas-msg--note {
    max-width: 100%;
    opacity: 0.92;
}

.conversas-msg__body {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: color-mix(in srgb, #22c55e 16%, var(--surface));
    text-align: left;
}

.conversas-msg--in .conversas-msg__body {
    background: color-mix(in srgb, #3b82f6 14%, var(--surface));
}

.conversas-msg--note .conversas-msg__body {
    background: color-mix(in srgb, #f59e0b 18%, var(--surface));
    border: 1px dashed color-mix(in srgb, #f59e0b 40%, var(--border));
}

.conversas-msg__tag {
    font-size: 0.72rem;
    font-weight: 600;
}

.conversas-msg__time {
    display: block;
    margin-top: 0.15rem;
}

.conversas-compose,
.conversas-notes {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
}

.conversas-compose textarea,
.conversas-notes textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0.25rem 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

.conversas-notice {
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.app-navbar__badge {
    display: inline-block;
    min-width: 1.1rem;
    padding: 0.05rem 0.35rem;
    margin-left: 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    vertical-align: middle;
}

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

    .conversas-list-panel {
        max-height: 38vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

#lead-structure-units-range.is-hidden {
    display: none;
}

/* Dashboard de prospecção */
.prospection-dashboard {
    width: 100%;
    max-width: min(100%, 1400px);
    margin-left: auto;
    margin-right: auto;
    padding: 1.25rem clamp(0.75rem, 2.5vw, 2rem) 2.5rem;
    box-sizing: border-box;
}

.prospection-dashboard__hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.prospection-dashboard__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.prospection-dashboard__subtitle {
    margin: 0;
    font-size: 0.95rem;
    max-width: 42rem;
}

.prospection-dashboard__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
}

.prospection-dashboard__filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 8.5rem;
}

.prospection-dashboard__filter--inline {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    min-width: auto;
}

.prospection-dashboard__filter-label {
    white-space: nowrap;
    flex-shrink: 0;
}

.prospection-dashboard__select,
.prospection-dashboard__input {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
}

.prospection-dashboard__filter-btn {
    white-space: nowrap;
}

.prospection-dashboard__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.prospection-dashboard__kpi {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 88%, var(--bg)) 100%);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.prospection-dashboard__kpi:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    transform: translateY(-1px);
}

.prospection-dashboard__kpi--alert {
    border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
    background: linear-gradient(145deg, color-mix(in srgb, var(--danger) 8%, var(--surface)) 0%, var(--surface) 100%);
}

.prospection-dashboard__kpi-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.prospection-dashboard__kpi-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.prospection-dashboard__kpi-value--accent {
    color: var(--accent);
}

.prospection-dashboard__kpi-value--success {
    color: #22c55e;
}

html[data-theme='light'] .prospection-dashboard__kpi-value--success {
    color: #15803d;
}

.prospection-dashboard__kpi-hint {
    display: block;
    margin-top: 0.35rem;
}

.prospection-dashboard__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.prospection-dashboard__panel {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
}

.prospection-dashboard__panel--funnel {
    grid-column: span 5;
}

.prospection-dashboard__panel--team,
.prospection-dashboard__panel--companies {
    grid-column: span 7;
}

.prospection-dashboard__panel--actions {
    grid-column: span 12;
}

.prospection-dashboard__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
}

.prospection-dashboard__panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.prospection-dashboard__funnel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prospection-dashboard__funnel-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.prospection-dashboard__funnel-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.prospection-dashboard__funnel-label {
    font-weight: 500;
}

.prospection-dashboard__funnel-count {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.prospection-dashboard__funnel-track {
    height: 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 55%, transparent);
    overflow: hidden;
}

.prospection-dashboard__funnel-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    min-width: 2%;
    transition: width 0.4s ease;
}

.prospection-dashboard__funnel-bar--won {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.prospection-dashboard__funnel-bar--lost {
    background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

.prospection-dashboard__table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.prospection-dashboard__table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.prospection-dashboard__table th,
.prospection-dashboard__table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.prospection-dashboard__table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    white-space: nowrap;
}

.prospection-dashboard__table tbody tr:last-child td {
    border-bottom: none;
}

.prospection-dashboard__table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.prospection-dashboard__operator-name {
    font-weight: 500;
}

.prospection-dashboard__cell-won {
    color: #22c55e;
    font-weight: 600;
}

html[data-theme='light'] .prospection-dashboard__cell-won {
    color: #15803d;
}

.prospection-dashboard__company-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.prospection-dashboard__company-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.prospection-dashboard__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

@media (max-width: 1024px) {
    .prospection-dashboard__panel--funnel,
    .prospection-dashboard__panel--team,
    .prospection-dashboard__panel--companies,
    .prospection-dashboard__panel--actions {
        grid-column: span 12;
    }
}

@media (max-width: 640px) {
    .prospection-dashboard__hero {
        flex-direction: column;
        align-items: stretch;
    }

    .prospection-dashboard__filters {
        flex-direction: column;
        align-items: stretch;
    }

    .prospection-dashboard__filter {
        min-width: 0;
    }

    .prospection-dashboard__filter-btn {
        width: 100%;
    }
}
