/* Основные стили для GRAFEEN - БЕЗ АНИМАЦИЙ */
* {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #e9ecef;
}

/* Отключаем все анимации Bootstrap */
.fade {
    transition: none !important;
    opacity: 1 !important;
}

.collapse {
    transition: none !important;
    height: auto !important;
    display: block !important;
}

.collapsing {
    transition: none !important;
    height: auto !important;
}

/* Отключаем анимации для всех возможных элементов */
.btn, .nav, .card, .modal, .alert, .dropdown, .tooltip, .popover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-weight: 500;
}

h3 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Навигация */
nav {
    margin-bottom: 30px;
    text-align: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

nav a {
    display: inline-block;
    margin: 5px;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

nav a:hover {
    background-color: #0056b3;
    color: white !important;
}

nav a.active {
    background-color: #0056b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: white !important;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

tr:hover {
    background-color: #f8f9fa;
}

tr:nth-child(even) {
    background-color: #fdfdfe;
}

/* Сообщения */
.empty-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

/* Карточки */
.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.18);
}

.card h3 {
    margin-top: 0;
    color: #007bff;
    font-weight: 500;
}

.card p {
    color: #6c757d;
    margin-bottom: 0;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    color: white !important;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    color: white !important;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    color: white !important;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white !important;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.form-control-sm {
    padding: 8px;
    font-size: 14px;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* Уведомления */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Панели */
.panel {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.panel-header {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

/* Flex утилиты */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

/* Grid утилиты */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gap-4 {
    gap: 15px;
}

/* Отступы */
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.ml-3 { margin-left: 15px; }

.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }
.mr-3 { margin-right: 15px; }

/* Стили для страницы отгулов */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compact-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 12px;
    border-left: 3px solid transparent;
}

.compact-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.compact-item[data-type="Б"] {
    border-left-color: #dc3545;
}

.compact-item[data-type="Р"] {
    border-left-color: #17a2b8;
}

.compact-item[data-type="О"] {
    border-left-color: #28a745;
}

.compact-item[data-type="Д"] {
    border-left-color: #ffc107;
}

.item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.employee-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 11px;
    color: white;
}

.type-sick {
    background-color: #dc3545;
}

.type-work {
    background-color: #17a2b8;
}

.type-day-off {
    background-color: #28a745;
}

.type-personal {
    background-color: #ffc107;
    color: #212529;
}

.center-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    font-size: 0.85rem;
}

.date-info, .time-info, .comment-info {
    color: #495057;
}

.comment-info {
    font-style: italic;
    color: #6c757d;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.created-date {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
}

.actions {
    display: flex;
    gap: 4px;
}

.btn-edit, .btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
}

.btn-edit {
    color: #007bff;
}

.btn-edit:hover {
    background-color: #e6f3ff;
}

.btn-delete {
    color: #dc3545;
}

