:root {
    --bg-soft: #F4F8FC;
    --clarity-primary: #325F92;
    --clarity-secondary: #24466E;
    --card-border: #DCE6F1;
    --text-main: #1F2F44;
    --text-muted: #61758E;
    --success: #325F92;
    --surface-soft: #DCE8F5;
    --cta: #FF7A59;
    --cta-hover: #E96547;
    --divider: #DCE6F1;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 20%, rgba(50, 95, 146, 0.14), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(36, 70, 110, 0.12), transparent 30%),
        var(--bg-soft);
    color: var(--text-main);
    font-family: "Nunito", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.app-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--divider);
    backdrop-filter: blur(8px);
}

.logo-img {
    height: 100px;
    width: auto;
    display: block;
}

.btn-clarity {
    border: 0;
    border-radius: 12px;
    padding: 0.75rem 1.2rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--cta), var(--cta-hover));
    box-shadow: 0 12px 24px rgba(233, 101, 71, 0.24);
    text-decoration: none;
}

.btn-clarity:hover {
    color: #fff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--cta-hover), #d85a3e);
}

main {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.content-wrap {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.app-footer {
    border-top: 1px solid var(--divider);
    background: #ffffff;
}

.sim-card {
    width: 100%;
    max-width: 900px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.sim-card-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--divider);
    background: #ffffff;
}

.step-chip {
    font-size: 0.78rem;
    color: var(--clarity-primary);
    font-weight: 700;
    background: rgba(50, 95, 146, 0.15);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.sim-card-body {
    position: relative;
    padding: 1.5rem;
    padding-bottom: 5.5rem;
}

#globalBackBtn {
    position: absolute;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 5;
}

.step-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.step-actions-between {
    justify-content: space-between;
}

.field-stack-center {
    justify-content: center;
}

.birth-fields-stack {
    justify-content: center;
}

.birth-fields-stack > div {
    max-width: 450px;
}

.phone-prefix {
    background: #f3f5f8;
    color: #93a1b3;
    border-color: #dee2e6;
    font-weight: 600;
}

.choice-btn-inline {
    width: auto;
    min-width: 180px;
}

.step-card {
    will-change: transform, opacity;
}

.step-card .row.g-3 {
    --bs-gutter-y: 2rem;
}

.step-card h3 {
    text-align: center;
    margin-top: 0.9rem;
    margin-bottom: 2rem !important;
}

.step-card.step-fade-in {
    animation: stepFadeIn 0.3s ease both;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .step-card.step-fade-in {
        animation: none;
    }
}

@media (max-width: 576px) {
    #globalBackBtn {
        left: 1rem;
        bottom: 1rem;
    }

    .sim-card-body {
        padding-bottom: 5rem;
    }
}

.hero-title {
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(0.98rem, 1.25vw, 1.2rem);
    line-height: 1.45;
}

.feature-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.feature-list li {
    width: min(100%, 24rem);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    text-align: left;
}

.feature-list li::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: rgba(50, 95, 146, 0.15);
    color: var(--success);
    font-weight: 800;
    font-size: 0.78rem;
    flex: 0 0 1.15rem;
}

.choice-btn {
    border: 1px solid var(--divider);
    border-radius: 14px;
    padding: 1rem;
    font-weight: 600;
    width: 100%;
    background: #fff;
    transition: all 0.2s ease;
}

.choice-btn:hover {
    border-color: var(--clarity-primary);
    transform: translateY(-1px);
}

.choice-btn.active {
    border-color: var(--clarity-primary);
    background: rgba(50, 95, 146, 0.12);
    color: var(--clarity-primary);
    box-shadow: inset 0 0 0 1px rgba(50, 95, 146, 0.28);
}

.credit-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 108px;
}

.credit-type-btn i {
    font-size: 1.25rem;
    color: var(--clarity-primary);
}

.form-label {
    font-weight: 600;
    color: var(--text-main);
}

.page-index .sim-card .form-text {
    font-weight: 700;
    text-align: center;
}

.page-index .sim-card .step-card {
    text-align: center;
}

