/* ==========================================================================
   OneClick - design system
   ========================================================================== */

:root {
    --oc-bg: #070b14;
    --oc-bg-soft: #0b1220;
    --oc-surface: rgba(19, 27, 44, 0.78);
    --oc-surface-solid: #111a2c;
    --oc-surface-2: rgba(148, 163, 184, 0.06);
    --oc-border: rgba(148, 163, 184, 0.14);
    --oc-border-strong: rgba(148, 163, 184, 0.26);
    --oc-text: #e9eefb;
    --oc-muted: #94a3b8;
    --oc-primary: #7c5cff;
    --oc-primary-2: #22d3ee;
    --oc-success: #34d399;
    --oc-danger: #fb7185;
    --oc-radius: 18px;
    --oc-shadow: 0 24px 60px -28px rgba(2, 6, 23, 0.95);
    --oc-gradient: linear-gradient(135deg, #7c5cff 0%, #4f8cff 52%, #22d3ee 100%);
    --oc-font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html[data-bs-theme="dark"] {
    --bs-body-bg: var(--oc-bg);
    --bs-body-color: var(--oc-text);
    --bs-secondary-color: var(--oc-muted);
    --bs-border-color: var(--oc-border);
    --bs-link-color: #a99bff;
    --bs-link-hover-color: #c4baff;
    --bs-tertiary-bg: #0d1626;
    --bs-emphasis-color: #ffffff;
}

html,
body {
    min-height: 100%;
    font-family: var(--oc-font);
    background-color: var(--oc-bg);
}

body {
    background-image:
        radial-gradient(1000px 560px at 8% -8%, rgba(124, 92, 255, 0.14), transparent 60%),
        radial-gradient(900px 520px at 100% 0%, rgba(34, 211, 238, 0.07), transparent 55%);
    background-attachment: fixed;
    color: var(--oc-text);
    -webkit-font-smoothing: antialiased;
}

a,
.btn-link {
    color: #a99bff;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* ---------------------------- scrollbar ---------------------------- */

* {
    scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.46);
    background-clip: content-box;
}

/* ---------------------------- app shell ---------------------------- */

.app-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    padding-top: 4.5rem;
}

.app-content {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding-top: 0.75rem;
    padding-bottom: 3.5rem;
    padding-inline: clamp(1rem, 3vw, 2.25rem);
}
}

.app-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.15rem clamp(1rem, 3vw, 2.25rem);
    border-top: 1px solid var(--oc-border);
    color: var(--oc-muted);
    font-size: 0.78rem;
}

.app-footer .footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--oc-border-strong);
}

/* ---------------------------- navbar ---------------------------- */

.app-navbar {
    min-height: 72px;
    padding: 0.65rem 0;
    background: rgba(8, 12, 22, 0.72);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.app-navbar.is-scrolled {
    background: rgba(8, 12, 22, 0.93);
    border-bottom-color: var(--oc-border);
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.95);
}

.app-container {
    max-width: 1360px;
    padding-inline: clamp(1rem, 3vw, 2.25rem);
}

.app-navbar .navbar-actions {
    margin-left: auto;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-right: clamp(1rem, 3vw, 2.5rem);
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(180px, 55vw);
    object-fit: contain;
}

.app-navbar .navbar-toggler {
    border: 1px solid var(--oc-border);
    border-radius: 11px;
    padding: 0.42rem 0.55rem;
    color: var(--oc-text);
}

.app-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.25);
}

.app-navbar .navbar-toggler-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.app-navbar .navbar-nav {
    gap: 0.15rem;
}

.app-navbar .navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    color: var(--oc-muted);
    font-size: 0.93rem;
    font-weight: 500;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.app-navbar .navbar-nav .nav-link i {
    font-size: 0.95rem;
    opacity: 0.85;
}

.app-navbar .navbar-nav .nav-link:hover,
.app-navbar .navbar-nav .nav-link:focus {
    color: var(--oc-text);
    background: rgba(148, 163, 184, 0.08);
}

.app-navbar .navbar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.1));
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.3);
}

.app-navbar .navbar-nav .dropdown-toggle::after {
    opacity: 0.55;
    margin-left: 0.15rem;
}

/* ---------------------------- user chip / dropdowns ---------------------------- */

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.3rem 0.85rem 0.3rem 0.3rem;
    color: var(--oc-text);
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid var(--oc-border);
    border-radius: 999px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.user-chip:hover,
.user-chip:focus-visible,
.user-chip.show {
    color: #fff;
    background: rgba(148, 163, 184, 0.12);
    border-color: var(--oc-border-strong);
}

.user-chip::after {
    margin-left: 0.1rem;
    opacity: 0.45;
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--oc-gradient);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.user-meta {
    line-height: 1.15;
    text-align: left;
}

.user-name {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
}

.user-role {
    display: block;
    color: var(--oc-muted);
    font-size: 0.68rem;
}

