/* Task Chart / Timeline / Split views */
.tv-card { background: var(--color-surface); border-radius: 6px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-row); }
.tv-muted { color: var(--color-text-muted); }
.tv-spacer { flex: 1; }
.tv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.tv-select { width: auto; min-width: 120px; padding: 5px 8px; }
.tv-round { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--color-success); color: var(--color-success); background: #fff; font-size: 15px; line-height: 1; cursor: pointer; flex: none; }
.tv-round-minus { border-color: var(--color-danger); color: var(--color-danger); }
.tv-empty { padding: 48px 24px; text-align: center; }
.tv-empty h3 { margin-bottom: 6px; }
.tv-empty .btn { margin-top: 14px; }
.tv-help { color: var(--color-primary); cursor: pointer; font-weight: 600; }

/* Popover / menu */
.tv-popover { position: fixed; z-index: 200; background: #fff; border: 1px solid var(--color-border); border-radius: 6px; box-shadow: var(--shadow-md); padding: 6px 0; font-size: 14px; }
.tv-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--color-text); font-size: 14px; }
.tv-menu-item:hover { background: #f0f4fc; }
.tv-check { margin-left: auto; color: var(--color-primary); }
.tv-sort { padding: 8px 14px 6px; }
.tv-sort h4 { margin-bottom: 8px; font-size: 14px; }
.tv-sort-row { display: flex; gap: 8px; }
.tv-sort-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tv-colpick { padding: 6px 14px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }

/* Chart */
.tv-chart { position: relative; display: flex; flex-direction: column; gap: 12px; }
.tv-chart-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; flex-wrap: wrap; }
.tv-ctl { display: flex; align-items: center; gap: 8px; }
.tv-ctl-label { font-size: 12.5px; color: var(--color-text-muted); }
.tv-pair { gap: 0; }
.tv-pair select:first-child { border-radius: 6px 0 0 6px; }
.tv-pair select:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.tv-typebtn, .tv-iconbtn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; cursor: pointer; }
.tv-iconbtn { font-size: 18px; width: 30px; justify-content: center; }
.tv-caret { font-size: 10px; color: var(--color-text-muted); }
.tv-chart-body { padding: 12px 16px 8px; }
.tv-chart-canvas { min-height: 200px; width: 100%; overflow: hidden; }
.tv-chart-svg { display: block; max-width: 100%; }
.tv-hit { cursor: pointer; }
.tv-hit:hover { opacity: .85; }
.tv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; padding: 4px 0 8px; font-size: 12px; color: var(--color-text); }
.tv-legend-item i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.tv-chart-footer { font-size: 13px; font-weight: 600; color: var(--color-text); padding: 0 4px; }
.tv-tip { position: absolute; z-index: 20; pointer-events: none; background: #202123; color: #fff; padding: 5px 9px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.tv-copyrow { display: flex; gap: 8px; }
.sort-dot-badge { position: relative; }
.sort-dot-badge::after { content: ""; position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); }
@media print { .tv-chart-bar { display: none; } }

/* Forms (timeline modal / split create) */
.tv-flabel { display: block; font-size: 12.5px; color: var(--color-text-muted); margin: 14px 0 5px; }
.tv-req::after { content: " *"; color: var(--color-danger); }
.tv-form .tv-req-input { border-left: 3px solid var(--color-danger); }
.tv-locked { background: #eef1f9; }
.tv-fstack { display: flex; flex-direction: column; gap: 8px; }
.tv-frow { display: flex; align-items: center; gap: 8px; }
.tv-frow .input { flex: 1; }
.tv-note { margin-top: 16px; padding: 10px 12px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 6px; font-size: 13px; }

/* Timeline (Gantt) */
.tv-gantt-wrap { overflow: hidden; }
.tv-gantt-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-row); }
.tv-gantt { overflow: auto; max-height: 68vh; }
.tv-gantt-inner { display: flex; position: relative; }
.tv-left { position: sticky; left: 0; z-index: 5; background: #fff; border-right: 1px solid var(--color-border); flex: none; }
.tv-left-head, .tv-left-row { display: flex; }
.tv-left-head { height: 56px; align-items: center; background: #f5f7fc; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border-row); position: sticky; top: 0; z-index: 6; }
.tv-left-head > div, .tv-left-row > div { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.tv-left-row { align-items: center; border-bottom: 1px solid var(--border-row); font-size: 13px; }
.tv-right { flex: none; position: relative; }
.tv-right-head { position: sticky; top: 0; z-index: 4; background: #f5f7fc; height: 56px; border-bottom: 1px solid var(--border-row); }
.tv-hrow { display: flex; height: 28px; font-size: 11px; }
.tv-hrow > div { flex: none; overflow: hidden; text-align: center; line-height: 28px; border-right: 1px solid var(--border-row); }
.tv-hrow-b { color: var(--color-text-muted); }
.tv-canvas { position: relative; background-image: linear-gradient(to bottom, transparent 35px, var(--border-row) 35px); background-size: 100% 36px; }
.tv-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-row); }
.tv-wknd { position: absolute; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.025); }
.tv-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-danger); z-index: 2; }
.tv-bar { position: absolute; height: 24px; border-radius: 5px; color: #fff; font-size: 12px; display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; z-index: 3; user-select: none; }
.tv-bar-move { cursor: grab; }
.tv-bar-label { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tv-h { position: absolute; top: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.tv-h-l { left: 0; }
.tv-h-r { right: 0; }
.tv-empty-msg { position: absolute; left: 20px; top: 8px; color: var(--color-text-muted); font-size: 13px; }

/* Split */
.tv-split { display: flex; flex-direction: column; gap: 12px; }
.tv-split-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.tv-band.tv-drop { outline: 2px dashed var(--color-primary); }
.tv-band-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; background: #f5f7fc; border-radius: 6px 6px 0 0; }
.tv-chev { display: inline-block; transition: transform 0.15s; }
.tv-chev-open { transform: rotate(90deg); }
.tv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tv-table th { text-align: left; padding: 7px 14px; font-size: 12px; color: var(--color-text-muted); border-bottom: 1px solid var(--border-row); }
.tv-table td { padding: 7px 14px; border-bottom: 1px solid var(--border-row); }
.tv-table tr[draggable="true"] { cursor: grab; }
.tv-table tr:hover td { background: #f5f7fc; }
.tv-dragging { opacity: 0.4; }
.tv-none { text-align: center; }
.tv-more { padding: 6px 14px; font-size: 12px; }

/* Create Split View page */
.tv-create { max-width: 860px; margin: 0 auto; padding: 16px; }
.tv-create-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tv-create-head h1 { font-size: 20px; }
.tv-create-body { padding: 8px 24px 24px; }
.tv-radios { display: flex; gap: 24px; }
.tv-splits-head { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.tv-split-card { padding: 14px 16px; margin-top: 12px; }
.tv-split-sum { display: flex; align-items: center; gap: 12px; }
.tv-crow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tv-crow .input { flex: 1; }
.tv-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--color-border); text-align: center; line-height: 20px; font-size: 12px; flex: none; }
.tv-colbtn { padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; cursor: pointer; }
.tv-split-actions { text-align: right; margin-top: 12px; }
