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

body {
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
    height: 100vh;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 15px; 
    max-width: 1600px;
    margin: 0 auto;
}

/* SHARED GLASS CARD STYLE */
.glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 16px;
    padding: 15px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- TOP BAR STYLING --- */
.top-grid {
    display: grid;
    grid-template-columns: 220px 1fr; 
    gap: 15px;
    margin-bottom: 15px;
}

.header-right-group { display: flex; gap: 15px; width: 100%; }

.header-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 12px;
    padding: 12px 15px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.center-section { flex-grow: 1; align-items: center; }
.center-section h1 { color: #7dd3fc; font-size: 20px; letter-spacing: -0.5px; margin-bottom: 2px; }
.subtitle { color: #94a3b8; font-size: 11px; }

.right-section { align-items: flex-end; min-width: 180px; }
.date-hero { font-size: 12px; font-weight: 600; color: #e2e8f0; margin-bottom: 2px;}
.time-hero { font-size: 20px; font-weight: 700; color: #7dd3fc; font-family: 'Roboto Mono', monospace; }

/* --- ACTUAL CALENDAR --- */
.calendar-card { padding: 12px; user-select: none; }
.actual-calendar { width: 100%; } 
.cal-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #7dd3fc; margin-bottom: 6px; font-size: 12px; }
.cal-weekdays, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; }
.cal-weekdays span { font-size: 10px; color: #64748b; font-weight: 600; }
.cal-days span { font-size: 11px; padding: 3px 0; color: #cbd5e1; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.cal-days span:hover:not(.empty) { background: rgba(255, 255, 255, 0.1); }
.cal-days span.today { background: rgba(59, 130, 246, 0.3); color: #60a5fa; font-weight: 700; border: 1px solid rgba(59, 130, 246, 0.5); }
.cal-days span.selected { background: #06b6d4; color: white; font-weight: 700; box-shadow: 0 0 10px rgba(6, 182, 212, 0.4); border: none; }
.cal-days span.empty { cursor: default; background: transparent; }

/* --- MAIN LAYOUT --- */
.main-layout {
    display: grid;
    grid-template-columns: 220px 1fr; 
    gap: 15px;
    flex-grow: 1;
    overflow: hidden; 
    min-height: 0;
}

/* --- TIMELINE STYLING --- */
.timeline-sidebar { display: flex; flex-direction: column; overflow: hidden; padding: 15px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: #f8fafc; flex-shrink: 0;}

.timeline-container { overflow-y: auto; flex-grow: 1; padding-right: 10px; position: relative; }
.hour-block { display: flex; align-items: flex-start; height: 45px; border-top: 1px dashed rgba(255, 255, 255, 0.1); position: relative; }
.hour-label { width: 50px; font-size: 10px; color: #94a3b8; margin-top: -7px; font-family: 'Roboto Mono', monospace; padding-right: 5px; }

.current-time-line { position: absolute; left: 50px; right: 0; height: 2px; background: #ef4444; z-index: 10; pointer-events: none; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.current-time-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

.timeline-event { position: absolute; left: 55px; right: 10px; border-radius: 4px; padding: 4px 6px; font-size: 10px; font-weight: 700; font-family: 'Roboto Mono', monospace; z-index: 5; border-left: 3px solid; pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.event-fr { background: rgba(59, 130, 246, 0.15); border-left-color: #3b82f6; color: #93c5fd; }
.event-afm { background: rgba(16, 185, 129, 0.15); border-left-color: #10b981; color: #6ee7b7; }
.event-audit { background: rgba(168, 85, 247, 0.15); border-left-color: #a855f7; color: #d8b4fe; }
.event-dt { background: rgba(239, 68, 68, 0.15); border-left-color: #ef4444; color: #fca5a5; }
.event-idt { background: rgba(245, 158, 11, 0.15); border-left-color: #f59e0b; color: #fcd34d; }
.event-ibs { background: rgba(6, 182, 212, 0.15); border-left-color: #06b6d4; color: #67e8f9; }

/* --- REACTOR TABLE --- */
.reactor-main { display: flex; flex-direction: column; gap: 15px; overflow-y: auto; padding-right: 5px; min-height: 0;}
.table-scroll { position: relative; width: 100%; }

.time-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.time-table th { color: #64748b; font-size: 10px; text-align: left; padding: 8px; font-weight: 700; }
.time-table td { padding: 4px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

/* --- ADD BUTTON --- */
.add-row-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 8px; background: rgba(59, 130, 246, 0.1); border: 1px dashed rgba(59, 130, 246, 0.4); border-radius: 8px; color: #60a5fa; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.add-row-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.6); color: white; }

/* INPUTS & SELECTS */
.time-picker, .time-input, .subject-select { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); color: white; border-radius: 6px; font-family: 'Roboto Mono', monospace; font-size: 11px; outline: none; }
.time-picker { padding: 4px; color-scheme: dark; cursor: pointer; }
.time-input { padding: 6px; width: 65px; transition: 0.2s; }
.subject-select { padding: 6px 8px; font-family: 'Inter', sans-serif; font-weight: 700; cursor: pointer; width: 85px; font-size: 13px; text-align: center; }

.time-picker:focus, .time-input:focus, .subject-select:focus { border-color: #3b82f6; }
.time-separator { color: #64748b; margin: 0 4px; font-weight: bold; }
.subject-select option { background: #0f172a; color: white; font-weight: 500; }

.sub-fr { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.sub-afm { background: rgba(16, 185, 129, 0.2); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.sub-audit { background: rgba(168, 85, 247, 0.2); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }
.sub-dt { background: rgba(239, 68, 68, 0.2); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.sub-idt { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.sub-ibs { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border-color: rgba(6, 182, 212, 0.3); }

/* DELETE BUTTON */
.delete-btn { background: none; border: none; color: rgba(239, 68, 68, 0.6); font-size: 20px; cursor: pointer; transition: 0.2s; }
.delete-btn:hover { color: #ef4444; transform: scale(1.2); }

/* ANALYTICS */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; flex-shrink: 0; }
.summary-label { font-size: 10px; color: #94a3b8; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 2px; }
.summary-value { font-size: 24px; font-weight: 700; color: #7dd3fc; font-family: 'Roboto Mono', monospace; }
.purity-meter { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; margin-top: 8px; }
.purity-fill { height: 100%; background: linear-gradient(90deg, #06b6d4, #3b82f6); border-radius: 10px; width: 0%; transition: width 0.5s ease; }

/* --- CHART STYLES --- */
.chart-section { display: flex; flex-direction: column; flex-shrink: 0; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.canvas-wrapper { position: relative; height: 180px; width: 100%; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }