/*
 * BusinessVerse · Refinamento visual global
 * Camada exclusivamente visual. Regras de negócio, rotas e dados permanecem intactos.
 */

:root {
    --bv-navy: #0b1f3b;
    --bv-navy-2: #102c54;
    --bv-blue: #2563eb;
    --bv-cyan: #06b6d4;
    --bv-orange: #f97316;
    --bv-slate-950: #0f172a;
    --bv-slate-700: #334155;
    --bv-slate-500: #64748b;
    --bv-slate-300: #cbd5e1;
    --bv-slate-200: #e2e8f0;
    --bv-slate-100: #f1f5f9;
    --bv-surface: rgba(255, 255, 255, 0.96);
    --bv-shadow-sm: 0 1px 2px rgba(11, 31, 59, 0.04), 0 8px 24px rgba(11, 31, 59, 0.045);
    --bv-shadow-md: 0 2px 5px rgba(11, 31, 59, 0.035), 0 18px 46px rgba(11, 31, 59, 0.075);
    --bv-shadow-lg: 0 22px 65px rgba(3, 14, 32, 0.2);
    --bv-radius-card: 1.35rem;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #a9b9cd #edf2f7;
    scrollbar-width: thin;
}

body {
    font-family: Inter, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(37, 99, 235, 0.18);
    color: var(--bv-navy);
}

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

::-webkit-scrollbar-track {
    background: #edf2f7;
}

::-webkit-scrollbar-thumb {
    border: 2px solid #edf2f7;
    border-radius: 999px;
    background: #a9b9cd;
}

::-webkit-scrollbar-thumb:hover {
    background: #7f94ae;
}

/* Estrutura principal */

.bv-app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 94% 4%, rgba(6, 182, 212, 0.075), transparent 22rem),
        radial-gradient(circle at 30% 100%, rgba(37, 99, 235, 0.055), transparent 32rem),
        linear-gradient(145deg, #f8fafc 0%, #f4f7fb 52%, #eef5ff 100%);
    color: var(--bv-slate-950);
}

.bv-sidebar {
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.2), transparent 14rem),
        radial-gradient(circle at 115% 72%, rgba(37, 99, 235, 0.28), transparent 16rem),
        linear-gradient(165deg, #0b1f3b 0%, #0b2344 50%, #081a32 100%);
    box-shadow: 16px 0 50px rgba(11, 31, 59, 0.09);
}

.bv-sidebar::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    content: "";
    pointer-events: none;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.bv-brandbar {
    background: rgba(11, 31, 59, 0.93);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.bv-brandbar img {
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
}

.bv-nav {
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.bv-nav-link {
    position: relative;
    min-height: 3rem;
    border: 1px solid transparent;
    color: rgba(226, 232, 240, 0.8);
}

.bv-nav-link::after {
    position: absolute;
    top: 50%;
    right: -1rem;
    width: 3px;
    height: 0;
    border-radius: 999px 0 0 999px;
    background: var(--bv-orange);
    content: "";
    opacity: 0;
    transform: translateY(-50%);
    transition: height 180ms ease, opacity 180ms ease;
}

.bv-nav-link:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.075);
    color: #fff;
    transform: translateX(2px);
}

.bv-nav-link.is-active {
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 9px 24px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.bv-nav-link.is-active::after {
    height: 1.65rem;
    opacity: 1;
}

.bv-nav-icon {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.065);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.bv-nav-link.is-active .bv-nav-icon {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, #fb8b3e, var(--bv-orange));
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

.bv-user-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.bv-main {
    min-height: 100vh;
}

.bv-topbar {
    min-height: 86px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(155%);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.1), 0 12px 34px rgba(11, 31, 59, 0.045);
}

.bv-topbar::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.28), transparent);
    content: "";
}

.bv-topbar h1 {
    color: var(--bv-navy);
    letter-spacing: -0.035em;
}

