/* ./css/style.css - ОБНОВЛЕННЫЙ СТИЛЬ */

/* ===== 1. CSS-ПЕРЕМЕННЫЕ ===== */
:root {
    /* Светлая тема по умолчанию */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0d9488;
    --secondary-dark: #0f766e;
    
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --hover: #f1f5f9;
    
    --header-bg: #ffffff;
    --header-text: #1e293b;
    --footer-bg: #1e293b;
    --footer-text: #f8fafc;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --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-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition: all 0.2s ease;
}

/* Темная тема */
[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --hover: #334155;
    
    --header-bg: #1e293b;
    --header-text: #f1f5f9;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* ===== 2. БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Inter', sans-serif;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 3. ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

/* ===== 4. КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background-color: var(--hover);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== 5. ШАПКА ===== */
.header {
    background-color: var(--header-bg);
    color: var(--header-text);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav a:hover {
    background-color: var(--hover);
    color: var(--primary);
}

.nav a.active {
    background-color: var(--primary);
    color: white;
}

/* Элементы управления в шапке */
.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Переключатель языка */
.lang-switcher {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px;
}

.lang-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Переключатель темы */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--hover);
}

/* Меню пользователя */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-name {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 0;
    margin-top: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background-color: var(--hover);
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* ===== 6. ГЛАВНАЯ СТРАНИЦА ===== */

/* Герой-секция */
.hero {
    padding: 80px 0;
    text-align: center;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}


/* Секция возможностей */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* Стили для блока карточек документов на главной */
.doc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.doc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    background-color: var(--hover);
}

.doc-card-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.doc-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.doc-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.doc-card-desc {
    font-size: 0.95rem;
    color: var(--muted-color, #6c757d);
    line-height: 1.5;
}

.feature-card {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Секция дашборда */
.dashboard-section {
    padding: 80px 0;
    background-color: var(--bg);
    border-top: 1px solid var(--border);
}

.dashboard-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-card {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text);
}

.dashboard-card h3 i {
    color: var(--primary);
}

/* Прогресс-бар */
.progress-container {
    background: var(--hover);
    height: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    height: 100%;
    border-radius: 6px;
    position: relative;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.dashboard-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Список документов */
.documents-list {
    margin-bottom: 25px;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.document-item:last-child {
    border-bottom: none;
}

.document-info {
    flex: 1;
}

.document-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text);
}

.document-title i {
    color: var(--primary);
}

.document-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Бейджи статусов */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-sent {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-sent::before {
    background-color: var(--info);
}

.status-paid {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-paid::before {
    background-color: var(--success);
}

.status-signed {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.status-signed::before {
    background-color: #8b5cf6;
}

/* Кнопки в дашборде */
.dashboard-card .btn {
    width: 100%;
}

/* ===== 7. ПОДВАЛ ===== */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 7. ПОДВАЛ ===== */
/* (Добавляем после существующих стилей для .footer и перед .footer p) */

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-copyright {
    flex: 1;
    min-width: 250px;
}

/* Центральная колонка: Навигационные ссылки */
.footer-nav {
    flex: 1;
    min-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.footer-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-align: left;
}

.footer-nav-list {
    list-style: none;
    columns: 2;
    column-gap: 40px;
}

.footer-nav-list li {
    margin-bottom: 8px;
    break-inside: avoid;
}

.footer-nav-list a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.4;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Обновляем контейнер для двух колонок */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Чтобы колонки были одинаковой высоты */
    flex-wrap: wrap;
    gap: 30px;
}

/* Обновляем блок показателей, чтобы он соответствовал */

.stats-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-align: left; /* Меняем с center на left */
}

.stats-list {
    list-style: none;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    background-color: var(--hover);
    padding: 2px 10px;
    border-radius: 12px;
}

/* Обновляем существующие стили .footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 30px 0; /* Уменьшили с 40px */
    margin-top: auto;
    border-top: 1px solid var(--border);
}

/* Обновляем .footer-content */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px; /* Уменьшили с 40px */
    text-align: left;
}

.footer-copyright {
    flex: 1;
    min-width: 200px;
}

.footer-nav {
    flex: 2; /* Займет больше места, так как там 2 колонки ссылок */
    min-width: 300px;
    padding: 0 20px;
}

.footer-stats {
    flex: 1;
    min-width: 250px;
    /* Остальные стили остаются без изменений */
}

