/**
 * Identity Issues Vue App Styles (DT-984)
 * Mirrors the Agent Review look: same palette, toolbar, tabs, table and drawer shell.
 */
.page-header-bar {
  padding: 10px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #e1e4e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
}
.page-header-bar .page-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
}
.page-header-bar .page-header-title i {
  margin-right: 6px;
}
.page-header-bar .page-header-left {
  display: flex;
  align-items: center;
}
.page-header-bar .page-header-left a {
  color: #24292e;
  text-decoration: none;
}
.page-header-bar .page-header-left a:hover {
  color: #2563eb;
}
.page-header-bar .page-header-left a strong {
  font-size: 14px;
  font-weight: 600;
}
.page-header-bar .page-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

#identity-issues-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.identity-issues-dashboard {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header-stat {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 3px 10px;
  background: #f3f4f6;
  border-radius: 12px;
}

.header-stat-online {
  background: rgba(16, 185, 129, 0.12);
  color: #0a7753;
}
.header-stat-online .icon {
  margin-right: 3px;
}

.btn-help {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: white;
  color: #4b5563;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-help:hover, .btn-help.active {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.filter-input,
.filter-select {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: white;
  outline: none;
}
.filter-input:focus,
.filter-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.filter-input {
  width: 200px;
}

.filter-select {
  min-width: 90px;
}

.filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
}
.filter-checkbox input {
  margin: 0;
}

.tab-toggle {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn:not(:last-child) {
  border-right: 1px solid #d1d5db;
}
.tab-btn.active {
  background: #2563eb;
  color: white;
}
.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}
.tab-btn:hover:not(.active) {
  background: #f3f4f6;
}

.tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.tab-count.tab-count-empty {
  opacity: 0.55;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loading-spinner .icon {
  font-size: 32px;
  color: #2563eb;
  -webkit-animation: spin 1s linear infinite;
          animation: spin 1s linear infinite;
}
.loading-spinner span {
  font-size: 14px;
  color: #6b7280;
}

@-webkit-keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.error-bar {
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.08);
  color: #eb1515;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-bar .btn-retry {
  margin-left: auto;
  padding: 4px 12px;
  border: 1px solid #ef4444;
  border-radius: 4px;
  background: white;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
}
.error-bar .btn-retry:hover {
  background: #ef4444;
  color: white;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 20px;
  color: #6b7280;
}
.empty-state .icon {
  font-size: 28px;
  color: #d1d5db;
}
.empty-state p {
  margin: 0;
}

.issue-table-wrapper {
  overflow-x: auto;
}

.issue-table {
  width: 100%;
  border-collapse: collapse;
}
.issue-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 5;
}
.issue-table th .th-info {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.6;
  cursor: help;
}
.issue-table th .th-info:hover {
  opacity: 1;
}
.issue-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.col-case {
  min-width: 260px;
}

.col-holder {
  min-width: 180px;
}

.col-target {
  min-width: 180px;
}

.col-impact {
  width: 200px;
}

.col-decision {
  width: 190px;
}

.col-actions {
  width: 90px;
  text-align: center;
  white-space: nowrap;
}

.issue-row {
  transition: background 0.15s;
}
.issue-row:hover {
  background: #f9fafb;
}
.issue-row.issue-row-decided {
  color: #4b5563;
}

.case-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1f2937;
}
.case-name .case-id {
  font-weight: 400;
  color: #9ca3af;
  font-size: 11px;
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
}
.case-meta .listing-count {
  white-space: nowrap;
}
.case-meta .listing-count .icon {
  font-size: 11px;
  margin-right: 2px;
}
.case-meta .case-summary {
  overflow-wrap: anywhere;
}

