

.tq-slot {
  display: inline-flex;
  align-items: center;
  width: 15px;
  vertical-align: baseline;
}

.tq-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tq-dot-ok { background: #16a34a; }
.tq-dot-bad { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14); }

.tq-dot-off,
.tq-dot-killed,
.tq-dot-idle { background: #b9bcc2; }

.tq-dot-new.tq-dot-ok { background: #fff; border: 2px solid #16a34a; }
.tq-dot-new.tq-dot-bad { background: #fff; border: 2px solid #dc2626; }
.tq-dot-new.tq-dot-off,
.tq-dot-new.tq-dot-killed,
.tq-dot-new.tq-dot-idle { background: #fff; border: 2px solid #b9bcc2; }

.tq-dot:hover { transform: scale(1.35); }
.tq-dot-none { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; }

.tq-badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #F1EEE8;
  color: #6B655E;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.unified-table .ut-num.tq-col { color: var(--text-secondary); }
.unified-table .ut-num.tq-bad,
.unified-table .ut-num.tq-col.tq-bad { color: #dc2626; font-weight: 700; }

.tq-scrim {
  position: fixed;
  inset: 0;
  background: rgba(33, 30, 27, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 900;
}
.tq-scrim.on { opacity: 1; pointer-events: auto; }

.tq-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 96vw;
  background: #fff;
  z-index: 901;
  overflow-y: auto;
  box-shadow: -12px 0 40px rgba(33, 30, 27, 0.14);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tq-panel.on { transform: none; }

.tq-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.tq-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tq-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }

.tq-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.tq-kind-working { background: #E9EEF2; color: #3c5568; }
.tq-kind-new { background: #FBF3E6; color: #8a6014; }
.tq-kind-off { background: #F1EEE8; color: #6B655E; }
.tq-kind .sep { opacity: 0.45; font-weight: 500; }

.tq-close {
  border: none;
  background: rgba(0, 0, 0, 0.05);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text-secondary);
  flex: 0 0 auto;
}
.tq-close:hover { background: rgba(0, 0, 0, 0.09); }

.tq-status {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
  line-height: 1.4;
}
.tq-status-bad { background: #FDECEC; color: #b3352b; }
.tq-status-ok { background: #E4F1E8; color: #2f7a5c; }
.tq-status-off { background: #F1EEE8; color: #6B655E; }

.tq-body { padding: 22px 26px 60px; }
.tq-sec { margin-bottom: 28px; }
.tq-sec-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.tq-sec-h .dates { opacity: 0.8; font-weight: 600; letter-spacing: 0.03em; }
.tq-empty { font-size: 13px; color: var(--text-tertiary); }

.tq-strip {
  background: #F6F3EE;
  border-radius: 12px;
  padding: 13px 8px;
  display: flex;
  align-items: flex-start;
}
.tq-strip > div { flex: 1 1 0; min-width: 0; text-align: center; padding: 0 4px; }
.tq-s-k {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tq-s-v {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}
.tq-s-v.bad { color: #dc2626; }
.tq-s-h { font-size: 9.5px; color: var(--text-tertiary); margin-top: 2px; white-space: nowrap; }

.tq-fuse { background: #F6F3EE; border-radius: 12px; padding: 13px 16px; }
.tq-fuse-nums { font-size: 14px; color: var(--text-secondary); margin-bottom: 9px; }
.tq-fuse-nums b {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.tq-fuse-nums span { color: var(--text-tertiary); }
.tq-fuse-bar { height: 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.07); overflow: hidden; }
.tq-fuse-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand-color); }

.tq-period { display: flex; gap: 10px; align-items: stretch; }
.tq-period-box { flex: 1; background: #F6F3EE; border-radius: 12px; padding: 12px 14px; }
.tq-period-l { font-size: 11px; color: var(--text-tertiary); margin-bottom: 8px; }
.tq-period-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
.tq-period-row b { font-weight: 700; }
.tq-period-arrow { display: flex; align-items: center; color: var(--text-tertiary); font-size: 18px; }

.tq-dyn { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tq-dyn th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: right;
  padding: 0 0 9px;
  white-space: nowrap;
}
.tq-dyn th:first-child,
.tq-dyn td:first-child { text-align: left; }
.tq-dyn td {
  padding: 9px 0;
  text-align: right;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.tq-dyn td + td,
.tq-dyn th + th { padding-left: 9px; }
.tq-dyn .bad { color: #dc2626; font-weight: 600; }
.tq-dyn .mute { color: var(--text-tertiary); }

.tq-dyn tr.today td { background: rgba(236, 58, 57, 0.055); font-weight: 600; }
.tq-dyn tr.today td:first-child { border-radius: 8px 0 0 8px; }
.tq-dyn tr.today td:last-child { border-radius: 0 8px 8px 0; }
.tq-today-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-color);
  margin-left: 7px;
  vertical-align: 1px;
}

.tq-log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 13px;
  cursor: pointer;
}
.tq-log-row:hover { background: rgba(0, 0, 0, 0.015); }
.tq-log-chev {
  color: var(--text-tertiary);
  font-size: 11px;
  width: 12px;
  flex: 0 0 auto;
  transition: transform 160ms;
}
.tq-log-row.open .tq-log-chev { transform: rotate(90deg); }
.tq-log-when { color: var(--text-tertiary); font-size: 12px; width: 82px; flex: 0 0 auto; }
.tq-log-what { flex: 1; color: var(--text-primary); }
.tq-log-st {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  flex: 0 0 auto;
}

.tq-log-act {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 12px 22px;
}
.tq-log-hint { font-size: 11px; color: var(--text-tertiary); }
.tq-btn {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.tq-btn:hover { border-color: rgba(0, 0, 0, 0.24); color: var(--text-primary); }
.tq-btn-apply { background: var(--brand-color); border-color: var(--brand-color); color: #fff; }
.tq-btn-apply:hover { background: var(--brand-color-hover); border-color: var(--brand-color-hover); color: #fff; }
.tq-btn:disabled { opacity: .5; cursor: default; }

.tq-actions { margin: -6px 0 22px; }
.tq-actions .tq-btn-run { margin-top: 0; }

.tq-pending {
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 12px;
  padding: 12px 14px 10px;
  background: #FDF7F3;
}
.tq-pending-head { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.tq-kill-why { margin-top: 6px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.tq-pending .tq-places { display: block; padding: 8px 0 6px; }
.tq-pending-act { padding: 6px 0 4px; }

.tq-mode {
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 12px 14px;
  background: #FBFAF8;
}
.tq-mode.on { border-color: rgba(220, 38, 38, 0.28); background: #FDF4F3; }
.tq-mode-why { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.tq-mode-v {
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-secondary);
}
.tq-mode-v span {
  display: inline-block;
  margin-right: 7px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.tq-mode-hint { margin-top: 7px; font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }
.tq-btn-run { margin-top: 11px; }

.tq-days { display: flex; gap: 6px; margin-top: 10px; }
.tq-day {
  min-width: 46px;
  text-align: center;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tq-day-ok { background: #E4F1E8; color: #2f7a5c; }
.tq-day-warn { background: #FBF0DC; color: #8a6414; }
.tq-day-bad { background: #FBE7E6; color: #b3322f; }
.tq-day-unk { background: #F1EEE8; color: #8a857e; }

.tq-guide-link { padding: 4px 0 16px; }
.tq-guide-link button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tq-guide-link button:hover { color: var(--text-primary); }
.tq-guide-note {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.45;
  margin: -4px 0 10px;
}
.tq-guide-rows { display: flex; flex-direction: column; gap: 1px; }
.tq-guide-row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.tq-guide-row:first-child { border-top: 0; }
.tq-guide-row .k { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.tq-guide-row .v { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.tq-guide-row .v .n {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.tq-log-st.applied { background: #E4F1E8; color: #2f7a5c; }
.tq-log-st.pending { background: #FBF3E6; color: #a86b12; }
.tq-log-st.rolled { background: #F1EEE8; color: #6B655E; }

.tq-places { display: none; padding: 4px 0 14px 22px; }
.tq-places.on { display: block; }
.tq-places table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tq-places th {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: right;
  padding: 0 0 7px;
}
.tq-places th:first-child,
.tq-places td:first-child { text-align: left; }
.tq-places td {
  padding: 6px 0;
  text-align: right;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}
.tq-places td + td { padding-left: 10px; }
.tq-places .p-name {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.tq-places .p-tier { color: var(--text-tertiary); font-size: 11px; }
.tq-places .bad { color: #dc2626; font-weight: 600; }
.tq-places-more { font-size: 11.5px; color: var(--text-tertiary); padding-top: 9px; }

@media (max-width: 950px) {
  .tq-slot { width: 13px; }

  .tq-badge-new { display: none; }
  .tq-panel { width: 100%; max-width: 100%; }
  .tq-head,
  .tq-body { padding-left: 18px; padding-right: 18px; }
  .tq-strip { padding: 12px 2px; }
  .tq-s-v { font-size: 15px; }
  .tq-s-k { font-size: 9px; }
  .tq-s-h { display: none; }
  .tq-dyn { font-size: 12.5px; }
  .tq-period { flex-direction: column; }
  .tq-period-arrow { justify-content: center; transform: rotate(90deg); }
  .tq-places { padding-left: 0; }

  .tq-guide-row { grid-template-columns: 1fr; gap: 3px; }
}