.bv-topbar [class*="tracking-"] {
    letter-spacing: 0.16em;
}

.bv-page {
    width: 100%;
    animation: bv-page-enter 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bv-page-enter {
    /*
     * Não anime `transform` neste contêiner. Um ancestral transformado muda
     * a referência dos descendentes `position: fixed` e fazia confirmações e
     * a celebração final aparecerem fora da área visível depois da rolagem.
     */
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Superfícies e hierarquia */

.bv-page section.rounded-3xl.bg-white:not(.shadow-2xl),
.bv-page article.rounded-3xl.bg-white:not(.shadow-2xl),
.bv-page div.rounded-3xl.bg-white:not(.shadow-2xl),
.bv-page details.rounded-3xl.bg-white:not(.shadow-2xl) {
    border-color: rgba(203, 213, 225, 0.74);
    background: var(--bv-surface);
    box-shadow: var(--bv-shadow-sm);
}

.bv-page section.rounded-3xl.bg-white,
.bv-page details.rounded-3xl.bg-white {
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

@media (hover: hover) {
    .bv-page section.rounded-3xl.bg-white:hover,
    .bv-page details.rounded-3xl.bg-white:hover {
        border-color: rgba(37, 99, 235, 0.2);
        box-shadow: var(--bv-shadow-md);
    }
}

.bv-page [class*="bg-gradient-to-br"][class*="from-brandNavy"] {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: var(--bv-navy);
    box-shadow: 0 18px 45px rgba(11, 31, 59, 0.18), inset 0 1px rgba(255, 255, 255, 0.1);
}

.bv-page [class*="bg-gradient-to-br"][class*="from-brandNavy"]::before {
    pointer-events: none;
}

.bv-page h2,
.bv-page h3,
.bv-page h4 {
    text-wrap: balance;
}

.bv-page h2.font-black,
.bv-page h3.font-black,
.bv-page h2.font-bold,
.bv-page h3.font-bold {
    letter-spacing: -0.025em;
}

.bv-page p.text-slate-500,
.bv-page p.text-slate-600 {
    line-height: 1.58;
}

.bv-page hr,
.bv-page .border-t {
    border-color: rgba(226, 232, 240, 0.82);
}

/* Formulários */

.bv-app-shell input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
.bv-app-shell select,
.bv-app-shell textarea,
.bv-auth-page input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
.bv-auth-page select,
.bv-auth-page textarea {
    min-height: 2.85rem;
    border-color: #cbd5e1;
    background-color: rgba(255, 255, 255, 0.94);
    color: var(--bv-slate-950);
    box-shadow: 0 1px 2px rgba(11, 31, 59, 0.025), inset 0 1px rgba(255, 255, 255, 0.7);
}

.bv-app-shell textarea,
.bv-auth-page textarea {
    min-height: 7rem;
}

.bv-app-shell input::placeholder,
.bv-app-shell textarea::placeholder,
.bv-auth-page input::placeholder,
.bv-auth-page textarea::placeholder {
    color: #94a3b8;
}

.bv-app-shell input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]):hover,
.bv-app-shell select:hover,
.bv-app-shell textarea:hover,
.bv-auth-page input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]):hover,
.bv-auth-page select:hover,
.bv-auth-page textarea:hover {
    border-color: #9fb1c7;
}