.btn-delete:hover {
    background-color: #ffe6e6;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.empty-icon {
    color: #6c757d;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.stat-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
    font-size: 0.95rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.type-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

/* Стили для редактора графиков */
.week-navigation {
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.week-navigation a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.week-navigation span {
    font-weight: bold;
    font-size: 14px;
}

.week-navigation button {
    padding: 6px 12px;
    font-size: 13px;
}

.day-card {
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.day-header {
    background-color: #007bff;
    color: white;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.day-content {
    padding: 8px;
    /* Убираем ограничение по высоте для отображения полного списка без прокрутки */
    /* max-height: 350px;
    overflow-y: auto; */
}

.time-slot {
    margin-bottom: 8px;
    padding: 6px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.add-employee-btn {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 5px;
}

.time-slot-title {
    font-weight: bold;
    font-size: 12px;
    min-width: 70px;
    flex-shrink: 0;
}

.employees-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
}

.employee-item {
    padding: 2px 5px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 10px;
    color: white;
    font-weight: 500;
}

/* Разные цвета для сотрудников в одном слоте */
.employee-item:nth-child(1) {
    background: linear-gradient(135deg, #007bff, #0056b3); /* Синий */
}

.employee-item:nth-child(2) {
    background: linear-gradient(135deg, #28a745, #1e7e34); /* Зеленый */
}

.employee-item:nth-child(3) {
    background: linear-gradient(135deg, #ffc107, #e0a800); /* Желтый */
}

.employee-item:nth-child(4) {
    background: linear-gradient(135deg, #dc3545, #c82333); /* Красный */
}

.employee-item:nth-child(5) {
    background: linear-gradient(135deg, #6f42c1, #59359a); /* Фиолетовый */
}

.employee-item-edit {
    margin-bottom: 2px;
    padding: 2px 4px;
    background-color: #e9ecef;
    border-radius: 3px;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.employee-item-edit span {
    white-space: nowrap;
}

.employee-item-edit .remove-employee-btn {
    font-size: 9px;
    padding: 1px 4px;
}

/* Стили для модального окна выбора сотрудников */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    transition: none !important;
}

.modal-dialog {
    position: relative;
    margin: 10% auto;
    width: 80%;
    max-width: 600px;
    transition: none !important;
    transform: none !important;
}

.modal-content {
    background-color: #fff;
    border: 1px solid #888;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #495057;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    text-align: right;
}

.modal.fade .modal-dialog {
    transition: none !important;
    transform: none !important;
}

.modal.show .modal-dialog {
    transform: none !important;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.form-actions-center {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-slots {
    padding: 10px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 11px;
}

.empty-slot {
    padding: 2px 5px;
    background-color: #e9ecef;
    border-radius: 2px;
    color: #6c757d;
    font-style: italic;
    font-size: 10px;
}

.debug-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.modal-actions {
    text-align: right;
}

.modal-actions button {
    margin-left: 10px;
}

/* Дополнительные утилиты */
.btn-link {
    color: #007bff;
    text-decoration: none;
    display: inline-block;
}

.btn-link:hover {
    text-decoration: underline;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-1 {
    margin-bottom: 5px;
}

.mr-0 {
    margin-right: 0;
}

.d-inline {
    display: inline;
}

.mb-0 {
    margin-bottom: 0;
}

.help-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.help-section h3 {
    margin-top: 0;
    color: #495057;
}

.help-section p {
    margin-bottom: 10px;
}

.copy-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.copy-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

.small-buttons {
    display: flex;
    font-size: 12px;
}

.small-buttons button {
    margin-right: 5px;
    padding: 2px 6px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.small-buttons button:last-child {
    margin-right: 0;
    background-color: #6c757d;
}

.save-button-container {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.center-buttons {
    text-align: center;
    margin-top: 15px;
}

.center-buttons a {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.center-buttons a:last-child {
    margin-right: 0;
    background-color: #007bff;
}

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

.page-header h2 {
    margin: 0;
    font-size: 20px;
}

.page-header a {
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}

.form-container {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-container-center {
    max-width: 600px;
    margin: 0 auto;
}

.info-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.info-section p {
    margin-bottom: 5px;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section em {
    font-size: 0.9em;
    color: #6c757d;
}

.schedule-grid {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}


/* Адаптивность для маленьких экранов */
@media (max-width: 1200px) {
    .schedule-grid .grid,
    .view-schedule-grid .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .schedule-grid .grid,
    .view-schedule-grid .grid {
        grid-template-columns: 1fr;
    }
}

.schedule-grid .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Стили для режима одного дня */
.schedule-grid.single-day .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.view-schedule-grid .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.view-schedule-grid .day-header {
    padding: 4px 8px;
    font-size: 12px;
}

.view-schedule-grid .day-content {
    padding: 5px;
    /* Убираем ограничение по высоте для отображения полного списка без прокрутки */
    /* max-height: 300px;
    overflow-y: auto; */
}

.view-schedule-grid .time-slot {
    margin-bottom: 3px;
    padding: 3px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-schedule-grid .time-slot-title {
    font-size: 11px;
    min-width: 70px;
    flex-shrink: 0;
}

.view-schedule-grid .employees-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
}

.view-schedule-grid .employee-item {
    padding: 1px 4px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 10px;
    color: white;
    font-weight: 500;
}

/* Разные цвета для сотрудников в одном слоте для страницы просмотра */
.view-schedule-grid .employee-item:nth-child(1) {
    background: linear-gradient(135deg, #007bff, #0056b3); /* Синий */
}

.view-schedule-grid .employee-item:nth-child(2) {
    background: linear-gradient(135deg, #28a745, #1e7e34); /* Зеленый */
}

.view-schedule-grid .employee-item:nth-child(3) {
    background: linear-gradient(135deg, #ffc107, #e0a800); /* Желтый */
}

.view-schedule-grid .employee-item:nth-child(4) {
    background: linear-gradient(135deg, #dc3545, #c82333); /* Красный */
}

.view-schedule-grid .employee-item:nth-child(5) {
    background: linear-gradient(135deg, #6f42c1, #59359a); /* Фиолетовый */
}

.view-schedule-grid .empty-slot {
    padding: 1px 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    color: #6c757d;
    font-style: italic;
    font-size: 10px;
}

.view-schedule-grid .no-slots {
    padding: 6px;
    font-size: 11px;
}

/* ГЛОБАЛЬНОЕ ОТКЛЮЧЕНИЕ ВСЕХ АНИМАЦИЙ И ПЕРЕХОДОВ */
* {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

/* Отключение всех анимаций Bootstrap */
.modal.fade .modal-dialog {
    transform: none !important;
    transition: none !important;
}

.modal.show .modal-dialog {
    transform: none !important;
    transition: none !important;
}

.fade {
    opacity: 1 !important;
    transition: none !important;
}

.collapse {
    transition: none !important;
    height: auto !important;
    display: block !important;
}

.collapsing {
    transition: none !important;
}

/* Отключение hover-эффектов */
:hover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Стили для типов смен */
.action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.action-buttons .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.color-badge {
    display: inline-block;
    min-width: 80px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid rgba(0, 0, 0, 0.1);
}