.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(103, 183, 247, 0.2), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(169, 148, 232, 0.18), transparent 30%),
        radial-gradient(circle at 50% 95%, rgba(42, 168, 199, 0.13), transparent 34%),
        linear-gradient(135deg, var(--bg), var(--bg-2) 48%, var(--bg-3));
}

.auth-card {
    position: relative;
    width: min(500px, 100%);
    padding: 34px;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.38));
    border: 1px solid var(--line);
    box-shadow: 0 24px 80px rgba(48, 71, 100, 0.14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    overflow: hidden;
}

body.theme-dark .auth-card {
    background:
        linear-gradient(145deg, rgba(16, 30, 49, 0.72), rgba(10, 24, 42, 0.46));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.auth-card::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(59, 130, 246, 0.36), rgba(34, 184, 207, 0.12) 58%, transparent 70%);
    pointer-events: none;
}

.auth-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    left: -60px;
    bottom: -70px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(167, 139, 250, 0.28), rgba(96, 165, 250, 0.1) 58%, transparent 70%);
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

.auth-card h1 {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.auth-card p {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.auth-form label {
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
}

.auth-form input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    outline: none;
}

body.theme-dark .auth-form input {
    background: rgba(8, 20, 36, 0.62);
}

.auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.auth-card .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, var(--primary), var(--accent-cyan));
    box-shadow: 0 16px 34px rgba(47, 111, 237, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 10px;
}

.auth-card .btn:hover {
    background:
        linear-gradient(135deg, var(--primary-hover), var(--accent-sky));
}

/* Google sign-in = SECONDARY: clearly filled, adapts per theme so it is never
   a dark pill sitting on the light card. */
.auth-card .google-btn {
    background: var(--secondary-hover);
    color: var(--text);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.auth-card .google-btn:hover {
    background: var(--secondary);
}

/* Sign-up = TERTIARY link style so it never reads as a twin of the
   secondary Google button. */
.auth-card .secondary-btn {
    background: transparent;
    color: var(--primary);
    border: 0;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 4px;
    min-height: 38px;
}

.auth-card .secondary-btn:hover {
    background: transparent;
    color: var(--primary-hover);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 14px;
    color: var(--text-soft);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-card .muted {
    margin-top: 18px;
    margin-bottom: 0;
    font-size: 14px;
}

.auth-card .flash {
    margin-bottom: 18px;
}

.auth-theme-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    background: var(--ghost);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.auth-theme-toggle:hover {
    background: var(--ghost-hover);
}


.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    background: var(--ghost-hover);
    color: var(--text);
    outline: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.password-toggle .eye-hide {
    display: none;
}

.password-toggle.is-visible .eye-show {
    display: none;
}

.password-toggle.is-visible .eye-hide {
    display: inline-flex;
}
