/* Custom styles for RCM AR Follow-Up Engine */

body {
    background-color: #F8FAFC;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #0F172A;
}

/* Original Blue Navigation */
.navbar {
    background-color: #007bff !important;
}

.navbar-brand {
    font-weight: 600;
    color: white !important;
}

/* Simple Navigation */
.navbar-nav .nav-link {
    margin-right: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

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

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item {
    color: #495057;
}

.breadcrumb-item.active {
    color: #007bff;
    font-weight: 500;
}

/* Priority Cards */
.priority-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.priority-card.critical {
    border-left: 4px solid #dc3545;
}

.priority-card.high {
    border-left: 4px solid #ffc107;
}

.priority-card.medium {
    border-left: 4px solid #17a2b8;
}

.priority-card.low {
    border-left: 4px solid #28a745;
}

.priority-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.priority-card.critical .priority-number {
    color: #dc3545;
}

.priority-card.high .priority-number {
    color: #ffc107;
}

.priority-card.medium .priority-number {
    color: #17a2b8;
}

.priority-card.low .priority-number {
    color: #28a745;
}

.priority-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 1rem;
}

.priority-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    opacity: 0.6;
}

.priority-card.critical .priority-icon {
    color: #dc3545;
}

.priority-card.high .priority-icon {
    color: #ffc107;
}

.priority-card.medium .priority-icon {
    color: #17a2b8;
}

.priority-card.low .priority-icon {
    color: #28a745;
}





/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item {
    color: #495057;
}

.breadcrumb-item.active {
    color: #007bff;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 30px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 300px);
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
}

/* Professional Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}

/* Professional Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border: none;
    font-weight: 600;
    color: #2d3748;
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.table td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* Status Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
}

/* Professional Metrics Cards */
.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card.primary {
    border-left-color: #4299e1;
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
}

.metric-card.success {
    border-left-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

.metric-card.warning {
    border-left-color: #ed8936;
    background: linear-gradient(135deg, #fffaf0 0%, #fbd38d 100%);
}

.metric-card.danger {
    border-left-color: #f56565;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

/* Override any module dropdown interference */
.fixed-module-nav .dropdown-menu,
.module-dropdown {
    z-index: 50 !important;
}

/* Ensure theme dropdown specifically wins over module dropdown */
.navbar .dropdown-menu[aria-labelledby="themeDropdown"],
#themeDropdown + ul {
    z-index: 100001 !important;
}

/* Dashboard Cards - Improved Text Alignment */
.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    height: 100%;
    min-height: 80px;
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.dashboard-card .card-body {
    padding: 1rem;
}

.dashboard-card h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.dashboard-card small {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.2;
    margin: 0;
}

.dashboard-card .badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
}

/* Activity and Summary Cards Specific Styling */
.activity-card .card-header,
.summary-card .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
    padding: 8px 12px;
}

.activity-card .card-body,
.summary-card .card-body {
    padding: 8px 12px;
}

.activity-item {
    margin-bottom: 8px;
    padding: 4px 0;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-text {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    color: #495057;
}

.activity-time {
    font-size: 0.7rem !important;
    color: #6c757d !important;
    margin-top: 1px;
}

.activity-icon {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    font-size: 0.7rem !important;
}

.summary-item {
    padding: 3px 0 !important;
    margin-bottom: 6px !important;
}

.summary-item:last-child {
    margin-bottom: 0 !important;
}

.summary-item span {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

.summary-item .badge {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    font-weight: 600 !important;
}

.dashboard-card h6 {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.dashboard-card .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1;
    color: #2d3748;
}

.dashboard-card .metric-subtitle {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Activity Feed Cards */
.activity-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    border-left: 3px solid #e2e8f0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.8rem;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}

.activity-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.2;
}

/* Summary Section Improvements */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
}

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

.summary-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
}

.summary-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

/* Better responsive text sizing */
@media (max-width: 768px) {
    .dashboard-card .metric-value {
        font-size: 1.5rem;
    }
    
    .dashboard-card h6 {
        font-size: 0.8rem;
    }
    
    .activity-content h6 {
        font-size: 0.85rem;
    }
}

