/* HKIIT Sound Mixing Simulator — Task Panel + Checklist (Tab2 / Tab3) */

:root {
  --tp-bg: #121820;
  --tp-card: #1a222d;
  --tp-border: #2a3544;
  --tp-text: #e6edf3;
  --tp-muted: #8b9bb0;
  --tp-idle: #5a6a7c;
  --tp-active: #f0c14b;
  --tp-active-bg: #3a3210;
  --tp-done: #3ddc97;
  --tp-done-bg: #123528;
  --tp-flash: #f0c14b; /* task focus yellow (match channel-strip) */
  --tp-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --tp-mono: "SF Mono", "Cascadia Mono", Consolas, monospace;
}

.tp-panel,
.tc-checklist,
.tcmp-bar {
  font-family: var(--tp-font);
  color: var(--tp-text);
  box-sizing: border-box;
}

.tp-panel *,
.tc-checklist *,
.tcmp-bar * {
  box-sizing: border-box;
}

/* ---- Task panel (Tab2) ---- */
.tp-panel {
  background: var(--tp-bg);
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  max-width: 480px;
}

.tp-header {
  margin-bottom: 0.75rem;
}

.tp-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tp-sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--tp-muted);
  line-height: 1.4;
}

.tp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tp-card {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tp-card:hover {
  border-color: #3a4a5c;
}

.tp-card:focus {
  outline: none;
  border-color: #3d8bfd;
  box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.35);
}

.tp-idx {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--tp-mono);
  background: #0d1117;
  color: var(--tp-muted);
  border: 1px solid var(--tp-border);
}

.tp-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.tp-card-label {
  font-weight: 600;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tp-card-label-zh {
  font-size: 1.08rem;
  color: var(--tp-text);
}

.tp-card-label-en {
  font-size: 0.92rem;
  font-weight: 500;
  color: #c5d0dc;
}

.tp-card-hint {
  margin-top: 0.35rem;
  color: #d0dae6;
  font-family: var(--tp-font);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.tp-card-hint-zh {
  font-size: 1.05rem;
}

.tp-card-hint-en {
  font-size: 0.9rem;
  color: #a8b6c6;
}

.tp-title {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tp-title-zh {
  font-size: 1.2rem;
}

.tp-title-en {
  font-size: 0.95rem;
  font-weight: 500;
  color: #c5d0dc;
}

.tp-sub {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.tp-sub-zh {
  font-size: 0.95rem;
}

.tp-sub-en {
  font-size: 0.85rem;
}

.tp-status {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: var(--tp-idle);
  margin-top: 0.15rem;
}

/* idle / active / done */
.tp-card.tp-idle {
  border-color: var(--tp-border);
}

.tp-card.tp-active {
  border-color: var(--tp-active);
  background: var(--tp-active-bg);
  box-shadow: 0 0 12px rgba(240, 193, 75, 0.25);
}

.tp-card.tp-active .tp-idx {
  background: var(--tp-active);
  color: #1a1400;
  border-color: #ffe08a;
}

.tp-card.tp-active .tp-status {
  color: var(--tp-active);
}

.tp-card.tp-done {
  border-color: color-mix(in srgb, var(--tp-done) 55%, var(--tp-border));
  background: var(--tp-done-bg);
}

.tp-card.tp-done .tp-idx {
  background: var(--tp-done);
  color: #062016;
  border-color: #7dffb3;
}

.tp-card.tp-done .tp-status {
  color: var(--tp-done);
}

.tp-card.tp-done .tp-card-label,
.tp-card.tp-done .tp-card-label-zh {
  color: #c8f7e0;
}
.tp-card.tp-done .tp-card-label-en {
  color: #9ed9be;
}

.tp-footer {
  margin-top: 0.85rem;
}

.tp-progress-bar {
  height: 6px;
  background: #0d1117;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--tp-border);
}

.tp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a9d6a, var(--tp-done));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.tp-progress-text {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--tp-muted);
  font-family: var(--tp-mono);
}

.tp-encourage {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--tp-done-bg);
  border: 1px solid color-mix(in srgb, var(--tp-done) 50%, var(--tp-border));
  color: #c8f7e0;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* ---- Checklist (Tab3) — shares palette ---- */
.tc-checklist {
  background: var(--tp-bg);
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  max-width: 420px;
}

.tc-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.tc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tc-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--tp-border);
  background: var(--tp-card);
  font-size: 0.76rem;
}

.tc-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--tp-idle);
}