.kind-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #e5e7eb;
  color: #374151;
}
.kind-chip.kind-wrong_owner {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.kind-chip.kind-shared_person {
  background: rgba(6, 182, 212, 0.14);
  color: #048398;
}
.kind-chip.kind-never_absorbed_contradiction {
  background: rgba(245, 158, 11, 0.14);
  color: #9e6506;
}
.kind-chip.kind-no_agent_record {
  background: rgba(107, 114, 128, 0.14);
  color: #374151;
}

.party {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.party .party-name {
  font-weight: 500;
  color: #1f2937;
}
.party .party-ids {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}
.party.party-holder .party-name {
  color: #e21313;
}
.party.party-target .party-name {
  color: #0b815a;
}
.party.party-missing .party-name {
  color: #6b7280;
  font-style: italic;
}

.party-empty,
.impact-none {
  color: #d1d5db;
}

.impact-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.impact-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.impact-badge.impact-crm {
  background: rgba(37, 99, 235, 0.12);
  color: #1350d4;
}
.impact-badge.impact-referral {
  background: rgba(245, 158, 11, 0.14);
  color: #9e6506;
}
.impact-badge.impact-emailed {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}

.decision-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: #e5e7eb;
  color: #374151;
}
.decision-chip.decision-approve_move, .decision-chip.decision-separate {
  background: rgba(16, 185, 129, 0.12);
  color: #0c8a60;
}
.decision-chip.decision-reject {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.decision-chip.decision-keep_together {
  background: rgba(6, 182, 212, 0.14);
  color: #048398;
}
.decision-chip.decision-needs_profile_collection {
  background: rgba(37, 99, 235, 0.12);
  color: #1350d4;
}
.decision-chip.decision-skip {
  background: rgba(245, 158, 11, 0.14);
  color: #9e6506;
}

.decision-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
}

.decision-reason-preview {
  display: block;
  max-width: 180px;
  margin-top: 1px;
  font-size: 11px;
  color: #4b5563;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.claim-badge.claim-other {
  background: #fff3e0;
  color: #b25e00;
  border: 1px solid #ffd7a8;
}
.claim-badge.claim-mine {
  background: #e8f5e9;
  color: #1e7b34;
  border: 1px solid #b7e1bd;
}

.issue-row.row-claimed-other td {
  background: #fffaf3;
}

.issue-row.row-claimed-mine td {
  background: #f4fbf5;
}

.btn-claim-next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 5px 11px;
  border: 1px solid #2563eb;
  border-radius: 5px;
  background: white;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.btn-claim-next:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.08);
}
.btn-claim-next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-claim-next .claim-next-count {
  padding: 0 6px;
  border-radius: 9px;
  background: #2563eb;
  color: white;
  font-size: 10px;
  line-height: 16px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(156, 163, 175, 0.15);
  color: #4b5563;
}
.status-badge.status-accepting {
  background: rgba(16, 185, 129, 0.12);
  color: #0c8a60;
}
.status-badge.status-declined, .status-badge.status-declined_rental {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.status-badge.status-blacklisted {
  background: rgba(31, 41, 55, 0.12);
  color: #1f2937;
}
.status-badge.status-selective {
  background: rgba(245, 158, 11, 0.12);
  color: #ac6f07;
}
.status-badge.status-refer_to_other {
  background: rgba(6, 182, 212, 0.12);
  color: #058ba2;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-open {
  background: rgba(37, 99, 235, 0.1);
  color: #1555e2;
}
.btn-open:hover:not(:disabled) {
  background: #2563eb;
  color: white;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.pagination-info {
  font-size: 12px;
  color: #6b7280;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-page {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 12px;
  cursor: pointer;
}
.btn-page:hover:not(:disabled) {
  background: #f3f4f6;
}
.btn-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
}

.case-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 24, 39, 0.36);
}

.case-drawer {
  width: min(920px, 96vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: -12px 0 40px rgba(17, 24, 39, 0.2);
}

.case-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}
.case-drawer-header h3 {
  margin: 3px 0 2px;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.25;
}
.case-drawer-header p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.case-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-drawer-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: white;
  color: #6b7280;
  cursor: pointer;
}
.case-drawer-close:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
  color: #1f2937;
}

.case-drawer-body {
  flex: 1;
  padding: 20px 24px 40px;
  overflow-y: auto;
  background: #f9fafb;
}

.case-loading,
.case-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  color: #6b7280;
}
.case-loading .icon,
.case-error .icon {
  color: #2563eb;
  font-size: 20px;
}

.case-error {
  flex-wrap: wrap;
  color: #ec1e1e;
}
.case-error .icon {
  color: #ef4444;
}
.case-error button {
  padding: 5px 12px;
  border: 1px solid #ef4444;
  border-radius: 5px;
  background: white;
  color: #ef4444;
  cursor: pointer;
}

