/* POC additions on top of _shared.css */

.role-chip {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 4px;
}
.role-chip.role-affiliate { background: #dbeafe; color: #1e40af; }
.role-chip.role-team      { background: #fed7aa; color: #9a3412; }

.badge.awaiting { background: #ede9fe; color: #6d28d9; }

.internal-badge {
  display: inline-block;
  background: #fed7aa;
  color: #9a3412;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-left: 6px;
  vertical-align: 1px;
}

.timeline .entry .icon.aff-update { background: #fef3c7; color: #92400e; }
.timeline .entry.affiliate-update-row { background: #fffbeb; border-left: 3px solid #f59e0b; padding-left: 8px; border-radius: 4px; }
.timeline .entry.affiliate-update-row .body { color: #451a03; }

.kpi-row.kpi-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .kpi-row.kpi-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpi-row.kpi-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi .sub { font-size: 11px; color: #6b7280; margin-top: 2px; }

.flag-icon {
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
  margin-right: 2px;
}
.flag-icon.flag-min { background: #fef3c7; color: #92400e; }
.flag-icon.flag-int { background: #fed7aa; color: #9a3412; }
.flag-icon.flag-pp  { background: #ddd6fe; color: #5b21b6; }
.flag-icon.flag-dnfu { background: #fee2e2; color: #991b1b; }
.flag-icon.flag-rtc  { background: #fecaca; color: #7f1d1d; }
.flag-icon.flag-cbd  { background: #ede9fe; color: #6d28d9; }

.team-filters { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.team-filters select { font-size: 12px; padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 8px;
  border: 1px solid #d1d5db; border-radius: 4px; background: #fff;
  cursor: pointer; white-space: nowrap;
  font-weight: normal; text-transform: none; letter-spacing: 0; color: #374151;
}
.filter-toggle input { margin: 0; }

.intro-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.intro-card h1 { font-size: 24px; margin-bottom: 8px; }
.intro-card p  { color: #4b5563; font-size: 14px; max-width: 760px; margin-bottom: 10px; }
.intro-card ul { font-size: 13px; color: #374151; padding-left: 20px; margin: 8px 0 12px; }
.intro-card li { margin-bottom: 4px; }

.mode-switch { display: flex; gap: 10px; margin: 14px 0; }
.mode-btn {
  flex: 1;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.mode-btn:hover { border-color: #2563eb; }
.mode-btn.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.mode-btn .title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.mode-btn .desc  { font-size: 12px; color: #6b7280; }

.action-buttons { display: flex; gap: 10px; margin-top: 18px; }

.scenario { display: none; }
.scenario.active { display: block; }

.anchor-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.anchor-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #475569;
  margin-bottom: 10px;
}
.po-option, .bill-option, .lineitem-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 13px;
}
.po-option:hover, .bill-option:hover, .lineitem-option:hover { border-color: #2563eb; }
.po-option .meta, .bill-option .meta { color: #6b7280; font-size: 12px; margin-left: auto; }

.sample-block-card {
  border: 1px solid #fde68a;
  background: #fffbeb;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
}
.sample-block-card .lock-icon { font-size: 32px; margin-bottom: 8px; }
.sample-block-card h3 { color: #92400e; margin-bottom: 8px; font-size: 16px; }
.sample-block-card p  { color: #78350f; font-size: 13px; max-width: 540px; margin: 0 auto; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field.full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.case-header {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 16px;
}
.case-header .top-row { display: flex; justify-content: space-between; align-items: flex-start; }
.case-header .dispute-id { font-family: 'SF Mono', Menlo, monospace; color: #2563eb; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.case-header h1 { font-size: 20px; font-weight: 700; }
.case-header .meta-row { display: flex; gap: 20px; font-size: 13px; color: #4b5563; flex-wrap: wrap; margin-top: 10px; }

.submission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.submission-grid .field-block { font-size: 13px; }
.submission-grid .field-block .lbl { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.submission-grid .field-block .val { color: #1a1a2e; }
.submission-grid .narrative { grid-column: 1 / -1; }
.submission-grid .narrative .val { background: #f9fafb; padding: 12px; border-radius: 6px; border: 1px solid #f3f4f6; white-space: pre-wrap; }

.cap-composer {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}
.cap-composer select, .cap-composer textarea, .cap-composer input[type=text] {
  width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid #d1d5db;
  font-size: 13px; font-family: inherit;
}
.cap-composer textarea { min-height: 60px; resize: vertical; margin-top: 8px; }
.cap-composer .btn-row { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }

.side-card { padding: 14px 18px; }
.side-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #6b7280; margin-bottom: 10px; font-weight: 700; }
.side-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 0; gap: 8px; }
.side-card .row .lbl { color: #6b7280; }

.resolve-block { padding: 14px 18px; }
.resolve-block select { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid #d1d5db; font-size: 13px; margin: 8px 0; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: 640px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 14px;
}
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Help link near sales-tax */
.help-link {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.help-link a { color: #2563eb; }
