:root {
  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --primary-soft: #f5f0ff;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e5e7eb;
  --text: #10192b;
  --muted: #64748b;
  --danger: #dc2626;
  --warning: #b45309;
  --success: #15803d;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 14px;
  direction: rtl;
}

.widget-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin: -10px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.widget-brand img {
  display: block;
  width: 112px;
  height: auto;
  margin-block: -13px;
}

.workspace-actions { display: flex; align-items: center; gap: 8px; }
.workspace-fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 33px;
  border: 1px solid #d8c8f6;
  border-radius: 7px;
  padding: 6px 11px;
  color: var(--primary);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.workspace-fullscreen-button:hover { background: var(--primary-soft); }

.admin-access-denied {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 190px;
  padding: 28px 18px;
  text-align: center;
}
.admin-access-denied > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
}
.admin-access-denied h2 { margin: 0 0 5px; color: var(--text); font-size: 15px; }
.admin-access-denied p { max-width: 440px; margin: 0; color: var(--muted); font-size: 11.5px; }

h3 {
  margin: 0 0 8px;
}

.error {
  color: var(--danger);
}

.empty {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

button.secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

button.small {
  padding: 6px 12px;
  font-size: 13px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.back-link {
  align-self: flex-start;
  background: none;
  color: #666;
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
}

.back-link:hover {
  opacity: 0.7;
}

.panel h4 {
  margin: 0 0 12px;
}

.hint {
  color: #999;
  font-size: 13px;
  margin: 8px 0;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin: 14px 0 4px;
}

.field-label.small {
  margin: 10px 0 4px;
}

input[type='text'],
input[type='date'],
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1c1c1c;
}

.task-kind-select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.field-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

textarea {
  resize: vertical;
}

/* Search */

.result-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
}

.result-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item:hover {
  background: #f7fbfe;
}

.result-item.selected {
  background: #e6f8fe;
  font-weight: 600;
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 4px 6px 4px 10px;
  font-size: 13px;
}

.chip-remove {
  background: none;
  color: #999;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
}

.chip-remove:hover {
  color: var(--danger);
  opacity: 1;
}

/* Task cards */

.task-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-card-header input {
  flex: 1;
}

.task-card-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-definition-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.task-definition-row > label:not(.priority-check) {
  display: grid;
  gap: 4px;
}

.task-definition-row label > span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.priority-check {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  cursor: pointer;
  white-space: nowrap;
}

.priority-check input { accent-color: var(--primary); }

/* Project setup playbook */

.onboarding-playbook {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 14px;
  border: 1px solid #e9ddff;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf9ff 0%, #fff 65%, #f4fbff 100%);
}

.playbook-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 22px;
}

