/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ────────────────────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.form-shell {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.form-container {
  max-width: 900px;
  margin: 0 auto;
}

/* ─── Goodwin Header ──────────────────────────────────────────────────────── */
.form-header {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
  padding: 1rem 2rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.brand-img {
  height: 5rem;
  width: auto;
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-right {
  flex-shrink: 0;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.form-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: 0.01em;
}

.form-subtitle {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ─── Form body ───────────────────────────────────────────────────────────── */
.form-body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 2rem;
}

.form-header + .form-body {
  border-top: none;
}

/* ─── Sections ────────────────────────────────────────────────────────────── */
.form-section {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Section divider with label */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Bold section divider (Page 2 style) */
.section-divider--bold .section-label-bold {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  text-transform: none;
  letter-spacing: 0;
}

.section-divider--bold::before,
.section-divider--bold::after {
  background: #374151;
  height: 2px;
}

/* ─── Orange label (Goodwin brand accent) ─────────────────────────────────── */
.orange-label {
  color: #f79409 !important;
  font-weight: 600;
}

/* ─── Field groups ────────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.125rem;
}

.field-group--centered {
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.field-group--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0.375rem;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 10rem;
}

.field-hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

.field-input {
  width: 100%;
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1f2937;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.field-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.field-input::placeholder { color: #9ca3af; }

.field-input--readonly {
  background: #f9fafb;
  color: #6b7280;
  cursor: default;
}

.field-input--date {
  max-width: 220px;
}

.field-input--required {
  border-color: #dc2626;
}

.field-textarea {
  resize: vertical;
  min-height: 5rem;
  width: 100%;
}

/* Inside narrow containers, stack label above input */
.contact-card .field-group,
.conditional-panel .field-group,
.subsidiary-inline .field-group,
.two-col-dates .field-group,
.el-date-field .field-group {
  flex-direction: column;
  align-items: stretch;
  gap: 0.375rem;
}

.contact-card .field-label,
.conditional-panel .field-label,
.subsidiary-inline .field-label,
.two-col-dates .field-label,
.el-date-field .field-label {
  min-width: unset;
  white-space: normal;
}


.field-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.375rem;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
  line-height: 1.25;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) { background: #f9fafb; }

/* ─── Search row ──────────────────────────────────────────────────────────── */
.search-row {
  display: flex;
  gap: 0.625rem;
  align-items: stretch;
}

.search-row .field-input {
  flex: 1;
  min-width: 0;
}

/* ─── Two-column layouts ──────────────────────────────────────────────────── */
.two-col-search {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.two-col-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.125rem;
}

.two-col-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ─── Centered client search ─────────────────────────────────────────────── */
.client-search-centered {
  max-width: 480px;
  margin: 0 auto;
}

.client-search-vcenter {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

/* ─── Primary client display ─────────────────────────────────────────────── */
.primary-client-card {
  padding: 0.25rem 0;
}

.primary-client-header {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.primary-client-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.primary-client-field:last-child { margin-bottom: 0; }

.primary-client-field .orange-label {
  flex-shrink: 0;
  min-width: 6.5rem;
  font-size: 0.75rem;
}

.primary-client-value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1f2937;
}

.primary-client-empty {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: 2rem 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.8125rem;
}

/* ─── Results list ────────────────────────────────────────────────────────── */
.results-list {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 0.625rem;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
}

.result-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.1s;
  gap: 0.5rem;
}

.result-item:last-child { border-bottom: none; }
.result-item:hover { background: #fef9f0; }
.result-item.selected { background: #fff7ed; }

.result-client-name {
  font-size: 0.875rem;
  color: #1f2937;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-client-number {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}

.result-check {
  color: #f79409;
  font-weight: 700;
  flex-shrink: 0;
}

.no-results {
  padding: 1.25rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8125rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 0.625rem;
}

/* ─── Selected client card (ClientSearch single mode) ─────────────────────── */
.selected-client-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 1rem 1.125rem;
}

.selected-client-fields {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.selected-field { min-width: 120px; }

.selected-field-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selected-field-value {
  font-size: 0.875rem;
  color: #1e3a5f;
  font-weight: 500;
  margin-top: 0.2rem;
}

.change-link {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.change-link:hover { color: #1d4ed8; }

/* ─── Radio group ─────────────────────────────────────────────────────────── */
.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.radio-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-option input[type='radio'] {
  width: 1rem;
  height: 1rem;
  accent-color: #f79409;
  cursor: pointer;
}

.radio-option span { font-size: 0.875rem; color: #374151; }

/* ─── Multi-select chips ──────────────────────────────────────────────────── */
.multi-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: #92400e;
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #fb923c;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  border-radius: 50%;
  width: 1.125rem;
  height: 1.125rem;
  justify-content: center;
  transition: background-color 0.1s, color 0.1s;
}

.chip-remove:hover { background: #fed7aa; color: #92400e; }

/* ─── Conditional / collapsible panels ───────────────────────────────────── */
.conditional-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

/* ─── Additional clients list ─────────────────────────────────────────────── */
.additional-clients-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.additional-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #374151;
}

.btn-icon-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.875rem;
  padding: 0.125rem;
  border-radius: 3px;
  transition: color 0.1s;
  flex-shrink: 0;
}

.btn-icon-remove:hover { color: #dc2626; }

/* ─── Panel column labels ─────────────────────────────────────────────────── */
.panel-col-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.625rem;
}

.panel-empty {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-style: italic;
}

/* ─── Matter search row (dropdown + button) ──────────────────────────────── */
.matter-search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.matter-search-row select {
  flex: 1;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
}
.matter-search-row .btn {
  white-space: nowrap;
}

/* ─── Request type layout ─────────────────────────────────────────────────── */
.request-type-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.subsidiary-inline {
  flex: 1;
  min-width: 200px;
}

/* ─── Combobox (AttorneyCombobox) ─────────────────────────────────────────── */
.combobox-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.combobox-option {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.1s;
}

.combobox-option:last-child { border-bottom: none; }
.combobox-option:hover { background: #fef9f0; }
.combobox-option--selected { background: #fff7ed; }

.combobox-option-name {
  font-size: 0.875rem;
  color: #1f2937;
  font-weight: 500;
}

.combobox-option-email {
  font-size: 0.75rem;
  color: #6b7280;
}

.combobox-empty {
  padding: 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.8125rem;
}

/* ─── Warning banner ──────────────────────────────────────────────────────── */
.warning-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #dc2626;
  margin-top: 0.75rem;
}

/* ─── Info panel (non-US auditor guidance) ────────────────────────────────── */
.info-panel {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #1e3a5f;
  line-height: 1.6;
}

.info-panel-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.info-panel-text {
  margin: 0.5rem 0;
}

.info-panel-list {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}

.info-panel-list li {
  margin-bottom: 0.25rem;
}

/* ─── CRA inactive warning ────────────────────────────────────────────────── */
.cra-inactive-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  color: #991b1b;
  line-height: 1.6;
}

.cra-inactive-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.cra-inactive-text {
  margin: 0.25rem 0;
}

.cra-inactive-list {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}

.cra-inactive-list li {
  margin-bottom: 0.25rem;
}

.cra-inactive-quote {
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  background: #fff5f5;
  border-left: 3px solid #dc2626;
  font-style: italic;
  color: #7f1d1d;
}

/* ─── EL business rule row ────────────────────────────────────────────────── */
.el-rule-row {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #fffbf5;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}

.el-rule-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  flex-shrink: 0;
  padding-top: 0.375rem;
}

.el-date-field {
  flex: 1;
}

/* ─── Contact cards (Page 2, Section 4) ──────────────────────────────────── */
.contact-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.25rem;
}

.contact-card-header {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid #e5e7eb;
}

/* ─── Form footer ─────────────────────────────────────────────────────────── */
.form-footer {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.form-footer--left {
  display: flex;
  justify-content: flex-start;
}

.form-footer--split {
  display: flex;
  justify-content: space-between;
}

/* ─── Loading / error ─────────────────────────────────────────────────────── */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.loading-text {
  color: #6b7280;
  font-size: 0.875rem;
}

.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #dc2626;
  margin-bottom: 1.5rem;
}

/* ─── Acknowledgement page ────────────────────────────────────────────────── */
.ack-card {
  text-align: center;
  padding: 3rem 2rem;
}

.ack-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: #f79409;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.ack-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.ack-message {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.response-audit-info {
  text-align: center;
  font-size: 0.875rem;
  color: #374151;
  margin-top: 1rem;
}

.response-audit-info p {
  margin: 0.25rem 0;
}

.ack-details {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.25rem;
  text-align: left;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.ack-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.ack-row:last-child { border-bottom: none; }

.ack-label {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
}

.ack-value {
  font-size: 0.875rem;
  color: #111827;
  font-weight: 600;
}

.ack-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Login page ──────────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2.5rem 3rem;
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.login-card h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e3a5f;
  margin-bottom: 0.5rem;
}

.login-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* ─── Action cards (Questionnaire Tracking) ──────────────────────────────── */

.action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.action-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
}

.action-card-description {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

.action-card .field-group { margin-bottom: 0; }

/* ─── Audit info strip ───────────────────────────────────────────────────── */

.tracking-client-name {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0.25rem 0 0;
}

.audit-info-strip {
  display: flex;
  justify-content: space-evenly;
  padding: 0.75rem 1.25rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.audit-info-item {
  font-size: 0.875rem;
  color: #374151;
}

.audit-info-item strong { font-weight: 700; }

/* ─── Summary strip ──────────────────────────────────────────────────────── */

.summary-strip {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.summary-stat {
  font-size: 0.875rem;
  color: #1e3a5f;
  font-weight: 500;
}

.summary-stat strong { font-weight: 700; }

.summary-filter {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #374151;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

/* ─── Tracking table ─────────────────────────────────────────────────────── */

.tracking-table-wrapper {
  overflow-x: auto;
}

.tracking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.tracking-table thead th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.tracking-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  vertical-align: middle;
}

.tracking-table tbody tr:hover td {
  background: #fef9f0;
}

.tracking-table .cell-narrative {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-table select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.8125rem;
  background: #fff;
}

.tracking-empty {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* ─── Action feedback ────────────────────────────────────────────────────── */

.action-feedback {
  font-size: 0.8125rem;
  padding: 0.375rem 0;
  min-height: 1.5rem;
}

.action-feedback--success { color: #059669; font-weight: 500; }
.action-feedback--error { color: #dc2626; font-weight: 500; }
.action-feedback--loading { color: #6b7280; font-style: italic; }

/* ─── Inline confirmation ────────────────────────────────────────────────── */

.action-confirm {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-confirm p {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.action-confirm .btn { font-size: 0.8125rem; padding: 0.375rem 1rem; }

/* ─── Document links ─────────────────────────────────────────────────────── */

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #2563eb;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.doc-link:hover { text-decoration: underline; }

/* ─── Accent button (Complete Questionnaire) ─────────────────────────────── */

.btn-accent {
  background: #1e3a5f;
  color: #fff;
  border: 1px solid #1e3a5f;
}

.btn-accent:hover:not(:disabled) {
  background: #162d4a;
  border-color: #162d4a;
}

/* ─── Questionnaire response page ────────────────────────────────────────── */

.response-container {
  max-width: 640px;
  margin: 0 auto;
}

.response-question {
  font-size: 1rem;
  font-weight: 600;
  color: #f79409;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

.response-describe {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e3a5f;
  text-align: center;
  margin-bottom: 0.75rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .two-col-search,
  .two-col-dates,
  .two-col-contacts {
    grid-template-columns: 1fr;
  }

  .request-type-layout {
    flex-direction: column;
  }

  .el-rule-row {
    flex-direction: column;
    gap: 1rem;
  }

  .action-cards {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    gap: 1rem;
  }

  .form-body { padding: 1.25rem; }
  .header-inner { gap: 0.75rem; }
}

/* ─── Masked Input ────────────────────────────────────────────────────────── */
.field-input--masked {
  font-family: monospace;
  letter-spacing: 0.15em;
}
