/**
 * END-DP2A — Endelea Application Shell
 * Design system: Wide Track brand · approved Login + Dashboard language
 * See docs/END-APP-DESIGN-SYSTEM.md
 */

/* ─── 1. Colour & spacing tokens (aligned with login / brand board) ─── */
:root {
  --ed-navy: #0F1F33;
  --ed-navy-soft: #2D3645;
  --ed-blue: #2d9cff;
  --ed-interaction: var(--ed-blue);
  --ed-interaction-soft: rgba(45, 156, 255, 0.08);
  --ed-amber: #D9A11E;
  --ed-amber-soft: #FBF5E8;
  --ed-amber-border: #E8D4A8;
  --ed-amber-muted: #B8891A;
  --ed-ivory: #F7F3EB;
  --ed-ivory-deep: #EDE8DF;
  --ed-white: #ffffff;
  --ed-surface: #FFFCF8;

  --ed-text: var(--ed-navy);
  --ed-text-muted: #7D8794;
  --ed-text-subtle: #9AA3AE;
  --ed-border: #E5DFD4;
  --ed-border-light: #ECE7DF;

  --ed-danger: #b42318;
  --ed-danger-light: #fef3f2;
  --ed-warn: #b54708;
  --ed-warn-light: #fffaeb;

  --ed-primary: var(--ed-navy);
  --ed-primary-hover: var(--ed-navy-soft);
  --ed-accent: var(--ed-amber);

  /* Legacy aliases consumed by existing markup */
  --navy: var(--ed-navy);
  --navy-soft: var(--ed-navy-soft);
  --amber: var(--ed-amber);
  --amber-soft: var(--ed-amber-soft);
  --amber-border: var(--ed-amber-border);
  --ivory: var(--ed-ivory);
  --sidebar-bg: var(--ed-white);
  --bg: var(--ed-ivory);
  --surface: var(--ed-surface);
  --border: var(--ed-border);
  --border-focus: var(--ed-navy);
  --text: var(--ed-text);
  --text-muted: var(--ed-text-muted);
  --primary: var(--ed-primary);
  --primary-hover: var(--ed-primary-hover);
  --primary-light: var(--ed-amber-soft);
  --accent: var(--ed-accent);
  --danger: var(--ed-danger);
  --danger-light: var(--ed-danger-light);
  --warn: var(--ed-warn);
  --warn-light: var(--ed-warn-light);

  --ed-space-1: 4px;
  --ed-space-2: 8px;
  --ed-space-3: 12px;
  --ed-space-4: 16px;
  --ed-space-5: 24px;
  --ed-space-6: 32px;
  --ed-space-7: 40px;

  --ed-radius-sm: 6px;
  --ed-radius: 10px;
  --ed-radius-lg: 12px;
  --ed-radius-pill: 999px;
  --radius: var(--ed-radius);
  --radius-sm: var(--ed-radius-sm);

  --ed-shadow-sm: 0 1px 2px rgba(11, 19, 32, 0.05);
  --ed-shadow: 0 2px 8px rgba(11, 19, 32, 0.06);
  --ed-shadow-md: 0 4px 20px rgba(11, 19, 32, 0.08);
  --ed-shadow-lg: 0 8px 32px rgba(11, 19, 32, 0.1);
  --shadow: var(--ed-shadow-sm);
  --shadow-md: var(--ed-shadow-md);

  --ed-font: "DM Sans", system-ui, -apple-system, sans-serif;
  --ed-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font: var(--ed-font);
  --font-display: var(--ed-font-display);

  --ed-sidebar-width: 260px;
  --sidebar-width: var(--ed-sidebar-width);

  --ed-text-xs: 11px;
  --ed-text-sm: 13px;
  --ed-text-base: 14px;
  --ed-text-lg: 16px;
  --ed-display-sm: 22px;
  --ed-display-md: 28px;
  --ed-display-lg: 34px;
}

/* ─── 2. Typography system ─── */
body {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-base);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ed-text);
  background: var(--ed-ivory);
  -webkit-font-smoothing: antialiased;
}

/* Display — serif page greetings only (topbar) */
.ed-display,
.ed-page-title {
  font-family: var(--ed-font-display);
  font-weight: 600;
  color: var(--ed-navy);
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.ed-page-title {
  margin: 0 0 var(--ed-space-1);
  font-size: var(--ed-display-md);
}

.ed-page-subtitle {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.45;
}

/* Section — sans uppercase overline (lists, zones, cards) */
.ed-section-heading,
.group-heading,
.zone-heading,
.ed-overline {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
}

/* Workspace page / step title (Property & Accommodation, Manage room types, etc.) */
.section-title,
h2.section-title {
  margin: 0 0 var(--ed-space-1);
  font-family: var(--ed-font);
  font-size: var(--ed-text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ed-navy);
  line-height: 1.25;
}

.section-desc {
  margin: 0 0 var(--ed-space-5);
  color: var(--ed-text-muted);
  font-size: var(--ed-text-sm);
  font-weight: 400;
  line-height: 1.5;
  max-width: 62ch;
}

.group-heading,
.zone-heading {
  margin: var(--ed-space-5) 0 var(--ed-space-3);
}

.zone-heading { margin-top: 0; }

/* ─── 2b. Canonical typography roles (single source — all modules) ─── */

.ed-subsection-label,
.ws-section-label {
  margin: var(--ed-space-4) 0 var(--ed-space-2);
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  line-height: 1.3;
}

.ws-section-label:first-child,
.ed-subsection-label:first-child {
  margin-top: 0;
}

.ws-details-quiet summary,
.ws-recent-panel summary,
.ed-details-summary {
  padding: var(--ed-space-1) 0;
  cursor: pointer;
  font-family: var(--ed-font);
  font-weight: 600;
  font-size: var(--ed-text-sm);
  letter-spacing: 0.02em;
  color: var(--ed-navy-soft);
  list-style: none;
}

.ws-details-quiet .ws-details-quiet summary,
.ws-contact-secondary summary {
  font-size: var(--ed-text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ed-navy-soft);
  padding: var(--ed-space-1) 0;
}

.ed-label,
.field label,
.cw-label,
.cl-label {
  display: block;
  margin-bottom: var(--ed-space-2);
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-navy);
  line-height: 1.35;
}

.ed-intro,
.ws-section-intro,
.cw-section-intro,
.cl-intro {
  margin: 0 0 var(--ed-space-4);
  font-size: var(--ed-text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ed-text-muted);
  max-width: 62ch;
}

.ed-hint,
.field-hint,
.field-error,
.field-warn,
.cw-loader-hint,
.cl-hint {
  margin-top: var(--ed-space-1);
  font-size: var(--ed-text-xs);
  line-height: 1.45;
}

.ed-hint,
.field-hint,
.cw-loader-hint,
.cl-hint {
  color: var(--ed-text-muted);
}

.field-error { color: var(--ed-danger); }
.field-warn { color: var(--ed-warn); }

.cl-field-error {
  font-size: var(--ed-text-xs);
  line-height: 1.45;
  color: var(--ed-danger);
}

.cl-field {
  gap: var(--ed-space-2);
}

/* Body & metadata utilities */
.ed-body {
  font-size: var(--ed-text-base);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ed-text);
}

.ed-meta {
  font-size: var(--ed-text-xs);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ed-text-muted);
}

/* ─── 3. Global application shell ─── */
.ed-app {
  display: flex;
  min-height: 100vh;
  background: var(--ed-ivory);
}

.ed-sidebar {
  width: var(--ed-sidebar-width);
  flex-shrink: 0;
  background: var(--ed-surface);
  border-right: 1px solid var(--ed-border-light);
  display: flex;
  flex-direction: column;
  padding: var(--ed-space-6) var(--ed-space-4) var(--ed-space-5);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  overflow: visible;
}

.ed-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ed-ivory);
  max-width: calc(100vw - var(--ed-sidebar-width));
  position: relative;
  isolation: isolate;
}

.ed-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 var(--ed-space-6) var(--ed-space-6);
}

