/* ========================================
   Essential Eight Dashboard - Styles
   Modern Dark Theme with Glassmorphism
   ======================================== */

/* CSS Variables */
.e8{
    /* Color Palette */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(31, 41, 55, 0.9);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    /* Status Colors */
    --status-effective: #10b981;
    --status-effective-bg: rgba(16, 185, 129, 0.15);
    --status-implemented: #3b82f6;
    --status-implemented-bg: rgba(59, 130, 246, 0.15);
    --status-not-effective: #f59e0b;
    --status-not-effective-bg: rgba(245, 158, 11, 0.15);
    --status-not-implemented: #ef4444;
    --status-not-implemented-bg: rgba(239, 68, 68, 0.15);

    /* Evidence Quality Colors */
    --evidence-excellent: #10b981;
    --evidence-good: #3b82f6;
    --evidence-fair: #f59e0b;
    --evidence-poor: #ef4444;

    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Border & Effects */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);

    /* Layout */
    --nav-height: 72px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
.e8 *, .e8 *::before, .e8 *::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.e8{
    scroll-behavior: smooth;
}

.e8{
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.e8 .bg-gradient{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.e8 .bg-grid{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Native panel overrides */
.e8{
    --nav-height: 0px;
    position: relative;
}

.e8 .bg-gradient,
.e8 .bg-grid{
    position: absolute;
}

.e8 .dashboard-container{
    padding: 2rem;
}

.e8 .dashboard-header{
    display: block;
}

.e8 .header-actions{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

/* Navigation */
.e8 .navbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.e8 .nav-brand{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.e8 .brand-icon{
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.e8 .brand-icon svg{
    width: 20px;
    height: 20px;
}

.e8 .nav-links{
    display: flex;
    gap: 0.5rem;
}

.e8 .nav-link{
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.e8 .nav-link:hover, .e8 .nav-link.active{
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.e8 .nav-actions{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.e8 .demo-badge{
    padding: 0.35rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-effective);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.e8 .btn-primary{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.e8 .btn-primary:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.e8 .btn-primary svg{
    width: 16px;
    height: 16px;
}

/* Dashboard Container */
.e8 .dashboard-container{
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
}

/* Header Section */
.e8 .dashboard-header{
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: var(--glass-blur);
}

.e8 .header-content{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.e8 .header-tag{
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.e8 .header-text h1{
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.e8 .header-text p{
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.e8 .header-meta{
    display: flex;
    gap: 2rem;
}

.e8 .meta-item{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.e8 .meta-label{
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.e8 .meta-value{
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* KPI Section */
.e8 .kpi-section{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.e8 .kpi-card{
    position: relative;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    backdrop-filter: var(--glass-blur);
    transition: var(--transition);
    overflow: hidden;
}

.e8 .kpi-card:hover{
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.e8 .kpi-card.compliance-score{
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.e8 .kpi-icon{
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.e8 .kpi-icon.effective{
    background: var(--status-effective-bg);
    color: var(--status-effective);
}

.e8 .kpi-icon.automated{
    background: var(--status-implemented-bg);
    color: var(--status-implemented);
}

.e8 .kpi-icon.warning{
    background: var(--status-not-effective-bg);
    color: var(--status-not-effective);
}

.e8 .kpi-icon svg{
    width: 24px;
    height: 24px;
}

.e8 .kpi-content{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.e8 .kpi-value{
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.e8 .kpi-label{
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.e8 .kpi-chart{
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.e8 .circular-progress{
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.e8 .circle-bg{
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 3;
}

.e8 .circle-progress{
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1s ease-out;
}

.e8 .kpi-trend{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.e8 .kpi-trend.positive{
    color: var(--status-effective);
}

.e8 .kpi-trend.negative{
    color: var(--status-not-effective);
}

.e8 .kpi-trend svg{
    width: 14px;
    height: 14px;
}

/* Dashboard Grid */
.e8 .dashboard-grid{
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cards */
.e8 .card{
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    backdrop-filter: var(--glass-blur);
    overflow: hidden;
}

.e8 .card-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.e8 .card-header h2{
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.e8 .card-header h2 svg{
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.e8 .card-actions{
    display: flex;
    gap: 0.5rem;
}

.e8 .icon-btn{
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.e8 .icon-btn:hover{
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.e8 .icon-btn svg{
    width: 16px;
    height: 16px;
}

.e8 .card-body{
    padding: 1.5rem;
}

/* Strategy Chart */
.e8 .strategy-chart{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.e8 .strategy-bar{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.e8 .strategy-label{
    width: 180px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.e8 .strategy-track{
    flex: 1;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

.e8 .strategy-fill{
    height: 100%;
    border-radius: var(--border-radius-sm);
    transition: width 1s ease-out;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.e8 .strategy-fill span{
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.e8 .strategy-status{
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.e8 .strategy-status.effective{
    background: var(--status-effective-bg);
    color: var(--status-effective);
}

.e8 .strategy-status.not-effective{
    background: var(--status-not-effective-bg);
    color: var(--status-not-effective);
}

.e8 .strategy-status svg{
    width: 14px;
    height: 14px;
}

/* Donut Chart */
.e8 .donut-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.e8 .donut-chart{
    position: relative;
    width: 160px;
    height: 160px;
}

.e8 .donut-chart svg{
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.e8 .donut-hole{
    fill: var(--bg-secondary);
}

.e8 .donut-ring{
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 12;
}

.e8 .donut-segment{
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.e8 .donut-center{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.e8 .donut-value{
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.e8 .donut-label{
    font-size: 0.75rem;
    color: var(--text-muted);
}

.e8 .donut-legend{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.e8 .legend-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.e8 .legend-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.e8 .legend-label{
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.e8 .legend-value{
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Evidence Bars */
.e8 .evidence-bars{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.e8 .evidence-item{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.e8 .evidence-label{
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.e8 .evidence-count{
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.e8 .evidence-track{
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
}

.e8 .evidence-fill{
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.e8 .evidence-fill.excellent{
    background: var(--evidence-excellent);
}

.e8 .evidence-fill.good{
    background: var(--evidence-good);
}

.e8 .evidence-fill.fair{
    background: var(--evidence-fair);
}

.e8 .evidence-fill.poor{
    background: var(--evidence-poor);
}

/* Controls Section */
.e8 .controls-section{
    margin-bottom: 2rem;
}

.e8 .table-card .card-header{
    flex-wrap: wrap;
    gap: 1rem;
}

.e8 .table-filters{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.e8 .filter-group{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.e8 .filter-group label{
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.e8 .filter-group select{
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.e8 .search-box{
    position: relative;
}

.e8 .search-box svg{
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.e8 .search-box input{
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 200px;
    transition: var(--transition);
}

.e8 .search-box input:focus{
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.e8 .search-box input::placeholder{
    color: var(--text-muted);
}

/* Table */
.e8 .table-container{
    overflow-x: auto;
}

.e8 .controls-table{
    width: 100%;
    border-collapse: collapse;
}

.e8 .controls-table th, .e8 .controls-table td{
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.e8 .controls-table th{
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.e8 .controls-table tbody tr{
    transition: var(--transition);
}

.e8 .controls-table tbody tr:hover{
    background: rgba(99, 102, 241, 0.05);
}

.e8 .control-title{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.e8 .control-id{
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
}

.e8 .control-name{
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.e8 .strategy-tag{
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50px;
    white-space: nowrap;
}

.e8 .status-badge{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
}

.e8 .status-badge.effective{
    background: var(--status-effective-bg);
    color: var(--status-effective);
}

.e8 .status-badge.implemented{
    background: var(--status-implemented-bg);
    color: var(--status-implemented);
}

.e8 .status-badge.not-effective{
    background: var(--status-not-effective-bg);
    color: var(--status-not-effective);
}

.e8 .status-badge.not-implemented{
    background: var(--status-not-implemented-bg);
    color: var(--status-not-implemented);
}

.e8 .status-badge svg{
    width: 12px;
    height: 12px;
}

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

.e8 .evidence-badge.excellent{
    background: rgba(16, 185, 129, 0.15);
    color: var(--evidence-excellent);
}

.e8 .evidence-badge.good{
    background: rgba(59, 130, 246, 0.15);
    color: var(--evidence-good);
}

.e8 .evidence-badge.fair{
    background: rgba(245, 158, 11, 0.15);
    color: var(--evidence-fair);
}

.e8 .evidence-badge.poor{
    background: rgba(239, 68, 68, 0.15);
    color: var(--evidence-poor);
}

.e8 .test-type{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.e8 .test-type svg{
    width: 14px;
    height: 14px;
}

.e8 .test-type.automated{
    color: var(--status-implemented);
}

.e8 .test-type.manual{
    color: var(--text-secondary);
}

.e8 .date-value{
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.e8 .action-btn{
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.e8 .action-btn:hover{
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Insights Section */
.e8 .insights-card .card-body{
    padding: 1rem 1.5rem 1.5rem;
}

.e8 .insights-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.e8 .insight-item{
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.e8 .insight-item:hover{
    border-color: var(--border-glow);
    background: rgba(99, 102, 241, 0.05);
}

.e8 .insight-item.critical{
    border-left: 3px solid var(--status-not-implemented);
}

.e8 .insight-item.warning{
    border-left: 3px solid var(--status-not-effective);
}

.e8 .insight-item.success{
    border-left: 3px solid var(--status-effective);
}

.e8 .insight-icon{
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.e8 .insight-item.critical .insight-icon{
    background: var(--status-not-implemented-bg);
    color: var(--status-not-implemented);
}

.e8 .insight-item.warning .insight-icon{
    background: var(--status-not-effective-bg);
    color: var(--status-not-effective);
}

.e8 .insight-item.success .insight-icon{
    background: var(--status-effective-bg);
    color: var(--status-effective);
}

.e8 .insight-icon svg{
    width: 18px;
    height: 18px;
}

.e8 .insight-title{
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.e8 .insight-description{
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.e8 .dashboard-footer{
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.e8 .footer-content p{
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.e8 .footer-disclaimer{
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modal */
.e8 .modal-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.e8 .modal-overlay.active{
    opacity: 1;
    visibility: visible;
}

.e8 .modal{
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.e8 .modal-overlay.active .modal{
    transform: translateY(0);
    opacity: 1;
}

.e8 .modal-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.e8 .modal-header h3{
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.e8 .modal-close{
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.e8 .modal-close:hover{
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-not-implemented);
}

.e8 .modal-close svg{
    width: 18px;
    height: 18px;
}

.e8 .modal-body{
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.e8 .detail-section{
    margin-bottom: 1.5rem;
}

.e8 .detail-section:last-child{
    margin-bottom: 0;
}

.e8 .detail-label{
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.e8 .detail-value{
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.e8 .detail-meta{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
}

/* Animations */
@keyframes fadeIn{
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.e8 .kpi-card, .e8 .card, .e8 .insight-item{
    animation: fadeIn 0.5s ease-out forwards;
}

.e8 .kpi-card:nth-child(1){
    animation-delay: 0.1s;
}

.e8 .kpi-card:nth-child(2){
    animation-delay: 0.2s;
}

.e8 .kpi-card:nth-child(3){
    animation-delay: 0.3s;
}

.e8 .kpi-card:nth-child(4){
    animation-delay: 0.4s;
}

/* Responsive */
@media (max-width: 1200px){
    .e8 .dashboard-grid{
        grid-template-columns: 1fr 1fr;
    }

    .e8 .insights-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px){
    .e8 .kpi-section{
        grid-template-columns: repeat(2, 1fr);
    }

    .e8 .dashboard-grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px){
    .e8 .navbar{
        padding: 0 1rem;
    }

    .e8 .nav-links{
        display: none;
    }

    .e8 .dashboard-container{
        padding: 1rem;
        padding-top: calc(var(--nav-height) + 1rem);
    }

    .e8 .dashboard-header{
        padding: 1.5rem;
    }

    .e8 .header-text h1{
        font-size: 1.75rem;
    }

    .e8 .kpi-section{
        grid-template-columns: 1fr;
    }

    .e8 .table-filters{
        flex-wrap: wrap;
    }

    .e8 .insights-grid{
        grid-template-columns: 1fr;
    }

    .e8 .sentinel-architecture{
        flex-direction: column;
        gap: 0.5rem;
    }

    .e8 .arch-arrow{
        transform: rotate(90deg);
    }

    .e8 .trend-chart-container{
        flex-direction: column;
    }
}

/* ========================================
   Sentinel Integration Section
   ======================================== */

.e8 .sentinel-info-section{
    margin-bottom: 2rem;
}

.e8 .sentinel-card .card-header{
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.e8 .connection-status{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.e8 .connection-status.connected{
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-effective);
}

.e8 .status-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse{

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.e8 .sentinel-architecture{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.e8 .arch-step{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    min-width: 140px;
    text-align: center;
    transition: var(--transition);
}

.e8 .arch-step:hover{
    border-color: var(--border-glow);
    background: rgba(99, 102, 241, 0.05);
}

.e8 .arch-step.highlight{
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.e8 .arch-icon{
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    color: var(--accent-primary);
}

.e8 .arch-icon svg{
    width: 20px;
    height: 20px;
}

.e8 .arch-text{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.e8 .arch-title{
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.e8 .arch-desc{
    font-size: 0.7rem;
    color: var(--text-muted);
}

.e8 .arch-arrow{
    color: var(--text-muted);
    flex-shrink: 0;
}

.e8 .arch-arrow svg{
    width: 20px;
    height: 20px;
}

.e8 .sentinel-details{
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.e8 .detail-chip{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 50px;
}

.e8 .chip-label{
    font-size: 0.75rem;
    color: var(--text-muted);
}

.e8 .chip-value{
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   Historical Trends Section
   ======================================== */

.e8 .trends-section{
    margin-bottom: 2rem;
}

.e8 .trends-card .card-header{
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.e8 .quarter-selector{
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.e8 .quarter-selector label{
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.e8 .quarter-selector select{
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.e8 .trend-chart-container{
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.e8 .trend-chart{
    flex: 2;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 0;
}

.e8 .trend-bar-group{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.e8 .trend-bar-container{
    width: 100%;
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0.5rem;
}

.e8 .trend-bar{
    width: 100%;
    max-width: 60px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 6px 6px 0 0;
    transition: height 1s ease-out;
    position: relative;
    cursor: pointer;
}

.e8 .trend-bar:hover{
    filter: brightness(1.2);
}

.e8 .trend-bar.current{
    background: linear-gradient(180deg, var(--status-effective) 0%, #059669 100%);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.e8 .trend-bar-value{
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.e8 .trend-bar-label{
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.e8 .trend-summary{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.e8 .trend-stat{
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.e8 .trend-stat:hover{
    border-color: var(--border-glow);
}

.e8 .trend-stat.improvement{
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.e8 .trend-stat-value{
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--status-effective);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.e8 .trend-stat-label{
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Control History in Modal */
.e8 .control-history{
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.e8 .control-history h4{
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.e8 .control-history h4 svg{
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.e8 .history-timeline{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.e8 .history-item{
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
}

.e8 .history-quarter{
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 70px;
}

.e8 .history-status{
    flex: 1;
}
