/* Train Graph (Marey Diagram) page styles */

.page-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* ─── VIEW TABS ─── */
.view-tabs { display: flex; gap: 2px; background: rgba(26,47,78,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.view-tab { display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); text-decoration: none; transition: all 0.15s; font-family: inherit; position: relative; }
.view-tab:hover { color: var(--text); background: rgba(59,130,246,0.06); }
.view-tab.active { background: var(--navy); color: var(--text); }
.view-tab i { font-size: 13px; }

/* ─── MAIN CANVAS ─── */
.occ-canvas { flex: 1; position: relative; overflow: hidden; background: var(--bg); min-height: 0; min-width: 0; }
#graph-svg { width: 100%; height: 100%; display: block; }

/* ─── CANVAS TOOLBAR ─── */
.canvas-toolbar { position: absolute; top: 12px; right: 12px; z-index: 10; display: flex; flex-direction: row; gap: 4px; }
.toolbar-btn { width: 34px; height: 34px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 14px; transition: all 0.15s; }
.toolbar-btn:hover { border-color: var(--accent); color: var(--accent2); background: rgba(59,130,246,0.08); }
.toolbar-btn.active { background: var(--navy); color: var(--accent2); border-color: var(--accent); }

/* ─── DATE SELECTOR ─── */
.date-selector { position: absolute; top: 12px; left: 12px; z-index: 10; display: flex; gap: 4px; align-items: center; }
.date-btn { padding: 5px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 7px; font-size: 11.5px; color: var(--text); font-family: 'JetBrains Mono', monospace; cursor: pointer; transition: all 0.15s; }
.date-btn:hover { border-color: var(--accent); color: var(--accent2); }
.date-btn.active { background: var(--navy); border-color: var(--accent); color: var(--accent2); }
.date-nav { width: 28px; height: 28px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 12px; }
.date-nav:hover { border-color: var(--accent); color: var(--accent2); }

/* ─── LEGEND ─── */
.graph-legend { position: absolute; bottom: 12px; left: 12px; z-index: 10; background: rgba(13,21,38,0.88); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; gap: 16px; align-items: center; }
.legend-line { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.ll-solid { width: 22px; height: 2px; border-radius: 1px; }
.ll-dashed { width: 22px; height: 0; border-top: 2px dashed; }

/* ─── RIGHT PANEL ─── */
.occ-right { width: 280px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.right-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.right-tab { flex: 1; padding: 10px 8px; font-size: 11px; font-weight: 600; cursor: pointer; text-align: center; color: var(--muted); border-bottom: 2px solid transparent; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px; }
.right-tab:hover { color: var(--text); }
.right-tab.active { color: var(--accent2); border-bottom-color: var(--accent); }
.right-badge { background: var(--red); color: #fff; font-size: 9px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.right-badge-amber { background: var(--amber) !important; color: #080E1A !important; }
.right-panel-body { flex: 1; overflow-y: auto; }

/* ─── TRAIN LIST ITEMS ─── */
.train-item { padding: 10px 12px; border-bottom: 1px solid rgba(26,47,78,0.5); cursor: pointer; transition: background 0.15s; display: flex; align-items: center; gap: 8px; }
.train-item:hover { background: rgba(59,130,246,0.05); }
.train-item.active-sel { background: rgba(59,130,246,0.08); border-left: 3px solid var(--accent); }
.ti-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ti-info { flex: 1; min-width: 0; }
.ti-no { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--text); }
.ti-name { font-size: 10px; color: var(--muted); }
.ti-dev { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; }
.ti-dev.green { color: var(--green); }
.ti-dev.amber { color: var(--amber); }
.ti-dev.red { color: var(--red); }

/* ─── TOOLTIP ─── */
.occ-tooltip { position: absolute; z-index: 50; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); display: none; }
.tooltip-header { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tooltip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); padding: 1px 0; }
.tooltip-row span { color: var(--text); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
