.header .header-buttons {
    display: flex;
    gap: 10px;
}

#add-transaction-form, #transaction-categories-page, #add-transaction-category-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

#add-transaction-form .form-section,
#add-transaction-category-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#transaction-categories-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.muted { color: #6c757d; font-size: 12px; }

/* ====== СТИЛИ АВТОРИЗАЦИИ ====== */

#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-header h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.login-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.login-content {
    padding: 30px;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.login-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.login-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.login-error {
    margin-top: 15px;
    padding: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: #c82333;
}

.year-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}

.year-selector:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.year-selector option {
    background: white;
    color: #333;
}

/* Скрытие основного контента до авторизации */
#main-content {
    display: none;
}

#main-content.authenticated {
    display: block;
}
/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Навигация */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand h1 {
    color: #667eea;
    font-size: 24px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-link.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Основной контент */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Стили для страницы создания товара */
#add-product-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Стили для страницы редактирования товара */
#edit-product-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#add-product-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#add-product-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#add-product-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#add-product-form .form-group {
    display: flex;
    flex-direction: column;
}

#add-product-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#add-product-form input,
#add-product-form select,
#add-product-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#add-product-form input:focus,
#add-product-form select:focus,
#add-product-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#add-product-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для формы редактирования товара */
#edit-product-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#edit-product-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#edit-product-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#edit-product-form .form-group {
    display: flex;
    flex-direction: column;
}

#edit-product-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#edit-product-form input,
#edit-product-form select,
#edit-product-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#edit-product-form input:focus,
#edit-product-form select:focus,
#edit-product-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#edit-product-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы создания материала */
#add-material-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#add-material-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#add-material-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#add-material-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#add-material-form .form-group {
    display: flex;
    flex-direction: column;
}

#add-material-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#add-material-form input,
#add-material-form select,
#add-material-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#add-material-form input:focus,
#add-material-form select:focus,
#add-material-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#add-material-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы редактирования материала */
#edit-material-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#edit-material-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#edit-material-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#edit-material-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#edit-material-form .form-group {
    display: flex;
    flex-direction: column;
}

#edit-material-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#edit-material-form input,
#edit-material-form select,
#edit-material-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#edit-material-form input:focus,
#edit-material-form select:focus,
#edit-material-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#edit-material-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы категорий материалов */
#material-categories-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#material-categories-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#material-categories-page .page-header h2 {
    margin: 0;
    color: #495057;
}

/* Стили для формы категории материала */
#add-material-category-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#add-material-category-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#add-material-category-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#add-material-category-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#add-material-category-form .form-group {
    display: flex;
    flex-direction: column;
}

#add-material-category-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#add-material-category-form input,
#add-material-category-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#add-material-category-form input:focus,
#add-material-category-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#add-material-category-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы создания сотрудника */
#add-employee-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#add-employee-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#add-employee-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#add-employee-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#add-employee-form .form-group {
    display: flex;
    flex-direction: column;
}

#add-employee-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#add-employee-form input,
#add-employee-form select,
#add-employee-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#add-employee-form input:focus,
#add-employee-form select:focus,
#add-employee-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#add-employee-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы редактирования сотрудника */
#edit-employee-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#edit-employee-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#edit-employee-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#edit-employee-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#edit-employee-form .form-group {
    display: flex;
    flex-direction: column;
}

#edit-employee-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#edit-employee-form input,
#edit-employee-form select,
#edit-employee-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#edit-employee-form input:focus,
#edit-employee-form select:focus,
#edit-employee-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#edit-employee-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для страницы категорий */
#categories-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.page-header h2 {
    color: #495057;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Стили для формы категории */
#add-category-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#add-category-form .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#add-category-form .form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#add-category-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#add-category-form .form-group {
    display: flex;
    flex-direction: column;
}

#add-category-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

#add-category-form input,
#add-category-form textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#add-category-form input:focus,
#add-category-form textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#add-category-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Стили для таблицы категорий */
#categories-page .data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#categories-page .data-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

#categories-page .data-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