.ed-topbar {
  padding: var(--ed-space-6) var(--ed-space-6) var(--ed-space-4);
  flex-shrink: 0;
  background: var(--ed-ivory);
}

body.ed-dashboard-view .ed-topbar {
  display: none;
}

body.ed-dashboard-view .ed-content {
  padding-top: 8px;
  padding-bottom: var(--ed-space-4);
}

body.ed-client-files-view .ed-topbar {
  padding: var(--ed-space-4) var(--ed-space-6) var(--ed-space-2);
}

body.ed-client-files-view .ed-page-title {
  font-size: var(--ed-display-sm);
  margin-bottom: 2px;
}

body.ed-client-files-view .ed-page-subtitle {
  font-size: var(--ed-text-sm);
}

body.ed-suppliers-view .ed-topbar {
  padding: var(--ed-space-4) var(--ed-space-6) var(--ed-space-2);
}

body.ed-suppliers-view .ed-page-title {
  font-size: var(--ed-display-sm);
  margin-bottom: 2px;
}

body.ed-suppliers-view .ed-page-subtitle {
  font-size: var(--ed-text-sm);
}

.ed-suppliers-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-suppliers-root .card-body {
  padding-top: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.ed-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--ed-space-4);
}

/* Primary content surface — all screens render inside this card */
.main-card,
.ed-surface-card {
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-lg);
  box-shadow: var(--ed-shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.card-body {
  padding: var(--ed-space-5) var(--ed-space-6) var(--ed-space-6);
  flex: 1;
  overflow-y: auto;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--ed-space-4) var(--ed-space-6);
  border-top: 1px solid var(--ed-border-light);
  background: var(--ed-ivory);
  border-radius: 0 0 var(--ed-radius-lg) var(--ed-radius-lg);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

body.ce-wide { overflow-x: clip; }
body.ce-wide .ed-main { max-width: none; }
body.ce-wide .ed-content { padding-left: var(--ed-space-5); padding-right: var(--ed-space-5); }

/* ─── 4. Branded sidebar — Wide Track mark + ENDELEA wordmark ─── */
.ed-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px var(--ed-space-2) var(--ed-space-6);
  margin: 0 0 var(--ed-space-6);
  border-bottom: 1px solid var(--ed-border-light);
}

.ed-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  border: none;
  pointer-events: none;
  shape-rendering: geometricPrecision;
}

.ed-brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding-top: 1px;
}

.ed-brand-name {
  display: block;
  font-family: var(--ed-font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ed-navy);
  line-height: 1;
  padding-left: 0.28em;
}

.ed-brand-tagline {
  display: block;
  font-family: var(--ed-font);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ed-text-muted);
  line-height: 1.35;
  padding-left: 0.28em;
}

/* Tagline: login, exports, marketing only — not sidebar */
.ed-brand-tag {
  display: block;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.5;
  margin-top: 4px;
}

.ed-brand-tag .tag-amber { color: var(--ed-amber-muted); }
.ed-brand-tag .tag-blue { color: var(--ed-blue); }

/* ─── 5. Navigation framework ─── */
.ed-nav-section {
  margin: 0 0 var(--ed-space-2);
  padding: 0 var(--ed-space-3);
  font-size: var(--ed-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-text-subtle);
}

.ed-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  padding: 0 0 var(--ed-space-2);
}

.ed-nav-item {
  display: flex;
  align-items: center;
  gap: var(--ed-space-3);
  width: 100%;
  padding: 10px var(--ed-space-3);
  border: none;
  border-radius: var(--ed-radius);
  background: transparent;
  color: var(--ed-text-muted);
  font-family: inherit;
  font-size: var(--ed-text-sm);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ed-nav-item:hover {
  background: var(--ed-ivory);
  color: var(--ed-navy);
}

.ed-nav-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--ed-radius-sm);
  background: transparent;
  color: var(--ed-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ed-nav-toggle:hover {
  background: var(--ed-ivory);
  color: var(--ed-navy);
}
.ed-nav-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.ed-nav-item.active {
  background: var(--ed-amber-soft);
  color: var(--ed-navy);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ed-amber);
}

.ed-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.75;
  opacity: 0.7;
}

.ed-nav-item.active .ed-nav-icon {
  opacity: 1;
  stroke: var(--ed-amber);
}

.ed-sidebar-foot {
  padding: var(--ed-space-4) var(--ed-space-1) 0;
  border-top: 1px solid var(--ed-border-light);
  margin-top: auto;
}

.ed-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--ed-space-3);
  padding: var(--ed-space-3) var(--ed-space-3);
  margin-top: var(--ed-space-3);
  border-radius: var(--ed-radius);
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  box-shadow: var(--ed-shadow-sm);
}

.ed-sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ed-navy-soft), var(--ed-navy));
  color: var(--ed-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.ed-sidebar-user-name {
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-navy);
  line-height: 1.25;
}

.ed-sidebar-user-role {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.ed-sidebar-user-wrap {
  position: relative;
}

button.ed-sidebar-user {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ed-sidebar-user-caret {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.65;
}

#ed-account-btn[aria-expanded="true"] .ed-sidebar-user-caret {
  transform: rotate(180deg);
}

.ed-account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  padding: 4px;
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  box-shadow: var(--ed-shadow);
}

.ed-account-menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ed-navy);
  font: inherit;
  font-size: var(--ed-text-sm);
  text-align: left;
  cursor: pointer;
}

.ed-account-menu-item:hover {
  background: var(--ed-ivory);
}

.ed-app.ed-nav-collapsed {
  --ed-sidebar-width: 72px;
  --sidebar-width: 72px;
}

.ed-app.ed-nav-collapsed .ed-sidebar {
  padding: var(--ed-space-4) var(--ed-space-2);
}

.ed-app.ed-nav-collapsed .ed-brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 var(--ed-space-4);
}

.ed-app.ed-nav-collapsed .ed-nav-toggle {
  margin-left: 0;
}

.ed-app.ed-nav-collapsed .ed-nav-toggle-icon {
  transform: rotate(180deg);
}

.ed-app.ed-nav-collapsed .ed-brand-text,
.ed-app.ed-nav-collapsed .ed-nav-label,
.ed-app.ed-nav-collapsed .ed-brand-tag,
.ed-app.ed-nav-collapsed .ed-sidebar-user-text,
.ed-app.ed-nav-collapsed .ed-sidebar-user-caret,
.ed-app.ed-nav-collapsed .save-status,
.ed-app.ed-nav-collapsed .restore-notice {
  display: none;
}

.ed-app.ed-nav-collapsed .ed-nav-item {
  justify-content: center;
  padding: 11px;
  gap: 0;
}

.ed-app.ed-nav-collapsed .ed-sidebar-user {
  justify-content: center;
  gap: 0;
  padding: 6px;
  margin-top: var(--ed-space-2);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ed-app.ed-nav-collapsed .ed-account-menu {
  left: calc(100% + 8px);
  right: auto;
  bottom: 0;
  min-width: 148px;
}

.save-status {
  margin: 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-subtle);
  line-height: 1.4;
}

.restore-notice {
  margin: var(--ed-space-2) 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-navy-soft);
  font-weight: 500;
}

.ws-spine-nav { display: none !important; }

/* ─── 6. Card system ─── */
.ed-card,
.ws-list-row,
.ws-profile-block,
.fee-row,
.product-card,
.season-row,
.room-panel,
.ws-type-section,
.ws-modal,
.collapsible-section,
.empty-state,
.gate-banner,
.ce-panel,
.ce-panel-primary,
.ce-totals,
.ws-version-row,
.library-panel,
.product-card-collapsed,
.ce-quote-actions-bar {
  border-radius: var(--ed-radius);
}

.ws-list-row,
.fee-row,
.product-card,
.season-row,
.ws-version-row,
.library-panel {
  border: 1px solid var(--ed-border-light);
  background: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
}

.ws-list-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--ed-space-4);
  margin-bottom: var(--ed-space-2);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--ed-text-base);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ws-list-row:hover {
  border-color: var(--ed-amber-border);
  box-shadow: var(--ed-shadow-md);
  transform: translateY(-1px);
}

