/* ========== AUTH PAGES ========== */
.auth-page {
    /* #app already sets min-height:100vh plus padding-top for the
       header, so a second min-height:100vh here stacked the two and
       made the page render at ~200vh tall (card floating mid-page
       with a huge empty gap below). Subtract the header height that
       #app already accounts for instead of re-reserving a full
       viewport on top of it. */
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--bg-base);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 50%);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

/* Signed-out visitors land on /login by default (Aug 2026 redesign);
   this lets them peek at the homescreen (banner + locked nav preview —
   pages/home.html) without leaving the auth flow. */
.auth-top-nav {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 2;
}

.auth-top-nav-home {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.auth-top-nav-home:hover {
    color: var(--text-primary);
    border-color: var(--color-primary);
}

.auth-top-nav-home svg {
    width: 16px;
    height: 16px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 900;
    margin-bottom: var(--space-3);
}

.auth-logo .logo-tea {
    color: var(--color-primary);
}

.auth-logo .logo-ai {
    color: var(--text-primary);
}

.auth-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-form {
    margin-bottom: var(--space-6);
}

.auth-footer {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-social-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.auth-social-btn svg {
    width: 18px;
    height: 18px;
}

.auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-forgot {
    font-size: var(--text-sm);
    color: var(--color-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-forgot:hover {
    color: var(--color-primary-light);
}

.auth-password-strength {
    margin-top: var(--space-2);
}

.strength-bar {
    height: 4px;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-1);
}

.strength-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    width: 0;
}

.strength-fill.weak { width: 33%; background: var(--color-danger); }
.strength-fill.fair { width: 66%; background: var(--color-warning); }
.strength-fill.strong { width: 100%; background: var(--color-success); }

.strength-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ========== AUTH LOADER ========== */
.auth-loader {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.auth-loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}
