/* ── Login page (UOL-style) ───────────────────────── */
.ta-login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: #f4f6f8;
    padding: 2rem 1rem;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ta-login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .10);
    padding: 2rem 2rem 1.5rem;
    box-sizing: border-box;
}

.ta-login-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ta-login-brand-icon {
    font-size: 1.6rem;
    color: #e8500a;
    line-height: 1;
}

.ta-login-brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
}

.ta-login-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 1.5rem;
}

.ta-login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 1.25rem;
}

.ta-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ta-field input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #c8d4e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #222;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}

.ta-field input:focus {
    border-color: #0e69c2;
}

.ta-btn-primary {
    width: 100%;
    padding: 0.95rem;
    margin-top: 0.25rem;
    background: #f5c800;
    color: #222;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.ta-btn-primary:hover {
    background: #e0b600;
}

.ta-login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
}

.ta-link {
    color: #0e69c2;
    font-size: 0.9rem;
    text-decoration: none;
}

.ta-link:hover {
    text-decoration: underline;
}

.ta-divider {
    position: relative;
    text-align: center;
    margin: 1.4rem 0;
    color: #999;
    font-size: 0.85rem;
}

.ta-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
    transform: translateY(-50%);
}

.ta-divider span {
    position: relative;
    background: #fff;
    padding: 0 0.75rem;
    z-index: 1;
}

.ta-social-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ta-social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: opacity .2s;
}

.ta-social-btn:hover {
    opacity: .88;
}

.ta-social-facebook {
    background: #1877f2;
    color: #fff;
    border: none;
}

.ta-social-google {
    background: #fff;
    color: #3c3c3c;
    border: 1.5px solid #dadce0;
}

.ta-social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ta-login-footer {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: #999;
    text-align: center;
    max-width: 400px;
}

.ta-register-box {
    margin-top: 0;
}

/* ── Força de senha ──────────────────────────────── */
.ta-field--password {
    position: relative;
}

.ta-strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.ta-strength-bar span {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e5e7eb;
    transition: background 0.2s;
}

.ta-strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 4px 0 0;
    min-height: 1.1em;
}

/* ── Tabs ──────────────────────────────────────────── */
.ta-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.ta-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ta-tab {
    padding: 0.75rem 1.4rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #6b7280;
    transition: color .15s, border-color .15s;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    text-decoration: none;
    line-height: 1.4;
}

.ta-tab:hover {
    color: #111;
}

.ta-tab-link {
    margin-left: auto;
    color: #0e4f8b;
    border-bottom-color: transparent;
}

.ta-tab-link:hover {
    color: #0a3d6b;
    border-bottom-color: #0e4f8b;
}

#ta-tab-perfil:checked~.ta-tabs label[for="ta-tab-perfil"],
#ta-tab-cartao:checked~.ta-tabs label[for="ta-tab-cartao"] {
    color: #0e4f8b;
    border-bottom-color: #0e4f8b;
}

.ta-panel {
    display: none;
    justify-items: center;
}

#ta-tab-perfil:checked~#ta-panel-perfil,
#ta-tab-cartao:checked~#ta-panel-cartao {
    display: block;
}

@media (max-width: 768px) {
    #ta-tab-cartao:checked~#ta-panel-cartao {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background:
            radial-gradient(circle at 20% 18%, rgba(159, 235, 8, 0.692), transparent 24%),
            linear-gradient(118deg, #102f59 0%, #174f83 28%, #1c77a4 48%, #17739a 62%, #255694 78%, #102f59 100%);
        background-size: 180% 180%, 240% 240%;
        animation: ta-card-live-background 9s ease-in-out infinite alternate;
        padding: 1.5rem 1rem;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: none;
    }

    #ta-tab-cartao:checked~#ta-panel-cartao .ta-card-fullscreen-inner {
        max-width: 100%;
    }

    #ta-tab-cartao:checked~#ta-panel-cartao .ta-card-close {
        display: flex;
    }
}

.ta-form-actions {
    margin-top: 0.5rem;
}

.ta-logout-form {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* ── Profile / card area ───────────────────────────── */
.trivium-affiliados-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.trivium-affiliados-profile-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
    padding: 2rem;
}

/* Avatar */
.ta-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1.75rem;
}

.ta-avatar-img {
    width: 160px;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #dde3ea;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.ta-avatar-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
    margin: 0 0 0.5rem;
}

.ta-avatar-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #fff;
    border: 1.5px solid #c8d4e0;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0e4f8b;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.ta-avatar-btn:hover {
    background: #eef4fb;
    border-color: #0e4f8b;
}

.ta-file-hidden {
    display: none;
}

/* Sections */
.ta-form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f2f5;
}

.ta-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.ta-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 1rem;
}