.ws-profile-block {
  padding: var(--ed-space-4);
  border: 1px solid var(--ed-border-light);
  background: var(--ed-ivory);
  margin-bottom: var(--ed-space-4);
  font-size: var(--ed-text-base);
  line-height: 1.6;
  border-radius: var(--ed-radius);
}

.empty-state {
  padding: var(--ed-space-6);
  text-align: center;
  color: var(--ed-text-muted);
  border: 1px dashed var(--ed-border);
  background: var(--ed-ivory);
  font-size: var(--ed-text-sm);
}

.collapsible-section {
  border: 1px solid var(--ed-border-light);
  margin-bottom: var(--ed-space-3);
  background: var(--ed-ivory);
  box-shadow: var(--ed-shadow-sm);
}

.collapsible-section summary {
  padding: var(--ed-space-4);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--ed-text-base);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-section summary::-webkit-details-marker { display: none; }
.collapsible-section summary::before { content: "▸ "; color: var(--ed-text-muted); font-weight: 400; }
.collapsible-section[open] summary::before { content: "▾ "; }

.collapsible-body {
  padding: 0 var(--ed-space-4) var(--ed-space-4);
  border-top: 1px solid var(--ed-border-light);
  background: var(--ed-white);
}

.collapsible-body-inner { padding-top: var(--ed-space-4); }

.ws-type-section {
  border: 1px solid var(--ed-border-light);
  margin-bottom: var(--ed-space-3);
  background: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
  overflow: hidden;
}

.ws-type-header {
  background: var(--ed-ivory);
  border-bottom: 1px solid var(--ed-border-light);
}

.gate-banner {
  padding: var(--ed-space-3) var(--ed-space-4);
  border-radius: var(--ed-radius);
  margin-bottom: var(--ed-space-5);
  font-size: var(--ed-text-sm);
}

.gate-banner.info {
  background: var(--ed-amber-soft);
  border: 1px solid var(--ed-amber-border);
  color: var(--ed-navy-soft);
}

.gate-banner.error {
  background: var(--ed-danger-light);
  border: 1px solid #fecdca;
  color: var(--ed-danger);
}

.gate-banner.warn {
  background: var(--ed-warn-light);
  border: 1px solid #f5d976;
  color: #8a6d1a;
}

/* ─── 7. Button system ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ed-space-2);
  padding: 10px 18px;
  font-family: inherit;
  font-size: var(--ed-text-base);
  font-weight: 600;
  border-radius: var(--ed-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.2;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ed-navy);
  color: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ed-navy-soft);
}

.btn-secondary {
  background: var(--ed-white);
  color: var(--ed-navy);
  border-color: var(--ed-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--ed-ivory);
  border-color: var(--ed-border);
}

.btn-accent {
  background: var(--ed-white);
  color: var(--ed-amber-muted);
  border-color: var(--ed-amber);
}

.btn-accent:hover:not(:disabled) {
  background: var(--ed-amber-soft);
}

.btn-danger {
  background: var(--ed-white);
  color: var(--ed-danger);
  border-color: #fecdca;
}

.btn-danger:hover:not(:disabled) {
  background: var(--ed-danger-light);
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--ed-text-sm);
  font-weight: 600;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--ed-navy);
  color: var(--ed-white);
  border: none;
}

.btn-icon:hover:not(:disabled) {
  background: var(--ed-navy-soft);
}

.linkish,
.ws-breadcrumb button.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--ed-amber-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
}

.linkish:hover,
.ws-breadcrumb button.linkish:hover {
  text-decoration: underline;
  color: var(--ed-navy);
}

/* ─── 8. Form styling system ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ed-space-4);
}

.form-grid .full-width { grid-column: 1 / -1; }

.field label {
  display: block;
  margin-bottom: var(--ed-space-2);
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-navy);
}

.field label .req { color: var(--ed-danger); }

.field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="date"]),
.field select,
.field textarea,
.field .ed-date-display,
.ws-modal-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--ed-text-base);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  color: var(--ed-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="date"]):focus,
.field select:focus,
.field textarea:focus,
.field .ed-date-display:focus,
.field .ed-date-display:focus-visible,
.ws-modal-input:focus {
  outline: none;
  border-color: var(--ed-navy);
  box-shadow: 0 0 0 3px rgba(15, 31, 51, 0.08);
}

.field input:not([type="radio"]):not([type="checkbox"]).input-error,
.field select.input-error {
  border-color: var(--ed-danger);
}

/* Visible radios: empty circle / filled inner disc. Clipped card radios stay hidden. */
input[type="radio"]:not(.ws-structure-card-input):not(.ws-search-intent-input) {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  vertical-align: middle;
  border: 2px solid var(--ed-navy);
  border-radius: 50%;
  background: var(--ed-white);
  box-shadow: none;
  cursor: pointer;
}

input[type="radio"]:not(.ws-structure-card-input):not(.ws-search-intent-input):checked {
  background: var(--ed-white);
  box-shadow: inset 0 0 0 3px var(--ed-white), inset 0 0 0 8px var(--ed-navy);
}

input[type="radio"]:not(.ws-structure-card-input):not(.ws-search-intent-input):focus-visible {
  outline: 2px solid var(--ed-navy);
  outline-offset: 2px;
}

@media (forced-colors: active) {
  input[type="radio"]:not(.ws-structure-card-input):not(.ws-search-intent-input) {
    appearance: auto;
    -webkit-appearance: auto;
    background: Canvas;
    box-shadow: none;
  }
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field-hint,
.field-error,
.field-warn {
  margin-top: var(--ed-space-1);
  font-size: var(--ed-text-xs);
  line-height: 1.45;
}

.field-hint { color: var(--ed-text-muted); }
.field-error { color: var(--ed-danger); }
.field-warn { color: var(--ed-warn); }

.field-readonly {
  background: var(--ed-ivory);
  color: var(--ed-text-muted);
}

/* ─── Search component (design system — do not vary per page) ─── */
.ed-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.ed-search-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ed-text-muted);
  pointer-events: none;
  transition: color 0.15s ease;
}

.ed-search:focus-within .ed-search-icon {
  color: var(--ed-amber);
}

.ed-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 42px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-base);
  font-weight: 400;
  line-height: 1;
  color: var(--ed-navy);
  background: var(--ed-white);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-pill);
  box-shadow: var(--ed-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ed-search-input::placeholder {
  color: var(--ed-text-muted);
  opacity: 0.85;
}

.ed-search-input:focus {
  outline: none;
  border-color: var(--ed-amber);
  box-shadow: 0 0 0 3px rgba(217, 161, 30, 0.14);
}

.ed-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.ed-search-toolbar {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  flex-wrap: wrap;
}

.ed-search-toolbar .ed-search,
.ed-dash-toolbar .ed-search,
.ed-cf-toolbar .ed-search {
  flex: 1;
  min-width: 220px;
}

.ed-search-toolbar--standalone {
  margin-bottom: var(--ed-space-4);
}

body.ed-supplier-workspace-view .ed-search-toolbar--standalone {
  margin-bottom: var(--ed-space-3);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-2);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  font-weight: 400;
  cursor: pointer;
}

.radio-group input { width: auto; }

/* ─── Shared UI polish (shell-level, not screen-specific) ─── */
.ws-breadcrumb {
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  margin-bottom: var(--ed-space-3);
}

.ws-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--ed-space-4);
  flex-wrap: wrap;
  margin-bottom: var(--ed-space-4);
}

.ws-page-header .section-desc { margin-bottom: 0; }

