/* ============================================
   Employee Management System - Custom Styles
   ============================================ */

:root {
    --sidebar-width: 250px;
    --primary-color: #4e73df;
    --dark-color: #1e1e2d;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
}

/* Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
    padding: 20px 0;
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-heading {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 5px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--primary-color);
}

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

.sidebar hr {
    border-color: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding-top: 60px;
}

/* Navbar */
.navbar {
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border: none;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
}

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

/* Tables */
.table thead th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

.table tbody td {
    font-size: 14px;
    vertical-align: middle;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 12px;
}

/* Pagination */
.pagination .page-link {
    border: none;
    padding: 8px 16px;
    margin: 0 2px;
    border-radius: 6px !important;
    color: #555;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
}

/* Toast */
.toast-container {
    z-index: 9999;
}

/* Print */
@media print {
    @page {
        margin: 10mm;
        size: A4 portrait;
    }

    body {
        background: #fff !important;
        font-size: 11pt;
        color: #000 !important;
    }

    .sidebar, .navbar, .btn, .btn-group, .no-print, .toast-container, .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 0 !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        border-radius: 4px !important;
        break-inside: avoid;
        margin-bottom: 10mm;
    }

    .card-header {
        background: #f5f5f5 !important;
        border-bottom: 1px solid #ddd !important;
        padding: 6px 10px !important;
    }

    .card-header h5 {
        font-size: 12pt !important;
    }

    .card-body {
        padding: 8px 10px !important;
    }

    .table {
        font-size: 10pt !important;
    }

    .table td {
        padding: 3px 5px !important;
    }

    .badge {
        border: 1px solid #333 !important;
        background: #fff !important;
        color: #000 !important;
        padding: 2px 6px !important;
    }

    .bg-success, .bg-warning, .bg-danger, .bg-info, .bg-primary {
        background: #fff !important;
        color: #000 !important;
    }

    /* Profile header on view page */
    .profile-header .row {
        display: flex !important;
        align-items: center !important;
    }

    .profile-header img,
    .profile-header .rounded-4 {
        max-width: 130px !important;
    }

    .card-header .bi,
    .card-body .bi {
        display: none !important;
    }

    .text-muted {
        color: #555 !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .col-md-6, .col-md-4, .col-md-3, .col-md-2, .col-md-7 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .col-md-2.profile-photo-col {
        width: 30% !important;
        flex: 0 0 30% !important;
        max-width: 30% !important;
        text-align: center !important;
    }

    .col-md-7.profile-info-col {
        width: 70% !important;
        flex: 0 0 70% !important;
        max-width: 70% !important;
    }

    .col-md-3.profile-side-col {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid #eee;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar .nav-link {
        padding: 8px 15px;
        font-size: 13px;
    }

    .sidebar-heading {
        padding: 5px 15px;
    }
}

/* Data Table */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    padding: 6px 12px;
}

/* Alert */
.alert {
    border-radius: 12px;
    border: none;
}

/* Sidebar collapse */
.sidebar .collapse:not(.show) {
    display: none;
}
.sidebar .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
    transition: transform 0.3s;
}
.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Rounded Helpers */
.rounded-4 {
    border-radius: 12px !important;
}

/* Cards inside forms */
.card-header h5 {
    font-size: 16px;
}

/* Photo preview */
#photoPreview {
    border-radius: 8px;
}
