/* Mimic Board — OCC fullscreen layout */

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

/* ─── VIEW TABS (navigation links) ─── */
.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; }
#mimic-svg { width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ─── CANVAS TOOLBAR ─── */
.canvas-toolbar { position: absolute; top: 12px; left: 12px; z-index: 10; display: flex; flex-direction: column; 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); }

/* ─── LINTAS SELECTOR ─── */
.lintas-selector { position: absolute; top: 12px; left: 56px; z-index: 10; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 11.5px; color: var(--text); font-family: inherit; cursor: pointer; }
.lintas-selector:focus { outline: none; border-color: var(--accent); }

/* ─── LEGEND ─── */
.map-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; flex-direction: column; gap: 6px; }
.legend-title { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ld-ontime  { background: #10D9A0; }
.ld-warning { background: #FBBF24; }
.ld-alert   { background: #FB923C; }
.ld-critical{ background: #F87171; }
.ld-unknown { background: #5E7FA8; }

/* ─── LINTAS BADGE ─── */
.lintas-label { position: absolute; bottom: 12px; right: 12px; z-index: 10; background: rgba(13,21,38,0.88); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 11px; color: var(--muted); }
.lintas-label strong { color: var(--text); font-weight: 700; }

/* ─── RIGHT PANEL ─── */
.occ-right { width: 300px; 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; }

/* ─── ALERT ITEMS ─── */
.occ-alert-item { padding: 10px 12px; border-bottom: 1px solid rgba(26,47,78,0.5); cursor: pointer; transition: background 0.15s; }
.occ-alert-item:hover { background: rgba(59,130,246,0.05); }
.occ-alert-item.crit { border-left: 3px solid var(--red); }
.occ-alert-item.high { border-left: 3px solid var(--amber); }
.occ-alert-item.warn { border-left: 3px solid var(--accent); }
.occ-alert-item.stale { border-left: 3px solid var(--muted); }
.alert-row1 { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.alert-kano { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--text); }
.alert-ack-btn { margin-left: auto; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; border: 1px solid rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); color: var(--accent2); cursor: pointer; transition: all 0.15s; font-family: inherit; }
.alert-ack-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.alert-detail { font-size: 11px; color: var(--muted); }
.alert-ts { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

/* ─── INCIDENT ITEMS ─── */
.occ-incident-item { padding: 10px 12px; border-bottom: 1px solid rgba(26,47,78,0.5); cursor: pointer; transition: background 0.15s; }
.occ-incident-item:hover { background: rgba(59,130,246,0.05); }
.inc-nomor { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }
.inc-title { font-size: 12px; font-weight: 600; color: var(--text); margin: 2px 0; }
.inc-meta  { font-size: 10.5px; color: var(--muted); display: flex; gap: 8px; }

/* ─── TRAIN DETAIL DRAWER ─── */
.train-detail-drawer { width: 280px; background: var(--panel); border-left: 1px solid var(--border); display: none; flex-direction: column; flex-shrink: 0; overflow: hidden; }
.train-detail-drawer.open { display: flex; }
.tdd-hdr { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.tdd-ka-no { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text); }
.tdd-ka-name { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tdd-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.tdd-close:hover { color: var(--red); }
.tdd-body { flex: 1; overflow-y: auto; }
.tdd-section { padding: 12px 14px; border-bottom: 1px solid rgba(26,47,78,0.5); }
.tdd-sec-title { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.tdd-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.tdd-key { font-size: 11.5px; color: var(--muted); }
.tdd-val { font-size: 11.5px; font-weight: 600; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.sched-table { width: 100%; border-collapse: collapse; }
.sched-table th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 4px 0; font-weight: 700; }
.sched-table td { font-size: 11px; padding: 5px 0; border-top: 1px solid rgba(26,47,78,0.4); font-family: 'JetBrains Mono', monospace; color: var(--text); }
.sched-sta { font-family: inherit !important; font-size: 11px; color: var(--muted); }
.crew-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.crew-avatar { width: 28px; height: 28px; background: linear-gradient(135deg,var(--navy),#2563EB); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.crew-name { font-size: 11.5px; font-weight: 600; color: var(--text); }
.crew-role { font-size: 10px; color: var(--muted); }
.crew-health { margin-left: auto; }

/* ─── 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: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.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; }
