:root {
    --auth-ink: #0f172a;
    --auth-body: #334155;
    --auth-line: #94a3b8;
    --auth-teal: #0f766e;
    --auth-teal-deep: #115e59;
    --auth-danger: #9f1239;
    --auth-card: rgba(248, 250, 252, 0.94);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
    color: var(--auth-ink);
    overflow-x: hidden;
    background: #071428;
}

[hidden] {
    display: none !important;
}

.skip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 5;
    transform: translateY(-160%);
    background: #fff;
    color: var(--auth-ink);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.skip:focus {
    transform: none;
    outline: 3px solid var(--auth-teal);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #071428;
}

.auth-bg picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 58% 42%;
    animation: auth-ken 20s ease-in-out infinite alternate;
}

.auth-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 16, 36, 0.28) 0%, rgba(6, 16, 36, 0.08) 34%, rgba(6, 16, 36, 0.5) 100%),
        linear-gradient(102deg, rgba(7, 18, 40, 0.78) 0%, rgba(10, 28, 56, 0.46) 46%, rgba(48, 32, 14, 0.22) 100%);
}

.auth-stage {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 76px 24px 32px;
}

.auth-card {
    position: relative;
    width: min(440px, 100%);
    margin-top: 28px;
    padding: 58px 32px 22px;
    border-radius: 28px;
    background: var(--auth-card);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 28px 70px rgba(4, 12, 28, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(140%);
    animation: auth-rise 400ms ease-out both;
}

@supports not (backdrop-filter: blur(1px)) {
    .auth-card {
        background: #f8fafc;
    }
}

.auth-mark {
    position: absolute;
    top: -42px;
    left: 50%;
    width: 84px;
    height: 84px;
    margin-left: -42px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow:
        0 12px 28px rgba(4, 12, 28, 0.28),
        0 0 0 4px #fff,
        0 0 0 6px rgba(214, 178, 94, 0.9);
}

.auth-mark img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.auth-monogram {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #23456f, #0b1f3a 68%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 15px;
}

.auth-monogram.is-long {
    font-size: 12px;
    letter-spacing: 0.02em;
}

.auth-card h1 {
    margin: 4px 0 0;
    text-align: center;
    font-size: 1.4rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: var(--auth-ink);
}

.auth-kicker {
    margin: 6px 0 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-body);
}

.auth-rule {
    width: 48px;
    height: 2px;
    margin: 14px auto 4px;
    border-radius: 2px;
    background: #0f766e;
}

.auth-lead,
.auth-card .text-sm,
.auth-card .text-gray-600 {
    color: var(--auth-body);
    font-size: 15px;
    line-height: 1.45;
}

.auth-lead {
    margin: 0 0 14px;
}

.auth-field {
    margin-top: 14px;
}

.auth-field label,
.auth-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 650;
    color: var(--auth-ink);
}

.auth-control {
    position: relative;
}

.auth-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    color: #334155;
    pointer-events: none;
}

.auth-icon svg,
.auth-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.auth-control input,
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    height: 48px;
    margin: 0;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 16px;
    padding: 0 14px 0 44px;
}

.auth-control input {
    padding-left: 44px;
}

.auth-control input[type="password"],
.auth-control input[data-password] {
    padding-right: 48px;
}

.auth-control input:focus,
.auth-card input:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.28);
    outline: none;
}

.auth-control input[aria-invalid="true"] {
    border-color: #be123c;
    box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.18);
}

.auth-toggle {
    position: absolute;
    right: 2px;
    top: 2px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    cursor: pointer;
}

.auth-toggle:focus-visible,
.auth-link:focus-visible,
.auth-check:focus-within,
.auth-social a:focus-visible {
    outline: 3px solid var(--auth-teal);
    outline-offset: 2px;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-ink);
    cursor: pointer;
}

.auth-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--auth-teal);
}

.auth-link,
.auth-card a {
    color: var(--auth-teal);
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.auth-error,
.auth-card .text-red-600,
.auth-card .text-rose-600 {
    color: var(--auth-danger);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

.auth-card ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.auth-caps {
    margin: 6px 0 0;
    color: #9a3412;
    font-size: 14px;
    font-weight: 650;
}

.auth-status,
.auth-card .text-green-600 {
    margin: 0 0 12px;
    color: #065f46;
    font-size: 14px;
    font-weight: 650;
}

.auth-btn,
.auth-card button[type="submit"]:not(.auth-toggle) {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.auth-btn::after,
.auth-card button[type="submit"]:not(.auth-toggle)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
    transform: translateX(-130%);
}

.auth-btn:hover::after,
.auth-card button[type="submit"]:not(.auth-toggle):hover::after {
    animation: auth-sheen 800ms ease;
}

.auth-btn:focus-visible,
.auth-card button[type="submit"]:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--auth-teal);
}

.auth-btn:hover,
.auth-card button[type="submit"]:hover {
    background: linear-gradient(180deg, #0d6b63 0%, #0f4f4a 100%);
}

.auth-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
}

.auth-btn.is-busy .auth-spin {
    display: inline-block;
    animation: auth-spin 0.7s linear infinite;
}

.auth-btn.is-busy .auth-arrow {
    display: none;
}

.auth-secure {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-body);
}

.auth-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: min(440px, 100%);
    margin-top: 18px;
}

.auth-social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.auth-social svg {
    width: 20px;
    height: 20px;
    display: block;
}

.soc-facebook { background: #1877f2; }
.soc-instagram { background: radial-gradient(circle at 30% 110%, #f9ce34, #ee2a7b 48%, #6228d7 78%); }
.soc-youtube { background: #ff0000; }
.soc-x { background: #000; }
.soc-linkedin { background: #0a66c2; }
.soc-whatsapp { background: #25d366; box-shadow: inset 0 0 0 2px #075e54, 0 6px 16px rgba(0, 0, 0, 0.22); }
.soc-website { background: #0f2744; }

.auth-card.is-invalid .auth-body {
    animation: auth-shake 420ms ease-in-out;
}

@keyframes auth-ken {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes auth-shake {
    15%, 85% { transform: translateX(-2px); }
    30%, 70% { transform: translateX(5px); }
    45%, 55% { transform: translateX(-5px); }
}

@keyframes auth-sheen {
    to { transform: translateX(130%); }
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .auth-stage {
        padding: 68px 16px 24px;
        justify-content: flex-start;
    }

    .auth-card {
        padding: 54px 16px 18px;
        border-radius: 22px;
    }
}

.auth-card button.auth-quiet {
    width: auto;
    min-height: 44px;
    margin-top: 8px;
    padding: 0;
    background: none;
    box-shadow: none;
    color: var(--auth-teal);
    text-decoration: underline;
}

.auth-card button.auth-quiet::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .auth-photo,
    .auth-card,
    .auth-card.is-invalid .auth-body,
    .auth-btn::after,
    .auth-card button[type="submit"]::after,
    .auth-spin {
        animation: none !important;
    }

    .auth-card,
    .auth-photo {
        opacity: 1;
        transform: none;
    }
}