.dropdown-menu {
    --bs-dropdown-bg: rgba(13, 20, 34, 0.97);
    --bs-dropdown-border-color: var(--oc-border);
    --bs-dropdown-link-color: var(--oc-text);
    --bs-dropdown-link-hover-bg: rgba(148, 163, 184, 0.1);
    --bs-dropdown-link-hover-color: #fff;
    --bs-dropdown-link-active-bg: rgba(124, 92, 255, 0.24);
    --bs-dropdown-link-active-color: #fff;
    min-width: 13rem;
    padding: 0.45rem;
    border-radius: 14px;
    box-shadow: var(--oc-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 9px;
    font-size: 0.88rem;
}

.dropdown-item i {
    width: 1.1rem;
    color: var(--oc-muted);
    text-align: center;
    font-size: 0.95rem;
}

.dropdown-item:hover i,
.dropdown-item.active i {
    color: inherit;
}

.dropdown-divider {
    border-color: var(--oc-border);
    opacity: 1;
}

/* ---------------------------- offcanvas drawer ---------------------------- */

@media (max-width: 991.98px) {
    /* O backdrop-filter do navbar cria um containing block e um stacking context:
       o offcanvas (position: fixed) herdava a altura da navbar e ficava atrás do
       backdrop. No mobile o blur é desligado para o drawer ocupar a tela toda. */
    .app-navbar {
        background: rgba(8, 12, 22, 0.98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    html[data-bs-theme="light"] .app-navbar {
        background: rgba(255, 255, 255, 0.98);
    }

    .app-drawer {
        --bs-offcanvas-width: min(330px, 88vw);
        background: rgba(9, 14, 25, 0.98);
        border-right: 1px solid var(--oc-border);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .app-drawer .offcanvas-header {
        padding: 1.1rem 1.25rem;
        border-bottom: 1px solid var(--oc-border);
    }

    .app-drawer .offcanvas-title {
        font-size: 1rem;
        font-weight: 600;
    }

    .app-drawer .offcanvas-body {
        padding: 1rem 0.85rem 1.5rem;
    }

    .app-drawer .navbar-nav {
        align-items: stretch;
        gap: 0.25rem;
    }

    .app-drawer .navbar-nav .nav-link {
        display: flex;
        padding: 0.75rem 0.9rem;
    }

    .app-drawer .dropdown-menu {
        position: static !important;
        transform: none !important;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0.15rem 0 0.4rem 0.75rem;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .app-drawer .dropdown-item {
        color: var(--oc-muted);
    }

    .app-drawer .dropdown-item:hover {
        color: var(--oc-text);
        background: rgba(148, 163, 184, 0.08);
    }
}

@media (min-width: 992px) {
    .app-navbar .offcanvas-lg {
        flex: 1 1 auto;
        order: 2;
    }

    .app-navbar .offcanvas-lg .offcanvas-body {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding: 0;
    }

    .app-navbar .navbar-actions {
        order: 3;
        margin-left: auto;
    }
}

/* ---------------------------- buttons ---------------------------- */

.btn {
    --bs-btn-border-radius: 12px;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.25);
}

.btn-gradient {
    color: #fff;
    background-image: var(--oc-gradient);
    border: 0;
    box-shadow: 0 14px 30px -16px rgba(79, 140, 255, 0.95);
}

.btn-gradient:hover,
.btn-gradient:focus {
    color: #fff;
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px -16px rgba(79, 140, 255, 1);
}

.btn.is-loading {
    opacity: 0.75;
    cursor: progress;
    pointer-events: none;
}

.btn-primary {
    --bs-btn-bg: #4f7cff;
    --bs-btn-border-color: #4f7cff;
    --bs-btn-hover-bg: #6690ff;
    --bs-btn-hover-border-color: #6690ff;
    --bs-btn-active-bg: #3f6bf0;
    --bs-btn-active-border-color: #3f6bf0;
    --bs-btn-disabled-bg: #3f5fae;
    --bs-btn-disabled-border-color: #3f5fae;
}

.btn-outline-secondary {
    --bs-btn-color: var(--oc-muted);
    --bs-btn-border-color: var(--oc-border-strong);
    --bs-btn-hover-bg: rgba(148, 163, 184, 0.12);
    --bs-btn-hover-border-color: var(--oc-border-strong);
    --bs-btn-hover-color: var(--oc-text);
}

/* ---------------------------- forms ---------------------------- */

.form-control,
.form-select {
    padding: 0.7rem 0.9rem;
    color: var(--oc-text);
    background-color: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--oc-border);
    border-radius: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control::placeholder {
    color: #64748b;
}

.form-control:focus,
.form-select:focus {
    color: var(--oc-text);
    background-color: rgba(15, 23, 42, 0.9);
    border-color: rgba(124, 92, 255, 0.65);
    box-shadow: 0 0 0 0.22rem rgba(124, 92, 255, 0.18);
}

.form-control:disabled,
.form-select:disabled {
    color: #b6c2d9;
    background-color: rgba(15, 23, 42, 0.45);
    border-color: var(--oc-border);
}

.form-label {
    margin-bottom: 0.4rem;
    color: #c7d2e6;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-text {
    color: var(--oc-muted);
}

.form-floating > .form-control {
    min-height: calc(3.4rem + 2px);
    padding: 1rem 0.9rem;
}

.form-floating > label {
    padding: 1rem 0.9rem;
    color: var(--oc-muted);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--oc-muted);
    opacity: 0.85;
}

.form-check-input {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--oc-border-strong);
}

.form-check-input:checked {
    background-color: var(--oc-primary);
    border-color: var(--oc-primary);
}

.form-check-label {
    color: #c7d2e6;
    font-size: 0.87rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--oc-success);
}

.invalid {
    outline: 1px solid var(--oc-danger);
}

.validation-message {
    color: var(--oc-danger);
    font-size: 0.8rem;
}

/* ---------------------------- cards / tables / alerts ---------------------------- */

.card {
    color: var(--oc-text);
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius);
    box-shadow: var(--oc-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card-header {
    padding: 0.95rem 1.15rem;
    font-weight: 600;
    background: transparent;
    border-bottom-color: var(--oc-border);
}

.card-body {
    padding: 1.15rem;
}

.table {
    --bs-table-color: var(--oc-text);
    --bs-table-border-color: var(--oc-border);
    --bs-table-striped-color: var(--oc-text);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.05);
    --bs-table-hover-color: var(--oc-text);
    --bs-table-hover-bg: rgba(124, 92, 255, 0.08);
    margin-bottom: 0;
}

.table > thead th {
    color: #b6c2d9;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    background-color: var(--oc-bg);
    border-bottom-color: var(--oc-border);
}

.table thead.table-light,
.table thead.table-light th {
    background-color: var(--oc-bg) !important;
    border-bottom-color: var(--oc-border) !important;
}

/* Linhas clicáveis (abrem o detalhe do evento) */
.lead-row {
    cursor: pointer;
}

.lead-row:focus-visible {
    outline: 2px solid var(--oc-primary);
    outline-offset: -2px;
}

.alert {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border-width: 1px;
    font-size: 0.87rem;
}

.alert-danger {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.1);
    border-color: rgba(251, 113, 133, 0.26);
}

.alert-success {
    color: #a7f3d0;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.24);
}

.alert-warning {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.24);
}

.alert-info {
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.22);
}

.badge {
    border-radius: 8px;
    font-weight: 600;
}

/* ---------------------------- home / dashboard ---------------------------- */

.hero-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 2.6rem);
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(34, 211, 238, 0.05) 55%, transparent),
        var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: 24px;
    box-shadow: var(--oc-shadow);
}

.hero-card::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 44rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--oc-primary-2);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-card h1 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.hero-card p {
    max-width: 38rem;
    margin: 0;
    color: var(--oc-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.hero-greeting {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    padding: 0.4rem 0.8rem;
    color: #c7d2e6;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--oc-border);
    border-radius: 999px;
    font-size: 0.8rem;
}

.hero-greeting strong {
    color: #fff;
    font-weight: 600;
}

.hero-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    border-radius: 50%;
}

.hero-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(220, 38, 38, 0.22));
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.quick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow: hidden;
    padding: 1.25rem;
    color: var(--oc-text);
    text-decoration: none;
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: 18px;
    box-shadow: var(--oc-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover,
.quick-card:focus-visible {
    color: #fff;
    border-color: rgba(124, 92, 255, 0.42);
    box-shadow: 0 26px 50px -26px rgba(2, 6, 23, 0.95);
    transform: translateY(-3px);
}

.quick-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(124, 92, 255, 0.14);
    color: #b4a8ff;
    font-size: 1.2rem;
}

.quick-card strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.quick-card .quick-desc {
    color: var(--oc-muted);
    font-size: 0.83rem;
    line-height: 1.45;
}

.quick-arrow {
    position: absolute;
    top: 1.2rem;
    right: 1.1rem;
    color: var(--oc-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.quick-card:hover .quick-arrow {
    opacity: 1;
    transform: none;
}

/* ---------------------------- auth pages ---------------------------- */

.auth-page {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(1rem, 3vw, 2.5rem);
    overflow: hidden;
    background:
        radial-gradient(1100px 600px at 8% 0%, rgba(124, 92, 255, 0.17), transparent 62%),
        radial-gradient(900px 520px at 95% 100%, rgba(34, 211, 238, 0.1), transparent 60%),
        #060a12;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
    pointer-events: none;
}

.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
}

.auth-glow-1 {
    top: -180px;
    left: -120px;
    width: 460px;
    height: 460px;
    background: rgba(124, 92, 255, 0.35);
}

.auth-glow-2 {
    right: -160px;
    bottom: -200px;
    width: 500px;
    height: 500px;
    background: rgba(34, 211, 238, 0.18);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    width: min(1080px, 100%);
    min-height: 620px;
    overflow: hidden;
    background: rgba(11, 18, 32, 0.84);
    border: 1px solid var(--oc-border);
    border-radius: 26px;
    box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.25rem);
    background:
        linear-gradient(160deg, rgba(124, 92, 255, 0.26), rgba(34, 211, 238, 0.07) 58%, rgba(7, 11, 20, 0.25)),
        #0a1120;
    border-right: 1px solid var(--oc-border);
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, #000 10%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 85%);
    pointer-events: none;
}

.auth-showcase::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 68%);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--oc-text);
    text-decoration: none;
}

.auth-brand:hover {
    color: var(--oc-text);
}