.bv-app-shell input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]):focus,
.bv-app-shell select:focus,
.bv-app-shell textarea:focus,
.bv-auth-page input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]):focus,
.bv-auth-page select:focus,
.bv-auth-page textarea:focus {
    border-color: var(--bv-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 5px 16px rgba(11, 31, 59, 0.06);
}

.bv-app-shell input:disabled,
.bv-app-shell select:disabled,
.bv-app-shell textarea:disabled {
    cursor: not-allowed;
    border-color: #e2e8f0;
    background: #f1f5f9;
    color: #64748b;
}

.bv-app-shell input[type="checkbox"],
.bv-app-shell input[type="radio"],
.bv-auth-page input[type="checkbox"],
.bv-auth-page input[type="radio"] {
    accent-color: var(--bv-blue);
}

.bv-app-shell input[type="range"] {
    accent-color: var(--bv-blue);
}

.bv-app-shell label > span:first-child,
.bv-auth-page label > span:first-child {
    letter-spacing: -0.005em;
}

/* Botões e ações */

.bv-app-shell button,
.bv-app-shell a[class*="bg-brand"],
.bv-auth-page button {
    -webkit-tap-highlight-color: transparent;
}

.bv-app-shell button[class*="bg-brandNavy"],
.bv-app-shell a[class*="bg-brandNavy"],
.bv-app-shell button[class*="bg-brandBlue"],
.bv-app-shell a[class*="bg-brandBlue"],
.bv-auth-page button[class*="bg-"][class*="0B1F3B"] {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(11, 31, 59, 0.16);
}

.bv-app-shell button[class*="bg-brandOrange"],
.bv-app-shell a[class*="bg-brandOrange"] {
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2);
}

@media (hover: hover) {
    .bv-app-shell button:not(:disabled):hover,
    .bv-app-shell a[class*="rounded-xl"][class*="bg-"]:hover,
    .bv-auth-page button:not(:disabled):hover {
        transform: translateY(-1px);
    }
}

.bv-app-shell button:active:not(:disabled),
.bv-app-shell a[class*="rounded-xl"][class*="bg-"]:active,
.bv-auth-page button:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.bv-app-shell button:disabled,
.bv-app-shell a[aria-disabled="true"] {
    cursor: not-allowed;
    filter: saturate(0.7);
    opacity: 0.58;
    box-shadow: none;
}

/* Tabelas e grandes conjuntos de dados */

.bv-page table {
    border-collapse: separate;
    border-spacing: 0;
    line-height: 1.42;
}

.bv-page table thead {
    color: #52647a;
}

.bv-page table thead th {
    border-bottom-color: #dbe4ee;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
    font-weight: 750;
}

.bv-page table tbody tr {
    transition: background-color 150ms ease;
}

.bv-page table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.52);
}

.bv-page table tbody tr:hover {
    background: rgba(239, 246, 255, 0.72);
}

.bv-page table td,
.bv-page table th {
    vertical-align: middle;
}

.bv-scroll-shell {
    border-radius: 1rem;
}

.bv-scroll-shell::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1.5rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82));
    content: "";
    pointer-events: none;
}

.bv-scroll-control {
    border-color: rgba(148, 163, 184, 0.55);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(11, 31, 59, 0.17);
    font-size: 1.45rem;
}

.bv-scroll-control:focus-visible {
    outline: 3px solid rgba(6, 182, 212, 0.28);
    outline-offset: 2px;
}

/* Mensagens, detalhes, gráficos e pequenos acabamentos */

.bv-alert {
    position: relative;
    /* Ganha da utilidade px-* carregada pelo Tailwind CDN. */
    padding-left: 3.25rem !important;
    box-shadow: var(--bv-shadow-sm);
}

