/**
 * Marca Callinfo — telas de login (gestor e portal cliente)
 * Logo sem fundo, tom corporativo e indicadores de confiança.
 */
.login-brand {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(var(--tema-sec-rgb), 0.12);
}

.login-brand-logo {
    display: block;
    width: auto;
    max-width: min(200px, 72vw);
    max-height: 56px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 14px;
    filter: drop-shadow(0 4px 18px rgba(34, 211, 238, 0.22));
    background: transparent;
}
.login-brand-logo--axia {
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.login-brand-kicker {
    margin: 0 0 6px;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(var(--tema-sec-rgb), 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.login-brand-kicker i {
    font-size: 0.75rem;
    opacity: 0.9;
}

.login-brand-title {
    margin: 0 0 8px;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1.25;
}

.login-brand-tagline {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.58);
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.login-portal-label {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(43, 92, 146, 0.35);
    border: 1px solid rgba(var(--tema-sec-rgb), 0.22);
}

.login-contexto {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 18px;
    line-height: 1.4;
}

.login-tenant-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: -8px 0 16px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
}

.login-tenant-badge[hidden] {
    display: none !important;
}

.login-tenant-logo {
    max-height: 28px;
    max-width: 80px;
    object-fit: contain;
    background: transparent;
}

.login-trust {
    list-style: none;
    margin: 18px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
}

.login-trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(148, 163, 184, 0.95);
    text-transform: uppercase;
}

.login-trust i {
    color: rgba(var(--tema-sec-rgb), 0.75);
    font-size: 0.72rem;
}

.login-versao {
    margin: 14px 0 0;
    padding: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.72);
}

.eq-versao-live {
    display: inline-block;
    width: 0.78rem;
    height: 0.78rem;
    margin: 0 0 0 0.35rem;
    vertical-align: -0.08rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #bbf7d0 0 12%, transparent 13%),
        radial-gradient(circle at 28% 32%, #86efac 0 10%, transparent 11%),
        radial-gradient(circle at 72% 68%, #4ade80 0 9%, transparent 10%),
        radial-gradient(circle at 50% 50%, #16a34a 0 62%, #14532d 100%);
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.55),
        0 0 12px rgba(34, 197, 94, 0.55),
        inset 0 0 6px rgba(187, 247, 176, 0.35);
    position: relative;
}
.eq-versao-live::before,
.eq-versao-live::after {
    content: '';
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    border: 1px solid rgba(220, 252, 231, 0.55);
    pointer-events: none;
}
.eq-versao-live::after {
    inset: 34%;
    border-radius: 2px;
    background:
        linear-gradient(90deg, transparent 46%, rgba(236, 253, 245, 0.95) 47% 53%, transparent 54%),
        linear-gradient(0deg, transparent 46%, rgba(236, 253, 245, 0.95) 47% 53%, transparent 54%),
        linear-gradient(45deg, transparent 46%, rgba(134, 239, 172, 0.85) 47% 53%, transparent 54%);
    border: 0;
}

.login-container,
.auth-container {
    max-width: 440px;
}

.portal-credit-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.45);
}

.portal-credit-footer p {
    margin: 0;
}

.portal-credit-wa {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(var(--tema-sec-rgb), 0.92);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.portal-credit-wa:hover {
    color: var(--tema-destaque, var(--azul-sutil));
    text-decoration: underline;
}

.portal-credit-wa i {
    color: #25d366;
    font-size: 0.85rem;
}

.portal-credit-footer--app {
    margin-top: auto;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(11, 28, 53, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: var(--texto-secundario, #64748b);
    flex-shrink: 0;
}

.portal-credit-footer--app .portal-credit-wa {
    color: var(--azul-marca, #0b1c35);
}

.portal-credit-footer--app .portal-credit-wa:hover {
    color: var(--azul-sutil, #2b5c92);
}

/* Marca dupla: cliente + tenant (estilo vault do gestor) */
.portal-dual-vault {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    margin-bottom: 14px;
}

.portal-dual-vault[hidden] {
    display: none !important;
}

.portal-dual-node {
    flex: 0 0 min(140px, 38vw);
    text-align: center;
    color: #fff;
    padding: 14px 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 24, 0.55);
    border: 1px solid rgba(var(--tema-sec-rgb), 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.portal-dual-vault--sidebar .portal-dual-node {
    flex: 0 0 min(118px, 42vw);
    padding: 10px 8px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.portal-dual-vault--sidebar [data-portal-node="cliente"] .portal-dual-badge {
    display: none;
}

.portal-dual-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tema-destaque, var(--azul-sutil));
    border: 1px solid rgba(var(--tema-sec-rgb), 0.25);
    background: rgba(6, 182, 212, 0.08);
}

.portal-dual-node-tenant .portal-dual-badge {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.portal-dual-node img {
    display: block;
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
    margin: 0 auto 8px;
    background: transparent;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.2));
}

.portal-dual-vault--sidebar .portal-dual-node img {
    max-height: 36px;
}

.portal-dual-node img[hidden],
.portal-dual-placeholder[hidden] {
    display: none !important;
}

.portal-dual-placeholder {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: rgba(var(--tema-sec-rgb), 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(var(--tema-sec-rgb), 0.2);
}

.portal-dual-vault--sidebar .portal-dual-placeholder {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
}

.portal-dual-node h3 {
    margin: 0;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.portal-dual-link {
    position: relative;
    flex: 1;
    min-width: 36px;
    max-width: 72px;
    height: 36px;
}

.portal-dual-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(var(--tema-sec-rgb), 0.05), rgba(var(--tema-sec-rgb), 0.45), rgba(var(--tema-sec-rgb), 0.05));
}

.portal-dual-lock {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    color: var(--tema-destaque, var(--azul-sutil));
    background: rgba(6, 16, 32, 0.9);
    border: 1px solid rgba(var(--tema-sec-rgb), 0.35);
}

.portal-brand-head {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(var(--tema-sec-rgb), 0.12);
}

.portal-brand-head .login-brand-title {
    margin-top: 10px;
}

.portal-logo-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 11, 20, 0.72);
    backdrop-filter: blur(4px);
}

.portal-logo-modal.aberto {
    display: flex;
}

.portal-logo-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    color: #1e293b;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.portal-logo-card h2 {
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.15rem;
    margin: 0 0 8px;
    color: #0b1c35;
}

.portal-logo-card p {
    margin: 0 0 18px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #64748b;
}

.portal-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}

