/* ===== VARIÁVEIS GLOBAIS ===== */
:root {
    --brand-red: #e63946;
    --brand-red-dark: #c1121f;
    --brand-gold: #ffd60a;
    --brand-gold-dark: #e6b800;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #8b8b8b;
    --text-muted: #5a5a5a;
    --success-green: #2ea043;
    --shadow-glow: 0 0 40px rgba(230, 57, 70, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== CARD PRINCIPAL ===== */
.main-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

/* ===== HEADER ===== */
.card-header-custom {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1010 100%);
    padding: 28px 24px 18px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    font-size: 2.2rem;
    color: var(--brand-red);
    margin-bottom: 6px;
    filter: drop-shadow(0 0 10px rgba(230, 57, 70, 0.5));
}

.brand-name {
    font-size: 1.7rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-red), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* ===== FORMULÁRIO ===== */
.form-body {
    padding: 8px 24px 28px;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-red);
    margin-top: 18px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(230, 57, 70, 0.15);
    letter-spacing: 0.5px;
}

.section-title i {
    margin-right: 6px;
    font-size: 0.82rem;
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.custom-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 14px;
    font-size: 0.88rem;
    transition: var(--transition);
}

.custom-input:focus {
    border-color: var(--brand-red) !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
    background: #1e1414 !important;
}

.custom-input::placeholder {
    color: var(--text-muted) !important;
    font-size: 0.8rem;
}

.custom-input:read-only {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== PLANOS ===== */
.plans-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-option {
    flex: 1;
    min-width: 140px;
    cursor: pointer;
}

.plan-option input[type="radio"] {
    display: none;
}

.plan-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.plan-card:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.plan-option input[type="radio"]:checked + .plan-card {
    border-color: var(--brand-red);
    background: rgba(230, 57, 70, 0.08);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.15);
}

.plan-duration {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--brand-red);
    margin-bottom: 4px;
}

.plan-detail {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BOTÃO GERAR ===== */
.btn-submit {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white !important;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--brand-red-dark), #a00d1a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== MODAL SUCESSO ===== */
.sucesso-icon {
    font-size: 3rem;
    color: var(--success-green);
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(46, 160, 67, 0.5));
}

.sucesso-titulo {
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 4px;
}

.sucesso-subtitulo {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* ===== PEDIDO INFO BOX ===== */
.pedido-info-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}

.pedido-info-box p {
    margin-bottom: 5px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.pedido-info-box .fw-bold {
    color: var(--text-primary);
}

.destaque-amarelo {
    color: var(--brand-gold) !important;
    font-weight: 700;
}

/* ===== BOTÕES DO MODAL ===== */
.btn-copiar-declaracao {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    border: none;
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-copiar-declaracao:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

.btn-copiar-confirmacao {
    background: linear-gradient(135deg, #2ea043, #1a7f37);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.83rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copiar-confirmacao:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 160, 67, 0.3);
}

.btn-fechar {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-fechar:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

/* ===== VALIDAÇÃO ===== */
.was-validated .custom-input:invalid {
    border-color: var(--brand-red) !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
}

.was-validated .custom-input:valid {
    border-color: var(--success-green) !important;
}

/* ===== TOAST DE CÓPIA ===== */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success-green);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 5000;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(46, 160, 67, 0.4);
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 576px) {
    .main-card {
        border-radius: 12px;
        margin: 10px;
    }

    .card-header-custom {
        padding: 22px 18px 14px;
    }

    .brand-name {
        font-size: 1.4rem;
    }

    .form-body {
        padding: 8px 16px 22px;
    }

    .plans-container {
        flex-direction: column;
    }

    .plan-option {
        min-width: 100%;
    }

    .plan-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
    }

    .modal-content-custom {
        padding: 22px 16px;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== SELEÇÃO ===== */
::selection {
    background: var(--brand-red);
    color: white;
}
