/* ✅ Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures full height for proper footer placement */
}
/* ✅ Remove Extra Default Body Margins */
body {
    margin: 0;
    padding: 0;
}

/* ✅ Ensure Content Does Not Overlap with Fixed Header & Footer */
.wrapper {
    flex: 1;
    padding-top: 80px; /* Adjusted for fixed navbar */
    padding-bottom: 40px; /* Prevents footer overlap */
}

/* ✅ Fixed Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #007bff;
    padding: 10px 0;
}

.navbar .navbar-brand {
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.navbar .navbar-brand img {
    margin-right: 10px;
    height: 40px;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #f8f9fa !important;
}

/* ✅ Fixed Footer - Vertically Centered */
/* ✅ Fixed Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #343a40;
    color: white;
    text-align: center;
    font-size: 12px;
    line-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ✅ Remove default paragraph margin inside the footer */
footer p {
    margin: 0;
    padding: 0;
}

/* ✅ Dashboard Spacing */
.dashboard-container {
    padding: 40px 20px; /* ✅ Adds spacing top, bottom, left, and right */
    max-width: 1100px; /* ✅ Ensures the dashboard is not too wide */
    margin: auto; /* ✅ Centers the content */
}

/* ✅ Dashboard Grid Layout */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ✅ Dashboard Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    text-align: center;
    border-left: 5px solid #000000;
}

.card:hover {
    transform: scale(1.05);
}

.card h3 {
    font-size: 18px;
    color: #555;
    margin-bottom: 10px;
}

.card .value {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* ✅ Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

/* ✅ Button Colors */
.btn-primary {
    background: #007bff;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #a71d2a;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #1e7e34;
}

/* ✅ Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

table thead {
    background: #007bff;
    color: white;
}

table thead th {
    padding: 12px;
    text-align: left;
}

table tbody tr {
    border-bottom: 1px solid #ddd;
}

table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

table tbody tr:hover {
    background: #e9ecef;
}

table tbody td {
    padding: 12px;
    color: #333;
}

/* ✅ Form Styling */
form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ✅ Input Fields */
input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* ✅ Form Labels */
label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* ✅ Sidebar Navigation */
.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    background: #343a40;
    color: white;
    padding-top: 20px;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    background: #007bff;
}



/* ✅ Mobile-Friendly Design */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .navbar {
        position: fixed;
        top: 0;
        width: 100%;
    }

    .wrapper {
        padding-top: 60px; /* Adjust for fixed navbar */
    }
}

/* ✅ Custom Colors for Cards */
.bg-orange {
    background-color: #fd7e14 !important; /* Bootstrap Orange */
    color: white !important;
}

.bg-purple {
    background-color: #6f42c1 !important; /* Bootstrap Purple */
    color: white !important;
}

.bg-teal {
    background-color: #20c997 !important; /* Bootstrap Teal */
    color: white !important;
}

.bg-pink {
    background-color: #d63384 !important; /* Bootstrap Pink */
    color: white !important;
}

.bg-lightgray {
    background-color: #adb5bd !important; /* Light Gray */
    color: white !important;
}

/* ✅ Custom Shadows for Cards */

/* Orange Shadow */
.shadow-orange {
    box-shadow: 0px 4px 10px rgba(253, 126, 20, 0.5) !important; /* Adjust opacity */
}

/* Blue Shadow */
.shadow-blue {
    box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.5) !important;
}

/* Green Shadow */
.shadow-green {
    box-shadow: 0px 4px 10px rgba(40, 167, 69, 0.5) !important;
}

/* Red Shadow */
.shadow-red {
    box-shadow: 0px 4px 10px rgba(220, 53, 69, 0.5) !important;
}

/* Yellow Shadow */
.shadow-yellow {
    box-shadow: 0px 4px 10px rgba(255, 193, 7, 0.5) !important;
}


/* ✅ Make table responsive */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling */
    }

    .table {
        width: 100%;
        min-width: 600px; /* Prevents text from shrinking too much */
        white-space: nowrap; /* Prevents text from wrapping inside cells */
    }

    .table th, .table td {
        font-size: 14px; /* Smaller font for mobile */
        padding: 8px; /* Adjust padding for smaller screens */
    }

    .table thead {
        font-size: 14px;
    }
}

/* ✅ Match Select2 dropdown to input fields */
.select2-container .select2-selection--single {
    height: 40px;  /* ✅ Match input height */
    padding: 8px;  /* ✅ Match input padding */
    border: 1px solid #ccc; /* ✅ Match border */
    border-radius: 5px; /* ✅ Match border radius */
    font-size: 14px; /* ✅ Match font size */
}

/* ✅ When Select2 is focused */
.select2-container--default .select2-selection--single:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* ✅ Adjust the text inside Select2 dropdown */
.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 10px;
    line-height: 38px; /* ✅ Match text alignment */
    font-size: 14px;
}

/* ✅ Adjust the dropdown arrow */
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px;
}


/* ✅ General Flash Message Styling */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ✅ Success Message */
.alert-success {
    background-color: #d4edda;  /* Light green */
    color: #155724;  /* Dark green text */
    border-left: 5px solid #28a745;  /* Stronger left border */
}

/* ✅ Error Message */
.alert-danger {
    background-color: #f8d7da;  /* Light red */
    color: #721c24;  /* Dark red text */
    border-left: 5px solid #dc3545;  /* Stronger left border */
}

/* ✅ Warning Message */
.alert-warning {
    background-color: #fff3cd;  /* Light yellow */
    color: #856404;  /* Dark yellow text */
    border-left: 5px solid #ffc107;  /* Stronger left border */
}

/* ✅ Info Message */
.alert-info {
    background-color: #d1ecf1;  /* Light blue */
    color: #0c5460;  /* Dark blue text */
    border-left: 5px solid #17a2b8;  /* Stronger left border */
}

/* ✅ Close Button */
.alert .btn-close {
    background: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
    border: none;
}