.ws-page-actions {
  display: flex;
  gap: var(--ed-space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ws-status-badge {
  font-size: var(--ed-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: var(--ed-radius-pill);
  background: var(--ed-ivory-deep);
  color: var(--ed-text-muted);
  margin-left: var(--ed-space-2);
  vertical-align: middle;
  border: 1px solid var(--ed-border-light);
}

.ws-status-badge.status-quoting {
  background: #e8f4fd;
  color: #1565a8;
  border-color: #c5e3f6;
}

.ws-status-badge.status-confirmed {
  background: var(--ed-amber-soft);
  color: var(--ed-navy);
  border-color: var(--ed-amber-border);
}

.tab-btn {
  border-radius: var(--ed-radius-sm);
}

.tab-btn.active {
  background: var(--ed-amber-soft);
  border-color: var(--ed-amber-border);
  color: var(--ed-navy);
  font-weight: 600;
}

.step-indicator {
  padding: var(--ed-space-4) var(--ed-space-5);
  border-bottom: 1px solid var(--ed-border-light);
  background: var(--ed-ivory);
}

.step-item.active .step-dot {
  border-color: var(--ed-navy);
  background: var(--ed-navy);
  color: var(--ed-white);
}

.step-item.completed .step-dot {
  border-color: var(--ed-amber);
  background: var(--ed-amber-soft);
  color: var(--ed-navy);
}

.step-item.completed:not(:last-child)::after { background: var(--ed-amber); }
.step-item.completed .step-label { color: var(--ed-navy); }

.ws-modal-overlay {
  background: rgba(11, 19, 32, 0.42);
}

.ws-modal {
  border-radius: var(--ed-radius-lg);
  box-shadow: var(--ed-shadow-lg);
}

.hidden { display: none !important; }

/* ─── END-SP1.1 Supplier workspace density ─── */
body.ed-supplier-workspace-view .ed-topbar {
  padding: var(--ed-space-4) var(--ed-space-6) var(--ed-space-2);
}

body.ed-supplier-workspace-view .ed-page-title {
  font-size: var(--ed-display-sm);
  margin-bottom: 2px;
}

body.ed-supplier-workspace-view .ed-page-subtitle {
  font-size: var(--ed-text-sm);
}

body.ed-supplier-workspace-view .card-body {
  padding: var(--ed-space-4) var(--ed-space-6) var(--ed-space-5);
}

body.ed-supplier-workspace-view .group-heading,
body.ed-supplier-workspace-view .zone-heading {
  margin: var(--ed-space-4) 0 var(--ed-space-2);
}

body.ed-supplier-workspace-view #step-content > .group-heading:first-child,
body.ed-supplier-workspace-view .ws-form-compact > .group-heading:first-child {
  margin-top: var(--ed-space-2);
}

body.ed-supplier-workspace-view .ws-breadcrumb {
  margin-bottom: var(--ed-space-2);
}

body.ed-supplier-workspace-view .ws-list-row {
  padding: 10px var(--ed-space-3);
  margin-bottom: 6px;
}

body.ed-supplier-workspace-view .step-indicator {
  padding: var(--ed-space-3) var(--ed-space-5);
}

body.ed-supplier-workspace-view .step-dot {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

body.ed-supplier-workspace-view .step-label {
  font-size: 11px;
  margin-left: 6px;
}

body.ed-supplier-workspace-view .card-footer {
  padding: var(--ed-space-3) var(--ed-space-6);
}

.ws-form-compact .form-grid {
  gap: 10px var(--ed-space-3);
}

.ws-form-compact .field label {
  margin-bottom: var(--ed-space-1);
  font-size: var(--ed-text-sm);
}

.ws-form-compact .field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
.ws-form-compact .field select,
.ws-form-compact .field textarea {
  padding: 8px 12px;
}

.ws-form-compact .field textarea {
  min-height: 56px;
}

.ws-form-compact .field-hint {
  margin-top: 2px;
  line-height: 1.35;
}

.ws-form-compact .field-checkbox-hint {
  margin: var(--ed-space-1) 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.ws-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--ed-space-4);
  flex-wrap: wrap;
  margin-bottom: var(--ed-space-3);
}

.ws-profile-meta {
  margin: 0;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  line-height: 1.5;
}

.ws-profile-meta-detail {
  margin: var(--ed-space-1) 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.45;
}

.ws-profile-header-actions {
  display: flex;
  gap: var(--ed-space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ws-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ed-space-3);
  flex-wrap: wrap;
  margin: var(--ed-space-4) 0 var(--ed-space-2);
}

.ws-section-header .group-heading {
  margin: 0;
}

.ws-optional-section {
  margin-top: var(--ed-space-3);
}

.ws-optional-section .collapsible-body-inner {
  padding-top: var(--ed-space-3);
}

.ws-optional-section .section-desc {
  margin: 0 0 var(--ed-space-3);
  font-size: var(--ed-text-sm);
}

/* ─── END-SP2.1 Hospitality visual weight ─── */

/* R1 — transparent hospitality surface (all supplier-domain views) */
body.ed-supplier-workspace-view .ed-suppliers-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.ed-supplier-workspace-view .ed-suppliers-root .card-body {
  padding-top: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

/* R2 — flat list rows */
body.ed-supplier-workspace-view .ws-list-row {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--ed-border-light);
  transition: background 0.12s ease;
}

body.ed-supplier-workspace-view .ws-list-row:hover {
  border-color: var(--ed-border-light);
  box-shadow: none;
  transform: none;
  background: rgba(11, 19, 32, 0.025);
}

body.ed-supplier-workspace-view .ws-list-row:last-child {
  border-bottom: none;
}

body.ed-supplier-workspace-view .ws-list-row-title {
  font-weight: 600;
  font-size: var(--ed-text-base);
}

body.ed-supplier-workspace-view .ws-list-row-meta {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  margin-top: 2px;
}

/* R3 — soft section labels (alias ed-subsection-label) */
.ws-section-label {
  margin: 0 0 var(--ed-space-2);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  line-height: 1.3;
}

body.ed-supplier-workspace-view .ws-form-compact .ws-section-label:not(:first-child),
body.ed-supplier-workspace-view .ws-editorial > .ws-section-label:not(:first-child) {
  margin-top: var(--ed-space-4);
  padding-top: var(--ed-space-3);
  border-top: 1px solid var(--ed-border-light);
}

body.ed-supplier-workspace-view .ws-section-header {
  margin: var(--ed-space-4) 0 var(--ed-space-2);
  padding-top: var(--ed-space-3);
  border-top: 1px solid var(--ed-border-light);
}

body.ed-supplier-workspace-view .ws-section-header .ws-section-label {
  margin: 0;
  padding: 0;
  border: none;
}

/* R4 — light form fields */
body.ed-supplier-workspace-view .ws-form-compact .field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
body.ed-supplier-workspace-view .ws-form-compact .field select,
body.ed-supplier-workspace-view .ws-form-compact .field textarea {
  border-color: var(--ed-border-light);
  background: var(--ed-white);
  box-shadow: none;
}

body.ed-supplier-workspace-view .ws-form-compact .field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]):focus,
body.ed-supplier-workspace-view .ws-form-compact .field select:focus,
body.ed-supplier-workspace-view .ws-form-compact .field textarea:focus {
  border-color: var(--ed-navy-soft);
  box-shadow: 0 0 0 2px rgba(11, 19, 32, 0.05);
}

body.ed-supplier-workspace-view .ws-form-compact .field label {
  font-weight: 500;
  color: var(--ed-navy-soft);
}

body.ed-supplier-workspace-view .field-readonly {
  background: transparent;
  border-color: var(--ed-border-light);
  color: var(--ed-text);
}

/* R5 — wizard demotion */
body.ed-supplier-workspace-view .step-indicator {
  display: none !important;
}

body.ed-supplier-workspace-view .card-footer {
  background: transparent;
  border-top: none;
  padding-top: var(--ed-space-2);
  padding-bottom: var(--ed-space-4);
}

body.ed-supplier-workspace-view .card-footer .btn-primary {
  box-shadow: none;
}

/* Review screen — laptop verification density */
body.ed-supplier-workspace-view .review-page .collapsible-body {
  padding: 0 10px 8px;
}

body.ed-supplier-workspace-view .review-page .collapsible-body-inner {
  padding-top: 8px;
}

body.ed-supplier-workspace-view .review-kv-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1200px) {
  body.ed-supplier-workspace-view .review-kv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.ed-contract-loading-view .review-command-centre .review-command-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.9fr);
}

body.ed-contract-loading-view .review-zone--rates .matrix-wrap {
  max-height: 200px;
}

body.ed-contract-loading-view .review-command-main {
  gap: 12px;
}