.auth-showcase-body {
    position: relative;
    z-index: 1;
    max-width: 27rem;
}

.auth-eyebrow {
    display: inline-block;
    color: #9fe7f3;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-showcase h2 {
    margin: 1rem 0;
    font-size: clamp(1.8rem, 2.7vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.auth-showcase > .auth-showcase-body > p {
    margin-bottom: 0;
    color: #a8b6cd;
    font-size: 0.93rem;
    line-height: 1.65;
}

.auth-features {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 2rem 0 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: var(--oc-primary-2);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--oc-border);
    border-radius: 11px;
    font-size: 1rem;
}

.auth-features strong {
    display: block;
    color: #eef2ff;
    font-size: 0.89rem;
    font-weight: 600;
}

.auth-features span {
    color: var(--oc-muted);
    font-size: 0.81rem;
}

.auth-showcase-foot {
    position: relative;
    z-index: 1;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.75rem;
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3.5rem);
}

.auth-panel-inner {
    width: 100%;
    max-width: 382px;
    margin: 0 auto;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.72rem;
    color: #9fe7f3;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-form-head h1 {
    margin: 0.95rem 0 0.5rem;
    font-size: clamp(1.7rem, 2.4vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.auth-form-head p {
    margin-bottom: 1.6rem;
    color: var(--oc-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-form .form-label {
    color: #c7d2e6;
}

.field {
    position: relative;
}

.field-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    color: #64748b;
    font-size: 0.95rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.field .form-control {
    height: 50px;
    padding-left: 2.8rem;
}

.field .form-control.has-action {
    padding-right: 3rem;
}

.field-action {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 10px;
    transform: translateY(-50%);
    transition: color 0.15s ease, background 0.15s ease;
}

.field-action:hover {
    color: var(--oc-text);
    background: rgba(148, 163, 184, 0.08);
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 50px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.auth-footnote {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding-top: 1.3rem;
    margin-top: 1.75rem;
    color: var(--oc-muted);
    border-top: 1px solid var(--oc-border);
    font-size: 0.78rem;
    line-height: 1.5;
}

.auth-mobile-brand {
    display: none;
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        width: min(460px, 100%);
        min-height: 0;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        padding: 2.1rem 1.6rem;
    }

    .auth-mobile-brand {
        display: flex;
        justify-content: center;
        margin-bottom: 1.8rem;
    }
}

@media (max-width: 420px) {
    .auth-page {
        padding: 0;
    }

    .auth-shell {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        border: 0;
    }
}

/* compact auth layout (password reset, confirmations, 2FA...) */

.auth-page--compact {
    padding: clamp(1rem, 4vw, 2.5rem);
}

.auth-compact-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    width: min(560px, 100%);
}

.auth-brand--center {
    justify-content: center;
}

.auth-compact-card {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--oc-text);
    background: rgba(11, 18, 32, 0.86);
    border: 1px solid var(--oc-border);
    border-radius: 22px;
    box-shadow: var(--oc-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-compact-card h1 {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 700;
}

.auth-compact-card h2 {
    color: var(--oc-muted);
    font-size: 0.98rem;
    font-weight: 400;
}

.auth-compact-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.auth-compact-card hr {
    border-color: var(--oc-border);
    opacity: 1;
}

.auth-compact-card .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

.auth-compact-foot {
    color: var(--oc-muted);
    font-size: 0.75rem;
    text-align: center;
}

/* ---------------------------- account / manage pages ---------------------------- */

.account-head {
    margin-bottom: 1.75rem;
}

.account-head h1 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
}

.account-head p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.account-panel {
    padding: 1.5rem;
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius);
    box-shadow: var(--oc-shadow);
}

.manage-nav {
    gap: 0.3rem;
    padding: 0.45rem;
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: 14px;
}

.manage-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 0.8rem;
    color: var(--oc-muted);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.18s ease, background 0.18s ease;
}

.manage-nav .nav-link i {
    width: 1.05rem;
    text-align: center;
}

.manage-nav .nav-link:hover {
    color: var(--oc-text);
    background: rgba(148, 163, 184, 0.08);
}

.manage-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.1));
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.3);
}

/* ---------------------------- user permissions ---------------------------- */

.user-summary-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: 16px;
    box-shadow: var(--oc-shadow);
}

.user-summary-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--oc-gradient);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1rem;
}

.permission-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: 18px;
    box-shadow: var(--oc-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.permission-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 1rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--oc-border);
}

.permission-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.14);
    color: #b4a8ff;
    font-size: 1.1rem;
}

.permission-card-head h2 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 600;
}

.permission-card-head p {
    margin: 0;
    color: var(--oc-muted);
    font-size: 0.8rem;
}

.permission-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.62rem 0.1rem;
    margin: 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.12);
    cursor: pointer;
}

.permission-toggle:last-child {
    border-bottom: 0;
}

.permission-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.permission-toggle-text strong {
    font-size: 0.87rem;
    font-weight: 600;
}

