/* Executive Workday Dashboard CSS - Inspired by PowerBI / Factorial HR */
.exec-dash-container {
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
}

.exec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.exec-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* TV Mode Button */
.btn-tv {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}
.btn-tv:hover { background: var(--primary-color-dark); }

/* Quick KPIs */
.exec-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.exec-kpi-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 4px solid var(--border-color);
    transition: transform 0.2s;
}
.exec-kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-inside { border-top-color: #10B981; }
.kpi-outside { border-top-color: #9CA3AF; }
.kpi-lunch { border-top-color: #F59E0B; }
.kpi-workshop { border-top-color: #3B82F6; }
.kpi-absent { border-top-color: #EF4444; }
.kpi-finished { border-top-color: #1F2937; }

.exec-kpi-val {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}
.exec-kpi-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
}

/* Main Dashboard Grid */
.exec-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Chart Panel */
.exec-panel {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}
.exec-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Real-time users grid (inside the panel) */
.exec-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.exec-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-body);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}
.exec-user-card img, .exec-user-card .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
}
.exec-user-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}
.exec-user-details p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Live Monitor (Ticker) */
.exec-ticker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-body);
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}
.ticker-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 0.8rem;
}
.ticker-content {
    flex-grow: 1;
}
.ticker-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}
.ticker-mov {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.ticker-time {
    font-size: 0.75rem;
    font-weight: bold;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* TV Mode overrides */
body.tv-mode .sidebar { display: none !important; }
body.tv-mode .topbar { display: none !important; }
body.tv-mode .main-content { margin-left: 0 !important; padding: 0 !important; }
body.tv-mode .exec-dash-container { 
    max-width: 100vw; 
    height: 100vh;
    padding: 2rem;
    background: #0f172a; 
    color: #f1f5f9;
}
body.tv-mode .exec-kpi-card, body.tv-mode .exec-panel {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
body.tv-mode .exec-user-card, body.tv-mode .ticker-item {
    background: #0f172a;
}
body.tv-mode .exec-title, body.tv-mode .exec-panel-title, body.tv-mode .exec-kpi-val, body.tv-mode .exec-kpi-lbl {
    color: #f8fafc;
}
body.tv-mode .exec-user-details p, body.tv-mode .ticker-mov {
    color: #94a3b8;
}
