/* ============================================
   LOGIN/REGISTER PAGE - Страница входа и регистрации
   ============================================ */

.login-page {
    padding: 4rem 0;
    background: linear-gradient(135deg, #F0F7FC 0%, #E8E6FF 50%, #FFF3E0 100%);
    min-height: calc(100vh - 200px);
}

/* Auth container */
.auth-container {
    max-width: 520px;
    margin: 0 auto;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: #fff;
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.12);
}

.auth-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: #78909C;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab:hover {
    color: #4A90E2;
    background: #F0F7FC;
}

.auth-tab.active {
    background: linear-gradient(135deg, #4A90E2 0%, #6C63FF 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Form containers */
.auth-form-container {
    display: none;
    background: #fff;
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.16);
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .handwritten {
    font-family: 'Caveat', cursive;
    font-size: 1.75rem;
    color: #FFA726;
    display: block;
    margin-bottom: 0.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 0 0 0.5rem 0;
    color: #263238;
}

.auth-header p {
    font-size: 1rem;
    color: #78909C;
    margin: 0;
    line-height: 1.6;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #455A64;
}

.form-input {
    padding: 1rem 1.25rem;
    border: 2px solid #E8F4FD;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: #263238;
    background: #fff;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.form-input::placeholder {
    color: #B0BEC5;
}

/* Switch text */
.auth-switch-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #78909C;
}

.auth-switch-link {
    background: none;
    border: none;
    color: #4A90E2;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    font-family: var(--font-primary);
}

.auth-switch-link:hover {
    color: #357ABD;
}

/* City autocomplete */
.city-autocomplete {
    position: relative;
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #E8F4FD;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.15);
    max-height: 240px;
    overflow: auto;
    z-index: 10;
    margin-top: 0.5rem;
}

.city-suggestion-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #263238;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F5F7FA;
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover {
    background: #F0F7FC;
    color: #4A90E2;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #455A64;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #4A90E2;
}

.form-checkbox a {
    color: #4A90E2;
    text-decoration: underline;
}

.form-checkbox a:hover {
    color: #357ABD;
}

/* Error styles */
.form-errors {
    background: #FFF3F3;
    border: 2px solid #FFCDD2;
    color: #C62828;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-errors p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.form-input.is-error {
    border-color: #EF5350;
    background: #FFEBEE;
}

.form-input.is-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 83, 80, 0.1);
}

.form-checkbox.is-error {
    color: #C62828;
}

.form-error {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #C62828;
    font-weight: 500;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #78909C;
    line-height: 1.5;
}

/* Buttons */
.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #4A90E2 0%, #6C63FF 100%);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .login-page {
        padding: 2rem 0;
    }
    
    .auth-container {
        margin: 0 1rem;
    }
    
    .auth-form-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header .handwritten {
        font-size: 1.5rem;
    }
    
    .auth-tab {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .form-input {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}

/* Additional animations */
@media (prefers-reduced-motion: no-preference) {
    .auth-tab,
    .form-input,
    .btn-primary,
    .city-suggestion-item {
        will-change: transform;
    }
}
