/* Portal do Cliente — identidade própria Aliança.
   Esta camada preserva o vocabulário funcional do portal e redesenha a
   experiência sem herdar componentes ou identidade de outro produto. */

:root {
    --al-navy: #071a3b;
    --al-blue: #0d2855;
    --al-red: #d8241d;
    --al-red-dark: #b81712;
    --al-cream: #f6f3ed;
    --al-line: #e3e7ee;
    --al-muted: #667085;
    --al-white: #fff;
    --al-shadow: 0 24px 70px rgba(7, 26, 59, .1);
    --al-radius: 20px;
}

html { scroll-behavior: smooth; }
body.portal-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0, rgba(216, 36, 29, .055), transparent 28rem),
        #f7f8fa;
    color: var(--al-navy);
    font-family: 'Jost', 'Segoe UI', sans-serif;
}

.portal-shell .container { max-width: 1180px; }
.portal-shell .topo {
    padding: 0;
    border: 0;
    background: var(--al-navy);
    color: #fff;
}

.portal-topbar {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.portal-topbar .marca { display: flex; width: 156px; align-items: center; }
.portal-topbar .marca img { display: block; width: 100%; filter: brightness(0) invert(1); }
.portal-topbar__division {
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.portal-topbar .barra-sessao { margin: 0 0 0 auto; }
.portal-topbar .botao.secundario {
    padding: 9px 15px;
    border-color: rgba(255, 255, 255, .25);
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
}
.portal-topbar .botao.secundario:hover { border-color: #fff; color: #fff; }
.portal-logout, .portal-site-link {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    cursor: pointer;
    font: 500 11px/1 'Jost', sans-serif;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
}
.portal-logout:hover, .portal-site-link:hover { color: #fff; }
.portal-site-link { margin-left: auto; }
.portal-site-link span { color: #ff716b; }

.portal-heading {
    display: flex;
    min-height: 210px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding-top: 42px;
    padding-bottom: 42px;
}
.portal-heading .saudacao { margin: 0; }
.portal-eyebrow, .portal-intro__tag {
    display: block;
    margin-bottom: 13px;
    color: #ff716b;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.portal-heading .saudacao h1 {
    color: #fff;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(42px, 6vw, 67px);
    font-weight: 400;
    letter-spacing: -.03em;
}
.portal-heading .saudacao p {
    max-width: 650px;
    margin-top: 10px;
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1.6;
    text-transform: none;
}
.portal-role {
    margin-bottom: 7px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 999px;
    color: rgba(255, 255, 255, .84);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.portal-nav { border-top: 1px solid rgba(255, 255, 255, .12); background: rgba(2, 13, 34, .32); }
.portal-nav .container { display: flex; gap: 34px; min-height: 54px; align-items: center; overflow-x: auto; }
.portal-nav a {
    position: relative;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .11em;
    text-decoration: none;
    text-transform: uppercase;
}
.portal-nav a:first-child, .portal-nav a:hover { color: #fff; }
.portal-nav a:first-child::after {
    position: absolute;
    right: 0;
    bottom: -19px;
    left: 0;
    height: 2px;
    background: var(--al-red);
    content: '';
}

.portal-shell .conteudo { padding: 48px 0 90px; }
.portal-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 35px;
    margin-bottom: 26px;
    padding: clamp(28px, 4vw, 44px);
    border-radius: var(--al-radius);
    background: linear-gradient(130deg, #fff 0%, #f8f2ef 100%);
    box-shadow: var(--al-shadow);
    overflow: hidden;
    position: relative;
}
.portal-intro::after {
    position: absolute;
    right: -90px;
    bottom: -145px;
    width: 290px;
    height: 290px;
    border: 42px solid rgba(216, 36, 29, .06);
    border-radius: 50%;
    content: '';
}
.portal-intro__tag { color: var(--al-red-dark); }
.portal-intro h2 {
    max-width: 680px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(31px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.025em;
}
.portal-intro p { max-width: 700px; margin-top: 14px; color: var(--al-muted); font-size: 15px; }
.portal-intro__action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--al-navy);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}
.portal-intro__action span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--al-red);
    color: #fff;
    font-size: 17px;
}

.portal-shell .cartoes {
    gap: 12px;
    border: 0;
    background: transparent;
    margin-bottom: 26px;
}
.portal-shell .cartao {
    min-height: 138px;
    padding: 25px;
    border: 1px solid var(--al-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(7, 26, 59, .045);
}
.portal-shell .cartao:first-child { border-top: 3px solid var(--al-red); }
.portal-shell .cartao .rotulo { color: var(--al-muted); font-weight: 500; }
.portal-shell .cartao .valor { font-family: 'Jost', sans-serif; font-size: clamp(26px, 3vw, 36px); font-weight: 500; }

.portal-shell .bloco {
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: #fff;
    box-shadow: 0 12px 38px rgba(7, 26, 59, .05);
    overflow: hidden;
}
.portal-shell .bloco > h2 { font-family: 'Jost', sans-serif; font-size: 18px; font-weight: 500; }
.portal-shell th { background: #fafbfc; font-weight: 500; }
.portal-shell tr { transition: background .18s ease; }
.portal-shell tbody tr:hover { background: #fafbfc; }
.portal-shell .etiqueta { border-radius: 999px; }
.portal-shell .botao { border-radius: 999px; background: var(--al-red); border-color: var(--al-red); }
.portal-shell .botao:hover { background: var(--al-red-dark); border-color: var(--al-red-dark); }
.portal-shell .campo input,
.portal-shell .campo select,
.portal-shell .campo textarea { border-radius: 10px; background: #fbfcfd; }
.portal-shell .campo input:focus,
.portal-shell .campo select:focus,
.portal-shell .campo textarea:focus { border-color: var(--al-red); box-shadow: 0 0 0 3px rgba(216, 36, 29, .08); }
.portal-shell .item-imovel { border-radius: 12px; }
.portal-shell .lista-imoveis { gap: 10px; border: 0; background: transparent; }
.portal-shell .secao > h2 { font-family: 'Jost', sans-serif; font-size: 24px; font-weight: 500; }

.portal-shell .rodape { background: var(--al-navy); border: 0; color: rgba(255, 255, 255, .58); }
.portal-shell .rodape img { width: 138px; filter: brightness(0) invert(1); opacity: .9; }
.portal-shell .rodape p { margin-top: 13px; }

/* Entrada: marca forte, formulário simples e sem elementos cenográficos. */
.portal-shell--auth .portal-heading { min-height: 245px; }
.portal-shell--auth .conteudo { margin-top: -48px; position: relative; z-index: 2; }
.portal-shell--auth .caixa-entrada { max-width: 520px; }
.portal-shell--auth .caixa-entrada .bloco { box-shadow: 0 26px 80px rgba(7, 26, 59, .18); }
.portal-shell--auth .caixa-entrada .bloco + .bloco { box-shadow: none; background: transparent; border: 0; }
.portal-shell--auth .caixa-entrada .bloco > h2 { padding: 26px 30px 20px; }
.portal-shell--auth .caixa-entrada .corpo { padding: 28px 30px 32px; }
.portal-shell--auth .caixa-entrada .botao { min-height: 48px; }

@media (max-width: 720px) {
    .portal-topbar { min-height: 68px; gap: 13px; }
    .portal-topbar .marca { width: 126px; }
    .portal-topbar__division { padding-left: 13px; font-size: 9px; }
    .portal-topbar .barra-sessao .botao { display: none; }
    .portal-heading { min-height: 180px; padding-top: 32px; padding-bottom: 32px; }
    .portal-heading .saudacao h1 { font-size: 41px; }
    .portal-role { display: none; }
    .portal-nav .container { gap: 25px; }
    .portal-intro { grid-template-columns: 1fr; align-items: start; }
    .portal-intro__action { justify-self: start; }
    .portal-shell .conteudo { padding-top: 28px; }
    .portal-shell--auth .conteudo { margin-top: -28px; }
}

@media (max-width: 480px) {
    .portal-topbar__division { display: none; }
    .portal-heading .saudacao p { font-size: 13px; }
    .portal-intro { padding: 25px 22px; border-radius: 16px; }
    .portal-shell .cartao { min-height: 118px; }
    .portal-shell--auth .caixa-entrada .corpo { padding: 23px 22px 27px; }
}

@media print {
    .portal-nav, .barra-sessao, .portal-intro__action { display: none !important; }
    .portal-shell .topo { background: #fff; color: #111; }
    .portal-topbar .marca img, .portal-shell .rodape img { filter: none; }
    .portal-heading .saudacao h1, .portal-heading .saudacao p { color: #111; }
}