#categories-page .data-table tr:hover {
    background: #f8f9fa;
}

#categories-page .data-table tr:last-child td {
    border-bottom: none;
}

/* Стили для кнопок действий */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 5px;
}

.btn-sm:last-child {
    margin-right: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #add-product-form .form-row,
    #add-category-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header button {
        width: 100%;
    }
    
    #categories-page .data-table {
        font-size: 14px;
    }
    
    #categories-page .data-table th,
    #categories-page .data-table td {
        padding: 8px;
    }
}

.header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

/* Кнопки */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #495057;
    font-size: 18px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-value.income {
    color: #28a745;
}

.stat-value.expense {
    color: #dc3545;
}

.stat-value.profit {
    color: #007bff;
}

/* Секции дашборда */
.dashboard-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.dashboard-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

/* Статусы */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-завершен {
    background: #d4edda;
    color: #155724;
}

.status-новое {
    background: #fff3cd;
    color: #856404;
}

.status-не_оплачен {
    background: #f8d7da;
    color: #721c24;
}

/* Типы транзакций */
.transaction-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.transaction-type.income {
    background: #d4edda;
    color: #155724;
}

.transaction-type.expense {
    background: #f8d7da;
    color: #721c24;
}

/* Центрированный текст */
.text-center {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Таблицы */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.data-table th a:hover {
    color: white;
    text-decoration: none;
}

.data-table th a i {
    font-size: 12px;
    opacity: 0.7;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Формы */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Секция товаров */
.items-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.items-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.add-item-form {
    margin-bottom: 20px;
}

.add-item-form .form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.add-item-form .form-row > * {
    margin-bottom: 0;
}

.items-list {
    min-height: 100px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.item-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.item-row .item-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.item-row .item-details {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.item-row .item-total {
    color: #28a745;
    font-weight: bold;
}

.item-row button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

/* Аналитика */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.analytics-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Горизонтальная прокрутка для таблиц */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Стили для таблиц */
table {
    width: 100%;
    min-width: 600px; /* Минимальная ширина для корректного отображения */
    border-collapse: collapse;
    margin: 0;
}

/* Кнопки действий в таблицах */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    min-width: 120px; /* Минимальная ширина для кнопок */
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 35px;
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* Колонка действий */
.actions-column {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

/* Предотвращение горизонтальной прокрутки для основного контента */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Общие стили для предотвращения переполнения */
    * {
        box-sizing: border-box;
    }
    
    .container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .form-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Таблицы для мобильных */
    .table-responsive {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    table {
        min-width: 700px; /* Увеличиваем минимальную ширину для мобильных */
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Кнопки действий для мобильных */
    .action-buttons {
        min-width: 100px;
        gap: 3px;
    }
    
    .action-buttons .btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 30px;
    }
    
    .actions-column {
        min-width: 100px;
        width: 100px;
    }
    
    /* Дополнительные стили для очень маленьких экранов */
    @media (max-width: 480px) {
        .table-responsive {
            margin: 0 -10px;
            border-radius: 0;
            border-left: none;
            border-right: none;
        }
        
        table {
            min-width: 650px;
            font-size: 12px;
        }
        
        table th,
        table td {
            padding: 6px 4px;
        }
        
        .action-buttons {
            min-width: 80px;
            gap: 2px;
        }
        
        .action-buttons .btn {
            padding: 3px 6px;
            font-size: 10px;
            min-width: 25px;
        }
        
        .actions-column {
            min-width: 80px;
            width: 80px;
        }
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    /* Адаптивность для форм продаж */
    .form-section {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .form-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group input,
    .form-group select {
        width: 100% !important;
        font-size: 16px !important; /* Предотвращает зум на iOS */
        padding: 12px !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
        border: 1px solid #ddd !important;
        background: white !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    /* Числовые поля с кнопками стрелок */
    input[type="number"] {
        -webkit-appearance: textfield !important;
        -moz-appearance: textfield !important;
        appearance: textfield !important;
        padding-right: 40px !important;
    }
    
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: inner-spin-button !important;
        appearance: inner-spin-button !important;
        opacity: 1 !important;
        height: 100% !important;
        width: 40px !important;
        cursor: pointer !important;
        background: #f8f9fa !important;
        border-left: 1px solid #ddd !important;
        position: relative !important;
        right: 0 !important;
        top: 0 !important;
    }
    
    /* Стили для мобильных числовых полей со стрелками */
    @media (max-width: 768px) {
        input[type="number"] {
            width: calc(100% - 50px) !important;
            padding-right: 50px !important;
            position: relative !important;
            background-color: white !important;
            -webkit-appearance: textfield !important;
            -moz-appearance: textfield !important;
            appearance: textfield !important;
        }
        
        /* Принудительно показываем стрелки */
        input[type="number"]::-webkit-outer-spin-button,
        input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: inner-spin-button !important;
            appearance: inner-spin-button !important;
            opacity: 1 !important;
            height: 100% !important;
            width: 30px !important;
            cursor: pointer !important;
            background: #f8f9fa !important;
            border-left: 1px solid #dee2e6 !important;
            display: block !important;
            visibility: visible !important;
            pointer-events: auto !important;
            position: absolute !important;
            right: 0 !important;
            top: 0 !important;
            border-radius: 0 4px 4px 0 !important;
        }
        
        /* Если стандартные стрелки не работают, создаем кастомные */
        .mobile-spinner-container {
            position: relative;
            display: inline-block;
            width: 100%;
        }
        
        .mobile-spinner-buttons {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 40px;
            height: 90%;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .mobile-spinner-up,
        .mobile-spinner-down {
            flex: 1;
            border: none;
            background: transparent;
            font-size: 14px;
            color: #007bff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            font-weight: bold;
            transition: background-color 0.2s;
            min-height: 20px;
        }
        
        .mobile-spinner-up:hover,
        .mobile-spinner-down:hover {
            background: #e9ecef;
        }
        
        .mobile-spinner-up:active,
        .mobile-spinner-down:active {
            background: #dee2e6;
        }
    }
    
    /* Убираем стрелки с селекторов */
    .form-group select {
        -webkit-appearance: menulist !important;
        -moz-appearance: menulist !important;
        appearance: menulist !important;
    }
    
    /* Специально для мобильных - убираем кастомные стрелки селекторов */
    @media (max-width: 768px) {
        .form-group select {
            -webkit-appearance: menulist !important;
            -moz-appearance: menulist !important;
            appearance: menulist !important;
            background-image: none !important;
            padding-right: 12px !important;
        }
    }
    
    /* Улучшенные селекторы для мобильных */
    .form-group select {
        -webkit-appearance: menulist !important;
        -moz-appearance: menulist !important;
        appearance: menulist !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        padding-right: 12px !important;
    }
    
    /* Принудительная активация селекторов */
    select:focus,
    select:active,
    select:hover {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
        border-color: #007bff !important;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
        display: block;
    }
    
    /* Кнопки */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        margin-bottom: 10px;
        box-sizing: border-box;
        word-wrap: break-word;
        white-space: normal;
        text-align: center;
        border-radius: 6px;
    }
    
    /* Кнопки с иконками */
    .btn i {
        margin-right: 8px;
    }
    
    /* Динамический блок итоговой стоимости для мобильных */
    .cost-summary.dynamic {
        position: fixed !important;
        padding: 10px 12px !important;
        font-size: 13px;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        overflow: visible !important;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }
    
    .cost-summary.dynamic .cost-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2px !important;
        margin-top: 0 !important;
        padding: 2px 0 !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        border: none !important;
    }
    
    .cost-summary.dynamic .cost-item:last-child {
        font-weight: bold;
        font-size: 14px;
        border-top: 1px solid #e9ecef !important;
        padding-top: 4px !important;
        margin-top: 4px !important;
        margin-bottom: 0 !important;
        line-height: 1.3;
    }
    
    /* Переопределяем общие правила для итогового элемента на мобильных */
    .cost-summary.dynamic .cost-item.total {
        border-top: 1px solid #e9ecef !important;
        border-bottom: none !important;
        font-size: 14px !important;
        margin-top: 4px !important;
        padding-top: 4px !important;
        margin-bottom: 0 !important;
    }
    
    /* Кнопка сворачивания для мобильных */
    .cost-summary.dynamic .collapse-btn {
        position: absolute;
        top: 5px;
        right: 5px;
        background: none;
        border: none;
        font-size: 18px;
        color: #666;
        cursor: pointer;
        padding: 5px;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cost-summary.dynamic .collapse-btn:hover {
        background: rgba(0, 0, 0, 0.1);
    }
    
    /* Скрытое состояние - уезжает вправо */
    .cost-summary.dynamic.collapsed {
        display: none !important;
    }
    
    
    .cost-summary.dynamic.collapsed .cost-items {
        display: none !important;
    }
    
    .cost-summary.dynamic.collapsed .collapse-btn {
        display: none !important;
    }
    
    /* Кнопка разворачивания в свернутом состоянии - НЕ ПЕРЕЗАПИСЫВАЕМ inline стили */
    /* Стили задаются через JavaScript */
    
    
    /* Показанное состояние - ПО УМОЛЧАНИЮ СКРЫТО */
    .cost-summary.dynamic:not(.collapsed) {
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    /* На мобильных устройствах убираем transform */
    @media (max-width: 768px) {
        .cost-summary.dynamic:not(.collapsed) {
            transform: none !important;
        }
    }
    
    /* По умолчанию окно скрыто - только для ПК */
    @media (min-width: 769px) {
        .cost-summary.dynamic {
            transform: translateX(calc(100% - 60px));
        }
    }
    
    /* Список товаров и материалов */
    .item-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px;
        margin-bottom: 6px;
        border-radius: 6px;
    }
    
    /* Первая строка: название и цена */
    .item-row .item-name {
        font-size: 13px;
        margin-bottom: 0;
        font-weight: 500;
        color: #333;
    }
    
    /* Вторая строка: количество и сумма */
    .item-details {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .item-details input[type="number"] {
        width: 40px;
        padding: 8px 3px;
        font-size: 13px;
        min-width: 40px;
        height: 32px;
        box-sizing: border-box;
    }
    
    .item-details span {
        font-size: 11px;
        white-space: nowrap;
    }
    
    .item-total {
        color: #28a745;
        font-weight: bold;
        font-size: 12px;
    }
    
    /* Кнопки удаления в блоках товаров */
    .item-row .btn-danger {
        width: 24px;
        height: 24px;
        padding: 0;
        font-size: 10px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Секция товаров и материалов - вертикальное расположение */
    .form-section .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .form-section .form-row .form-group {
        width: 100% !important;
        flex: none !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .form-section .form-row .form-group input,
    .form-section .form-row .form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 16px !important;
    }
    
    .form-section .form-row .btn {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 12px 15px !important;
        white-space: normal !important;
        text-align: center !important;
        box-sizing: border-box !important;
        font-size: 14px !important;
        display: block !important;
        border-radius: 6px !important;
    }
    
    /* Специальные стили для секции товаров и материалов */
    .add-item-form .item-selection-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .add-item-form .item-selection-row .form-group {
        width: 100% !important;
        flex: none !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .add-item-form .item-selection-row .form-group input,
    .add-item-form .item-selection-row .form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 16px !important;
    }
    
    .add-item-form .item-selection-row .form-group .btn {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 12px 15px !important;
    }
    
    /* Дополнительные расходы - горизонтальное расположение */
    .form-section:nth-of-type(3) .form-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .form-section:nth-of-type(3) .form-row .form-group {
        width: 100% !important;
    }
    
    .form-section:nth-of-type(3) .form-row .btn {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
    
    /* Принудительное переопределение стилей для мобильных */
    .page#sale-form .form-section .form-row,
    .page#edit-sale-form-content .form-section .form-row,
    .page#add-sale-form .form-section .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .page#sale-form .form-section .form-row .form-group,
    .page#edit-sale-form-content .form-section .form-row .form-group,
    .page#add-sale-form .form-section .form-row .form-group {
        width: 100% !important;
        flex: none !important;
    }
    
    .page#sale-form .form-section .form-row .btn,
    .page#edit-sale-form-content .form-section .form-row .btn,
    .page#add-sale-form .form-section .form-row .btn {
        width: 100% !important;
        display: block !important;
    }
    
    /* Универсальные стили для всех форм на мобильных */
    .form-section .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .form-section .form-row .form-group {
        width: 100% !important;
        flex: none !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .form-section .form-row .form-group input,
    .form-section .form-row .form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .form-section .form-row .btn {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Принудительные стили для контейнера */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .page {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Дополнительные расходы */
    .form-section .form-row .form-group input {
        text-align: right;
    }
    
    /* Специальные стили для числовых полей с стрелками */
    #artist_count, #agent_cost, #transport_cost,
    #edit_artist_count, #edit_agent_cost, #edit_transport_cost {
        width: calc(100% - 50px) !important;
        padding-right: 50px !important;
    }
    
    /* Стили для полей количества в блоках товаров */
    .item-details input[type="number"] {
        width: calc(40px - 16px) !important;
        padding-right: 20px !important;
    }
    
    /* Навигационные кнопки */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .page-header .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .form-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .form-section h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Динамический блок для очень маленьких экранов */
    .cost-summary.dynamic {
        padding: 10px 12px !important;
        font-size: 13px;
        height: auto;
        width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }
    
    .cost-summary.dynamic .cost-item {
        font-size: 13px !important;
        margin-bottom: 2px !important;
        padding: 2px 0 !important;
        line-height: 1.3 !important;
    }
    
    .cost-summary.dynamic .cost-item:last-child {
        font-size: 14px;
        padding-top: 4px !important;
        margin-top: 4px !important;
        line-height: 1.3;
    }
    
    /* Товары и материалы */
    .item-row {
        padding: 6px;
        margin-bottom: 4px;
        gap: 4px;
    }
    
    .item-name {
        font-size: 11px;
        margin-bottom: 0;
    }
    
    .item-details {
        gap: 6px;
    }
    
    .item-details input[type="number"] {
        width: 35px;
        padding: 6px 2px;
        font-size: 11px;
        min-width: 35px;
        height: 28px;
        box-sizing: border-box;
    }
    
    .item-details span {
        font-size: 10px;
    }
    
    .item-total {
        font-size: 11px;
    }
    
    /* Кнопки удаления для маленьких экранов */
    .item-row .btn-danger {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
    
    /* Секция товаров и материалов */
    .form-section .form-row {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .form-section .form-row .form-group {
        width: 100%;
        max-width: 100%;
    }
    
    .form-section .form-row .btn {
        width: 100%;
        margin-bottom: 8px;
        padding: 10px 12px;
        font-size: 14px;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    /* Дополнительные расходы для маленьких экранов */
    .form-section:nth-of-type(3) .form-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .form-section:nth-of-type(3) .form-row .form-group {
        width: 100%;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeIn 0.3s ease;
}

/* Секции формы */
.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

/* Строка выбора товаров */
.item-selection-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

/* Кнопка добавления товара */
.item-selection-row .btn {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
    min-width: auto;
}

.item-selection-row .form-group {
    margin-bottom: 0;
}

.item-selection-row .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.item-selection-row .form-group input,
.item-selection-row .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Улучшаем отображение выпадающего списка товаров */
.item-selection-row select {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-selection-row select option {
    padding: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

/* Список сотрудников */
.employees-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.employee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.employee-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.employee-item input[type="number"] {
    width: 100px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

.employee-item input[type="number"].visible {
    display: block;
}

/* Сводка стоимости */
.cost-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cost-item.total {
    border-top: 2px solid #667eea;
    border-bottom: none;
    font-size: 16px;
    margin-top: 10px;
    padding-top: 15px;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-info {
    color: #17a2b8;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для кнопок в заголовке */
.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