.bv-alert::before {
    position: absolute;
    top: 50%;
    left: 1.15rem;
    display: grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    content: "✓";
    font-size: 0.72rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.bv-alert--success::before { background: #059669; }
.bv-alert--info::before { background: var(--bv-blue); content: "i"; }
.bv-alert--error::before { background: #e11d48; content: "!"; }

/*
 * Todas as confirmações e celebrações permanecem centralizadas na janela
 * atual. Se o conteúdo for maior que a tela, a rolagem acontece dentro da
 * própria camada, sem empurrar o diálogo para fora da área visível.
 */
.bv-page .fixed.inset-0.flex.items-center.justify-center {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bv-page .fixed.inset-0.flex.items-center.justify-center > .relative {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bv-page details > summary {
    border-radius: 1rem;
    transition: background-color 180ms ease, color 180ms ease;
}

.bv-page details > summary:hover {
    background: rgba(239, 246, 255, 0.65);
    color: var(--bv-blue);
}

.bv-page details[open] > summary {
    color: var(--bv-navy);
}

.bv-page canvas {
    filter: drop-shadow(0 9px 18px rgba(11, 31, 59, 0.035));
}

.bv-page [class*="rounded-full"][class*="text-xs"],
.bv-page [class*="rounded-full"][class*="text-[10px]"] {
    font-weight: 700;
    letter-spacing: 0.025em;
}

.bv-page [class*="border-dashed"] {
    background-image: linear-gradient(145deg, rgba(248, 250, 252, 0.66), rgba(255, 255, 255, 0.92));
}

/* Autenticação */

.bv-auth-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background:
        radial-gradient(circle at 14% 16%, rgba(6, 182, 212, 0.29), transparent 24rem),
        radial-gradient(circle at 88% 84%, rgba(249, 115, 22, 0.24), transparent 22rem),
        radial-gradient(circle at 64% 5%, rgba(37, 99, 235, 0.2), transparent 20rem),
        linear-gradient(145deg, #07182f, var(--bv-navy) 50%, #0c2b50);
}

.bv-auth-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    mask-image: radial-gradient(circle at center, #000, transparent 83%);
}

.bv-auth-shell {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 32px 85px rgba(0, 8, 24, 0.38), inset 0 1px rgba(255, 255, 255, 0.08);
}

.bv-auth-brand {
    position: relative;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.005));
}

.bv-auth-brand::after {
    position: absolute;
    right: 0;
    bottom: 2.5rem;
    width: 4px;
    height: 5rem;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(var(--bv-cyan), var(--bv-blue), var(--bv-orange));
    content: "";
    opacity: 0.88;
}

.bv-auth-form-panel {
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.08), transparent 13rem),
        #fff;
}

.bv-auth-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.075), transparent 15rem),
        #fff;
    box-shadow: var(--bv-shadow-lg);
}

.bv-auth-card::before {
    display: block;
    width: 3rem;
    height: 4px;
    margin-bottom: 1.5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bv-orange), var(--bv-cyan));
    content: "";
}

/* Responsividade */

