/* static/css/style.css | A.Grachev */
/* ===== ОБЩИЕ СТИЛИ =====*/
:root {
    --sidebar-width: 260px;
    --navbar-height: 56px;
    /* colors */
    --primary-color: #0d6efd;
    --danger-color: #dc3545;
    --success-color: #198754;
    --warning-color: #ffc107;
    --bg-light: #f8f9fa;
    --text-muted: #6c757d;
}

body {
    padding-top: var(--navbar-height);
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== САЙДБАР ===== */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--sidebar-width);
    padding: 20px 0;
    background-color: #212529;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: transform 0.3 ease;
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 12px;
    width: 22px;
    text-align: center;
}

.sidebar .nav-link .badge {
    float: right;
    margin-top: 2px;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: calc(100vh - var(--navbar-height));
}

/* ===== КАРТОЧКИ ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 24px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* ===== ТАБЛИЦЫ ===== */
.table {
    font-size: 0.95rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    background-color: var(--bg-light);
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

.table .actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ===== СТАТУСЫ (БЭЙДЖИ) ===== */
.badge-status {
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
}

.badge-status.active {
    background-color: #d1e7dd;
    color: #0a3622;
}

.badge-status.vacation {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-status.sick {
    background-color: #f8d7da;
    color: #58151c;
}

.badge-status.fired {
    background-color: #e2e3e5;
    color: #41464b;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-header {
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        display: none;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}

@media (min-width: 769px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

/* ===== УТИЛИТЫ ===== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-highlight:hover {
    background-color: rgba(13, 110, 253, 0.05);
    cursor: pointer;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ===== ФОРМЫ ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.required-field::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumb {
    background: transparent;
    padding: 0 0 16px 0;
    margin: 0;
    font-size: 0.9rem;
}