/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0f172a; /* Very dark slate instead of blue */
    color: #f8fafc; /* Bright white text */
    line-height: 1.6;
    font-weight: 400;
}

/* App Layout */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Page Layout Control */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Ensure pages inherit container constraints */
#usersPage, #licensesPage, #locationsPage {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Page width constraints to match container */
.page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Single container definition matching homepage */
.main .container,
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* Absolute constraint for edit pages to match homepage width precisely */
#usersPage, #licensesPage, #locationsPage {
    width: 100%;
    max-width: 1400px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Override any internal content that might break width */
#usersPage *, #licensesPage *, #locationsPage * {
    max-width: none;
}

/* Ensure edit pages inherit container width constraints */
#usersPage .page-header-modern,
#licensesPage .page-header-modern,
#locationsPage .page-header-modern {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#usersPage .content-card-modern,
#licensesPage .content-card-modern,
#locationsPage .content-card-modern {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#usersPage .table-section,
#licensesPage .table-section,
#locationsPage .table-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#usersPage .table-wrapper-modern,
#licensesPage .table-wrapper-modern,
#locationsPage .table-wrapper-modern {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#usersPage .data-table-optimized,
#licensesPage .data-table-optimized,
#locationsPage .data-table-optimized {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

/* Force all page content to stay within container bounds like dashboard */
.container #usersPage,
.container #licensesPage,
.container #locationsPage {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Enforce complete width constraints like dashboard */
.container #usersPage *,
.container #licensesPage *,
.container #locationsPage * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent any table or content breakout beyond container width */
.container .data-table-optimized,
.container .table-wrapper-modern,
.container .content-card-modern {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

/* Header - Clean and Modern */
.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 600;
}

.logo i {
    font-size: 1.5rem;
    color: #60a5fa;
}

/* Navigation */
.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.nav-item.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.nav-item i {
    font-size: 0.875rem;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
}


/* Modern Page Header */
.page-header-modern {
    margin-bottom: 2rem;
}

.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.page-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
}

/* Elegant Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card-sleek {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card-sleek:hover {
    border-color: #475569;
    transform: translateY(-1px);
}

.stat-icon-minimal {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Location Navigation - Pill Design */
.location-navigation {
    margin-bottom: 2rem;
}

