/* ==========================================================================
   Tema "moderno" — identificação, login, Pix, cartão e "Obrigado"
   ========================================================================== */
.tm-col-2 {
    grid-column: span 2;
}

.tm-col-6 {
    grid-column: span 6;
}

.tm-obrig {
    color: var(--tm-danger);
    margin-left: 2px;
}

.tm-erro {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--tm-danger);
}

.tm-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--tm-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

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

.tm-campo__linha {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.tm-campo__linha label {
    margin-bottom: 6px;
}

/* campo com ícone à esquerda (e ação opcional à direita) */
.tm-input-icone {
    position: relative;
}

.tm-input-icone>i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tm-muted);
    font-size: 15px;
    pointer-events: none;
}

.tm-campo .tm-input-icone input {
    padding-left: 42px;
}

.tm-campo .tm-input-icone input:has(+ .tm-input-icone__acao) {
    padding-right: 46px;
}

.tm-input-icone__acao {
    position: absolute;
    right: 4px;
    top: 50%;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--tm-muted);
    transform: translateY(-50%);
    cursor: pointer;
}

.tm-input-icone__acao:hover {
    color: var(--tm-primary);
    background: var(--tm-bg-alt);
}

.tm-campo select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%2364748b%22 stroke-width=%222.5%22%3E%3Cpath d=%22M6 9l6 6 6-6%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.tm-recaptcha {
    display: flex;
    justify-content: center;
    margin: 6px 0 16px;
}

/* ---------- Cartão de formulário em seções ---------- */
.tm-form-card {
    background: #fff;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
    padding: clamp(18px, 3vw, 28px);
}

.tm-form-card__secao+.tm-form-card__secao {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--tm-line);
}

.tm-form-card__titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
}

.tm-form-card__titulo>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--tm-primary-50);
    color: var(--tm-primary);
    font-size: 13px;
    font-weight: 800;
}

.tm-form-card__nota {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--tm-muted);
}

.tm-form-card__rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* "Já é cadastrado?" */
.tm-aviso-login {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
    background: var(--tm-primary-50);
    color: inherit;
    text-decoration: none !important;
}

.tm-aviso-login>span:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tm-aviso-login strong {
    color: var(--tm-ink);
}

.tm-aviso-login small {
    color: var(--tm-muted);
    font-size: 13px;
}

.tm-aviso-login__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    color: var(--tm-primary);
}

.tm-aviso-login .tm-btn {
    min-height: 38px;
    background: #fff;
}

/* ---------- Login ---------- */
.tm-auth__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 28px);
    max-width: 980px;
    margin: 0 auto;
    align-items: stretch;
}

.tm-auth__card {
    padding: clamp(22px, 4vw, 40px);
    background: #fff;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
    box-shadow: var(--tm-shadow);
}

.tm-auth__titulo {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 800;
}

.tm-auth__sub {
    margin: 0 0 24px;
    color: var(--tm-muted);
}

.tm-auth__form .tm-campo {
    margin-bottom: 16px;
}

.tm-auth__form .tm-btn {
    margin-top: 6px;
}

.tm-auth__lado {
    display: grid;
    gap: 16px;
}

.tm-auth__bloco {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
}

.tm-auth__bloco h2 {
    margin: 6px 0 0;
    font-size: 19px;
}

.tm-auth__bloco p {
    margin: 0 0 8px;
    color: var(--tm-muted);
    font-size: 14px;
}

.tm-auth__bloco--destaque {
    border: 0;
    background: linear-gradient(135deg, var(--tm-primary), color-mix(in srgb, var(--tm-primary) 55%, #0b1220));
}

.tm-auth__bloco--destaque h2 {
    color: #fff;
}

.tm-auth__bloco--destaque p {
    color: rgba(255, 255, 255, .85);
}

.tm-auth__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
}

.tm-auth__icone--suave {
    background: var(--tm-primary-50);
    color: var(--tm-primary);
}

.tm-modal__dialog--sm {
    width: min(460px, 100%);
}

.tm-modal__texto {
    margin: -6px 0 16px;
    color: var(--tm-muted);
    font-size: 14px;
}

/* ---------- Pix ---------- */
.tm-passos-pix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.tm-passos-pix li {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-radius: var(--tm-radius);
    background: var(--tm-bg-alt);
    font-size: 14px;
    line-height: 1.45;
}

.tm-passos-pix p {
    margin: 0;
}

.tm-passos-pix span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #32bcad;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.tm-btn--pix {
    --_bg: #32bcad;
    box-shadow: 0 8px 20px -10px #32bcad;
}

.tm-btn--pix:hover {
    --_bg: #2aa597;
}

.tm-resumo__metodo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tm-line);
}

.tm-resumo__metodo img {
    width: 44px;
    height: 44px;
}

.tm-resumo__metodo div {
    display: flex;
    flex-direction: column;
}

.tm-resumo__metodo strong {
    color: var(--tm-ink);
}

.tm-resumo__metodo small {
    color: var(--tm-muted);
}

