:root {
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --sidebar-bg: #4e73df;
    --sidebar-dark: #3a5bbc;
  }
  
  body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
  }
  
  /* Improved sidebar */
  .bg-dark {
    background: var(--sidebar-bg) !important;
    background: linear-gradient(180deg, var(--sidebar-bg) 10%, var(--sidebar-dark) 100%) !important;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 0.35rem;
    margin-bottom: 0.25rem;
  }
  
  .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
  }
  
  .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
  }
  
  /* Cards with gradient borders */
  .border-left-primary {
    border-left: 0.25rem solid var(--primary) !important;
  }
  
  .border-left-success {
    border-left: 0.25rem solid var(--success) !important;
  }
  
  .border-left-info {
    border-left: 0.25rem solid var(--info) !important;
  }
  
  .border-left-warning {
    border-left: 0.25rem solid var(--warning) !important;
  }
  
  .border-left-danger {
    border-left: 0.25rem solid var(--danger) !important;
  }
  
  /* Enhanced cards */
  .card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
  }
  
  .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  /* Improved tables */
  .table {
    margin-bottom: 0;
  }
  
  .table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e3e6f0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6e707e;
    padding: 0.75rem;
  }
  
  .table tbody td {
    padding: 1rem 0.75rem;
    color: #5a5c69;
    vertical-align: middle;
  }
  
  .table-bordered {
    border: 1px solid #e3e6f0;
  }
  
  .table-bordered th,
  .table-bordered td {
    border: 1px solid #e3e6f0;
  }
  
  .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
  }
  
  /* Beautiful buttons */
  .btn {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.35rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
  }
  
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
  }
  
  .btn-success {
    background-color: var(--success);
    border-color: var(--success);
  }
  
  .btn-info {
    background-color: var(--info);
    border-color: var(--info);
  }
  
  .btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
  }
  
  .btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
  }
  
  /* Form controls */
  .form-control {
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
  }
  
  .form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #6e707e;
  }
  
  /* Badges */
  .badge {
    padding: 0.4em 0.65em;
    font-weight: 600;
    font-size: 0.75em;
    border-radius: 0.35rem;
  }
  
  /* Alerts */
  .alert {
    border: none;
    border-radius: 0.35rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 0.25rem solid transparent;
  }
  
  .alert-success {
    background-color: #e6f8f3;
    border-left-color: var(--success);
    color: #117a55;
  }
  
  .alert-danger {
    background-color: #feefef;
    border-left-color: var(--danger);
    color: #be2617;
  }
  
  .alert-info {
    background-color: #e8f4f8;
    border-left-color: var(--info);
    color: #247a86;
  }
  
  .alert-warning {
    background-color: #fff8eb;
    border-left-color: var(--warning);
    color: #b3860b;
  }
  
  /* Custom utilities */
  .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(58, 59, 69, 0.15) !important;
  }
  
  .shadow {
    box-shadow: 0 0.5rem 1rem rgba(58, 59, 69, 0.15) !important;
  }
  
  .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(58, 59, 69, 0.175) !important;
  }
  
  .rounded-lg {
    border-radius: 0.5rem !important;
  }
  
  .text-xs {
    font-size: 0.7rem;
  }
  
  .text-sm {
    font-size: 0.85rem;
  }
  
  .text-lg {
    font-size: 1.1rem;
  }
  
  .text-xl {
    font-size: 1.25rem;
  }
  
  .font-weight-bold {
    font-weight: 700 !important;
  }
  
  /* Status badges */
  .status-badge {
    display: inline-block;
    padding: 0.25em 0.8em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 10rem;
  }
  
  .status-badge-pending {
    background-color: #fff8ec;
    color: #cd9a2a;
    border: 1px solid #f5d7a1;
  }
  
  .status-badge-approved {
    background-color: #e8f4fd;
    color: #2175c2;
    border: 1px solid #a9d2f3;
  }
  
  .status-badge-active {
    background-color: #e6f3ff;
    color: #2952a4;
    border: 1px solid #a4c4f5;
  }
  
  .status-badge-rejected {
    background-color: #feeded;
    color: #c81e1e;
    border: 1px solid #f5c3c1;
  }
  
  .status-badge-completed {
    background-color: #e7f9f1;
    color: #0f8b51;
    border: 1px solid #a9e8cd;
  }
  
  .status-badge-problem {
    background-color: #feeded;
    color: #c81e1e;
    border: 1px solid #f5c3c1;
  }
  
  /* Content container padding */
  .col.py-3 {
    padding: 1.5rem !important;
  }
  
  /* Page header */
  .border-bottom {
    border-bottom: 1px solid #e3e6f0 !important;
  }
  
  /* Dashboard card metrics */
  .h5.mb-0 {
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  /* Login box improvements */
  .login-box {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 2rem rgba(58, 59, 69, 0.2);
  }
  /* Fixed Sidebar Styles */
#menu {
    width: 100%;
}

#menu .nav-link {
    padding: 0.7rem 0.5rem;
    display: flex;
    align-items: center;
    border-radius: 0.35rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
    width: 100%;
}

#menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

#menu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    font-weight: 600;
}

#menu .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
}

#submenu1 {
    padding-left: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

#submenu1 .nav-link {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

#submenu1 .nav-link i {
    font-size: 0.5rem !important;
    margin-right: 0.5rem;
}

.dropdown-menu {
    margin-top: 0.5rem;
    border-radius: 0.35rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-menu .dropdown-item {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Improved mobile sidebar */
@media (max-width: 767.98px) {
    .col-auto.col-md-3.col-xl-2.px-0.bg-dark {
        width: 4.5rem;
    }
    
    #menu .nav-link {
        justify-content: center;
        padding: 0.8rem;
    }
    
    #menu .nav-link i {
        margin-right: 0;
        font-size: 1.3rem;
    }
    
    #submenu1 {
        position: absolute;
        left: 4.5rem;
        top: auto;
        background-color: #3a5bbc;
        border-radius: 0 0.35rem 0.35rem 0;
        box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        min-width: 200px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #submenu1 .nav-link {
        padding: 0.8rem 0.5rem;
        display: flex;
        justify-content: flex-start;
    }
    
    #submenu1 .nav-link span {
        display: inline-block !important;
    }
}

/* Bootstrap 5 toggler for sidebar */
.sidebar-toggler {
    display: none;
}

@media (max-width: 767.98px) {
    .sidebar-toggler {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1030;
        padding: 0.25rem 0.5rem;
        background-color: rgba(78, 115, 223, 0.9);
        color: white;
        border-radius: 0.35rem;
        border: none;
        cursor: pointer;
    }
}