:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --ink: #172033;
  --muted: #687187;
  --line: #dfe4ec;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --navy: #102a56;
  --blue: #245bbd;
  --blue-soft: #e9f0ff;
  --green: #16734a;
  --green-soft: #e8f7ef;
  --amber: #9b5b08;
  --amber-soft: #fff5df;
  --red: #a52c37;
  --red-soft: #ffedf0;
  --shadow: 0 16px 42px rgba(25, 42, 73, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
}

body {
  background: #eef1f6;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

  button:disabled {
    cursor: wait;
    opacity: 0.6;
  }

  button:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  a:focus-visible {
    outline: 3px solid rgba(36, 91, 189, 0.35);
    outline-offset: 2px;
  }

h1,
h2,
p {
  margin-top: 0;
}

.intro-panel h1:focus {
  outline: none;
}

.application-shell {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 4.75rem;
  padding: 0.75rem max(1rem, calc((100vw - 95rem) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 0.875rem;
  color: #ffffff;
  display: flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 2.75rem;
  justify-content: center;
  letter-spacing: 0.06em;
  width: 2.75rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.1rem;
}

.header-status {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.module-nav {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
}

  .module-nav a {
    border-radius: 999px;
    color: #526078;
    font-size: 0.8rem;
    font-weight: 900;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    white-space: nowrap;
  }

    .module-nav a.active {
      background: var(--blue);
      color: #ffffff;
    }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin-left: auto;
}

.auth-link {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0;
  text-decoration: none;
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-avatar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  border: none;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-width: 12.5rem;
  padding: .9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.user-menu-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
}

.user-menu-action {
  width: 100%;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.user-menu-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.settings-menu {
  position: relative;
}

.settings-button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

  .settings-button svg {
    fill: #526078;
    height: 1.25rem;
    width: 1.25rem;
  }

.settings-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.55rem;
  min-width: 14.375rem;
  padding: 0.75rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 40;
}

  .settings-panel button {
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: 0.625rem;
    color: #ffffff;
    font-weight: 900;
    min-height: 2.5rem;
  }

  .settings-panel small {
    color: var(--muted);
    line-height: 1.4;
  }

.connection-pill,
.metric,
.section-heading > span,
.sync-chip {
  border-radius: 999px;
  white-space: nowrap;
}

.connection-pill {
  align-items: center;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
}

.status-dot {
  background: currentColor;
  border-radius: 50%;
  height: 0.5rem;
  width: 0.5rem;
}

.connection-pill.online {
  background: var(--green-soft);
  color: var(--green);
}

.connection-pill.offline {
  background: var(--red-soft);
  color: var(--red);
}

.connection-pill.degraded {
  background: var(--amber-soft);
  color: var(--amber);
}

.metric {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.45rem 0.7rem;
}

  .metric strong {
    color: var(--ink);
  }

.conflict-metric strong {
  color: var(--red);
}

.workspace {
  margin: 0 auto;
  max-width: 97.5rem;
  padding: 1.5rem 1.25rem 3rem;
}

.intro-panel {
  align-items: end;
  background: radial-gradient(circle at 82% 15%, rgba(96, 151, 255, 0.2), transparent 32%), linear-gradient(135deg, #102a56, #173f7b);
  border-radius: 1.5rem;
  color: #ffffff;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
}

  .intro-panel h1 {
    font-size: clamp(1.9rem, 4vw, 3.5rem);
    line-height: 1.04;
    margin-bottom: 0.8rem;
    max-width: 45rem;
  }

.eyebrow {
  color: #6d7b95;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.intro-panel .eyebrow {
  color: #aac7ff;
}

.intro-copy {
  color: #d8e5ff;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 41.25rem;
}

.user-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.125rem;
  min-width: 15.625rem;
  padding: 1rem 1.15rem;
}

  .user-card span,
  .user-card strong,
  .user-card small {
    display: block;
  }

  .user-card span,
  .user-card small {
    color: #c9d9f7;
    font-size: 0.75rem;
  }

  .user-card strong {
    margin: 0.25rem 0 0.7rem;
  }

.status-banner {
  align-items: center;
  border: 1px solid;
  border-radius: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
}

  .status-banner div {
    display: grid;
    gap: 0.2rem;
  }

  .status-banner strong {
    font-size: 0.9rem;
  }

  .status-banner span {
    font-size: 0.76rem;
  }

  .status-banner.healthy {
    background: var(--green-soft);
    border-color: #bfe7d0;
    color: var(--green);
  }

  .status-banner.pending {
    background: var(--amber-soft);
    border-color: #f2d69f;
    color: var(--amber);
  }

  .status-banner.warning {
    background: var(--red-soft);
    border-color: #f3c3c9;
    color: var(--red);
  }

  .status-banner button {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0.625rem;
    color: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    min-height: 2.5rem;
    padding: 0.5rem 0.8rem;
  }

.workbench {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(14.375rem, 0.78fr) minmax(22.5rem, 1.3fr) minmax(21.25rem, 1fr);
}

.store-column,
.recommendation-column,
.feedback-column,
.conflict-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.store-column,
.recommendation-column,
.feedback-column {
  min-height: 38.125rem;
  padding: 1.15rem;
}

.section-heading {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

  .section-heading h2 {
    font-size: 1.13rem;
    margin-bottom: 0;
  }

  .section-heading > span {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.35rem 0.55rem;
  }

.mobile-store-picker {
  display: none;
}

.store-list,
.recommendation-list {
  display: grid;
  gap: 0.65rem;
  max-height: 33.125rem;
  overflow-y: auto;
  padding: 0.15rem;
  scrollbar-width: thin;
}

.store-card,
.recommendation-card {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 4.5rem;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
  width: 100%;
}

  .store-card:hover,
  .recommendation-card:hover {
    border-color: #9fb7e4;
    transform: translateY(-1px);
  }

  .store-card.selected,
  .recommendation-card.selected {
    background: var(--blue-soft);
    border-color: #7ea1e2;
  }

.store-card {
  align-items: center;
  border-radius: 0.875rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.75rem;
}

.store-avatar {
  align-items: center;
  background: #dce8ff;
  border-radius: 0.75rem;
  color: var(--navy);
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 2.625rem;
  justify-content: center;
  width: 2.625rem;
}

.store-card strong,
.store-card small {
  display: block;
}

.store-card strong {
  font-size: 0.85rem;
  line-height: 1.3;
}

.store-card small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.3rem;
}

.chevron {
  color: #8d98ad;
  font-size: 1.4rem;
}

.recommendation-card {
  align-items: start;
  border-radius: 1rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.9rem;
}

.rank-badge {
  align-items: center;
  background: var(--navy);
  border-radius: 0.6875rem;
  color: #ffffff;
  display: flex;
  font-size: 0.85rem;
  font-weight: 900;
  height: 2.375rem;
  justify-content: center;
  width: 2.375rem;
}

.recommendation-copy {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  gap: 0.42rem;
  line-height: 1.42;
}

.recommendation-topline {
  align-items: start;
  color: var(--ink);
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

  .recommendation-topline strong {
    font-size: 0.92rem;
  }

  .recommendation-topline small {
    background: #edf0f6;
    border-radius: 0.375rem;
    color: #58657c;
    font-size: 0.62rem;
    padding: 0.2rem 0.35rem;
  }

.upside {
  color: var(--green);
  font-weight: 800;
}

.sync-chip {
  align-self: center;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.3rem 0.45rem;
  text-transform: uppercase;
}

  .sync-chip.pending {
    background: var(--amber-soft);
    color: var(--amber);
  }

  .sync-chip.synced {
    background: var(--green-soft);
    color: var(--green);
  }

  .sync-chip.conflict {
    background: var(--red-soft);
    color: var(--red);
  }

.feedback-form {
  display: grid;
  gap: 1.25rem;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend,
.comment-field {
  color: #4f5a70;
  font-size: 0.8rem;
  font-weight: 800;
}

.choice-group {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.55rem;
}

.choice {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  font-weight: 800;
  min-height: 3rem;
}

  .choice.selected {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
  }

.comment-field {
  display: grid;
  gap: 0.5rem;
}

  .comment-field textarea {
    border: 1px solid #bbc5d5;
    border-radius: 0.875rem;
    line-height: 1.45;
    min-height: 9.375rem;
    padding: 0.8rem;
    resize: vertical;
  }

  .comment-field > span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 500;
    justify-self: end;
  }

.form-actions,
.conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.primary-action,
.secondary-action,
.sync-button {
  border-radius: 0.6875rem;
  font-weight: 800;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
}

.primary-action,
.sync-button {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #ffffff;
}

.secondary-action {
  background: #ffffff;
  border: 1px solid #aeb9ca;
  color: #3f4b61;
}

.primary-action.large {
  flex: 1;
}

.sync-button.compact {
  min-height: 2.375rem;
  padding: 0.45rem 0.7rem;
}

.save-note {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.conflict-panel {
  margin-bottom: 1rem;
  padding: 1.15rem;
}

.conflict-list {
  display: grid;
  gap: 0.65rem;
}

.conflict-card {
  align-items: center;
  background: var(--red-soft);
  border: 1px solid #f0c8ce;
  border-radius: 0.875rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem;
}

  .conflict-card p {
    color: #6e4a50;
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 0.35rem 0 0;
  }

.empty-state,
.loading-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 17.5rem;
  padding: 1.5rem;
  text-align: center;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  max-width: 35rem;
  padding: 1.25rem 1.5rem;
}

  .status-card h1,
  .status-card p {
    margin-bottom: 0.5rem;
  }

    .status-card p:last-child {
      margin-bottom: 0;
    }

  .status-card.denied {
    border-color: #f0c8ce;
    background: var(--red-soft);
  }

.loading-state .status-card {
  background: var(--surface-soft);
}

.module-title-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

  .module-title-panel h1 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin-bottom: 0;
  }

.module-version {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 1rem;
  justify-content: end;
}

.audit-board {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(20rem, 0.9fr);
}

.audit-list-panel,
.audit-side-panel > section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  box-shadow: var(--shadow);
}

.audit-list-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.audit-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  justify-content: space-between;
}

.audit-filters {
  align-items: end;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.audit-field {
  display: grid;
  gap: 0.35rem;
}

.audit-search-field {
  flex: 1 1 16.25rem;
}

.field-label {
  color: #4f5a70;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.audit-field select {
  background: #ffffff;
  border: 1px solid #c5cedd;
  border-radius: 0.625rem;
  height: 2.625rem;
  min-width: 15rem;
  padding: 0 0.75rem;
}

.search-input-wrap {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c5cedd;
  border-radius: 0.625rem;
  display: flex;
  gap: 0.55rem;
  height: 2.625rem;
  padding: 0 0.75rem;
}

  .search-input-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
  }

  .search-input-wrap input {
    background: transparent;
    border: 0;
    flex: 1;
    font-size: 0.85rem;
    height: 100%;
    min-width: 0;
    outline: none;
    padding: 0;
  }

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
  height: 1rem;
  width: 1rem;
}

