:root {
    --auth-bg: #faf7f2;
    --auth-text: #1c1917;
    --auth-muted: #6b6560;
    --auth-accent: #9a3b2f;
    --auth-accent-hover: #7f2f26;
    --auth-border: #e7e1d8;
    --auth-surface: #ffffff;
    --auth-font: "Plus Jakarta Sans", system-ui, sans-serif;
    --auth-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
}

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

html.auth-page,
body.login-page {
    min-height: 100dvh;
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font);
}

.auth-split {
    min-height: 100dvh;
    display: grid;
}

.auth-visual {
    display: none;
    position: relative;
    overflow: hidden;
    color: #faf7f2;
    padding: 2.5rem;
    background:
        linear-gradient(160deg, rgba(28, 25, 23, 0.35), rgba(28, 25, 23, 0.72)),
        repeating-linear-gradient(-18deg, transparent, transparent 22px, rgba(255,255,255,0.05) 22px, rgba(255,255,255,0.05) 26px),
        #3f2e2a;
}

.auth-visual h2 {
    font-family: var(--auth-display);
    font-size: clamp(2rem, 3vw, 3.2rem);
    letter-spacing: -0.04em;
    margin: 0;
    max-width: 12ch;
}

.auth-visual p {
    max-width: 28ch;
    color: rgba(250, 247, 242, 0.82);
    font-size: 1.05rem;
}
.auth-visual .panel-badge { align-self: flex-start; }
.auth-visual a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.4); }

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.15rem;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
}

.auth-box {
    width: min(100%, 440px);
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    padding: 1.6rem 1.4rem 1.5rem;
    box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--auth-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    flex-wrap: wrap;
}
.auth-brand > a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}
.auth-guest {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.92rem;
}
.auth-guest a {
    color: var(--auth-muted);
}
.auth-brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
}
.auth-brand .lang-switch { margin-left: auto; }
.auth-visual__logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    object-fit: cover;
}

.gateway-top .lang-switch { margin-left: 0; }

.auth-tagline {
    color: var(--auth-muted);
    margin: 0.75rem 0 1.2rem;
    line-height: 1.5;
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    background: #f3eee7;
    padding: 0.28rem;
    border-radius: 999px;
}

.tab-btn {
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    padding: 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.tab-btn.active {
    background: #fff;
    color: var(--auth-text);
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.08);
}

.auth-form { display: none; margin-top: 1.2rem; }
.auth-form.active { display: grid; gap: 0.85rem; }

.field { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--auth-muted); font-weight: 600; }
.field input,
.field select {
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--auth-border);
    background: #fff;
    color: var(--auth-text);
    padding: 0 0.95rem;
    font-weight: 500;
}

.remember,
.switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-muted);
    font-size: 0.9rem;
}
.switch[hidden],
.google-shop-hint[hidden] { display: none !important; }

.btn,
button.btn {
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--auth-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn:hover { background: var(--auth-accent-hover); }

.launch-hold {
    max-width: 28rem;
    text-align: left;
}
.launch-hold h1 {
    margin: 0.2rem 0 0.75rem;
    font-family: var(--auth-display);
    font-size: clamp(1.85rem, 5vw, 2.4rem);
    letter-spacing: -0.04em;
    line-height: 1.15;
}
.launch-hold .eyebrow {
    margin: 1.2rem 0 0;
    color: var(--auth-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.launch-hold__shop {
    margin: 1.4rem 0 0.65rem;
    font-weight: 700;
}
.launch-hold__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.1rem;
    margin: 0;
}
.launch-hold__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.35rem;
    text-decoration: none;
}
.launch-hold__login {
    font-weight: 700;
    text-decoration: none;
}

.btn-google {
    margin-top: 1.1rem;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: #fff;
    color: var(--auth-text);
    font-weight: 700;
    text-decoration: none;
}
.auth-google { margin-top: 0.35rem; }
.auth-google-barber { margin: 0.35rem 0 0.85rem; }
.google-shop-hint { margin: 0 0 0.75rem; font-size: 0.82rem; }
.btn-google:hover { background: #faf7f2; }
.btn-google svg { width: 20px; height: 20px; }
.auth-or {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.muted {
    color: var(--auth-muted);
}
.auth-forgot {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
}

.alert {
    margin: 1rem 0 0;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    font-size: 0.92rem;
}
.alert-danger { background: #fde8e6; color: #b42318; }
.alert-success { background: #e8f6ee; color: #2f6f4e; }

a { color: var(--auth-accent); }

body.panel-shop { --auth-accent: #c45c26; --auth-accent-hover: #a44b1e; }
body.panel-admin { --auth-accent: #111827; --auth-accent-hover: #030712; }
body.panel-shop .auth-visual {
    background:
        linear-gradient(160deg, rgba(28, 25, 23, 0.25), rgba(28, 25, 23, 0.7)),
        repeating-linear-gradient(-18deg, transparent, transparent 22px, rgba(255,255,255,0.05) 22px, rgba(255,255,255,0.05) 26px),
        #6b3a1c;
}
body.panel-admin .auth-visual {
    background:
        linear-gradient(160deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.78)),
        repeating-linear-gradient(-18deg, transparent, transparent 22px, rgba(255,255,255,0.04) 22px, rgba(255,255,255,0.04) 26px),
        #111827;
}

@media (min-width: 900px) {
    .auth-split { grid-template-columns: 1.05fr 1fr; }
    .auth-visual {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 0.8rem;
    }
    .auth-visual__logo { margin-bottom: auto; }
    .auth-box {
        border: 0;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    .auth-guest { display: none; }
    .auth-container { padding: 3rem; }
}

body.login-page:not(:has(.auth-split)) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.15rem;
    padding: 1.5rem 1rem;
}
body.login-page .site-footer--compact {
    width: min(100%, 28rem);
    max-width: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    margin: 0.4rem auto 0;
    padding: 0.35rem 0 0;
    background: transparent;
    border: 0;
}
body.login-page .site-footer--compact .site-footer__copy {
    text-align: center;
}
body.login-page .site-footer--compact .site-footer__legal {
    justify-content: center;
}
