*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --bg: #f7f8fa;
  --panel: #fbfcfe;
  --border: #e4e7ec;
  --border-light: #edf0f5;
  --text-primary: #1a2035;
  --text-secondary: #5a6478;
  --text-muted: #8b95a7;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --teal: #0f766e;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 8px 24px rgba(26, 32, 53, 0.08), 0 2px 8px rgba(26, 32, 53, 0.05);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#widget-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#app-root {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 12px 28px;
}

.wizard-header {
  display: grid;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 14px;
}

.title-cluster h1 {
  margin: 6px 0 4px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.title-cluster p,
.card-heading p,
.step-header p,
.step-header span,
.future-products,
.context-card em,
.upload-copy span,
.person-card-top span,
.dependent-toolbar span {
  color: var(--text-muted);
}

.title-cluster p {
  margin: 0;
  font-size: 12px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.context-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.context-card span,
.context-card em {
  display: block;
  font-size: 11px;
}

.context-card strong {
  display: block;
  margin: 3px 0;
  font-size: 13px;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.top-progress,
.step-sidebar,
.step-panel,
.guidance-panel,
.form-card,
.person-card,
.empty-state,
.summary-panel,
.submit-result {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.step-sidebar {
  position: sticky;
  top: 14px;
  padding: 12px;
}

.top-progress {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  min-width: 0;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
}

.progress-label span {
  color: var(--text-muted);
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.progress-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width var(--transition);
}

.step-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.top-step-list {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 5px;
  margin-top: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.step-list button {
  display: grid;
  grid-template-columns: 26px 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: all var(--transition);
}

.top-step-list button {
  display: flex;
  flex: 0 0 auto;
  width: 42px;
  height: 38px;
  justify-content: center;
  padding: 6px;
}

.top-step-list button strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top-step-list button em {
  font-size: 10px;
}

.step-list button:hover {
  background: var(--bg);
}

.step-list button.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.step-list button.complete {
  color: var(--green);
}

.step-list span,
.step-icon,
.card-icon,
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
}

.step-list em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.step-list strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.future-products {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 11px;
}

.future-products span {
  color: var(--text-secondary);
  font-weight: 700;
}

.step-panel {
  min-height: 560px;
  min-width: 0;
  padding: 14px;
}

.step-header {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.step-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: var(--blue);
  background: #eff6ff;
}

.step-header span {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
}

.step-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.step-header p {
  margin: 4px 0 0;
  font-size: 12px;
}

.step-content {
  display: grid;
  gap: 12px;
  padding: 14px 0;
}

.form-card,
.person-card {
  min-width: 0;
  padding: 14px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.card-icon {
  color: var(--blue);
}

.card-heading h3 {
  margin: 0;
  font-size: 14px;
}

.card-heading p {
  margin: 3px 0 0;
  font-size: 11px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.narrow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.checkbox-field input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.checkbox-field span,
.checkbox-field strong,
.checkbox-field em {
  display: block;
}

.checkbox-field strong {
  color: var(--text-secondary);
  font-size: 11px;
}

.checkbox-field em {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.field > span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.required {
  margin-left: 2px;
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

input:focus,
select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-wide {
  grid-column: 1 / -1;
}

.date-field small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.date-input-group {
  display: grid;
  grid-template-columns:
    minmax(44px, 0.8fr) auto minmax(44px, 0.8fr)
    auto minmax(68px, 1.2fr);
  align-items: center;
  gap: 5px;
}

.date-input-group input {
  min-width: 0;
  text-align: center;
}

.date-input-group em {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 800;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.input-with-prefix:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-with-prefix em {
  padding-left: 10px;
  color: var(--text-muted);
  font-style: normal;
}

.input-with-prefix input {
  border: 0;
  box-shadow: none;
}

.segmented {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.segmented button {
  min-width: 58px;
  padding: 7px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.segmented button.active {
  background: var(--white);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.dependent-toolbar,
.person-card-top,
.wizard-actions,
.submit-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dependent-toolbar {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.dependent-bottom-actions {
  display: flex;
  justify-content: flex-end;
}

.dependent-toolbar strong,
.person-card-top strong {
  display: block;
  font-size: 13px;
}

.dependent-toolbar span,
.person-card-top span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.person-card {
  display: grid;
  gap: 14px;
}

.muted-card {
  opacity: 0.72;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.mini-check input {
  width: 14px;
  min-height: 14px;
}

.ghost-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-muted);
}

.ghost-icon:hover {
  color: var(--red);
  border-color: #fecaca;
  background: #fff5f5;
}

.upload-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.upload-copy {
  display: flex;
  align-items: center;
  gap: 9px;
}

.upload-copy strong,
.upload-copy span {
  display: block;
}

.upload-copy strong {
  font-size: 12px;
}

.upload-copy span {
  margin-top: 2px;
  font-size: 11px;
}

.upload-button,
.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition);
}

.upload-button,
.secondary-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
}

.upload-button:hover,
.secondary-btn:hover {
  border-color: #cbd5e1;
  background: var(--bg);
  color: var(--text-primary);
}

.upload-button input {
  display: none;
}

.hidden-file-input {
  display: none;
}

.primary-btn {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.18);
}

.primary-btn:hover {
  background: #1d4ed8;
}

.upload-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

.upload-guidance {
  display: flex;
  grid-column: 1 / -1;
  justify-self: stretch;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.upload-guidance strong {
  flex-basis: 100%;
  color: var(--text-secondary);
  font-size: 11px;
}

.upload-guidance span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 11px;
}

.upload-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item em {
  color: var(--green);
  font-style: normal;
  font-weight: 700;
}

.upload-remove-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.upload-item small {
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px;
  font-weight: 800;
}

.upload-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.36);
}

.upload-modal-card {
  width: min(100%, 520px);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.upload-modal-header,
.upload-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-modal-header strong,
.upload-modal-header span {
  display: block;
}

.upload-modal-header strong {
  font-size: 15px;
}

.upload-modal-header span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.upload-modal-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.upload-modal-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.upload-modal-error {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fff5f5;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.inline-error {
  margin-top: 10px;
}

.lookup-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.lookup-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.lookup-title span {
  color: var(--text-muted);
}

.lookup-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.lookup-results {
  display: grid;
  gap: 6px;
}

.lookup-results button {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
}

.lookup-results button:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.lookup-results span {
  color: var(--text-muted);
  font-size: 11px;
}

.plan-groups-block {
  display: grid;
  gap: 12px;
}

.plan-group-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.plan-group-header,
.participants-picker-title,
.selected-lookup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-group-header strong,
.participants-picker-title strong {
  display: block;
  font-size: 13px;
}

.plan-group-header span,
.participants-picker-title span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.issuer-lookup-field {
  grid-column: 1 / -1;
}

.selected-lookup {
  padding: 7px 8px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.participants-picker {
  display: grid;
  gap: 8px;
}

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

.participant-option.assigned-elsewhere {
  border-color: #fed7aa;
  background: #fffbeb;
}

.plan-group-review-list {
  display: grid;
  gap: 8px;
}

.plan-group-review-row {
  align-items: flex-start;
  flex-direction: column;
}

.plan-group-review-row em {
  line-height: 1.35;
}

.plan-group-review-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.issuer-highlight {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.plan-group-review-title small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.compact-empty {
  min-height: 120px;
}

.upload-modal-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 190px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text-primary);
}

.review-layout {
  display: grid;
  gap: 12px;
}

.summary-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.summary-metric {
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.summary-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.review-list,
.warning-list,
.document-summary-list,
.operation-grid {
  display: grid;
  gap: 8px;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.review-row span {
  font-weight: 700;
}

.review-row em {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
}

.warning-card {
  border-color: #fed7aa;
  background: #fffbeb;
}

.warning-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}

.document-summary-list div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.document-summary-list em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
}

.operation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operation-grid span {
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

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

.final-progress {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.final-progress-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.final-progress-top strong,
.final-progress-top span,
.final-progress-top em {
  display: block;
}

.final-progress-top strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.final-progress-top span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.final-progress-top em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.final-progress-track {
  overflow: hidden;
  height: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
}

.final-progress-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 220ms ease;
}

.operation-details {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.operation-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.operation-details summary::-webkit-details-marker {
  display: none;
}

.operation-details summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.operation-details summary em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.operation-details[open] .operation-status-list {
  margin-top: 10px;
}

.operation-status {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.operation-log {
  grid-column: 2 / -1;
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.operation-log code {
  display: block;
  white-space: normal;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.35;
}

.operation-status > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--text-muted);
}

.operation-status strong {
  color: var(--text-secondary);
  font-size: 12px;
}

.operation-status em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.operation-status.running {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.operation-status.running em {
  color: var(--blue);
}

.operation-status.success > span {
  background: #dcfce7;
  color: var(--green);
}

.operation-status.success em {
  color: var(--green);
}

.operation-status.error {
  border-color: #fecaca;
  background: #fff5f5;
}

.operation-status.error > span {
  background: #fee2e2;
  color: var(--red);
}

.operation-status.error em {
  color: var(--red);
}

.status-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #bfdbfe;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.submit-result {
  justify-content: flex-start;
  margin-bottom: 12px;
  padding: 12px;
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.submit-result strong,
.submit-result span {
  display: block;
}

.submit-result strong {
  color: #166534;
  font-size: 13px;
}

.submit-result span {
  margin-top: 3px;
  color: #15803d;
  font-size: 11px;
}

.wizard-actions {
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.desktop-guidance {
  display: none;
}

.inline-guidance {
  display: block;
  margin-bottom: 14px;
}

.guidance-panel {
  overflow: hidden;
}

.guidance-panel details {
  display: block;
}

.guidance-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: default;
  list-style: none;
}

.guidance-panel summary::-webkit-details-marker {
  display: none;
}

.guidance-collapsible summary {
  cursor: pointer;
}

.guidance-panel summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

.guidance-panel summary em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.guidance-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.checklist-list {
  display: grid;
  gap: 7px;
}

.check-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.check-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.check-item strong {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.check-item.complete span {
  background: #dcfce7;
  color: var(--green);
}

.check-item.attention span {
  background: #fffbeb;
  color: var(--amber);
}

.check-item.neutral span {
  background: #eef2f7;
  color: var(--text-muted);
}

.guidance-block {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.guidance-block h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
}

.guidance-block p {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.guidance-block.docs p {
  grid-template-columns: 16px minmax(0, 1fr);
}

.guidance-block p em {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.guidance-block.alert {
  border-color: #fed7aa;
  background: #fffbeb;
}

.guidance-block.alert p {
  color: #92400e;
}

.future-validation-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #ccfbf1;
  border-radius: var(--radius-sm);
  background: #f0fdfa;
}

.future-validation-note strong {
  color: #115e59;
  font-size: 12px;
}

.future-validation-note span {
  color: #0f766e;
  font-size: 11px;
  line-height: 1.4;
}

.loading-shell {
  padding: 18px;
}

.loading-line,
.loading-grid div {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7ec 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.loading-line {
  height: 46px;
  margin-bottom: 14px;
}

.loading-grid {
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  gap: 14px;
}

.loading-grid div {
  height: 240px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 860px) {
  #app-root {
    padding: 12px;
  }

  .wizard-header,
  .wizard-layout,
  .top-progress {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .wizard-header {
    display: grid;
  }

  .context-card {
    min-width: 0;
  }

  .top-progress {
    align-items: stretch;
  }

  .step-panel {
    min-height: auto;
  }

  .desktop-guidance {
    display: none;
  }

  .form-grid,
  .narrow-grid,
  .summary-panel,
  .operation-grid,
  .participants-grid,
  .lookup-search-row {
    grid-template-columns: 1fr;
  }

  .dependent-toolbar,
  .person-card-top,
  .wizard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-section {
    grid-template-columns: 1fr;
  }

  .upload-button {
    justify-self: stretch;
  }

  .wizard-actions {
    flex-direction: column-reverse;
  }

  .primary-btn,
  .secondary-btn,
  .upload-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .title-cluster h1 {
    font-size: 21px;
  }

  .step-header {
    align-items: flex-start;
  }
}