.permission-toggle-text small {
    color: var(--oc-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.permission-toggle .form-check {
    min-height: auto;
    padding-left: 0;
}

.permission-toggle .form-check-input {
    float: none;
    width: 2.4em;
    height: 1.3em;
    margin: 0;
    cursor: pointer;
    background-color: rgba(15, 23, 42, 0.9);
    border-color: var(--oc-border-strong);
}

.permission-toggle .form-check-input:checked {
    background-color: var(--oc-primary);
    border-color: var(--oc-primary);
}

.permission-toggle--all {
    margin-top: 0.55rem;
    padding: 0.72rem 0.85rem;
    background: rgba(124, 92, 255, 0.09);
    border: 1px solid rgba(124, 92, 255, 0.24);
    border-radius: 12px;
}

.permission-toggle--all .permission-toggle-text strong {
    color: #c9c0ff;
}

.permission-savebar {
    position: sticky;
    bottom: 1rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    margin-top: 1.5rem;
    background: rgba(13, 20, 34, 0.94);
    border: 1px solid var(--oc-border);
    border-radius: 16px;
    box-shadow: var(--oc-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.permission-savebar-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--oc-muted);
    font-size: 0.8rem;
}

/* ---------------------------- misc ---------------------------- */

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 12px;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ---------------------------- responsive ---------------------------- */

@media (max-width: 991.98px) {
    .app-main {
        padding-top: 4.25rem;
    }

    .hero-card {
        gap: 1.25rem;
    }

    .app-content {
        padding-bottom: 3rem;
    }
}

@media (max-width: 767.98px) {
    .app-footer {
        flex-wrap: wrap;
        text-align: center;
    }

    .dropdown-menu {
        max-width: calc(100vw - 2rem);
    }

    .table-responsive {
        border-radius: 12px;
    }

    .account-head {
        margin-bottom: 1.25rem;
    }

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

    .permission-savebar {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .app-navbar {
        min-height: 64px;
        padding: 0.5rem 0;
    }

    .app-main {
        padding-top: 4rem;
    }

    .app-brand {
        gap: 0.5rem;
        margin-right: 0.5rem;
    }

    .brand-logo {
        height: 34px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 0.75rem;
    }

    .user-chip {
        padding: 0.22rem 0.55rem 0.22rem 0.22rem;
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-icon {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 50%;
        font-size: 1.6rem;
    }

    .app-content {
        padding-top: 0.6rem;
    }

    .account-panel {
        padding: 1.05rem;
    }

    .permission-savebar {
        flex-direction: column;
        align-items: stretch;
    }

    .permission-savebar > div {
        width: 100%;
    }

    .permission-savebar .btn {
        flex: 1 1 auto;
    }

    .user-summary-card {
        width: 100%;
    }
}

/* ==========================================================================
   LIGHT THEME OVERRIDES
   ========================================================================== */

html[data-bs-theme="light"] {
    --bs-body-bg: var(--oc-bg);
    --bs-body-color: var(--oc-text);
    --bs-secondary-color: var(--oc-muted);
    --bs-border-color: var(--oc-border);
    --bs-link-color: #6d4aff;
    --bs-link-hover-color: #5b3ee0;
    --bs-tertiary-bg: #f1f5f9;
    --bs-emphasis-color: #0f172a;

    --oc-bg: #f4f6fb;
    --oc-bg-soft: #eef2f8;
    --oc-surface: rgba(255, 255, 255, 0.92);
    --oc-surface-solid: #ffffff;
    --oc-surface-2: rgba(15, 23, 42, 0.04);
    --oc-border: rgba(15, 23, 42, 0.12);
    --oc-border-strong: rgba(15, 23, 42, 0.22);
    --oc-text: #0f172a;
    --oc-muted: #64748b;
    --oc-primary: #6d4aff;
    --oc-primary-2: #0891b2;
    --oc-success: #059669;
    --oc-danger: #dc2626;
    --oc-shadow: 0 20px 50px -30px rgba(15, 23, 42, 0.25);
    --oc-gradient: linear-gradient(135deg, #7c5cff 0%, #4f8cff 52%, #22d3ee 100%);
}

html[data-bs-theme="light"] body {
    background-image:
        radial-gradient(1000px 560px at 8% -8%, rgba(124, 92, 255, 0.10), transparent 60%),
        radial-gradient(900px 520px at 100% 0%, rgba(34, 211, 238, 0.08), transparent 55%);
    color: var(--oc-text);
}

/* Cor de link do tema claro com especificidade baixa (via :where) para nao
   sobrescrever componentes que definem a propria cor (botoes, listas, etc.). */
:where(html[data-bs-theme="light"]) a,
:where(html[data-bs-theme="light"]) .btn-link {
    color: #6d4aff;
}

html[data-bs-theme="light"] * {
    scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
}

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.32);
}

/* Navbar */
html[data-bs-theme="light"] .app-navbar {
    background: rgba(255, 255, 255, 0.82);
    border-bottom-color: transparent;
}

html[data-bs-theme="light"] .app-navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.5);
}

html[data-bs-theme="light"] .app-navbar .navbar-toggler {
    border-color: var(--oc-border);
    color: var(--oc-text);
}

html[data-bs-theme="light"] .app-navbar .navbar-nav .nav-link {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .app-navbar .navbar-nav .nav-link:hover,
html[data-bs-theme="light"] .app-navbar .navbar-nav .nav-link:focus {
    color: var(--oc-text);
    background: rgba(15, 23, 42, 0.05);
}

/* User chip */
html[data-bs-theme="light"] .user-chip {
    color: var(--oc-text);
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--oc-border);
}

html[data-bs-theme="light"] .user-chip:hover,
html[data-bs-theme="light"] .user-chip:focus-visible,
html[data-bs-theme="light"] .user-chip.show {
    color: var(--oc-text);
    background: rgba(15, 23, 42, 0.09);
    border-color: var(--oc-border-strong);
}

/* Dropdowns */
html[data-bs-theme="light"] .dropdown-menu {
    --bs-dropdown-bg: rgba(255, 255, 255, 0.98);
    --bs-dropdown-link-color: var(--oc-text);
    --bs-dropdown-link-hover-bg: rgba(15, 23, 42, 0.06);
    --bs-dropdown-link-hover-color: var(--oc-text);
    --bs-dropdown-link-active-bg: rgba(124, 92, 255, 0.16);
    --bs-dropdown-link-active-color: var(--oc-text);
    --bs-dropdown-border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

html[data-bs-theme="light"] .dropdown-item i {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .dropdown-divider {
    border-color: var(--oc-border);
}

/* Offcanvas drawer */
html[data-bs-theme="light"] .app-drawer {
    background: rgba(255, 255, 255, 0.98);
    border-right-color: var(--oc-border);
}

html[data-bs-theme="light"] .app-drawer .offcanvas-header {
    border-bottom-color: var(--oc-border);
}

html[data-bs-theme="light"] .app-drawer .navbar-nav .nav-link {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .app-drawer .dropdown-menu {
    background: transparent;
}

html[data-bs-theme="light"] .app-drawer .dropdown-item {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .app-drawer .dropdown-item:hover {
    color: var(--oc-text);
    background: rgba(15, 23, 42, 0.05);
}

/* Buttons */
html[data-bs-theme="light"] .btn-outline-secondary {
    --bs-btn-color: var(--oc-muted);
    --bs-btn-border-color: var(--oc-border-strong);
    --bs-btn-hover-bg: rgba(15, 23, 42, 0.06);
    --bs-btn-hover-border-color: var(--oc-border-strong);
    --bs-btn-hover-color: var(--oc-text);
}

/* Forms */
html[data-bs-theme="light"] .form-control,
html[data-bs-theme="light"] .form-select {
    color: var(--oc-text);
    background-color: #ffffff;
    border-color: var(--oc-border);
}

html[data-bs-theme="light"] .form-control::placeholder {
    color: #94a3b8;
}

html[data-bs-theme="light"] .form-control:focus,
html[data-bs-theme="light"] .form-select:focus {
    background-color: #ffffff;
    border-color: rgba(124, 92, 255, 0.65);
    box-shadow: 0 0 0 0.22rem rgba(124, 92, 255, 0.18);
}

html[data-bs-theme="light"] .form-control:disabled,
html[data-bs-theme="light"] .form-select:disabled {
    color: #94a3b8;
    background-color: #f1f5f9;
    border-color: var(--oc-border);
}

html[data-bs-theme="light"] .form-label {
    color: #334155;
}

html[data-bs-theme="light"] .form-floating > label {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .form-check-input {
    background-color: #ffffff;
    border-color: var(--oc-border-strong);
}

html[data-bs-theme="light"] .form-check-label {
    color: #334155;
}

html[data-bs-theme="light"] .permission-toggle .form-check-input {
    background-color: #ffffff;
    border-color: var(--oc-border-strong);
}

/* Cards */
html[data-bs-theme="light"] .card {
    background: var(--oc-surface);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

/* Tables */
html[data-bs-theme="light"] .table {
    --bs-table-color: var(--oc-text);
    --bs-table-border-color: var(--oc-border);
    --bs-table-striped-bg: rgba(15, 23, 42, 0.03);
    --bs-table-hover-bg: rgba(124, 92, 255, 0.06);
    --bs-table-hover-color: var(--oc-text);
}

html[data-bs-theme="light"] .table > thead th {
    color: #475569;
}

/* Alerts */
html[data-bs-theme="light"] .alert-danger {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

html[data-bs-theme="light"] .alert-success {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
}

html[data-bs-theme="light"] .alert-warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
}

html[data-bs-theme="light"] .alert-info {
    color: #0e7490;
    background: rgba(14, 116, 144, 0.1);
    border-color: rgba(14, 116, 144, 0.25);
}

/* Hero card */
html[data-bs-theme="light"] .hero-card {
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(34, 211, 238, 0.05) 55%, transparent),
        var(--oc-surface);
}

html[data-bs-theme="light"] .hero-greeting {
    color: #334155;
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--oc-border);
}

html[data-bs-theme="light"] .hero-greeting strong {
    color: #0f172a;
}

/* Quick cards */
html[data-bs-theme="light"] .quick-card {
    color: var(--oc-text);
}

html[data-bs-theme="light"] .quick-card:hover,
html[data-bs-theme="light"] .quick-card:focus-visible {
    color: var(--oc-text);
    border-color: rgba(124, 92, 255, 0.42);
    box-shadow: 0 26px 50px -26px rgba(15, 23, 42, 0.35);
}

html[data-bs-theme="light"] .quick-icon {
    background: rgba(124, 92, 255, 0.12);
    color: #6d4aff;
}

html[data-bs-theme="light"] .quick-card .quick-desc {
    color: var(--oc-muted);
}

/* Auth pages */
html[data-bs-theme="light"] .auth-page {
    background:
        radial-gradient(1100px 600px at 8% 0%, rgba(124, 92, 255, 0.12), transparent 62%),
        radial-gradient(900px 520px at 95% 100%, rgba(34, 211, 238, 0.10), transparent 60%),
        #eef2f8;
}

html[data-bs-theme="light"] .auth-page::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

html[data-bs-theme="light"] .auth-glow-1 {
    background: rgba(124, 92, 255, 0.2);
}

html[data-bs-theme="light"] .auth-glow-2 {
    background: rgba(34, 211, 238, 0.12);
}

html[data-bs-theme="light"] .auth-shell {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--oc-border);
    box-shadow: 0 50px 100px -50px rgba(15, 23, 42, 0.35);
}

html[data-bs-theme="light"] .auth-showcase {
    background:
        linear-gradient(160deg, rgba(124, 92, 255, 0.14), rgba(34, 211, 238, 0.08) 58%, rgba(255, 255, 255, 0.4)),
        #f8fafc;
    border-right-color: var(--oc-border);
}

html[data-bs-theme="light"] .auth-showcase::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

html[data-bs-theme="light"] .auth-showcase > .auth-showcase-body > p {
    color: #475569;
}

html[data-bs-theme="light"] .auth-eyebrow {
    color: #0e7490;
}

html[data-bs-theme="light"] .auth-features strong {
    color: #0f172a;
}

html[data-bs-theme="light"] .feature-icon {
    background: rgba(15, 23, 42, 0.05);
    color: var(--oc-primary-2);
}

html[data-bs-theme="light"] .auth-showcase-foot {
    color: #64748b;
}

html[data-bs-theme="light"] .auth-panel {
    background: transparent;
}

html[data-bs-theme="light"] .auth-pill {
    color: #0e7490;
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.25);
}

html[data-bs-theme="light"] .auth-form .form-label {
    color: #334155;
}

html[data-bs-theme="light"] .auth-footnote {
    color: var(--oc-muted);
    border-top-color: var(--oc-border);
}

/* Compact auth layout */
html[data-bs-theme="light"] .auth-compact-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

html[data-bs-theme="light"] .auth-compact-card h2 {
    color: var(--oc-muted);
}

/* Account / manage pages */
html[data-bs-theme="light"] .account-panel {
    background: var(--oc-surface);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

html[data-bs-theme="light"] .manage-nav {
    background: var(--oc-surface);
    border-color: var(--oc-border);
}

html[data-bs-theme="light"] .manage-nav .nav-link {
    color: var(--oc-muted);
}

html[data-bs-theme="light"] .manage-nav .nav-link:hover {
    color: var(--oc-text);
    background: rgba(15, 23, 42, 0.05);
}

html[data-bs-theme="light"] .manage-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.1));
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.3);
}

