/* /sdo/auth/auth.css - стили для СДО */

:root {
    --primary-color: #2c3e50;
    --primary-dark: #1e2b37;
    --secondary-color: #3498db;
    --accent-color: #2980b9;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 24px;
    --radius-sm: 12px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #e8f0f5 0%, #d4e0e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    line-height: 1.4;
    padding: 20px;
}

/* КОНТЕЙНЕР */
.auth-container {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

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

/* ШАПКА */
.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 32px 28px;
    text-align: center;
    color: white;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.auth-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.auth-header p {
    font-size: 13px;
    opacity: 0.85;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* ФОРМА */
.auth-form {
    padding: 32px 28px;
}

/* ПОЛЯ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--secondary-color);
    font-size: 14px;
    width: 18px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fafcff;
    transition: var(--transition);
    color: var(--text-primary);
}

.form-group input:hover {
    border-color: #cbd5e1;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ПОЛЕ С ГЛАЗКОМ */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--secondary-color);
}

/* КНОПКИ */
.auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    margin-bottom: 16px;
}

.auth-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* АНИМАЦИЯ ЗАГРУЗКИ */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ПОДСКАЗКИ */
.auth-note {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    line-height: 1.5;
}

.auth-note a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-note a:hover {
    text-decoration: underline;
}

/* ФУТЕР */
.auth-footer {
    padding: 16px 28px 24px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

.auth-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* УВЕДОМЛЕНИЯ */
.auth-message {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    font-family: 'Inter', sans-serif;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.auth-message.closing {
    animation: slideOut 0.3s ease forwards;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #27ae60;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #3498db;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-content i {
    font-size: 18px;
    flex-shrink: 0;
}

.message-content span {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.message-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    color: inherit;
    opacity: 0.7;
    padding: 0 5px;
    line-height: 1;
}

.message-close:hover {
    opacity: 1;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-header {
        padding: 24px 20px;
    }
    
    .logo-img {
        width: 44px;
        height: 44px;
    }
    
    .auth-header h1 {
        font-size: 18px;
    }
    
    .auth-form {
        padding: 24px 20px;
    }
    
    .auth-footer {
        padding: 14px 20px 20px;
    }
}