/* === AUTH.CSS ===
 * assets/css/auth.css
 * НАЗНАЧЕНИЕ: Стили страницы авторизации (вход/регистрация)
 * СВЯЗИ: templates/auth.php, components.css
 * РАЗМЕР: ~300 строк
 */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.auth-gradient-orb-1 {
    width: 400px;
    height: 400px;
    background: hsl(var(--primary));
    top: -100px;
    left: -100px;
}

.auth-gradient-orb-2 {
    width: 350px;
    height: 350px;
    background: hsl(var(--secondary));
    bottom: -100px;
    right: -100px;
}

.auth-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(hsl(var(--border) / 0.15) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--border) / 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 2rem;
    text-decoration: none;
}

/* ============================================
   AUTH CARD
   ============================================ */
.auth-card {
    width: 100%;
    background: hsl(var(--surface-1));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid hsl(var(--border));
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--surface-2));
}

.auth-tab.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
    background: transparent;
}

/* ============================================
   AUTH FORMS
   ============================================ */
.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 0.9375rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--muted-foreground));
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    font-size: 0.9375rem;
    background: hsl(var(--surface-2));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.form-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.input-toggle-password {
    position: absolute;
    right: 0.75rem;
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-toggle-password:hover {
    color: hsl(var(--foreground));
}

/* ============================================
   AUTH OPTIONS & EXTRAS
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
}

.checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: hsl(var(--primary));
}

.forgot-link {
    color: hsl(var(--primary));
    font-size: 0.875rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

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

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: hsl(var(--surface-3));
    border-radius: 2px;
    margin-bottom: 0.25rem;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-text {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.auth-back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-back-link:hover {
    color: hsl(var(--foreground));
}

/* ============================================
   AUTH — theme toggle
============================================ */
.auth-theme-btn {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(8px);
}
.auth-theme-btn:hover {
    background: var(--bg-hover, rgba(255,255,255,0.1));
    color: var(--text-primary);
    border-color: var(--color-primary, #22d3ee);
}
.auth-theme-btn i { width: 18px; height: 18px; }