body.ed-contract-loading-view .review-pub-checklist ul {
  max-height: 280px;
}

body.ed-contract-loading-view .cl-panel--review .cl-intro {
  margin-bottom: 8px;
  font-size: 13px;
}

/* Classic step loader — laptop-first density (1366×768) */
body.ed-supplier-workspace-view .zone-heading,
body.ed-supplier-workspace-view .group-heading {
  margin: var(--ed-space-3) 0 var(--ed-space-2);
  font-size: var(--ed-text-xs);
}

body.ed-supplier-workspace-view .empty-state {
  padding: var(--ed-space-3);
  font-size: var(--ed-text-sm);
}

body.ed-supplier-workspace-view .library-panel {
  padding: var(--ed-space-3);
  margin-bottom: var(--ed-space-2);
}

body.ed-supplier-workspace-view .fee-validity-block {
  margin-top: var(--ed-space-2);
  padding-top: var(--ed-space-2);
}

body.ed-supplier-workspace-view .radio-group {
  gap: var(--ed-space-1);
}

body.ed-supplier-workspace-view .product-section--setup .field label {
  font-size: var(--ed-text-sm);
}

/* R6 — quiet optional sections */
.ws-details-quiet {
  margin-top: var(--ed-space-3);
  border: none;
  background: transparent;
  box-shadow: none;
}

.ws-details-quiet summary {
  padding: var(--ed-space-1) 0;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--ed-text-sm);
  letter-spacing: 0.02em;
  color: var(--ed-navy-soft);
  list-style: none;
}

.ws-details-quiet summary::-webkit-details-marker { display: none; }

.ws-details-quiet summary::before {
  content: "▸ ";
  color: var(--ed-text-muted);
  font-weight: 400;
}

.ws-details-quiet[open] summary::before { content: "▾ "; }

.ws-details-quiet .ws-details-body {
  padding: var(--ed-space-2) 0 0;
}

.ws-details-quiet .section-desc {
  margin: 0 0 var(--ed-space-2);
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

/* R7 — quiet empty states */
.empty-state--workspace {
  padding: var(--ed-space-2) 0;
  text-align: left;
  color: var(--ed-text-muted);
  border: none;
  background: transparent;
  font-size: var(--ed-text-sm);
  font-style: italic;
}

/* R9 — editorial form width */
.ws-editorial {
  max-width: 680px;
}

/* Suppliers landing — lightweight launcher (corridor, not workspace) */
.ws-supplier-launcher {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-4);
}

.ws-launcher-section--recent {
  padding-bottom: var(--ed-space-3);
  border-bottom: 1px solid var(--ed-border-light, #e2e8f0);
}

.ws-launcher-heading {
  margin: 0 0 var(--ed-space-2);
  font-size: var(--ed-text-xs, 11px);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ed-text-muted, #5c6778);
}

.ws-launcher-list .ws-list-row {
  padding-top: 8px;
  padding-bottom: 8px;
}

.ws-recent-panel {
  margin-top: var(--ed-space-4);
  border: none;
  background: transparent;
}

.ws-recent-panel summary {
  padding: var(--ed-space-1) 0;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  list-style: none;
}

.ws-recent-panel summary::-webkit-details-marker { display: none; }

.ws-recent-panel summary::before {
  content: "▸ ";
  color: var(--ed-text-muted);
  font-weight: 400;
}

.ws-recent-panel[open] summary::before { content: "▾ "; }

.ws-recent-body {
  padding: var(--ed-space-1) 0 0;
}

.ws-library-panel {
  margin-top: var(--ed-space-3);
  border: none;
  background: transparent;
}

.ws-library-panel summary {
  padding: var(--ed-space-1) 0;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  list-style: none;
}

.ws-library-panel summary::-webkit-details-marker { display: none; }

.ws-library-panel summary::before {
  content: "▸ ";
  color: var(--ed-text-muted);
  font-weight: 400;
}

.ws-library-panel[open] summary::before { content: "▾ "; }

.ws-library-body {
  padding: var(--ed-space-1) 0 0;
}

.ws-search-empty {
  margin: var(--ed-space-2) 0 0;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  font-style: italic;
}

.ws-list-row-code {
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text-muted);
}

body.ed-supplier-workspace-view .ws-list-row--inline {
  padding: 4px 0;
  min-height: 0;
}

body.ed-supplier-workspace-view .ws-list-row--inline:hover {
  background: transparent;
}

.ws-list-row-inline {
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

body.ed-supplier-workspace-view .ws-form-flow .form-grid {
  gap: 6px var(--ed-space-3);
}

body.ed-supplier-workspace-view .ws-form-flow .field label {
  margin-bottom: 2px;
}

body.ed-supplier-workspace-view .ws-form-flow .field textarea {
  min-height: 44px;
}

body.ed-supplier-workspace-view .ws-form-flow .field-checkbox-hint {
  margin: 2px 0 0;
  line-height: 1.35;
  font-size: var(--ed-text-xs);
}

body.ed-supplier-workspace-view .ws-form-flow .field.full-width {
  margin-top: 2px;
}

/* SP3.2 — country combobox, supplier structure, phone */
.ws-combobox {
  position: relative;
}

.ws-combobox-input {
  width: 100%;
}

.ws-combobox-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 100%;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  box-shadow: 0 4px 12px rgba(11, 19, 32, 0.08);
}

.ws-combobox-list.hidden {
  display: none;
}

.ws-combobox-option {
  padding: 6px 12px;
  font-size: var(--ed-text-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.ws-combobox-option-meta {
  font-size: 11px;
  color: var(--ed-text-muted);
  flex-shrink: 0;
}

.ws-location-mismatch {
  margin-top: 4px;
}

.ws-location-mismatch-msg {
  margin: 2px 0 0;
}

.ws-location-mismatch-actions {
  margin: 2px 0 0;
  font-size: var(--ed-text-xs);
}

.ws-location-mismatch-sep {
  margin: 0 4px;
  color: var(--ed-text-muted);
}

.ws-combobox-option:hover,
.ws-combobox-option.active {
  background: var(--ed-surface-muted, #f5f2ed);
}

.ws-structure-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  grid-column: 1 / -1;
}

.ws-structure-legend {
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  margin-bottom: 6px;
  padding: 0;
}

.ws-choice-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.ws-choice-row input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.ws-choice-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-choice-title {
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text);
}

.ws-choice-desc {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ws-structure-property {
  margin-top: 4px;
  padding-top: 4px;
}

.ws-form-optional {
  margin-top: var(--ed-space-2);
}

.ws-phone-row {
  display: flex;
  gap: var(--ed-space-2);
  align-items: center;
}

.ws-phone-dial {
  flex: 0 0 46%;
  min-width: 0;
}

.ws-phone-national {
  flex: 1;
  min-width: 0;
}

/* SP3.3 — Create Supplier form compression */
body.ed-supplier-workspace-view .ws-breadcrumb--compact {
  margin-bottom: var(--ed-space-1);
}

body.ed-supplier-workspace-view .ws-form-create.ws-form-compact .form-grid,
body.ed-supplier-workspace-view .ws-form-create.ws-form-flow .form-grid {
  gap: 4px var(--ed-space-3);
}

body.ed-supplier-workspace-view .ws-form-create .field label {
  margin-bottom: 1px;
}

body.ed-supplier-workspace-view .ws-form-create .field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
body.ed-supplier-workspace-view .ws-form-create .field select,
body.ed-supplier-workspace-view .ws-form-create .field textarea {
  padding: 6px 10px;
}

body.ed-supplier-workspace-view .ws-form-create .field textarea {
  min-height: 36px;
}

.ws-create-grid .ws-locale-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 4px var(--ed-space-3);
}

.ws-locale-row .field:last-child label {
  font-weight: 400;
  color: var(--ed-text-muted);
}

.ws-currency-hint {
  display: block;
  margin-top: 1px;
  font-size: var(--ed-text-xs);
  line-height: 1.25;
  color: var(--ed-text-muted);
}

body.ed-supplier-workspace-view .ws-form-create .ws-structure-legend {
  margin-bottom: 2px;
}

/* SP3.3.3 — side-by-side workflow choice cards */
.ws-structure-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ws-structure-card {
  position: relative;
  display: block;
  margin: 0;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ws-structure-card:hover {
  border-color: var(--ed-border);
}

.ws-structure-card:has(.ws-structure-card-input:checked) {
  border-color: var(--ed-interaction);
  background: var(--ed-interaction-soft);
  box-shadow: 0 0 0 1px var(--ed-interaction);
}

.ws-structure-card-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ws-structure-card-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ed-border);
  border-radius: 50%;
  background: var(--ed-white);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ws-structure-card:has(.ws-structure-card-input:checked) .ws-structure-card-check {
  border-color: var(--ed-interaction);
  background: var(--ed-interaction);
  box-shadow: inset 0 0 0 2.5px var(--ed-white);
}

.ws-structure-card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}

