#panel-content {
  color: var(--text);
  font-family: inherit;
}
.tp-content {
  box-sizing: border-box;
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px clamp(18px, 4vw, 48px) 74px;
}
.tp-content:not(:has(.tp-nav)) { max-width: 1010px; }
.tp-content button, .tp-dialog button, .tp-content select, .tp-dialog select,
.tp-content input, .tp-dialog input, .tp-dialog textarea { font: inherit; }
.tp-content button, .tp-dialog button { cursor: pointer; }
.tp-content button:disabled, .tp-dialog button:disabled { cursor: default; opacity: .55; }
.tp-content button:focus-visible, .tp-content select:focus-visible, .tp-content input:focus-visible,
.tp-dialog :is(button,input,textarea,select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.tp-content h1,.tp-content h3,.tp-content p,.tp-dialog h2,.tp-dialog h3,.tp-dialog p,.tp-dialog dl,.tp-dialog dd {
  margin: 0;
}
.tp-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  padding: 4px;
  background: var(--surface-alt);
  margin-bottom: 32px;
}
.tp-nav button, .tp-segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 650;
  padding: 10px 14px;
}
.tp-nav button[aria-current="page"] { background: var(--surface); color: var(--text); }
.tp-nav button:hover, .tp-segment button:hover {color: var(--text);}
.tp-pending-count, .tp-segment button span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  min-height: 19px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 5px;
  font-size: .74rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tp-pending-count { color: var(--accent-ink); background: var(--accent); }
.tp-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 27px;
}
.tp-page-head h1 { color: var(--text); font-size: clamp(1.85rem, 3vw, 2.7rem); line-height: 1.12; letter-spacing: -.037em; font-weight: 680; }
.tp-page-head p { color: var(--muted); font-size: 1rem; line-height: 1.5; margin-top: 7px; }
.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .89rem !important;
  font-weight: 650 !important;
  line-height: 1.35;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.tp-btn:active:not(:disabled) { transform: translateY(1px); }
.tp-primary { background: var(--accent); color: var(--accent-ink); }
.tp-primary:hover { background: color-mix(in srgb, var(--accent), var(--text) 9%); }
.tp-light, .tp-complete, .tp-danger { color: var(--text); background: var(--surface); border-color: var(--border); }
.tp-light:hover { background: var(--surface-alt); }
.tp-complete {
  background: color-mix(in srgb,var(--accent) 10%,var(--surface));
  color: var(--accent);
  border-color: color-mix(in srgb,var(--accent) 24%,var(--border));
}
.tp-complete:hover { background: color-mix(in srgb,var(--accent) 18%,var(--surface)); }
.tp-danger,.tp-risk { color: var(--danger); }
.tp-danger:hover { background: color-mix(in srgb,var(--danger) 8%,var(--surface)); }
.tp-list-tools, .tp-filters, .tp-segment, .tp-search, .tp-row-actions {
  display: flex;
  align-items: center;
}
.tp-list-tools { justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tp-filters { gap: 8px; flex-wrap: wrap; }
.tp-segment { gap: 2px; border-radius: 9px; background: var(--surface-alt); padding: 3px; }
.tp-segment button { padding: 7px 10px; min-height: 33px; font-size: .83rem; }
.tp-segment button[aria-pressed="true"] { color: var(--text); background: var(--surface); }
.tp-segment button span { color: var(--muted); background: var(--bg); }
.tp-search, .tp-filters select { min-height: 39px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); }
.tp-search { padding: 0 10px; gap: 7px; color: var(--muted); }
.tp-search input { width: 135px; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 7px 0; font-size: .85rem; }
.tp-search input::placeholder, .tp-field input::placeholder, .tp-field textarea::placeholder { color: var(--muted); opacity: .92; }
.tp-filters select { padding: 6px 10px; font-size: .85rem; max-width: 230px; }
.tp-task-list, .tp-person-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.tp-task, .tp-person {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 21px clamp(15px,2.1vw,29px);
}
.tp-task + .tp-task, .tp-person + .tp-person { border-top: 1px solid var(--border); }
.tp-task-copy, .tp-person-copy { min-width: 0; flex: 1; }
.tp-task-title {
  display: inline-block;
  max-width: 100%;
  color: var(--text);
  padding: 0;
  background: none;
  border: 0;
  font-size: 1.06rem !important;
  font-weight: 675 !important;
  letter-spacing: -.012em;
  text-align: left;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.tp-task-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.tp-preview { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); margin-top: 4px !important; }
.tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 15px; margin-top: 9px; color: var(--muted); line-height: 1.4; font-size: .81rem; }
.tp-meta > span { display: inline-flex; align-items: center; gap: 5px; overflow-wrap: anywhere; }
.tp-row-actions { gap: 7px; flex-shrink: 0; }
.tp-row-actions, .tp-nav, .tp-segment { flex-wrap: wrap; max-width: 100%; }
.tp-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: .77rem;
  line-height: 1.25;
  font-weight: 650;
}
.tp-access-approved, .tp-status-doing { color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,var(--surface)); }
.tp-access-pending { color: var(--text); background: var(--surface-alt); }
.tp-late, .tp-high { color: var(--danger); }
.tp-avatar {
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-size: .88rem;
  font-weight: 700;
}
.tp-person h3, .tp-person-heading h3 { color: var(--text); font-size: 1.06rem; font-weight: 650; overflow-wrap: anywhere; }
.tp-person-copy > p, .tp-person-heading p { color: var(--muted); font-size: .88rem; margin-top: 4px; overflow-wrap: anywhere; }
.tp-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: clamp(36px,7vw,72px) 18px;
}
.tp-empty-icon { display: grid; place-items: center; width: 53px; height: 53px; border-radius: 50%; background: var(--surface-alt); color: var(--accent); margin-bottom: 4px; }
.tp-empty h3 { font-size: 1.13rem; letter-spacing: -.015em; font-weight: 650; }
.tp-empty p { color: var(--muted); line-height: 1.5; font-size: .91rem; }
.tp-dialog {
  box-sizing: border-box;
  width: min(calc(100% - 28px), 510px);
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  scrollbar-color: var(--border) var(--surface);
}
body:has(.tp-dialog[open]) { overflow: hidden; }
.tp-dialog[open] { animation: tp-appear .18s cubic-bezier(.17,.83,.25,1); }
.tp-dialog::backdrop { background: rgba(3,19,27,.64); }
@keyframes tp-appear { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.tp-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 23px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tp-dialog-head h2 { font-size: 1.28rem; font-weight: 660; letter-spacing: -.025em; }
.tp-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.tp-close:hover { background: var(--surface-alt); color: var(--text); }
.tp-dialog-body { padding: 22px 23px; }
.tp-dialog-body[inert] { opacity: .62; }
.tp-detail-title { font-size: 1.29rem; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tp-description { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: .93rem; margin-top: 8px !important; }
.tp-properties { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 20px; margin: 21px 0 !important; }
.tp-properties dt { font-size: .8rem; color: var(--muted); }
.tp-properties dd { margin-top: 3px; font-size: .94rem; overflow-wrap: anywhere; }
.tp-detail-controls, .tp-form-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.tp-note-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 20px; }
.tp-note-section > h3 { font-size: 1.03rem; margin-bottom: 10px; }
.tp-hint { font-size: .84rem; line-height: 1.5; color: var(--muted); }
.tp-notes { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.tp-notes li { border-radius: 8px; padding: 10px 12px; background: var(--surface-alt); }
.tp-notes li header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tp-notes strong { font-weight: 650; font-size: .84rem; }
.tp-notes time { color: var(--muted); font-size: .77rem; }
.tp-notes p { margin-top: 5px; line-height: 1.5; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.tp-note-form { margin-top: 16px; display: grid; gap: 10px; }
.tp-note-form > button { justify-self: end; }
.tp-form { display: grid; gap: 15px; }
.tp-field { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; font-size: .85rem; font-weight: 600; }
.tp-field small { color: var(--muted); font-size: .76rem; font-weight: 450; }
.tp-field input,.tp-field select,.tp-field textarea {
  width: 100%; min-width: 0; box-sizing: border-box;
  display: block; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); background: var(--bg); min-height: 42px; padding: 8px 10px; font-size: .91rem; font-weight: 450;
}
.tp-field select:disabled { opacity: .7; }
.tp-field textarea { resize: vertical; line-height: 1.5; }
.tp-detail-controls .tp-field { max-width: 180px; }
.tp-admin-actions:not(:empty) { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.tp-review-decisions, .tp-manage-task { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tp-review-decisions { margin-bottom: 18px; }
.tp-manage-task { justify-content: space-between; }
.tp-field-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.tp-form-actions { justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 3px; }
.tp-person-heading { margin-bottom: 19px; }
.tp-person-heading .tp-badge { margin-top: 9px; }
.tp-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.tp-check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--accent); }
.tp-check span { display: grid; gap: 3px; }
.tp-check strong { font-size: .9rem; font-weight: 600; }
.tp-check small { color: var(--muted); font-size: .81rem; line-height: 1.4; }
.tp-text-button { padding: 5px 0; background: none; border: 0; justify-self: start; text-decoration: underline; text-underline-offset: .18em; font-size: .86rem !important; }
.tp-question { margin: 0 18px 18px; border-radius: 10px; padding: 16px; background: var(--surface-alt); }
.tp-question p { font-size: .94rem; line-height: 1.5; margin-bottom: 13px; overflow-wrap: anywhere; }
.tp-dialog-body[hidden] ~ .tp-question { margin: 0; padding: 20px 23px; background: transparent; }
.tp-question > div { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.tp-error { padding: 0 22px 16px; color: var(--danger); font-size: .9rem; line-height: 1.5; }
@media (max-width: 700px) {
  .tp-content { padding-top: 26px; }
  .tp-nav { margin-bottom: 25px; }
  .tp-task { flex-direction: column; align-items: stretch; gap: 11px; }
  .tp-row-actions { justify-content: flex-start; }
  .tp-list-tools { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tp-filters { width: 100%; }
  .tp-filters > * { flex: 1; min-width: 0; }
  .tp-filters select { max-width: none; }
  .tp-search input { width: 100%; }
  .tp-page-head { margin-bottom: 19px; }
}
@media (max-width: 700px), (pointer: coarse) {
  .tp-nav button, .tp-segment button, .tp-btn, .tp-close, .tp-text-button, .tp-search,
  .tp-field input, .tp-field select, .tp-field textarea, .tp-filters select { min-height: 44px; }
  .tp-close { width: 44px; flex-shrink: 0; }
  .tp-search input, .tp-filters select, .tp-field input, .tp-field select, .tp-field textarea { font-size: 1rem; }
  .tp-search input { min-height: 42px; }
}
@media (max-width: 450px) {
  .tp-row-actions:has([data-delete-task]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-row-actions:has([data-delete-task]) > :last-child { grid-column: 1 / -1; }
  .tp-content { padding-left: 15px; padding-right: 15px; }
  .tp-nav button { gap: 5px; padding-inline: 9px; }
  .tp-nav button svg { display: none; }
  .tp-segment button { gap: 4px; padding-inline: 6px; }
  .tp-person { flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
  .tp-person > button { flex-basis: 100%; }
  .tp-avatar { width: 32px; height: 32px; font-size: .77rem; }
  .tp-dialog { width: 100%; max-width: 100%; max-height: calc(100dvh - 12px); margin: auto 0 0; border-radius: 15px 15px 0 0; }
  .tp-dialog-body { padding: 16px 17px max(20px, env(safe-area-inset-bottom)); }
  .tp-dialog-head { position: sticky; top: 0; z-index: 1; padding: 7px 17px; }
  .tp-task { padding: 16px; }
  .tp-filters { display: grid; grid-template-columns: minmax(0,1fr); }
  .tp-field-pair { gap: 15px; }
  .tp-field-pair:has(input[type="date"]) { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 380px) {
  .tp-segment:has([data-group="review"]) { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .tp-segment:has([data-group="review"]) button { flex-direction: column; gap: 3px; padding: 5px 2px; }
  .tp-field-pair { grid-template-columns: minmax(0,1fr); }
  .tp-form-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .tp-form-actions .tp-primary { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-dialog[open] { animation: none; }
  .tp-btn { transition: none; }
}
