/* ========================================
   GEMS Asset Management System - Modern UI
   Enhanced UX & Readability Styles
   ======================================== */

/* ========================================
   HEADER & SIDEBAR Z-INDEX FIX
   ======================================== */
/* Ensure sidebar stays above header and footer */
.nav-header {
    z-index: 1030;
}

.header {
    z-index: 1020;
}

.deznav {
    z-index: 1030;
    height: calc(100vh - var(--dz-header-height)) !important;
    min-height: calc(100vh - var(--dz-header-height));
    bottom: 0;
}

.footer {
    position: relative;
}

/* Ensure header and footer don't overlap sidebar - they use padding-left, so they span full width */
/* Sidebar should always be on top and extend to bottom */

/* ========================================
   LOGIN / LANDING PAGE
   ======================================== */
body.login-page {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #0b1220;
}

body.login-page #main-wrapper,
body.login-page .nav-header,
body.login-page .header,
body.login-page .sidebar,
body.login-page .footer {
    display: none !important;
}

.login-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top left, #1e293b 0%, #0b1220 45%, #0b1220 100%);
}

.login-split {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: nowrap;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(8, 15, 40, 0.35);
    background: #ffffff;
}

.login-left {
    flex: 1.15;
    background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 70%);
    color: #ffffff;
    padding: 48px;
    position: relative;
}

.login-left::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
    pointer-events: none;
}

.login-left-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    z-index: 1;
}

.login-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-brand-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 8px;
}

.login-brand-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
}

.login-headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #ffffff;
}

.login-subheadline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

.login-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 8px;
}

.login-highlight h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.login-highlight p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.5;
}

.login-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.login-modules span {
    font-size: 0.75rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.login-left-footer {
    margin-top: auto;
    padding-top: 24px;
}

.login-right {
    flex: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03), transparent 50%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(99, 102, 241, 0.03) 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.login-card-top:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.login-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.login-card-top:hover .login-card-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5), 0 4px 8px rgba(59, 130, 246, 0.3);
}

.login-card-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1d4ed8;
    margin: 0 0 6px 0;
}

.login-card-meta {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.login-header {
    margin-bottom: 36px;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.login-body {
    margin-bottom: 24px;
}

.login-body .form-floating {
    margin-bottom: 20px;
}

.login-body .form-control {
    height: 58px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
    padding: 18px 18px 0 18px;
    background: #ffffff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.login-body .form-control:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
}

.login-body .form-control:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.login-body .form-label {
    color: #64748b;
    font-size: 0.875rem;
    padding: 18px;
    font-weight: 500;
}

.login-body .form-check-label {
    color: #475569;
    font-weight: 500;
    font-size: 0.9375rem;
}

.login-body .btn-primary {
    width: 100%;
    height: 52px;
    font-weight: 700;
    font-size: 1.0625rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.login-body .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5), 0 4px 8px rgba(59, 130, 246, 0.3);
}

.login-body .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Security Badges */
.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid #f1f5f9;
    justify-content: center;
}

.security-badge {
    font-size: 0.8125rem;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.security-badge:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Login Assurance */
.login-assurance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid #f1f5f9;
}

.login-assurance > div {
    text-align: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.login-assurance > div:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-assurance > div span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-assurance > div strong {
    display: block;
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Login Spinner */
.login-spinner {
    display: none;
}

.login-spinner.active {
    display: inline-block;
}

/* Status Strip */
.status-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.75rem;
}

.status-strip-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
}

.status-strip-item i {
    color: #10b981;
    font-size: 0.875rem;
}

/* Assurance Grid */
.assurance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.assurance-item {
    text-align: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.assurance-item-icon {
    font-size: 1.25rem;
    color: #3b82f6;
    margin-bottom: 8px;
}

.assurance-item-label {
    font-size: 0.625rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .login-split {
        flex-direction: column;
        max-width: 100%;
    }

    .login-left {
        padding: 32px 24px;
    }

    .login-right {
        padding: 32px 24px;
    }

    .login-headline {
        font-size: 1.5rem;
    }

    .assurance-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 575.98px) {
    .login-container {
        padding: 16px;
    }

    .login-left,
    .login-right {
        padding: 24px 16px;
    }

    .login-headline {
        font-size: 1.25rem;
    }

    .login-card-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .assurance-grid {
        grid-template-columns: 1fr;
    }
}

.probabilistic-chart-wrapper {
    height: 280px;
    position: relative;
}
/* Dashboard Animations */
.statistics-update-animation {
    animation: statisticsPulse 0.5s ease-in-out;
}

@keyframes statisticsPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--primary-color); }
    100% { transform: scale(1); }
}

.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: buttonSpinner 1s linear infinite;
}

