/* =========================================
   AlphaPyme – Crear Cuenta  |  Estilos v2
   ========================================= */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary:       #0052CC;
    --primary-dark:  #003D99;
    --primary-light: #E8F0FE;
    --accent:        #FF2283;
    --accent-hover:  #d41a6e;
    --text-main:     #1A1A2E;
    --text-muted:    #6B7280;
    --border:        #D1D5DB;
    --input-bg:      #F9FAFB;
    --white:         #FFFFFF;
    --shadow-card:   0 20px 60px rgba(0, 82, 204, 0.15);
    --radius-card:   20px;
    --radius-input:  10px;
    --transition:    0.25s ease;
}

/* ---- Base ---- */
html, body {
    height: 100%;
    font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    color: var(--text-main);
    background: #0A0F2C;
}

/* ---- Layout wrapper ---- */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Left panel (branding) ---- */
.panel-brand {
    flex: 1;
    background: linear-gradient(145deg, #0A0F2C 0%, #0052CC 60%, #0A0F2C 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

.panel-brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    top: -120px;
    left: -120px;
}

.panel-brand::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(255, 34, 131, 0.08);
    bottom: -80px;
    right: -80px;
}

.brand-logo {
    width: 200px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    filter: brightness(0) invert(1);
}

.brand-headline {
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.brand-headline span {
    color: var(--accent);
}

.brand-desc {
    color: rgba(255,255,255,0.65);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
    max-width: 340px;
    position: relative;
    z-index: 1;
}

.brand-features {
    list-style: none;
    margin-top: 36px;
    position: relative;
    z-index: 1;
}

.brand-features li {
    color: rgba(255,255,255,0.80);
    font-size: 0.9rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-features li::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Right panel (form) ---- */
.panel-form {
    flex: 0 0 480px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    overflow-y: auto;
}

/* ---- Form header ---- */
.form-header {
    margin-bottom: 32px;
    text-align: left;
}

.form-header .tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main) !important;
    line-height: 1.2;
    margin-bottom: 10px;
    text-align: left !important;
}

.form-header p {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left !important;
}

.form-header a {
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.form-header a:hover {
    border-color: var(--primary);
}

/* ---- Divider ---- */
.form-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 28px;
}

/* ---- Field groups ---- */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.field-group label {
    color: var(--text-main) !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    margin-top: 0 !important;
}

.field-group .field-wrap {
    position: relative;
}

.field-group .field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color var(--transition), box-shadow var(--transition);
    margin: 0 !important;
    outline: none;
}

.field-group input:focus,
.field-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
    background: var(--white);
}

.field-group input::placeholder {
    color: #B0B7C3;
    font-size: 0.9rem;
}

.field-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    color: var(--text-main);
}

.field-group .select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ---- Submit button ---- */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #2979FF 100%);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-input);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    letter-spacing: 0.03em;
    margin-top: 22px;
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.35);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 82, 204, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

/* ---- Terms text ---- */
.terms-text {
    margin-top: 18px;
    font-size: 0.78rem;
    color: var(--text-muted) !important;
    text-align: center !important;
    line-height: 1.6;
}

.terms-text a {
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* ---- Validación de campos ---- */
.field-group input.field-error,
.field-group select.field-error {
    border-color: #E53E3E;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
    background: #FFF5F5;
}

.field-group input.field-ok,
.field-group select.field-ok {
    border-color: #38A169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.10);
}

.error-msg {
    font-size: 0.75rem;
    color: #E53E3E;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Estado bloqueado (enviando) ---- */
.form-locked input,
.form-locked select {
    pointer-events: none;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-submit.sending {
    pointer-events: none;
    opacity: 0.80;
    background: linear-gradient(135deg, #4A5568 0%, #718096 100%) !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

.btn-submit .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ---- reCAPTCHA badge override ---- */
.grecaptcha-badge {
    opacity: 0.6;
    transition: opacity 0.3s;
}
.grecaptcha-badge:hover {
    opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .panel-brand {
        display: none;
    }
    .panel-form {
        flex: 1;
        padding: 40px 28px;
    }
    .field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .panel-form {
        padding: 32px 20px;
    }
    .form-header h2 {
        font-size: 1.5rem;
    }
}