@media (max-width: 767px) {
    .bv-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 50;
        width: 100%;
        height: 6.75rem;
        min-height: 0;
        padding-top: 0 !important;
        overflow: visible;
        box-shadow: 0 12px 30px rgba(11, 31, 59, 0.13);
    }

    .bv-brandbar {
        position: relative;
        inset: auto;
        z-index: 2;
        height: 3.5rem;
        min-height: 3.5rem;
        padding: 0.45rem 0.75rem;
        box-shadow: 0 4px 14px rgba(4, 18, 36, 0.18);
    }

    .bv-brandbar img {
        width: auto;
        height: 1.9rem;
        max-width: 10rem;
    }

    .bv-brandbar p:first-child {
        font-size: 0.5rem;
        line-height: 1;
    }

    .bv-brandbar p:last-child {
        max-width: 9rem;
        font-size: 0.75rem;
        line-height: 1.15;
    }

    .bv-nav {
        display: flex;
        position: relative;
        z-index: 1;
        gap: 0.4rem;
        width: 100%;
        height: 3.25rem;
        min-height: 3.25rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.35rem 0.6rem;
        scroll-padding-inline: calc(50vw - 4.75rem);
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        -ms-overflow-style: none;
        background:
            radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.16), transparent 13rem),
            linear-gradient(90deg, rgba(11, 35, 68, 0.98), rgba(13, 42, 80, 0.98));
        box-shadow: 0 10px 24px rgba(11, 31, 59, 0.16);
        backdrop-filter: blur(18px) saturate(140%);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
    }

    .bv-nav::-webkit-scrollbar {
        display: none;
    }

    .bv-nav::before,
    .bv-nav::after {
        flex: 0 0 calc(50vw - 5rem);
        content: "";
    }

    .bv-nav > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .bv-nav-link {
        flex: 0 0 auto;
        min-height: 2.5rem;
        min-width: max-content;
        max-width: none;
        gap: 0.45rem;
        padding: 0.32rem 0.62rem;
        scroll-snap-align: center;
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.045);
        font-size: 0.72rem;
        line-height: 1.1;
        box-shadow: none !important;
    }

    .bv-nav-link:hover {
        transform: none;
    }

    .bv-nav-link::after {
        display: none !important;
        content: none !important;
    }

    .bv-nav-link[aria-current="page"] {
        border-color: rgba(255, 255, 255, 0.22);
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
        box-shadow: inset 0 -3px 0 var(--bv-orange), inset 0 1px rgba(255, 255, 255, 0.08) !important;
    }

    .bv-nav-icon {
        width: 1.7rem;
        height: 1.7rem;
    }

    .bv-nav-link > span:nth-child(2) {
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .bv-sidebar-footer {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 60;
        display: flex;
        min-height: 2.75rem;
        align-items: center;
        justify-content: flex-end;
        padding: 0.35rem max(0.75rem, env(safe-area-inset-right)) max(0.35rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(7, 24, 47, 0.97);
        box-shadow: 0 -8px 24px rgba(3, 14, 32, 0.16);
        backdrop-filter: blur(16px) saturate(140%);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
    }

    .bv-sidebar-footer .bv-user-card {
        display: flex;
        width: auto;
        align-items: center;
        justify-content: flex-end;
        gap: 0.4rem;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .bv-sidebar-footer .bv-user-card > div {
        display: none;
    }

    .bv-sidebar-footer .bv-user-card > a,
    .bv-sidebar-footer .bv-user-card > form,
    .bv-sidebar-footer .bv-user-card > form button {
        margin: 0 !important;
    }

    .bv-sidebar-footer .bv-user-card > a,
    .bv-sidebar-footer .bv-user-card > form button {
        display: inline-flex;
        min-height: 2rem;
        align-items: center;
        justify-content: center;
        gap: 0.32rem;
        padding: 0.35rem 0.68rem;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 0.65rem;
        font-size: 0.72rem;
        font-weight: 750;
        line-height: 1;
    }

    .bv-sidebar-footer .bv-user-card > a {
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
    }

    .bv-sidebar-footer .bv-user-card > form button {
        border-color: rgba(249, 115, 22, 0.45);
        background: rgba(249, 115, 22, 0.16);
        color: #fed7aa;
    }

    .bv-main {
        min-height: 100vh;
        padding-top: 6.75rem !important;
    }

    .bv-topbar {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        min-height: 0;
        align-items: flex-start;
        gap: 0.55rem;
        margin: 0 !important;
        padding: 0.7rem 0.75rem;
    }

    .bv-topbar > div:first-child,
    .bv-topbar > div:last-child {
        width: 100%;
    }

    .bv-topbar > div:last-child {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .bv-mobile-team-chip {
        display: none !important;
    }

    .bv-page-eyebrow {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.68rem;
        line-height: 1.4;
        letter-spacing: 0.13em !important;
        white-space: normal;
        text-overflow: clip;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .bv-page-title {
        overflow: visible;
        margin-top: 0.16rem;
        font-size: clamp(1.32rem, 6.4vw, 1.6rem);
        line-height: 1.16;
        letter-spacing: -0.025em !important;
        white-space: normal;
        text-overflow: clip;
    }

    .bv-page {
        overflow: visible;
        padding-top: 0.75rem;
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }

    .bv-page > :first-child {
        margin-top: 0 !important;
    }

    .bv-page h1,
    .bv-page h2,
    .bv-page h3,
    .bv-page h4,
    .bv-page p {
        overflow-wrap: anywhere;
    }

    .bv-page [class*="from-brandNavy"] h2 {
        font-size: clamp(1.55rem, 7.2vw, 1.85rem);
        line-height: 1.13;
        letter-spacing: -0.035em;
    }

    .bv-page table thead th {
        white-space: nowrap;
    }

    .bv-scroll-control {
        width: 2.15rem;
        height: 2.15rem;
        font-size: 1.25rem;
    }

    .bv-scroll-control--previous { left: 0.35rem; }
    .bv-scroll-control--next { right: 0.35rem; }

    .bv-auth-page .bv-auth-shell {
        max-width: 31rem;
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .bv-brandbar {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .bv-brandbar img {
        max-width: 9.25rem;
    }

    .bv-page .p-6 {
        padding: 1.1rem;
    }

    .bv-page .p-8 {
        padding: 1.25rem;
    }

    .bv-page .px-6 {
        padding-right: 1.1rem;
        padding-left: 1.1rem;
    }

    .bv-page section.rounded-3xl,
    .bv-page article.rounded-3xl,
    .bv-page div.rounded-3xl,
    .bv-page details.rounded-3xl {
        border-radius: 1.15rem;
    }

    .bv-alert {
        padding-left: 3rem !important;
    }
}

/* Escala compacta para conteúdo em smartphones e tablets estreitos. */
@media (max-width: 767px) {
    .bv-page {
        font-size: 0.875rem;
        line-height: 1.45;
    }

    .bv-page .text-4xl {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    .bv-page .text-3xl {
        font-size: 1.45rem;
        line-height: 1.12;
    }

    .bv-page .text-2xl {
        font-size: 1.22rem;
        line-height: 1.18;
    }

    .bv-page .text-xl {
        font-size: 1.05rem;
        line-height: 1.24;
    }

    .bv-page .text-lg {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .bv-page .text-base {
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .bv-page .text-sm {
        font-size: 0.77rem;
        line-height: 1.46;
    }

    .bv-page .text-xs {
        font-size: 0.66rem;
        line-height: 1.4;
    }

    .bv-page .p-8 { padding: 1.15rem; }
    .bv-page .p-7 { padding: 1.08rem; }
    .bv-page .p-6 { padding: 1rem; }
    .bv-page .p-5 { padding: 0.86rem; }
    .bv-page .p-4 { padding: 0.72rem; }
    .bv-page .p-3 { padding: 0.58rem; }

    .bv-page .px-8 { padding-right: 1.15rem; padding-left: 1.15rem; }
    .bv-page .px-7 { padding-right: 1.08rem; padding-left: 1.08rem; }
    .bv-page .px-6 { padding-right: 1rem; padding-left: 1rem; }
    .bv-page .px-5 { padding-right: 0.86rem; padding-left: 0.86rem; }
    .bv-page .px-4 { padding-right: 0.72rem; padding-left: 0.72rem; }

    .bv-page .py-6 { padding-top: 1rem; padding-bottom: 1rem; }
    .bv-page .py-5 { padding-top: 0.86rem; padding-bottom: 0.86rem; }
    .bv-page .py-4 { padding-top: 0.72rem; padding-bottom: 0.72rem; }
    .bv-page .py-3 { padding-top: 0.58rem; padding-bottom: 0.58rem; }

    .bv-page .gap-8 { gap: 1.2rem; }
    .bv-page .gap-6 { gap: 1rem; }
    .bv-page .gap-5 { gap: 0.86rem; }
    .bv-page .gap-4 { gap: 0.72rem; }
    .bv-page .gap-3 { gap: 0.58rem; }

    .bv-page .mt-8 { margin-top: 1.2rem; }
    .bv-page .mt-7 { margin-top: 1.05rem; }
    .bv-page .mt-6 { margin-top: 0.95rem; }
    .bv-page .mt-5 { margin-top: 0.82rem; }
    .bv-page .mt-4 { margin-top: 0.68rem; }
    .bv-page .mt-3 { margin-top: 0.55rem; }

    .bv-dashboard-summary-grid,
    .bv-results-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.62rem;
    }

    .bv-dashboard-summary-grid > .rounded-2xl,
    .bv-results-summary-grid > .rounded-2xl {
        min-height: 0;
        padding: 0.78rem;
    }

    .bv-dashboard-summary-grid > .rounded-2xl > :last-child,
    .bv-results-summary-grid > .rounded-2xl > :last-child {
        margin-top: 0.38rem;
    }

    .bv-round-summary-grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.24fr) minmax(0, 1fr);
        gap: 0.42rem;
        align-items: start;
    }

    .bv-round-summary-grid .rounded-2xl {
        height: auto;
        min-height: 0;
        padding: 0.62rem;
    }

    .bv-round-summary-grid .gap-4 {
        gap: 0.38rem;
    }

    .bv-round-summary-grid p {
        font-size: 0.68rem !important;
        line-height: 1.38 !important;
    }

    .bv-round-summary-grid .text-xl {
        font-size: 1rem;
    }

    .bv-page section.rounded-3xl,
    .bv-page article.rounded-3xl,
    .bv-page div.rounded-3xl,
    .bv-page details.rounded-3xl {
        border-radius: 1rem;
    }
}

@media (max-width: 1023px) {
    .bv-auth-shell {
        max-width: 42rem;
    }

    .bv-auth-brand {
        min-height: auto !important;
        padding: 1.5rem 1.75rem;
    }

    .bv-auth-brand img {
        max-width: 21rem;
    }

    .bv-auth-brand h1 {
        margin-top: 1.6rem;
        font-size: clamp(2rem, 8vw, 2.75rem);
    }

    .bv-auth-brand p {
        margin-top: 0.85rem;
    }

    .bv-auth-brand > div:last-child {
        margin-top: 1.5rem;
    }

    .bv-auth-brand::after {
        right: 1.75rem;
        bottom: 0;
        width: 4rem;
        height: 3px;
        border-radius: 999px 999px 0 0;
        background: linear-gradient(90deg, var(--bv-cyan), var(--bv-blue), var(--bv-orange));
    }
}

@media (max-width: 520px) {
    .bv-auth-page {
        align-items: flex-start;
        padding: 0.75rem;
    }

    .bv-auth-shell {
        border-radius: 1.45rem;
    }

    .bv-auth-brand {
        padding: 1.25rem;
    }

    .bv-auth-brand h1 {
        margin-top: 1.1rem;
        font-size: 1.8rem;
    }

    .bv-auth-brand p {
        font-size: 0.92rem;
    }

    .bv-auth-form-panel {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .bv-auth-card {
        border-radius: 1.45rem;
        padding: 1.5rem 1.25rem;
    }
}

/* Login compacto para smartphones: marca em azul e formulário em azul-claro. */
@media (max-width: 767px) {
    .bv-auth-page {
        min-height: 100vh;
        min-height: 100dvh;
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        background: #eaf3ff;
    }

    .bv-auth-page > .fixed {
        display: none;
    }

    .bv-auth-page .bv-auth-shell {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        max-width: none;
        grid-template-rows: 33.333vh minmax(0, 1fr);
        grid-template-rows: 33.333dvh minmax(0, 1fr);
        border: 0;
        border-radius: 0;
        background: #eaf3ff;
        box-shadow: none;
        backdrop-filter: none;
    }

    .bv-auth-page .bv-auth-brand {
        display: flex;
        height: 100%;
        min-height: 0 !important;
        align-items: center;
        justify-content: center;
        padding: 1rem 1.25rem !important;
        background:
            radial-gradient(circle at 18% 25%, rgba(6, 182, 212, 0.22), transparent 9rem),
            linear-gradient(145deg, #0b1f3b, #0d2b52);
    }

    .bv-auth-page .bv-auth-brand-main {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .bv-auth-page .bv-auth-brand img {
        width: min(88vw, 20rem);
        max-width: none;
        height: auto;
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
    }

    .bv-auth-page .bv-auth-hero-title,
    .bv-auth-page .bv-auth-hero-copy,
    .bv-auth-page .bv-auth-motto {
        display: none;
    }

    .bv-auth-page .bv-auth-brand::after {
        right: 12%;
        bottom: 0;
        left: 12%;
        width: auto;
        height: 3px;
        border-radius: 999px 999px 0 0;
        background: linear-gradient(90deg, transparent, var(--bv-cyan), var(--bv-orange), transparent);
        opacity: 0.9;
    }

    .bv-auth-page .bv-auth-form-panel {
        align-items: flex-start;
        padding: clamp(1.05rem, 3dvh, 1.7rem) 1.35rem max(1rem, env(safe-area-inset-bottom));
        background:
            radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.08), transparent 12rem),
            linear-gradient(180deg, #f3f8ff 0%, #eaf3ff 100%);
    }

    .bv-auth-page .bv-login-content {
        max-width: 26rem;
    }

    .bv-auth-page .bv-login-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.17em;
    }

    .bv-auth-page .bv-login-title {
        margin-top: 0.3rem;
        font-size: clamp(1.48rem, 7vw, 1.75rem);
        line-height: 1.12;
        letter-spacing: -0.03em;
        color: var(--bv-navy);
    }

    .bv-auth-page .bv-login-intro {
        margin-top: 0.4rem;
        margin-bottom: 1rem;
        font-size: 0.86rem;
        line-height: 1.42;
    }

    .bv-auth-page .bv-login-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.78rem 0.75rem;
    }

    .bv-auth-page .bv-login-form > * {
        margin-top: 0 !important;
    }

    .bv-auth-page .bv-login-field,
    .bv-auth-page .bv-login-submit {
        grid-column: 1 / -1;
    }

    .bv-auth-page .bv-login-field > span {
        font-size: 0.82rem;
    }

    .bv-auth-page .bv-login-field input {
        min-height: 2.85rem;
        margin-top: 0.35rem;
        border-radius: 0.9rem;
        padding: 0.62rem 0.9rem;
        font-size: 0.95rem;
    }

    .bv-auth-page .bv-login-remember {
        grid-column: 1;
        min-width: 0;
        align-self: center;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .bv-auth-page .bv-login-remember input {
        width: 1.05rem;
        height: 1.05rem;
        flex: 0 0 auto;
    }

    .bv-auth-page .bv-login-forgot {
        grid-column: 2;
        align-self: center;
        line-height: 1.2;
        white-space: nowrap;
    }

    .bv-auth-page .bv-login-forgot a {
        font-size: 0.78rem;
    }

    .bv-auth-page .bv-login-submit {
        min-height: 3rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        border-radius: 0.9rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 767px) and (max-height: 640px) {
    .bv-auth-page .bv-auth-brand {
        height: 100%;
        min-height: 0 !important;
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
    }

    .bv-auth-page .bv-auth-brand img {
        width: min(82vw, 17rem);
    }

    .bv-auth-page .bv-auth-form-panel {
        padding-top: 0.75rem;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    }

    .bv-auth-page .bv-login-intro {
        display: none;
    }

    .bv-auth-page .bv-login-title {
        margin-bottom: 0.7rem;
        font-size: 1.4rem;
    }

    .bv-auth-page .bv-login-form {
        gap: 0.5rem 0.65rem;
    }

    .bv-auth-page .bv-login-field input {
        min-height: 2.55rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .bv-auth-page .bv-login-submit {
        min-height: 2.75rem;
    }
}

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

@media print {
    .bv-sidebar,
    .bv-topbar,
    .bv-scroll-control {
        display: none !important;
    }

    .bv-main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .bv-page {
        max-width: none !important;
        padding: 0 !important;
    }

    .bv-page section,
    .bv-page article,
    .bv-page div.rounded-3xl {
        box-shadow: none !important;
    }
}
