*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --navy: #003366;
    --navy-light: #004488;
    --gold: #c8a84b;
    --gold-light: #e0c06a;
    --white: #ffffff;
    --bg: #f4f6f9;
    --text: #1a1a2e;
    --muted: #6b7280;
    --border: #d1d5db;
    --error: #dc2626;
    --success: #16a34a;
    --radius: 8px;
    --font-body: 'Barlow', sans-serif;
    --font-display: 'Barlow Condensed', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem
}

.page {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 51, 102, .15)
}

/* ── Panel izquierdo ── */
.panel-brand {
    flex: 0 0 340px;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden
}

.panel-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 50px solid rgba(255, 255, 255, .04)
}

.panel-brand::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 35px solid rgba(255, 255, 255, .03)
}

.logo-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 14px 22px;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1
}

.logo-wrap img {
    height: 34px;
    display: block
}

.brand-divider {
    width: 36px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 1
}

.brand-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.75;
    text-align: center;
    max-width: 200px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1
}

.brand-feat {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    width: 100%;
    position: relative;
    z-index: 1
}

.feat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px
}

.feat-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(200, 168, 75, .15);
    border: 1px solid rgba(200, 168, 75, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px
}

.feat-dot span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    display: block
}

.feat-title {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 2px
}

.feat-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, .4)
}

.back-link {
    margin-top: 2rem;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: color .2s
}

.back-link:hover {
    color: var(--gold)
}

/* ── Panel derecho ── */
.panel-form {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.75rem;
    overflow-y: auto
}

.form-heading {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: .3px;
    margin-bottom: .25rem
}

.form-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 1.75rem
}

/* Alertas */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 1.25rem;
    line-height: 1.5
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca
}

.alert-error ul {
    padding-left: 16px;
    margin: 4px 0 0
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0
}

/* Grid de campos */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem
}

.field-full {
    grid-column: 1/-1
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px
}

label.lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em
}

input,
select {
    width: 100%;
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, background .2s;
    outline: none
}

input:focus,
select:focus {
    border-color: var(--navy);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, .08)
}

input.err,
select.err {
    border-color: var(--error)
}

.pass-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px
}

/* Rol selector */
.rol-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-top: 2px
}

.rol-option {
    position: relative
}

.rol-option input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0
}

.rol-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
    background: #f9fafb
}

.rol-label .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
    transition: all .2s
}

.rol-option input:checked+.rol-label {
    border-color: var(--navy);
    background: #eef2f8;
    color: var(--navy)
}

.rol-option input:checked+.rol-label .dot {
    background: var(--navy);
    border-color: var(--navy)
}

/* Términos */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: .25rem 0 .25rem
}

.terms-row input[type=checkbox] {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--navy);
    flex-shrink: 0;
    cursor: pointer
}

.terms-row span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5
}

.terms-row a {
    color: var(--navy);
    text-decoration: none
}

.terms-row a:hover {
    text-decoration: underline
}

/* Botón */
.btn-submit {
    width: 100%;
    padding: 11px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: background .2s, transform .1s
}

.btn-submit:hover {
    background: var(--navy-light)
}

.btn-submit:active {
    transform: scale(.99)
}

.btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed
}

/* Login link */
.login-link {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 1.25rem
}

.login-link a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none
}

.login-link a:hover {
    text-decoration: underline
}

/* Éxito */
.success-box {
    text-align: center;
    padding: 2rem 1rem
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 28px
}

.success-box h2 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--navy);
    margin-bottom: .5rem
}

.success-box p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.6
}

.btn-go {
    display: inline-block;
    padding: 10px 28px;
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s
}

.btn-go:hover {
    background: var(--navy-light)
}

@media(max-width:700px) {
    .page {
        flex-direction: column;
        max-width: 420px
    }

    .panel-brand {
        flex: none;
        padding: 2rem 1.5rem
    }

    .panel-form {
        padding: 2rem 1.5rem
    }

    .field-grid {
        grid-template-columns: 1fr
    }

    .field-full {
        grid-column: 1
    }
}