/* Professional Navigation Styles */
.professional-nav {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    position: sticky;
    top: 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.professional-dropdown {
    width: 750px;
    max-width: 90vw;
    padding: 0;
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    position: absolute;
    z-index: 1050;
}

.dropdown-content-wrapper {
    padding: 1.5rem;
    list-style: none;
}

.professional-dropdown .dropdown-header {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid currentColor;
}

.professional-dropdown .dropdown-item {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.professional-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    transform: translateX(3px);
}

.professional-dropdown .dropdown-item i {
    width: 18px;
    opacity: 0.7;
}

.professional-dropdown .dropdown-divider {
    margin: 1rem 0;
    border-color: #dee2e6;
}

/* Main Content Adjustment */
.main-content {
    padding: 1.5rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Navigation Link Styling */
.nav-link.dropdown-toggle {
    color: #495057;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.nav-link.dropdown-toggle:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* User Dropdown */
.dropdown-menu-end {
    border-radius: 10px;
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 0.5rem;
}

.dropdown-menu-end .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
}

.dropdown-menu-end .dropdown-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.dropdown-menu-end .dropdown-item.text-danger:hover {
    background: #fee;
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .professional-dropdown {
        width: 100vw;
        margin: 0;
        border-radius: 0;
        position: fixed;
        left: 0;
        right: 0;
    }
    
    .professional-dropdown .row {
        flex-direction: column;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .d-none.d-md-flex {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
    }
    
    .professional-dropdown {
        padding: 1rem;
    }
}

.fixed-module-nav .btn {
    margin: 1px;
    transition: all 0.2s ease;
}

.fixed-module-nav .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Module Cards Compact */
.module-card-compact {
    padding: 15px 10px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.module-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.module-card-compact i {
    transition: transform 0.2s ease;
}

.module-card-compact:hover i {
    transform: scale(1.1);
}

/* Module Dropdown */
.module-dropdown {
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.module-dropdown .dropdown-header {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 20px;
    background-color: #f8f9fa;
}

.module-dropdown .dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
}

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

.module-dropdown .dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* Responsive Module Navigation */
@media (max-width: 768px) {
    .fixed-module-nav .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .fixed-module-nav .btn-group {
        flex-wrap: wrap;
    }
    
    .module-card-compact {
        min-height: 60px;
        padding: 10px 5px;
    }
    
    .module-card-compact small {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .fixed-module-nav .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .fixed-module-nav strong {
        font-size: 0.85rem;
    }
}

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

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Styles */
.navbar-brand {
    font-weight: bold;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Stats Cards - Healthcare Professional */
.card.bg-primary {
    background-color: #1E40AF !important;
    border: none;
}

.card.bg-success {
    background-color: #047857 !important;
    border: none;
}

.card.bg-warning {
    background-color: #F59E0B !important;
    border: none;
}

.card.bg-info {
    background-color: #0EA5E9 !important;
    border: none;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    background-color: #343a40;
    color: white;
}

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

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Priority Summary Cards - Healthcare Professional */
.priority-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-width: 2px !important;
}

.priority-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.priority-card .card-body {
    padding: 1rem;
}

.priority-card h2 {
    font-size: 2rem;
    font-weight: bold;
}

.priority-filter-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Priority Card Border Colors */
.priority-card.border-danger {
    border-color: #DC2626 !important;
    background-color: rgba(220, 38, 38, 0.02);
}

.priority-card.border-warning {
    border-color: #F59E0B !important;
    background-color: rgba(245, 158, 11, 0.02);
}

.priority-card.border-info {
    border-color: #0EA5E9 !important;
    background-color: rgba(14, 165, 233, 0.02);
}

.priority-card.border-success {
    border-color: #059669 !important;
    background-color: rgba(5, 150, 105, 0.02);
}

/* Enhanced Table Styles - Healthcare Professional Palette */
.table tbody tr.priority-critical {
    background-color: rgba(220, 38, 38, 0.08) !important;
    border-left: 4px solid #DC2626;
}

.table tbody tr.priority-high {
    background-color: rgba(245, 158, 11, 0.08) !important;
    border-left: 4px solid #F59E0B;
}

.table tbody tr.priority-medium {
    background-color: rgba(14, 165, 233, 0.08) !important;
    border-left: 4px solid #0EA5E9;
}

.table tbody tr.priority-low {
    background-color: rgba(5, 150, 105, 0.08) !important;
    border-left: 4px solid #059669;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #343a40 !important;
}

/* Badge Styles - Healthcare Professional */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.badge.bg-danger {
    background-color: #DC2626 !important;
}

.badge.bg-warning {
    background-color: #F59E0B !important;
    color: #FFFFFF !important;
}

.badge.bg-info {
    background-color: #0EA5E9 !important;
}

.badge.bg-success {
    background-color: #059669 !important;
}

.badge.bg-secondary {
    background-color: #6B7280 !important;
}

/* Button Styles - Healthcare Professional */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #1E40AF;
    border-color: #1E40AF;
}

.btn-primary:hover {
    background-color: #1E3A8A;
    border-color: #1E3A8A;
}

.btn-success {
    background-color: #047857;
    border-color: #047857;
}

.btn-success:hover {
    background-color: #065F46;
    border-color: #065F46;
}

.btn-danger {
    background-color: #DC2626;
    border-color: #DC2626;
}

.btn-danger:hover {
    background-color: #B91C1C;
    border-color: #B91C1C;
}

.btn-warning {
    background-color: #F59E0B;
    border-color: #F59E0B;
    color: #FFFFFF;
}

.btn-warning:hover {
    background-color: #D97706;
    border-color: #D97706;
    color: #FFFFFF;
}

.btn-info {
    background-color: #0EA5E9;
    border-color: #0EA5E9;
}

.btn-info:hover {
    background-color: #0284C7;
    border-color: #0284C7;
}



.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Form Styles */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Chart Container */
canvas {
    max-height: 300px;
}

/* Status Analysis Chart Specific */
#statusAnalysisChart {
    width: 100% !important;
    height: 350px !important;
    max-height: 350px !important;
}

.card-body canvas {
    display: block;
    box-sizing: border-box;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #007bff;
    border-radius: 5px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Alert Styles */
.alert {
    border-radius: 5px;
    border: none;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Loading States */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Custom utility classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

/* Animation for loading states */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.active {
    background-color: #28a745;
}

.status-indicator.inactive {
    background-color: #dc3545;
}

.status-indicator.pending {
    background-color: #ffc107;
}

/* High-value breach styling */
.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-left: 4px solid #dc3545;
}

.table-danger.fw-bold {
    font-weight: 600 !important;
}

/* SLA color indicators */
.sla-amber {
    background-color: #ff6b35 !important;
}

.sla-red {
    background-color: #dc3545 !important;
}

/* Enhanced badges for aging status */
.badge.aging-status {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Pulsing animation for high-value breaches */
.high-value-breach {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Horizontal Module Layout Styles */
.module-btn {
    height: 100px;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.module-btn:hover {
    transform: translateY(-3px);
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.module-btn i {
    transition: transform 0.3s ease;
}

.module-btn:hover i {
    transform: scale(1.1);
}

.module-btn small {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive module grid */
@media (max-width: 768px) {
    .module-btn {
        height: 80px;
    }
    
    .module-btn i {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .module-btn {
        height: 70px;
    }
    
    .module-btn i {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Dark & Yellow Theme */
.theme-dark {
    background-color: #1a1a1a !important;
    color: #ffd700 !important;
}

.theme-dark .card {
    background-color: #2d2d2d !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.theme-dark .card-header {
    background-color: #333333 !important;
    border-bottom-color: #ffd700 !important;
    color: #ffd700 !important;
}

.theme-dark .card-body {
    background-color: #2d2d2d !important;
    color: #ffd700 !important;
}

.theme-dark .table {
    background-color: #2d2d2d !important;
    color: #ffd700 !important;
}

.theme-dark .table th {
    background-color: #333333 !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.theme-dark .table td {
    border-color: #444444 !important;
    color: #ffd700 !important;
}

.theme-dark .table-striped tbody tr:nth-of-type(odd) {
    background-color: #333333 !important;
}

.theme-dark .btn-primary {
    background-color: #ffd700 !important;
    border-color: #ffd700 !important;
    color: #1a1a1a !important;
}

.theme-dark .btn-primary:hover {
    background-color: #ffed4e !important;
    border-color: #ffed4e !important;
}

.theme-dark .btn-outline-light {
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.theme-dark .btn-outline-light:hover {
    background-color: #ffd700 !important;
    color: #1a1a1a !important;
}

.theme-dark .module-btn {
    border-color: #ffd700 !important;
}

.theme-dark .module-btn:hover {
    border-color: #ffed4e !important;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3) !important;
}

.theme-dark .bg-primary {
    background-color: #333333 !important;
}

.theme-dark .bg-success {
    background-color: #2d5a2d !important;
}

.theme-dark .bg-warning {
    background-color: #5a5a2d !important;
}

.theme-dark .bg-danger {
    background-color: #5a2d2d !important;
}

.theme-dark .bg-info {
    background-color: #2d4a5a !important;
}

.theme-dark .text-primary {
    color: #ffd700 !important;
}

.theme-dark .navbar-text {
    color: #ffd700 !important;
}

.theme-dark .navbar-brand {
    color: #ffd700 !important;
}

.theme-dark .dropdown-menu {
    background-color: #2d2d2d !important;
    border-color: #ffd700 !important;
}

.theme-dark .dropdown-item {
    color: #ffd700 !important;
}

.theme-dark .dropdown-item:hover {
    background-color: #ffd700 !important;
    color: #1a1a1a !important;
}

.theme-dark .dropdown-item.active {
    background-color: #ffd700 !important;
    color: #1a1a1a !important;
}

.theme-dark .alert-success {
    background-color: #2d5a2d !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.theme-dark .progress {
    background-color: #444444 !important;
}

.theme-dark .badge {
    color: #1a1a1a !important;
}

/* Default Theme (Light) */
.theme-default {
    background-color: #F8FAFC !important;
    color: #0F172A !important;
}

/* Smooth transitions for theme changes */
body, .card, .table, .btn, .navbar, .dropdown-menu {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Theme Customizer Styles */
.theme-preset-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-preset-card:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.theme-preset-card.active {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
    border-width: 2px !important;
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    border: 1px solid #ddd;
}

.custom-color-controls .form-control-color {
    width: 50px;
    height: 38px;
    padding: 2px;
    border-radius: 0.375rem 0 0 0.375rem;
}

.custom-color-controls .input-group input[type='text'] {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* CSS Custom Properties for Dynamic Theming */
:root {
    --theme-primary: #0d6efd;
    --theme-secondary: #6c757d;
    --theme-background: #F8FAFC;
    --theme-surface: #ffffff;
    --theme-text: #0F172A;
    --theme-accent: #20c997;
}

/* Dynamic theme classes using CSS variables */
.theme-dynamic-bg {
    background-color: var(--theme-background) !important;
}

.theme-dynamic-surface {
    background-color: var(--theme-surface) !important;
}

.theme-dynamic-text {
    color: var(--theme-text) !important;
}

.theme-dynamic-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

.theme-dynamic-accent {
    color: var(--theme-accent) !important;
}

/* Enhanced Theme Transitions with Animation Effects */
body {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body * {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                transform 0.3s ease;
}

/* Animated Theme Change Overlay */
.theme-change-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    z-index: 9999;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out;
}

.theme-change-overlay.active {
    animation: themeSwipe 0.8s ease-in-out;
}

@keyframes themeSwipe {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Card Animation Effects */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Priority Cards Animation */
.priority-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.priority-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.priority-card:hover::before {
    left: 100%;
}

/* Navbar Animation */
.navbar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--theme-accent, #20c997);
    transition: width 0.6s ease;
}

.navbar:hover::after {
    width: 100%;
}

/* Animation Keyframes for Theme Notifications */
@keyframes themeNotificationSlide {
    0% { 
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(-10px) scale(1.05);
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes themeNotificationSlideOut {
    0% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
}

@keyframes themeIconPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.2);
    }
}

/* Enhanced Dashboard Features */
.floating-action-group {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 990;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,123,255,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,123,255,0.6);
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-actions {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.fab-actions.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.fab-action {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #007bff;
}

.fab-action:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.fab-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fab-action:hover .fab-tooltip,
.fab-main:hover .fab-tooltip {
    opacity: 1;
}

/* Dashboard Widgets */
.dashboard-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}

.dashboard-widget:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px 12px 0 0;
}

.widget-header h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.widget-controls {
    display: flex;
    gap: 5px;
}

.widget-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.widget-content::-webkit-scrollbar {
    width: 6px;
}

.widget-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #495057;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: #6c757d;
}

/* Stats Widget */
.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-change {
    font-size: 11px;
    margin-top: 3px;
}

/* Widget Minimize Animation */
.widget-content.minimized {
    display: none;
}

.dashboard-widget.minimized {
    height: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-action-group {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fab-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .dashboard-widget {
        margin-bottom: 20px;
    }
    
    .widget-content {
        max-height: 300px;
    }
}

/* Theme-specific enhancements for new color palettes */
.theme-ocean body {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f9ff 100%);
}

.theme-forest body {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.theme-sunset body {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3e7 100%);
}

.theme-purple body {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

/* Dark theme navbar fix */
.theme-dark .navbar {
    background-color: #000000 !important;
    border-bottom: 2px solid #ffd700 !important;
}

.theme-dark .navbar-brand,
.theme-dark .navbar-text,
.theme-dark .btn-outline-light {
    color: #ffd700 !important;
}

.theme-dark .btn-outline-light {
    border-color: #ffd700 !important;
}

.theme-dark .btn-outline-light:hover {
    background-color: #ffd700 !important;
    color: #000000 !important;
}

.theme-dark .dropdown-menu {
    background-color: #2d2d2d !important;
    border-color: #ffd700 !important;
    z-index: 1030 !important;
}

.theme-dark .dropdown-item {
    color: #ffd700 !important;
}

.theme-dark .dropdown-item:hover {
    background-color: #ffd700 !important;
    color: #000000 !important;
}

/* Responsive customizer modal */
@media (max-width: 768px) {
    .theme-customizer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    .custom-color-controls .form-control-color {
        width: 40px;
        height: 32px;
    }
}