/* Field groups */
.ta-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ta-field-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.ta-label-hint {
    font-weight: 400;
    font-size: 0.78rem;
    color: #9ca3af;
}

.ta-field-group input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
}

.ta-field-group input:focus {
    border-color: #0e69c2;
    box-shadow: 0 0 0 3px rgba(14, 105, 194, .12);
}

.ta-field-group input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* 2-column grid */
.ta-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 560px) {
    .ta-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Save button */
.ta-btn-save {
    width: 100%;
    padding: 0.85rem;
    background: #0e4f8b;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: background .18s, transform .12s;
    margin-top: 0.75rem;
}

.ta-btn-save:hover {
    background: #0a3d6d;
}

.ta-btn-save:active {
    transform: scale(.98);
}

/* Logout */
.ta-logout-form {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f2f5;
    text-align: center;
}

.ta-btn-logout {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color .15s;
}

.ta-btn-logout:hover {
    color: #c0392b;
}

/* Success message */
.trivium-affiliados-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ── Card fullscreen (mobile) ──────────────────────── */
.ta-no-scroll {
    overflow: hidden !important;
}

.ta-panel-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 18%, rgba(146, 200, 41, 0.28), transparent 24%),
        linear-gradient(118deg, #102f59 0%, #174f83 28%, #1c77a4 48%, #17739a 62%, #255694 78%, #102f59 100%) !important;
    background-size: 180% 180%, 240% 240% !important;
    animation: ta-card-live-background 9s ease-in-out infinite alternate;
    padding: 1.5rem 1rem !important;
    overflow-y: auto;
    border-radius: 0 !important;
    box-shadow: none !important;
}

@keyframes ta-card-live-background {
    0% {
        background-position: 0% 42%, 0% 50%;
    }

    50% {
        background-position: 62% 58%, 100% 48%;
    }

    100% {
        background-position: 100% 40%, 18% 52%;
    }
}

@media (prefers-reduced-motion: reduce) {

    #ta-tab-cartao:checked~#ta-panel-cartao,
    .ta-panel-fullscreen {
        animation: none;
    }
}

.ta-card-fullscreen-inner {
    width: 100%;
    max-width: 420px;
    position: relative;
}

.ta-card-close {
    display: none;
    /* oculto em desktop */
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, .15);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .15s;
}

.ta-card-close::before,
.ta-card-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2.5px;
    background: currentColor;
    border-radius: 1px;
}

.ta-card-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ta-card-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ta-card-close:hover {
    background: rgba(255, 255, 255, .3);
}

.ta-panel-fullscreen .ta-card-close {
    display: flex;
}

/* Em fullscreen, o cartão ocupa toda a largura disponível */
.ta-panel-fullscreen .trivium-affiliados-card-preview-inner {
    max-width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
}

/* ── Affiliate card ────────────────────────────────── */
.trivium-affiliados-card-preview-inner {
    position: relative;
    width: 100%;
    max-width: 512px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    margin: 0 auto;
    container-type: inline-size;
    font-family: Arial, Helvetica, sans-serif;
}

.ta-ac-watermark {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 118%;
    transform: translate(-50%, -50%) rotate(-24deg);
    z-index: 6;
    pointer-events: none;
    text-align: center;
    font-size: 13.5cqw;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(159, 18, 57, 0.22);
    -webkit-text-stroke: 0.26cqw rgba(159, 18, 57, 0.55);
    text-shadow: 0 0.45cqw 1.2cqw rgba(255, 255, 255, 0.9);
}

.ta-ac-watermark--pendente {
    color: rgba(146, 64, 14, 0.22);
    -webkit-text-stroke-color: rgba(146, 64, 14, 0.55);
}

.ta-ac-watermark--inativo,
.ta-ac-watermark--expirado {
    color: rgba(159, 18, 57, 0.24);
    -webkit-text-stroke-color: rgba(159, 18, 57, 0.58);
}

/* Diagonal lines background — SVG */
.fundo-linhas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .72;
    z-index: 0;
}

.fundo-linhas path {
    fill: none;
    stroke: #dfe7ea;
    stroke-width: 1.15;
    stroke-linecap: round;
}

.fundo-linhas .leve {
    opacity: .55;
}

.fundo-linhas .fraca {
    opacity: .32;
}

/* Photo frame */
.ta-ac-foto-base {
    position: absolute;
    left: 11.72%;
    top: 4.88%;
    width: 69.34%;
    height: 47.85%;
    transform: rotate(-1deg);
    z-index: 1;
}

.ta-ac-foto-base::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #92c829;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.ta-ac-foto-base::after {
    content: "";
    position: absolute;
    left: 6.2%;
    top: 0;
    width: 97.2%;
    height: 90.6%;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.ta-ac-foto-img {
    position: absolute;
    left: 6.2%;
    top: 0;
    width: 97.2%;
    height: 90.6%;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    background-size: cover;
    background-position: center center;
    background-color: #dde3ea;
    z-index: 2;
}

