:root {
    --primary-color: #005284;
    --primary-dark: #003d63;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #005284;
    --dark-bg: #1f2937;
    --sidebar-bg: #111827;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --text-dark: #111827;
    --text-muted: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 28px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 20px;
    font-size: 48px;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

/* Main Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 20px;
    background: var(--dark-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-logo {
    margin-bottom: 10px;
}

.sidebar-logo img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background: var(--primary-color);
    color: white;
}

.menu-item i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
}

.menu-section {
    padding: 20px 20px 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .menu-item {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 10px;
    border-radius: 6px;
}

.sidebar-footer .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header */
.header {
    background: white;
    padding: 10px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    font-size: 20px;
    color: var(--text-dark);
    margin: 0;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-info:hover {
    background: var(--light-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.user-info > div {
    line-height: 1.3;
}

.user-info > div > div {
    font-size: 14px;
}

.user-info small {
    font-size: 11px;
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light-bg);
}

.dropdown-item .icon {
    font-size: 16px;
}

/* Content Area */
.content {
    padding: 15px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

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

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th {
    background: var(--light-bg);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tr:hover {
    background: var(--light-bg);
}

/* Badge */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--secondary-color);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 4px 2px;
    background: var(--light-bg);
    border-radius: 3px;
    font-size: 10px;
}

.calendar-day {
    min-height: 60px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-size: 11px;
}

.calendar-day:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 11px;
}

.calendar-employee {
    background: #5b9bd5;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.remove-employee {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-employee:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

/* Calendar Vacation */
.calendar-vacation {
    background: #ffc966;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vacation-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #007bff;
}

.toast.toast-success {
    border-left-color: #28a745;
}

.toast.toast-error {
    border-left-color: #dc3545;
}

.toast.toast-warning {
    border-left-color: #ffc107;
}

.toast.toast-info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: #28a745; }
.toast-error .toast-icon { color: #dc3545; }
.toast-warning .toast-icon { color: #ffc107; }
.toast-info .toast-icon { color: #17a2b8; }

.toast-content {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.toast-hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Responsive toast */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Vacation Calendar with Checkboxes */
.vacation-calendar {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    background: #fafafa;
}

.calendar-header-month {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.vacation-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 4px;
    color: var(--text-muted);
    background: #f0f0f0;
    border-radius: 4px;
}

.calendar-day-empty {
    padding: 8px;
}

.calendar-day-checkbox {
    position: relative;
    padding: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.calendar-day-checkbox:hover {
    background: #f5f5f5;
    border-color: var(--primary-color);
}

.calendar-day-checkbox.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.calendar-day-checkbox.weekend {
    background: #fff3e0;
}

.calendar-day-checkbox.weekend.selected {
    background: #ff9800;
    border-color: #ff9800;
}

.calendar-day-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.calendar-day-checkbox label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
}

.calendar-day-checkbox.selected label {
    color: white;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-flex {
    display: flex;
}

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

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

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }

/* Employee Checkbox List Styles */
.employee-checkbox-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    background-color: #fafafa;
}

.employee-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.employee-checkbox-item:hover:not(.disabled) {
    background-color: #f5f5f5;
    border-color: #2196F3;
}

.employee-checkbox-item.disabled {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
    opacity: 0.7;
    cursor: not-allowed;
}

.employee-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.employee-checkbox-item.disabled label {
    cursor: not-allowed;
}

.employee-checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.employee-checkbox-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.employee-info {
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.employee-checkbox-item.disabled .employee-name {
    color: #888;
}

.employee-status {
    font-size: 12px;
    color: #666;
}

.employee-status.busy {
    color: #f44336;
    font-weight: 500;
}

.btn-remove-shift {
    padding: 4px 10px;
    font-size: 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-remove-shift:hover {
    background-color: #d32f2f;
}

/* Responsive */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Sidebar overlay mode - hidden by default */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        margin-left: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar:not(.sidebar-hidden) {
        transform: translateX(0);
    }
    
    .sidebar.sidebar-hidden {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Mobile header */
    .header {
        padding: 10px 15px;
    }
    
    /* Content padding */
    .content {
        padding: 10px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 8px 5px;
        white-space: nowrap;
    }
    
    /* Calendar */
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        font-size: 11px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-employee {
        font-size: 10px;
        padding: 3px 5px;
        margin-bottom: 2px;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-control,
    .form-select {
        font-size: 14px;
    }
    
    /* Employee list */
    .employee-checkbox-list {
        max-height: 300px;
    }
    
    .employee-checkbox-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn-remove-shift {
        margin-top: 8px;
        width: 100%;
    }
    
    /* Schedule toolbar */
    .schedule-toolbar {
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .toolbar-filters {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .toolbar-filters .form-control {
        width: 100%;
    }
    
    .toolbar-title {
        width: 100%;
        text-align: center;
        font-size: 18px;
        order: -1;
    }
    
    #toggleSidebarBtn {
        order: -2;
    }
    
    /* Schedule container */
    .schedule-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-wrapper {
        padding: 10px;
        max-height: none;
    }
    
    /* Employees sidebar */
    .employees-sidebar {
        width: 100%;
        max-height: 300px;
        order: -1;
    }
    
    /* Employees sidebar винаги видим - премахнат mobile collapsed CSS */
    
    .employees-sidebar-header {
        padding-right: 15px;
    }
    
    .employees-sidebar-header h3 {
        font-size: 16px;
    }
    
    .employee-item {
        padding: 10px;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* Modals */
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Stats cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Calendar header buttons */
    .calendar-header {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .calendar-header button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Sidebar transitions */
.sidebar {
    transition: margin-left 0.3s ease;
}

.main-content {
    transition: margin-left 0.3s ease;
}

/* Logo Preview */
.logo-preview-container {
    margin-top: 20px;
}

.logo-preview {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: var(--light-bg);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview img {
    max-width: 300px;
    max-height: 100px;
    object-fit: contain;
}

.logo-preview .no-logo {
    color: var(--text-muted);
    font-size: 18px;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .col-md-6,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 576px) {
    .content {
        padding: 5px;
    }
    
    .card {
        border-radius: 6px;
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 2px;
    }
    
    .calendar-day-number {
        font-size: 11px;
    }
    
    .calendar-employee {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .employee-name {
        font-size: 9px;
    }
    
    .remove-employee {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Schedule Page - Toggle Sidebar */
.sidebar-hidden {
    margin-left: -260px !important;
}

.sidebar-collapsed {
    margin-left: 0 !important;
    max-width: 100vw !important;
}

/* Schedule Toolbar */
.schedule-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toolbar-filters {
    display: flex;
    gap: 10px;
    flex: 1;
}

.toolbar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
}

/* Schedule Container with Sidebar */
.schedule-container {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calendar-wrapper {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    max-height: calc(100vh - 200px);
}

/* Employees Sidebar */
.employees-sidebar {
    position: relative;
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
}

/* Employees sidebar винаги видим - премахнати collapsed стилове */

.employees-sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.employees-sidebar-header {
    padding: 12px;
    padding-right: 55px;
    border-bottom: 1px solid var(--border-color);
}

.employees-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text-dark);
}

.employees-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Custom scrollbar for employees sidebar */
.employees-sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.employees-sidebar-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.employees-sidebar-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.employees-sidebar-body:hover::-webkit-scrollbar-thumb {
    background: #555;
}

.employee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    margin-bottom: 6px;
    background: var(--light-bg);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.employee-item:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.employee-shifts {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.employee-item .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* Employee shift count colors */
.employee-item.shifts-none {
    opacity: 0.6;
}

.employee-item.shifts-few {
    border-left: 3px solid #4caf50;
}

.employee-item.shifts-medium {
    border-left: 3px solid #ff9800;
}

.employee-item.shifts-many {
    border-left: 3px solid #f44336;
}

/* Calendar Header Adjustments */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-header button {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
}

/* Schedule View Pages */
.schedule-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.schedule-view-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.schedule-calendar-view {
    padding: 20px;
}

.schedule-export-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.schedule-export-header h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 28px;
}

.schedule-export-header h3 {
    margin: 0;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: normal;
}

/* Calendar Day View */
.calendar-day-view {
    min-height: 120px;
    border: 1px solid var(--border-color);
    padding: 8px;
    background: white;
    position: relative;
}

.calendar-day-view.weekend {
    background: #fff5f5;
}

.calendar-day-view.has-shift {
    background: #f0f9ff;
}

.calendar-day-view.has-vacation {
    background: #fff7ed;
}

.calendar-day-view .day-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.calendar-day-view.weekend .day-number {
    color: var(--danger-color);
}

.day-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Shift Badges */
.shift-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.shift-badge.primary {
    background: var(--primary-color);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.shift-badge.office {
    background: #10b981;
    color: white;
}

.shift-badge.vacation {
    background: #f59e0b;
    color: white;
}

/* Colleagues List */
.colleagues-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.colleague-badge {
    padding: 5px 10px;
    background: #5b9bd5;
    color: #ffffff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Schedule Legend */
.schedule-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.primary {
    background: var(--primary-color);
}

.legend-color.colleague {
    background: #e0e7ff;
    border: 1px solid #4338ca;
}

.legend-color.vacation {
    background: #f59e0b;
}

/* Employee Actions in Sidebar */
.employee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.employee-actions {
    display: flex;
    gap: 5px;
}

/* ============================================
   Bootstrap Tabs Support
   ============================================ */

/* Nav Tabs Container */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 1px solid #dee2e6;
}

/* Tab Items */
.nav-item {
    margin-bottom: -1px;
}

/* Tab Links */
.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    background: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
}

.nav-tabs .nav-link.disabled {
    color: #6c757d;
    background-color: transparent;
    border-color: transparent;
    cursor: not-allowed;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Tab Content */
.tab-content {
    width: 100%;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block;
}

/* Fade Animation */
.fade {
    transition: opacity 0.15s linear;
}

.fade:not(.show) {
    opacity: 0;
}

.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.tab-pane.fade.show {
    opacity: 1;
}

.tab-pane.fade.active {
    opacity: 1;
}

/* Show state */
.show {
    display: block !important;
}

/* Confirm Dialog Modal */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
    align-items: center;
    justify-content: center;
}

.confirm-modal.show {
    display: flex !important;
}

.confirm-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    overflow: hidden;
    position: relative;
    margin: auto;
}

.confirm-modal-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.confirm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.confirm-modal-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.confirm-modal-icon.danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirm-modal-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.confirm-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.confirm-modal-body {
    padding: 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

.confirm-modal-footer {
    padding: 20px 24px;
    background: var(--light-bg);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-modal-footer .btn {
    min-width: 100px;
    padding: 10px 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