@keyframes buttonSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dashboard Cards Enhancement */
.mini-stats-wid {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.mini-stats-wid:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Chart Container Enhancements */
.card .card-body canvas {
    max-height: 300px;
}

/* Activities Table Enhancements */
.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

.table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.table tbody tr:hover {
    background-color: var(--table-row-hover-bg);
}

/* CSS Variables for Theme Support */
:root {
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --heading-color: #212529;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --card-bg: #ffffff;
    --card-header-bg: #f1f4f8;
    --border-color: #dee2e6;
    --table-bg: #ffffff;
    --table-header-bg: #e9ecef;
    --table-header-color: #495057;
    --table-body-bg: #ffffff;
    --table-row-bg: #ffffff;
    --table-row-even-bg: #f8f9fa;
    --table-row-hover-bg: #e2e6ea;
    --table-footer-bg: #f1f4f8;
    --input-bg: #ffffff;
    --input-color: #495057;
    --input-border-color: #ced4da;
    --pagination-btn-bg: #e9ecef;
    --pagination-btn-color: #495057;
    --pagination-btn-border: #dee2e6;
    --pagination-btn-hover-bg: #d6d8db;
    --pagination-btn-hover-color: #212529;
    --pagination-btn-hover-border: #c6c8cb;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #1a1a2e;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --card-bg: #2a2a4a;
    --card-header-bg: #3a3a5a;
    --border-color: #444466;
    --table-bg: #2a2a4a;
    --table-header-bg: #3a3a5a;
    --table-header-color: #ffffff;
    --table-body-bg: #2a2a4a;
    --table-row-bg: #2a2a4a;
    --table-row-even-bg: #303050;
    --table-row-hover-bg: #404060;
    --table-footer-bg: #3a3a5a;
    --input-bg: #3a3a5a;
    --input-color: #e0e0e0;
    --input-border-color: #444466;
    --pagination-btn-bg: #3a3a5a;
    --pagination-btn-color: #e0e0e0;
    --pagination-btn-border: #444466;
    --pagination-btn-hover-bg: #4a4a6a;
    --pagination-btn-hover-color: #ffffff;
    --pagination-btn-hover-border: #5a5a7a;
}

/* ========================================
   ASSET MANAGEMENT TABLE REDESIGN
   ======================================== */

/* Main Card Container */
.asset-management-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.asset-management-card:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Card Header */
.asset-management-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.asset-management-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.asset-management-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.asset-management-title i {
    font-size: 1.75rem;
    opacity: 0.9;
}

/* Export Tools Container */
.export-tools {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Export Buttons */
.export-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.export-btn:active {
    transform: translateY(0);
}

.export-btn i {
    font-size: 1rem;
}

/* Specific Button Colors */
.export-btn.btn-primary { background: rgba(59, 130, 246, 0.8); }
.export-btn.btn-success { background: rgba(34, 197, 94, 0.8); }
.export-btn.btn-info { background: rgba(6, 182, 212, 0.8); }
.export-btn.btn-warning { background: rgba(245, 158, 11, 0.8); }
.export-btn.btn-secondary { background: rgba(107, 114, 128, 0.8); }
.export-btn.btn-dark { background: rgba(31, 41, 55, 0.8); }

.works-data-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.works-data-loader-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.works-data-loader-inner {
    text-align: center;
    padding: 1.75rem 2rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.works-data-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #22d3ee;
    border-radius: 50%;
    animation: worksLoaderSpin 1s linear infinite;
}

.works-data-loader-message {
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 320px;
    text-align: left;
}

@keyframes worksLoaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   TABULATOR TABLE ENHANCEMENTS
   ======================================== */

/* Table Container */
.asset-table-container {
    background: white;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

/* Tabulator Base Styles */
.tabulator {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    border: none;
    background: white;
}

/* Table Header */
.tabulator-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
    height: auto !important;
    min-height: 60px;
}

.tabulator-header-contents {
    background: transparent;
}

.tabulator-headers {
    background: transparent;
}

/* Column Headers */
.tabulator-col {
    background: transparent;
    border-right: 1px solid #e2e8f0;
    padding: 0;
    transition: all 0.2s ease;
}

.tabulator-col:hover {
    background: rgba(99, 102, 241, 0.05);
}

.tabulator-col-content {
    padding: 1rem 0.75rem;
    height: auto;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tabulator-col-title {
    font-weight: 700;
    font-size: 0.8rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.tabulator-col-sorter {
    margin-top: 0.25rem;
}

.tabulator-arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #9ca3af;
    transition: all 0.2s ease;
}

.tabulator-col-sorter-element:hover .tabulator-arrow {
    border-bottom-color: #6366f1;
}

/* Header Filter Inputs */
.tabulator-header-filter input {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #374151;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.tabulator-header-filter input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tabulator-header-filter input::placeholder {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Table Rows */
.tabulator-table {
    background: white;
}

.tabulator-row {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    height: 56px;
}

.tabulator-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tabulator-row-odd {
    background: #fafbfc;
}

.tabulator-row-even {
    background: white;
}

/* Table Cells */
.tabulator-cell {
    padding: 0.875rem 0.75rem;
    border-right: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
    word-break: break-word;
}

/* Status Badges */
.tabulator-cell[data-field="STATUS"] {
    font-weight: 600;
}

.tabulator-cell[data-field="STATUS"]:contains("In Service") {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    display: inline-block;
}

/* Material Type Styling */
.tabulator-cell[data-field="MATERIAL"] {
    font-weight: 600;
    text-transform: capitalize;
}

/* Height Styling */
.tabulator-cell[data-field="HEIGHT"] {
    font-weight: 600;
    color: #6366f1;
}

/* Date Styling */
.tabulator-cell[data-field="CREATED_DATE"],
.tabulator-cell[data-field="INSTALL_DATE"],
.tabulator-cell[data-field="LAST_EDITED_DATE"] {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Global ID Styling */
.tabulator-cell[data-field="GLOBALID"] {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-weight: 600;
    color: #1f2937;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    display: inline-block;
}

/* Attachment Count */
.tabulator-cell[data-field="ATTACHMENTS"] {
    text-align: center;
    color: #6b7280;
}

.tabulator-cell[data-field="ATTACHMENTS"] i {
    margin-right: 0.25rem;
}

/* ========================================
   PAGINATION ENHANCEMENTS
   ======================================== */

.tabulator-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.tabulator-paginator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tabulator-page {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tabulator-page:hover:not(:disabled) {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.tabulator-page.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.tabulator-page:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   COLUMN CHOOSER ENHANCEMENTS
   ======================================== */

.flip-container {
    perspective: 1000px;
    min-height: 400px;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.flip-card-back {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transform: rotateY(180deg);
    padding: 2rem;
}

.column-chooser-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .export-tools {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .export-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .asset-management-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .asset-management-title {
        font-size: 1.25rem;
    }
    
    .export-tools {
        justify-content: center;
        width: 100%;
    }
    
    .tabulator-col-content {
        padding: 0.75rem 0.5rem;
    }
    
    .tabulator-cell {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .export-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .tabulator-col-title {
        font-size: 0.7rem;
    }
    
    .tabulator-cell {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus States */
.export-btn:focus,
.tabulator-page:focus,
.tabulator-header-filter input:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .asset-management-card {
        border: 2px solid #000;
    }
    
    .tabulator-row:hover {
        background: #e5e7eb;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .asset-management-card,
    .export-btn,
    .tabulator-row,
    .tabulator-page {
        transition: none;
    }
    
    .flip-card {
        transition: none;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.asset-table-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
}

.asset-table-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

/* ========================================
   Work Order Sidebars Styling
   ======================================== */

/* Work Order Details Grid */
.work-order-details-section {
    margin-bottom: 1.5rem;
}

.work-order-details-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.work-order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.work-order-details-item {
    display: flex;
    flex-direction: column;
}

.work-order-details-item.full-width {
    grid-column: 1 / -1;
}

.work-order-details-item .label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.work-order-details-item .value {
    font-size: 0.95rem;
    color: #212529;
    word-break: break-word;
}

/* Priority and Status Badges */
.priority-badge, .status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.priority-badge.badge-danger {
    background-color: #dc3545;
    color: white;
}

.priority-badge.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.priority-badge.badge-info {
    background-color: #0dcaf0;
    color: #212529;
}

.priority-badge.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.status-badge.badge-secondary {
    background-color: #6c757d;
    color: white;
}

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

.status-badge.badge-primary {
    background-color: #0d6efd;
    color: white;
}

.status-badge.badge-success {
    background-color: #198754;
    color: white;
}

.status-badge.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* Sidebar Form Styling */
.offcanvas-body .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.offcanvas-body .form-control,
.offcanvas-body .form-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.offcanvas-body .form-control:focus,
.offcanvas-body .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Sidebar Button Styling */
.offcanvas-body .btn {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.offcanvas-body .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.offcanvas-body .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.offcanvas-body .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.offcanvas-body .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

.offcanvas-body .btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.offcanvas-body .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.offcanvas-body .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.offcanvas-body .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .work-order-details-grid {
        grid-template-columns: 1fr;
    }
    
    .work-order-details-item.full-width {
        grid-column: 1;
    }
}

/* Cache bust: 20250924_102330 */

/* ========================================
   Energy Market Analytics Dashboard
   ======================================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #cc9a06 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #212529 0%, #16181b 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

.heatmap-table {
    min-width: 100%;
    font-size: 0.7rem;
}

.heatmap-table th,
.heatmap-table td {
    padding: 4px !important;
    text-align: center;
    white-space: nowrap;
}

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

.chart-container {
    position: relative;
    width: 100%;
}

#loadingOverlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.page-header {
    border-bottom: 3px solid #0d6efd;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #212529;
}

.card {
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* Stat Cards Animation */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .heatmap-table {
        font-size: 0.6rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Cache bust: 20251104_EMI */

/* ========================================
   Energy Market Analytics - Phase 1 Charts
   ======================================== */

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Leaflet Map Styling */
#priceMap {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.leaflet-popup-content {
    font-family: inherit;
}

.leaflet-popup-content strong {
    color: #0d6efd;
}

/* Map Legend Badges */
#priceMap + .mt-3 .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* ========================================
   Real-Time Open Data Hub
   ======================================== */
.free-data-dashboard .metric-card {
    border: 1px solid rgba(13, 110, 253, 0.1);
    border-radius: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.free-data-dashboard .metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.free-data-dashboard .metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.free-data-dashboard .metric-value {
    font-weight: 600;
    font-size: 1.7rem;
}

.free-data-dashboard .metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background-color: rgba(13, 110, 253, 0.12);
}

.free-data-dashboard .status-badge {
    min-width: 90px;
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
}

.free-data-dashboard .chart-container {
    position: relative;
    min-height: 260px;
}

.free-data-dashboard .chart-container canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Process Capability Sixpack */
.capability-card .card-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(111, 66, 193, 0.08));
}

.capability-controls .form-label {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.capability-controls .form-select,
.capability-controls .form-control {
    min-width: 120px;
}

.capability-empty {
    margin-bottom: 1rem;
}

.capability-chart {
    position: relative;
    height: 350px;
}

.capability-metrics-body {
    font-size: 0.85rem;
}

.capability-metrics-body table {
    width: 100%;
    border-collapse: collapse;
}

.capability-metrics-body th,
.capability-metrics-body td {
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid rgba(108, 117, 125, 0.2);
    font-size: 0.82rem;
}

.capability-metrics-body th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #6c757d;
}

.capability-metrics-body .metric-value {
    font-weight: 600;
    color: #0d6efd;
}

.capability-metrics-body .metric-value.danger {
    color: #dc3545;
}

.capability-metrics-body .metric-value.warning {
    color: #fd7e14;
}

.capability-metrics-body .badge {
    font-size: 0.7rem;
}

.capability-metrics-card {
    min-height: 260px;
}

.capability-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.free-data-dashboard .windy-embed-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    background: #0f172a;
}

.free-data-dashboard .windy-embed {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 992px) {
    .free-data-dashboard .windy-embed-wrapper {
        height: 380px;
    }
}

/* Chart responsive adjustments */
@media (max-width: 992px) {
    #priceMap {
        height: 400px !important;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* Cache bust: 20251105_Phase1 */

/* ========================================
   Energy Market Analytics - Anomaly Panel
   ======================================== */
.anomaly-panel {
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.anomaly-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.anomaly-view-message {
    font-style: italic;
}

.anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.anomaly-chip {
    border-left: 4px solid #0d6efd;
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.anomaly-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.12);
}

.anomaly-chip .anomaly-headline {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.anomaly-chip .anomaly-summary {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
}

.anomaly-chip .anomaly-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.3rem;
}

.anomaly-chip.severity-high {
    border-color: #dc3545;
}

.anomaly-chip.severity-medium {
    border-color: #fd7e14;
}

.anomaly-chip.severity-info {
    border-color: #0d6efd;
}

.anomaly-chip.active {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.12) !important;
    color: #dc3545 !important;
}

@media (max-width: 768px) {
    .anomaly-panel {
        padding: 0.85rem;
    }
}

/* ========================================
   Quantum Demand Forecasting Dashboard
   ======================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#network-list .list-group-item {
    transition: all 0.2s;
}

#network-list .list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

#element-details code {
    font-size: 0.85em;
    word-break: break-all;
}

.quantum-status-card {
    border-left: 4px solid #667eea;
}

.quantum-metric {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

/* ========================================
   Vegetation Intelligence
   ======================================== */
.vegetation-intelligence .vegetation-hero {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    border: none;
    border-radius: 1.25rem;
    color: #ffffff;
}

.vegetation-intelligence .vegetation-hero .card-body {
    padding: 2.5rem;
}

.vegetation-intelligence .vegetation-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

.veg-meta-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.veg-meta-value {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.25rem;
}

.veg-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.veg-status-pill.ready {
    background: rgba(25, 135, 84, 0.85);
}

.veg-status-pill.syncing {
    background: rgba(255, 193, 7, 0.85);
    color: #1f2a44;
}

.veg-status-pill.error {
    background: rgba(220, 53, 69, 0.9);
}

.veg-metric-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.veg-metric-card:hover {
    box-shadow: 0 14px 30px rgba(27, 67, 50, 0.15);
    transform: translateY(-2px);
}

.veg-metric-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.veg-metric-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.veg-metric-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
}

.veg-metric-sub {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

.veg-panel {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.15rem;
}

.veg-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.veg-chip {
    border: 1px solid rgba(13, 110, 253, 0.35);
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.08);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.veg-chip:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.18);
}

.veg-chip.active {
    background-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.veg-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border-radius: 0.9rem;
    border: 1px dashed #ced4da;
    color: #6c757d;
    font-size: 0.95rem;
}

.veg-risk-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.veg-risk-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.veg-risk-item:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.veg-risk-item[data-severity="CRITICAL"] {
    border-left: 4px solid #dc3545;
}

.veg-risk-item[data-severity="HIGH"] {
    border-left: 4px solid #fd7e14;
}

.veg-risk-item[data-severity="MEDIUM"] {
    border-left: 4px solid #0d6efd;
}

.veg-risk-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.veg-risk-title {
    font-weight: 700;
    font-size: 1rem;
}

.veg-risk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.veg-risk-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 120px;
}

.veg-risk-score .badge {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.veg-risk-value {
    font-weight: 700;
    font-size: 1.75rem;
}

.veg-risk-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.6rem;
}

.veg-risk-flag {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.veg-table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.veg-table tbody td {
    font-size: 0.9rem;
    color: #343a40;
}

.veg-alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.veg-alert-item {
    border-left: 4px solid #0d6efd;
    background: rgba(13, 110, 253, 0.05);
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
}

.veg-alert-item[data-level="critical"] {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.veg-alert-item[data-level="warning"] {
    border-color: #fd7e14;
    background: rgba(253, 126, 20, 0.05);
}

.veg-alert-item strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.veg-alert-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.veg-dq-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.veg-dq-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.veg-progress {
    height: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
}

.veg-progress-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.veg-rule-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.veg-rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    background: #f8f9fa;
    font-size: 0.85rem;
}

.veg-media-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.veg-media-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.9rem;
    padding: 0.85rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.veg-media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.veg-media-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.veg-media-status {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.veg-media-progress {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.veg-media-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd 0%, #20c997 100%);
}

.veg-media-status[data-status="QUEUED"] {
    color: #6c757d;
}

.veg-media-status[data-status="PROCESSING"] {
    color: #0d6efd;
}

.veg-media-status[data-status="COMPLETE"] {
    color: #198754;
}

.veg-activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.veg-activity-item {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.veg-activity-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.veg-activity-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.veg-activity-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.veg-activity-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .vegetation-intelligence .vegetation-hero .card-body {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .vegetation-intelligence .vegetation-hero .card-body {
        padding: 1.5rem;
    }

    .vegetation-intelligence .vegetation-hero-meta {
        gap: 1rem;
    }

    .veg-risk-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .veg-risk-score {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .veg-activity-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .veg-activity-time {
        margin-top: 0.2rem;
    }
}

/* ========================================
   Quantum Defect Intelligence Console
   ======================================== */
.defect-intelligence {
    --defect-header-gradient-start: #20304f;
    --defect-header-gradient-end: #324a7b;
}

.defect-intelligence .page-header {
    background: linear-gradient(135deg, var(--defect-header-gradient-start), var(--defect-header-gradient-end));
    padding: 2.25rem 0;
    color: #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(32, 48, 79, 0.25);
}

.defect-intelligence .page-header .page-title {
    color: #ffffff;
}

.defect-intelligence .defect-hero {
    background: linear-gradient(135deg, #1f2a44 0%, #2f3f6b 100%);
    border: none;
    border-radius: 1.25rem;
    color: #ffffff;
}

.defect-intelligence .defect-hero .card-body {
    padding: 2.5rem;
}

.defect-intelligence .defect-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.45);
}

.defect-intelligence .defect-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
}

.defect-intelligence .defect-hero-lede {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    max-width: 640px;
}

.defect-intelligence .defect-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.defect-intelligence .defect-hero-actions .btn {
    border-radius: 999px;
    font-weight: 600;
    padding-block: 0.85rem;
    letter-spacing: 0.04em;
    min-width: 140px;
}

.defect-intelligence .defect-hero .defect-hero-meta {
    margin-top: 2rem;
}

.defect-intelligence .defect-section {
    background: #f5f2ec;
    border-radius: 1.5rem;
    padding: 1.6rem 2rem;
    box-shadow: 0 24px 50px rgba(18, 26, 40, 0.08);
    border: none;
}

.defect-intelligence .defect-status-callout {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background: linear-gradient(135deg, rgba(70, 113, 250, 0.18), rgba(55, 78, 174, 0.12));
    border-radius: 1.2rem;
    padding: 1.35rem 1.6rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.defect-intelligence .defect-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(47, 63, 107, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f3f6b;
    font-size: 1.05rem;
}

.defect-intelligence .defect-status-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #1f2634;
}

.defect-intelligence .defect-status-text {
    color: rgba(31, 38, 52, 0.78);
    font-size: 0.95rem;
    margin: 0;
}

.defect-hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin: 0;
}

.defect-meta-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.defect-meta-value {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-top: 0.2rem;
}

.defect-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.defect-status-pill.ready {
    background: rgba(25, 135, 84, 0.9);
}

.defect-status-pill.syncing {
    background: rgba(255, 193, 7, 0.85);
    color: #1f2a44;
}

.defect-status-pill.error {
    background: rgba(220, 53, 69, 0.9);
}

.defect-hero {
    background: linear-gradient(135deg, #1d2d4f 0%, #243a66 48%, #2f477d 100%);
    border: none;
    border-radius: 1.5rem;
    color: #fff;
    box-shadow: 0 24px 60px rgba(11, 23, 42, 0.22);
    position: relative;
    overflow: hidden;
}

.defect-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 40%);
    pointer-events: none;
    opacity: 0.85;
}

.defect-hero .card-body {
    position: relative;
    padding: 2.4rem 2.8rem;
    z-index: 1;
}

.defect-hero h1 {
    color: #ffffff;
    letter-spacing: -0.01em;
}

.defect-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
}

.defect-hero .defect-hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 0;
}

.defect-hero .defect-meta-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.defect-hero .btn {
    border-radius: 999px;
    font-weight: 600;
    padding-inline: 1.35rem;
}

.defect-hero .btn-outline-light:hover {
    color: #0f192f;
    background: #ffffff;
}

.defect-metric-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #ffffff;
}

.defect-metric-card:hover {
    box-shadow: 0 14px 30px rgba(47, 63, 107, 0.12);
    transform: translateY(-2px);
}

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

.defect-metric-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.defect-metric-value {
    display: block;
    font-size: 2.15rem;
    font-weight: 700;
    color: #1f2a44;
}

.defect-metric-sub {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.defect-panel {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.15rem;
    background: #ffffff;
}

.defect-intelligence .defect-register-card {
    border: none;
    border-radius: 1.35rem;
    box-shadow: 0 22px 55px rgba(18, 26, 44, 0.12);
    background: #ffffff;
}

.defect-intelligence .defect-register-card .card-header {
    border-bottom: 1px solid rgba(18, 28, 46, 0.08);
    padding: 1.5rem 1.75rem;
}

.defect-intelligence .defect-register-card .card-body {
    padding: 1.75rem;
}

.defect-intelligence .defect-analytics-card {
    border: none;
    border-radius: 1.35rem;
    box-shadow: 0 22px 55px rgba(18, 26, 44, 0.1);
    background: #ffffff;
}

.defect-intelligence .defect-analytics-card .card-header {
    padding: 1.4rem 1.75rem 0.75rem;
    border-bottom: none;
}

.defect-intelligence .defect-analytics-card .card-body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.defect-intelligence .chart-harness {
    position: relative;
    min-height: 320px;
}

.defect-intelligence .chart-harness canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.defect-entanglement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.1rem;
}

.defect-entanglement-card {
    padding: 1.15rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, rgba(47, 63, 107, 0.06), rgba(47, 63, 107, 0.02));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.defect-entanglement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47, 63, 107, 0.1);
}

.defect-entanglement-card header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.defect-entanglement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 0.9rem;
    font-size: 1.1rem;
}

