/* ===== Theme Variables (same palette as RazorGorgolisB2B) ===== */
:root {
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5fa;
    --text-body: #2f3a45;
    --text-muted: #5f6b77;
    --border-color: #dfe4ea;
    --primary: #1b6fae;
    --primary-dark: #0d5a96;
    --primary-light: #5b9bd5;
    --success: #1e7e45;
    --success-bg: #e6f4ec;
    --danger: #c62828;
    --danger-bg: #fdecec;
    --header-gradient: linear-gradient(150deg, #0d5a96 0%, #1b6fae 60%, #5b9bd5 100%);
    --focus-ring: 0 0 0 4px rgba(27, 111, 174, 0.25);
    --shadow-card: 0 8px 24px rgba(16, 42, 67, 0.08);
}

[data-theme="dark"] {
    --bg-body: #111418;
    --bg-card: #1b2027;
    --bg-subtle: #222933;
    --text-body: #e4e8ec;
    --text-muted: #a9b3bd;
    --border-color: #313a45;
    --primary: #5b9bd5;
    --primary-dark: #3d84c4;
    --primary-light: #8bbbe6;
    --success: #5cc98a;
    --success-bg: #17301f;
    --danger: #f07575;
    --danger-bg: #3a1c1c;
    --header-gradient: linear-gradient(150deg, #0a1e33 0%, #0f3356 60%, #1b4f80 100%);
    --focus-ring: 0 0 0 4px rgba(91, 155, 213, 0.35);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
    color: var(--text-body);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

.icon {
    flex-shrink: 0;
    vertical-align: -2px;
}

/* ===== Header ===== */
.site-header {
    background: var(--header-gradient);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
}

.site-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 60vw;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.95;
}

.btn-header {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    min-height: 34px;
}

.btn-header:hover, .btn-header:focus-visible {
    color: var(--primary-dark);
    background: #fff;
    border-color: #fff;
}

/* ===== Main ===== */
.site-main {
    flex: 1;
    padding-top: 20px;
    padding-bottom: 24px;
}

.crc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    padding: 24px 28px;
    margin: 0 auto;
    max-width: 720px;
}

.crc-card.crc-card-wide {
    max-width: 960px;
}

.crc-card.crc-card-narrow {
    max-width: 420px;
}

.crc-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.crc-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.crc-muted {
    color: var(--text-muted);
}

/* Order summary */
.order-summary {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.order-item {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.order-amount-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.order-amount {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.order-installments {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Customer details */
.crc-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin-bottom: 20px;
}

.crc-details div {
    min-width: 0;
}

.crc-details dt {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.crc-details dd {
    margin: 0;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.crc-note {
    background: var(--bg-subtle);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ===== Steps ===== */
.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 auto 16px;
    max-width: 720px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.step + .step::before {
    content: "";
    width: 32px;
    height: 2px;
    background: var(--border-color);
    margin-right: 0;
}

.step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    font-weight: 600;
    font-size: 0.8rem;
}

.step.current {
    color: var(--text-body);
    font-weight: 600;
}

.step.current .step-dot {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.step.done .step-dot {
    border-color: var(--primary);
    color: var(--primary);
}

.step.done + .step::before,
.step.done + .step.current::before {
    background: var(--primary);
}

/* ===== Login ===== */
.login-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--primary);
    margin-bottom: 12px;
}

.login-icon-circle .icon {
    width: 28px;
    height: 28px;
}

.btn-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.btn-eye .icon {
    vertical-align: middle;
}

/* ===== Result ===== */
.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.result-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.result-icon.failure {
    background: var(--danger-bg);
    color: var(--danger);
}

.result-icon .icon {
    width: 36px;
    height: 36px;
}

/* ===== Forms & buttons ===== */
.form-control {
    background-color: var(--bg-card);
    color: var(--text-body);
    border-color: var(--border-color);
    min-height: 44px;
}

.form-control:focus {
    background-color: var(--bg-card);
    color: var(--text-body);
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.form-text {
    color: var(--text-muted);
}

.btn {
    min-height: 44px;
    font-weight: 500;
}

.btn:focus-visible {
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-link {
    color: var(--text-muted);
    text-decoration: none;
}

.btn-link:hover {
    color: var(--text-body);
}

[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-body);
    border-color: var(--border-color);
}

[data-theme="dark"] .alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: transparent;
}

[data-theme="dark"] .alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: transparent;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.825rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 20px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-footer-secure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-footer-seal {
    height: 30px;
    width: auto;
}

.footer-credit {
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.footer-credit a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: var(--primary);
}

/* ===== Phones ===== */
@media (max-width: 575.98px) {
    .site-main {
        padding-top: 20px;
    }

    .crc-card {
        padding: 20px;
        border-radius: 12px;
    }

    .crc-details {
        grid-template-columns: 1fr;
    }

    .order-amount {
        font-size: 1.7rem;
    }

    .step-label {
        display: none;
    }

    .step.current .step-label {
        display: inline;
    }

    .step + .step::before {
        width: 16px;
    }

    .site-footer-inner {
        justify-content: center;
        text-align: center;
    }

    .footer-credit {
        font-size: 11px;
        white-space: normal;
    }
}