.page-index .sim-card .form-label {
    width: 100%;
    text-align: left;
}

.page-index .sim-card .form-control,
.page-index .sim-card .form-select {
    text-align: left;
}

.page-index .sim-card .input-group {
    justify-content: center;
}

.page-index .sim-card .input-group .phone-prefix {
    text-align: center;
}

.result-box {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.2rem;
    background: #ffffff;
    height: 100%;
}

.result-box h5 {
    font-weight: 700;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.result-title-icon {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--surface-soft);
}

.result-box.optimista .result-title-icon {
    background: rgba(50, 95, 146, 0.2);
}

.result-box.moderada .result-title-icon {
    background: rgba(255, 122, 89, 0.22);
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clarity-primary);
}

.result-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.result-box.optimista {
    border-top: 4px solid var(--success);
}

.result-box.moderada {
    border-top: 4px solid #FF7A59;
}

.result-list {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.result-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0;
    color: var(--text-main);
}

.result-list .icon {
    width: 1.2rem;
    text-align: center;
    flex: 0 0 1.2rem;
}

.team-contact {
    border: 1px solid var(--card-border);
    border-top: 4px solid var(--success);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 16px 34px rgba(31, 47, 68, 0.08);
    padding: 1.4rem;
}

.team-contact-content {
    max-width: 860px;
}

.team-contact-content h4 {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.9rem;
    line-height: 1.25;
}

.team-contact-content p {
    color: var(--text-muted);
    font-size: 1.06rem;
    line-height: 1.5;
}

.team-contact-content ul {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.team-contact-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
    color: var(--text-main);
    font-size: 1.04rem;
}

.team-contact-content li::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: rgba(50, 95, 146, 0.15);
    color: var(--success);
    font-weight: 800;
    font-size: 0.78rem;
    flex: 0 0 1.15rem;
    margin-top: 0.12rem;
}

#contactNoCommitmentBtn {
    margin-top: 0.35rem;
}

.team-photo {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--divider);
    display: block;
    margin: 0 auto 0.6rem;
}

.team-name {
    text-align: center;
    font-weight: 700;
    margin: 0;
}

body.debug-design-mode .content-wrap {
    align-items: flex-start;
}

body.debug-design-mode .step-card {
    display: block !important;
    border: 1px dashed var(--card-border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.thanks-card {
    width: min(100%, 900px);
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 2rem;
}

.thanks-title {
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-align: center;
}

.thanks-text {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.video-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.video-wrap iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

.chatbot-wrap {
    margin-top: 1.5rem;
    max-width: 760px;
}

.chatbot-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.chat-row.assistant {
    justify-content: flex-start;
}

.chat-row.user {
    justify-content: flex-end;
}

.chat-message {
    border: 0;
    border-radius: 14px;
    padding: 0.8rem 1rem;
    max-width: min(88%, 620px);
    white-space: pre-line;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.chat-message.user {
    background: linear-gradient(180deg, #edf4fb 0%, var(--surface-soft) 100%);
    color: var(--text-main);
    font-weight: 600;
}

.chat-message.assistant {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
    color: var(--text-main);
}

.chat-message-body {
    line-height: 1.65;
}

.chatbot-counter {
    margin-top: 0.6rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.chat-input {
    padding: 0.95rem 1rem;
    font-size: 1rem;
}

.chat-send-btn {
    min-width: 52px;
    font-size: 1.1rem;
    font-weight: 700;
}

.page-info main {
    display: block;
    padding: 2rem 0;
}

.info-card {
    border: 1px solid var(--card-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.info-card-header {
    padding: 1.4rem;
    border-bottom: 1px solid #eef2ff;
    background: #fbfdff;
}

.info-card-body {
    padding: 1.4rem;
}

.title {
    font-weight: 800;
    font-size: clamp(1.25rem, 2.2vw, 1.9rem);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

.item-label {
    font-weight: 700;
    color: var(--text-main);
}

.item-value {
    color: var(--text-muted);
}

.banks-list {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.banks-list li {
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.highlight-box {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--surface-soft);
    color: var(--text-muted);
}
