/* Prevent white body strip on auth pages */
html:has(.auth-shell),
html:has(.auth-shell) body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: var(--tp-navy);
}

/* Standalone login / auth pages — no app sidebar (full viewport, no zoom) */
.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--tp-font);
    background: var(--tp-navy);
    overflow: hidden;
}

.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    flex: 1 1 auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-page__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: clamp(2rem, 5vw, 4rem);
    color: var(--tp-white);
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, color-mix(in srgb, var(--tp-sky-dark) 65%, transparent) 100%),
        url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=1200&q=80') center/cover;
}

.auth-page__brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--tp-sky-bright) 35%, transparent) 0%, transparent 50%);
    pointer-events: none;
}

.auth-page__brand-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
}

.auth-page__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--tp-white);
    margin-bottom: 2rem;
}

.auth-page__logo img {
    width: 52px;
    height: 52px;
}

.auth-page__logo strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-page__logo small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
}

.auth-page__headline {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.auth-page__headline span {
    color: var(--tp-sky-bright);
}

.auth-page__tagline {
    font-size: 1.05rem;
    line-height: 1.65;
    opacity: 0.92;
    margin: 0 0 2rem;
}

.auth-page__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-page__features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-page__features i {
    color: var(--tp-sky-bright);
    font-size: 1.1rem;
}

.auth-page__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(180deg, var(--tp-gray-50) 0%, var(--tp-sky-light) 100%);
}

.auth-card {
    width: min(420px, 100%);
    background: var(--tp-white);
    border-radius: 24px;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--tp-shadow-lg);
    border: 1px solid color-mix(in srgb, var(--tp-sky) 12%, transparent);
}

.auth-card__title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--tp-navy);
    margin: 0 0 0.35rem;
    text-align: center;
}

.auth-card__subtitle {
    text-align: center;
    color: var(--tp-gray-500);
    font-size: 0.9rem;
    margin: 0 0 1.75rem;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tp-gray-700);
    margin-bottom: 0.4rem;
}

.auth-field input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--tp-gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus,
.auth-field select:focus {
    outline: none;
    border-color: var(--tp-sky-dark);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tp-sky) 15%, transparent);
}

.auth-field select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--tp-gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--tp-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--tp-gray-700);
}

.auth-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--tp-white);
    cursor: pointer;
    background: var(--tp-gradient);
    box-shadow: var(--tp-shadow);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: var(--tp-shadow-lg);
}

.auth-back {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-back a {
    color: var(--tp-sky-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-back a:hover {
    color: var(--tp-sky);
    text-decoration: underline;
}

.auth-validation {
    color: #dc2626;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-page__brand {
        min-height: 220px;
        padding: 2rem 1.5rem;
    }

    .auth-page__features {
        display: none;
    }

    .auth-page__panel {
        padding: 2rem 1.25rem 2.5rem;
    }
}
