body {
    font-family: 'Montserrat', var(--font-regular, Arial, sans-serif);
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #212529;
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e3e6;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    margin-right: 1rem;
}

.header-title {
    color: #000;
    font-weight: 400;
    font-size: 1.8em;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 0.5rem;
    border: 1px solid #e3e3e6;
}

.user-info .user-role {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.user-info .user-name {
    font-weight: 500;
    color: #212529;
}

.user-info .btn-outline-danger {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Main Content Layout */
.main-content {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px - 60px); /* Account for footer */
    background: url('/src/background2.jpg') no-repeat center center;
    background-size: cover;
}

/* Footer */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #414042;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
}

.footer-content {
    text-align: center;
}

.footer-content span {
    color: #fff;
    text-decoration: none;
}

#navigationContainer {
    width: 240px;
    min-width: 200px;
    min-height: 100%;
    z-index: 1;
    position: relative;
}

#navigationContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.2);
    backdrop-filter: blur(2px);
    z-index: -1;
}

#contentContainer {
    flex: 1;
    min-width: 0;
    background: #f8f9fa;
    padding: 2rem;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', var(--font-bold, Arial, sans-serif);
    margin-bottom: 1rem;
}

p {
    font-family: 'Montserrat', var(--font-regular, Arial, sans-serif);
    margin-bottom: 1rem;
}

button {
    font-family: 'Montserrat', var(--font-bold, Arial, sans-serif);
}

input, select, textarea {
    font-family: 'Montserrat', var(--font-regular, Arial, sans-serif);
}

/* Responsive Design */
@media (max-width: 900px) {
    #navigationContainer {
        width: 60px;
        min-width: 60px;
    }
    .header-content {
        padding: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .table .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile-specific table adjustments */
    .user-container .table,
    .history-container .table {
        min-width: 1000px; /* Smaller minimum width on mobile */
    }
    
    .user-container .table th,
    .user-container .table td,
    .history-container .table th,
    .history-container .table td {
        min-width: 100px; /* Smaller minimum width on mobile */
        padding: 0.5rem 0.25rem;
    }
    
    /* Actions column (first column) on mobile */
    .user-container .table th:first-child,
    .user-container .table td:first-child,
    .history-container .table th:first-child,
    .history-container .table td:first-child {
        min-width: 150px; /* Smaller actions column on mobile */
    }
    
    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
}

/* Enhanced button styles */
.btn-primary {
    color: #fff;
    background-color: #2563eb;
    border-color: #2563eb;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #174ea6;
    border-color: #174ea6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: #2563eb;
    border-color: #2563eb;
    transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover {
    background-color: #e3eefd;
    color: #174ea6;
    border-color: #174ea6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    transition: all 0.2s ease-in-out;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Container and Card Styles */
.content-panel,
.system-container,
.form-container,
.status-container,
.excel-container {
    background-color: rgba(255,255,255,0.65);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(2px);
}

.card {
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    background-color: #495057;
    color: #fff;
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 400;
}

.card-header h5 {
    margin: 0;
    color: #fff;
    font-weight: 400;
}

.card-body {
    padding: 1.5rem;
}

/* Table Styles */
.table-responsive {
    background-color: white;
    border-radius: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table thead th {
    background-color: #adb5bd;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #fff;
    padding: 1rem 0.75rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
}

.table tbody tr:hover {
    background-color: rgba(128, 131, 148, 0.05);
    transition: background-color 0.2s ease;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #e3eefd;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(128, 131, 148, 0.05);
}

.table .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

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

/* User table specific styles for better horizontal scrolling */
.user-container .table-responsive,
.history-container .table-responsive {
    min-width: 100%;
    position: relative;
}

.user-container .table,
.history-container .table {
    min-width: 1400px; /* Ensure table has minimum width to trigger horizontal scroll */
    width: 100%;
}

.user-container .table th,
.user-container .table td,
.history-container .table th,
.history-container .table td {
    white-space: nowrap; /* Prevent text wrapping in cells */
    min-width: 120px; /* Minimum width for each column */
    padding: 0.75rem 0.5rem;
}

/* Actions column (first column) styling */
.user-container .table th:first-child,
.user-container .table td:first-child,
.history-container .table th:first-child,
.history-container .table td:first-child {
    min-width: 200px; /* Actions column needs more space for buttons */
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* Ensure sticky positioning works properly */
.user-container .table-responsive,
.history-container .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Fix sticky positioning for striped tables */
.user-container .table-striped tbody tr:nth-of-type(odd) td:first-child,
.history-container .table-striped tbody tr:nth-of-type(odd) td:first-child {
    background: #e3eefd; /* Match the striped row background */
}

.user-container .table-striped tbody tr:nth-of-type(even) td:first-child,
.history-container .table-striped tbody tr:nth-of-type(even) td:first-child {
    background: white; /* Match the even row background */
}

/* Hover effect for sticky actions column */
.user-container .table tbody tr:hover td:first-child,
.history-container .table tbody tr:hover td:first-child {
    background: rgba(128, 131, 148, 0.05) !important; /* Match hover background */
}

/* Pagination styles */
.pagination .page-link {
    color: #2563eb;
    border-color: #dee2e6;
    transition: all 0.2s ease-in-out;
}

.pagination .page-link:hover {
    background-color: #e3eefd;
    border-color: #2563eb;
    color: #174ea6;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Pagination controls container */
#paginationControls {
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    backdrop-filter: blur(2px);
}

/* Ensure horizontal scrollbar is always visible when needed */
.user-container .table-responsive::-webkit-scrollbar {
    height: 8px;
}

.user-container .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.user-container .table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.user-container .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar styles */
.user-container .table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Add a subtle shadow to indicate scrollable content */
.user-container .table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.user-container .table-responsive.scrollable::after {
    opacity: 1;
}

/* Scroll indicator styles */
.scroll-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* Form Styles */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #808394;
    box-shadow: 0 0 0 0.2rem rgba(128, 131, 148, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.input-group {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #e3eefd;
    color: #2563eb;
    border-color: #2563eb;
    border-left: 4px solid #0dcaf0;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #0f5132;
    border-left: 4px solid #198754;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #842029;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
    border-left: 4px solid #ffc107;
}

/* Utility Styles */
.mt-2 a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    font-size: 0.875rem;
}

.mt-2 a:hover {
    color: #495057;
    text-decoration: underline;
}

.results-container {
    margin-top: 1.5rem;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background-color: #198754;
}

.status-inactive {
    background-color: #6c757d;
}

.status-warning {
    background-color: #ffc107;
}

/* Modal Styles */
.modal {
    z-index: 2000;
}

.modal-backdrop {
    z-index: 1999;
} 

.btn-logout, .btn-outline-danger {
    background-color: #3A6A97;
    color: #fff;
    border: none;
}

/* Page titles in main window */
.card-header .page-title,
.card-header > h2.page-title,
.card-header > h3.page-title,
.card-header > h4.page-title,
.card-header > h5.page-title,
.card-header > h6.page-title {
    color: #fff;
    font-weight: 400;
    background-color: #495057;
    padding: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 0;
    width: 100%;
    display: block;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
}

.status-badge.status-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

.status-badge.status-error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

.status-badge.status-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffeaa7;
}

.status-badge.status-neutral {
    background-color: #e2e3e5;
    color: #41464b;
    border: 1px solid #d3d6d8;
} 