html[data-bs-theme="light"] .user-summary-card {
    background: var(--oc-surface);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

html[data-bs-theme="light"] .permission-card {
    background: var(--oc-surface);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

html[data-bs-theme="light"] .permission-card-head {
    border-bottom-color: var(--oc-border);
}

html[data-bs-theme="light"] .permission-icon {
    background: rgba(124, 92, 255, 0.12);
    color: #6d4aff;
}

html[data-bs-theme="light"] .permission-toggle {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="light"] .permission-toggle .form-check-input {
    background-color: #ffffff;
    border-color: var(--oc-border-strong);
}

html[data-bs-theme="light"] .permission-toggle--all {
    background: rgba(124, 92, 255, 0.08);
    border-color: rgba(124, 92, 255, 0.2);
}

html[data-bs-theme="light"] .permission-toggle--all .permission-toggle-text strong {
    color: #5b3ee0;
}

html[data-bs-theme="light"] .permission-savebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--oc-border);
    box-shadow: var(--oc-shadow);
}

/* Footer */
html[data-bs-theme="light"] .app-footer {
    border-top-color: var(--oc-border);
}

html[data-bs-theme="light"] .app-footer .footer-dot {
    background: var(--oc-border-strong);
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--oc-border);
    border-radius: 10px;
    background: var(--oc-surface);
    color: var(--oc-text);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: var(--oc-bg-soft);
    border-color: var(--oc-border-strong);
    color: var(--oc-text);
    text-decoration: none;
}

.theme-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.25);
}

.theme-toggle i {
    font-size: 1.1rem;
}

/* Brand/logo switching - use higher specificity to override .hero-icon img */
img.brand-logo--light,
img.hero-logo--light {
    display: none !important;
}

html[data-bs-theme="light"] img.brand-logo--dark,
html[data-bs-theme="light"] img.hero-logo--dark {
    display: none !important;
}

html[data-bs-theme="light"] img.brand-logo--light,
html[data-bs-theme="light"] img.hero-logo--light {
    display: block !important;
}

/* O .app-main cria um stacking context (z-index: 1) e prendia o modal
   abaixo do backdrop do Bootstrap: a tela escurecia e ficava sem cliques.
   Enquanto houver modal aberto, o contexto é removido. */
body.modal-open .app-main {
    z-index: auto;
}

/* Modal positioning - lower on screen */
.modal.fade#leadModal {
    --bs-modal-margin: 3rem auto;
}

.modal.fade#leadModal .modal-dialog {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* Satisfaction emoji buttons */
.satisfaction-emoji-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.satisfaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0.75rem 0.4rem;
    border-radius: 12px;
    transition: all 0.15s ease;
    background-color: var(--oc-surface);
    border: 2px solid var(--oc-border);
    color: var(--oc-text);
}

.satisfaction-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--oc-shadow);
    border-color: var(--oc-primary);
}

.satisfaction-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.4);
}

.satisfaction-btn.btn-primary,
.satisfaction-btn[aria-pressed="true"] {
    background: var(--oc-gradient);
    border-color: var(--oc-primary);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(124, 92, 255, 0.6);
}

.satisfaction-btn small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    font-size: 0.65rem;
    line-height: 1.2;
    opacity: 0.85;
    margin-top: 0.25rem;
    text-align: center;
    white-space: normal;
}

@media (max-width: 576px) {
    .satisfaction-emoji-group {
        gap: 0.35rem;
    }

    .satisfaction-btn {
        padding: 0.5rem 0.25rem;
    }

    .satisfaction-btn small {
        font-size: 0.58rem;
        min-height: 2.6em;
    }
}

/* Aviso de reconexão do Blazor (mensagens em português)
   Fica invisível durante as tentativas automáticas e só aparece quando
   o Blazor desiste de reconectar (classes -failed / -rejected). */
#components-reconnect-modal.oneclick-reconnect {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(4, 8, 16, 0.6);
    backdrop-filter: blur(2px);
}

#components-reconnect-modal.oneclick-reconnect.components-reconnect-failed,
#components-reconnect-modal.oneclick-reconnect.components-reconnect-rejected {
    display: flex;
}

.oneclick-reconnect-card {
    width: min(24rem, 100%);
    padding: 1.5rem;
    text-align: center;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg, 0.75rem);
    box-shadow: var(--bs-box-shadow-lg, 0 1rem 3rem rgba(0, 0, 0, 0.175));
}

.oneclick-reconnect-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--bs-secondary-color);
    margin-bottom: 0.75rem;
}

