/**
 * Therapy POS — Sign-in page (matches enterprise design system)
 */

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

.auth-body {
    font-family: var(--tp-font);
    color: var(--tp-text);
    background: var(--tp-bg);
}

.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Hero panel */
.auth-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-8);
    background: linear-gradient(145deg, var(--brand-burgundy-deep) 0%, var(--brand-warm-black) 55%, var(--brand-burgundy) 100%);
    border-right: 1px solid rgba(255, 250, 246, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -15%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(190, 58, 74, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.auth-hero__inner {
    position: relative;
    max-width: 420px;
    z-index: 1;
}

.auth-hero__brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Classic login lockup: burgundy tile + title to the right */
.auth-hero__brand--classic {
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
}

.auth-hero__logo-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--brand-gourmet-red) 0%, var(--brand-burgundy) 100%);
    box-shadow: var(--shadow-glow);
}

.auth-hero__logo-img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.auth-hero__brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    overflow: visible;
}

.auth-hero__logo,
.auth-card__mark {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-gourmet-red), var(--brand-burgundy));
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.auth-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: var(--color-text-inverse);
    line-height: 1.15;
}

.auth-hero__brand--classic .auth-hero__title {
    color: var(--color-text-inverse);
    -webkit-text-fill-color: currentColor;
    overflow: visible;
    padding: 0.02em 0;
}

.auth-hero__tag {
    margin: var(--space-1) 0 0;
    font-size: var(--text-caption);
    color: rgba(255, 250, 246, 0.6);
}

.auth-hero__lead {
    margin: 0 0 var(--space-6);
    font-size: var(--text-body-lg);
    line-height: var(--leading-relaxed);
    color: rgba(255, 250, 246, 0.82);
}

.auth-hero__features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--tp-space-3);
}

.auth-hero__features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-caption);
    color: rgba(255, 250, 246, 0.75);
}

.auth-hero__features li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gourmet-red);
    flex-shrink: 0;
}

/* Main / form column */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--tp-space-8) var(--tp-space-6);
    background: var(--tp-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-lg);
    padding: var(--tp-space-8) var(--tp-space-6);
}

.auth-card__head {
    display: flex;
    align-items: flex-start;
    gap: var(--tp-space-4);
    margin-bottom: var(--tp-space-6);
}

.auth-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 700;
}

.auth-card__subtitle {
    margin: var(--tp-space-1) 0 0;
    font-size: var(--tp-text-sm);
    color: var(--tp-text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--tp-space-4);
}

.auth-field {
    margin-bottom: 0;
}

.auth-input::placeholder {
    color: var(--tp-text-muted);
}

.auth-submit {
    margin-top: var(--tp-space-2);
    min-height: 48px;
    font-size: var(--tp-text-base);
}

.auth-alert {
    padding: var(--tp-space-3) var(--tp-space-4);
    border-radius: var(--tp-radius-sm);
    font-size: var(--tp-text-sm);
    margin-bottom: var(--tp-space-4);
}

.auth-alert--error {
    background: var(--tp-danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert[hidden] {
    display: none !important;
}

.auth-card__foot {
    margin-top: var(--tp-space-6);
    padding-top: var(--tp-space-4);
    border-top: 1px solid var(--tp-border);
    text-align: center;
}

.auth-trust {
    font-size: var(--tp-text-xs);
    color: var(--tp-text-muted);
}

.auth-copy {
    margin: var(--tp-space-6) 0 0;
    font-size: var(--tp-text-xs);
    color: var(--tp-text-muted);
    text-align: center;
}

/* Legacy class bridge (server-rendered errors) */
.auth-body .alert-error {
    background: var(--tp-danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: var(--tp-space-3) var(--tp-space-4);
    border-radius: var(--tp-radius-sm);
    font-size: var(--tp-text-sm);
    margin-bottom: var(--tp-space-4);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        padding: var(--tp-space-6) var(--tp-space-4);
    }

    .auth-card {
        box-shadow: var(--tp-shadow);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--tp-space-6) var(--tp-space-5);
    }

    .auth-card__head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
