
@import '@fortawesome/fontawesome-free/css/all.min.css';
@import 'select2/dist/css/select2.css';
 
:root {
    --topbar-height: 60px;
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --sidebar-width: 240px;
    --navbar-height: 70px;
}

body {
    zoom: 0.9; /* 90% scale */
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    overflow-x: hidden;
    font-size: 14px !important;
}
 
/* Sidebar Styles */
#sidebarMenu {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    height: calc(100vh - var(--topbar-height));
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Improve visibility of input fields */
.form-control, .form-select {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 0.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: #083478;
    box-shadow: 0 0 0 0.2rem rgba(8, 52, 120, 0.25);
}

.sidebar-sticky {
    padding: 1rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    color: #4b5563 !important;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color) !important;
}

.nav-link i {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
}

/* Submenu Styles */
.submenu {
    margin-top: 0.25rem;
}

.submenu .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Content Area */
.content-wrapper {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin 0.3s ease;
}

/* User Dropdown */
.user-dropdown {
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #4b5563;
}

/* Cards and Content */
.card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: transparent;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-danger {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
}

/* Utilities */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Animations */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 200ms ease-in;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 200ms ease-out;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow-x: auto;
    /* display: block; */
    
}

.table th, .table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
}


.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #083478;
    color: #ffffff;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table select {
    width: 100%;
    min-width: 150px; /* Adjust this value as needed to ensure full content display */
    max-width: 100%; /* Ensure it doesn't exceed the table cell width */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Add ellipsis for overflow text */
}

.table input[type="number"] {
    width: 10ch; /* Allows space for 10 digits */
    max-width: 100%; /* Prevents overflow */
}

.page-title {
    color: #083478;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #083478;
}

/* Input Fields */
input[type="text"], input[type="number"], select, textarea {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-size: 1rem;
    color: #495057;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%; /* Ensure full width */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(38, 99, 235, 0.25);
}

select {
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
}
/* Add any custom Select2 styles at the end of the file */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

#search-results-container {
    max-height: 300px;
    overflow-y: auto;
}

.search-result {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background-color: #e7e7ec;
}

/* global loader */
#global-loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    z-index: 9999;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Enhanced Table Responsiveness */
.table-responsive {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Scroll indicators */
.table-responsive::before,
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.table-responsive::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
    opacity: 0;
}

.table-responsive::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    opacity: 1;
}

.table-responsive.scrolled-left::before {
    opacity: 1;
}

.table-responsive.scrolled-right::after {
    opacity: 0;
}

/* Enhanced table styling */
.enhanced-table {
    margin-bottom: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.enhanced-table thead th {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: none;
    font-weight: 600;
    color: #374151;
    padding: 16px 12px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.enhanced-table tbody td {
    padding: 12px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    vertical-align: middle;
}

.enhanced-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Sticky first column for important data */
.table-sticky-first .enhanced-table th:first-child,
.table-sticky-first .enhanced-table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.table-sticky-first .enhanced-table thead th:first-child {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    z-index: 2;
}

/* Scroll buttons */
.table-scroll-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.table-scroll-controls.left {
    left: 10px;
}

.table-scroll-controls.right {
    right: 10px;
}

.scroll-btn {
    background: rgba(59, 130, 246, 0.9);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-btn:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.1);
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Column toggle controls */
.column-controls {
    margin-bottom: 15px;
}

.column-toggle {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
}

.column-toggle input[type="checkbox"] {
    margin-right: 5px;
}

.column-toggle label {
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

/* Hidden columns */
.column-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .enhanced-table thead th,
    .enhanced-table tbody td {
        padding: 8px 6px;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        border-radius: 0;
        margin: 0 -15px;
    }
}
@media (max-width: 991.98px) {
    #sidebarMenu {
        transform: translateX(-100%);
    }
    #sidebarMenu.show {
        transform: translateX(0);
    }
    .content-wrapper {
        margin-left: 0 !important;
    }
}