#components-reconnect-modal .oneclick-reconnect-failed,
#components-reconnect-modal .oneclick-reconnect-rejected,
#components-reconnect-modal .oneclick-reconnect-retry {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .oneclick-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected .oneclick-reconnect-rejected {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .oneclick-reconnect-retry {
    display: inline-block;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Modulo ZapTool: atendimento (estilo WhatsApp Web) ===== */

.min-w-0 {
    min-width: 0 !important;
}

.wa-page {
    --wa-panel: #f0f2f5;
    --wa-border: rgba(11, 20, 26, 0.1);
    --wa-text: #111b21;
    --wa-muted: #667781;
    --wa-hover: #f5f6f6;
    --wa-active: #e9edef;
    --wa-wallpaper: #efeae2;
    --wa-bubble-in: #ffffff;
    --wa-bubble-out: #d9fdd3;
    --wa-bubble-text: #111b21;
    --wa-header: #f0f2f5;
    --wa-input: #ffffff;
    --wa-day: #ffffff;
    --wa-accent: #00a884;
    --wa-sender: #027eb5;

    position: relative;
    display: flex;
    width: 100%;
    height: calc(100dvh - 220px);
    min-height: 540px;
    overflow: hidden;
    border: 1px solid var(--wa-border);
    border-radius: 14px;
    background: var(--wa-panel);
    box-shadow: 0 30px 60px -50px rgba(0, 0, 0, 0.85);
}

html[data-bs-theme="dark"] .wa-page {
    --wa-panel: #111b21;
    --wa-border: rgba(233, 237, 239, 0.08);
    --wa-text: #e9edef;
    --wa-muted: #8696a0;
    --wa-hover: #202c33;
    --wa-active: #2a3942;
    --wa-wallpaper: #0b141a;
    --wa-bubble-in: #202c33;
    --wa-bubble-out: #005c4b;
    --wa-bubble-text: #e9edef;
    --wa-header: #202c33;
    --wa-input: #2a3942;
    --wa-day: #182229;
    --wa-accent: #00a884;
    --wa-sender: #53bdeb;
}

@supports selector(:has(*)) {
    body:has(.wa-page) .app-main {
        padding-top: 4rem;
    }

    body:has(.wa-page) .app-content {
        max-width: 100%;
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
    }

    body:has(.wa-page) .app-footer {
        display: none;
    }

    .wa-page {
        height: calc(100dvh - 76px);
    }
}

/* ---------- lateral de conversas ---------- */

.wa-sidebar {
    display: flex;
    flex: 0 0 390px;
    flex-direction: column;
    width: 390px;
    min-width: 0;
    background: var(--wa-panel);
    border-right: 1px solid var(--wa-border);
}

.wa-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 60px;
    padding: 0.5rem 0.75rem;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
}

.wa-brand-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wa-accent);
    color: #fff;
    font-size: 1.15rem;
}

.wa-sidebar-title {
    font-weight: 600;
    line-height: 1.15;
    color: var(--wa-text);
}

.wa-sidebar-sub {
    font-size: 0.75rem;
    color: var(--wa-muted);
}

.wa-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--wa-muted);
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.wa-icon-btn:hover,
.wa-icon-btn:focus-visible {
    background: var(--wa-hover);
    color: var(--wa-text);
}

.wa-icon-btn:disabled {
    opacity: 0.5;
}

.wa-icon-btn--sm {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.wa-search {
    padding: 0.45rem 0.75rem;
}

.wa-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 38px;
    padding: 0 0.65rem;
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    background: var(--wa-input);
    color: var(--wa-muted);
}

.wa-search-box input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--wa-text);
    font-size: 0.875rem;
}

.wa-search-box input::placeholder {
    color: var(--wa-muted);
}

.wa-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 0.75rem 0.55rem;
}

.wa-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border: 0;
    border-radius: 999px;
    background: var(--wa-input);
    color: var(--wa-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.wa-chip.active {
    background: rgba(0, 168, 132, 0.16);
    color: var(--wa-accent);
    font-weight: 600;
}

.wa-chip-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--wa-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.wa-bulkbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 0.75rem 0.55rem;
}

.wa-bulk-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 0;
    border-radius: 999px;
    background: var(--wa-input);
    color: var(--wa-muted);
    font-size: 0.76rem;
    white-space: nowrap;
}

.wa-bulk-chip:hover {
    color: var(--wa-text);
}

.wa-bulk-count {
    flex: 1 1 auto;
    text-align: right;
    color: var(--wa-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.wa-bulk-finalize {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: var(--wa-accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.wa-bulk-finalize:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wa-check {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    align-self: center;
    color: var(--wa-accent);
    font-size: 1.05rem;
    cursor: pointer;
}

.wa-chat-item--selected {
    background: rgba(0, 168, 132, 0.1);
}

.wa-notice--ok {
    background: rgba(0, 168, 132, 0.16);
    color: var(--wa-text);
}

.wa-icon-btn--active {
    color: var(--wa-accent);
}

.wa-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0.75rem 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: rgba(234, 179, 8, 0.14);
    color: var(--wa-text);
    font-size: 0.78rem;
}

.wa-notice a {
    color: var(--wa-accent);
    font-weight: 600;
    text-decoration: none;
}

.wa-notice--danger {
    background: rgba(220, 53, 69, 0.14);
}

.wa-chat-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.wa-chat-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--wa-border);
    color: var(--wa-text);
    text-decoration: none;
}

.wa-chat-item:hover {
    background: var(--wa-hover);
    color: var(--wa-text);
}

.wa-chat-item.active {
    background: var(--wa-active);
}

.wa-chat-item-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    min-width: 0;
}

.wa-chat-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.wa-chat-item-top strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.wa-chat-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wa-preview {
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--wa-muted);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-time {
    color: var(--wa-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.wa-time--unread {
    color: var(--wa-accent);
    font-weight: 600;
}

.wa-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--wa-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.wa-chat-item-meta {
    color: var(--wa-muted);
    font-size: 0.7rem;
}

.wa-closed {
    color: var(--wa-muted);
    font-size: 0.95rem;
}

.wa-dot {
    opacity: 0.6;
}

.wa-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 3rem 1.25rem;
    color: var(--wa-muted);
    text-align: center;
}

.wa-list-empty i {
    font-size: 2rem;
    opacity: 0.55;
}

.wa-list-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.wa-list-empty small {
    font-size: 0.75rem;
}

.wa-sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem;
    border-top: 1px solid var(--wa-border);
    color: var(--wa-muted);
    font-size: 0.68rem;
}

/* ---------- avatares ---------- */

.wa-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 49px;
    height: 49px;
    overflow: hidden;
    border-radius: 50%;
    background: #5b6b73;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wa-avatar--sm {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
}

.wa-avatar--xl {
    width: 110px;
    height: 110px;
    font-size: 2.4rem;
}

.wa-avatar--neutral {
    background: rgba(0, 168, 132, 0.15);
    color: var(--wa-accent);
}