.ws-structure-card-body .ws-choice-title {
  font-size: var(--ed-text-sm);
}

.ws-structure-card-body .ws-choice-desc,
.ws-structure-card-body .ws-choice-examples {
  font-size: 11px;
  line-height: 1.3;
}

/* SP3.3.3 — create-supplier laptop density */
body.ed-supplier-create-view .ed-topbar {
  padding-bottom: var(--ed-space-1);
}

body.ed-supplier-create-view .ed-page-title {
  margin-bottom: 0;
}

body.ed-supplier-create-view .ed-page-subtitle {
  margin-top: 0;
}

body.ed-supplier-create-view .card-body {
  padding: var(--ed-space-2) var(--ed-space-6) var(--ed-space-3);
}

body.ed-supplier-create-view .card-footer {
  padding: var(--ed-space-2) var(--ed-space-6);
}

body.ed-supplier-create-view .ws-breadcrumb--compact {
  margin-bottom: 2px;
}

body.ed-supplier-create-view .ws-form-create.ws-form-compact .form-grid,
body.ed-supplier-create-view .ws-form-create.ws-form-flow .form-grid {
  gap: 3px var(--ed-space-3);
}

body.ed-supplier-create-view .ws-structure-property {
  margin-top: 3px;
  padding: 0;
  border: none;
  background: transparent;
}

body.ed-supplier-create-view .ws-property-grid {
  gap: 3px var(--ed-space-3);
}

body.ed-supplier-create-view .ws-form-create .ws-form-optional {
  margin-top: 2px;
}

.ws-create-section {
  margin-bottom: var(--ed-space-4);
  padding-bottom: var(--ed-space-4);
  border-bottom: 1px solid var(--ed-border-light);
}

.ws-create-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.ws-create-section-title {
  margin: 0 0 var(--ed-space-2);
  font-family: var(--ed-font-display, var(--ed-font));
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ed-navy);
}

.ws-create-section-optional {
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  letter-spacing: 0;
}

.ws-create-section-lead {
  margin: 0 0 var(--ed-space-3);
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  line-height: 1.45;
  max-width: 56ch;
}

.ws-create-section--notes {
  margin-top: var(--ed-space-2);
}

body.ed-supplier-create-view .ws-form-create .field label {
  font-weight: 500;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
}

body.ed-supplier-create-view .ws-form-create .ws-create-section .field label {
  color: var(--ed-text);
}

body.ed-supplier-create-view .ws-create-optional-summary {
  font-family: var(--ed-font-display, var(--ed-font));
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ed-navy);
}

body.ed-supplier-create-view .ws-create-optional-block {
  margin-top: var(--ed-space-2);
  padding-top: var(--ed-space-2);
  border-top: 1px solid var(--ed-border-light);
}

.ws-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ws-product-types-fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

body.ed-supplier-create-view .ws-details-quiet summary {
  padding: 2px 0;
}

@media (max-width: 720px) {
  .ws-structure-cards {
    grid-template-columns: 1fr;
  }
}

.ws-contract-type-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 4px;
}

.ws-contract-type-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ws-contract-type-pick:hover {
  border-color: var(--ed-navy);
  box-shadow: inset 0 0 0 1px var(--ed-navy);
}

.ws-contract-type-pick-label {
  font-size: var(--ed-text-sm);
  font-weight: 700;
  color: var(--ed-navy);
}

.ws-contract-type-pick-meta {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

@media (max-width: 560px) {
  .ws-contract-type-pick-grid {
    grid-template-columns: 1fr;
  }
}

.ws-choice-row--compact {
  align-items: center;
  padding: 2px 0;
  gap: 8px;
}

.ws-choice-row--compact input[type="radio"] {
  margin-top: 0;
}

.ws-choice-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 5px;
  line-height: 1.35;
}

.ws-choice-inline .ws-choice-desc::before {
  content: "·";
  margin-right: 5px;
  color: var(--ed-text-muted);
}

.ws-choice-row--structured {
  align-items: flex-start;
  padding: 4px 0;
  gap: 8px;
}

.ws-choice-row--structured input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.ws-choice-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.35;
}

.ws-choice-stack .ws-choice-desc {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.ws-choice-examples {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
  margin-top: 1px;
}

.ws-choice-examples-label {
  font-weight: 500;
}

.ws-structure-property {
  margin-top: 2px;
  padding: 6px var(--ed-space-2) var(--ed-space-1);
  border-left: 2px solid var(--ed-border-light);
  background: rgba(245, 242, 237, 0.45);
}

.ws-property-micro-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ed-text-muted);
  margin-bottom: 4px;
}

.ws-property-grid {
  gap: 4px var(--ed-space-3);
}

body.ed-supplier-workspace-view .ws-form-create .ws-form-optional {
  margin-top: var(--ed-space-1);
}

.ws-contact-panel {
  padding-top: var(--ed-space-1);
}

.ws-contact-primary {
  gap: 4px var(--ed-space-3);
}

.ws-contact-secondary {
  margin-top: var(--ed-space-2);
}

.ws-contact-secondary-grid {
  gap: 4px var(--ed-space-3);
}

.ws-phone-national::placeholder {
  color: var(--ed-text-muted);
  opacity: 0.65;
}

.ws-field-from-discovery label::after {
  content: " · from discovery";
  font-weight: 400;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: #1a5c34;
}

.ws-phone-preview {
  margin-top: 1px;
  min-height: 0;
}

.ws-phone-preview:empty {
  display: none;
}

/* ─── Discovery D-1a: Search step + candidate cards ─── */
.ws-search-step {
  grid-column: 1 / -1;
  margin: 0 0 var(--ed-space-2);
  padding: 12px 14px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: rgba(232, 244, 236, 0.25);
}

.ws-search-step-eyebrow {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ed-text-muted);
}

.ws-search-step-title {
  margin: 0 0 4px;
  font-size: var(--ed-text-md);
  font-weight: 600;
  color: var(--ed-text);
}

.ws-search-step-lead {
  margin: 0 0 10px;
  font-size: var(--ed-text-xs);
  line-height: 1.45;
  color: var(--ed-text-muted);
}

.ws-search-intent-fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.ws-search-intent-legend {
  display: block;
  margin-bottom: 8px;
  font-size: var(--ed-text-xs);
  font-weight: 600;
  color: var(--ed-text);
}

.ws-search-intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.ws-search-intent-card {
  display: flex;
  align-items: stretch;
  margin: 0;
  cursor: pointer;
}

.ws-search-intent-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ws-search-intent-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ws-search-intent-input:focus-visible + .ws-search-intent-body {
  outline: 2px solid var(--ed-navy);
  outline-offset: 2px;
}

.ws-search-intent-input:checked + .ws-search-intent-body {
  border-color: var(--ed-interaction);
  box-shadow: inset 0 0 0 1px var(--ed-interaction);
  background: var(--ed-interaction-soft);
}

.ws-discovery-candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-discovery-candidate-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
}

.ws-discovery-candidate-card--manual {
  border-style: dashed;
  background: rgba(245, 242, 237, 0.5);
}