.audit-toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  padding-bottom: 0.55rem;
}

.last-updated {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0;
  white-space: nowrap;
}

.audit-count-badge {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.32rem 0.75rem;
  white-space: nowrap;
}

.audit-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.25rem;
}

.audit-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 900;
  gap: 0.45rem;
  margin-bottom: -0.0625rem;
  padding: 0.6rem 0.1rem 0.65rem;
}

  .audit-tab:hover {
    color: var(--navy);
  }

  .audit-tab.active {
    border-bottom-color: var(--blue);
    color: var(--navy);
  }

.tab-count {
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.1rem 0.5rem;
}

.audit-tab.active .tab-count {
  background: var(--blue-soft);
  color: var(--blue);
}

.audit-products-grid {
  display: grid;
  gap: 0.45rem;
}

.audit-grid-empty-state {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
  padding: 0.5rem 0.15rem 0.2rem;
}

.audit-products-grid-heading {
  margin-bottom: 0;
}

.audit-table-shell {
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.audit-table {
  border-collapse: collapse;
  min-width: 53.75rem;
  width: 100%;
}

  .audit-table th,
  .audit-table td {
    border-bottom: 1px solid #edf0f6;
    font-size: 0.76rem;
    padding: 0.62rem 0.65rem;
    text-align: left;
    vertical-align: middle;
  }

  .audit-table th {
    color: #4f5a70;
    font-weight: 900;
    white-space: nowrap;
  }

    .audit-table td:not(:first-child),
    .audit-table th:not(:first-child) {
      text-align: center;
    }

.audit-products-grid-table .audit-col-product {
  min-width: 20rem;
  width: 42%;
}

.audit-products-grid-table .audit-col-upc {
  min-width: 8.75rem;
  white-space: nowrap;
}

.audit-products-grid-table .audit-col-qty,
.audit-products-grid-table .audit-col-auth,
.audit-products-grid-table .audit-col-date,
.audit-products-grid-table .audit-col-days {
  min-width: 6.25rem;
  white-space: nowrap;
}

.category-row {
  background: #f7f9fc;
  font-weight: 900;
}

  .category-row.collapsed td {
    padding-top: 0.52rem;
    padding-bottom: 0.52rem;
  }

  .category-row.expanded td {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .category-row button {
    background: transparent;
    border: 0;
    color: #5b6680;
    font-weight: 900;
    margin-right: 0.35rem;
  }

.product-row {
  cursor: pointer;
}

  .product-row:hover,
  .product-row.selected {
    background: var(--blue-soft);
  }

    .product-row.selected td:first-child {
      box-shadow: inset 4px 0 0 var(--blue);
    }

.authorized-pill,
.days-pill {
  border-radius: 0.5rem;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 2.125rem;
  padding: 0.2rem 0.45rem;
}

.authorized-pill {
  background: #d9f4dc;
  color: var(--green);
}

.days-pill.low {
  background: var(--green-soft);
  color: var(--green);
}

.days-pill.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.days-pill.high {
  background: var(--red-soft);
  color: var(--red);
}

.audit-side-panel {
  align-self: start;
  display: grid;
  gap: 0.65rem;
  height: fit-content;
  position: sticky;
  top: 5.5rem;
}

  .audit-side-panel > section {
    padding: 0.9rem;
  }

  .audit-side-panel h2 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

.selected-audit-card dl {
  display: grid;
  gap: 0.8rem;
  margin: 0 0 1rem;
}

.selected-audit-card dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.selected-audit-card dd {
  font-size: 0.82rem;
  font-weight: 900;
  margin: 0.15rem 0 0;
}

.summary-metrics {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, 1fr);
}

  .summary-metrics span {
    color: var(--muted);
    display: grid;
    font-size: 0.68rem;
    gap: 0.25rem;
    text-align: center;
  }

  .summary-metrics strong {
    color: var(--navy);
    font-size: 1rem;
  }

.audit-feedback-card {
  display: grid;
  gap: 0.95rem;
}

.audit-readonly-card {
  gap: 1rem;
}

.audit-readonly-card h2 {
  margin-bottom: 0.2rem;
}

.audit-feedback-details {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

  .audit-feedback-details > div {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    display: grid;
    gap: 0.28rem;
    padding: 0.75rem 0.85rem;
  }

  .audit-feedback-details dt {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
  }

  .audit-feedback-details dd {
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 0;
  }

.audit-readonly-section {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
}

  .audit-readonly-section strong {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .audit-readonly-section p {
    color: var(--navy);
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
  }

.audit-feedback-list {
  color: var(--navy);
  display: grid;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding-left: 0;
}

  .audit-feedback-list li {
    align-items: start;
    display: flex;
    gap: 0.55rem;
    line-height: 1.45;
  }

    .audit-feedback-list li::before {
      background: var(--blue);
      border-radius: 999px;
      content: "";
      height: 0.42rem;
      margin-top: 0.45rem;
      flex: 0 0 0.42rem;
      width: 0.42rem;
    }

.audit-action {
  align-items: center;
  display: flex;
  font-size: 0.94rem;
  gap: 0.65rem;
}

  .audit-action input {
    height: 1.125rem;
    width: 1.125rem;
  }

.audit-comments textarea {
  min-height: 5.75rem;
}

#blazor-error-ui {
  background: #fff4ce;
  bottom: 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  display: none;
  left: 0;
  padding: 0.8rem 1rem;
  position: fixed;
  right: 0;
  z-index: 1000;
}

  #blazor-error-ui .dismiss {
    background: transparent;
    border: 0;
    float: right;
  }

.loading-shell {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  inset: 0;
  justify-content: center;
  position: fixed;
}

.loading-mark {
  align-items: center;
  animation: pulse 1.2s ease-in-out infinite;
  background: var(--navy);
  border-radius: 1.125rem;
  color: #ffffff;
  display: flex;
  font-weight: 900;
  height: 3.75rem;
  justify-content: center;
  width: 3.75rem;
}

.loading-shell p {
  color: var(--muted);
}

@keyframes pulse {
  50% {
    opacity: 0.65;
    transform: scale(0.96);
  }
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: minmax(13.75rem, 0.7fr) minmax(22.5rem, 1.3fr);
  }

  .feedback-column {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .feedback-form {
    grid-template-columns: 1fr 1fr;
  }

  .comment-field,
  .form-actions,
  .save-note {
    grid-column: 1 / -1;
  }

  .audit-board {
    grid-template-columns: minmax(0, 1.55fr) minmax(18.75rem, 0.95fr);
  }

  .audit-toolbar {
    align-items: start;
  }

  .audit-search-field {
    flex-basis: 18rem;
  }

  .audit-field select {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    position: static;
  }

  .module-nav {
    order: 3;
    overflow-x: auto;
    width: 100%;
  }

  .header-status {
    gap: 0.45rem;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
  }

  .metric {
    display: none;
  }

  .intro-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .workbench {
    grid-template-columns: 1fr;
  }

  .store-column,
  .recommendation-column,
  .feedback-column {
    min-height: auto;
  }

  .store-list {
    display: none;
  }

  .mobile-store-picker {
    color: var(--muted);
    display: grid;
    font-size: 0.75rem;
    font-weight: 800;
    gap: 0.4rem;
  }

    .mobile-store-picker select {
      background: #ffffff;
      border: 1px solid #bbc5d5;
      border-radius: 0.75rem;
      min-height: 3rem;
      padding: 0 0.7rem;
      width: 100%;
    }

  .recommendation-list {
    max-height: none;
  }

  .conflict-card {
    align-items: stretch;
    flex-direction: column;
  }

  .module-title-panel,
  .audit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-board {
    grid-template-columns: 1fr;
  }

  .audit-side-panel {
    position: static;
    top: auto;
  }

  .audit-filters {
    flex-direction: column;
    width: 100%;
  }

  .audit-field,
  .audit-field select,
  .search-input-wrap,
  .audit-toolbar-actions,
  .last-updated {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .audit-toolbar-actions {
    justify-content: space-between;
    padding-bottom: 0;
  }

  .last-updated {
    margin-left: 0;
  }

  .summary-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  .connection-pill {
    font-size: 0.7rem;
  }

  .module-nav a {
    font-size: 0.72rem;
    padding: 0.45rem 0.65rem;
  }

  .sync-button.compact {
    font-size: 0.72rem;
  }

  .workspace {
    padding: 0.75rem 0.65rem 2rem;
  }

  .intro-panel {
    border-radius: 1.125rem;
    padding: 1.4rem;
  }

    .intro-panel h1 {
      font-size: 2rem;
    }

  .status-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .store-column,
  .recommendation-column,
  .feedback-column,
  .conflict-panel {
    border-radius: 1rem;
    padding: 0.9rem;
  }

  .recommendation-card {
    grid-template-columns: auto 1fr;
  }

  .sync-chip {
    grid-column: 2;
    justify-self: start;
  }

  .recommendation-topline {
    display: grid;
  }

    .recommendation-topline small {
      justify-self: start;
    }

  .feedback-form {
    grid-template-columns: 1fr;
  }

  .module-title-panel,
  .audit-list-panel,
  .audit-side-panel > section {
    border-radius: 1rem;
    padding: 0.85rem;
  }

  .audit-products-grid-table .audit-col-product {
    min-width: 16.25rem;
  }

  .audit-table th,
  .audit-table td {
    font-size: 0.74rem;
    padding: 0.6rem 0.62rem;
  }
}
