/* ============================================
   EVENTHUB PRO - ПРОФЕССИОНАЛЬНЫЕ СТИЛИ ФОРМ
   Версия: 1.0.0
   Автор: EventHub Pro Team
   ============================================ */

/* ===== CSS ПЕРЕМЕННЫЕ ===== */
:root {
    /* Light Theme Colors */
    --color-bg-primary: #f9fafb;
    --color-bg-card: #ffffff;
    --color-text-primary: #1b1b18;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-focus: #6366f1;
    --color-primary: #1b1b18;
    --color-primary-hover: #374151;
    --color-danger: #dc2626;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-info: #2563eb;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

.dark-theme {
    /* Dark Theme Colors */
    --color-bg-primary: #111827;
    --color-bg-card: #1f2937;
    --color-text-primary: #f9fafb;
    --color-text-secondary: #d1d5db;
    --color-text-muted: #9ca3af;
    --color-border: #374151;
    --color-border-focus: #818cf8;
    --color-primary: #f3f4f6;
    --color-primary-hover: #e5e7eb;
    --color-danger: #ef4444;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ===== КОНТЕЙНЕРЫ ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 28rem; /* 448px */
    margin: 0 auto;
}

/* ===== ЛОГОТИП ===== */
.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-logo__subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* ===== КАРТОЧКА ФОРМЫ ===== */
.auth-card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.auth-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.25;
}

/* ===== ФОРМЫ ===== */
.auth-form {
    width: 100%;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-label--required::after {
    content: "*";
    color: var(--color-danger);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.form-control--error {
    border-color: var(--color-danger);
}

.form-control--error:focus {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===== ОШИБКИ ===== */
.form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    outline: none;
    user-select: none;
}

.btn--block {
    width: 100%;
}

.btn--primary {
    background-color: var(--color-primary);
    color: white;
}

.btn--primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

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

.btn--primary:focus {
    box-shadow: 0 0 0 3px rgba(27, 27, 24, 0.2);
}

.dark-theme .btn--primary {
    color: var(--color-bg-primary);
}

/* ===== ССЫЛКИ ===== */
.auth-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--color-info);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--color-border-focus);
    text-decoration: underline;
}

.auth-link--center {
    text-align: center;
    display: block;
}

/* ===== РАЗДЕЛИТЕЛИ ===== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

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

.auth-divider::before {
    margin-right: 1rem;
}

.auth-divider::after {
    margin-left: 1rem;
}

/* ===== КАСТОМНЫЕ ПОЛЯ ===== */
.custom-fields-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.custom-fields-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1.25rem;
}

.custom-field {
    margin-bottom: 1.25rem;
}

.custom-field:last-child {
    margin-bottom: 0;
}

.custom-field__help {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

/* ===== УТИЛИТЫ ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 640px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-logo__title {
        font-size: 1.75rem;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.5s ease-out;
}

/* ===== LOADING STATES ===== */
.btn--loading {
    position: relative;
    color: transparent !important;
}

.btn--loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}