/* janela do QR Code (o pagamentoPix.js mostra/oculta via display) */
.tm-pix {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, .65);
}

.tm-pix__card {
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 24px 18px;
    background: #fff;
    border-radius: var(--tm-radius-lg);
    box-shadow: var(--tm-shadow-lg);
    text-align: center;
}

.tm-pix__card h2 {
    margin: 12px 0 6px;
    font-size: 22px;
}

.tm-pix__card>p {
    margin: 0 0 16px;
    color: var(--tm-muted);
    font-size: 14px;
}

.tm-pix__timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff1f2;
    color: #e11d48;
    font-size: 13px;
    font-weight: 700;
}

.tm-pix__qr {
    display: inline-flex;
    padding: 12px;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius);
}

.tm-pix__qr img {
    width: 220px;
    height: 220px;
}

.tm-pix__copia {
    margin-top: 16px;
    text-align: left;
}

.tm-pix__copia label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tm-ink);
}

.tm-pix__copia-linha {
    display: flex;
    gap: 8px;
}

.tm-pix__copia-linha input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--tm-line);
    border-radius: 12px;
    background: var(--tm-bg-alt);
    font-size: 13px;
    color: var(--tm-text);
}

/* o pagamentoPix.js troca o fundo do botão por estilo inline; mantém a cor do tema */
.tm-pix__copia-linha .tm-btn {
    flex-shrink: 0;
    background: var(--tm-primary) !important;
    color: #fff !important;
}

.tm-pix__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    color: var(--tm-muted);
    font-size: 14px;
}

.tm-pix__status--ok {
    color: var(--tm-success);
    font-weight: 700;
}

.pix-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--tm-line);
    border-top-color: #32bcad;
    border-radius: 999px;
    animation: tmGiro .8s linear infinite;
}

.tm-btn .pix-spinner {
    border-color: rgba(255, 255, 255, .4);
    border-top-color: #fff;
}

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

/* ---------- Cartão ---------- */
.tm-cartao-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1.586;
    padding: 20px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .22), transparent 40%),
        linear-gradient(135deg, var(--tm-primary), #0b1220);
    box-shadow: var(--tm-shadow);
    overflow: hidden;
}

.tm-cartao-preview__topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.tm-cartao-preview__chip {
    width: 38px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #fde68a, #d4a017);
}

.tm-cartao-preview__numero {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: clamp(16px, 2vw, 20px);
    letter-spacing: .12em;
}

.tm-cartao-preview__rodape {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tm-cartao-preview__rodape div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tm-cartao-preview__rodape small {
    font-size: 10px;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tm-cartao-preview__rodape strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-bandeiras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm-bandeiras li {
    padding: 4px 10px;
    border: 1px solid var(--tm-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tm-muted);
}

.tm-progresso {
    margin-top: 20px;
}

.tm-progresso progress {
    display: block;
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--tm-bg-alt);
    appearance: none;
    -webkit-appearance: none;
}

.tm-progresso progress::-webkit-progress-bar {
    background: var(--tm-bg-alt);
}

.tm-progresso progress::-webkit-progress-value {
    background: var(--tm-primary);
}

.tm-progresso progress::-moz-progress-bar {
    background: var(--tm-primary);
}

/* ---------- Obrigado ---------- */
.tm-obrigado__card {
    max-width: 620px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    background: #fff;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
    box-shadow: var(--tm-shadow);
    text-align: center;
}

.tm-obrigado__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: #dcfce7;
    color: var(--tm-success);
    font-size: 32px;
    box-shadow: 0 0 0 10px #f0fdf4;
    animation: tmPop .5s var(--tm-ease);
}

@keyframes tmPop {
    from {
        transform: scale(.6);
        opacity: 0;
    }
}

.tm-obrigado__titulo {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
}

.tm-obrigado__texto {
    margin: 0 auto 22px;
    max-width: 460px;
    color: var(--tm-muted);
}

.tm-obrigado__numero {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 22px;
    padding: 12px 28px;
    border: 1px dashed var(--tm-line);
    border-radius: var(--tm-radius);
    background: var(--tm-bg-alt);
}

.tm-obrigado__numero small {
    color: var(--tm-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.tm-obrigado__numero strong {
    font-family: var(--tm-font-display);
    font-size: 26px;
    color: var(--tm-ink);
}

.tm-obrigado__itens {
    margin-bottom: 18px;
    text-align: left;
}

.tm-obrigado__proximos {
    display: grid;
    gap: 8px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--tm-text);
}

.tm-obrigado__proximos i {
    margin-right: 6px;
    color: var(--tm-primary);
}

.tm-obrigado__acoes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 991px) {
    .tm-auth__grid {
        grid-template-columns: 1fr;
    }

    .tm-passos-pix {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {

    .tm-col-2,
    .tm-col-6 {
        grid-column: span 12;
    }

    .tm-form-card__rodape {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tm-form-card__rodape .tm-btn {
        width: 100%;
    }

    .tm-aviso-login .tm-btn {
        display: none;
    }

    .tm-obrigado__acoes .tm-btn {
        width: 100%;
    }
}