.tc-item.tc-idle .tc-dot { background: var(--tp-idle); }
.tc-item.tc-active {
  border-color: var(--tp-active);
  background: var(--tp-active-bg);
}
.tc-item.tc-active .tc-dot {
  background: var(--tp-active);
  box-shadow: 0 0 8px rgba(240, 193, 75, 0.5);
}
.tc-item.tc-done {
  border-color: color-mix(in srgb, var(--tp-done) 50%, var(--tp-border));
  background: var(--tp-done-bg);
}
.tc-item.tc-done .tc-dot {
  background: var(--tp-done);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.45);
}

.tc-label {
  flex: 1 1 auto;
  line-height: 1.35;
}

.tc-encourage {
  margin-top: 0.75rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  background: var(--tp-done-bg);
  border: 1px solid color-mix(in srgb, var(--tp-done) 50%, var(--tp-border));
  color: #c8f7e0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.tc-encourage[hidden] {
  display: none !important;
}

/* ---- A/B Compare bar ---- */
.tcmp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #0d1117;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  max-width: 480px;
}

.tcmp-label {
  font-size: 0.72rem;
  color: var(--tp-muted);
  margin-right: 0.25rem;
}

.tcmp-btn {
  appearance: none;
  border: 1px solid var(--tp-border);
  background: #1a222d;
  color: var(--tp-text);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.tcmp-btn:hover {
  border-color: var(--tp-done);
}

.tcmp-btn.is-on {
  background: #1e3a2e;
  border-color: var(--tp-done);
  color: #c8f7e0;
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.25);
}

.tcmp-note {
  width: 100%;
  font-size: 0.65rem;
  color: var(--tp-muted);
  margin: 0;
}

/* Generic control flash (Mixer should also honour .task-flash) */
@keyframes tp-ctrl-flash {
  0%, 100% { box-shadow: none; }
  50% {
    box-shadow: 0 0 0 2px var(--tp-flash), 0 0 16px rgba(255, 216, 74, 0.75);
  }
}

.task-flash,
[data-control].task-flash,
.cs-fader-block.task-flash,
.cs-pan-block.task-flash,
.cs-rotary-block.task-flash,
.cs-lowcut.task-flash,
.cs-eq-block.task-flash {
  animation: tp-ctrl-flash 0.45s ease-in-out 3;
  border-radius: 6px;
}

/* ---- Per-card suggested A/B (Tab2) ---- */
.tp-card-compare {
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--tp-border);
}

.tp-cmp-label {
  display: block;
  font-size: 0.82rem;
  color: var(--tp-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.tp-cmp-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tp-cmp-btn {
  appearance: none;
  border: 1px solid var(--tp-border);
  background: #0d1117;
  color: var(--tp-text);
  border-radius: 5px;
  padding: 0.2rem 0.45rem;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1.3;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.tp-cmp-btn.tp-cmp-cancel {
  border-color: #5a3a3a;
  color: #f0c0c0;
}

.tp-cmp-btn.tp-cmp-cancel:hover {
  border-color: #e07070;
  background: #2a1515;
  color: #ffe0e0;
}

.tp-cmp-btn:hover {
  border-color: var(--tp-done);
}

.tp-cmp-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.35);
}

.tp-cmp-btn.is-on {
  background: #1e3a2e;
  border-color: var(--tp-done);
  color: #c8f7e0;
}

.tp-cmp-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--tp-muted);
  line-height: 1.4;
}

/* Tab3 vocal record (#slot-record) */
.tvr-panel,
.vocal-record-panel {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.tvr-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.tvr-sub {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  opacity: 0.85;
}
.tvr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.tvr-btn {
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #2a3a4a;
  color: inherit;
  font: inherit;
}
.tvr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tvr-btn--start {
  background: #1b6b4a;
  border-color: #2f9e6e;
}
.tvr-btn--restore {
  background: #4a3a1b;
  border-color: #9e7e2f;
}
.tvr-progress {
  margin: 0.5rem 0;
}
.tvr-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.tvr-bar-fill {
  height: 100%;
  width: 0;
  background: #3dd68c;
  transition: width 0.1s linear;
}
.tvr-countdown {
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.tvr-status {
  min-height: 1.25em;
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}


/* Checklist ZH/EN on separate lines */
.tc-label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1 1 auto;
  line-height: 1.35;
}
.tc-label-zh {
  font-size: 0.95rem;
  font-weight: 600;
}
.tc-label-en {
  font-size: 0.8rem;
  color: var(--tp-muted);
}
.tc-label-num {
  font-weight: 700;
  margin-right: 0.25rem;
}