.wa-avatar--c1 { background: #0e7c86; }
.wa-avatar--c2 { background: #6d4c9f; }
.wa-avatar--c3 { background: #b45309; }
.wa-avatar--c4 { background: #1d4ed8; }
.wa-avatar--c5 { background: #be185d; }
.wa-avatar--c6 { background: #15803d; }

/* ---------- conversa ---------- */

.wa-chat {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    background: var(--wa-wallpaper);
}

.wa-empty {
    display: grid;
    place-items: center;
    flex: 1 1 auto;
    padding: 2rem;
    background: var(--wa-panel);
    text-align: center;
}

.wa-empty-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    max-width: 420px;
    color: var(--wa-muted);
}

.wa-empty-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    background: rgba(0, 168, 132, 0.1);
    color: var(--wa-accent);
    font-size: 2.4rem;
}

.wa-empty-inner h2 {
    margin: 0;
    color: var(--wa-text);
    font-size: 1.35rem;
}

.wa-empty-inner p {
    margin: 0;
    font-size: 0.9rem;
}

.wa-empty-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.wa-chat-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 60px;
    padding: 0.4rem 0.6rem;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
}

.wa-back {
    display: none;
}

.wa-chat-title {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 0.2rem 0.35rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--wa-text);
    text-align: left;
}

.wa-chat-title:hover {
    background: var(--wa-hover);
}

.wa-chat-title strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-chat-title small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    color: var(--wa-muted);
    font-size: 0.74rem;
}

.wa-online,
.wa-offline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.wa-online i {
    color: var(--wa-accent);
    font-size: 0.45rem;
}

.wa-offline i {
    color: #e0a800;
    font-size: 0.45rem;
}

.wa-chat-actions {
    display: flex;
    align-items: center;
}

.wa-chat-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
    color: var(--wa-muted);
}

.wa-chat-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--wa-text);
    font-size: 0.85rem;
}

.wa-search-count {
    color: var(--wa-muted);
    font-size: 0.72rem;
}

.wa-chat-body {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.wa-messages {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    padding: 1rem clamp(0.75rem, 2.5vw, 2.5rem) 1.25rem;
    background-color: var(--wa-wallpaper);
    background-image:
        radial-gradient(rgba(11, 20, 26, 0.05) 1px, transparent 1.2px),
        radial-gradient(rgba(11, 20, 26, 0.03) 1px, transparent 1.2px);
    background-size: 28px 28px, 14px 14px;
    background-position: 0 0, 7px 7px;
}

html[data-bs-theme="dark"] .wa-messages {
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.2px),
        radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1.2px);
}

.wa-chat-error {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    z-index: 6;
    max-width: 90%;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: rgba(220, 53, 69, 0.92);
    color: #fff;
    font-size: 0.78rem;
    transform: translateX(-50%);
}

.wa-day {
    display: flex;
    justify-content: center;
    margin: 0.9rem 0 0.6rem;
}

.wa-day:first-child {
    margin-top: 0;
}

.wa-day span {
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    background: var(--wa-day);
    color: var(--wa-muted);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 1px 1px rgba(11, 20, 26, 0.12);
}

.wa-row {
    display: flex;
    margin-bottom: 0.25rem;
}

.wa-row--me {
    justify-content: flex-end;
}

.wa-row--other {
    justify-content: flex-start;
}

.wa-bubble {
    position: relative;
    max-width: min(78%, 620px);
    padding: 0.4rem 0.65rem 0.28rem;
    border-radius: 8px;
    background: var(--wa-bubble-bg);
    color: var(--wa-bubble-text);
    box-shadow: 0 1px 1px rgba(11, 20, 26, 0.12);
}

.wa-bubble--me {
    --wa-bubble-bg: var(--wa-bubble-out);
    border-top-right-radius: 2px;
}

.wa-bubble--other {
    --wa-bubble-bg: var(--wa-bubble-in);
    border-top-left-radius: 2px;
}

.wa-bubble::after {
    content: "";
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border: 7px solid transparent;
}

.wa-bubble--me::after {
    right: -7px;
    border-top-color: var(--wa-bubble-bg);
    border-left-color: var(--wa-bubble-bg);
}

.wa-bubble--other::after {
    left: -7px;
    border-top-color: var(--wa-bubble-bg);
    border-right-color: var(--wa-bubble-bg);
}

.wa-bubble--failed {
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.55);
}

.wa-sender {
    margin-bottom: 0.1rem;
    color: var(--wa-sender);
    font-size: 0.74rem;
    font-weight: 600;
}

.wa-text {
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wa-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.1rem;
    color: var(--wa-muted);
    font-size: 0.66rem;
}

.wa-ack,
.wa-ack-read {
    font-size: 0.8rem;
}

.wa-ack-read {
    color: #53bdeb;
}

.wa-retry {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 6px;
    background: transparent;
    color: #dc3545;
    font-size: 0.7rem;
}

/* --- Midia nas conversas (imagem, video, audio, documento, sticker) --- */

.wa-media {
    display: block;
    width: 100%;
    max-width: 320px;
    max-height: 360px;
    margin: 0.1rem 0 0.15rem;
    border-radius: 6px;
    object-fit: contain;
}

/* Botao que envolve a midia clicavel (amplia no lightbox) */
.wa-media-open {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 6px;
    max-width: 100%;
}

.wa-video-thumb {
    position: relative;
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 6px;
    max-width: 100%;
}

.wa-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 8vw, 3rem);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    transition: transform 0.15s ease;
    pointer-events: none;
    line-height: 1;
}

.wa-video-thumb:hover .wa-play-badge,
.wa-video-thumb:focus-visible .wa-play-badge {
    transform: translate(-50%, -50%) scale(1.15);
}

/* Fallback de midia indisponivel (404/403/expirada) */
.wa-media-broken {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.1rem 0 0.15rem;
    padding: 0.6rem 0.75rem;
    border: 1px dashed var(--wa-border);
    border-radius: 8px;
    color: var(--wa-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Lightbox: overlay escuro, midia em ate 90vw/90vh, ESC ou clique fecha */
.wa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.94);
    cursor: zoom-out;
}

.wa-lightbox-media {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    object-fit: contain;
    cursor: default;
}

.wa-lightbox-close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.wa-lightbox-close:hover,
.wa-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.28);
}

.wa-lightbox-caption {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    max-width: min(720px, 90vw);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
}

/* Trava o scroll do body com a lightbox aberta */
body.wa-lightbox-open {
    overflow: hidden;
}


/* Area do player de video com fundo escuro, como no WhatsApp Web */
.wa-media:is(video) {
    background: rgba(0, 0, 0, 0.35);
}

.wa-media--sticker {
    width: 192px;
    max-height: 192px;
    margin: 0.1rem 0;
    background: transparent;
}

.wa-audio {
    display: block;
    width: min(280px, 60vw);
    max-height: 40px;
    margin: 0.1rem 0 0.15rem;
}

.wa-doc {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.1rem 0 0.15rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: var(--wa-header);
    border: 1px solid var(--wa-border);
    color: inherit;
    text-decoration: none;
}

.wa-doc:hover,
.wa-doc:focus {
    background: var(--wa-border);
    color: inherit;
}

.wa-doc-icon {
    font-size: 1.6rem;
    color: var(--wa-muted);
    flex: none;
}

.wa-doc-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wa-doc-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wa-doc-size {
    font-size: 0.7rem;
    color: var(--wa-muted);
}

.wa-media-caption {
    font-size: 0.9rem;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wa-location-card {
    min-width: 200px;
    max-width: 280px;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: var(--wa-header);
    border: 1px solid var(--wa-border);
}

.wa-location-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--wa-muted);
}

.wa-location-name {
    font-weight: 600;
    margin-top: 0.25rem;
    overflow-wrap: anywhere;
}

.wa-location-address {
    font-size: 0.85rem;
    color: var(--wa-muted);
    overflow-wrap: anywhere;
}

.wa-location-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wa-green, #0b8c53);
    text-decoration: none;
}

.wa-location-link:hover,
.wa-location-link:focus {
    text-decoration: underline;
}

.wa-location-form {
    border: 1px solid var(--wa-border);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    background: var(--wa-panel, #fff);
}

.wa-messages-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 4rem 1rem;
    color: var(--wa-muted);
}

.wa-messages-empty i {
    font-size: 2rem;
    opacity: 0.55;
}

.wa-messages-empty p {
    margin: 0;
    font-size: 0.85rem;
}