.defect-entanglement-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1f2a44;
}

.defect-entanglement-count {
    font-size: 1.85rem;
    font-weight: 700;
    color: #2f3f6b;
    margin-bottom: 0.15rem;
}

.defect-entanglement-sub {
    font-size: 0.85rem;
}

.defect-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.defect-table-wrapper table {
    border-collapse: separate;
    border-spacing: 0;
}

.defect-table-wrapper thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.defect-table-wrapper tbody td {
    font-size: 0.92rem;
    color: #1f2a44;
}

.defect-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.defect-pill.severity-critical { background: rgba(220, 53, 69, 0.12); color: #c82333; }
.defect-pill.severity-high { background: rgba(253, 126, 20, 0.12); color: #e8590c; }
.defect-pill.severity-medium { background: rgba(13, 110, 253, 0.12); color: #0b5ed7; }
.defect-pill.severity-low { background: rgba(25, 135, 84, 0.12); color: #198754; }

.defect-pill.status-open { background: rgba(255, 193, 7, 0.18); color: #b8860b; }
.defect-pill.status-investigating { background: rgba(13, 202, 240, 0.18); color: #0b7285; }
.defect-pill.status-planned { background: rgba(25, 135, 84, 0.15); color: #0f5132; }
.defect-pill.status-in_progress { background: rgba(13, 110, 253, 0.18); color: #0b5ed7; }
.defect-pill.status-resolved { background: rgba(40, 167, 69, 0.15); color: #146c43; }
.defect-pill.status-closed { background: rgba(108, 117, 125, 0.18); color: #495057; }

.quantum-console-metrics {
    width: 100%;
}

.quantum-console-metrics .row {
    margin-left: 0;
    margin-right: 0;
}

.quantum-console-metrics .quantum-metric-card {
    height: 100%;
    background: linear-gradient(135deg, rgba(47, 63, 107, 0.07), rgba(47, 63, 107, 0.02));
    border: none;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 18px 42px rgba(18, 32, 58, 0.12);
    border-radius: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quantum-console-metrics .quantum-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 50px rgba(18, 32, 58, 0.14);
}

.quantum-console-metrics .quantum-metric-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.58);
    color: #2f3f6b;
    margin-bottom: 0.75rem;
}

.quantum-console-metrics .quantum-metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(31, 36, 48, 0.68);
    display: block;
}

.quantum-console-metrics .quantum-metric-value {
    font-size: 2.05rem;
    font-weight: 700;
    color: #1f2634;
    display: block;
}

.quantum-console-metrics .quantum-metric-sub {
    margin-top: 0.5rem;
    font-size: 0.92rem;
    color: rgba(31, 38, 53, 0.68);
    display: block;
}

.quantum-console-register .table thead th {
    border-bottom-width: 1px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: rgba(31, 38, 53, 0.55);
}

.quantum-console-register .table tbody tr:hover {
    background-color: rgba(47, 63, 107, 0.025);
}

.defect-intelligence .quantum-console-register .table {
    margin-bottom: 0;
}

.defect-intelligence .quantum-console-register .table tbody td {
    padding: 0.9rem 0.75rem;
}

.quantum-console-register .btn.btn-outline-primary,
.quantum-console-register .btn.btn-outline-success,
.quantum-console-register .btn.btn-outline-secondary {
    border-radius: 12px;
    border-width: 1.5px;
}

.quantum-console-register .btn.btn-outline-primary {
    border-color: rgba(76, 45, 255, 0.35);
    color: #4c2dff;
}

.quantum-console-register .btn.btn-outline-success {
    border-color: rgba(19, 173, 125, 0.35);
    color: #13ad7d;
}

.quantum-console-register .btn.btn-outline-secondary {
    border-color: rgba(190, 161, 76, 0.35);
    color: #c49c3a;
}

.quantum-console-register .btn:hover {
    opacity: 0.9;
}

.defect-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.defect-timeline-item {
    display: grid;
    grid-template-columns: 18px auto;
    gap: 0.85rem;
}

.defect-timeline-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.35rem;
}

.defect-dq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.defect-dq-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.defect-progress {
    height: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
}

.defect-rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.defect-rule-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 0.6rem 0.8rem;
    border-radius: 0.7rem;
    font-size: 0.85rem;
}

.defect-budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.defect-budget-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.defect-action-drawer {
    border-radius: 1rem;
}

.defect-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

@media (max-width: 992px) {
    .defect-intelligence .defect-hero .card-body {
        padding: 2rem;
    }

    .defect-intelligence .defect-section {
        padding: 1.4rem 1.6rem;
    }

    .defect-intelligence .defect-status-callout {
        flex-direction: column;
        align-items: flex-start;
    }

    .defect-intelligence .defect-register-card .card-body {
        padding: 1.35rem;
    }

    .defect-filter-bar {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .defect-intelligence .defect-hero .card-body {
        padding: 1.6rem;
    }

    .defect-hero-meta {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .defect-entanglement-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .defect-intelligence .defect-section {
        padding: 1.15rem 1.25rem;
    }

    .defect-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .defect-table-wrapper table {
        min-width: 720px;
    }
}

@media (max-width: 768px) {
    .defect-intelligence .defect-hero-actions {
        width: 100%;
    }

    .defect-intelligence .defect-hero-actions .btn {
        flex: 1 1 auto;
    }
}

/* ========================================
   HOME PAGE - OPERATIONAL FOCUS MODULE CARDS
   ======================================== */

/* Section Title */
#home-overview-panel h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Module Cards */
.module-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.module-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.module-card:hover::before {
    opacity: 1;
}

/* Module Card Header */
.module-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.module-card:hover .module-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Icon Colors - Asset Health */
.module-card:nth-child(1) .module-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Icon Colors - Maintenance Queue */
.module-card:nth-child(2) .module-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Icon Colors - Projects Progress */
.module-card:nth-child(3) .module-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Icon Colors - Compliance */
.module-card:nth-child(4) .module-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.module-card-header h6 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
}

.module-card-header span {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Module Card Body */
.module-card-body {
    padding: 1.5rem;
}

.module-card-body p {
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Module Pills */
.module-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.module-pills span {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.module-card:hover .module-pills span {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #a5b4fc;
    color: #4338ca;
    transform: translateY(-1px);
}

/* Quick Actions Section */
#home-overview-panel .col-lg-4 h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

#home-overview-panel .d-grid {
    gap: 0.75rem;
}

#home-overview-panel .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    border-width: 2px;
    font-size: 0.9375rem;
}

#home-overview-panel .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#home-overview-panel .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#home-overview-panel .btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #ffffff;
}

#home-overview-panel .btn-outline-primary:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Apply same styling to other tab panels */
#home-assets-panel h5,
#home-maintenance-panel h5,
#home-projects-panel h5,
#home-analytics-panel h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Style cards in other tabs */
#home-assets-panel .card,
#home-maintenance-panel .card,
#home-projects-panel .card,
#home-analytics-panel .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

#home-assets-panel .card::before,
#home-maintenance-panel .card::before,
#home-projects-panel .card::before,
#home-analytics-panel .card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#home-assets-panel .card:hover,
#home-maintenance-panel .card:hover,
#home-projects-panel .card:hover,
#home-analytics-panel .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

#home-assets-panel .card:hover::before,
#home-maintenance-panel .card:hover::before,
#home-projects-panel .card:hover::before,
#home-analytics-panel .card:hover::before {
    opacity: 1;
}

/* Card headers in other tabs */
#home-assets-panel .card-header,
#home-maintenance-panel .card-header,
#home-projects-panel .card-header,
#home-analytics-panel .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

#home-assets-panel .card-header h6,
#home-maintenance-panel .card-header h6,
#home-projects-panel .card-header h6,
#home-analytics-panel .card-header h6 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
}

#home-assets-panel .card-header i,
#home-maintenance-panel .card-header i,
#home-projects-panel .card-header i,
#home-analytics-panel .card-header i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    margin-right: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#home-assets-panel .card:hover .card-header i,
#home-maintenance-panel .card:hover .card-header i,
#home-projects-panel .card:hover .card-header i,
#home-analytics-panel .card:hover .card-header i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Icon colors for Assets tab */
#home-assets-panel .card:nth-child(1) .card-header i {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

#home-assets-panel .card:nth-child(2) .card-header i {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Icon colors for Maintenance tab */
#home-maintenance-panel .card:nth-child(1) .card-header i {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

#home-maintenance-panel .card:nth-child(2) .card-header i {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Icon colors for Projects tab */
#home-projects-panel .card:nth-child(1) .card-header i {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

#home-projects-panel .card:nth-child(2) .card-header i {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Icon colors for Analytics tab */
#home-analytics-panel .card:nth-child(1) .card-header i {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

#home-analytics-panel .card:nth-child(2) .card-header i {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* Card body styling in other tabs */
#home-assets-panel .card-body,
#home-maintenance-panel .card-body,
#home-projects-panel .card-body,
#home-analytics-panel .card-body {
    padding: 1.5rem;
}

#home-assets-panel .card-body p,
#home-maintenance-panel .card-body p,
#home-projects-panel .card-body p,
#home-analytics-panel .card-body p {
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .module-card-header,
    #home-assets-panel .card-header,
    #home-maintenance-panel .card-header,
    #home-projects-panel .card-header,
    #home-analytics-panel .card-header {
        padding: 1rem 1.25rem;
    }
    
    .module-card-body,
    #home-assets-panel .card-body,
    #home-maintenance-panel .card-body,
    #home-projects-panel .card-body,
    #home-analytics-panel .card-body {
        padding: 1.25rem;
    }
    
    .module-icon,
    #home-assets-panel .card-header i,
    #home-maintenance-panel .card-header i,
    #home-projects-panel .card-header i,
    #home-analytics-panel .card-header i {
        width: 44px;
        height: 44px;
        font-size: 1.375rem;
    }
}

