/* ═══════════════════════════════════════════════════════════
   MDEMS Modern Enhancement Theme
   Premium aesthetics, glassmorphism, and transitions
   placeholder aria-label <label
   ═══════════════════════════════════════════════════════════ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    
    --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    --accent-glow: 0 0 20px rgba(59, 130, 246, 0.4);
    
    --card-radius: 20px;
    --transition-premium: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Card Style */
.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s var(--transition-premium), box-shadow 0.3s var(--transition-premium);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* Enhanced KPI Badges */
.landing-stat-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
}

.landing-stat-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
}

/* Interactive Charts Container */
.chart-container-premium {
    padding: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Centralized History Panel */
.history-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--glass-border);
    z-index: 5000;
    transition: right 0.5s var(--transition-premium);
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.history-panel.open {
    right: 0;
}

.history-item {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    border-left: 3px solid var(--brand-primary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: slideUpFade 0.6s var(--transition-premium) forwards;
}

.history-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    margin-top: 2px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.history-action {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
}

.history-time {
    color: var(--text-muted);
    font-size: 11px;
}

.history-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.history-delta {
    background: rgba(0,0,0,0.03);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #334155;
    border: 1px solid rgba(0,0,0,0.05);
}
