@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary:       #2a9d58;
    --primary-hover: #1e7a42;
    --bg-light:      #bfdcca;
    --bg-card:       #d8ecdf;
    --bg-input:      #f0f8f3;
    --border-input:  rgba(42, 157, 88, 0.25);
    --border-focus:  #2a9d58;
    --text-main:     #1a3527;
    --text-muted:    #5e7d6c;
    --text-label:    #3d6050;
    --error-color:   #dc2626;
    --transition:    all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #b0d4bf 0%, #bfdcca 45%, #d0e8d8 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

/* ── Header ──────────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 5%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(191, 220, 202, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(42, 157, 88, 0.15);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.04em;
}
.logo span { color: var(--primary); }

/* ── Main / card ─────────────────────────────────────────────── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
}

.registro-card {
    background: var(--bg-card);
    border: 1px solid rgba(42, 157, 88, 0.20);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 60px rgba(26, 53, 39, 0.12);
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.registro-card h1 {
    font-size: 1.9rem;
    margin-bottom: 6px;
}

.registro-card .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ── Formulario ──────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-label);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group input::placeholder { color: #7a9e8a; }

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235e7d6c' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

.form-group select option {
    background: #edf5f0;
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(42, 157, 88, 0.15);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error-color);
}

.msg-error {
    color: var(--error-color);
    font-size: 0.78rem;
    margin-top: 4px;
    display: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Botón principal ─────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-submit:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Volver al inicio ────────────────────────────────────────── */
.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover { color: var(--primary); }

/* ── Estado de éxito ─────────────────────────────────────────── */
.success-state {
    display: none;
    text-align: center;
    animation: fadeUp 0.5s ease both;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(42, 157, 88, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.success-state h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.success-state p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
    padding: 24px 5%;
    text-align: center;
    border-top: 1px solid rgba(42, 157, 88, 0.15);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 560px) {
    .registro-card {
        padding: 32px 24px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .registro-card h1 {
        font-size: 1.6rem;
    }
}
