:root{--tl-green:#6e9d59;--tl-yellow:#d39b20;--tl-orange:#df7947;--tl-blue:#547cb5;--tl-red:#c9504b;--tl-canvas:var(--card);--tl-muted:var(--quiet);--tl-grid:var(--border);--tl-row:color-mix(in srgb,var(--secondary) 44%,transparent)}
body{background:var(--background);color:var(--foreground)}
.timeline-card{border:1px solid var(--border);border-radius:14px;background:var(--card);padding:26px 28px 18px;box-shadow:0 18px 60px #00000008}
.timeline-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.timeline-heading .eyebrow{margin-bottom:5px}
.timeline-heading h2{font-size:27px;letter-spacing:-.05em;margin:0;line-height:1.15}
.local-pill{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:30px;padding:7px 11px;font-size:10px;color:var(--quiet)}
.local-pill i{width:7px;height:7px;background:var(--tl-green);border-radius:50%}
.timeline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;border-block:1px solid var(--border)}
.toolbar-group{display:flex;align-items:center;gap:7px}
.toolbar-right{gap:12px}
.tool-button,.stack-button{height:34px;border:1px solid var(--border);border-radius:7px;background:var(--card);color:var(--foreground);padding:0 11px;font-size:12px;cursor:pointer;transition:background .16s,border-color .16s}
.tool-button:hover,.stack-button:hover{background:var(--secondary);border-color:color-mix(in srgb,var(--accent),var(--border) 40%)}
.tool-button{min-width:34px;font-size:16px}
.reset-button{font-size:10px;color:var(--quiet)}
.tool-divider{height:19px;border-left:1px solid var(--border);margin:0 3px}
.stack-button[aria-pressed=true]{background:var(--foreground);color:var(--background);border-color:var(--foreground)}
.edit-switch{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--quiet);cursor:pointer}
.edit-switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch-ui{width:30px;height:17px;border-radius:20px;background:var(--border);position:relative;transition:background .2s}
.switch-ui::after{content:'';position:absolute;width:11px;height:11px;left:3px;top:3px;border-radius:50%;background:var(--card);transition:transform .2s}
.edit-switch input:checked+.switch-ui{background:var(--accent)}
.edit-switch input:checked+.switch-ui::after{transform:translateX(13px)}
.edit-switch input:focus-visible+.switch-ui{outline:3px solid var(--accent);outline-offset:3px}
.legend{display:flex;gap:19px;flex-wrap:wrap;padding:14px 0 12px;color:var(--quiet);font-size:10px}
.legend span{display:flex;align-items:center;gap:7px}
.status-dot{width:8px;height:8px;border-radius:2px}
.status-dot.operating{background:var(--tl-green)}
.status-dot.idle{background:var(--tl-yellow)}
.status-dot.standby{background:var(--tl-orange)}
.status-dot.maintenance{background:var(--tl-blue)}
.status-dot.downtime{background:var(--tl-red)}
.timeline-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;align-items:stretch;gap:17px}
.timeline-layout #timeline{height:380px;min-width:0;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--tl-canvas)}
.item-editor{min-width:0;border:1px solid var(--border);border-radius:8px;padding:16px 15px 12px;display:flex;flex-direction:column;background:var(--background)}
.editor-top{display:flex;justify-content:space-between;align-items:start;gap:6px}
.editor-top .eyebrow{font-size:8px;margin-bottom:5px}
.editor-top h3{font-size:15px;letter-spacing:-.03em;margin:0}
.editor-status{font-size:9px;color:var(--quiet);border:1px solid var(--border);border-radius:20px;padding:3px 7px;white-space:nowrap}
.editor-status.is-editing{color:var(--accent);border-color:color-mix(in srgb,var(--accent),var(--border) 55%)}
.editor-help{font-size:11px;color:var(--quiet);line-height:1.65;margin:13px 0}
.item-editor form label{display:flex;flex-direction:column;gap:5px;font-size:9px;color:var(--quiet);margin:12px 0}
.item-editor select,.item-editor input{min-width:0;width:100%;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--card);color:var(--foreground);font:11px inherit}
.time-fields{display:grid;grid-template-columns:1fr;gap:0}
.apply-button{display:flex;justify-content:space-between;align-items:center;width:100%;padding:9px 11px;margin-top:4px;border:0;border-radius:6px;background:var(--foreground);color:var(--background);font-size:10px;font-weight:600;cursor:pointer}
.apply-button:hover{background:var(--accent)}
.editor-foot{display:flex;gap:8px;align-items:start;margin-top:auto;padding-top:13px;border-top:1px solid var(--border);font-size:9px;color:var(--quiet);line-height:1.5}
.change-dot{margin-top:4px;width:6px;height:6px;flex:none;border-radius:50%;background:var(--accent)}
.demo-disclaimer{font-size:9px;color:var(--quiet);margin:12px 0 0}
/* vis-timeline theme bridge */
.timeline-card .vis-timeline{border:0!important;color:var(--foreground);font-family:inherit;font-size:10px}
.timeline-card .vis-panel{border-color:var(--border)!important}
.timeline-card .vis-panel.vis-left{background:var(--card)}
.timeline-card .vis-panel.vis-center,.timeline-card .vis-panel.vis-top,.timeline-card .vis-panel.vis-bottom{background:var(--card)}
.timeline-card .vis-time-axis .vis-text{color:var(--quiet);font-family:inherit;font-size:9px}
.timeline-card .vis-time-axis .vis-grid.vis-minor{border-color:var(--tl-grid);opacity:.75}
.timeline-card .vis-time-axis .vis-grid.vis-major{border-color:var(--border)}
.timeline-card .vis-labelset .vis-label{color:var(--foreground);border-color:var(--border)!important}
.timeline-card .vis-labelset .vis-label .vis-inner{padding:7px 9px}
.timeline-card .vis-group-level-unknown-but-gte1{border-color:var(--border)!important}
.timeline-card .vis-nested-group.vis-group-level-unknown-but-gte1 .vis-inner{padding-left:21px}
.timeline-card .vis-foreground .vis-group{border-bottom:1px solid var(--border)}
.timeline-card .vis-background .vis-group{background:var(--tl-row)}
.timeline-card .vis-item{border-radius:4px;border-width:0;color:#fff;font-size:9px;line-height:22px;min-height:23px;padding-inline:4px;box-shadow:0 1px 2px #0002}
.timeline-card .vis-item.vis-selected{box-shadow:0 0 0 2px var(--foreground),0 0 0 4px var(--card);color:#fff}
.timeline-card .vis-item .vis-item-content{padding:0 3px;white-space:nowrap}
.timeline-card .vis-item.status-operating{background:var(--tl-green)}
.timeline-card .vis-item.status-idle{background:var(--tl-yellow);color:#332405}
.timeline-card .vis-item.status-standby{background:var(--tl-orange)}
.timeline-card .vis-item.status-maintenance{background:var(--tl-blue)}
.timeline-card .vis-item.status-downtime{background:var(--tl-red)}
.timeline-card .vis-item.vis-editable{cursor:grab}
.timeline-card .vis-item.vis-editable:active{cursor:grabbing}
.timeline-card .vis-item.vis-range .vis-drag-left,.timeline-card .vis-item.vis-range .vis-drag-right{width:7px}
.timeline-card .vis-tooltip{display:none!important}
.timeline-card .vis-current-time{background:var(--accent)}
.timeline-editing #timeline{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent),transparent 75%)}
:root[data-theme=dark] .vis-item.status-idle{color:#241a05}
:root[data-theme=dark] .vis-item.vis-selected{box-shadow:0 0 0 2px var(--foreground),0 0 0 4px var(--card)}
.item-editor select,.item-editor input{font:inherit;font-size:11px}
@media(max-width:1000px){.timeline-layout{grid-template-columns:minmax(0,1fr) 220px}
.timeline-card .vis-item{font-size:8px}
.timeline-layout #timeline{height:360px}
}
@media(max-width:760px){.timeline-card{padding:20px 16px 15px}
.timeline-layout{grid-template-columns:1fr}
.timeline-layout #timeline{height:340px}
.item-editor{min-height:220px}
.time-fields{grid-template-columns:1fr 1fr}
}
@media(max-width:500px){.timeline-heading h2{font-size:23px}
.local-pill{font-size:0;padding:8px}
.local-pill i{width:8px;height:8px}
.timeline-toolbar{align-items:flex-start;flex-direction:column}
.toolbar-right{width:100%;justify-content:space-between}
.legend{gap:10px 14px}
.timeline-layout #timeline{height:330px}
.timeline-card .vis-labelset .vis-label .vis-inner{padding-inline:4px;font-size:8px}
.timeline-card .vis-panel.vis-left{width:74px!important}
}
.activity-picker{display:flex;flex-direction:column;gap:5px;margin-top:12px;font-size:9px;color:var(--quiet)}
.activity-picker select{min-width:0;width:100%;padding:7px 8px;border:1px solid var(--border);border-radius:6px;background:var(--card);color:var(--foreground);font:inherit;font-size:10px}
.timeline-card .vis-labelset .vis-label .vis-inner{text-align:left}
.timeline-layout #timeline .vis-panel.vis-left{width:108px!important}
.timeline-card .vis-labelset .vis-label.vis-nested-group .vis-inner{padding-left:20px!important;width:auto}
@media(max-width:760px){.timeline-heading{flex-direction:row;align-items:center}
.timeline-layout #timeline{height:410px}
}
@media(max-width:500px){.timeline-layout #timeline{height:420px}
.timeline-card .vis-labelset .vis-label .vis-inner{padding-inline:6px;font-size:9px}
}

.time-fields label,.time-fields input{min-width:0;max-width:100%;width:100%}
@media(max-width:500px){.time-fields{grid-template-columns:minmax(0,1fr)}}
