:root {
    --blue: #071f3d;
    --blue-soft: #123a63;
    --gold: #c9a227;
    --gold-dark: #9a7616;
    --surface: #ffffff;
    --panel: #eef3f8;
    --line: #d6dde8;
    --text: #071f3d;
    --muted: #5d6b7b;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

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

body {
    min-height: 100vh;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        linear-gradient(120deg, rgba(7, 31, 61, 0.94), rgba(18, 58, 99, 0.84)),
        url(../img/central-bridge-logo.png);
    background-repeat: no-repeat;
    background-size: cover, min(54vw, 680px);
    background-position: center, center;
}

.btn-volver-inicio {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 7px;
    background: var(--surface);
    color: var(--blue);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.mensaje-exito {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    width: min(720px, calc(100% - 32px));
    padding: 12px 18px;
    border-radius: 7px;
    background: #ecfdf3;
    color: #166534;
    text-align: center;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 88px 24px 48px;
}

.auth-shell {
    width: min(1040px, 100%);
}

.login-brand {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.login-brand img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    flex: 0 0 auto;
}

.login-brand h1 {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.1;
    color: var(--blue);
    letter-spacing: 0.01em;
}

.login-brand p {
    margin-top: 6px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
    gap: 24px;
    align-items: start;
}

.auth-card {
    min-width: 0;
    padding: 34px 40px 38px;
    border: 1px solid rgba(201, 162, 39, 0.28);
    border-top: 5px solid var(--gold);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card-secondary {
    background: rgba(238, 243, 248, 0.97);
}

.auth-card-header {
    margin-bottom: 22px;
    text-align: left;
}

.auth-card-header span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-card h2 {
    font-family: "Libre Baskerville", Georgia, serif;
    color: var(--blue);
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.1;
}

.auth-card-header p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.auth-card label {
    display: block;
    margin-top: 14px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
}

.auth-card input,
.auth-card select {
    width: 100%;
    min-height: 50px;
    margin-top: 7px;
    padding: 0 14px;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.auth-card input:focus,
.auth-card select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}

.inline-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: #1f2937 !important;
    font-weight: 500 !important;
}

.inline-check input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    margin: 0;
}

.forgot-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

.auth-card button {
    width: 100%;
    min-height: 52px;
    margin-top: 22px;
    border: none;
    border-radius: 7px;
    background: var(--blue);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.auth-card button:hover {
    background: var(--blue-soft);
    transform: translateY(-1px);
}

@media (max-width: 860px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 96px;
    }

    .login-brand {
        width: 100%;
        justify-content: center;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .btn-volver-inicio {
        position: static;
        margin: 14px 14px 0;
    }

    .auth-page {
        padding: 18px 14px 32px;
    }

    .login-brand {
        flex-direction: column;
        text-align: center;
    }

    .auth-card {
        padding: 28px 22px 32px;
    }
}