/* ===== 8. АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-controls {
        order: 2;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .features h2,
    .dashboard-section h2 {
        font-size: 2rem;
    }
    
    .lang-switcher {
        display: none;
    }
}

/* Адаптивность для карточек документов */
@media (max-width: 768px) {
    .doc-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* Всегда 2 карточки в ряд на планшетах */
        gap: 1.5rem;
        padding: 0 10px;
    }
    .doc-card {
        padding: 2rem 1rem;
    }
    .doc-card-icon {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .doc-cards-grid {
        grid-template-columns: 1fr; /* Одна карточка в ряд на мобильных */
        max-width: 400px;
    }
}

/* ===== 9. АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.dashboard-card {
    animation: fadeIn 0.4s ease-out;
}

/* ===== 10. СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Стили для выбора шаблона */
.template-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.template-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.template-option:hover {
    border-color: var(--primary);
    background: var(--hover);
}

.template-option.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.template-option i {
    font-size: 1.2rem;
}

#selectedTemplateInfo {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--hover);
    border-radius: var(--radius);
}

#selectedTemplateInfo span {
    font-weight: 600;
    color: var(--primary);
}

/* Стили для модального окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Стили для загрузки шаблона */
.template-upload-container {
    margin: 15px 0;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--hover);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.upload-area p {
    margin: 5px 0;
    color: var(--text);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.selected-file {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-top: 10px;
    background: var(--surface);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-info i {
    font-size: 1.5rem;
    color: var(--primary);
}

.file-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== СТИЛИ ДЛЯ КОЛОНКИ СТАТУСА ===== */

/* Контейнер статуса */
.status-container {
    position: relative;
    min-width: 180px;
}

/* Кнопка переключения статуса */
.status-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.status-toggle-btn:hover {
    background: var(--hover);
    border-color: var(--primary);
}

.status-toggle-btn i {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.status-toggle-btn.active i {
    transform: rotate(180deg);
}

/* Текст статуса */
.status-text {
    flex: 1;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Цвета для разных статусов */
.status-sent {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.status-payment_in_progress {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.status-paid {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.status-signed_both {
    color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}

.status-not_set {
    color: var(--text-secondary);
    background-color: var(--hover);
}

/* Выпадающий список статусов */
.status-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 4px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
}

.status-dropdown.show {
    display: block;
}

/* Элементы выпадающего списка */
.status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text);
}

.status-option:hover {
    background: var(--hover);
}

.status-option.active {
    background: var(--primary);
    color: white;
}

.status-option-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-option-color.sent { background-color: #3b82f6; }
.status-option-color.payment_in_progress { background-color: #f59e0b; }
.status-option-color.paid { background-color: #10b981; }
.status-option-color.signed_both { background-color: #8b5cf6; }

/* Адаптивность для колонки статуса */
@media (max-width: 1024px) {
    .documents-table {
        min-width: 1000px;
    }
    
    .status-container {
        min-width: 160px;
    }
}

/* ==================== СТРАНИЦА СОТРУДНИКОВ ==================== */

/* Таблица сотрудников */
.staff-section {
    padding: 60px 0;
    background-color: var(--bg);
}

.staff-page-header {
    margin-bottom: 40px;
}

.staff-page-header h1 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 2.5rem;
}

.staff-page-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Контролы */
.staff-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--hover);
}

/* Таблица */
.staff-table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 20px;
}

.staff-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.staff-table th {
    background-color: var(--hover);
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.staff-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
    transition: var(--transition);
}

.staff-table tbody tr:hover {
    background-color: var(--hover);
}

.staff-table tbody tr:last-child td {
    border-bottom: none;
}

/* Статусы */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active {
    background-color: rgba(72, 187, 120, 0.1);
    color: #48bb78;
}

.status-dismissed {
    background-color: rgba(245, 101, 101, 0.1);
    color: #f56565;
}

.status-vacation {
    background-color: rgba(66, 153, 225, 0.1);
    color: #4299e1;
}

.status-absence {
    background-color: rgba(237, 137, 54, 0.1);
    color: #ed8936;
}

.status-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Кнопки действий в таблице */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.btn-action:hover {
    background: var(--hover);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-card {
    color: var(--primary);
    border-color: rgba(66, 153, 225, 0.3);
}

.btn-card:hover {
    background: rgba(66, 153, 225, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-dismiss {
    color: var(--warning);
    border-color: rgba(237, 137, 54, 0.3);
}

.btn-dismiss:hover {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

.btn-restore {
    color: var(--success);
    border-color: rgba(72, 187, 120, 0.3);
}

.btn-restore:hover {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.btn-delete {
    color: var(--danger);
    border-color: rgba(245, 101, 101, 0.3);
}

.btn-delete:hover {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* Иконки внутри кнопок */
.btn-action i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-action:hover i {
    transform: scale(1.1);
}

/* Индикаторы */
.loading-indicator,
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-indicator i,
.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading-indicator p,
.no-results p {
    margin: 0;
    font-size: 1.1rem;
}

/* ==================== КАРТОЧКА СОТРУДНИКА ==================== */

.employee-card-section {
    padding: 40px 0;
    background-color: var(--bg);
    min-height: calc(100vh - 200px);
}

.card-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Шапка карточки */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

.employee-title {
    flex: 1;
}

.employee-title h1 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
}

/* Основная информация */
.card-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
}

.info-section {
    padding: 30px;
}

.info-section:not(:last-child) {
    border-right: 1px solid var(--border);
}

.info-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.info-row {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    flex: 0 0 180px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.info-value {
    flex: 1;
    color: var(--text);
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Кнопки действий в карточке */
.card-action-buttons {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.action-btn i {
    font-size: 1rem;
}

.btn-edit {
    background: var(--primary);
    color: white;
}

.btn-edit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-absence {
    background: var(--warning);
    color: white;
}

.btn-absence:hover {
    background: var(--warning-dark);
    transform: translateY(-1px);
}

.btn-vacation {
    background: var(--info);
    color: white;
}

.btn-vacation:hover {
    background: var(--info-dark);
    transform: translateY(-1px);
}

.btn-documents {
    background: var(--secondary);
    color: white;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-documents:hover {
    background: var(--secondary-dark);
}

/* Хронология */
.history-section {
    margin-top: 40px;
}

.history-section h3 {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

.history-list {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.history-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--hover);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    flex: 0 0 120px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.history-content {
    flex: 1;
}

.history-action {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1rem;
}

.history-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--hover);
    color: var(--danger);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid var(--border);
}

/* ==================== ФОРМЫ ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    background: var(--surface);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Управление отсутствиями и отпусками */
.absence-management,
.vacation-management {
    padding: 10px;
}

.absence-header,
.vacation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.absence-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.absence-item:hover {
    background: var(--hover);
}

.absence-dates {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.absence-reason {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.absence-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-delete-absence {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-delete-absence:hover {
    background: rgba(245, 101, 101, 0.1);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range input {
    flex: 1;
}

.vacation-calculator {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.calculation-results {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--success);
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 1024px) {
    .staff-table-container {
        overflow-x: auto;
    }
    
    .staff-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .staff-section {
        padding: 30px 0;
    }
    
    .staff-page-header h1 {
        font-size: 2rem;
    }
    
    .staff-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .info-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .info-label {
        flex: 1;
    }
    
    .card-action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .history-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .history-date {
        flex: 1;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .btn,
    .action-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .staff-table th,
    .staff-table td {
        padding: 12px 15px;
    }
    
    .info-section {
        padding: 20px;
    }
}

/* ==================== КАРТОЧКА СОТРУДНИКА ==================== */

.employee-card-section {
    padding: 40px 0;
    background-color: var(--bg);
    min-height: calc(100vh - 200px);
}

.employee-card-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.employee-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Шапка карточки */
.employee-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    flex-wrap: wrap;
    gap: 20px;
}

.employee-card-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.employee-card-back:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

.employee-card-title {
    flex: 1;
    text-align: right;
}

.employee-card-title h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
}

.employee-card-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.status-active { background-color: rgba(72, 187, 120, 0.9); }
.status-dismissed { background-color: rgba(245, 101, 101, 0.9); }
.status-vacation { background-color: rgba(66, 153, 225, 0.9); }
.status-absence { background-color: rgba(237, 137, 54, 0.9); }

/* Тело карточки */
.employee-card-body {
    padding: 30px;
}

/* Информационная сетка */
.employee-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    margin-bottom: 30px;
}

.employee-info-block {
    padding: 25px;
}

.employee-info-block:not(:last-child) {
    border-right: 1px solid var(--border);
}

.employee-info-block h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.employee-info-row {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.employee-info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.employee-info-label {
    flex: 0 0 180px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.employee-info-value {
    flex: 1;
    color: var(--text);
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Кнопки действий */
.employee-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.employee-action-btn {
    padding: 12px 25px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.employee-action-btn i {
    font-size: 1rem;
}

.employee-btn-edit {
    background: var(--primary);
    color: white;
}

.employee-btn-edit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.employee-btn-absence {
    background: var(--warning);
    color: white;
}

.employee-btn-absence:hover {
    background: var(--warning-dark);
    transform: translateY(-1px);
}

.employee-btn-vacation {
    background: var(--info);
    color: white;
}

.employee-btn-vacation:hover {
    background: var(--info-dark);
    transform: translateY(-1px);
}

.employee-btn-documents {
    background: var(--secondary);
    color: white;
}

.employee-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.employee-btn-disabled:hover {
    background: var(--secondary);
    transform: none;
}

/* Хронология */
.employee-history-section {
    margin-top: 40px;
}

.employee-history-section h3 {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

.employee-history-list {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.employee-history-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.employee-history-item:hover {
    background: var(--hover);
}

.employee-history-item:last-child {
    border-bottom: none;
}

.employee-history-date {
    flex: 0 0 120px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.employee-history-content {
    flex: 1;
}

.employee-history-action {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1rem;
}

.employee-history-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Пустое состояние */
.empty-state-sm {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-sm i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-sm p {
    margin: 0;
    font-size: 1rem;
}

/* ==================== МОДАЛЬНЫЕ ОКНА (ОБЩИЕ) ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
}

.modal-close:hover {
    background: var(--hover);
    color: var(--danger);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid var(--border);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    background: var(--surface);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--hover);
}

/* Управление отсутствиями и отпусками */
.absence-management,
.vacation-management {
    padding: 10px;
}

.absence-header,
.vacation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.absence-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.absence-item:hover {
    background: var(--hover);
}

.absence-dates {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.absence-reason {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.absence-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-delete-absence {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-delete-absence:hover {
    background: rgba(245, 101, 101, 0.1);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range input {
    flex: 1;
}

.vacation-calculator {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.calculation-results {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--success);
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 768px) {
    .employee-card-header {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .employee-card-title {
        text-align: left;
        margin-top: 15px;
    }
    
    .employee-info-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-info-block:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .employee-info-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .employee-info-label {
        flex: 1;
    }
    
    .employee-actions {
        flex-direction: column;
    }
    
    .employee-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .employee-action-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .employee-card-body {
        padding: 20px;
    }
    
    .employee-info-block {
        padding: 20px;
    }
}

/* ==================== ФОНД ОПЛАТЫ ТРУДА ==================== */

.salary-fund-section {
    margin: 25px 0;
}

.salary-fund-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 25px 30px;
    color: white;
    box-shadow: var(--shadow);
    max-width: 400px;
}

.salary-fund-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.salary-fund-info {
    flex: 1;
}

.salary-fund-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.salary-fund-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.salary-fund-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Адаптивность для фонда оплаты труда */
@media (max-width: 768px) {
    .salary-fund-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .salary-fund-amount {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .salary-fund-card {
        max-width: 100%;
    }
    
    .salary-fund-amount {
        font-size: 1.5rem;
    }
}

/* ===== Секция быстрого доступа ===== */
.quick-access {
    padding: 80px 0;
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.quick-access-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text);
}

.quick-access-subtitle {
    text-align: center;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 50px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.quick-access-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
    background-color: var(--hover);
}

.quick-access-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-access-card:hover::before {
    opacity: 1;
}

.quick-access-card-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.quick-access-card:hover .quick-access-card-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.quick-access-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    transition: var(--transition);
}

.quick-access-card:hover .quick-access-card-title {
    color: var(--primary);
}

.quick-access-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Адаптивность */
@media (max-width: 768px) {
    .quick-access {
        padding: 60px 0;
    }
    
    .quick-access-title {
        font-size: 2rem;
    }
    
    .quick-access-subtitle {
        font-size: 1rem;
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 10px;
    }
}

@media (max-width: 600px) {
    .quick-access-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .quick-access-card {
        padding: 2rem 1rem;
    }
}