.case-decided-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.06);
  color: #1f2937;
  font-size: 13px;
}
.case-decided-banner .case-decided-reason {
  color: #4b5563;
  margin-left: 4px;
}
.case-decided-banner small {
  display: block;
  margin-top: 2px;
  color: #6b7280;
}

.case-decided-banner-mine {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.case-decided-banner-mine .icon-check-circle {
  margin-right: 4px;
  color: #10b981;
}

.case-decided-banner-applied {
  border-color: #d1d5db;
  background: #f3f4f6;
}

.case-held-banner {
  margin-bottom: 16px;
  padding: 9px 14px;
  border: 1px solid #ffd7a8;
  border-radius: 7px;
  background: #fff3e0;
  color: #b25e00;
  font-size: 13px;
}
.case-held-banner .icon {
  margin-right: 4px;
}

.case-warning {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.14);
  color: #8a5906;
  font-size: 12px;
  font-weight: 600;
}
.case-warning .icon {
  margin-right: 4px;
}

.case-section {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.case-section-heading {
  margin-bottom: 12px;
}
.case-section-heading h4 {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
}
.case-section-heading p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 11px;
}

.listing-summary .listing-address {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}
.listing-summary .listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.case-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 760px) {
  .case-cards {
    grid-template-columns: 1fr;
  }
}

.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.party-card {
  min-width: 0;
  border: 2px solid #d7dbe2;
  border-radius: 9px;
  background: #f4f5f7;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.party-card.party-card-current {
  border-color: #ef4444;
}
.party-card.party-card-current .party-card-header {
  background: rgba(239, 68, 68, 0.08);
}
.party-card.party-card-current .party-card-eyebrow {
  color: #eb1515;
}
.party-card.party-card-target {
  border-color: #10b981;
}
.party-card.party-card-target .party-card-header {
  background: rgba(16, 185, 129, 0.1);
}
.party-card.party-card-target .party-card-eyebrow {
  color: #0b815a;
}
.party-card.party-card-neutral .party-card-header {
  background: #e9ecf1;
}
.party-card.party-card-neutral .party-card-eyebrow {
  color: #4b5563;
}

.party-card-header {
  padding: 10px 14px;
  border-bottom: 1px solid #d7dbe2;
}
.party-card-header h4 {
  margin: 2px 0 0;
  font-size: 15px;
  color: #111827;
}

.party-card-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.party-card-body {
  display: flex;
  gap: 14px;
  padding: 14px;
}

.party-card-empty {
  color: #6b7280;
  font-size: 13px;
}
.party-card-empty p {
  margin: 0;
}

.party-photo-row {
  flex: 0 0 64px;
}

.party-photo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  -o-object-fit: cover;
     object-fit: cover;
  background: #e5e7eb;
  border: 1px solid #d7dbe2;
}

.party-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 24px;
}

