/* Base & Variables */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.4);
    --border-color: rgba(255, 255, 255, 0.08); /* slightly visible borders */
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-accent: #38bdf8;
    
    /* Accents */
    --primary: #3b82f6; /* Blue */
    --primary-glow: rgba(59, 130, 246, 0.5);
    
    --success: #10b981; /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.5);
    
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Glass Morphism Base */
    --card-backdrop: blur(16px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-darker);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Background Gradients & Glow Effects for Premium Look */
.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    top: -200px;
    left: -100px;
    background: rgba(56, 189, 248, 0.15); /* Sky Blue */
}

.glow-2 {
    bottom: -100px;
    right: -200px;
    background: rgba(139, 92, 246, 0.15); /* Purple */
}

.glow-3 {
    top: 40%;
    left: 40%;
    background: rgba(16, 185, 129, 0.08); /* Emerald */
}

.container {
    width: 100%;
    max-width: 1920px; /* Full HD TV standard */
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-icon {
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.logo h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.3); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-center h2 {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right .datetime {
    text-align: right;
}

.header-right .time {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.header-right .date {
    font-size: 15px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

/* --- Cards (Glassmorphism Base) --- */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--card-backdrop);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h3 i {
    color: var(--text-accent);
}

/* --- Layout Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    flex-grow: 1;
    overflow: hidden; /* Hide scrollbars for TV */
}

.col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Premium Feature Card : Dikey Hat 3 --- */
.premium-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.05);
    flex-grow: 1; /* Stretch to fill */
}

/* Badge styling */
.status-badge.running {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Progress bar */
.progress-section {
    padding: 24px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

.progress-labels .percentage {
    color: var(--success);
    font-weight: 700;
    font-size: 20px;
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 8px;
    box-shadow: 0 0 10px var(--success-glow);
    transition: width 1s ease-in-out;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Data List (from image reference) */
.data-list {
    list-style: none;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Slightly tighter gap to fit all */
    flex-grow: 1;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.data-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.item-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    color: var(--text-secondary);
    font-weight: 500;
}

.item-label i {
    width: 24px;
    text-align: center;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.item-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Sub-items (a) and (b) formatting */
.sub-item {  padding-left: 40px; background: transparent; }
.sub-item .item-label { font-size: 16px; }
.sub-item .item-value { font-size: 20px; }
.sub-item .item-label i { background: rgba(56, 189, 248, 0.1); color: var(--text-accent); }

/* Emphasis */
.target-item { border-left: 4px solid var(--primary); background: rgba(59, 130, 246, 0.05); }
.total-item { border-left: 4px solid var(--success); background: rgba(16, 185, 129, 0.05); margin-top: auto; }
.total-item .item-label { color: var(--text-primary); font-weight: 600; }
.total-item .item-value { font-size: 32px; }

.highlight { color: var(--warning); }
.text-accent { color: var(--text-accent); }
.success { color: var(--success); text-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }

/* --- Info Card (OEE) Grid Layout --- */
.info-card { padding-bottom: 24px; }
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
}
.kpi-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.kpi-title { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500;}
.kpi-val { font-size: 28px; font-weight: 700; }
.kpi-val.success { color: var(--success); }
.kpi-val.warning { color: var(--warning); }

/* --- Charts Layout Container --- */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
}

.chart-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 250px;
}

.chart-wrapper {
    padding: 24px;
    flex-grow: 1;
    position: relative;
    width: 100%;
    /* Keep chart properly contained */
    min-height: 0;
}

/* Custom Chart Top Legends */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; align-items: center; }

.chart-legend-custom {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.dot-plan { background: rgba(255, 255, 255, 0.2); border: 2px solid rgba(255, 255, 255, 0.5); }
.dot-gercek { background: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }


/* Horizontal KPI Mini Cards */
.kpi-horizontal-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 4px; /* offset inner padding */
}

.mini-kpi {
    flex-direction: row;
    align-items: center;
    padding: 20px;
    gap: 20px;
    border-radius: 20px;
}

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.kpi-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.kpi-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.kpi-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.kpi-info h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.kpi-info .val {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.kpi-info .val small {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}