.wa-composer {
    padding: 0.55rem clamp(0.6rem, 2vw, 1rem);
    background: var(--wa-header);
    border-top: 1px solid var(--wa-border);
}

.wa-composer-box {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    padding: 0.25rem 0.3rem 0.25rem 0.8rem;
    border-radius: 10px;
    background: var(--wa-input);
}

.wa-composer-box textarea {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 24px;
    max-height: 140px;
    padding: 0.45rem 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--wa-text);
    font-size: 0.9rem;
    line-height: 1.4;
    resize: none;
    field-sizing: content;
}

.wa-send {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--wa-accent);
    color: #fff;
    font-size: 1rem;
}

.wa-send:hover:not(:disabled) {
    filter: brightness(1.06);
}

.wa-send:disabled {
    background: var(--wa-muted);
    opacity: 0.5;
}

.wa-composer-hint {
    margin-top: 0.25rem;
    color: var(--wa-muted);
    font-size: 0.68rem;
    text-align: right;
}

.wa-composer-offline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(224, 168, 0, 0.14);
    color: var(--wa-text);
    font-size: 0.8rem;
}

.wa-composer-offline a {
    color: var(--wa-accent);
    font-weight: 600;
    text-decoration: none;
}

/* ---------- painel de informacoes / notas ---------- */

.wa-info {
    display: flex;
    flex: 0 0 340px;
    flex-direction: column;
    width: 340px;
    min-height: 0;
    overflow-y: auto;
    background: var(--wa-panel);
    border-left: 1px solid var(--wa-border);
    z-index: 4;
}

.wa-info-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 60px;
    padding: 0.4rem 0.6rem;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
}

.wa-info-header strong {
    color: var(--wa-text);
    font-size: 0.95rem;
}

.wa-info-body {
    padding: 1rem;
}

.wa-info-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--wa-border);
    text-align: center;
}

.wa-info-contact strong {
    margin-top: 0.4rem;
    color: var(--wa-text);
    font-size: 1.1rem;
}

.wa-info-contact small {
    color: var(--wa-muted);
}

.wa-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem 0.8rem;
    margin: 1rem 0;
    font-size: 0.82rem;
}

.wa-info-list dt {
    color: var(--wa-muted);
    font-weight: 500;
}

.wa-info-list dd {
    margin: 0;
    color: var(--wa-text);
}

.wa-info-title {
    margin: 1rem 0 0.5rem;
    color: var(--wa-text);
    font-size: 0.85rem;
}

.wa-note-input {
    border-color: var(--wa-border);
    background: var(--wa-input);
    color: var(--wa-text);
    font-size: 0.82rem;
}

.wa-info-empty {
    margin-top: 0.75rem;
    color: var(--wa-muted);
    font-size: 0.78rem;
}

.wa-notes {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.wa-note {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    background: var(--wa-input);
}

.wa-note-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--wa-muted);
    font-size: 0.74rem;
}

.wa-note-text {
    color: var(--wa-text);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wa-note-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.wa-note-actions .btn-link {
    padding: 0 0.25rem;
    font-size: 0.75rem;
    text-decoration: none;
}

.wa-note-confirm {
    margin-right: auto;
    color: var(--wa-muted);
    font-size: 0.75rem;
}

/* ---------- painel do ZapTool (dashboard) ---------- */

.wa-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid var(--oc-border, var(--bs-border-color));
    border-radius: 14px;
    background: var(--bs-body-bg);
}

.wa-stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.15rem;
}

.wa-stat-icon--green { background: rgba(0, 168, 132, 0.14); color: #00a884; }
.wa-stat-icon--blue { background: rgba(13, 110, 253, 0.14); color: #4d8dff; }
.wa-stat-icon--amber { background: rgba(224, 168, 0, 0.16); color: #d9a400; }
.wa-stat-icon--purple { background: rgba(124, 92, 255, 0.16); color: #8f78ff; }

.wa-stat-value {
    color: var(--bs-body-color);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.05;
}

.wa-stat-total {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.wa-stat-label {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wa-stat-sub {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.wa-dash-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
}

/* ---------- responsivo ---------- */

.wa-chat-list,
.wa-messages,
.wa-info {
    scrollbar-color: rgba(134, 150, 160, 0.4) transparent;
    scrollbar-width: thin;
}

.wa-chat-list::-webkit-scrollbar,
.wa-messages::-webkit-scrollbar,
.wa-info::-webkit-scrollbar {
    width: 8px;
}

.wa-chat-list::-webkit-scrollbar-thumb,
.wa-messages::-webkit-scrollbar-thumb,
.wa-info::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(134, 150, 160, 0.4);
}

@media (max-width: 1199.98px) {
    .wa-sidebar {
        flex-basis: 340px;
        width: 340px;
    }
}

@media (max-width: 991.98px) {
    .wa-info {
        position: absolute;
        inset: 0 0 0 auto;
        width: min(340px, 100%);
        box-shadow: -24px 0 50px -30px rgba(0, 0, 0, 0.6);
    }
}

@media (max-width: 767.98px) {
    body:has(.wa-page) .app-main {
        padding-top: 3.75rem;
    }

    body:has(.wa-page) .app-content {
        padding: 0.5rem 0 0;
    }

    body:has(.wa-page) .app-footer {
        display: none;
    }

    .wa-page {
        height: calc(100dvh - 4.5rem);
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .wa-sidebar {
        flex: 1 1 100%;
        width: 100%;
        border-right: 0;
    }

    .wa-chat {
        display: none;
    }

    .wa-page--chat-open .wa-sidebar {
        display: none;
    }

    .wa-page--chat-open .wa-chat {
        display: flex;
    }

    .wa-back {
        display: inline-grid;
    }

    .wa-bubble {
        max-width: 88%;
    }

    .wa-sidebar-footer {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .wa-stat-card {
        padding: 0.85rem;
    }

    .wa-stat-value {
        font-size: 1.45rem;
    }

    .wa-day span {
        font-size: 0.65rem;
    }
}

/* ---------- zaptool media send, drag-drop, recording ---------- */

.wa-chat.wa-dragover {
    position: relative;
}

.wa-chat.wa-dragover::after {
    content: "Solte os arquivos aqui para enviar";
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 168, 132, 0.2);
    border: 3px dashed var(--wa-accent);
    color: var(--wa-text);
    font-size: 1.25rem;
    font-weight: 600;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.wa-media-preview-container {
    padding: 0.75rem clamp(0.6rem, 2vw, 1rem);
    background: var(--wa-header);
    border-top: 1px solid var(--wa-border);
    animation: waSlideUp 0.15s ease-out;
}

.wa-media-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    max-height: 180px;
    overflow-y: auto;
}

.wa-media-preview-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--wa-input);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    max-width: 240px;
}

.wa-media-preview-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.wa-media-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--wa-bubble-in);
    color: var(--wa-accent);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.wa-media-preview-info {
    flex: 1 1 auto;
    min-width: 0;
}

.wa-media-preview-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--wa-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-media-preview-size {
    font-size: 0.68rem;
    color: var(--wa-muted);
}

.wa-media-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wa-recording-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    background: var(--wa-input);
}

.wa-recording-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
    animation: waPulse 1s infinite alternate;
}

@keyframes waPulse {
    from { opacity: 0.4; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1.15); }
}

@keyframes waSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wa-recording-timer {
    font-size: 0.88rem;
    font-weight: 600;
    color: #dc3545;
    font-variant-numeric: tabular-nums;
}

/* ---------- avatares de contatos/grupos (ZapTool) ---------- */

.wa-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.wa-chat-item-number {
    display: block;
    font-size: 0.73rem;
    color: var(--wa-muted);
    padding: 0 0.25rem;
    margin-top: -0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
