/* Tabbed task panel + task detail (WI000254). Overlay over the dimmed list. */

.tpanel-overlay { position: fixed; inset: 0; z-index: 80; background: var(--overlay); display: flex; justify-content: flex-end; }
.tpanel { width: min(760px, 92vw); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(0,0,0,0.28); }
.tpanel--full { width: 100vw; }

/* Tab strip */
.tpanel__strip { display: flex; align-items: stretch; background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding-right: 6px; }
.tpanel__striptab { display: flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 12px; color: var(--text-muted); border-right: 1px solid var(--border); cursor: pointer; white-space: nowrap; }
.tpanel__striptab.is-active { background: var(--bg); color: var(--text); border-top: 2px solid var(--brand); }
.tpanel__close { background: none; border: none; color: var(--text-faint); display: flex; padding: 2px; border-radius: var(--radius-sm); }
.tpanel__close:hover { background: var(--surface-2); color: var(--text); }
.tpanel__strip .grow { flex: 1; }
.tpanel__strip .iconbtn { color: var(--text-muted); align-self: center; }

/* Header band (teal) */
.tpanel__header { background: var(--brand); color: var(--on-brand); padding: 10px 16px 0; }
.tpanel__navrow { display: flex; align-items: center; justify-content: space-between; }
.tpanel__key { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; color: rgba(225,245,238,0.8); }
.tpanel__navtrail { display: flex; align-items: center; gap: 8px; }
.tpanel__timepill { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--on-brand); font-size: 13px; }
.tpanel__assignees { background: none; border: none; color: var(--on-brand); font-size: 20px; display: flex; }
.tpanel__title { font-size: 18px; font-weight: 500; margin: 8px 0; line-height: 1.3; }
.tpanel__pills { display: flex; gap: 10px; margin-bottom: 8px; }
.hpill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.tpanel__pills .menu__trigger { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.18); color: var(--on-brand); border-radius: 999px; padding: 4px 10px; }
.tpanel__parent { display: flex; align-items: center; gap: 6px; min-height: 26px; font-size: 13px; }
.tpanel__childof { color: rgba(225,245,238,0.7); }
.tpanel__parent a { color: var(--on-brand); font-weight: 500; }
.tpanel__parent .grow { flex: 1; }
.tpanel__parent .menu__trigger { background: none; border: none; color: var(--on-brand); padding: 2px; }
.tpanel__setparent { background: none; border: none; color: rgba(225,245,238,0.85); display: inline-flex; align-items: center; gap: 5px; }

/* Tab strip (detail) */
.tpanel__tabs { display: flex; gap: 16px; overflow-x: auto; }
.tpanel__tab { background: none; border: none; color: rgba(225,245,238,0.65); padding: 10px 0; border-bottom: 3px solid transparent; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tpanel__tab.is-active { color: var(--on-brand); font-weight: 500; border-bottom-color: var(--on-brand); }
.tpanel__tabbadge { background: rgba(255,255,255,0.18); border-radius: 999px; font-size: 11px; padding: 0 6px; }

/* Content */
.tpanel__detail { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tpanel__content { flex: 1; overflow: auto; background: var(--bg-elevated); padding: 14px 16px 40px; }

/* Details tab cards */
.dtab { display: flex; flex-direction: column; gap: 16px; }
.dcard__label { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.dcard__box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; }
.dcard__list { padding: 0; }
.dcard__row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dcard__pad { padding: 8px 12px; font-size: 13px; }
.dcard__idrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.previewbox { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; position: relative; color: var(--text); min-height: 44px; }
.previewbox__chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.pickrow { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: space-between; }
.pickrow > i { margin-left: auto; color: var(--text-faint); }

/* Tags multi-select: selected tags render as colored chips in the pick row. */
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; }
/* background + border-color are set inline per-tag to the tag color at low alpha
   (rgba(color, 0.12)/0.28) for iOS parity — tag.swiftUIColor.opacity(0.12). The
   neutral values here are the fallback when no tag color is available. */
.tagchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }

/* Inline create-tag color swatch grid (mirrors iOS CreateComponentSheet). */
.swatchgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.swatch.is-selected { box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--text-muted); }
.dtab .menu, .dtab .menu__trigger { width: 100%; }
.dtab .menu__trigger { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; }
.rowbtn { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; padding: 10px 12px; color: var(--text); border-top: 1px solid var(--border); }
.dcard__list > .rowbtn:first-child { border-top: none; }
.rowbtn:hover { background: var(--surface-2); }
.rowbtn--danger { color: var(--danger); }
.holder { color: var(--warning); }
.muted { color: var(--text-faint); }
.iconbtn { background: none; border: none; color: var(--text-muted); display: inline-flex; padding: 4px; border-radius: var(--radius-sm); }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn--light { color: var(--on-brand); }
.iconbtn--danger { color: var(--danger); }

