/* Основные настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fff3e0, #ffcc80) !important; /* Кремово-персиковый градиент */
    color: #2d1b00 !important; /* Темно-коричневый текст */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
    padding-top: 80px; /* Отступ для фиксированной шапки */
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Фокус для кнопок и полей ввода */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(255, 140, 0, 0.2), 0 0 0 0.25rem #e65100 !important; /* Оранжевый акцент */
}

/* Шапка (NavBar) */
.navbar {
    background: linear-gradient(90deg, #ff8c00, #e65100) !important; /* Оранжевый градиент */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

    .navbar .navbar-brand {
        font-size: 1.5rem;
        font-weight: 600;
        color: #ffffff !important; /* Белый текст */
    }

    .navbar .navbar-nav .nav-link {
        color: #ffffff !important;
        font-weight: 600;
        text-transform: uppercase;
        padding: 10px 20px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

        .navbar .navbar-nav .nav-link:hover {
            background: rgba(255, 171, 64, 0.3) !important; /* Яркий оранжевый при наведении */
            color: #ffab40 !important;
            transform: translateY(-2px);
        }

.navbar-brand img.logo {
    max-height: 80px;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid #fff5e0 !important; /* Кремовый бордер */
    border-radius: 6px;
}

/* Навигационные элементы */
.nav-item {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-link {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

    .nav-link:hover {
        background: rgba(255, 171, 64, 0.3) !important;
        color: #ffab40 !important;
    }

    .nav-link.text-only {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        color: #ffffff !important;
        text-decoration: none !important;
        cursor: default !important;
    }

        .nav-link.text-only.separator {
            margin: 0 10px !important;
        }

.nav-item a.logout {
    color: #d32f2f !important; /* Темно-красный для выхода */
}

    .nav-item a.logout:hover {
        background: rgba(255, 171, 64, 0.3) !important;
        color: #ffab40 !important;
    }

/* Основной контент */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0px;
    margin-bottom: 120px;
}

.container {
    max-width: 1200px;
    padding: 24px;
    background: rgba(255, 245, 224, 0.9) !important; /* Полупрозрачный кремовый фон */
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d1b00 !important;
    background: linear-gradient(90deg, #ff8c00, #e65100) !important; /* Оранжевый градиент */
    padding: 12px;
    border-radius: 12px;
}

/* Хлебные крошки */
.breadcrumb {
    background: rgba(255, 204, 128, 0.3) !important; /* Полупрозрачный персиковый фон */
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #2d1b00 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 80px;
    position: sticky;
    top: 80px;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb-item > a {
    color: #e65100 !important; /* Темно-оранжевый */
}

    .breadcrumb-item > a:hover {
        color: #ffab40 !important; /* Яркий оранжевый */
    }

.breadcrumb-item.active {
    color: #2d1b00 !important;
}

.breadcrumb-item::before {
    color: #2d1b00 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-right: var(--bs-breadcrumb-item-padding-x);
    color: #2d1b00 !important;
    content: var(--bs-breadcrumb-divider, "/");
}

/* Контейнеры */
.text-container {
    background: rgba(255, 204, 128, 0.2) !important;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.main-section-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.section-container {
    background: rgba(255, 245, 224, 0.9) !important;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Изображения */
.img-block {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    border: 2px solid #fff5e0 !important; /* Кремовый бордер */
    transition: transform 0.3s ease;
}

    .img-block:hover {
        border-color: #ffab40 !important; /* Яркий оранжевый */
        transform: scale(1.03);
    }

/* Карточки сотрудников */
.employees-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.employee-card {
    margin-bottom: 20px;
    text-align: center;
}

    .employee-card .img-block {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        border: 3px solid #ff8c00 !important; /* Оранжевая рамка */
        margin-bottom: 15px;
    }

        .employee-card .img-block:hover {
            border-color: #e65100 !important;
        }

.card {
    background: rgba(255, 245, 224, 0.9) !important;
    color: #2d1b00 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .card:hover {
        transform: scale(1.03);
    }

.card-title, .card-text {
    color: #2d1b00 !important;
}

/* Поля ввода */
input[type="text"],
input[type="email"],
input[type="password"],
textarea.form-input,
input[type="file"].form-input,
.form-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(230, 81, 0, 0.4) !important;
    background: rgba(255, 204, 128, 0.2) !important;
    border-radius: 6px !important;
    font-size: 1rem;
    color: #2d1b00 !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    textarea.form-input:focus,
    input[type="file"].form-input:focus,
    .form-input:focus {
        background: rgba(255, 204, 128, 0.3) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        border-color: #ff8c00 !important;
    }

    .form-input option {
        background: rgba(255, 245, 224, 0.9) !important;
        color: #2d1b00 !important;
    }

textarea.form-input {
    resize: vertical;
}

/* Чекбоксы */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .form-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: #ff8c00 !important; /* Оранжевый акцент */
        cursor: pointer;
    }

/* Кнопки */
button, .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
    background: #ff8c00 !important; /* Оранжевый фон */
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

    button:hover, .btn:hover {
        transform: translateY(-3px);
        background: #e65100 !important; /* Темно-оранжевый */
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

    button:active, .btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

.btn-primary {
    background: #ff8c00 !important;
    color: #ffffff !important;
}

    .btn-primary:hover {
        background: #e65100 !important;
        transform: scale(1.05);
    }

.btn-secondary {
    background: rgba(255, 204, 128, 0.2) !important;
    color: #2d1b00 !important;
}

    .btn-secondary:hover {
        background: rgba(255, 204, 128, 0.3) !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

.btn-danger {
    background: #d32f2f !important; /* Темно-красный */
    color: #ffffff !important;
}

    .btn-danger:hover {
        background: #b71c1c !important;
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

/* Таблицы */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-size: 1rem;
    background: rgba(255, 245, 224, 0.9) !important;
    border-radius: 8px;
    overflow: hidden;
    color: #2d1b00 !important;
}

    .table th,
    .table td {
        padding: 10px 12px;
        text-align: center;
        border-bottom: 1px solid rgba(230, 81, 0, 0.3) !important;
        border-right: 1px solid rgba(230, 81, 0, 0.3) !important;
    }

    .table th {
        background: rgba(255, 204, 128, 0.3) !important;
        font-weight: 600;
    }

        .table th:last-child,
        .table td:last-child {
            border-right: none;
        }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background: rgba(230, 81, 0, 0.1) !important;
    }

.table-body {
    background: rgba(255, 245, 224, 0.9) !important;
}

/* Статусы */
.status {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #ffffff !important;
}

    .status.available {
        background: #2e7d32 !important; /* Темно-зеленый */
    }

    .status.unavailable {
        background: #d32f2f !important; /* Темно-красный */
    }

/* Формы */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .input-field label {
        width: 150px;
        text-align: right;
        color: #2d1b00 !important;
    }

/* Модальные окна */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 245, 224, 0.9) !important;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    color: #2d1b00 !important;
}

    .modal-content h4 {
        margin-top: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

/* Пагинация */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.custom-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    background: #ff8c00 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

    .pagination-item:hover:not(.disabled) {
        transform: translateY(-3px);
        background: #e65100 !important;
    }

    .pagination-item.active {
        background: #ffab40 !important; /* Яркий оранжевый */
        box-shadow: 0 4px 10px rgba(255, 171, 64, 0.4);
    }

    .pagination-item.disabled {
        background: #999999 !important;
        cursor: not-allowed;
        box-shadow: none;
    }

/* Иконки действий */
.action-icons {
    display: flex;
    gap: 8px;
}

.action-icon {
    color: #2d1b00 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .action-icon:hover {
        color: #ff8c00 !important;
    }

.view-icon {
    color: #0288d1 !important; /* Темно-синий */
}

    .view-icon:hover {
        color: #ff8c00 !important;
    }

.edit-icon {
    color: #2e7d32 !important; /* Темно-зеленый */
}

    .edit-icon:hover {
        color: #ff8c00 !important;
    }

.delete-icon {
    color: #d32f2f !important; /* Темно-красный */
}

    .delete-icon:hover {
        color: #ff8c00 !important;
    }

/* Большие поля ввода */
.form-input-lg {
    font-size: 1.2rem;
    padding: 20px;
    height: auto;
}

textarea.form-input-lg {
    resize: vertical;
    font-size: 1.2rem;
}

/* Футер */
footer {
    background: linear-gradient(90deg, #ff8c00, #e65100) !important;
    color: #ffffff !important;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 171, 64, 0.4);
}

    footer.text-muted {
        color: #ffffff !important;
    }

    footer p {
        margin: 0;
        font-size: 0.9rem;
        color: #ffffff !important;
    }

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 16px;
    }

    main {
        margin-top: 60px;
    }

    .input-field {
        flex-direction: column;
        align-items: flex-start;
    }

        .input-field label {
            width: auto;
            text-align: left;
        }

    .employee-card .img-block {
        width: 120px;
        height: 120px;
    }

    .page-title {
        font-size: 1.5rem;
        padding: 8px;
    }
}

@media (max-width: 640px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

        .navbar-brand img.logo {
            max-height: 60px;
        }

    .img-block {
        max-width: 100%;
    }
}
