:root {
    --auth-navy: #071b43;
    --auth-navy-2: #0b2a62;
    --auth-blue: #5aa1ff;
    --auth-blue-2: #3678d8;
    --auth-line: rgba(131, 178, 238, 0.28);
    --auth-text: #f2f7ff;
    --auth-muted: #9fb6d7;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Exo 2", Arial, sans-serif;
    color: var(--auth-text);
    background: #07152f;
}

button,
input {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(90deg, rgba(6, 21, 48, 0.78), rgba(20, 65, 118, 0.48)),
        url("/imagenes_Proyecto/panama_1.jpeg");
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.auth-page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(4, 13, 32, 0.2), rgba(4, 13, 32, 0.66)),
        rgba(6, 27, 64, 0.38);
}

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

.auth-panel {
    display: none;
    width: 100%;
    min-height: 500px;
    padding: 28px 32px 24px;
    border: 1px solid rgba(118, 167, 229, 0.26);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(12, 38, 88, 0.96), rgba(5, 22, 55, 0.97)),
        rgba(9, 28, 67, 0.94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
}

.auth-panel-login {
    display: block;
}

.auth-page[data-auth-mode="login"] .auth-panel-login,
.auth-page[data-auth-mode="register"] .auth-panel-register {
    display: block;
}

.auth-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.auth-mark-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #71b4ff;
    background: rgba(74, 143, 226, 0.13);
    border: 1px solid rgba(100, 167, 245, 0.28);
    box-shadow: inset 0 0 22px rgba(66, 138, 236, 0.16);
}

.auth-eyebrow {
    color: #62b5ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    min-height: 42px;
    margin-bottom: 24px;
    padding: 4px;
    border: 1px solid rgba(118, 167, 229, 0.18);
    border-radius: 8px;
    background: rgba(4, 18, 44, 0.52);
}

.auth-tab {
    min-width: 0;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    color: #98b3d5;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.auth-tab:hover,
.auth-tab:focus-visible {
    color: #eaf4ff;
    background: rgba(88, 154, 240, 0.12);
    outline: 0;
}

.auth-page[data-auth-mode="login"] .auth-tab[data-auth-mode-target="login"],
.auth-page[data-auth-mode="register"] .auth-tab[data-auth-mode-target="register"] {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(89, 159, 248, 0.95), rgba(50, 111, 199, 0.95));
    box-shadow: 0 8px 18px rgba(40, 105, 192, 0.22);
}

.auth-header {
    margin-bottom: 22px;
}

.auth-header h1 {
    margin: 0 0 6px;
    font-size: 2.45rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-message {
    min-height: 20px;
    margin: 0;
    color: #ffb5b5;
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field > span:first-child {
    color: #e9f2ff;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-required {
    color: #73b7ff;
    font-weight: 800;
}

.auth-input-wrap {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: rgba(8, 29, 69, 0.64);
    color: #8bb7ee;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input-wrap:focus-within {
    border-color: rgba(104, 171, 255, 0.75);
    box-shadow: 0 0 0 3px rgba(82, 152, 242, 0.15);
    background: rgba(9, 34, 79, 0.86);
}

.auth-input-wrap i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.auth-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: 0;
    color: var(--auth-text);
    background: transparent;
}

.auth-input-wrap input::placeholder {
    color: rgba(190, 207, 229, 0.68);
}

.auth-icon-btn {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ebce2;
    cursor: pointer;
}

.auth-icon-btn:hover,
.auth-icon-btn:focus-visible {
    color: #f3f8ff;
    background: rgba(104, 171, 255, 0.14);
    outline: 0;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 3px 0 4px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-muted);
    font-size: 0.89rem;
    line-height: 1.35;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #5b9ff2;
}

.auth-check a,
.auth-link,
.auth-switch a {
    color: #65b8ff;
    text-decoration: none;
}

.auth-check a:hover,
.auth-link:hover,
.auth-switch a:hover {
    color: #9bd1ff;
}

.auth-link {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.89rem;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(180deg, var(--auth-blue), var(--auth-blue-2));
    box-shadow: 0 10px 26px rgba(51, 126, 219, 0.26);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    background: linear-gradient(180deg, #70afff, #3d85ea);
    outline: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 17px;
    margin: 24px 0 16px;
    color: #bdcde5;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(131, 178, 238, 0.32));
}

.auth-divider::after {
    background: linear-gradient(90deg, rgba(131, 178, 238, 0.32), transparent);
}

.auth-switch {
    display: grid;
    justify-items: center;
    gap: 20px;
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-terms {
    align-items: flex-start;
    margin-top: -2px;
}

@media (max-width: 540px) {
    .auth-page {
        padding: 16px;
        place-items: start center;
    }

    .auth-panel {
        min-height: auto;
        padding: 24px 20px 22px;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .auth-eyebrow {
        font-size: 0.72rem;
        letter-spacing: 0.18em;
    }

    .auth-tabs {
        margin-bottom: 20px;
    }

    .auth-tab {
        font-size: 0.83rem;
    }

    .auth-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding: 12px;
    }

    .auth-panel {
        padding: 22px 16px 20px;
    }

    .auth-mark {
        align-items: flex-start;
        flex-direction: column;
    }
}