.playbook-picker-copy,
.loading-playbook > div,
.playbook-error > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.onboarding-eyebrow {
  color: var(--primary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
}

.onboarding-playbook b { font-size: 13px; }
.onboarding-playbook small { color: var(--muted); font-size: 10.5px; line-height: 1.5; }

.playbook-picker-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.playbook-picker-actions select {
  max-width: 220px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
}

.playbook-error { border-color: #fecaca; background: #fffafa; }
.playbook-error b { color: var(--danger); }
.onboarding-playbook.recommended-plan {
  border-color: color-mix(in srgb, var(--primary) 35%, #e9ddff);
  box-shadow: 0 8px 22px rgba(109, 40, 217, .08);
}
.recommended-plan .playbook-symbol { position: relative; }
.recommended-plan .playbook-symbol::after {
  content: '✓';
  position: absolute;
  inset-inline-end: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.product-plan-confirmation { grid-column: 1 / -1; display: grid; gap: 10px; border-top: 1px solid #eadcff; padding-top: 11px; }
.product-plan-confirmation > div > b { display: block; margin-bottom: 6px; color: #7c2d12; font-size: 11px; }
.product-plan-confirmation ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.product-plan-confirmation li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 8px; padding: 6px 8px; background: rgb(255 255 255 / 75%); }
.product-plan-confirmation li span { font-size: 10px; font-weight: 700; }
.product-plan-confirmation label { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #fdba74; border-radius: 9px; padding: 9px 10px; color: #9a3412; background: #fff7ed; cursor: pointer; font-size: 10px; font-weight: 700; line-height: 1.6; }
.product-plan-confirmation input { margin-top: 3px; accent-color: #c2410c; }

.picker-btn {
  background: #fff;
  color: #1c1c1c;
  border: 1px solid #ddd;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  flex: 1;
}

.picker-btn:hover {
  border-color: var(--primary);
  opacity: 1;
}

.icon-btn {
  background: none;
  color: #999;
  padding: 0 6px;
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
}

.icon-btn:hover {
  color: var(--danger);
  opacity: 1;
}

.progress-bar {
  background: #e8e8e8;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.progress-fill {
  background: var(--primary);
  height: 100%;
}

.progress-label {
  margin: 0 0 12px;
  color: #666;
}

.project-desc {
  color: #666;
  font-size: 13px;
  margin: 0 0 12px;
}

/* Status colors, shared by the breakdown chips and the accordion's status dots */
.status-pending { --status-color: #9e9e9e; }
.status-progress { --status-color: var(--primary); }
.status-awaiting { --status-color: #f59e0b; }
.status-completed { --status-color: #22a55e; }
.status-deferred { --status-color: #8b5cf6; }

.status-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.status-chip {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--status-color) 15%, white);
  color: var(--status-color);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--status-color);
}

/* Tabs */

.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #eee;
  margin: 8px 0 16px;
}

.tab-btn {
  background: none;
  color: #999;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 4px;
  margin-inline-end: 14px;
  font-size: 13px;
  font-weight: 600;
}

.tab-btn:hover {
  color: #1c1c1c;
  opacity: 1;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Stat tiles */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.stat-tile {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 12px;
  border-inline-start: 3px solid #ddd;
}

.stat-tile.stat-good { border-inline-start-color: #22a55e; }
.stat-tile.stat-warning { border-inline-start-color: #f59e0b; }
.stat-tile.stat-critical { border-inline-start-color: var(--danger); }

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  display: block;
  color: #999;
  font-size: 12px;
  margin-top: 2px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin: 16px 0 8px;
}

/* Team involvement */

.involvement-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.involvement-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.involvement-name {
  flex: 0 0 40%;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.involvement-bar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: #eee;
  overflow: hidden;
}

.involvement-bar-fill {
  height: 100%;
  background: var(--primary);
}

.involvement-count {
  flex: 0 0 auto;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

/* Tasks tab — Bitrix24-styled, clickable rows */

.b24-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.b24-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.b24-task-row:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.b24-task-title {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-pill {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f0f0f0;
  color: #666;
  white-space: nowrap;
}

.deadline-pill.overdue {
  background: color-mix(in srgb, var(--danger) 12%, white);
  color: var(--danger);
}

.b24-task-assignee {
  flex: 0 0 auto;
  font-size: 12px;
  color: #999;
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty states / settings */

.empty-state {
  padding: 24px 0;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.empty-state h4 {
  color: var(--text);
  font-size: 15px;
  margin: 8px 0 4px;
}

.empty-state p {
  margin: 0 auto;
  max-width: 42ch;
}

.empty-state-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
}

/* Collections */

.collection-summary {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.section-heading .section-label,
.section-heading .hint {
  margin-block: 0 4px;
}

.collection-list {
  display: grid;
  gap: 8px;
}

.collection-card {
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--muted);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.collection-card.collection-critical { border-inline-start-color: var(--danger); }
.collection-card.collection-warning { border-inline-start-color: var(--warning); }
.collection-card.collection-good { border-inline-start-color: var(--success); }
.collection-card.collection-partial { border-inline-start-color: var(--primary); }

.collection-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.collection-card-head > div {
  min-width: 0;
}

.collection-id {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}

.collection-amount {
  display: block;
  font-size: 17px;
}

.collection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #f0f2f5;
  color: var(--muted);
  font-size: 12px;
}

.collection-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.collection-meta b {
  color: var(--text);
  font-weight: 500;
}

.payment-status {
  font-weight: 600;
}

.payment-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.payment-status.status-critical { color: var(--danger); }
.payment-status.status-warning { color: var(--warning); }
.payment-status.status-good { color: var(--success); }
.payment-status.status-partial { color: var(--primary); }
.payment-status.status-neutral { color: var(--muted); }

/* Deal-owned native subscriptions */

.prelink-command-center {
  display: grid;
  gap: 16px;
}

.prelink-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgb(109 40 217 / 10%), transparent 34%),
    linear-gradient(145deg, #fff, #f8fafc);
  box-shadow: 0 8px 26px rgb(15 23 42 / 5%);
}

.prelink-hero h2 { margin: 4px 0 8px; font-size: 21px; line-height: 1.35; }
.prelink-stage { flex: 0 0 auto; border: 1px solid #ddd6fe; border-radius: 999px; padding: 6px 10px; color: #6d28d9; background: #f5f3ff; font-size: 10px; font-weight: 700; }
.prelink-section { padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.prelink-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.prelink-section-title > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font: 700 11px/1 'Space Grotesk', sans-serif; }
.prelink-section-title h3, .prelink-section-title p { margin: 0; }
.prelink-section-title h3 { font-size: 14px; }
.prelink-section-title p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.work-model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-model-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 112px; border: 1px solid #dbe2ea; border-radius: 14px; padding: 15px; color: var(--text); text-align: start; background: #fff; box-shadow: none; }
.work-model-card:hover { border-color: #a78bfa; background: #faf9ff; opacity: 1; transform: translateY(-1px); }
.work-model-card.selected { border-color: #7c3aed; background: linear-gradient(145deg, #fff, #f5f3ff); box-shadow: 0 0 0 3px rgb(124 58 237 / 9%); }
.work-model-card.model-project.selected { border-color: #0284c7; background: linear-gradient(145deg, #fff, #f0f9ff); box-shadow: 0 0 0 3px rgb(2 132 199 / 8%); }
.work-model-card.product-recommended-model:not(.selected) { border-color: #86efac; background: linear-gradient(145deg, #fff, #f0fdf4); }
.work-model-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #7c3aed, #5b21b6); font-size: 20px; }
.model-project .work-model-icon { background: linear-gradient(145deg, #0ea5e9, #0369a1); }
.work-model-card b, .work-model-card small { display: block; }
.work-model-card b { font-size: 13px; }
.work-model-card small { margin-top: 5px; color: var(--muted); font-size: 9.5px; line-height: 1.65; }
.work-model-card i { align-self: start; border-radius: 999px; padding: 5px 8px; color: #6d28d9; background: #f5f3ff; font-size: 8px; font-style: normal; font-weight: 700; }
.model-project.work-model-card i { color: #0369a1; background: #f0f9ff; }
.product-recommended-model.work-model-card i { color: #047857; background: #ecfdf5; }
.product-model-recommendation { display: grid; gap: 3px; margin-top: 10px; border: 1px solid #bbf7d0; border-radius: 11px; padding: 10px 12px; color: #065f46; background: #f0fdf4; font-size: 10px; line-height: 1.6; }
.product-model-recommendation.has-conflict { border-color: #fed7aa; color: #9a3412; background: #fff7ed; }
.product-model-recommendation b, .product-model-recommendation span, .product-model-recommendation small { display: block; }
.product-model-recommendation small { color: var(--muted); font-size: 9px; }
.product-model-recommendation.loading-recommendation { border-style: dashed; border-color: var(--border); color: var(--muted); background: #f8fafc; }
.recommended-product-streams { grid-column: 2 / -1; display: grid; gap: 5px; padding-top: 9px; border-top: 1px solid var(--border); }
.recommended-product-streams > span { color: var(--muted); font-size: 10px; }
.recommended-product-streams > div { display: flex; flex-wrap: wrap; gap: 5px; }
.recommended-product-streams i { padding: 3px 7px; border-inline-start: 3px solid var(--stream-color); border-radius: 6px; color: var(--text); background: #f8fafc; font-size: 9.5px; font-style: normal; }
.work-model-prompt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 70px; border: 1px dashed #cbd5e1; border-radius: 13px; color: var(--muted); background: #f8fafc; font-size: 10px; }
.work-model-prompt p { margin: 0; }
.work-model-badge { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; padding: 5px 9px; color: #6d28d9; background: #f5f3ff; font-size: 9px; font-weight: 800; }
.work-model-badge.model-project { color: #0369a1; background: #e0f2fe; }
.delivery-model-status { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.form-work-model { display: flex; align-items: center; gap: 9px; margin: 3px 0 10px; }
.form-work-model small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.project-link-step { background: #fafbfc; }
.project-link-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px dashed #cfd6df; border-radius: 12px; background: #fff; }
.project-link-choice > div:first-child { display: flex; align-items: center; gap: 10px; }
.project-link-choice > div:first-child > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #64748b; background: #f1f5f9; font-size: 18px; }
.project-link-choice p, .project-link-choice b, .project-link-choice small { display: block; margin: 0; }
.project-link-choice b { font-size: 11px; }
.project-link-choice small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.subscription-eyebrow { display: block; color: #6d28d9; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.subscription-setup-card, .subscription-command-card { overflow: visible; border: 1px solid #ded6f3; border-radius: 14px; background: linear-gradient(160deg, #fff 10%, #fbfaff); box-shadow: 0 8px 24px rgb(76 29 149 / 5%); }
.subscription-setup-card { padding: 17px; }
.subscription-setup-intro { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
.subscription-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #7c3aed, #5b21b6); box-shadow: 0 7px 14px rgb(109 40 217 / 18%); font-size: 20px; }
.subscription-setup-intro h3, .subscription-setup-intro p { margin: 0; }
.subscription-setup-intro h3 { margin-top: 2px; font-size: 15px; }
.subscription-setup-intro p { max-width: 720px; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.subscription-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.subscription-form-grid label { position: relative; min-width: 0; color: #334155; font-size: 9.5px; font-weight: 600; }
.subscription-form-grid label > span:first-child { display: block; margin-bottom: 5px; }
.subscription-form-grid input, .subscription-form-grid select { width: 100%; min-width: 0; height: 38px; border: 1px solid #dbe1e8; border-radius: 9px; padding: 8px 10px; color: var(--text); background: #fff; font: 500 11px/1.2 inherit; }
.subscription-form-grid input:focus, .subscription-form-grid select:focus { border-color: #8b5cf6; outline: 3px solid rgb(139 92 246 / 10%); }
.subscription-product-field { z-index: 8; }
.product-search-box { position: relative; }
.product-search-box input { padding-inline-end: 30px; }
.product-search-mark { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); margin: 0 !important; color: #7c3aed; font-size: 15px; pointer-events: none; }
.product-search-results { position: absolute; z-index: 20; top: calc(100% + 5px); inset-inline: 0; max-height: 230px; overflow: auto; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgb(15 23 42 / 16%); }
.product-search-results:empty { display: none; }
.product-result { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; width: auto; border: 0; border-bottom: 1px solid #edf0f3; border-radius: 0; padding: 9px 10px; color: var(--text); background: #fff; text-align: start; }
.product-result span, .product-result b { color: #1e293b; }
.product-result-row { display: flex; align-items: stretch; border-bottom: 1px solid #edf0f3; }
.product-result-row .product-result { border-bottom: 0; }
.product-add-btn { flex: 0 0 auto; margin: 6px; padding: 4px 7px; border: 1px solid #c4b5fd; border-radius: 6px; color: #6d28d9; background: #faf5ff; font-size: 9px; }
.deal-product-summary { display: grid; gap: 5px; margin-top: 8px; padding: 8px; border: 1px solid #e7e5f2; border-radius: 8px; background: #fbfaff; }
.deal-product-summary b { font-size: 9px; color: #4c4671; }
.deal-product-summary small { color: var(--muted); font-size: 8.5px; }
.deal-product-summary > div { display: flex; flex-wrap: wrap; gap: 5px; }
.deal-product-chip { padding: 3px 6px; border-radius: 999px; color: #5b5871; background: #f0eff5; font-size: 8.5px; }
.deal-product-chip.primary { color: #5b21b6; background: #ede9fe; font-weight: 700; }
.product-result:first-child { border-radius: 10px 10px 0 0; }
.product-result:last-child { border: 0; border-radius: 0 0 10px 10px; }
.product-result:hover { background: #f8f7ff; opacity: 1; }
.product-result span, .product-result b, .product-result small { display: block; }
.product-result-copy { min-width: 0; flex: 1 1 auto; }
.product-result b { overflow: hidden; color: #0f172a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-result small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.product-result strong { flex: 0 0 auto; color: #5b21b6; font-size: 10px; }
.product-result-status { border: 1px solid #e5e7eb; border-radius: 9px; padding: 10px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 400; }
.subscription-total-field output { display: flex; align-items: center; height: 38px; border: 1px solid #c4b5fd; border-radius: 9px; padding: 8px 10px; color: #4c1d95; background: #f5f3ff; font-size: 12px; font-weight: 800; }
.subscription-total-field small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; font-weight: 400; line-height: 1.45; }
.subscription-products-editor { margin-top: 13px; border: 1px solid #e7e5f2; border-radius: 10px; background: #fff; overflow: hidden; }
.subscription-products-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid #eeeaf8; background: #fbfaff; }
.subscription-products-editor > header b, .subscription-products-editor > header small { display: block; }
.subscription-products-editor > header b { color: #312e55; font-size: 10px; }
.subscription-products-editor > header small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.subscription-products-editor > header > span { border-radius: 999px; padding: 3px 7px; color: #5b21b6; background: #ede9fe; font-size: 8.5px; font-weight: 700; }
.subscription-products-editor > .hint { margin: 0; padding: 12px; }
.subscription-product-lines { display: grid; }
.subscription-product-lines article { display: grid; grid-template-columns: minmax(0, 1fr) 84px 92px 82px 110px auto; align-items: end; gap: 9px; padding: 10px 11px; border-bottom: 1px solid #f0edf8; }
.subscription-product-lines article:last-child { border-bottom: 0; }
.subscription-product-lines article > div b, .subscription-product-lines article > div small { display: block; }
.subscription-product-lines article > div b { overflow: hidden; color: #1e293b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-product-lines article > div small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.subscription-product-lines label { color: #475569; font-size: 8.5px; font-weight: 600; }
.subscription-product-lines label span { display: block; margin-bottom: 4px; }
.subscription-product-lines input, .subscription-product-lines select { width: 100%; height: 34px; border: 1px solid #dbe1e8; border-radius: 7px; padding: 6px 8px; color: var(--text); background: #fff; font: 500 10px/1 inherit; }
.subscription-product-lines article > strong { padding-bottom: 9px; color: #4c1d95; font-size: 10px; text-align: end; }
.subscription-product-lines article > button { padding: 5px 8px; font-size: 9px; }
.scheduled-tasks-panel { margin: 14px 0; border: 1px solid #bfdbfe; border-radius: 12px; background: #f8fbff; overflow: hidden; }
.scheduled-tasks-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #dbeafe; }
.scheduled-tasks-panel h4 { margin: 2px 0; color: #1e3a5f; font-size: 12px; }
.scheduled-tasks-panel p { margin: 0; color: #64748b; font-size: 9px; line-height: 1.55; }
.scheduled-tasks-panel > header > b { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: 50%; color: #1d4ed8; background: #dbeafe; font-size: 10px; }
.scheduled-tasks-list { display: grid; }
.scheduled-task-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e5effc; }
.scheduled-task-card:last-child { border-bottom: 0; }
.scheduled-task-card > div { min-width: 0; display: grid; gap: 3px; }
.scheduled-task-card b { overflow: hidden; color: #1e293b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-task-card small { color: #64748b; font-size: 8.5px; }
.scheduled-task-card em { color: #b45309; font-size: 8.5px; font-style: normal; }
.scheduled-task-state, .scheduled-task-local { width: fit-content; border-radius: 999px; padding: 3px 6px; color: #1d4ed8; background: #dbeafe; font-size: 8px; font-weight: 700; }
.scheduled-task-local { flex: 0 0 auto; color: #475569; background: #e2e8f0; }
.scheduled-task-card.failed .scheduled-task-state { color: #b45309; background: #fef3c7; }
.money-input { position: relative; }
.money-input input { padding-inline-end: 50px; }
.money-input b { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); color: #64748b; font: 700 9px/1 'Space Grotesk', sans-serif; }
.subscription-form-note { display: flex; align-items: center; gap: 8px; margin-top: 13px; border: 1px solid #dcfce7; border-radius: 10px; padding: 9px 10px; color: #166534; background: #f0fdf4; }
.subscription-form-note > span { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #16a34a; font-size: 10px; }
.subscription-form-note p { margin: 0; font-size: 9px; }
.subscription-inline-error { margin: 10px 0 0; border-radius: 8px; padding: 8px 10px; color: #991b1b; background: #fef2f2; font-size: 9.5px; }
.subscription-form-actions { display: flex; align-items: center; gap: 8px; margin-top: 13px; }

.subscription-command-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px; border-bottom: 1px solid #eee9f8; }
.subscription-title-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.subscription-title-line h3 { margin: 0; font-size: 16px; }
.subscription-command-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.subscription-status { border-radius: 999px; padding: 3px 7px; font-size: 8px; font-weight: 700; }
.subscription-status.status-active { color: #166534; background: #dcfce7; }
.subscription-status.status-paused { color: #92400e; background: #fef3c7; }
.subscription-head-actions { display: flex; align-items: center; gap: 8px; }
.subscription-head-actions .text-link { padding: 4px; color: #64748b; font-size: 9px; }
.subscription-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 13px 17px; }
.subscription-metrics > div { min-width: 0; border-inline-end: 1px solid #eceff3; padding: 0 12px; }
.subscription-metrics > div:first-child { padding-inline-start: 0; }
.subscription-metrics > div:last-child { border: 0; }
.subscription-metrics span, .subscription-metrics b { display: block; }
.subscription-metrics span { overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-metrics b { margin-top: 3px; font-size: 13px; }
.subscription-metrics .metric-due b { color: #15803d; }
.subscription-metrics .metric-overdue b { color: #b45309; }
.subscription-metrics .metric-critical b { color: #dc2626; }
.collection-policy-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border-top: 1px solid #eee9f8; padding: 10px 17px; color: #475569; background: rgb(248 250 252 / 70%); font-size: 8.5px; }
.collection-policy-strip span { display: inline-flex; align-items: center; gap: 4px; }
.collection-policy-strip i { width: 7px; height: 7px; border-radius: 50%; }
.policy-gray { background: #94a3b8; }.policy-green { background: #16a34a; }.policy-yellow { background: #d97706; }.policy-red { background: #dc2626; }
.collection-policy-strip p { flex: 1 1 280px; margin: 0; color: var(--muted); text-align: end; }
.subscription-alert { margin: 0 17px 13px; border-radius: 9px; padding: 9px 10px; font-size: 9px; }
.subscription-alert.critical { color: #991b1b; background: #fef2f2; }
.collection-follow-up-suspension { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 17px 13px; border: 1px solid #bae6fd; border-radius: 10px; padding: 10px; background: #f0f9ff; }
.collection-follow-up-suspension.active { border-color: #fed7aa; background: #fff7ed; }
.collection-follow-up-suspension span, .collection-follow-up-suspension b, .collection-follow-up-suspension p, .collection-follow-up-suspension small { display: block; }
.collection-follow-up-suspension span { color: #0369a1; font-size: 8px; font-weight: 700; }
.collection-follow-up-suspension.active span { color: #9a3412; }
.collection-follow-up-suspension b { margin-top: 2px; color: var(--ink); font-size: 10px; }
.collection-follow-up-suspension p { margin: 2px 0; color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.collection-follow-up-suspension small { color: var(--muted); font-size: 7.5px; }
.collection-follow-up-suspension-form { display: flex; align-items: end; flex-wrap: wrap; gap: 6px; }
.collection-follow-up-suspension-form label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; }
.collection-follow-up-suspension-form input { min-height: 30px; border: 1px solid #bae6fd; border-radius: 6px; padding: 4px 6px; font: inherit; }
.collection-follow-up-suspension-form label:last-of-type input { width: 190px; }
.subscription-timeline-section { margin-top: 16px; }
.subscription-cycle-list { display: grid; gap: 7px; }
.subscription-cycle { --cycle-color: #94a3b8; display: grid; grid-template-columns: 7px minmax(150px, 1.1fr) minmax(170px, .75fr) minmax(235px, .95fr); align-items: center; overflow: hidden; min-height: 76px; border: 1px solid #e4e8ed; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgb(15 23 42 / 3%); }
.cycle-state-rail { align-self: stretch; background: color-mix(in srgb, var(--cycle-color) 11%, white); }
.cycle-state-rail i { display: block; width: 100%; height: 100%; background: var(--cycle-color); }
.cycle-main { min-width: 0; padding: 11px 13px; }
.cycle-topline { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.cycle-state { border-radius: 999px; padding: 2px 6px; color: color-mix(in srgb, var(--cycle-color) 80%, #111827); background: color-mix(in srgb, var(--cycle-color) 12%, white); font-size: 8px; font-weight: 700; }
.cycle-period { color: var(--muted); font-size: 8px; }
.cycle-main > strong { display: block; font-size: 13px; }
.cycle-main > small { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.cycle-error { overflow: hidden; margin: 3px 0 0; color: #b91c1c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.cycle-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-inline-start: 1px solid #edf0f3; padding: 4px 14px; }
.cycle-dates small, .cycle-dates b { display: block; }
.cycle-dates small { color: var(--muted); font-size: 7.5px; }
.cycle-dates b { margin-top: 2px; font-size: 9px; font-weight: 600; }
.cycle-action { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; border-inline-start: 1px solid #edf0f3; padding: 8px 12px; }
.cycle-action a, .cycle-action .text-link, .forecast-lock { font-size: 8.5px; white-space: nowrap; }
.cycle-action a { color: #5b21b6; font-weight: 700; text-decoration: none; }
.cycle-action .text-link { padding: 0; color: #b91c1c; }
.forecast-lock { color: #64748b; }
.invoice-quick-status { width: 100%; min-width: 220px; border: 1px solid #e7e1f2; border-radius: 9px; padding: 7px; background: #fbfaff; }
.invoice-status-heading, .invoice-status-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.invoice-native-badge { border-radius: 999px; padding: 3px 7px; background: #f1f5f9; color: #475569; font-size: 7.5px; font-weight: 700; white-space: nowrap; }
.invoice-native-badge.invoice-payment-paid { background: #dcfce7; color: #166534; }
.invoice-native-badge.invoice-payment-partial { background: #ede9fe; color: #6d28d9; }
.invoice-native-badge.invoice-payment-cancelled { background: #f1f5f9; color: #64748b; }
.invoice-sync-btn, .invoice-save-status { width: auto; border: 0; padding: 2px 4px; color: #6d28d9; background: transparent; font-size: 7.5px; font-weight: 700; white-space: nowrap; }
.invoice-sync-btn:hover, .invoice-save-status:hover { background: #f1edff; opacity: 1; }
.invoice-save-status { border-radius: 6px; padding: 4px 7px; color: #fff; background: #6d28d9; }
.invoice-save-status:hover { color: #fff; background: #5b21b6; }
.invoice-save-status:disabled, .invoice-sync-btn:disabled { opacity: .45; cursor: default; }
.invoice-stage-field { display: block; margin: 6px 0; }
.invoice-stage-field > span { display: block; margin-bottom: 3px; color: #64748b; font-size: 7px; }
.invoice-stage-field select { height: 29px; border-color: #ddd6ee; border-radius: 7px; padding: 4px 7px; font-size: 9px; }
.invoice-status-footer small { overflow: hidden; color: #64748b; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-status-loading, .invoice-status-error { display: block; color: #64748b; font-size: 8px; }
.invoice-status-error { margin-bottom: 5px; color: #b91c1c; white-space: normal; }
.invoice-proof-fields { display: grid; gap: 7px; margin: 7px 0; border: 1px dashed #c4b5fd; border-radius: 8px; padding: 8px; background: #faf9ff; }
.invoice-proof-fields > small { color: #5b21b6; font-size: 8px; line-height: 1.6; }
.invoice-proof-fields label { display: grid; gap: 3px; color: #475569; font-size: 8px; font-weight: 700; }
.invoice-proof-fields label small { color: #64748b; font-weight: 400; }
.invoice-proof-fields input[type="file"] { max-width: 100%; padding: 5px; font-size: 8px; }
.invoice-proof-fields input[type="text"] { border: 1px solid #ddd6fe; border-radius: 6px; padding: 6px 7px; font: inherit; font-size: 8px; }
.invoice-proof-review { display: grid; gap: 6px; margin-top: 8px; border: 1px solid #fde68a; border-radius: 9px; padding: 8px; background: #fffbeb; }
.invoice-proof-review > b { color: #92400e; font-size: 9px; }
.invoice-proof-review > small, .invoice-proof-review p { margin: 0; color: #78350f; font-size: 8px; line-height: 1.6; }
.payment-proof-queue { display: grid; gap: 10px; margin-bottom: 16px; border: 1px solid #fcd34d; border-radius: 14px; padding: 14px; background: linear-gradient(135deg, #fffbeb, #fff); }
.payment-proof-queue header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.payment-proof-queue h3, .payment-proof-queue p { margin: 0; }
.payment-proof-queue h3 { font-size: 14px; }
.payment-proof-queue header p { margin-top: 3px; }
.payment-proof-queue > header > b { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 999px; color: #92400e; background: #fef3c7; font-size: 11px; }
.payment-proof-queue-list { display: grid; gap: 8px; }
.payment-proof-queue-list article { display: grid; gap: 7px; border: 1px solid #fde68a; border-radius: 10px; padding: 10px; background: #fff; }
.payment-proof-queue-list article > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.payment-proof-queue-list article > div:first-child > b { font-size: 10px; }
.payment-proof-queue-list article > div:first-child > small { width: 100%; color: var(--muted); font-size: 8px; }
.payment-proof-attachments { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: #475569; font-size: 8px; }
.payment-proof-attachments a { color: #5b21b6; font-weight: 700; text-decoration: none; }
.payment-proof-queue-list article > p { color: #475569; font-size: 8px; }
.payment-proof-queue-list label { display: grid; gap: 3px; color: #475569; font-size: 8px; }
.payment-proof-queue-list label input { border: 1px solid #ddd6fe; border-radius: 7px; padding: 6px 7px; font: inherit; font-size: 9px; }
.subscription-cycle.cycle-issued { --cycle-color: #64748b; }
.subscription-cycle.cycle-pre_due { --cycle-color: #0284c7; }
.subscription-cycle.cycle-due { --cycle-color: #16a34a; border-color: #bbf7d0; }
.subscription-cycle.cycle-overdue { --cycle-color: #d97706; border-color: #fde68a; }
.subscription-cycle.cycle-escalated, .subscription-cycle.cycle-failed { --cycle-color: #dc2626; border-color: #fecaca; }
.subscription-cycle.cycle-partial { --cycle-color: #7c3aed; border-color: #ddd6fe; }
.subscription-cycle.cycle-paid { --cycle-color: #047857; border-color: #a7f3d0; background: #fbfffd; }
.subscription-cycle.cycle-cancelled { --cycle-color: #64748b; opacity: .72; }
.subscription-cycle.cycle-forecast { color: #64748b; background: #f8fafc; box-shadow: none; }
.subscription-loading, .subscription-load-error { display: flex; align-items: center; gap: 11px; min-height: 92px; border: 1px dashed #d5dbe3; border-radius: 12px; padding: 16px; color: var(--muted); background: #fafbfc; }
.subscription-loading i { width: 27px; height: 27px; flex: 0 0 auto; border: 3px solid #e9e5f5; border-top-color: #7c3aed; border-radius: 50%; animation: intelligence-spin .8s linear infinite; }
.subscription-loading b, .subscription-loading span { display: block; }
.subscription-loading b { color: var(--text); font-size: 10px; }.subscription-loading span { margin-top: 2px; font-size: 8.5px; }
.subscription-load-error { align-items: flex-start; flex-direction: column; color: #991b1b; background: #fff7f7; }
.subscription-load-error b, .subscription-load-error p { margin: 0; }.subscription-load-error p { font-size: 9px; }

.settings-section {
  margin-bottom: 20px;
}

.secondary-projects-manager { display: grid; gap: 10px; border: 1px solid #dbe5f0; border-radius: 13px; padding: 14px; background: linear-gradient(135deg, #fbfdff, #fff); }
.secondary-projects-manager header h3 { margin: 2px 0 4px; font-size: 14px; }
.secondary-projects-manager header p { max-width: 680px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.primary-project-reference, .secondary-project-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px 10px; background: #fff; }
.primary-project-reference > span, .secondary-project-row small { display: block; color: var(--muted); font-size: 8px; }
.primary-project-reference a, .secondary-project-row b { color: var(--text); font-size: 10px; text-decoration: none; }
.primary-project-reference a:hover { color: var(--primary); text-decoration: underline; }
.secondary-project-list { display: grid; gap: 6px; }
.secondary-project-actions { display: flex; align-items: center; gap: 5px; }
.secondary-project-empty, .secondary-project-error { margin: 0; }
.secondary-project-add { display: flex; align-items: end; gap: 8px; border-top: 1px solid #edf1f5; padding-top: 10px; }
.secondary-project-add label { display: grid; flex: 1; gap: 3px; color: var(--muted); font-size: 8px; }
.secondary-project-add input { width: min(100%, 240px); border: 1px solid #dbe3ec; border-radius: 8px; padding: 7px 8px; font-size: 10px; }
.secondary-project-add small { font-size: 8px; }

.deal-notification-policy {
  display: grid;
  gap: 12px;
  border: 1px solid #ddd6fe;
  border-radius: 13px;
  padding: 14px;
  background: linear-gradient(135deg, #fbfaff, #fff);
}
.deal-notification-policy > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.deal-notification-policy h3 { margin: 2px 0 3px; font-size: 14px; }
.deal-notification-policy header p,
.deal-notification-effective { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.deal-notification-effective small { display: block; margin-top: 3px; color: #475569; }
.open-channel-apply-all { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; margin: 11px 0; padding: 9px; border: 1px solid var(--hair); border-radius: 9px; background: #f8fafc; }
.open-channel-apply-all label { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 700; }
.open-channel-apply-all select { min-width: 0; }
.open-channel-apply-all .hint { grid-column: 1 / -1; margin: -1px 0 0; }
.open-channel-route-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 9px; }
.open-channel-route-card { overflow: hidden; border: 1px solid var(--hair); border-radius: 9px; background: #fff; }
.open-channel-route-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 9px; border-bottom: 1px solid var(--hair); background: #f8fafc; }
.open-channel-route-card header > div { min-width: 0; }
.open-channel-route-card header b, .open-channel-route-card header small { display: block; }
.open-channel-route-card header b { color: var(--paper); font-size: 10px; }
.open-channel-route-card header small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.open-channel-route-options { display: grid; gap: 1px; padding: 5px; }
.open-channel-route-options > label { display: flex; align-items: flex-start; gap: 6px; padding: 5px; border-radius: 6px; cursor: pointer; }
.open-channel-route-options > label:hover { background: #f1f5f9; }
.open-channel-route-options input { margin-top: 3px; }
.open-channel-route-options span { display: grid; min-width: 0; }
.open-channel-route-options b { color: var(--paper); font-size: 9px; }
.open-channel-route-options small { overflow: hidden; color: var(--muted); font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.deal-notification-status { flex: 0 0 auto; border-radius: 999px; padding: 4px 8px; background: #f1f5f9; color: #475569; font-size: 9px; font-weight: 800; }
.deal-notification-status.custom { background: #ede9fe; color: #6d28d9; }
.deal-notification-status.muted { background: #fef2f2; color: #b91c1c; }
.deal-notification-warning, .deal-notification-feedback { margin: 0; border-radius: 8px; padding: 7px 9px; background: #fff7ed; color: #9a3412; font-size: 10px; line-height: 1.6; }
.deal-notification-feedback { background: #f0fdf4; color: #166534; }
.client-request-share-link { display: grid; gap: 7px; border: 1px solid #bfdbfe; border-radius: 10px; padding: 10px; background: #f8fbff; }
.client-request-share-link b, .client-request-share-link small { display: block; }
.client-request-share-link b { color: #1e3a8a; font-size: 11px; }
.client-request-share-link small { margin-top: 1px; color: #64748b; font-size: 9px; }
.client-request-share-controls { display: flex; align-items: center; gap: 6px; min-width: 0; }
.client-request-share-controls input { flex: 1; min-width: 0; height: 30px; padding: 4px 7px; border-color: #bfdbfe; color: #1d4ed8; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; text-align: left; }
.client-request-share-controls .button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.deal-notification-modes { display: grid; gap: 7px; margin: 0; border: 0; border-top: 1px solid #e9e4f8; padding: 10px 0 0; }
.deal-notification-modes legend { padding: 0; color: #475569; font-size: 10px; font-weight: 800; }
.deal-notification-modes label { display: flex; align-items: center; gap: 7px; color: #334155; cursor: pointer; font-size: 11px; }
.deal-notification-modes input { accent-color: var(--primary); }
.deal-notification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deal-notification-grid > section { display: grid; gap: 6px; border: 1px solid #ece8f7; border-radius: 9px; padding: 9px; background: rgb(255 255 255 / .72); }
.deal-notification-grid h4 { margin: 0 0 2px; color: #475569; font-size: 10px; }
.deal-notification-switch { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; }
.deal-notification-switch input { margin-top: 3px; accent-color: var(--primary); }
.deal-notification-switch b, .deal-notification-switch small { display: block; }
.deal-notification-switch b { color: #334155; font-size: 10px; }
.deal-notification-switch small { margin-top: 1px; color: #64748b; font-size: 8.5px; line-height: 1.4; }
.deal-client-notification-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; border: 1px solid #ece8f7; border-radius: 9px; padding: 10px; background: rgb(255 255 255 / .72); }
.deal-client-notification-effective-list { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-client-notification-effective-list span { border-radius: 999px; padding: 4px 8px; font-size: 8.5px; font-weight: 700; }
.deal-client-notification-effective-list .allowed { color: #166534; background: #dcfce7; }
.deal-client-notification-effective-list .blocked { color: #64748b; background: #f1f5f9; }
.deal-notification-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deal-notification-fields label { display: grid; grid-template-columns: 1fr minmax(52px, .55fr) auto; align-items: center; gap: 6px; color: #475569; font-size: 10px; font-weight: 700; }
.deal-notification-fields label.deal-notification-select-field { grid-template-columns: 1fr minmax(95px, .8fr); }
.deal-notification-fields input, .deal-notification-fields select { min-width: 0; height: 31px; padding: 4px 7px; border-color: #ddd6ee; font-size: 10px; }
.deal-notification-fields b { color: #64748b; font-size: 9px; }

@media (max-width: 560px) {
  .deal-notification-grid, .deal-notification-fields { grid-template-columns: 1fr; }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin: 8px 0;
}

.checkbox-row input {
  width: auto;
}

select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1c1c1c;
  background: #fff;
}

/* Project widget's deal card */

.stage-badge {
  display: inline-block;
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #999;
}

.deal-amount {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.entity-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-deal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-deal-head h3 {
  min-width: 0;
  margin: 0;
}

.deal-title-link {
  color: var(--text);
  text-decoration: none;
}

.deal-title-link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.open-record {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.open-record:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Unlink */

.unlink-area {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.text-link {
  background: none;
  padding: 0;
  font-size: 13px;
  color: #999;
}

.text-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.text-link.link-danger {
  color: var(--danger);
}

button.danger {
  background: var(--danger);
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .tab-bar {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tab-btn {
    flex: 0 0 auto;
    margin-inline-end: 8px;
  }

  .b24-task-row {
    flex-wrap: wrap;
  }

  .b24-task-title {
    flex-basis: calc(100% - 20px);
  }

  .b24-task-assignee {
    max-width: 50%;
    margin-inline-start: 16px;
  }

  .collection-card-head,
  .collection-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .onboarding-playbook { grid-template-columns: auto 1fr; }
  .playbook-picker-actions { grid-column: 1 / -1; width: 100%; justify-content: stretch; }
  .playbook-picker-actions select { flex: 1; max-width: none; }
  .task-definition-row { grid-template-columns: 1fr; }
  .priority-check { min-height: auto; }
}

/* Deal delivery command center */

.delivery-command-center {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.delivery-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid #e9ddff;
  border-radius: 18px;
  background:
    radial-gradient(circle at 5% 0%, rgb(124 58 237 / 14%), transparent 32%),
    linear-gradient(135deg, #fbf9ff 0%, #fff 55%, #f4fbff 100%);
}

.delivery-hero::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  inset: auto auto -105px -70px;
  border: 24px solid rgb(109 40 217 / 5%);
  border-radius: 50%;
  pointer-events: none;
}

.delivery-hero-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.delivery-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgb(34 197 94 / 12%);
}

.delivery-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.delivery-title-row > div {
  min-width: 0;
}

.delivery-title-row h2 {
  margin: 0 0 4px;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.project-name-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.project-name-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.delivery-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}

.delivery-health::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.health-good { color: var(--success); background: #ecfdf3; }
.health-warning { color: var(--warning); background: #fff7ed; }
.health-critical { color: var(--danger); background: #fef2f2; }

.client-context-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.client-context-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.client-context-row b {
  color: var(--text);
  font-weight: 600;
}

.stage-inline i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.delivery-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 7px;
  padding: 7px 13px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.button-link.secondary {
  border: 1px solid #d8c8f6;
  background: rgb(255 255 255 / 85%);
  color: var(--primary);
}

.fullscreen-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  padding: 7px 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

body.project-fullscreen {
  min-height: 100vh;
  padding: 24px clamp(20px, 4vw, 64px) 42px;
  background: linear-gradient(145deg, #faf8ff 0%, #f8fafc 48%, #fff 100%);
}

body.project-fullscreen .widget-brand {
  max-width: 1480px;
  margin: -4px auto 18px;
}

body.project-fullscreen #app {
  max-width: 1480px;
  margin: 0 auto;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d8c8f6;
  background: rgb(255 255 255 / 85%);
  color: var(--primary);
  font-size: 18px;
}

.delivery-pulse {
  display: grid;
  grid-template-columns: 82px repeat(4, minmax(76px, 1fr)) minmax(135px, 1.3fr);
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgb(30 41 59 / 4%);
}

.progress-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--progress) * 1%), #eee 0);
}

.progress-orbit::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.progress-orbit span {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.progress-orbit b { font-size: 16px; }
.progress-orbit small { color: var(--muted); font-size: 9px; }

.pulse-metric {
  min-height: 48px;
  padding-inline: 12px;
  border-inline-start: 1px solid #edf0f3;
}

.pulse-metric b {
  display: block;
  font-size: 19px;
  line-height: 1.2;
}

.pulse-metric span,
.pulse-activity span,
.pulse-activity small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.pulse-metric.metric-critical b { color: var(--danger); }
.pulse-metric.metric-warning b { color: var(--warning); }
.pulse-metric.metric-priority b { color: #e11d48; }

.pulse-activity {
  min-width: 0;
  padding-inline-start: 12px;
  border-inline-start: 1px solid #edf0f3;
}

.pulse-activity b {
  display: block;
  overflow: hidden;
  margin: 2px 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.live-sync-state::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-inline-end: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.live-sync-state.live-live { color: var(--success); }
.live-sync-state.live-connecting { color: var(--primary); }
.live-sync-state.live-fallback { color: var(--warning); }

.delivery-command-center .tab-bar {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 2px 0 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 3px;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.delivery-command-center .tab-btn {
  flex: 1;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
}

.delivery-command-center .tab-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px #e8dcff;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
}
.ongoing-service-policy { display: grid; grid-template-columns: minmax(220px, 1.2fr) auto; gap: 14px 22px; margin-bottom: 14px; border: 1px solid #ddd6fe; border-radius: 15px; padding: 16px; background: linear-gradient(145deg, #fff, #faf5ff); }
.ongoing-service-policy h3, .ongoing-service-policy p { margin: 0; }
.ongoing-service-policy h3 { margin-top: 3px; font-size: 15px; }
.ongoing-service-policy p { max-width: 680px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.ongoing-service-pill { display: grid; grid-template-columns: auto 1fr; align-items: center; align-self: start; gap: 0 8px; border-radius: 12px; padding: 9px 11px; color: #5b21b6; background: #f3e8ff; }
.ongoing-service-pill > span { grid-row: 1 / 3; font-size: 25px; }
.ongoing-service-pill b { font-size: 10px; }
.ongoing-service-pill small { font-size: 8px; }
.ongoing-service-policy ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column: 1 / -1; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ongoing-service-policy li { border: 1px solid #ede9fe; border-radius: 10px; padding: 9px; background: rgb(255 255 255 / 75%); }
.ongoing-service-policy li b, .ongoing-service-policy li span { display: block; }
.ongoing-service-policy li b { font-size: 9.5px; }
.ongoing-service-policy li span { margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.5; }

.next-delivery-action {
  --action-color: var(--primary);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--action-color) 25%, white);
  border-inline-start: 4px solid var(--action-color);
  border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--action-color) 6%, white), #fff 65%);
}

.next-delivery-action.action-critical { --action-color: var(--danger); }
.next-delivery-action.action-info { --action-color: #0284c7; }
.next-delivery-action.action-milestone { --action-color: #7c3aed; }
.next-delivery-action.action-good { --action-color: var(--success); }

.next-action-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--action-color);
  background: color-mix(in srgb, var(--action-color) 11%, white);
  font-size: 18px;
  font-weight: 800;
}

.next-action-copy { min-width: 0; }
.next-action-copy .entity-eyebrow { color: var(--action-color); }
.next-action-copy h3 { margin: 1px 0 2px; overflow: hidden; font-size: 13.5px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.next-action-copy p { margin: 0; color: var(--muted); font-size: 10.5px; }
.next-delivery-action > button { background: var(--action-color); white-space: nowrap; }

.delivery-signals {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 12px;
  background: linear-gradient(135deg, #fff, #fbfaff);
}

.signals-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.signals-heading b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 7px;
}

.delivery-signal {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8ebef;
  border-radius: 9px;
  padding: 8px;
  background: #fff;
  color: var(--text);
  text-align: start;
}

.delivery-signal:hover { border-color: #d6c2ff; background: var(--primary-soft); opacity: 1; }
.delivery-signal > i { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #f1f5f9; color: var(--muted); font-style: normal; font-weight: 800; }
.delivery-signal > span { min-width: 0; }
.delivery-signal b,
.delivery-signal small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-signal b { font-size: 10px; }
.delivery-signal small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.delivery-signal em { color: var(--muted); font-style: normal; }
.delivery-signal.signal-critical > i { background: #fef2f2; color: var(--danger); }
.delivery-signal.signal-warning > i { background: #fff7ed; color: var(--warning); }
.delivery-signal.signal-info > i { background: #eff6ff; color: #0369a1; }

.secondary-overview {
  margin-top: 12px;
}

.command-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgb(30 41 59 / 3%);
}

.delivery-intelligence {
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 92% 0%, rgb(124 58 237 / 8%), transparent 28%),
    var(--surface);
}

.analytics-heading { align-items: flex-start; }
.analytics-heading p { max-width: 620px; margin: 4px 0 0; color: var(--muted); font-size: 9px; }

.analytics-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.analytics-trend-badge.trend-improving { background: #ecfdf3; color: var(--success); }
.analytics-trend-badge.trend-declining { background: #fef2f2; color: var(--danger); }
.analytics-trend-badge.trend-stable { background: #eff6ff; color: #0369a1; }

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(320px, 1.2fr);
  gap: 10px;
  margin-top: 12px;
}

.analytics-health-card,
.analytics-trend-card,
.analytics-reasons,
.analytics-workload {
  min-width: 0;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  padding: 12px;
  background: rgb(255 255 255 / 84%);
}

.analytics-health-card {
  --score-color: var(--warning);
  display: flex;
  align-items: center;
  gap: 13px;
}

.analytics-health-card.health-score-healthy { --score-color: var(--success); }
.analytics-health-card.health-score-at-risk,
.analytics-health-card.health-score-critical { --score-color: var(--danger); }

.health-score-ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--health-score) * 1%), #edf0f4 0);
}

.health-score-ring::after {
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #fff;
  content: '';
}

.health-score-ring span { position: relative; z-index: 1; text-align: center; }
.health-score-ring b { display: block; color: var(--score-color); font-size: 22px; line-height: 1; }
.health-score-ring small { color: var(--muted); font-size: 8px; }
.analytics-health-copy span { color: var(--muted); font-size: 8px; }
.analytics-health-copy h4 { margin: 2px 0 4px; color: var(--score-color); font-size: 14px; }
.analytics-health-copy p { margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.7; }

.analytics-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analytics-card-title b { font-size: 10px; }
.analytics-card-title span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-chart-wrap { margin-top: 6px; }
.analytics-chart { display: block; width: 100%; height: 74px; overflow: visible; }
.analytics-chart-grid { stroke: #e8ebef; stroke-dasharray: 3 4; }
.analytics-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.analytics-line.progress-line { stroke: var(--primary); }
.analytics-line.health-line { stroke: var(--success); }
.analytics-chart-axis,
.analytics-chart-legend { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 7px; }
.analytics-chart-legend { justify-content: flex-start; gap: 12px; margin-top: 3px; }
.analytics-chart-legend span::before { display: inline-block; width: 7px; height: 2px; margin-inline-end: 4px; border-radius: 2px; background: currentColor; vertical-align: middle; content: ''; }
.analytics-chart-legend .progress { color: var(--primary); }
.analytics-chart-legend .health { color: var(--success); }

.analytics-baseline { display: flex; align-items: center; gap: 10px; min-height: 82px; color: var(--muted); }
.analytics-baseline > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 16px; }
.analytics-baseline b { display: block; color: var(--text); font-size: 9px; }
.analytics-baseline p { margin: 3px 0 0; font-size: 8px; }

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.analytics-metrics > div { border: 1px solid #e8ebef; border-radius: 10px; padding: 9px 10px; background: #fff; }
.analytics-metrics span,
.analytics-metrics b,
.analytics-metrics small { display: block; }
.analytics-metrics span { color: var(--muted); font-size: 8px; }
.analytics-metrics b { margin: 3px 0 2px; font-size: 13px; }
.analytics-metrics small { color: var(--muted); font-size: 7.5px; }

.analytics-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.analytics-reason {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.analytics-reason > span { align-self: start; border-radius: 7px; padding: 4px; background: #fef2f2; color: var(--danger); font-size: 8px; font-weight: 800; text-align: center; }
.analytics-reason b { display: block; font-size: 8.5px; }
.analytics-reason p { margin: 2px 0 0; color: var(--muted); font-size: 7.5px; line-height: 1.5; }
.analytics-all-clear { margin-top: 10px; border-radius: 8px; padding: 9px; background: #ecfdf3; color: var(--success); font-size: 8.5px; }

.workload-row {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(80px, 1fr) 30px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.workload-row b,
.workload-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-row b { font-size: 8.5px; }
.workload-row span { margin-top: 1px; color: var(--muted); font-size: 7px; }
.workload-row strong { font-size: 8px; text-align: end; }
.workload-bar { height: 5px; overflow: hidden; border-radius: 5px; background: #edf0f4; }
.workload-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #a78bfa); }
.analytics-method-note { margin: 10px 0 0; color: var(--muted); font-size: 7.5px; }

.delivery-register {
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 8% 0%, rgb(124 58 237 / 5%), transparent 24%),
    var(--surface);
}

.register-heading { align-items: center; }
.register-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }

.register-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.register-totals span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
}

.register-totals b { margin-inline-end: 3px; color: var(--text); font-size: 11px; }
.register-totals .risk-total { border-color: #fecaca; background: #fff7f7; }
.register-totals .risk-total b { color: var(--danger); }
.register-totals .decision-total { border-color: #bae6fd; background: #f0f9ff; }
.register-totals .decision-total b { color: #0369a1; }

.delivery-register-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.delivery-register-entry {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid #e7e9ee;
  border-inline-start: 3px solid var(--control-color);
  border-radius: 11px;
  padding: 9px;
  background: rgb(255 255 255 / 92%);
  color: var(--text);
  text-align: start;
}

.delivery-register-entry:hover { border-color: color-mix(in srgb, var(--control-color) 35%, #e7e9ee); background: #fff; opacity: 1; box-shadow: 0 5px 16px rgb(15 23 42 / 5%); }
.delivery-register-entry.risk-entry { --control-color: var(--danger); }
.delivery-register-entry.decision-entry { --control-color: #0284c7; }
.delivery-register-entry.control-closed { --control-color: var(--success); opacity: .72; }
.delivery-register-entry.control-closed:hover { opacity: 1; }

.register-entry-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--control-color) 10%, white);
  color: var(--control-color);
  font-size: 13px;
  font-weight: 800;
}

.register-entry-copy { min-width: 0; }
.register-entry-copy b,
.register-entry-copy small,
.register-entry-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.register-entry-copy b { font-size: 10.5px; }
.register-entry-copy small { margin-top: 2px; color: #64748b; font-size: 8.5px; }
.register-entry-copy em { margin-top: 3px; color: #94a3b8; font-size: 8px; font-style: normal; }

.register-entry-badges { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.control-chip { border-radius: 999px; padding: 3px 7px; background: #f1f5f9; color: #475569; font-size: 7.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.severity-critical { background: #fee2e2; color: #b91c1c; }
.severity-high { background: #ffedd5; color: #c2410c; }
.severity-medium { background: #fef3c7; color: #a16207; }
.severity-low { background: #e0f2fe; color: #0369a1; }
.control-open,
.control-rejected { background: #fee2e2; color: #b91c1c; }
.control-monitoring { background: #fef3c7; color: #a16207; }
.control-requested { background: #e0f2fe; color: #0369a1; }
.control-received { background: #ede9fe; color: #6d28d9; }
.control-resolved,
.control-approved { background: #dcfce7; color: #15803d; }
.control-unmanaged { border: 1px dashed #cbd5e1; background: #fff; color: #64748b; }
.register-empty { margin: 0; }

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading .entity-eyebrow { margin-bottom: 2px; }
.panel-heading h3 { margin: 0; font-size: 16px; }

.count-badge {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--danger);
  font-weight: 700;
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attention-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  padding: 9px;
  background: #fff;
  color: var(--text);
  text-align: start;
}

.attention-item:hover {
  border-color: #d9c6ff;
  background: var(--primary-soft);
  opacity: 1;
}

.attention-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.attention-icon.critical { color: var(--danger); background: #fef2f2; }
.attention-icon.warning { color: var(--warning); background: #fff7ed; }

.attention-copy {
  min-width: 0;
}

.attention-copy b,
.attention-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-copy b { font-size: 12px; }
.attention-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.panel-footer-action {
  width: 100%;
  margin-top: 9px;
  padding: 8px;
  background: none;
  color: var(--primary);
  font-weight: 600;
}

.all-clear {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 105px;
  border-radius: 12px;
  padding: 16px;
  background: #f0fdf4;
  color: var(--success);
}

.all-clear > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dcfce7;
  font-size: 20px;
}

.all-clear p { margin: 3px 0 0; color: #4b7460; font-size: 11px; }

.overview-stats {
  margin-bottom: 10px;
}

.progress-bar.large { height: 10px; }
.progress-bar.large .progress-fill { background: linear-gradient(90deg, #8b5cf6, var(--primary)); }

.client-entities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.client-entity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  border-radius: 10px;
  padding: 11px;
  background: var(--surface-subtle);
}

.client-entity > span,
.client-entity small { color: var(--muted); font-size: 10px; }
.client-entity > b { margin-top: 4px; }
.client-entity > a { max-width: 100%; margin-top: 3px; color: var(--text); text-decoration: none; }
.client-entity > a:hover { color: var(--primary); }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.contact-actions a {
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  color: var(--primary);
  font-size: 9px;
  text-decoration: none;
}

.project-brief,
.collections-overview { margin-top: 12px; }
.project-brief p { margin: 0; color: var(--muted); line-height: 1.75; }
.collections-overview .section-label { margin-top: 0; }
.collections-overview .stat-grid { margin-bottom: 0; }

.workgroup-subscription-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workgroup-subscription-snapshot > div {
  min-width: 0;
  border: 1px solid #e8ddfb;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(135deg, #fcfaff, #fff);
}

.workgroup-subscription-snapshot span,
.workgroup-subscription-snapshot b,
.workgroup-subscription-snapshot small { display: block; }
.workgroup-subscription-snapshot span,
.workgroup-subscription-snapshot small { color: var(--muted); font-size: 9px; }
.workgroup-subscription-snapshot b { margin: 3px 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

/* Task-level delivery context */

.task-label-page { padding: 10px; }

.task-delivery-label {
  display: grid;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid #e8ddfb;
  border-radius: 13px;
  padding: 13px;
  background: linear-gradient(135deg, #fcfaff, #fff 70%);
}

.task-delivery-label-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.task-delivery-label-head > div { min-width: 0; }
.task-delivery-label-head h2 { overflow: hidden; margin: 1px 0 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }

.task-delivery-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}
.task-delivery-mark.tone-standard { background: #eef2ff; color: #4338ca; }
.task-delivery-mark.tone-blocker { background: #fef2f2; color: var(--danger); }
.task-delivery-mark.tone-client-request { background: #eff6ff; color: #2563eb; }
.task-delivery-mark.tone-milestone { background: #f5f0ff; color: var(--primary); }

.task-delivery-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-inline-start: 3px solid #a5b4fc;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.task-delivery-role.tone-blocker { border-color: #fca5a5; }
.task-delivery-role.tone-client-request { border-color: #93c5fd; }
.task-delivery-role.tone-milestone { border-color: #c4b5fd; }
.task-delivery-role > div { min-width: 0; }
.task-delivery-role span:not(.task-delivery-visibility),
.task-delivery-role b,
.task-delivery-role p { display: block; }
.task-delivery-role span:not(.task-delivery-visibility) { color: var(--muted); font-size: 9px; }
.task-delivery-role b { margin-top: 1px; font-size: 12px; }
.task-delivery-role p { margin: 3px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.65; }

.task-delivery-visibility {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.task-delivery-visibility.is-client-visible { background: #ecfdf3; color: #166534; }
.task-delivery-visibility.is-internal { background: #f1f5f9; color: #475569; }

.task-delivery-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.task-delivery-footer a { color: var(--primary); font-size: 10px; font-weight: 600; text-decoration: none; }
.task-delivery-footer a:hover { text-decoration: underline; }
.task-label-error { padding: 15px; text-align: center; }
.task-label-error b { color: var(--danger); font-size: 12px; }
.task-label-error p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

/* Task center */

.task-command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.task-command-header h3 { margin: 0 0 3px; font-size: 18px; }
.task-command-header p { margin: 0; color: var(--muted); font-size: 11px; }

.service-streams-shell,
.service-streams-empty,
.service-streams-section {
  margin-bottom: 13px;
  border: 1px solid #e7e1ef;
  border-radius: 13px;
  background: linear-gradient(145deg, #fcfbff, #fff 58%);
}

.service-streams-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
  color: var(--muted);
  font-size: 11px;
}

.service-streams-shell.error { justify-content: space-between; padding: 12px; color: var(--danger); }

.service-streams-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
}

.service-streams-empty > div { display: flex; align-items: center; gap: 10px; }
.stream-empty-symbol { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 22px; }
.service-streams-empty b,
.service-streams-empty small { display: block; }
.service-streams-empty b { font-size: 12px; }
.service-streams-empty small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.6; }

.service-streams-section { padding: 12px; }

.service-streams-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.service-streams-heading h4 { margin: 1px 0 2px; font-size: 13px; }
.service-streams-heading p { margin: 0; color: var(--muted); font-size: 9px; }

.service-stream-cards {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: thin;
}

.service-stream-card {
  display: flex;
  flex: 0 0 184px;
  flex-direction: column;
  gap: 7px;
  border: 1px solid #e6e9ee;
  border-top: 3px solid var(--stream-color);
  border-radius: 10px;
  padding: 9px;
  background: #fff;
  color: var(--text);
  text-align: start;
}

.service-stream-card:hover { border-color: color-mix(in srgb, var(--stream-color) 42%, #e6e9ee); box-shadow: 0 5px 16px rgb(15 23 42 / 6%); }
.service-stream-card.active { outline: 2px solid color-mix(in srgb, var(--stream-color) 24%, transparent); background: color-mix(in srgb, var(--stream-color) 5%, white); }
.stream-card-top,
.stream-card-meta { display: flex; align-items: center; gap: 6px; }
.stream-card-top i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--stream-color); }
.stream-card-top b { overflow: hidden; min-width: 0; flex: 1; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stream-card-top em { color: var(--stream-color); font-size: 10px; font-style: normal; font-weight: 800; }
.stream-card-progress { overflow: hidden; height: 4px; border-radius: 999px; background: #eef1f5; }
.stream-card-progress i { display: block; height: 100%; border-radius: inherit; background: var(--stream-color); }
.stream-card-meta { justify-content: space-between; color: var(--muted); font-size: 8px; }
.stream-card-meta strong { color: var(--success); font-size: 8px; }
.service-stream-card.has-risk .stream-card-meta strong { color: var(--danger); }

.task-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 185px);
  gap: 8px;
  margin-bottom: 9px;
}

.task-search {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding-inline: 10px;
  color: var(--muted);
  background: #fff;
}

.task-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(109 40 217 / 9%);
}

.task-search input[type='search'] {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
}

.task-toolbar select { border-color: var(--border); border-radius: 9px; }

.task-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 9px;
  margin-bottom: 5px;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.filter-chip span {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-subtle);
  font-size: 9px;
}

.filter-chip.active {
  border-color: #d7c3ff;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.filter-chip.active span { background: #fff; }

.task-command-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.task-command-card {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-inline-start: 3px solid #dfe3e8;
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.task-command-card:hover {
  border-color: #d6c2ff;
  box-shadow: 0 8px 24px rgb(56 34 90 / 7%);
  transform: translateY(-1px);
}

.task-command-card.task-overdue { border-inline-start-color: var(--danger); }
.task-command-card.task-blocker { border-inline-start-color: #b91c1c; background: linear-gradient(90deg, #fff 75%, #fff8f8); }
.task-command-card.task-priority:not(.task-overdue) { border-inline-start-color: #e11d48; }

.task-command-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.priority-flag {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff1f2;
  color: #be123c;
  font-size: 9px;
  font-weight: 700;
}

.task-kind-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 9px;
  font-weight: 700;
}

.task-kind-badge.kind-blocker { background: #fee2e2; color: #b91c1c; }
.task-kind-badge.kind-client-request { background: #e0f2fe; color: #0369a1; }
.task-kind-badge.kind-milestone { background: #ede9fe; color: #6d28d9; }

.task-visibility-badge {
  display: inline-flex; align-items: center; width: max-content; border-radius: 999px;
  padding: 2px 7px; font-size: 9px; font-weight: 700;
}
.task-visibility-badge.internal { background: #f1f5f9; color: #64748b; }
.task-visibility-badge.client { background: #dcfce7; color: #15803d; }
.task-recurrence-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; color: #6d28d9; background: #f3e8ff; font-size: 8px; font-weight: 800; }
.task-recurrence-settings { margin-top: 9px; border: 1px solid #e9d5ff; border-radius: 10px; padding: 9px; background: #fcfaff; }
.task-recurrence-settings summary { cursor: pointer; color: #6d28d9; font-size: 9px; font-weight: 800; }
.recurrence-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.recurrence-settings-grid > label, .recurrence-weekdays { min-width: 0; }
.recurrence-settings-grid label > span, .recurrence-weekdays > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 700; }
.recurrence-settings-grid input, .recurrence-settings-grid select { width: 100%; min-height: 29px; box-sizing: border-box; }
.recurrence-settings-grid label small { display: block; margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.recurrence-inline-number { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.recurrence-inline-number small { margin: 0 !important; white-space: nowrap; }
.recurrence-fixed-cadence, .recurrence-endless-note { align-self: end; min-height: 29px; color: #6d28d9; font-size: 8px; }
.recurrence-weekdays { grid-column: 1 / -1; }
.recurrence-weekdays > div { display: flex; flex-wrap: wrap; gap: 4px; }
.recurrence-weekdays label, .recurrence-workdays { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #e9d5ff; border-radius: 999px; padding: 3px 6px; color: #5b21b6; background: #fff; font-size: 8px; }
.recurrence-weekdays input, .recurrence-workdays input { width: auto; min-height: auto; margin: 0; }
.recurrence-workdays { align-self: end; min-height: 18px; }

.task-stream-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 7px; background: color-mix(in srgb, var(--stream-color) 10%, white); color: var(--stream-color); font-size: 9px; font-weight: 700; }
.task-stream-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.task-stream-quick-select { max-width: 140px; border: 1px solid #d8c8f6; border-radius: 7px; padding: 5px 7px; background: #fcfbff; color: #5d4980; font-size: 9px; }

.task-command-main { min-width: 0; }

.task-title-button {
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-title-button:hover { color: var(--primary); opacity: 1; }

.task-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.avatar-mini {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ede9fe;
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
}

.deadline-pill.soon { background: #fff7ed; color: var(--warning); }
.deadline-pill.priority { background: #fff1f2; color: #be123c; }
.deadline-pill.no-deadline { color: #94a3b8; background: #f8fafc; }

.task-command-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.task-quick-action {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
}

.task-quick-action.primary-soft { border-color: #ddcefa; background: var(--primary-soft); color: var(--primary); }
.task-quick-action.message { color: var(--primary); }

.task-external-link {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
}

.task-external-link:hover { background: var(--surface-subtle); color: var(--primary); }

/* Task drawer, chat, and create-task modal */

.overlay-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgb(15 23 42 / 38%);
  backdrop-filter: blur(2px);
  animation: overlay-in 160ms ease-out;
}

.task-drawer {
  position: fixed;
  z-index: 91;
  inset: 0 0 0 auto;
  width: min(570px, calc(100vw - 24px));
  overflow-y: auto;
  border-inline-start: 1px solid var(--border);
  padding: 20px;
  background: #fff;
  box-shadow: -18px 0 45px rgb(15 23 42 / 16%);
  animation: drawer-in 220ms cubic-bezier(.2,.75,.25,1);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-head > div { min-width: 0; }
.drawer-head h3 { margin: 0; font-size: 19px; line-height: 1.5; }

.drawer-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  padding: 0;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.drawer-loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
}

.loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #e9e1f7;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.loading-spinner.small { width: 16px; height: 16px; border-width: 2px; vertical-align: middle; }

.inline-error {
  margin: 14px 0;
  border: 1px solid #fecaca;
  border-radius: 9px;
  padding: 10px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 12px;
}

.drawer-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.drawer-status-row .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.drawer-status-row a {
  margin-inline-start: auto;
  color: var(--primary);
  font-size: 11px;
  text-decoration: none;
}

.task-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.task-detail-facts > div {
  min-width: 0;
  border-radius: 9px;
  padding: 10px;
  background: var(--surface-subtle);
}

.task-detail-facts span,
.task-detail-facts b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-detail-facts span { color: var(--muted); font-size: 9px; }
.task-detail-facts b { margin-top: 3px; font-size: 11px; }

.drawer-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.drawer-section h4 { margin: 0 0 9px; font-size: 13px; }
.task-description { margin: 0; color: #475569; line-height: 1.8; white-space: pre-wrap; }

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-title-row h4 { margin-bottom: 2px; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

.task-kind-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.task-kind-picker button {
  border: 1px solid var(--border);
  padding: 6px 5px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
}

.task-kind-picker button.active {
  border-color: #c4b5fd;
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px #ddd0f8;
}

.task-visibility-control {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
  margin-top: 9px; border: 1px solid #dfe9e3; border-radius: 9px; padding: 8px;
  background: linear-gradient(135deg, #f7fcf8, #fff);
}
.task-visibility-control > span b,
.task-visibility-control > span small { display: block; }
.task-visibility-control > span b { color: #3f5f4a; font-size: 9px; }
.task-visibility-control > span small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.task-visibility-control > div { display: inline-flex; align-items: center; gap: 4px; }
.task-visibility-control button { border: 1px solid #dce5df; padding: 6px 8px; background: #fff; color: var(--muted); font-size: 9px; }
.task-visibility-control button.active.internal { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.task-visibility-control button.active.client { border-color: #86efac; background: #dcfce7; color: #15803d; }

.task-stream-assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 210px) auto;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  border: 1px solid #e6e1ef;
  border-radius: 9px;
  padding: 8px;
  background: #fcfbff;
}

.task-stream-assignment > span b,
.task-stream-assignment > span small { display: block; }
.task-stream-assignment > span b { color: #475569; font-size: 9px; }
.task-stream-assignment > span small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.task-stream-assignment select { min-width: 0; border: 1px solid #d8c8f6; border-radius: 7px; padding: 6px; background: #fff; color: var(--text); font-size: 9px; }
.task-stream-assignment.loading,
.task-stream-assignment.unavailable,
.task-stream-assignment.empty { display: flex; color: var(--muted); font-size: 9px; }
.task-stream-assignment.empty { justify-content: space-between; }

.structured-control-panel {
  margin-top: 13px;
  border: 1px solid #e6e1ef;
  border-top-width: 1px;
  border-inline-start: 3px solid var(--control-accent);
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--control-accent) 5%, white), #fff 58%);
}

.risk-control-panel { --control-accent: var(--danger); }
.decision-control-panel { --control-accent: #0284c7; }
.control-panel-heading { align-items: center; }
.control-kicker { display: block; margin-bottom: 2px; color: var(--control-accent); font-size: 8px; font-weight: 800; letter-spacing: .03em; }
.managed-control,
.unmanaged-control { flex: 0 0 auto; border-radius: 999px; padding: 4px 7px; font-size: 8px; font-weight: 700; }
.managed-control { background: #dcfce7; color: #15803d; }
.unmanaged-control { background: #fff7ed; color: #c2410c; }

.control-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.control-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.control-field-wide { grid-column: 1 / -1; }
.control-field > span { color: #475569; font-size: 9px; font-weight: 650; }
.control-field input,
.control-field select,
.control-field textarea { width: 100%; border: 1px solid #dfe3e8; border-radius: 8px; padding: 7px 8px; background: #fff; color: var(--text); font: inherit; font-size: 10px; line-height: 1.55; }
.control-field textarea { resize: vertical; }
.control-field input:focus,
.control-field select:focus,
.control-field textarea:focus { border-color: var(--control-accent); outline: 2px solid color-mix(in srgb, var(--control-accent) 13%, transparent); }
.control-field input:disabled,
.control-field select:disabled,
.control-field textarea:disabled { background: #f8fafc; color: #64748b; }

.control-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.control-save-row small { max-width: 62%; color: var(--muted); font-size: 8px; line-height: 1.55; }
.control-save-row button { flex: 0 0 auto; background: var(--control-accent); font-size: 10px; }
.control-permission-note { margin: 8px 0 0; color: var(--muted); font-size: 9px; }

.control-history { margin-top: 11px; border-top: 1px solid #edf0f3; padding-top: 9px; }
.control-history summary { color: #475569; font-size: 9px; font-weight: 700; cursor: pointer; }
.control-history summary span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-inline-start: 4px; border-radius: 6px; background: #f1f5f9; font-size: 8px; }
.control-history > div { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.control-history p { display: flex; align-items: flex-start; gap: 7px; margin: 0; }
.control-history p > i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--control-accent); }
.control-history p > span { min-width: 0; }
.control-history b,
.control-history small { display: block; }
.control-history b { color: #475569; font-size: 9px; }
.control-history small { margin-top: 1px; color: #94a3b8; font-size: 8px; }

.task-team-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 7px;
}

.task-team-person {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  border-radius: 9px;
  padding: 7px;
  background: var(--surface-subtle);
}

.task-team-person > span:last-child { min-width: 0; }
.task-team-person b,
.task-team-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-team-person b { font-size: 10px; }
.task-team-person small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.task-checklist {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--surface-subtle);
  color: #334155;
  font-size: 10px;
  cursor: pointer;
}

.checklist-item:hover { background: #f1f5f9; }
.checklist-item input { accent-color: var(--success); }
.checklist-item span { flex: 1; }
.checklist-item.completed span { color: #94a3b8; text-decoration: line-through; }
.checklist-item.important { border-inline-start: 2px solid #e11d48; }

.checklist-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 8px;
}

.checklist-add input { font-size: 11px; }

.task-relations-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.relation-block {
  border: 1px solid #e8ebef;
  border-radius: 10px;
  padding: 9px;
  background: #fbfcfd;
}

.relation-block-title,
.evidence-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: #475569;
  font-size: 9px;
  font-weight: 750;
}

.relation-block-title b,
.evidence-subheading b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #eef2f7;
  color: #64748b;
  font-size: 8px;
}

.related-task-list { display: flex; flex-direction: column; gap: 4px; }

.related-task-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  padding: 6px 7px;
  background: #fff;
}

.related-task-row.completed { opacity: .68; }
.related-task-row > button:not(.relation-remove) { min-width: 0; border: 0; padding: 0; background: transparent; color: var(--text); text-align: start; }
.related-task-row > button:not(.relation-remove):hover { opacity: .75; }
.related-task-row b,
.related-task-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-task-row b { font-size: 9.5px; }
.related-task-row small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 400; }
.related-task-row > a { color: var(--primary); font-size: 11px; text-align: center; text-decoration: none; }
.relation-remove { width: 23px; height: 23px; border-radius: 6px; padding: 0; background: #fff1f2; color: #be123c; font-size: 15px; line-height: 1; }

.relation-empty {
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 8.5px;
}

.relation-add {
  width: 100%;
  margin-top: 7px;
  border: 1px dashed #c4b5fd;
  padding: 6px;
  background: #faf7ff;
  color: var(--primary);
  font-size: 9px;
}

.dependency-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 7px;
}

.dependency-add select { min-width: 0; border: 1px solid #dfe3e8; border-radius: 7px; padding: 6px; background: #fff; color: #475569; font-size: 9px; }

.time-entry-panel {
  margin-top: 9px;
  border: 1px solid #e8ebef;
  border-radius: 10px;
  padding: 9px;
  background: #fbfcfd;
}

.time-entry-list { display: flex; flex-direction: column; gap: 4px; }
.time-entry-list > div { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 7px; border-radius: 7px; padding: 5px 6px; background: #fff; }
.time-entry-list b,
.time-entry-list small { display: block; }
.time-entry-list b { font-size: 9px; }
.time-entry-list small { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.time-entry-list time { color: #94a3b8; font-size: 7.5px; }

.time-entry-add {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  margin-top: 8px;
  border-top: 1px solid #edf0f3;
  padding-top: 8px;
}

.time-entry-add label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.time-entry-add label span { color: var(--muted); font-size: 8px; }
.time-entry-add input { min-width: 0; border: 1px solid #dfe3e8; border-radius: 7px; padding: 6px 7px; font-size: 9px; }
.time-tracking-disabled { margin-top: 7px; border-radius: 7px; padding: 7px 8px; background: #fff7ed; color: #9a3412; font-size: 8px; }

.section-native-link { flex: 0 0 auto; color: var(--primary); font-size: 9px; text-decoration: none; }
.task-file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.task-file-list > a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; border: 1px solid #e8ebef; border-radius: 9px; padding: 7px; background: #fff; color: var(--text); text-decoration: none; }
.task-file-list > a:hover { border-color: #c4b5fd; background: #faf7ff; }
.task-file-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; background: #ede9fe; color: #6d28d9; font-size: 7px; font-weight: 800; }
.task-file-list > a > span:nth-child(2) { min-width: 0; }
.task-file-list b,
.task-file-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-file-list b { font-size: 9px; }
.task-file-list small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.task-file-list em { color: var(--primary); font-size: 7.5px; font-style: normal; }

.subtask-parent-note { margin: -3px 0 13px; border-inline-start: 3px solid var(--primary); border-radius: 7px; padding: 8px 10px; background: var(--primary-soft); }
.subtask-parent-note span,
.subtask-parent-note b { display: block; }
.subtask-parent-note span { color: var(--primary); font-size: 8px; }
.subtask-parent-note b { margin-top: 2px; color: #4c1d95; font-size: 10px; }

.compact-empty {
  margin-top: 9px;
  border-radius: 8px;
  padding: 11px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.comments-counter {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 8px;
}

.time-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.time-evidence span { border-radius: 8px; padding: 7px 9px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; }
.time-evidence b { color: var(--text); }

.task-results-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.task-results-list article { border: 1px solid #dcfce7; border-radius: 9px; padding: 8px 9px; background: #f0fdf4; }
.task-results-list article > div { display: flex; justify-content: space-between; gap: 8px; }
.task-results-list b { color: var(--success); font-size: 9px; }
.task-results-list time { color: var(--muted); font-size: 8px; }
.task-results-list p { margin: 5px 0 0; color: #334155; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }

.drawer-actions button { padding: 7px 10px; font-size: 11px; }

.deadline-editor {
  display: grid;
  grid-template-columns: auto minmax(125px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.deadline-editor label { color: var(--muted); font-size: 10px; }

.chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-heading h4 { margin-bottom: 2px; }
.chat-heading p { margin: 0; color: var(--muted); font-size: 10px; }

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 9px;
  font-weight: 700;
}

.live-label i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live-label.pending { color: var(--warning); }

.task-messages {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow-y: auto;
  margin: 11px 0;
  border-radius: 11px;
  padding: 10px;
  background: #f8fafc;
}

.messages-state {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.task-message {
  align-self: flex-start;
  max-width: 86%;
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 3px;
  padding: 8px 10px;
  background: #fff;
}

.task-message.mine {
  align-self: flex-end;
  border-color: #ded0fa;
  border-radius: 12px 12px 3px 12px;
  background: var(--primary-soft);
}

.task-message > div { display: flex; align-items: center; gap: 8px; }
.task-message b { font-size: 9px; }
.task-message time { color: var(--muted); font-size: 8px; }
.task-message p { margin: 4px 0 0; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }

.message-presets {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 7px;
  padding-bottom: 3px;
}

.message-presets button {
  flex: 0 0 auto;
  border: 1px solid #ded7ea;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--primary);
  font-size: 9px;
}

.task-chat-section textarea { border-color: var(--border); border-radius: 10px; }

.send-message-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

.send-message-row small { color: var(--muted); font-size: 9px; }

.new-task-modal {
  position: fixed;
  z-index: 91;
  top: 50%;
  left: 50%;
  width: min(610px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border-radius: 17px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 25%);
  animation: modal-in 180ms ease-out;
}

.modal-intro {
  margin: 12px 0 4px;
  border-radius: 9px;
  padding: 10px;
  background: var(--primary-soft);
  color: #5d4980;
  font-size: 11px;
  line-height: 1.7;
}

.briefing-modal { width: min(690px, calc(100vw - 28px)); }

.report-launch-modal { width: min(720px, calc(100vw - 28px)); }
.report-launch-context { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.report-launch-context > div { min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-subtle); }
.report-launch-context span, .report-launch-context b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-launch-context span { color: var(--muted); font-size: 9px; }
.report-launch-context b { margin-top: 3px; font-size: 13px; }
.report-launch-scope { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.report-quick-start-fieldset { margin: 13px 0 10px; border: 0; padding: 0; }
.report-quick-start-fieldset legend { margin-bottom: 7px; color: var(--text); font-size: 10px; font-weight: 700; }
.report-quick-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.report-quick-start { min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; text-align: start; color: var(--text); background: #fff; box-shadow: none; }
.report-quick-start:hover { border-color: #c4b5fd; background: #faf8ff; transform: none; }
.report-quick-start.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.report-quick-start > span { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; }
.report-quick-start i { border-radius: 999px; padding: 2px 5px; color: #92400e; background: #fef3c7; font-size: 7px; font-style: normal; }
.report-quick-start small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; line-height: 1.5; }
.report-launch-sections { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.report-launch-sections span { border-radius: 999px; padding: 4px 7px; color: #5d4980; background: var(--primary-soft); font-size: 8px; font-weight: 600; }
.report-launch-modal .report-custom-fields { display: grid; gap: 8px; margin: 12px 0; padding: 10px; border: 1px solid var(--hair); border-radius: 10px; }
.report-launch-modal .report-custom-fields legend { padding: 0 4px; font-size: 11px; font-weight: 700; }
.report-launch-modal .report-custom-field { display: grid; gap: 7px; }
.report-launch-modal .report-custom-field textarea { width: 100%; min-height: 64px; padding: 7px; border: 1px solid var(--hair-2); border-radius: 7px; font: inherit; }
.report-launch-period { margin-top: 4px; }
.report-launch-safety, .report-launch-success { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; border: 1px solid #ddd0f8; border-radius: 10px; padding: 10px; background: linear-gradient(135deg, var(--primary-soft), #fff); color: #5d4980; }
.report-launch-safety > span, .report-launch-success > span { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%; color: var(--primary); background: #fff; font-weight: 700; }
.report-launch-safety p, .report-launch-success p { margin: 0; font-size: 10px; line-height: 1.7; }
.report-launch-safety b, .report-launch-success b { font-size: 11px; }
.report-launch-success { border-color: #bbf7d0; background: linear-gradient(135deg, #f0fdf4, #fff); color: #166534; }
.report-launch-success > span { color: var(--success); background: #dcfce7; }
.report-launch-safety.internal { border-color: #fde68a; color: #92400e; background: linear-gradient(135deg, #fffbeb, #fff); }

.briefing-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0 4px;
  border: 1px solid #ddd0f8;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  color: #5d4980;
}

.briefing-note > span { font-size: 18px; line-height: 1; }
.briefing-note p { margin: 0; font-size: 10px; line-height: 1.7; }
.briefing-note b { color: var(--primary); }

.briefing-text {
  min-height: 315px;
  border-color: #d8c8f6;
  border-radius: 10px;
  padding: 12px;
  background: #fcfbff;
  font-size: 12px;
  line-height: 1.8;
}

.briefing-destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.briefing-destinations span { display: inline-flex; align-items: center; gap: 5px; }
.briefing-destinations i { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-style: normal; font-weight: 700; }
.briefing-actions { flex-wrap: wrap; }

.handoff-modal { width: min(760px, calc(100vw - 28px)); }
.handoff-modal .drawer-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

.handoff-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 170px;
  color: var(--muted);
  font-size: 11px;
}

.handoff-evidence {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.handoff-evidence > div {
  min-width: 0;
  border: 1px solid #e8e2f1;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(145deg, #fcfbff, #fff);
}

.handoff-evidence b,
.handoff-evidence span { display: block; }
.handoff-evidence b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.handoff-evidence span { margin-top: 2px; color: var(--muted); font-size: 8px; }

.handoff-ready,
.handoff-blocked,
.handoff-success,
.handoff-next-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  border-radius: 11px;
  padding: 11px;
}

.handoff-ready { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.handoff-blocked { border: 1px solid #fecaca; background: #fff7f7; color: #991b1b; }
.handoff-ready > span,
.handoff-blocked > span,
.handoff-success > span,
.handoff-next-step > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgb(255 255 255 / 75%);
  font-weight: 800;
}

.handoff-ready b,
.handoff-ready p,
.handoff-blocked b,
.handoff-success b,
.handoff-success p,
.handoff-next-step b,
.handoff-next-step p { display: block; margin: 0; }
.handoff-ready b,
.handoff-blocked b,
.handoff-success b,
.handoff-next-step b { font-size: 11px; }
.handoff-ready p,
.handoff-success p,
.handoff-next-step p { margin-top: 2px; font-size: 9px; line-height: 1.65; }
.handoff-blocked ul { margin: 4px 0 0; padding-inline-start: 17px; font-size: 9px; line-height: 1.7; }

.handoff-control-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.handoff-control-links button { overflow: hidden; max-width: 100%; padding: 5px 8px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.milestone-gate-source {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; border: 1px solid #ddd0f8;
  border-radius: 11px; padding: 11px; background: linear-gradient(135deg, #faf7ff, #fff);
}
.milestone-gate-source > span { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.milestone-gate-source div { min-width: 0; }
.milestone-gate-source small, .milestone-gate-source b, .milestone-gate-source p { display: block; }
.milestone-gate-source small { color: var(--muted); font-size: 8px; }
.milestone-gate-source b { margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.milestone-gate-source p { margin: 2px 0 0; color: var(--muted); font-size: 8.5px; }
.milestone-followup-preview { margin-top: 10px; border: 1px solid var(--border); border-inline-start: 3px solid #0284c7; border-radius: 11px; padding: 12px; background: var(--surface-subtle); }
.milestone-followup-preview h4 { margin: 3px 0 4px; font-size: 13px; }
.milestone-followup-preview > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; white-space: pre-wrap; }
.milestone-followup-preview > div { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.milestone-followup-preview > div span { display: flex; gap: 4px; border-radius: 7px; padding: 4px 7px; color: var(--muted); background: #fff; font-size: 8.5px; }
.milestone-followup-preview > div b { color: var(--text); }

.handoff-stage-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 11px;
}

.handoff-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px;
  background: var(--surface-subtle);
}

.handoff-stage.target { border-color: #d8c8f6; background: #fcfaff; }
.handoff-stage > span,
.handoff-stage > label,
.handoff-stage small { color: var(--muted); font-size: 8px; }
.handoff-stage b { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-size: 11px; }
.handoff-stage b i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.handoff-stage select { width: 100%; margin: 4px 0 3px; border: 1px solid #d8c8f6; border-radius: 8px; padding: 7px; background: #fff; font-size: 10px; }
.handoff-arrow { display: grid; place-items: center; color: var(--primary); font-size: 23px; font-weight: 800; }

.handoff-modal .field-label { display: flex; justify-content: space-between; margin-top: 12px; }
.handoff-modal .field-label span { color: var(--danger); font-size: 8px; }
.handoff-note { min-height: 82px; border-color: #d8c8f6; border-radius: 10px; padding: 10px; background: #fcfbff; line-height: 1.65; resize: vertical; }
.handoff-confirmation { margin-top: 8px; }
.handoff-confirmation:has(input:checked) { border-color: #86efac; background: #f0fdf4; }
.handoff-confirmation.is-disabled { cursor: not-allowed; opacity: .58; }

.handoff-history { margin-top: 13px; border-top: 1px solid var(--border); padding-top: 11px; }
.handoff-history-empty { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.handoff-history-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 7px; }
.handoff-history-list article { display: flex; align-items: center; gap: 7px; min-width: 0; border-radius: 9px; padding: 7px; background: var(--surface-subtle); }
.handoff-history-list article > i { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 auto; border-radius: 50%; background: #dcfce7; color: var(--success); font-size: 9px; font-style: normal; }
.handoff-history-list article div { min-width: 0; }
.handoff-history-list b,
.handoff-history-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handoff-history-list b { font-size: 9px; }
.handoff-history-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.handoff-actions { flex-wrap: wrap; }
.handoff-actions #confirm-delivery-handoff { margin-inline-start: auto; }

.handoff-success { margin-top: 14px; border: 1px solid #86efac; padding: 16px; background: linear-gradient(135deg, #ecfdf3, #fff); color: #166534; }
.handoff-success > span { width: 36px; height: 36px; background: #dcfce7; font-size: 17px; }
.handoff-success b { font-size: 14px; }
.handoff-success b i { padding-inline: 5px; font-style: normal; }
.handoff-acceptance-record { margin-top: 9px; border-inline-start: 3px solid #86efac; border-radius: 8px; padding: 9px 11px; background: #f8fafc; }
.handoff-acceptance-record span { color: var(--muted); font-size: 8px; }
.handoff-acceptance-record p { margin: 3px 0 0; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.handoff-timeline-ok { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--success); font-size: 9px; }
.handoff-timeline-ok span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #dcfce7; }
.handoff-next-step { border: 1px solid #ddd0f8; background: var(--primary-soft); color: #5d4980; }

.stream-manager-modal { width: min(820px, calc(100vw - 28px)); }
.stream-manager-list { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.stream-manager-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 74px auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px;
  background: #fff;
}
.stream-manager-row input[type='color'],
.new-stream-form input[type='color'] { width: 36px; height: 36px; border: 0; border-radius: 9px; padding: 2px; background: #f1f5f9; cursor: pointer; }
.stream-manager-fields { display: grid; grid-template-columns: minmax(125px, .65fr) minmax(180px, 1.35fr); gap: 6px; min-width: 0; }
.stream-manager-fields input,
.new-stream-form input[type='text'] { min-width: 0; border: 1px solid #dfe3e8; border-radius: 8px; padding: 7px 8px; font-size: 10px; }
.stream-sla-target { display: flex; align-items: center; gap: 5px; grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.stream-sla-target input[type='number'] { width: 58px; padding: 5px 6px; text-align: center; }
.stream-sla-target small { font-size: 8px; }
.stream-manager-usage { text-align: center; }
.stream-manager-usage b,
.stream-manager-usage span,
.stream-manager-usage small { display: block; }
.stream-manager-usage b { font-size: 14px; }
.stream-manager-usage span,
.stream-manager-usage small { color: var(--muted); font-size: 8px; }
.stream-manager-actions { display: flex; align-items: center; gap: 5px; }
.stream-order-actions { display: inline-flex; gap: 2px; }
.stream-order-actions button { min-width: 25px; padding-inline: 6px; }
.stream-manager-zero { display: flex; align-items: center; flex-direction: column; margin-top: 14px; border: 1px dashed #d8c8f6; border-radius: 12px; padding: 22px; background: #fcfbff; text-align: center; }
.stream-manager-zero > span { color: var(--primary); font-size: 28px; }
.stream-manager-zero b { margin-top: 4px; font-size: 13px; }
.stream-manager-zero p { max-width: 420px; margin: 4px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.new-stream-form { display: grid; grid-template-columns: minmax(110px, .55fr) 38px minmax(120px, .8fr) minmax(170px, 1.2fr) auto; align-items: center; gap: 7px; margin-top: 13px; border-radius: 11px; padding: 10px; background: var(--surface-subtle); }
.new-stream-form h4 { margin: 1px 0 0; font-size: 10px; }
.stream-manager-modal .modal-actions { align-items: center; justify-content: space-between; }
.stream-manager-modal .modal-actions small { max-width: 70%; color: var(--muted); font-size: 8px; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.team-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}

.checkbox-card input { margin-top: 3px; accent-color: var(--primary); }
.checkbox-card b,
.checkbox-card small { display: block; }
.checkbox-card small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.checkbox-card.client-visibility-choice:has(input:checked) { border-color: #86efac; background: #f0fdf4; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.app-toast {
  position: fixed;
  z-index: 120;
  bottom: 18px;
  left: 50%;
  max-width: min(460px, calc(100vw - 28px));
  transform: translate(-50%, 20px);
  border-radius: 10px;
  padding: 10px 14px;
  background: #172033;
  color: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 22%);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.app-toast.visible { transform: translate(-50%, 0); opacity: 1; }
.app-toast.toast-error { background: #991b1b; }
.app-toast.toast-warning { background: #92400e; }

/* Project-side client briefing */

.project-client-brief {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-client-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e8ddfb;
  border-radius: 15px;
  padding: 18px;
  background: linear-gradient(135deg, #fbf8ff, #fff 60%, #f1fbff);
}

.project-client-hero > div { min-width: 0; flex: 1; }
.project-client-hero .project-deal-head { justify-content: flex-start; }
.project-client-hero h2 { min-width: 0; margin: 0; font-size: 20px; }

.project-client-name {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.project-client-name b { color: var(--text); }

.project-client-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.project-client-metrics > div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.project-client-metrics span,
.project-client-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-client-metrics span { color: var(--muted); font-size: 9px; }
.project-client-metrics b { margin-top: 3px; font-size: 13px; }
.project-client-metrics .metric-alert { border-color: #fecaca; background: #fff8f8; }
.project-client-metrics .metric-alert b { color: var(--danger); }
.project-client-metrics .metric-warning { border-color: #fed7aa; background: #fffaf4; }
.project-client-metrics .metric-warning b { color: var(--warning); }

.project-contact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.project-contact-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px;
  background: var(--surface-subtle);
}

.project-contact-card > span,
.project-contact-card > a { display: block; }
.project-contact-card > span { color: var(--muted); font-size: 9px; }
.project-contact-card > a { margin-top: 2px; color: var(--text); text-decoration: none; }
.project-contact-card > a:hover { color: var(--primary); }
.project-contact-card > div { display: flex; gap: 5px; margin-top: 7px; }

.project-contact-card > div a {
  border: 1px solid #ded2f3;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
  color: var(--primary);
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
}

.project-context-note {
  margin: 0;
  border-inline-start: 3px solid #d8c7fa;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 10px;
}

/* Brief confirmation shown after a Messenger action opens its destination. */
.chat-dashboard-page { padding: 12px; }
.chat-dashboard-message { padding: 22px 12px; text-align: center; }
.chat-dashboard-message h1 { margin: 0 0 5px; font-size: 15px; }
.chat-dashboard-message p { margin: 0; color: var(--muted); font-size: 11px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes overlay-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(35px); opacity: 0; } }
@keyframes modal-in { from { transform: translate(-50%, calc(-50% + 12px)); opacity: 0; } }

@media (max-width: 900px) {
  .subscription-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-product-lines article { grid-template-columns: minmax(0, 1fr) 82px 82px auto; }
  .subscription-product-lines article > strong { grid-column: 1 / -1; padding: 0; text-align: start; }
  .subscription-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 0; }
  .subscription-metrics > div:nth-child(3) { border: 0; }
  .subscription-cycle { grid-template-columns: 7px minmax(160px, 1fr) minmax(180px, .8fr); }
  .cycle-action { grid-column: 2 / -1; align-items: center; flex-direction: row; justify-content: flex-end; border-top: 1px solid #edf0f3; border-inline-start: 0; padding-block: 7px; }
  .invoice-quick-status { width: min(100%, 310px); }
  .delivery-hero { flex-direction: column; }
  .delivery-hero-actions { justify-content: flex-start; }
  .delivery-pulse { grid-template-columns: 72px repeat(4, 1fr); }
  .pulse-activity { grid-column: 1 / -1; border: 0; border-top: 1px solid #edf0f3; padding: 8px 0 0; }
  .overview-grid { grid-template-columns: 1fr; }
  .analytics-layout { grid-template-columns: 1fr; }
  .delivery-register-list { grid-template-columns: 1fr; }
  .task-command-card { grid-template-columns: 110px minmax(160px, 1fr); }
  .task-command-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 8px; border-top: 1px solid #f1f3f5; }
  .stream-manager-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .stream-manager-usage { display: none; }
  .new-stream-form { grid-template-columns: 38px minmax(130px, .8fr) minmax(170px, 1.2fr) auto; }
  .new-stream-form > div { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .subscription-product-lines article { grid-template-columns: 1fr auto; }
  .subscription-product-lines article > div { grid-column: 1 / -1; }
  .subscription-product-lines article > strong { grid-column: 1 / -1; }
  .prelink-hero, .project-link-choice, .subscription-command-head { align-items: flex-start; flex-direction: column; }
  .work-model-grid { grid-template-columns: 1fr; }
  .ongoing-service-policy { grid-template-columns: 1fr; }
  .ongoing-service-policy ul { grid-template-columns: 1fr; }
  .ongoing-service-pill { justify-self: stretch; }
  .prelink-section { padding: 13px; }
  .project-link-choice { align-items: stretch; }
  .subscription-form-grid { grid-template-columns: 1fr; }
  .subscription-form-actions, .subscription-head-actions { align-items: stretch; flex-direction: column; }
  .subscription-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-metrics > div:nth-child(3) { border-inline-end: 1px solid #eceff3; }
  .subscription-metrics > div:nth-child(even) { border: 0; }
  .collection-policy-strip p { text-align: start; }
  .collection-follow-up-suspension { align-items: stretch; flex-direction: column; }
  .collection-follow-up-suspension-form { align-items: stretch; flex-direction: column; }
  .collection-follow-up-suspension-form label:last-of-type input { width: 100%; }
  .subscription-cycle { grid-template-columns: 7px minmax(0, 1fr); }
  .cycle-dates { grid-column: 2; border-top: 1px solid #edf0f3; border-inline-start: 0; padding-block: 8px; }
  .cycle-action { grid-column: 2; justify-content: flex-start; }
  .cycle-action { align-items: stretch; flex-direction: column; }
  .invoice-quick-status { width: 100%; min-width: 0; }
  .delivery-hero { padding: 16px; border-radius: 14px; }
  .delivery-title-row { flex-direction: column; }
  .delivery-health { align-self: flex-start; }
  .delivery-hero-actions { width: 100%; }
  .delivery-hero-actions .hero-primary { flex: 1; }
  .delivery-pulse { grid-template-columns: 66px repeat(2, 1fr); }
  .pulse-metric { padding: 7px 9px; }
  .pulse-activity { grid-column: 1 / -1; }
  .delivery-command-center .tab-btn { padding-inline: 10px; }
  .next-delivery-action { grid-template-columns: 32px minmax(0, 1fr); }
  .next-action-mark { width: 31px; height: 31px; }
  .next-delivery-action > button { grid-column: 2; justify-self: start; }
  .next-action-copy h3 { white-space: normal; }
  .command-panel { padding: 13px; }
  .analytics-heading { align-items: flex-start; flex-direction: column; }
  .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-detail-grid { grid-template-columns: 1fr; }
  .analytics-health-card { align-items: flex-start; }
  .register-heading { align-items: flex-start; flex-direction: column; }
  .register-totals { justify-content: flex-start; }
  .delivery-register-entry { grid-template-columns: 30px minmax(0, 1fr); }
  .register-entry-badges { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .attention-item { grid-template-columns: 28px minmax(0, 1fr); }
  .attention-item > .deadline-pill { grid-column: 2; justify-self: start; }
  .task-command-header { align-items: flex-start; flex-direction: column; }
  .service-streams-empty { align-items: stretch; flex-direction: column; }
  .service-streams-empty > div:last-child { flex-wrap: wrap; }
  .service-streams-heading { align-items: flex-start; }
  .service-stream-card { flex-basis: 166px; }
  .task-toolbar { grid-template-columns: 1fr; }
  .task-command-card { grid-template-columns: 1fr; gap: 8px; }
  .task-command-actions { grid-column: auto; }
  .task-detail-facts { grid-template-columns: 1fr; }
  .deadline-editor { grid-template-columns: 1fr auto; }
  .deadline-editor label { grid-column: 1 / -1; }
  .form-grid,
  .team-picker-row { grid-template-columns: 1fr; }
  .task-kind-picker { grid-template-columns: repeat(2, 1fr); }
  .recurrence-settings-grid { grid-template-columns: 1fr; }
  .task-visibility-control { grid-template-columns: 1fr; }
  .task-stream-assignment { grid-template-columns: 1fr; }
  .control-form-grid { grid-template-columns: 1fr; }
  .control-field-wide { grid-column: auto; }
  .control-save-row { align-items: stretch; flex-direction: column; }
  .control-save-row small { max-width: none; }
  .task-file-list { grid-template-columns: 1fr; }
  .time-entry-add { grid-template-columns: 72px minmax(0, 1fr); }
  .time-entry-add button { grid-column: 1 / -1; }
  .new-task-modal { padding: 16px; }
  .stream-manager-row { grid-template-columns: 32px minmax(0, 1fr); }
  .stream-manager-fields { grid-template-columns: 1fr; }
  .stream-manager-actions { grid-column: 2; }
  .new-stream-form { grid-template-columns: 32px minmax(0, 1fr); }
  .new-stream-form > div { grid-column: 1 / -1; }
  .new-stream-form input[type='text'],
  .new-stream-form button { grid-column: 1 / -1; }
  .stream-manager-modal .modal-actions { align-items: stretch; flex-direction: column; }
  .stream-manager-modal .modal-actions small { max-width: none; }
  .briefing-actions button { flex: 1 1 auto; }
  .report-launch-context { grid-template-columns: 1fr; }
  .report-quick-start-grid { grid-template-columns: 1fr; }
  .handoff-evidence { grid-template-columns: repeat(2, 1fr); }
  .handoff-stage-path { grid-template-columns: 1fr; }
  .handoff-arrow { transform: rotate(-90deg); }
  .handoff-history-list { grid-template-columns: 1fr; }
  .handoff-actions { align-items: stretch; flex-direction: column; }
  .handoff-actions #confirm-delivery-handoff { margin-inline-start: 0; }
  .send-message-row { align-items: stretch; flex-direction: column; }
  .project-client-hero { align-items: flex-start; flex-direction: column; padding: 14px; }
  .project-client-metrics { grid-template-columns: repeat(2, 1fr); }
  .workgroup-subscription-snapshot { grid-template-columns: 1fr; }
  .task-delivery-role { align-items: flex-start; flex-direction: column; }
}

/* Guided workspace creation. Scoped to the Deal onboarding screen. */
.setup-wizard { max-width: 1160px; margin: 0 auto; padding: 8px 0 20px; }
.setup-wizard [hidden] { display: none !important; }
.setup-fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.setup-wizard .back-link { display: block; margin: 0 0 18px; color: var(--muted); min-height: 32px; }
.setup-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; border: 1px solid #e6dcf7; border-radius: 20px; background: radial-gradient(ellipse at 0% 0%, #e9defc 0, transparent 60%), linear-gradient(110deg, #faf7ff, #fff); }
.setup-eyebrow { display: block; color: var(--primary); font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.setup-hero h2 { margin: 0 0 8px; font-size: clamp(21px, 3vw, 28px); line-height: 1.5; letter-spacing: -.5px; }
.setup-hero p, .setup-section-heading p, .setup-team-heading p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 13px; }
.setup-hero-icon { display: grid; place-items: center; flex-shrink: 0; width: 74px; height: 74px; border: 1px solid #dacbf1; border-radius: 22px; color: var(--primary); background: #ffffffa6; font-size: 44px; box-shadow: 0 12px 28px #6d28d910; }
.setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0; }
.setup-steps button { display: flex; align-items: center; gap: 12px; text-align: start; min-width: 0; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); }
.setup-steps button[aria-current="step"] { color: var(--primary); background: var(--primary-soft); border-color: #e2d5fa; }
.setup-step-number { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; font-size: 13px; font-weight: 600; }
[aria-current="step"] .setup-step-number { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px #6d28d92a; }
.setup-steps b { display: block; font-size: 13px; }
.setup-steps small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.setup-section { min-width: 0; padding: 26px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 4px 24px #16203804; }
.setup-section-heading, .setup-team-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.setup-section-heading h3 { font-size: 18px; margin: 0 0 5px; }
.setup-team-heading { margin: 28px 0 14px; }
.setup-team-heading h3 { font-size: 14px; margin: 0 0 4px; }
.setup-wizard .field-label { color: #475569; font-size: 12px; margin: 16px 0 6px; }
.setup-required, .setup-optional { font-size: 10px; font-weight: 400; margin-inline-start: 5px; color: var(--muted); }
.setup-required { color: var(--primary); }
.setup-wizard input:not([type="checkbox"]), .setup-wizard textarea, .setup-wizard select { min-width: 0; min-height: 42px; border: 1px solid #dbe0e9; border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px; color: var(--text); background: #fff; }
.setup-wizard textarea { line-height: 1.8; resize: vertical; }
.setup-wizard input::placeholder, .setup-wizard textarea::placeholder { color: #8893a3; }
.setup-wizard button { min-height: 38px; border-radius: 8px; }
.setup-wizard .chips { gap: 8px; }
.setup-wizard .chip { gap: 7px; background: #f8f7fc; border: 1px solid #ebe5f5; border-radius: 24px; padding: 4px 8px; color: #423456; }
.setup-wizard .chip-remove { min-height: 28px; min-width: 28px; }
.setup-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e9dffc; color: var(--primary); font-size: 12px; font-weight: 600; }
.setup-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #f8fafc; color: var(--muted); font-size: 12px; line-height: 1.8; }
.setup-wizard .onboarding-playbook { margin-bottom: 20px; box-shadow: none; }
.setup-plan-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); margin: 0 0 22px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fcfbff; }
.setup-plan-stats > div { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-inline-end: 1px solid var(--border); }
.setup-plan-stats > div:last-child { border: 0; }
.setup-plan-stats b { font-size: 23px; color: var(--primary); font-weight: 600; }
.setup-plan-stats span { font-size: 11px; color: var(--muted); }
.setup-plan-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.setup-plan-toolbar input { flex: 1 1 230px; }
.setup-filters { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: #f1f3f7; border-radius: 10px; }
.setup-filters button { padding: 7px 12px; background: transparent; color: #536177; font-size: 11px; min-height: 34px; }
.setup-filters button[aria-pressed="true"] { color: var(--primary); background: #fff; box-shadow: 0 1px 5px #1e293b10; }
.setup-results-count { font-size: 11px; color: var(--muted); margin: 14px 0 10px; }
.setup-wizard .setup-task { display: block; margin: 0 0 10px; padding: 0; border: 1px solid #e4e7ee; border-radius: 12px; background: #fff; overflow: clip; }
.setup-task[open] { border-color: #c9b4ef; box-shadow: 0 3px 18px #6d28d909; }
.setup-task > summary { display: flex; align-items: center; gap: 12px; padding: 17px 18px; cursor: pointer; list-style: none; }
.setup-task > summary::-webkit-details-marker { display: none; }
.setup-task > summary:focus-visible { outline: 3px solid #bca1ef; outline-offset: -3px; border-radius: 10px; }
.setup-wizard input, .setup-wizard textarea, .setup-wizard select, .setup-wizard button, .setup-task > summary { scroll-margin-block: 24px 160px; }
.setup-task > summary:hover { background: #fcfaff; }
.setup-task[open] > summary { background: #faf7ff; border-bottom: 1px solid #ede5f9; }
.setup-task-number { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; background: #f3f1f8; color: #80679f; border-radius: 9px; font-size: 12px; font-variant-numeric: tabular-nums; }
.setup-task-copy { flex: 1; min-width: 0; }
.setup-task-copy > b { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.8; }
.setup-task-meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 11px; margin-top: 4px; }
.setup-task-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 240px; }
.setup-badge { display: inline-flex; align-items: center; width: fit-content; padding: 3px 8px; border-radius: 6px; color: #667085; background: #f1f3f6; font-size: 10px; white-space: nowrap; }
.setup-badge.client { color: #147965; background: #eaf7f2; }
.setup-badge.recurring { color: #6d28d9; background: #f0e9fc; }
.setup-badge.priority, .setup-badge.needs-attention { color: #9a5c09; background: #fff3de; }
.setup-task-chevron { color: #8c78a4; font-size: 20px; transition: transform .15s; }
.setup-task[open] .setup-task-chevron { transform: rotate(180deg); }
.setup-task-editor { padding: 20px; }
.setup-task-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.setup-remove-task { color: #b42336; background: transparent; font-size: 11px; padding: 5px 10px; }
.setup-remove-task:hover { background: #fff1f2; }
.setup-task-people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.setup-task-people .picker-btn { display: block; width: 100%; text-align: start; min-height: 42px; color: #475569; overflow-wrap: anywhere; }
.setup-wizard .task-definition-row { padding: 14px; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.setup-wizard .task-definition-row label > span { font-size: 11px; }
.setup-wizard .task-definition-row input:not([type="checkbox"]), .setup-wizard .task-definition-row select { width: 100%; }
.setup-wizard .task-recurrence-settings { margin-top: 14px; }
.setup-wizard .recurrence-settings-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.setup-task-done { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.setup-task-done small { color: var(--muted); font-size: 11px; }
.setup-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 18px; text-align: center; border: 1px dashed #d8cde9; border-radius: 12px; background: #fdfbff; }
.setup-empty > span { font-size: 28px; color: var(--primary); }
.setup-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.setup-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: sticky; bottom: 0; z-index: 5; margin-top: 18px; padding: 16px 20px; border: 1px solid #e7e2ee; border-radius: 12px; background: #fffffffa; box-shadow: 0 -6px 24px #1e293b05; }
.setup-footer b, .setup-footer small { display: block; }
.setup-footer b { font-size: 12px; }
.setup-footer small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.setup-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.setup-footer-actions > button { min-height: 42px; padding-inline: 20px; }
.setup-error { margin: 0 0 16px; padding: 14px 18px; border: 1px solid #fecdd3; border-radius: 10px; color: #b42336; background: #fff5f6; }
.setup-review-status { padding: 6px 12px; border-radius: 24px; color: #147965; background: #eaf7f2; font-size: 12px; white-space: nowrap; }
.setup-review-status.needs-attention { color: #9a5c09; background: #fff3de; }
.setup-review-overview { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; background: #faf8fe; border: 1px solid #ede5f9; border-radius: 12px; }
.setup-review-overview > div { min-width: 0; }
.setup-review-overview small { color: var(--muted); font-size: 11px; }
.setup-review-overview h3 { margin: 6px 0; font-size: 17px; overflow-wrap: anywhere; }
.setup-review-overview p { color: var(--muted); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; margin: 0; }
.setup-review-overview button { flex-shrink: 0; }
.setup-review-team { display: flex; gap: 14px; align-items: baseline; margin-top: 18px; font-size: 12px; line-height: 1.8; }
.setup-review-team b { white-space: nowrap; }
.setup-review-team span { color: var(--muted); overflow-wrap: anywhere; }
.setup-review-list { display: grid; gap: 6px; }
.setup-review-task { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: start; background: #fff; color: var(--text); border: 1px solid var(--border); }
.setup-review-task > span:nth-child(2) { flex: 1; min-width: 0; }
.setup-review-task b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.setup-review-task small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.setup-review-task:hover { background: #faf8fe; border-color: #c9b4ef; }
@media (max-width: 700px) {
  .open-channel-apply-all { grid-template-columns: 1fr; align-items: stretch; }
  .open-channel-apply-all button { width: 100%; }
  .deal-client-notification-switches { grid-template-columns: 1fr; }
  .setup-hero { padding: 20px; border-radius: 14px; }
  .setup-hero-icon { width: 50px; height: 50px; font-size: 32px; border-radius: 15px; }
  .setup-steps button { padding: 10px 6px; gap: 7px; }
  .setup-steps small { display: none; }
  .setup-steps b { font-size: 11px; }
  .setup-step-number { width: 28px; height: 28px; }
  .setup-section { padding: 16px; }
  .setup-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .setup-section-heading h3 { font-size: 16px; }
  .setup-plan-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-plan-stats > div { padding: 10px 14px; }
  .setup-task > summary { flex-wrap: wrap; padding: 14px; gap: 10px; }
  .setup-task-copy { flex-basis: calc(100% - 60px); }
  .setup-task-badges { flex: 1; max-width: none; justify-content: flex-start; padding-inline-start: 44px; }
  .setup-task-editor { padding: 14px; }
  .setup-task-people { grid-template-columns: 1fr; gap: 0; }
  .setup-footer { flex-wrap: wrap; padding: 14px; }
  .setup-footer-actions { width: 100%; }
  .setup-footer-actions > button { flex: 1; padding-inline: 10px; font-size: 13px; }
  .setup-review-overview { flex-direction: column; }
  .setup-review-team { flex-direction: column; gap: 6px; }
  .setup-task-done { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Multi-selection and bulk task actions */
.task-bulk-panel {
  margin: 14px 0; padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface) 80%);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 6%, transparent);
}
.task-bulk-selection, .task-bulk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.task-bulk-selection label, .task-selection { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.task-bulk-selection label { font-size: 12px; font-weight: 600; }
.task-bulk-selection input, .task-selection input {
  appearance: none; -webkit-appearance: none;
  display: inline-grid; place-content: center; flex-shrink: 0;
  width: 20px; height: 20px; margin: 0;
  border: 1.5px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 50%; background: var(--surface); cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.task-bulk-selection input::after, .task-selection input::after {
  content: ''; width: 8px; height: 4px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg); opacity: 0;
}
.task-bulk-selection input:checked, .task-selection input:checked,
.task-bulk-selection input:indeterminate { background: var(--primary); border-color: var(--primary); }
.task-bulk-selection input:checked::after, .task-selection input:checked::after { opacity: 1; }
.task-bulk-selection input:indeterminate::after { width: 8px; height: 0; border-left: 0; transform: none; opacity: 1; }
.task-bulk-selection input:hover:not(:disabled), .task-selection input:hover:not(:disabled) { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.task-bulk-selection input:focus-visible, .task-selection input:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent); outline-offset: 3px; }
.task-bulk-selection input:disabled, .task-selection input:disabled { opacity: .5; cursor: wait; }
.task-selection { flex-basis: 100%; min-height: 28px; font-size: 11px; color: var(--muted); }
.task-selection:has(input:checked) { color: var(--primary); font-weight: 600; }
.widget-page .task-command-card.task-selected, .task-command-card.task-selected {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: linear-gradient(135deg, var(--primary-soft), var(--surface) 65%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}
.task-bulk-count { padding: 4px 10px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 700; }
.task-bulk-selection small { flex: 1; color: var(--muted); font-size: 11px; }
.task-bulk-selection #task-clear-selection { border: 0; background: transparent; padding: 5px 8px; color: var(--muted); }
.task-bulk-selection #task-clear-selection:hover:not(:disabled) { color: var(--primary); background: var(--primary-soft); }
.task-bulk-actions { align-items: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border)); }
.task-bulk-action-field { display: grid; gap: 6px; flex: 1; min-width: 200px; }
.task-bulk-action-field > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.task-bulk-action-field select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-radius: 10px;
  padding: 9px 12px; padding-inline-end: 36px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d28d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 12px center;
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.task-bulk-action-field select:hover:not(:disabled) { border-color: var(--primary); }
.task-bulk-action-field select:focus-visible { border-color: var(--primary); outline: 3px solid color-mix(in srgb, var(--primary) 15%, transparent); outline-offset: 2px; }
.task-bulk-action-field select:disabled { opacity: .6; cursor: wait; }
.task-bulk-action-field option { color: var(--text); background: var(--surface); }
.task-bulk-action-field optgroup { color: var(--primary); background: var(--surface); font-weight: 700; }
#task-bulk-apply { min-height: 42px; border-radius: 10px; padding-inline: 18px; font-size: 12px; }
.task-bulk-panel [role="status"]:not(:empty), .task-bulk-panel details { margin-top: 12px; font-size: 12px; }
.task-bulk-panel summary { color: var(--danger); cursor: pointer; }
.task-bulk-panel li { overflow-wrap: anywhere; }
/* Supporting browsers also theme the expanded native picker. */
@supports (appearance: base-select) {
  .task-bulk-action-field select, .task-bulk-action-field select::picker(select) { appearance: base-select; }
  .task-bulk-action-field select { background-image: none; padding-inline-end: 12px; }
  .task-bulk-action-field select::picker-icon { color: var(--primary); }
  .task-bulk-action-field select::picker(select) { border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-radius: 12px; padding: 6px; background: var(--surface); box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 14%, transparent); max-height: 340px; overflow-y: auto; }
  .task-bulk-action-field option { padding: 8px 12px; border-radius: 7px; font-size: 12px; }
  .task-bulk-action-field option:hover, .task-bulk-action-field option:focus, .task-bulk-action-field option:checked { background: var(--primary-soft); color: var(--primary); }
}
@media (max-width: 600px) {
  .task-bulk-panel { padding: 12px; }
  .task-bulk-selection { gap: 8px; }
  .task-bulk-selection small { flex-basis: 100%; }
  .task-bulk-action-field { min-width: 0; flex-basis: 100%; }
  #task-bulk-apply { width: 100%; }
}
@media (forced-colors: active) {
  .task-bulk-selection input, .task-selection input { appearance: auto; }
  .task-bulk-selection input::after, .task-selection input::after { display: none; }
  .task-command-card.task-selected { outline: 2px solid Highlight; }
}

/* Subscription save review: the schedule after the save, then what changes. */
.plan-review { display: grid; gap: 14px; font-size: 12.5px; line-height: 1.6; color: var(--text); text-align: start; }
.plan-review-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-chip { --tone: #64748b; display: inline-flex; align-items: baseline; gap: 4px; border: 1px solid color-mix(in srgb, var(--tone) 28%, white); border-radius: 999px; padding: 3px 10px; background: color-mix(in srgb, var(--tone) 9%, white); color: color-mix(in srgb, var(--tone) 82%, #111827); font-size: 11.5px; font-weight: 600; }
.plan-chip b { font-variant-numeric: tabular-nums; }
.plan-chip.is-zero { opacity: .45; }
.plan-chip.tone-same { --tone: #047857; }
.plan-chip.tone-change { --tone: #6d28d9; }
.plan-chip.tone-delete { --tone: #dc2626; }
.plan-chip.tone-new { --tone: #0284c7; }
.plan-chip.tone-attention { --tone: #b45309; }
.plan-review-section { display: grid; gap: 6px; }
.plan-review-section h3 { margin: 0; font-size: 13px; font-weight: 700; }
.plan-review-hint { margin: 0; color: var(--muted); font-size: 11.5px; }
.plan-review-section.tone-delete h3 { color: #b91c1c; }
.plan-review-section.tone-attention h3 { color: #b45309; }
.plan-periods { display: grid; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.plan-period { --state: #94a3b8; display: grid; grid-template-columns: 5px minmax(118px, .8fr) minmax(0, 2fr) auto; align-items: center; gap: 0 12px; overflow: hidden; border: 1px solid #e4e8ed; border-radius: 10px; background: #fff; }
.plan-period-rail { align-self: stretch; background: var(--state); }
.plan-period-when, .plan-period-what { min-width: 0; padding-block: 8px; }
.plan-period-when b { display: block; font-size: 12.5px; }
.plan-period-when small { display: block; color: var(--muted); font-size: 11px; }
.plan-period-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.plan-state { flex: none; border-radius: 999px; padding: 1px 8px; background: color-mix(in srgb, var(--state) 13%, white); color: color-mix(in srgb, var(--state) 80%, #111827); font-size: 11px; font-weight: 700; white-space: nowrap; }
.plan-note { min-width: 0; color: #334155; font-size: 11.5px; }
.plan-period-amount { padding-inline-end: 12px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-period.state-paid { --state: #047857; }
.plan-period.state-kept { --state: #64748b; }
.plan-period.state-covered { --state: #047857; border-style: dashed; }
.plan-period.state-moved { --state: #6d28d9; border-color: #ddd6fe; background: #fdfbff; }
.plan-period.state-redated { --state: #d97706; border-color: #fde68a; background: #fffdf7; }
.plan-period.state-review { --state: #b45309; border-color: #fde68a; }
.plan-period.state-new { --state: #0284c7; border-color: #bae6fd; background: #f8fcff; }
.plan-period.state-upcoming { --state: #cbd5e1; border-style: dashed; background: #f8fafc; color: var(--muted); }
.plan-period.state-paused, .plan-period.state-closed { --state: #cbd5e1; background: #f8fafc; color: var(--muted); }
.plan-period.state-upcoming .plan-period-amount, .plan-period.state-paused .plan-period-amount, .plan-period.state-closed .plan-period-amount { color: var(--muted); font-weight: 500; }
.plan-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.plan-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 10px; border: 1px solid #e4e8ed; border-radius: 9px; padding: 6px 10px; background: #fff; font-size: 11.5px; }
.plan-list li span { min-width: 0; color: var(--muted); }
.plan-list li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-review-section.tone-delete .plan-list li { border-color: #fecaca; background: #fffafa; }
.plan-review-section.tone-delete .plan-list li b { color: #b91c1c; text-decoration: line-through; text-decoration-thickness: 1px; }
.plan-review-section.tone-attention .plan-list li { border-color: #fde68a; background: #fffdf7; }
.plan-unchanged summary { cursor: pointer; color: #334155; font-size: 12.5px; font-weight: 700; }
.plan-unchanged summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 30%, white); outline-offset: 2px; border-radius: 6px; }
.plan-unchanged[open] summary { margin-bottom: 6px; }
@media (max-width: 560px) {
  .plan-period { grid-template-columns: 5px minmax(0, 1fr); gap: 0 10px; }
  .plan-period-what, .plan-period-amount { grid-column: 2; }
  .plan-period-when { padding-bottom: 0; }
  .plan-period-what { padding-block: 2px 0; }
  .plan-period-amount { padding-block: 2px 8px; }
  .plan-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .plan-list li span { grid-column: 1 / -1; grid-row: 2; }
}