.portal-logo-preview img {
    max-height: 56px;
    max-width: 100%;
    object-fit: contain;
}

.portal-logo-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.portal-logo-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-family: Montserrat, Inter, sans-serif;
}

.portal-logo-actions .btn-prim {
    background: #0b1c35;
    color: #fff;
}

.portal-logo-actions .btn-sec {
    background: #f1f5f9;
    color: #64748b;
}

.portal-logo-msg {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    display: none;
}

.btn-logo-perfil {
    margin-top: 10px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-logo-perfil:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Seletor multi-empresa no login do portal */
.portal-empresa-chooser {
    margin: 0 0 16px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(var(--tema-sec-rgb), 0.22);
    background: rgba(6, 16, 32, 0.45);
}
.portal-empresa-chooser-tit {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(var(--tema-sec-rgb, 43, 92, 146), 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.portal-empresa-chooser-sub {
    margin: 0 0 10px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: #94a3b8;
    text-align: center;
}
.portal-empresa-lista {
    display: grid;
    gap: 8px;
}
.portal-empresa-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    min-height: 64px;
}
.portal-empresa-card:hover {
    border-color: rgba(var(--tema-sec-rgb), 0.45);
    background: rgba(30, 41, 59, 0.75);
}
.portal-empresa-card.ativo {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
    background: rgba(14, 116, 144, 0.22);
}
.portal-empresa-card img,
.portal-empresa-ph {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.portal-empresa-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.2rem;
}
.portal-empresa-card-txt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.portal-empresa-card-txt strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.portal-empresa-card-txt small {
    font-size: 0.72rem;
    color: #94a3b8;
}

@media (max-width: 860px) {
    .login-brand-logo {
        max-height: 48px;
    }
    .login-brand-title {
        font-size: 0.98rem;
    }
    .login-trust {
        gap: 6px 10px;
    }
    .login-trust li {
        font-size: 0.62rem;
    }
    .portal-dual-vault {
        flex-wrap: wrap;
        gap: 6px;
    }
    .portal-dual-link {
        flex: 0 0 100%;
        max-width: none;
        height: 24px;
        order: 3;
    }
    .portal-dual-line {
        left: 20%;
        right: 20%;
    }
}

/* ================= BOOT / SPLASH PORTAL CLIENTE ================= */
:root {
    --portal-boot-accent: #0b1c35;
    --portal-boot-accent-2: #2b5c92;
}

html.portal-booting-root,
body.portal-booting {
    background: #060b14;
    overflow: hidden;
}

body.portal-booting #telaPainel {
    display: none !important;
}

body.portal-ready #telaPainel {
    display: flex;
    animation: portalPainelReveal 0.4s ease;
}

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

.portal-boot-loader {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(43, 92, 146, 0.22) 0%, transparent 55%),
        linear-gradient(180deg, #060b14 0%, color-mix(in srgb, var(--portal-boot-accent) 72%, #000) 100%);
    color: #e2e8f0;
    transition: opacity 0.38s ease, visibility 0.38s ease;
}

body.portal-ready .portal-boot-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.portal-boot-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(43, 92, 146, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 92, 146, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 100%);
    animation: portalBootGrid 14s linear infinite;
}

@keyframes portalBootGrid {
    from { background-position: 0 0, 0 0; }
    to { background-position: 42px 42px, 42px 42px; }
}

.portal-boot-card {
    position: relative;
    z-index: 2;
    width: min(420px, 100%);
    text-align: center;
    padding: 36px 28px 30px;
    border-radius: 16px;
    border: 1px solid rgba(43, 92, 146, 0.35);
    background: rgba(8, 14, 26, 0.82);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.portal-boot-ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 2px solid rgba(43, 92, 146, 0.25);
    display: grid;
    place-items: center;
    position: relative;
}

.portal-boot-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--portal-boot-accent-2);
    border-right-color: rgba(43, 92, 146, 0.35);
    animation: portalBootSpin 1.1s linear infinite;
}

.portal-boot-ring i {
    font-size: 1.55rem;
    color: #93c5fd;
    animation: portalBootPulse 1.6s ease-in-out infinite;
}

@keyframes portalBootSpin {
    to { transform: rotate(360deg); }
}

@keyframes portalBootPulse {
    0%, 100% { opacity: 0.65; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
}

.portal-boot-kicker {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.portal-boot-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 10px;
}

.portal-boot-msg {
    font-size: 0.86rem;
    color: #94a3b8;
    min-height: 1.25rem;
    margin-bottom: 18px;
}

.portal-boot-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 14px;
}

.portal-boot-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--portal-boot-accent-2), #60a5fa);
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.45);
    transition: width 0.35s ease;
}

.portal-boot-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #64748b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-boot-meta strong {
    color: #cbd5e1;
    font-weight: 600;
}