/* Related */
.rtab { display: flex; flex-direction: column; gap: 18px; }
.rtab__head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.linkrow { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 6px; color: var(--text); }
.linkrow:hover { background: var(--surface-2); text-decoration: none; }

/* Comments */
.ctab { display: flex; flex-direction: column; gap: 12px; }
.ctab__list { display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.comment--reply { margin-left: 16px; border-left: 2px solid var(--accent); }
.comment__head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.comment__author { font-size: 13px; font-weight: 500; }
.comment__author.is-claude { color: #7f77dd; }
.comment__lock { color: var(--warning); font-size: 13px; }
.comment__time { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.composebar { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; color: var(--text-faint); text-align: left; }
.visibility-toggle { background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 6px 12px; color: var(--warning); }

/* Activity */
.atab { display: flex; flex-direction: column; gap: 12px; }
.atab__bar { display: flex; align-items: center; gap: 8px; }
.atab__search { display: flex; align-items: center; gap: 6px; flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 10px; }
.atab__search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font: inherit; }
.atab__list { display: flex; flex-direction: column; }
.aevent { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.aevent:first-child { border-top: none; }
.aevent__icon { color: var(--text-muted); }
.aevent__head { display: flex; align-items: center; gap: 6px; }
.aevent__actor { font-size: 12px; font-weight: 500; }
.aevent__actor.is-claude { color: #7f77dd; }
.aevent__time { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.modelchip { font-size: 11px; background: var(--surface-2); color: var(--text-muted); border-radius: 999px; padding: 0 6px; }
.aevent__title { font-size: 13px; }

/* Attachments */
.attab { display: flex; flex-direction: column; gap: 8px; }
.attrow { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.attrow__icon { color: #378add; font-size: 20px; }
.attrow__meta { flex: 1; font-size: 13px; }
.attab .menu__trigger { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }

/* Empty states */
.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty > i { font-size: 28px; }
.empty__title { font-size: 15px; font-weight: 500; color: var(--text); margin: 8px 0 4px; }

/* Time sheet */
.timesheet { display: flex; flex-direction: column; gap: 14px; }
.ts-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; }
.ts-card--running { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.ts-card__head { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--success); }
.ts-toggle { display: flex; align-items: center; gap: 8px; }
.ts-totals { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 12px; }
.ts-totals strong { margin-left: auto; }
.ts-bill { color: var(--success); font-weight: 500; }
.ts-entries__head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.ts-entries { display: flex; flex-direction: column; }
.ts-entry { border-top: 1px solid var(--border); padding: 10px 0; }
.ts-entry:first-of-type { border-top: none; }
.ts-entry__main { display: flex; align-items: center; gap: 8px; }
.ts-entry__dur { font-family: var(--font-mono); font-size: 13px; }
.ts-entry__main .iconbtn:nth-last-child(2) { margin-left: auto; }
.ts-entry__sub { font-size: 12px; margin-top: 2px; }
.ts-entry__note { font-size: 13px; margin-top: 4px; }

/* Testing — checklist editor + run sheet */
.small { font-size: 12px; }
.rowbtn--static { cursor: default; }
.rowbtn--static:hover { background: none; }
.chk-list { display: flex; flex-direction: column; margin: 8px 0; }
.chk-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.chk-item:first-child { border-top: none; }
.chk-add { display: flex; align-items: center; gap: 8px; }
.chk-add .input { flex: 1; }
.run-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.run-item { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.run-item__top { display: flex; align-items: center; gap: 8px; }
.run-item__text { font-size: 14px; }
.run-item__reason { color: var(--danger); font-size: 12px; margin: 4px 0 0 26px; }
.run-pass { color: var(--success); }
.run-fail { color: var(--danger); }
.run-seg { display: flex; gap: 8px; margin-top: 8px; }
.run-seg__btn { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-md); padding: 5px 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); }
.run-seg__pass.is-on { background: var(--success); border-color: var(--success); color: #fff; }
.run-seg__fail.is-on { background: var(--danger); border-color: var(--danger); color: #fff; }