.nav-pills {
    display: flex;
    gap: 0.5rem;
    background: #1e293b;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #334155;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-pill:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

.nav-pill.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-pill i {
    font-size: 0.875rem;
}

/* Dashboard Grid - Elegant Layout */
.dashboard-grid-elegant {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.main-content-panel {
    /* Left panel */
}

.sidebar-panel {
    /* Right panel is smaller now */
}

.content-card-slk {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header-slk {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 6px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-action:hover {
    background: #475569;
    color: #f8fafc;
}

/* Modern Tables */
.table-wrapper {
    padding: 1.5rem;
    background: #0f172a;
}

.table-wrapper.compact {
    padding: 1rem;
}

.data-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table-modern th {
    background: #1e293b;
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table-modern td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
}

.data-table-modern tr:hover {
    background: #1e293b;
}

.data-table-modern.compact th,
.data-table-modern.compact td {
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Summary Compact */
.summary-compact {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    margin: 0;
    margin-bottom: 0;
}

.summary-compact h3 {
    color: white;
    margin: 0;
    font-size: 1rem;
}

.summary-compact p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid-elegant {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav {
        gap: 0.25rem;
    }
    
    .nav-item {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-pills {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .nav-pill {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Legacy Support */
.main {
    flex: 1;
    padding: 2rem 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.stat-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #334155;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.btn-secondary {
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: #475569;
    color: #f8fafc;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e293b;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

/* Elegant Login Styles */
.login-modal-elegant {
    max-width: 420px;
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 0;
}

.login-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid #334155;
}

.logo-brand {
    margin-bottom: 1.5rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.relevent-logo {
    color: #64748b;
}

.broken-e {
    color: #64748b;
    position: relative;
}

.broken-e::before {
    content: '\2013';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    opacity: 0.7;
    z-index: 1;
}

.brand-squares {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.color-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.color-square.orange {
    background: #ff7c00;
}

.color-square.red {
    background: #ff0000;
}

.color-square.blue {
    background: #0066ff;
}

.brand-squares-header {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
}

.welcome-section {
    text-align: center;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

/* Login Form */
.login-form-elegant {
    padding: 2rem;
}

.input-field-wrapper {
    margin-bottom: 1.5rem;
}

.field-label {
    display: block;
    font-weight: 500;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #64748b;
    z-index: 2;
    font-size: 0.875rem;
}

.input-field input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-field input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #374151;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field input:focus + .input-icon,
.input-field input:focus ~ .input-icon {
    color: #3b82f6;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Login Credentials */
.login-credentials {
    padding: 1.5rem 2rem 2rem 2rem;
    border-top: 1px solid #334155;
    background: #0f172a;
    border-radius: 0 0 16px 16px;
}

.credential-info {
    text-align: center;
}

.credential-info h4 {
    color: #f8fafc;
    font-size: 0.875rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.credential-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.credential-details span {
    font-size: 0.8rem;
    color: #94a3b8;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.credential-details strong {
    color: #60a5fa;
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark-header {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.relevent-logo-header {
    color: #94a3b8;
}

.broken-e-header {
    color: #94a3b8;
    position: relative;
}

.broken-e-header::before {
    content: '\2013';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    opacity: 0.7;
    z-index: 1;
}

.logo-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* User Menu Elegant Enhancements */
.user-menu-elegant {
    position: relative;
    display: flex;
    align-items: center;
}

.user-profile-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.user-info-group:hover {
    background: #475569;
    border-color: #64748b;
}

.user-avatar-elegant {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #94a3b8;
}

.user-details-elegant {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 100px;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.2;
}

.user-role-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.user-menu-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle-btn {
    background: #475569;
    border: 1px solid #64748b;
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle-btn:hover {
    background: #64748b;
    color: #f8fafc;
    border-color: #94a3b8;
}

.logout-btn-elegant {
    background: #dc2626;
    border: 1px solid #ef4444;
    color: #fef2f2;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn-elegant:hover {
    background: #ef4444;
    border-color: #f87171;
    color: #fff;
}

.user-settings-dropdown-elegant {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 220px;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
}

.dropdown-item-elegant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.dropdown-item-elegant:hover {
    background: #334155;
    color: #f8fafc;
    transform: translateX(4px);
}

.dropdown-item-elegant i {
    font-size: 0.875rem;
    width: 18px;
    opacity: 0.8;
}

/* Page Design Improvements */
.page-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
}

.page-title-section {
    flex: 1;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

.page-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.page-actions-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-btn-primary, .action-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.action-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.action-btn-secondary {
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
}

.action-btn-secondary:hover {
    background: #475569;
    color: #f8fafc;
    border-color: #64748b;
}

.content-card-modern {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header-modern {
    background: #0f172a;
    border-bottom: 1px solid #334155;
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn-modern {
    background: #334155;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn-modern:hover {
    background: #475569;
    color: #f8fafc;
    border-color: #64748b;
    transform: rotate(180deg);
}

.table-section {
    padding: 0;
}

.table-wrapper-modern {
    overflow-x: auto;
    padding: 0;
}

.data-table-optimized {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.875rem;
}

.data-table-optimized thead th {
    background: #1e293b;
    color: #cbd5e1;
    font-weight: 600;
    text-align: left;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #334155;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.data-table-optimized tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #0f172a;
    color: #f1f5f9;
    vertical-align: middle;
}

.data-table-optimized tbody tr:hover {
    background: #0f172a;
}

.data-table-optimized tbody tr:last-child td {
    border-bottom: none;
}

/* Change Password Modal Enhancements */
.change-password-modal {
    max-width: 480px;
    width: 90%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.modal-header-modern {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5ef6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.25rem 0;
}

.modal-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
}

.modal-close-modern {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close-modern:hover {
    color: #f8fafc;
    background: #334155;
}

.modal-body-modern {
    padding: 0 2rem 1.5rem 2rem;
}

.password-form-elegant {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group-elegant {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #f8fafc;
    font-size: 0.875rem;
}

.field-label-modern i {
    color: #94a3b8;
    font-size: 0.75rem;
    width: 14px;
}

.input-field-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-field-modern:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 0.25rem;
}

.modal-footer-modern {
    padding: 1.5rem 2rem 2rem 2rem;
    border-top: 1px solid #334155;
    background: #0f172a;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.action-btn-cancel {
    background: #334155;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn-cancel:hover {
    background: #475569;
    color: #f8fafc;
    border-color: #64748b;
}

.action-btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    background-color: #334155;
    color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Additional Button Styling */
.refresh-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.refresh-btn:hover {
    background: #475569;
    color: #f8fafc;
}

/* Page specific hidden sections */
.card {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    color: #f8fafc;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.card-content {
    padding: 1.5rem;
    color: #cbd5e0;
}

/* Modern Checkboxes for Elegant Modals */
.modern-checkboxes {
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for modern checkboxes */
.modern-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.modern-checkboxes::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

.modern-checkboxes::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.modern-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    visibility: hidden;
    width: 0;
    height: 0;
    margin: 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    cursor: pointer;
    font-size: 0.875rem;
    color: #cbd5e0;
    margin: 0;
}

.checkbox-group input[type="checkbox"]:checked + label::before,
.checkbox-group label.checkbox-custom,
.checkbox-group label::before {
    width: 20px;
    height: 20px;
    border: 2px solid #475569;
    background: #1e293b;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    content: "";
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked + label.checkbox-custom::before,
.checkbox-group label.checkbox-custom::before {
    content: "";
    width: 100%;
    height: 100%;
    background: #475569;
    border-radius: 4px;
}

.checkbox-group input[type="checkbox"]:checked + label::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-group label:not(.checkbox-custom) {
    align-items: center;
    background: #334155;
    border-radius: 6px;
    padding: 0.25rem 0.5rem !important;
    margin: 0 !important;
    text-transform: capitalize;
    font-weight: 500;
}

.checkbox-group label:not(.checkbox-custom)::before {
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

.checkbox-group input[type="checkbox"]:checked + label:not(.checkbox-custom) {
    background: #064e3b;
    border-color: #10b981;
}

/* Modern File Input for Import Modal */
.modern-file-input {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-input-section input[type="file"] {
    margin-bottom: 0.75rem;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.file-input-section input[type="file"]:hover {
    border-color: #64748b;
    background: #334155;
}

.file-input-section input[type="file"]:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.template-download-btn {
    background: #4f46e5;
    border: 1px solid #6366f1;
    color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.template-download-btn:hover {
    background: #3730a3;
    border-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.help-text {
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

/* User Filters */
.user-filters-card {
    margin-bottom: 1.5rem;
}

.filter-content {
    padding: 1.5rem 2rem;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #0f172a;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.filter-btn-secondary {
    background: #334155;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn-secondary:hover {
    background: #475569;
    color: #e2e8f0;
    border-color: #64748b;
}

/* Select All and Bulk Actions */
.checkbox-column {
    width: 50px;
    text-align: center;
}

.select-all-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bulk-actions-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1rem;
}

#bulkEditBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#bulkEditBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#bulkEditBtn:disabled:hover {
    background: inherit;
    color: inherit;
}

/* Sort button styling */
#sortUsersBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #334155;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sortUsersBtn:hover {
    background: #475569;
    color: #f8fafc;
    border-color: #64748b;
}

/* Selected Users List in Bulk Edit Modal */
.selected-users-list {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 1rem;
}

.selected-user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #334155;
}

.selected-user-item:last-child {
    border-bottom: none;
}

.selected-user-info {
    flex: 1;
    font-size: 0.875rem;
}

.selected-user-name {
    color: #f8fafc;
    font-weight: 500;
}

.selected-user-details {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Bulk license checkboxes should follow modern-checkboxes pattern */
#bulkLicenseCheckboxes {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Bulk-license section cleanup: remove wrapper div, directly style bulk checkbox-on-the-fly items */
#bulkLicenseCheckboxes {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Ensure user selection filtering works */
.data-table-optimized tbody tr.hidden {
    display: none;
}