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

:root {
    --primary: #22c55e;
    --primary-hover: #16a34a;
    --bg-light: #0f1f1a;
    --bg-card: #0b1713;
    --bg-input: #0e1c18;
    --border-input: #1e3a2f;
    --border-focus: #22c55e;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-label: #cbd5e1;
    --error-color: #f87171;
    --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-color: var(--bg-light);
    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(15, 31, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.12);
}

.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(34, 197, 94, 0.15);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    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: #4a6858; }

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' 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: #0b1713;
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 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(34, 197, 94, 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(255, 255, 255, 0.06);
    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;
    }
}