/* Decorative strips */
.ta-ac-faixa-verde {
    position: absolute;
    right: -0.98%;
    top: 0;
    width: 42.97%;
    height: 4.88%;
    background: #92c829;
    transform: skewX(-15deg);
    z-index: 2;
}

.ta-ac-faixa-azul {
    position: absolute;
    right: 9.18%;
    top: 4.69%;
    width: 31.25%;
    height: 1.76%;
    background: #13a7d3;
    transform: skewX(-18deg);
    z-index: 2;
}

.ta-ac-sombra-azul {
    position: absolute;
    left: 16.6%;
    top: 49.22%;
    width: 62.5%;
    height: 2.34%;
    background: #13a7d3;
    transform: skewX(-12deg) rotate(-1deg);
    z-index: 2;
}

/* Logo */
.ta-ac-logo {
    position: absolute;
    top: 57.81%;
    left: 41.8%;
    font-size: 10.55cqw;
    line-height: 1;
    font-weight: 900;
    color: #13a7d3;
    letter-spacing: -0.056em;
    z-index: 3;
}

.ta-ac-dois {
    font-weight: 300;
}

.ta-ac-like {
    position: absolute;
    right: -0.41em;
    top: -0.52em;
    width: 0.89em;
    height: 0.63em;
    background: #f05257;
    border-radius: 0.13em;
    transform: rotate(5deg);
}

.ta-ac-like::after {
    content: "\2665";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.41em;
    line-height: 1;
}

/* Title and description */
.ta-ac-titulo {
    position: absolute;
    left: 11.52%;
    top: 65.55%;
    font-size: 6.08cqw;
    color: #92c829;
    letter-spacing: 0.115em;
    font-weight: bold;
    white-space: nowrap;
    z-index: 3;
}

.ta-ac-descricao {
    position: absolute;
    left: 11.91%;
    top: 70%;
    width: 77.15%;
    font-size: 3.5cqw;
    line-height: 1.12;
    color: #222;
    letter-spacing: 0.023em;
    /* font-weight: 700; */
    z-index: 3;
}

/* Dynamic data */
.ta-ac-dados {
    position: absolute;
    left: 11.91%;
    top: 78%;
    width: 78.17%;
    z-index: 3;
}

.ta-ac-nome {
    font-size: 6cqw;
    font-weight: 700;
    color: #13a7d3;
    line-height: 1.1;
    margin-bottom: 0.3cqw;
}

.ta-ac-info-row {
    font-size: 3.6cqw;
    color: #334155;
    line-height: 1.45;
    font-weight: 400;
}

.ta-ac-status-ativo {
    display: inline-block;
    margin-top: 0.9cqw;
    padding: 0.42cqw 1.45cqw;
    border-radius: 999px;
    background: #ecfdf5;
    border: 0.22cqw solid #86efac;
    color: #166534;
    font-size: 3.25cqw;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

/* Footer */
.ta-ac-rodape {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5.27%;
    background: #92c829;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5.86%;
    font-size: 5.13cqw;
    border-top: 4px solid #13a7d3;
    font-weight: 700;
    letter-spacing: 0.039em;
    z-index: 4;
}

/* Error */
.trivium-affiliados-error {
    background: #fff1f0;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Profile notices */
.ta-profile-notices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ta-profile-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0;
}

.ta-notice-icon {
    flex-shrink: 0;
    font-style: normal;
}

@media (max-width: 768px) {

    /* Container sem padding lateral — ocupa 100% da tela */
    .trivium-affiliados-card {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Card sem bordas arredondadas e sem margem lateral */
    .trivium-affiliados-profile-box {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 1rem 1rem 1.5rem;
        box-shadow: none;
    }

    /* Abas ocupam toda a largura */
    .ta-tabs {
        border-radius: 0;
    }

    .ta-tab {
        flex: 1;
        text-align: center;
        padding: 0.85rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Avatar centralizado em coluna */
    .ta-avatar-wrap {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    /* Inputs maiores — mais fácil de tocar */
    .ta-field-group input {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    /* Grid 2 cols → 1 col já em 560px mas garante aqui também */
    .ta-form-grid-2 {
        grid-template-columns: 1fr;
    }

    /* Botão salvar — altura confortável para toque */
    .ta-btn-save {
        padding: 1rem;
        font-size: 1.05rem;
    }

    /* Cartão afiliado ocupa toda a largura disponível */
    .trivium-affiliados-card-preview-inner {
        max-width: 100%;
        border-radius: 12px;
        padding: 1.25rem;
    }

    /* Seções com menos espaço vertical */
    .ta-form-section {
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }
}