@media (max-width: 768px) {
    #home-overview-panel h5,
    #home-assets-panel h5,
    #home-maintenance-panel h5,
    #home-projects-panel h5,
    #home-analytics-panel h5 {
        font-size: 1.25rem;
    }
    
    .module-card-header h6,
    #home-assets-panel .card-header h6,
    #home-maintenance-panel .card-header h6,
    #home-projects-panel .card-header h6,
    #home-analytics-panel .card-header h6 {
        font-size: 1rem;
    }
}

/* ========================================
   HEADER SEARCH AUTocomplete
   ======================================== */

#header-search-container {
    position: relative;
}

.header-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.header-search-results.show {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover,
.search-result-item.active {
    background-color: #f8fafc;
}

.search-result-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}

.search-result-name mark {
    background-color: #fef08a;
    color: #1e293b;
    padding: 0 2px;
    font-weight: 600;
    border-radius: 2px;
}

.search-result-category {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

/* Scrollbar styling for results */
.header-search-results::-webkit-scrollbar {
    width: 6px;
}

.header-search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}

.header-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.header-search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus state for search input */
#header-search-input:focus {
    outline: none;
    border-color: var(--primary, #452B90);
    box-shadow: 0 0 0 3px rgba(69, 43, 144, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-search-results {
        max-height: 240px;
    }
    
    .search-result-item {
        padding: 10px 14px;
    }
    
    .search-result-name {
        font-size: 13px;
    }
    
    .search-result-category {
        font-size: 11px;
    }
}

/* ============================================================================
   NOTIFICATION DROPDOWN STYLING
   ============================================================================ */

/* Notification dropdown menu */
#notification-bell-dropdown .dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin-top: 8px;
    background: #ffffff;
    z-index: 1050;
}