.ws-discovery-candidate-visual {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--ed-radius-sm);
  overflow: hidden;
  border: 1px solid var(--ed-border-light);
  background: rgba(245, 242, 237, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-discovery-candidate-visual--placeholder,
.ws-discovery-candidate-visual.is-fallback {
  background: rgba(232, 244, 236, 0.55);
}

.ws-discovery-candidate-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-discovery-candidate-initial {
  font-size: 18px;
  font-weight: 700;
  color: var(--ed-navy);
  line-height: 1;
}

.ws-discovery-candidate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.ws-discovery-candidate-head .ws-discovery-candidate-title {
  margin: 0;
  flex: 1 1 100%;
}

.ws-discovery-candidate-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-discovery-candidate-facts li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 10px;
  line-height: 1.35;
}

.ws-discovery-fact-label {
  color: var(--ed-text-muted);
  font-weight: 600;
}

.ws-discovery-fact-value {
  color: var(--ed-text);
  min-width: 0;
  word-break: break-word;
}

.ws-discovery-candidate-meta-line {
  margin: 2px 0 0;
  font-size: 10px;
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.ws-discovery-candidate-website {
  word-break: break-all;
}

.ws-discovery-choose-btn {
  flex-shrink: 0;
  align-self: center;
}

/* ─── END-SP3.4: Supplier discovery (Option C) ─── */
.ws-discovery-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--ed-space-2);
  grid-column: 1 / -1;
}

.ws-discovery-name-row .field {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.ws-discovery-name-row .field-hint {
  font-size: 11px;
  color: var(--ed-text-muted);
  margin-top: 3px;
}

.ws-discovery-name-guidance {
  color: #b45309;
  font-size: 11px;
  margin-top: 2px;
}

.ws-discovery-name-guidance.hidden {
  display: none;
}

.ws-discovery-name-row .ws-discovery-trigger {
  flex-shrink: 0;
  margin-bottom: 1px;
}

.ws-discovery-name-row .ws-discovery-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ws-discovery-name-row .ws-discovery-cancel.hidden,
.ws-discovery-name-row .ws-discovery-trigger.hidden {
  display: none;
}

.ws-discovery-name-row .ws-discovery-cancel {
  flex-shrink: 0;
  margin-bottom: 1px;
}

.ws-create-intro {
  grid-column: 1 / -1;
  margin: 0 0 var(--ed-space-2);
  padding: 10px 12px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: rgba(245, 242, 237, 0.45);
}

.ws-create-intro-lead {
  margin: 0 0 4px;
  font-size: var(--ed-text-sm);
  color: var(--ed-text);
  line-height: 1.4;
}

.ws-create-intro-detail {
  margin: 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ws-discovery-optional-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  border: 1px solid var(--ed-border-light);
  border-radius: 999px;
  vertical-align: middle;
}

.ws-structure-product-note {
  margin: 0 0 var(--ed-space-2);
}
.ws-structure-product-note .ws-create-section-lead {
  margin-bottom: 0;
}
#ws-structure-product-notes {
  margin-top: var(--ed-space-3);
}
#ws-structure-lodging.hidden + #ws-structure-product-notes {
  margin-top: 0;
}

.ws-footer-form-hint {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ws-discovery-panel {
  grid-column: 1 / -1;
  margin: 2px 0 var(--ed-space-1);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
  overflow: hidden;
}

.ws-discovery-panel.hidden {
  display: none;
}

.ws-discovery-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ed-space-2);
  padding: 8px 10px;
  border-bottom: 1px solid var(--ed-border-light);
  background: rgba(245, 242, 237, 0.35);
}

.ws-discovery-panel-title {
  margin: 0;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-text);
}

.ws-discovery-panel-sub {
  margin: 2px 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ws-discovery-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  flex-shrink: 0;
}

.ws-discovery-close {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-family: inherit;
}

.ws-discovery-close:hover {
  color: var(--ed-text);
}

.ws-discovery-structure-rec {
  padding: 8px 10px;
  border-bottom: 1px solid var(--ed-border-light);
  background: rgba(238, 242, 248, 0.55);
}

.ws-discovery-structure-rec-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ed-text-muted);
  margin-bottom: 6px;
}

.ws-discovery-structure-rec-card {
  padding: 8px 10px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
}

.ws-discovery-structure-rec-card.is-accepted {
  border-color: var(--ed-navy);
  background: rgba(245, 242, 237, 0.4);
}

.ws-discovery-structure-rec-title {
  margin: 0 0 2px;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-text);
}

.ws-discovery-structure-rec-reason {
  margin: 0 0 8px;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.ws-discovery-structure-rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.ws-discovery-structure-rec-accept {
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--ed-radius-sm);
  border: 1px solid var(--ed-navy);
  background: var(--ed-navy);
  color: var(--ed-white);
  cursor: pointer;
}

.ws-discovery-structure-rec-override {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  border: none;
  background: none;
  color: var(--ed-navy-soft);
  cursor: pointer;
  text-decoration: underline;
}

.ws-discovery-build-stamp {
  margin: 4px 0 0;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: var(--ed-radius-sm);
  border: 1px solid var(--ed-border-light);
  background: rgba(245, 242, 237, 0.55);
  color: var(--ed-text-muted);
}

.ws-discovery-build-stamp.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.ws-discovery-build-stamp.is-warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.ws-discovery-build-stamp.is-pending {
  color: var(--ed-text-muted);
}

.ws-discovery-build-smoke {
  display: block;
  margin-top: 4px;
  color: inherit;
  opacity: 0.92;
}

.ws-discovery-build-stamp code {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

.ws-discovery-unverified-notice {
  margin: 0;
  padding: 8px 12px;
  font-size: var(--ed-text-xs);
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.ws-discovery-unverified-notice.hidden {
  display: none;
}

.ws-discovery-candidates {
  padding: 8px 12px;
  border-bottom: 1px solid var(--ed-border-light);
  background: rgba(245, 242, 237, 0.35);
}

.ws-discovery-candidates.hidden {
  display: none;
}

.ws-discovery-candidates-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ed-text-muted);
  margin-bottom: 6px;
}

.ws-discovery-match-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ws-discovery-match-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  cursor: pointer;
  font-size: var(--ed-text-xs);
  line-height: 1.35;
}

.ws-discovery-match-option.is-selected {
  border-color: var(--ed-navy);
  box-shadow: inset 0 0 0 1px var(--ed-navy);
}

.ws-discovery-match-option input {
  margin-top: 2px;
  flex-shrink: 0;
}

.ws-discovery-match-meta {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--ed-text-muted);
}

.ws-discovery-candidate-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-discovery-candidate-actions.hidden {
  display: none;
}

.ws-discovery-candidate-hint {
  margin: 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.ws-discovery-candidate-card .ws-discovery-candidate-body {
  flex: 1;
  min-width: 0;
}

.ws-discovery-candidate-title {
  display: block;
  font-weight: 600;
  color: var(--ed-text);
}

.ws-discovery-candidate-flag {
  margin-left: 4px;
}

.ws-discovery-candidate-rec {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(232, 244, 236, 0.9);
  color: var(--ed-navy);
  vertical-align: middle;
}

.ws-discovery-candidate-meta {
  margin: 4px 0 0;
  padding: 0 0 0 14px;
  font-size: 10px;
  color: var(--ed-text-muted);
  line-height: 1.45;
}

.ws-discovery-match-option--none {
  border-style: dashed;
  background: rgba(245, 242, 237, 0.5);
}

.ws-discovery-match-option--none.is-selected {
  border-color: var(--ed-text-muted);
  box-shadow: inset 0 0 0 1px var(--ed-text-muted);
}

.ws-discovery-structure-rec-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--ed-text-xs);
  color: var(--ed-text);
}

.ws-discovery-summary {
  padding: 8px 10px;
  border-bottom: 1px solid var(--ed-border-light);
  background: rgba(232, 244, 236, 0.35);
}

.ws-discovery-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ed-text-muted);
  margin-bottom: 6px;
}

.ws-discovery-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-discovery-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text);
}

.ws-discovery-summary-item::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e8f4ec;
  color: #1a5c34;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.ws-discovery-summary-item.is-pending::before {
  content: "…";
  background: #eef2f8;
  color: #1a3a5c;
}