.party-rows {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 10px;
  margin: 0;
  font-size: 13px;
}
.party-rows dt {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 20px;
}
.party-rows dd {
  margin: 0;
  color: #1f2937;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.party-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
.party-link:hover {
  text-decoration: underline;
}
.party-link .icon {
  font-size: 10px;
  margin-left: 2px;
}

.party-muted {
  color: #6b7280;
  font-weight: 400;
}

.contact-matched {
  color: #0b815a;
  font-weight: 600;
}

.contact-missing {
  font-style: italic;
}

.state-chip {
  display: inline-block;
  padding: 0 6px;
  margin-right: 4px;
  border-radius: 4px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
}

.raw-lister-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.raw-lister {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid #d7dbe2;
  border-radius: 7px;
  background: #f4f5f7;
  min-width: 180px;
}
.raw-lister .raw-lister-name {
  font-weight: 600;
  color: #1f2937;
}
.raw-lister .raw-lister-ids {
  font-size: 11px;
  color: #6b7280;
}
.raw-lister.raw-lister-holder {
  border-color: rgba(239, 68, 68, 0.6);
}
.raw-lister.raw-lister-target {
  border-color: rgba(16, 185, 129, 0.7);
}
.raw-lister.raw-lister-missing {
  border-style: dashed;
}
.raw-lister.raw-lister-missing .raw-lister-name {
  color: #4b5563;
}

.raw-lister-tag {
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.raw-lister-tag.tag-holder {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.raw-lister-tag.tag-target {
  background: rgba(16, 185, 129, 0.14);
  color: #0a7753;
}

.decision-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}
.decision-bar.decision-bar-locked {
  border-style: dashed;
  border-color: #d1d5db;
  box-shadow: none;
}
.decision-bar.decision-bar-open {
  flex-direction: column;
  align-items: stretch;
  border-color: rgba(37, 99, 235, 0.4);
}

.decision-bar-note {
  font-size: 12px;
  color: #6b7280;
}
.decision-bar-note .icon {
  margin-right: 4px;
}
.decision-bar-note .icon-check-circle {
  color: #10b981;
}
.decision-bar-note .icon-lock {
  color: #9ca3af;
}

.decision-bar-link {
  margin-left: 8px;
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
  cursor: pointer;
}
.decision-bar-link:hover {
  color: #134cca;
}

.decision-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.decision-confirm-action {
  margin: 0;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.45;
}

.decision-confirm-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}
.decision-confirm-label .decision-required {
  margin-left: 4px;
  color: #ec1e1e;
  font-weight: 600;
}
.decision-confirm-label .party-muted {
  margin-left: 4px;
  font-weight: 400;
}

.decision-reason {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  background: white;
  color: #1f2937;
}
.decision-reason:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.decision-reason:disabled {
  background: #f9fafb;
  color: #6b7280;
}

.decision-confirm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.decision-reason-count {
  font-size: 11px;
  color: #9ca3af;
}
.decision-reason-count.decision-reason-over {
  color: #ef4444;
  font-weight: 600;
}

.decision-error {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #ec1e1e;
}
.decision-error .icon {
  margin-right: 3px;
}

.decision-confirm-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.decision-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-decision {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-decision:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-decision.btn-approve, .btn-decision.btn-separate {
  background: rgba(16, 185, 129, 0.14);
  color: #0b815a;
}
.btn-decision.btn-reject {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.btn-decision.btn-collect, .btn-decision.btn-keep {
  background: rgba(37, 99, 235, 0.12);
  color: #1453dd;
}
.btn-decision.btn-skip {
  background: rgba(245, 158, 11, 0.14);
  color: #9e6506;
}
.btn-decision.btn-cancel {
  background: #f3f4f6;
  color: #4b5563;
}
.btn-decision:hover:not(:disabled) {
  filter: brightness(0.94);
}

.help-drawer-shell {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2050;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.help-drawer {
  width: min(460px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: -12px 0 40px rgba(17, 24, 39, 0.2);
  border-left: 1px solid #e5e7eb;
  pointer-events: auto;
}

.help-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.help-drawer-header h3 {
  margin: 3px 0 0;
  color: #1f2937;
  font-size: 18px;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.help-search .help-search-input {
  flex: 1;
  width: auto;
}
.help-search .help-search-hits {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}

.help-drawer-body {
  flex: 1;
  padding: 16px 20px 40px;
  overflow-y: auto;
  font-size: 13px;
  color: #374151;
}

.help-content section {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f4f5f7;
}
.help-content section.help-section-current {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.help-content section.help-section-hit {
  border-color: rgba(245, 158, 11, 0.7);
}
.help-content h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #111827;
}
.help-content h4 {
  margin: 10px 0 4px;
  font-size: 12px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.help-content p {
  margin: 0 0 8px;
}
.help-content ul,
.help-content ol {
  margin: 0 0 8px;
  padding-left: 18px;
}
.help-content li + li {
  margin-top: 3px;
}
.help-content dl {
  margin: 0;
}
.help-content dt {
  margin-top: 8px;
  font-weight: 700;
  color: #1f2937;
}
.help-content dd {
  margin: 2px 0 0;
}
.help-content .help-trap,
.help-content .help-escalate {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.help-content .help-trap {
  background: rgba(245, 158, 11, 0.14);
  color: #805305;
}
.help-content .help-escalate {
  background: rgba(239, 68, 68, 0.1);
  color: #d91313;
}
.help-content .help-ok {
  color: #0a7753;
  font-weight: 600;
}

.help-missing,
.help-no-hits {
  padding: 12px 0;
}
