/* Admin Styles - Enhanced */
.admin-body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .dropdown-menu {
    background-color: #343a40;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Dashboard Cards */
.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.25) !important;
    transform: translateY(-2px);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stats Cards */
.stats-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.3) !important;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
    background: linear-gradient(135deg, #00A86B 0%, #008f5a 100%);
    color: white;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
    background: linear-gradient(135deg, #36b9cc 0%, #2596be 100%);
    color: white;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: white;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
    background: linear-gradient(135deg, #e74a3b 0%, #c23321 100%);
    color: white;
}

.border-left-secondary {
    border-left: 0.25rem solid #858796 !important;
    background: linear-gradient(135deg, #858796 0%, #6c757d 100%);
    color: white;
}

.stats-card .text-xs {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.stats-card .h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Admin Table Styles */
.table {
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #5a5c69;
    font-size: 0.875rem;
    background-color: #f8f9fc;
    padding: 1rem;
    border-bottom: 2px solid #e3e6f0;
}

.table td {
    font-size: 0.875rem;
    color: #5a5c69;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e3e6f0;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fc;
    transform: scale(1.01);
}

.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Admin Form Styles */
.form-label {
    font-weight: 600;
    color: #5a5c69;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control {
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #00A86B;
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 107, 0.25);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #858796;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, #00A86B 0%, #008f5a 100%);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #c23321 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #36b9cc 0%, #2596be 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #858796 0%, #6c757d 100%);
    color: white;
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-secondary {
    background: white;
    border: 2px solid;
    color: inherit;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border-color: #4e73df;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #00A86B 0%, #008f5a 100%);
    color: white;
    border-color: #00A86B;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-success {
    background: linear-gradient(135deg, #00A86B 0%, #008f5a 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #c23321 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, #36b9cc 0%, #2596be 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #858796 0%, #6c757d 100%) !important;
}

/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: #f8f9fc;
    transform: translateX(5px);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.1) 0%, rgba(0, 143, 90, 0.1) 100%);
    color: #00A86B;
    border-left: 4px solid #00A86B;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(231, 74, 59, 0.1) 0%, rgba(194, 51, 33, 0.1) 100%);
    color: #e74a3b;
    border-left: 4px solid #e74a3b;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00A86B;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-card .card-body {
    padding: 2rem;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #00A86B 10%, #008f5a 100%);
    min-height: 100vh;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Text Colors */
.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* DataTable Styles */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d1d3e2;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #00A86B !important;
    border-color: #00A86B !important;
    color: white !important;
}

/* Custom Status Indicators */
.status-pending {
    color: #f6c23e;
}

.status-approved {
    color: #00A86B;
}

.status-completed {
    color: #36b9cc;
}

.status-rejected {
    color: #e74a3b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: normal;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-footer {
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Dashboard specific styles */
.dashboard-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #e3e6f0 100%);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.dashboard-stats {
    margin-bottom: 2rem;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.stat-card-container {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

/* Missing utility classes */
.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.small {
    font-size: 0.875rem;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

/* Mobile Navigation Fixes */
@media (max-width: 991px) {
    /* Ensure navbar toggler is visible and clickable */
    .navbar-toggler {
        display: block !important;
        border: 2px solid rgba(255, 255, 255, 0.5);
        padding: 0.5rem;
        z-index: 1000;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Mobile menu styling */
    .navbar-collapse {
        background-color: #343a40;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    }

    /* Stack navigation items vertically on mobile */
    .navbar-nav {
        flex-direction: column !important;
    }

    .navbar-nav .nav-item {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 0.375rem;
        display: block;
        width: 100%;
    }

    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    /* Mobile dropdown styling */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin: 0.5rem 0 0 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background-color: rgba(0, 0, 0, 0.2);
    }

    .navbar-nav .dropdown-item {
        padding: 0.75rem 1.5rem !important;
        color: rgba(255, 255, 255, 0.75) !important;
    }

    .navbar-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
    }

    /* Ensure dropdown toggle works */
    .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .stat-card-container {
        min-width: 180px;
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn-toolbar {
        margin-bottom: 1rem !important;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .stats-card .h5 {
        font-size: 1.25rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .dashboard-header {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .stats-row {
        gap: 0.5rem;
    }

    .stat-card-container {
        min-width: 150px;
        max-width: 100%;
    }

    /* Mobile specific adjustments */
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .login-card .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .table-responsive table {
        font-size: 0.75rem;
    }
    
    .stats-card .h5 {
        font-size: 1.1rem;
    }
    
    .stats-card .text-xs {
        font-size: 0.6rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .row.mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .col-xl-2 {
        margin-bottom: 1rem;
    }
    
    .card-header h6 {
        font-size: 0.9rem;
    }
}