.ws-discovery-summary-item.is-ignored::before {
  content: "—";
  background: var(--ed-surface);
  color: var(--ed-text-muted);
}

.ws-discovery-summary-item.is-applied::before {
  content: "✓";
  background: #e8f4ec;
  color: #1a5c34;
}

.ws-discovery-summary-item.is-partial::before {
  content: "~";
  background: var(--ed-warn-light);
  color: var(--ed-warn);
}

.ws-discovery-summary-item.is-missing::before {
  content: "—";
  background: var(--ed-surface);
  color: var(--ed-text-muted);
}

.ws-discovery-empty {
  padding: 16px 12px;
  text-align: center;
}

.ws-discovery-empty-icon {
  font-size: 22px;
  margin-bottom: 6px;
  opacity: 0.5;
}

.ws-discovery-empty-title {
  margin: 0 0 4px;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-text);
}

.ws-discovery-empty-body {
  margin: 0 auto;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.4;
  max-width: 28em;
}

.ws-discovery-fields-scroll {
  max-height: 240px;
  overflow-y: auto;
}

.ws-discovery-fields {
  padding: 0;
}

.ws-discovery-field {
  padding: 8px 10px;
  border-bottom: 1px solid var(--ed-border-light);
}

.ws-discovery-field:last-child {
  border-bottom: none;
}

.ws-discovery-field.is-applied {
  background: #f6faf7;
}

.ws-discovery-field.is-ignored {
  opacity: 0.45;
}

.ws-discovery-field-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ws-discovery-field-label {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ed-text-muted);
}

.ws-discovery-field-value {
  font-size: var(--ed-text-sm);
  font-weight: 500;
  color: var(--ed-text);
  word-break: break-word;
  margin: 0;
}

.ws-discovery-field-value a {
  color: var(--ed-navy-soft);
}

.ws-discovery-field-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ws-discovery-field-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 12px;
}

.ws-discovery-source-link {
  color: var(--ed-navy-soft);
  text-decoration: none;
  font-weight: 500;
}

.ws-discovery-confidence-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.ws-discovery-confidence-reason {
  font-size: 10px;
  color: var(--ed-text-muted);
  line-height: 1.3;
  max-width: 22em;
}

.ws-discovery-field-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ws-discovery-btn-accept,
.ws-discovery-btn-ignore {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--ed-radius-sm);
  cursor: pointer;
  border: 1px solid var(--ed-border);
  background: var(--ed-white);
}

.ws-discovery-btn-accept {
  border-color: var(--ed-navy);
  color: var(--ed-navy);
}

.ws-discovery-btn-accept:hover {
  background: var(--ed-navy);
  color: var(--ed-white);
}

.ws-discovery-btn-ignore {
  color: var(--ed-text-muted);
}

.ws-discovery-field.is-applied .ws-discovery-field-value {
  color: var(--ed-text);
}

.ws-discovery-field.is-failed {
  background: var(--ed-warn-light);
}

.ws-discovery-applied-badge,
.ws-discovery-ignored-badge,
.ws-discovery-failed-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--ed-radius-pill);
  align-self: flex-start;
}

.ws-discovery-applied-badge {
  color: #1a5c34;
  background: #e8f4ec;
}

.ws-discovery-awaiting-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--ed-radius-pill);
  color: #1a3a5c;
  background: #eef2f8;
}

.ws-discovery-field-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ws-discovery-structure-rec-card.is-pending {
  border-color: #c5d4e8;
  background: #f8fafc;
}

.ws-discovery-structure-rec-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--ed-text-muted);
}

.ws-discovery-contact-empty {
  padding: 10px;
  border-top: 1px solid var(--ed-border-light);
  background: var(--ed-surface);
}

.ws-discovery-contact-empty-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ed-text-muted);
  margin-bottom: 4px;
}

.ws-discovery-contact-empty p {
  margin: 0;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
}

.ws-discovery-ignored-badge {
  color: var(--ed-text-muted);
  background: var(--ed-surface);
  border: 1px solid var(--ed-border-light);
}

.ws-discovery-failed-badge {
  color: var(--ed-warn);
  background: var(--ed-warn-light);
}

.ws-discovery-structure-rec-card.is-applied {
  border-color: #c5e6d0;
  background: #f6faf7;
}

.ws-confidence {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--ed-radius-pill);
  letter-spacing: 0.02em;
}

.ws-confidence--strong {
  background: #e8f4ec;
  color: #1a5c34;
}

.ws-confidence--verified,
.ws-confidence--good {
  background: #eef2f8;
  color: #1a3a5c;
}

.ws-confidence--possible {
  background: var(--ed-warn-light);
  color: var(--ed-warn);
}

.ws-discovery-panel-footer {
  padding: 6px 10px;
  border-top: 1px solid var(--ed-border-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-2);
  background: var(--ed-surface);
}

.ws-discovery-footer-hint {
  font-size: 11px;
  color: var(--ed-text-muted);
  margin: 0;
}

.ws-discovery-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ws-discovery-accept-strong {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--ed-radius-sm);
  border: 1px solid var(--ed-navy);
  background: var(--ed-white);
  color: var(--ed-navy);
  cursor: pointer;
}

.ws-discovery-accept-strong:hover:not(:disabled) {
  background: var(--ed-navy);
  color: var(--ed-white);
}

.ws-discovery-accept-strong:disabled {
  border-color: var(--ed-border);
  color: var(--ed-text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.ws-discovery-bulk-note {
  font-size: 10px;
  color: var(--ed-text-muted);
  font-style: italic;
}

.ws-discovery-loading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-2);
  padding: 12px 10px;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.ws-discovery-loading-text {
  flex: 1;
}

.ws-discovery-loading-cancel {
  font-size: var(--ed-text-xs);
  padding: 0;
}

.ws-structure-summary-block {
  grid-column: 1 / -1;
  padding: 6px 10px;
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: rgba(245, 242, 237, 0.45);
}

.ws-structure-summary-block.hidden {
  display: none;
}

.ws-structure-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ed-text-muted);
  margin-bottom: 4px;
}

.ws-structure-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--ed-text-sm);
}

.ws-structure-summary-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8f4ec;
  color: #1a5c34;
  font-size: 11px;
  font-weight: 700;
}

.ws-structure-summary-change {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  border: none;
  background: none;
  color: var(--ed-navy-soft);
  cursor: pointer;
  text-decoration: underline;
  margin-left: auto;
}

.ws-structure-fieldset--guided.hidden {
  display: none;
}

.ws-structure-fieldset--guided {
  grid-column: 1 / -1;
  margin: 0;
}

.ws-structure-hint {
  margin: 6px 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

#f-supplier-property-wrap.hidden {
  display: none;
}

.ws-structure-manual-link {
  grid-column: 1 / -1;
  margin: 0 0 var(--ed-space-1);
  font-size: var(--ed-text-xs);
}

/* ─── Responsive (laptop-first) ─── */
@media (max-width: 900px) {
  .ed-app {
    --ed-sidebar-width: 72px;
    --sidebar-width: 72px;
  }

  .ed-sidebar {
    width: var(--ed-sidebar-width);
    padding: var(--ed-space-4) var(--ed-space-2);
  }

  .ed-brand-text,
  .ed-nav-label,
  .ed-brand-tag,
  .ed-sidebar-user-text,
  .ed-sidebar-user-caret {
    display: none;
  }

  .ed-brand {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: var(--ed-space-4);
  }

  .ed-nav-toggle {
    margin-left: 0;
  }

  .ed-nav-item {
    justify-content: center;
    padding: 11px;
    gap: 0;
  }

  .ed-sidebar-user {
    justify-content: center;
    gap: 0;
    padding: 6px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .ed-account-menu {
    left: calc(100% + 8px);
    right: auto;
    bottom: 0;
    min-width: 148px;
  }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .ed-topbar { padding: var(--ed-space-4); }
  .ed-content { padding: 0 var(--ed-space-4) var(--ed-space-4); }
  .card-body { padding: var(--ed-space-4); }
  .ed-page-title { font-size: 24px; }
}