/* Notification dropdown header */
#notification-bell-dropdown .dropdown-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    margin: 0;
}

#notification-bell-dropdown .dropdown-header .fw-bold {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

#notification-bell-dropdown .dropdown-header .small {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

#notification-bell-dropdown .dropdown-header .small:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Notification dropdown list container */
#notification-bell-dropdown #notificationDropdownList {
    padding: 0.5rem 0;
    background: #ffffff;
}

/* Notification items */
#notification-bell-dropdown .dropdown-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    border-radius: 0;
    background: #ffffff;
}

#notification-bell-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

#notification-bell-dropdown .dropdown-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(2px);
}

#notification-bell-dropdown .dropdown-item.bg-light {
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%) !important;
    border-left: 3px solid #f59e0b;
}

#notification-bell-dropdown .dropdown-item.bg-light:hover {
    background: linear-gradient(90deg, #fde68a 0%, #fcd34d 100%) !important;
}

/* Notification item badges */
#notification-bell-dropdown .dropdown-item .badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

#notification-bell-dropdown .dropdown-item .badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Notification item title */
#notification-bell-dropdown .dropdown-item .fw-bold {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

/* Notification item message */
#notification-bell-dropdown .dropdown-item .small.text-muted {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    margin-top: 0.25rem;
}

/* Notification item time */
#notification-bell-dropdown .dropdown-item small.text-muted {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Notification dropdown footer */
#notification-bell-dropdown .dropdown-footer {
    background: #f8fafc;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    margin: 0;
}

#notification-bell-dropdown .dropdown-footer .btn-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#notification-bell-dropdown .dropdown-footer .btn-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    text-decoration: none;
}

#notification-bell-dropdown .dropdown-footer .btn-link.text-danger:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Loading state */
#notification-bell-dropdown #notificationDropdownLoading {
    padding: 2rem 1.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Empty state */
#notification-bell-dropdown .dropdown-item:only-child {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #94a3b8;
}

/* Scrollbar styling for notification list */
#notification-bell-dropdown #notificationDropdownList::-webkit-scrollbar {
    width: 6px;
}

#notification-bell-dropdown #notificationDropdownList::-webkit-scrollbar-track {
    background: #f8fafc;
}

#notification-bell-dropdown #notificationDropdownList::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#notification-bell-dropdown #notificationDropdownList::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
