/* Reusable Dashboard Frame Styles */
:root {
    --status-green: #10B981;
    --status-red: #EF4444;
    --status-orange: #F59E0B;
    --status-blue: #3B82F6;
    
    --bg-window: rgba(15, 23, 42, 0.95);
    --bg-panel: rgba(30, 41, 59, 0.8);
    --bg-card: rgba(51, 65, 85, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    
    --df-text-primary: #F8FAFC;
    --df-text-secondary: #CBD5E1;
    --df-text-muted: #94A3B8;
}

.dashboard-frame {
    position: relative;
    width: 100%;
    max-width: 1250px;
    height: 980px;
    transform: rotateX(10deg) rotateY(-8deg) rotateZ(1deg);
    transform-style: preserve-3d;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin: 0 auto;
}

.dashboard-frame:hover {
    transform: rotateX(5deg) rotateY(-3deg) rotateZ(0deg) scale(1.02);
}

.frame-chrome {
    position: absolute;
    inset: 0;
    background: var(--bg-window);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.frame-titlebar {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 32px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border);
}

.traffic-lights {
    display: flex;
    gap: 10px;
}
.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.tl-red { background: #FF5F57; box-shadow: 0 0 8px rgba(255, 95, 87, 0.5); }
.tl-yellow { background: #FEBC2E; box-shadow: 0 0 8px rgba(254, 188, 46, 0.5); }
.tl-green { background: #28C840; box-shadow: 0 0 8px rgba(40, 200, 64, 0.5); }

.frame-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--df-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.grid-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    flex: 1;
    overflow: hidden;
}

.grid-sidebar {
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--df-text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.sidebar-item.active {
    background: rgba(16, 185, 129, 0.12);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3) inset;
}

.grid-main {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0) 0%, rgba(30, 41, 59, 0.6) 100%);
    overflow: hidden;
    position: relative;
}

/* Management AZ Specific Dashboard Elements */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--status-blue);
    opacity: 0.5;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--df-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--df-text-primary);
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.up { color: var(--status-green); }
.stat-trend.down { color: var(--status-red); }

.stat-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 16px;
    right: 16px;
}
.stat-status.compliant { background: var(--status-green); box-shadow: 0 0 8px var(--status-green); }

/* Quick Alerts Widget */
.alert-widget {
    background: rgba(244, 63, 94, 0.05);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--df-text-secondary);    flex-shrink: 0;}

.alert-widget i {
    color: #F43F5E;
    font-size: 16px;
}

/* Chart Card Integration */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    position: relative;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* Specific adjustments for Management AZ Chart integration */
.chart-card .az-hero-chart-canvas-wrap {
    flex: 1;
    width: 100%;
    min-height: 0;
}

@media (max-width: 1400px) {
    .dashboard-frame { max-width: 900px; height: 920px; }
    .grid-body { grid-template-columns: 220px 1fr; }
}

@media (max-width: 1200px) {
    .dashboard-frame { max-width: 800px; height: 880px; transform: scale(0.95) rotateX(8deg) rotateY(-6deg); }
    .grid-sidebar { padding: 24px 16px; }
}

@media (max-width: 1024px) {
    .dashboard-frame { max-width: 100%; height: 940px; transform: rotateX(5deg) rotateY(-3deg); }
    .grid-sidebar { display: none; }
    .grid-body { grid-template-columns: 1fr; }
    .grid-main { padding: 32px; }
}

@media (max-width: 768px) {
    .dashboard-frame { transform: none; height: 1020px; margin-top: 40px; }
    .frame-chrome { border-radius: 20px; }
    .grid-main { padding: 24px; }
    .dashboard-stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { padding: 12px 16px; }
    .stat-value { font-size: 20px; }
}

@media (max-width: 480px) {
    .dashboard-frame { height: 1080px; }
    .frame-titlebar { height: 50px; padding: 0 20px; }
}
