*,
*::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;
}

* {
    transition: border-color .2s, background .2s, color .2s, opacity .2s
}

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: 900px;
    min-height: 560px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 51, 102, .15)
}

/* ── Panel izquierdo ── */
.panel-brand {
    flex: 0 0 360px;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.25rem;
    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)
}

.ring-mid {
    position: absolute;
    top: 42%;
    left: -55px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 25px 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: 13.5px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.75;
    text-align: center;
    max-width: 210px;
    margin-bottom: 2.25rem;
    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)
}

/* ── Panel derecho ── */
.panel-form {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.75rem
}

.form-heading {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: .3px;
    margin-bottom: .3rem
}

.form-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2rem
}

/* 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-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0
}

/* Campos */
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1.1rem
}

label.lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em
}

input[type=email],
input[type=password] {
    width: 100%;
    padding: 10px 13px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none
}

input[type=email]:focus,
input[type=password]:focus {
    border-color: var(--navy);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, .08)
}

/* Fila opciones */
.opt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem
}

.remember {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer
}

.remember input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: var(--navy)
}

.forgot {
    font-size: 13px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500
}

.forgot: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: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    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
}

/* Separador */
.sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0
}

.sep-line {
    flex: 1;
    height: 1px;
    background: var(--border)
}

.sep-txt {
    font-size: 12px;
    color: var(--muted)
}

/* Botones sociales */
.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .625rem
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f9fafb;
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background .2s
}

.btn-social:hover {
    border-color: #9ca3af;
    background: #f3f4f6
}

/* Banner distribuidor */
.dist-banner {
    margin-top: 1.5rem;
    padding: 11px 14px;
    background: #f0f4fa;
    border-radius: var(--radius);
    border-left: 3px solid var(--gold)
}

.dist-banner p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
    margin: 0
}

.dist-banner a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none
}

.dist-banner a:hover {
    text-decoration: underline
}

.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)
}

@media(max-width:680px) {
    .page {
        flex-direction: column;
        max-width: 420px
    }

    .panel-brand {
        flex: none;
        padding: 2rem 1.5rem
    }

    .panel-form {
        padding: 2rem 1.5rem
    }

    .social-row {
        grid-template-columns: 1fr
    }
}