:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #162033;
  --muted: #667085;
  --border: #d8e0ea;
  --primary: #1d5fd1;
  --primary-dark: #164ca7;
  --success: #168a4a;
  --success-bg: #e8f7ef;
  --danger: #c3312b;
  --danger-bg: #fdebea;
  --warning: #b86e00;
  --warning-bg: #fff4df;
  --shadow: 0 16px 40px rgba(20, 35, 64, 0.08);
}

.review-decision-modal,
.candidate-select-modal {
  width: min(680px, calc(100vw - 32px));
}

.candidate-select-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  margin: 16px 0;
}

.candidate-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-color, #d7dce3);
  border-radius: 10px;
  background: var(--surface-muted, #f7f8fa);
}

.candidate-option.is-selected {
  border-color: var(--accent, #2f6fed);
  box-shadow: inset 3px 0 0 var(--accent, #2f6fed);
}

.candidate-option-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.candidate-option-main strong,
.candidate-option-main span {
  overflow-wrap: anywhere;
}

.candidate-option-meta {
  color: var(--text-muted, #667085);
  font-size: 0.86rem;
}

.review-status-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: var(--text-muted, #667085);
  font-size: 0.86rem;
}

.review-status-line strong {
  color: var(--text, #202631);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.is-hidden {
  display: none !important;
}

.login-screen {
  width: 100vw;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42.6% 57.4%;
  overflow: hidden;
  background: #fff;
}

.login-brand-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: start;
  padding: 0 9vw;
  background: #eaf7f8;
}

.login-brand-content {
  position: relative;
  z-index: 2;
  align-self: center;
  transform: translateY(-38px);
}

.login-brand-logo {
  width: min(475px, 86%);
  height: 150px;
  display: block;
  margin-bottom: 44px;
  object-fit: contain;
  object-position: left center;
}

.login-brand-content h1 {
  margin-bottom: 18px;
  color: #17283b;
  font-size: 46px;
  line-height: 1.05;
  font-weight: 800;
}

.login-accent-line {
  width: 78px;
  height: 3px;
  margin-bottom: 28px;
  background: #66bfd7;
}

.login-brand-content p {
  margin-bottom: 0;
  color: #6f7e8e;
  font-size: 22px;
  line-height: 1.45;
}

.login-wave {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -12%;
  height: 34%;
  border-radius: 50% 50% 0 0;
  background: rgba(213, 244, 247, 0.78);
  transform: rotate(2deg);
}

.wave-two {
  bottom: -22%;
  height: 36%;
  background: rgba(199, 238, 242, 0.58);
  transform: rotate(-4deg);
}

.login-form-panel {
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #fff;
}

.login-card {
  width: min(556px, 100%);
  display: grid;
  gap: 26px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.login-heading h2 {
  margin-bottom: 14px;
  color: #243444;
  font-size: 46px;
  line-height: 1.05;
  font-weight: 800;
}

.login-heading p {
  margin-bottom: 0;
  color: #6f7e8e;
  font-size: 20px;
}

.login-divider {
  height: 1px;
  background: #ddecf0;
}

.login-divider.bottom {
  margin-top: 10px;
}

.login-field {
  gap: 8px;
  color: #243444;
  font-size: 16px;
  font-weight: 800;
}

.input-shell {
  position: relative;
  display: block;
}

.input-shell > svg,
.password-eye svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #6f7e8e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-shell > svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-shell input {
  min-height: 60px;
  border-color: #ddecf0;
  border-radius: 8px;
  padding: 12px 58px 12px 72px;
  color: #243444;
  font-size: 17px;
}

.input-shell input::placeholder {
  color: #9aa8b8;
}

.input-shell input:focus {
  outline: none;
  border-color: #66bfd7;
  box-shadow: 0 0 0 3px rgba(102, 191, 215, 0.16);
}

.password-eye {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateY(-50%);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.remember-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 12px;
  color: #415167;
  font-size: 16px;
  font-weight: 600;
}

.remember-row input {
  width: 24px;
  min-height: 24px;
  accent-color: #5aafd0;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #5aafd0;
  font-size: 16px;
  font-weight: 700;
}

.primary-button.login-submit {
  min-height: 60px;
  width: 100%;
  border-color: #5aafd0;
  border-radius: 8px;
  background: #5aafd0;
  font-size: 18px;
}

.primary-button.login-submit:hover {
  border-color: #4ea5c5;
  background: #4ea5c5;
}

.login-message {
  min-height: 18px;
  margin-top: 0;
}

.login-footer {
  color: #6f7e8e;
  font-size: 16px;
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  background: #0f1b2d;
  color: #fff;
}

.brand {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo {
  width: 145px;
  height: auto;
  max-height: 58px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
}

.brand-subtitle {
  margin-top: 3px;
  color: #aebbd0;
  font-size: 13px;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-item[data-workspace-nav] {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 0 14px;
  background: #17263a;
  box-shadow: 0 2px 5px rgba(4, 10, 20, 0.18);
  color: #f3f7fc;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 170ms ease, border-color 170ms ease, box-shadow 170ms ease, color 170ms ease, transform 170ms ease;
}

.nav-item[data-workspace-nav]:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #20364f;
  box-shadow: 0 4px 9px rgba(4, 10, 20, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.nav-item[data-workspace-nav]:active {
  background: #112033;
  box-shadow: 0 1px 3px rgba(4, 10, 20, 0.2);
  transform: translateY(0);
}

.nav-item[data-workspace-nav].active {
  border-color: rgba(126, 207, 231, 0.38);
  background: #214861;
  box-shadow: inset 3px 0 0 #79d0e8, 0 4px 10px rgba(4, 10, 20, 0.24);
  color: #fff;
}

.nav-item[data-workspace-nav].active:hover {
  background: #28556f;
}

.nav-item[data-workspace-nav]:focus-visible {
  outline: 2px solid #9bdcef;
  outline-offset: 3px;
}

.nav-item.disabled {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 11px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(203, 213, 225, 0.58);
  cursor: not-allowed;
  opacity: 0.78;
}

.admin-panel-nav-link {
  min-height: 44px;
  border: 1px solid rgba(121, 208, 232, 0.42);
  border-radius: 11px;
  margin-top: 4px;
  padding: 0 14px;
  background: rgba(121, 208, 232, 0.06);
  color: #d8f3fb;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.admin-panel-nav-link:hover {
  border-color: rgba(121, 208, 232, 0.68);
  background: rgba(121, 208, 232, 0.14);
  color: #fff;
  transform: translateY(-1px);
}

.admin-panel-nav-link:active {
  background: rgba(121, 208, 232, 0.08);
  transform: translateY(0);
}

.admin-panel-nav-link:focus-visible {
  outline: 2px solid #9bdcef;
  outline-offset: 3px;
}

.soon-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(226, 232, 240, 0.86);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-user {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user .ghost-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 0 14px;
  background: #17263a;
  box-shadow: 0 2px 5px rgba(4, 10, 20, 0.18);
  color: #f3f7fc;
  cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, box-shadow 170ms ease, color 170ms ease, transform 170ms ease;
}

.sidebar-user .ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #20364f;
  box-shadow: 0 4px 9px rgba(4, 10, 20, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.sidebar-user .ghost-button:active {
  background: #112033;
  box-shadow: 0 1px 3px rgba(4, 10, 20, 0.2);
  transform: translateY(0);
}

.sidebar-user .ghost-button:focus-visible {
  outline: 2px solid #9bdcef;
  outline-offset: 3px;
}

.user-name {
  font-weight: 700;
}

.user-role {
  margin-top: 3px;
  color: #aebbd0;
  font-size: 13px;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 40px;
}

.project-header,
.auth-panel,
.current-project-card,
.project-events-card,
.project-files-card,
.projects-panel,
.project-create-card,
.upload-card,
.search-card,
.stat-card,
.table-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  background: var(--surface);
}

.project-header > div:first-child {
  min-width: 0;
}

.current-project-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.current-project-card,
.project-events-card {
  padding: 20px;
}

.current-project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-metrics div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}

.project-metrics .wide {
  grid-column: span 4;
}

.project-metrics span,
.next-step-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-metrics strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.next-step-box {
  margin-top: 14px;
  border: 1px solid rgba(90, 175, 208, 0.35);
  border-radius: 8px;
  padding: 14px;
  background: #eef9fc;
}

.project-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid #f0c7c7;
  border-radius: 10px;
  padding: 14px;
  background: #fffafa;
}

.project-danger-zone span {
  display: block;
  margin-bottom: 4px;
  color: #9f4242;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-danger-zone p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.delete-project-modal {
  width: min(520px, calc(100vw - 32px));
}

.quote-readiness-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid #d7b96f;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff9e9;
}

.quote-readiness-card.is-hidden {
  display: none;
}

.quote-readiness-card.ready {
  border-color: #9bc9aa;
  background: #f1faf4;
}

.quote-readiness-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quote-readiness-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-readiness-copy strong {
  font-size: 18px;
}

.quote-readiness-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.quote-readiness-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quote-readiness-actions .is-hidden {
  display: none;
}

.next-step-box strong {
  color: var(--text);
}

.project-events-card {
  min-height: 260px;
}

.project-events-list {
  display: grid;
  gap: 12px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.project-event-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}

.project-event-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.project-event-dot.error {
  background: var(--danger);
}

.project-event-dot.prices_searched,
.project-event-dot.excel_exported,
.project-event-dot.price_verified,
.project-event-dot.prices_bulk_verified {
  background: var(--success);
}

.project-event-dot.file_uploaded,
.project-event-dot.items_processed {
  background: var(--warning);
}

.project-event-body {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.project-event-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-event-head strong {
  font-size: 14px;
}

.project-event-head span {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.project-event-body p {
  margin: 5px 0 8px;
  font-size: 13px;
}

.event-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #edf2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.events-empty {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #f8fbfd;
}

.project-files-card {
  margin-top: 16px;
  padding: 20px;
}

.project-files-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.project-files-table-wrap {
  overflow-x: auto;
}

.project-files-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.project-files-table th,
.project-files-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.project-files-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.project-files-table td strong {
  display: block;
  overflow-wrap: anywhere;
}

.project-files-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.current-file-row {
  background: #f2fbfd;
}

.current-file-badge,
.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.current-file-badge {
  background: #e7f8ef;
  color: var(--success);
}

.file-status.success {
  background: var(--success-bg);
  color: var(--success);
}

.file-status.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.file-status.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.files-empty {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: #f8fbfd;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 26px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

p {
  color: var(--muted);
}

.header-meta,
.header-actions,
.card-actions,
.export-actions,
.progress-meta,
.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-meta {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.header-search-indicator {
  display: grid;
  grid-template-columns: minmax(0, auto) 72px;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 620px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #f8fbfd;
}

.header-search-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.header-search-copy strong,
.header-search-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search-copy strong {
  flex: none;
  color: var(--text);
  font-size: 12px;
}

.header-search-copy span {
  color: var(--muted);
  font-size: 12px;
}

.header-search-progress {
  overflow: hidden;
  width: 72px;
  height: 5px;
  border-radius: 999px;
  background: #dce7ed;
}

.header-search-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.header-search-indicator.completed .header-search-progress span {
  background: var(--success);
}

.header-search-indicator.failed {
  border-color: rgba(201, 76, 76, 0.35);
  background: #fff6f6;
}

.header-search-indicator.failed .header-search-progress span {
  background: var(--danger);
}

.project-id-chip {
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  align-self: flex-start;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 38px;
  border-radius: 7px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.secondary-button:hover {
  background: var(--surface-soft);
}

.low-emphasis {
  color: var(--muted);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
}

.icon-button {
  width: 42px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.auth-panel {
  margin-top: 18px;
  padding: 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto;
  align-items: end;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.auth-actions,
.project-form {
  display: flex;
  gap: 10px;
}

.projects-panel {
  margin-top: 18px;
  padding: 18px;
}

.archive-projects-panel {
  margin-top: 18px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  padding: 18px;
  background: #f8f9fb;
}

.archive-projects-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.archive-projects-header h2,
.archive-projects-header p {
  margin: 0;
}

.archive-projects-header p {
  margin-top: 4px;
  color: var(--muted);
}

.archive-projects-toolbar {
  margin-bottom: 14px;
}

.archive-projects-toolbar input {
  width: min(680px, 100%);
}

.archive-projects-list-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.archive-projects-table {
  min-width: 1180px;
  table-layout: fixed;
}

.archive-projects-table th,
.archive-projects-table td {
  padding: 12px;
  vertical-align: top;
}

.archive-projects-table th:nth-child(1),
.archive-projects-table td:nth-child(1) {
  width: 92px;
}

.archive-projects-table td:nth-child(1) {
  color: #596273;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.archive-projects-table th:nth-child(2),
.archive-projects-table td:nth-child(2) {
  width: 220px;
  overflow-wrap: anywhere;
}

.archive-projects-table th:nth-child(3),
.archive-projects-table td:nth-child(3),
.archive-projects-table th:nth-child(4),
.archive-projects-table td:nth-child(4) {
  width: 145px;
  white-space: nowrap;
}

.archive-projects-table th:nth-child(5),
.archive-projects-table td:nth-child(5) {
  width: 150px;
  overflow-wrap: anywhere;
}

.archive-projects-table th:nth-child(6),
.archive-projects-table td:nth-child(6) {
  width: 250px;
}

.archive-projects-table th:nth-child(7),
.archive-projects-table td:nth-child(7) {
  width: 150px;
  text-align: right;
}

.archive-reason {
  color: #596273;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.archive-project-title {
  display: grid;
  gap: 6px;
}

.archive-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eceff3;
  color: #596273;
  font-size: 11px;
  font-weight: 900;
}

.restore-project-button,
.restore-confirm-button {
  min-height: 34px;
  border: 1px solid #9aa6b5;
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: #3d4857;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.restore-project-button:hover,
.restore-confirm-button:hover {
  border-color: #6f7c8d;
  background: #f2f4f7;
}

.restore-confirm-button {
  min-height: 40px;
  padding: 0 16px;
}

.restore-confirm-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.restore-project-modal {
  width: min(520px, calc(100vw - 32px));
}

.archive-projects-empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.projects-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.projects-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 10px;
  margin-bottom: 14px;
}

.projects-list-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.projects-table {
  min-width: 1040px;
  table-layout: fixed;
}

.projects-table th,
.projects-table td {
  padding: 12px;
}

.projects-table td:nth-child(1) {
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.projects-table th:nth-child(1),
.projects-table td:nth-child(1) {
  width: 92px;
}

.projects-table th:nth-child(2),
.projects-table td:nth-child(2) {
  width: auto;
  min-width: 220px;
  overflow-wrap: anywhere;
}

.projects-table th:nth-child(3),
.projects-table td:nth-child(3) {
  width: 135px;
  white-space: nowrap;
}

.projects-table th:nth-child(4),
.projects-table td:nth-child(4) {
  width: 155px;
}

.projects-table th:nth-child(5),
.projects-table td:nth-child(5),
.projects-table th:nth-child(6),
.projects-table td:nth-child(6) {
  width: 90px;
}

.projects-table th:nth-child(7),
.projects-table td:nth-child(7) {
  width: 270px;
  text-align: right;
}

.projects-table td:nth-child(5),
.projects-table td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.projects-table .active-project-row {
  background: #f0f6ff;
}

.projects-table .open-project-button,
.projects-table .archive-project-button,
.projects-table .project-list-delete-button,
.delete-project-button {
  min-height: 32px;
  padding: 0 12px;
  white-space: nowrap;
}

.project-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.archive-project-button,
.archive-confirm-button,
.project-list-delete-button,
.delete-project-button,
.delete-confirm-button {
  border: 1px solid #d98484;
  border-radius: 7px;
  background: #fff;
  color: #a43d3d;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.archive-project-button:hover,
.archive-confirm-button:hover,
.project-list-delete-button:hover,
.delete-project-button:hover,
.delete-confirm-button:hover {
  border-color: #bd5b5b;
  background: #fff4f4;
}

.archive-confirm-button,
.delete-confirm-button {
  min-height: 40px;
  padding: 0 16px;
}

.archive-confirm-button:disabled,
.delete-confirm-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.archive-project-modal {
  width: min(520px, calc(100vw - 32px));
}

.archive-project-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  line-height: 1.5;
}

.delete-project-number {
  margin: -6px 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.project-list-delete-button:focus-visible,
.delete-confirm-button:focus-visible {
  outline: 3px solid rgba(164, 61, 61, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .project-row-actions {
    flex-wrap: wrap;
  }
}

.projects-empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.project-create-view {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: start center;
  padding-top: 24px;
}

.project-create-card {
  width: min(880px, 100%);
  overflow: hidden;
}

.project-create-header {
  border-bottom: 1px solid var(--border);
  padding: 28px 30px 24px;
  background: #f8fbff;
}

.project-create-header h1 {
  margin: 5px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.project-create-header p,
.project-create-step p {
  margin: 0;
  color: var(--muted);
}

.project-create-form {
  padding: 6px 30px 30px;
}

.project-create-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.project-create-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-create-step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #e9f1ff;
  color: var(--primary);
  font-weight: 800;
}

.project-create-step h2 {
  margin: 3px 0 16px;
  font-size: 18px;
}

.project-create-step label:not(.project-create-drop-zone) {
  display: block;
  margin: 14px 0 7px;
  font-weight: 700;
}

.project-create-step input[type="text"],
.project-create-step input:not([type]) {
  width: 100%;
}

.project-create-step small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.project-create-drop-zone {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed #8caeea;
  border-radius: 8px;
  padding: 22px;
  background: #f8fbff;
  cursor: pointer;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.project-create-drop-zone:hover,
.project-create-drop-zone.drag-over {
  border-color: var(--primary);
  background: #edf4ff;
  transform: translateY(-1px);
}

.project-create-drop-zone:focus-within {
  outline: 2px solid #78a7f4;
  outline-offset: 3px;
}

.project-create-drop-zone input {
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  position: absolute;
}

.project-create-drop-zone strong {
  color: var(--primary);
  font-size: 16px;
}

.project-create-drop-zone span {
  color: var(--muted);
}

.project-create-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.project-create-file div {
  min-width: 0;
}

.project-create-file strong,
.project-create-file span {
  display: block;
  overflow-wrap: anywhere;
}

.project-create-file span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.field-error {
  min-height: 18px;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
}

.project-create-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--primary);
}

.project-create-file.is-hidden,
.project-create-progress.is-hidden {
  display: none;
}

.project-create-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #bfd2f4;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: project-create-spin 700ms linear infinite;
}

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

.project-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

#createProjectButton {
  min-width: 210px;
  min-height: 42px;
  white-space: nowrap;
}

[data-ui-view].is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .project-create-view {
    min-height: auto;
    padding-top: 8px;
  }

  .project-create-header,
  .project-create-form {
    padding-right: 18px;
    padding-left: 18px;
  }

  .project-create-step {
    grid-template-columns: 1fr;
  }

  .project-create-step-number {
    margin-bottom: -4px;
  }

  .project-create-file,
  .project-create-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #createProjectButton {
    width: 100%;
  }
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--muted);
}

.step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-weight: 800;
}

.step.completed {
  border-color: #b8e2ca;
  color: var(--success);
}

.step.completed span {
  background: var(--success-bg);
  color: var(--success);
}

.step.active {
  border-color: #9bbaf4;
  color: var(--primary);
}

.step.active span {
  background: #e9f1ff;
  color: var(--primary);
}

.step.failed {
  border-color: #f1aaa6;
  color: var(--danger);
}

.step.failed span {
  background: var(--danger-bg);
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
}

.upload-card,
.search-card {
  padding: 18px;
}

.upload-card {
  grid-row: span 2;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  border: 1px dashed #9bbaf4;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  text-align: center;
}

.drop-zone input {
  display: none;
}

.drop-zone.drag-over {
  border-color: var(--primary);
  background: #edf4ff;
}

.drop-zone.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #e9f1ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.file-card {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.file-card.empty {
  color: var(--muted);
}

.muted,
.file-card small,
.summary-line {
  color: var(--muted);
}

.progress-wrap {
  margin-top: 16px;
}

.progress-meta {
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.2s ease;
}

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

.stat-card {
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.stat-card.success strong {
  color: var(--success);
}

.stat-card.warning strong {
  color: var(--warning);
}

.stat-card.danger strong {
  color: var(--danger);
}

.stat-card.supplier-quote strong,
.status-supplier-quote {
  color: #12624f;
}

.status-supplier-quote {
  border-color: #9fd5c7;
  background: #e4f5ef;
}

.section-item-row td {
  background: #f0f2f5;
  color: #536173;
  font-weight: 600;
}

.supplier-quote-item-row td {
  background: #f1faf7;
}

.search-card {
  align-self: stretch;
}

.card-title-row {
  justify-content: space-between;
}

.mode-badge,
.status-badge,
.item-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 800;
}

.mode-badge.mock,
.item-status.warning,
.item-status.review {
  background: var(--warning-bg);
  color: var(--warning);
}

.mode-badge.web,
.status-badge.completed,
.item-status.success,
.item-status.found,
.item-status.verified {
  background: var(--success-bg);
  color: var(--success);
}

.search-settings-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.search-settings-panel.error {
  border-color: #f1aaa6;
  background: var(--danger-bg);
}

.search-settings-head,
.search-settings-grid,
.search-setting-row,
.supplier-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-settings-head {
  justify-content: space-between;
}

.search-settings-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

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

.search-setting-row {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.search-setting-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-setting-row strong {
  min-height: 28px;
  color: var(--text);
  font-size: 14px;
}

.fallback-badge,
.supplier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
}

.fallback-badge.enabled,
.supplier-badge.enabled {
  background: var(--success-bg);
  color: var(--success);
}

.fallback-badge.disabled,
.supplier-badge.disabled,
.supplier-badge.muted {
  background: #eef2f6;
  color: var(--muted);
}

.search-suppliers-block {
  display: grid;
  gap: 8px;
}

.search-suppliers-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplier-badges {
  flex-wrap: wrap;
}

.supplier-empty,
.search-settings-notice {
  color: var(--warning);
  font-size: 13px;
  font-weight: 700;
}

.search-settings-panel.error .search-settings-notice {
  color: var(--danger);
}

.status-badge.neutral {
  background: #eef2f6;
  color: var(--muted);
}

.status-header {
  border-color: #c8d0da;
  background: #e9edf2;
  color: #536173;
}

.status-badge.processing {
  background: #e9f1ff;
  color: var(--primary);
}

.status-badge.attention {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge.failed,
.item-status.danger,
.item-status.not-found,
.item-status.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.summary-line {
  margin-top: 12px;
  font-weight: 700;
}

.table-section {
  margin-top: 18px;
  padding: 18px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.problem-summary {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
}

.problem-summary.neutral {
  background: var(--surface-soft);
  color: var(--muted);
}

.problem-summary.warning {
  border-color: #f2d08a;
  background: var(--warning-bg);
  color: var(--warning);
}

.problem-summary.success {
  border-color: #a5d6b8;
  background: var(--success-bg);
  color: var(--success);
}

.quality-filter-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.quality-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.quality-filter:hover {
  border-color: #9bbaf4;
  background: #f8fbff;
}

.quality-filter.active {
  border-color: var(--primary);
  background: #e9f1ff;
  color: var(--primary);
}

.quality-filter strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
}

.quality-filter.active strong {
  background: var(--primary);
  color: #fff;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.price-review-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  border-block: 1px solid var(--border);
  padding: 16px 0;
}

.price-review-head,
.price-review-launch,
.price-review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.price-review-head h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.price-review-head p {
  margin: 0;
  color: var(--muted);
}

.price-review-counters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.price-review-counters span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--surface-soft);
  font-size: 13px;
}

.price-review-launch {
  justify-content: flex-start;
}

.price-review-launch button {
  white-space: nowrap;
}

.bulk-supplier-quote-warning {
  margin: 0;
  border-left: 3px solid #e3a008;
  padding: 9px 11px;
  background: #fff9e8;
  color: #5f4a14;
  line-height: 1.45;
}

.bulk-supplier-quote-warning.is-hidden,
.manual-price-field.is-hidden {
  display: none;
}

.bulk-supplier-quote-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-soft);
  cursor: pointer;
  font-weight: 700;
}

.bulk-supplier-quote-toggle input {
  flex: none;
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  accent-color: var(--primary);
}

.bulk-supplier-quote-toggle span {
  min-width: 0;
  line-height: 1.4;
}

.price-review-workspace {
  display: grid;
  gap: 10px;
}

.price-review-workspace.is-hidden,
.price-review-empty.is-hidden {
  display: none;
}

.price-review-toolbar {
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4f7fb;
}

.price-review-select-all {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.price-review-select-all input,
.review-item-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.price-review-navigation,
.price-review-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.price-review-card {
  display: grid;
  grid-template-columns: 28px minmax(240px, 1fr) minmax(130px, auto) minmax(230px, auto);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.price-review-card.is-selected {
  border-color: #9bbaf4;
  background: #f8fbff;
}

.price-review-main,
.price-review-price {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.price-review-main strong {
  overflow-wrap: anywhere;
}

.price-review-meta,
.price-review-reason {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.price-review-price strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.price-review-price span {
  color: var(--muted);
  font-size: 12px;
}

.price-review-card-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.price-review-details {
  grid-column: 2 / -1;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.price-review-empty {
  border: 1px solid #a5d6b8;
  border-radius: 8px;
  padding: 14px;
  background: var(--success-bg);
  color: var(--success);
  font-weight: 800;
  text-align: center;
}

.no-price-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  border-block: 1px solid var(--border);
  padding: 16px 0;
}

.no-price-head,
.no-price-actions,
.no-price-toolbar,
.no-price-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.no-price-head h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.no-price-head p,
.no-price-main span {
  margin: 0;
  color: var(--muted);
}

.no-price-counters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.no-price-counters span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  font-size: 13px;
}

.no-price-actions {
  justify-content: flex-start;
}

.no-price-workspace,
.no-price-list {
  display: grid;
  gap: 8px;
}

.no-price-workspace.is-hidden,
.no-price-empty.is-hidden {
  display: none;
}

.no-price-toolbar {
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4f7fb;
}

.no-price-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.no-price-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.no-price-main strong {
  overflow-wrap: anywhere;
}

.no-price-main span {
  font-size: 12px;
  line-height: 1.35;
}

.no-price-main .no-price-reason {
  color: #9a5c00;
  font-weight: 800;
}

.no-price-card-actions {
  justify-content: flex-end;
}

.no-price-card-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.no-price-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.no-price-empty {
  border: 1px solid #a5d6b8;
  border-radius: 8px;
  padding: 14px;
  background: #f4fbf6;
  color: #24643a;
  font-weight: 800;
}

.copy-fallback-modal textarea {
  min-height: 220px;
  resize: vertical;
}

.stat-card.excluded {
  border-color: #c5cad3;
  background: #f4f5f7;
}

.status-excluded {
  color: #404651;
  background: #e7e9ed;
  border-color: #c5cad3;
}

.exclude-item-button,
.restore-excluded-button,
.exclude-confirm-button {
  min-height: 36px;
  border: 1px solid #aeb4bf;
  border-radius: 8px;
  padding: 7px 12px;
  background: #edf0f4;
  color: #303641;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.exclude-item-button:hover,
.restore-excluded-button:hover,
.exclude-confirm-button:hover {
  border-color: #858d9a;
  background: #dfe3e9;
  transform: translateY(-1px);
}

.exclude-item-button:active,
.restore-excluded-button:active,
.exclude-confirm-button:active {
  transform: translateY(0);
}

.exclude-item-button:focus-visible,
.restore-excluded-button:focus-visible,
.exclude-confirm-button:focus-visible {
  outline: 3px solid rgba(70, 78, 92, 0.22);
  outline-offset: 2px;
}

.exclude-item-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.action-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #454e5b;
  border-radius: 10px;
  background: #202731;
  color: #f8fafc;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
}

.action-toast.error {
  border-color: #b65d5d;
}

.action-toast-button {
  flex: 0 0 auto;
  border: 1px solid #7f8b9b;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.action-toast-button:hover {
  background: #343e4b;
}

.action-toast-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.32);
  outline-offset: 2px;
}

.action-toast-button:disabled {
  cursor: default;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .action-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: space-between;
  }
}

@media (max-width: 980px) {
  .price-review-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .price-review-price,
  .price-review-card-actions,
  .price-review-details {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .price-review-head,
  .price-review-toolbar {
    align-items: stretch;
  }

  .price-review-navigation,
  .price-review-navigation button,
  .price-review-launch button {
    width: 100%;
  }

  .no-price-head,
  .no-price-toolbar {
    align-items: stretch;
  }

  .no-price-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .no-price-actions button,
  .no-price-card-actions,
  .no-price-card-actions button,
  .no-price-toolbar button {
    width: 100%;
  }

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

  .quote-readiness-actions,
  .quote-readiness-actions button {
    width: 100%;
  }
}

.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid #9bbaf4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbff;
}

.bulk-action-bar.is-hidden {
  display: none;
}

.bulk-action-bar strong {
  color: var(--text);
  font-size: 14px;
}

.bulk-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1700px;
  border-collapse: collapse;
  background: #fff;
}

.items-table {
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6fa;
  color: #344054;
  font-size: 12px;
  line-height: 1.35;
  text-transform: uppercase;
}

.items-table th:nth-child(1),
.items-table td:nth-child(1) {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
}

.items-table th:nth-child(3),
.items-table td:nth-child(3) {
  width: 360px;
  min-width: 300px;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.items-table th:nth-child(4),
.items-table td:nth-child(4) {
  min-width: 120px;
}

.items-table th:nth-child(5),
.items-table td:nth-child(5) {
  min-width: 92px;
}

.items-table th:nth-child(6),
.items-table td:nth-child(6) {
  min-width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.items-table th:nth-child(7),
.items-table td:nth-child(7) {
  min-width: 150px;
}

.items-table th:nth-child(8),
.items-table td:nth-child(8) {
  min-width: 150px;
}

.items-table th:nth-child(9),
.items-table td:nth-child(9) {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 142px;
  min-width: 142px;
  max-width: 142px;
  border-left: 1px solid var(--border);
  background: #fff;
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08);
}

.items-table th:nth-child(9) {
  z-index: 4;
  background: #f3f6fa;
}

.row-select-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.select-column input,
.row-select-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.row-select-label input:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.items-table tr.selected-item-row td {
  background: #f8fbff;
}

.items-table tr.selected-item-row td:nth-child(9) {
  background: #f8fbff;
}

.items-table .item-details-row td {
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  text-align: left;
  background: #f8fafc;
}

.price-status-cell,
.quality-cell,
.confidence-cell {
  display: grid;
  gap: 6px;
}

.price-status-cell small,
.quality-cell small,
.reason-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quality-tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.quality-tag.mock {
  background: var(--warning-bg);
  color: var(--warning);
}

.confidence-cell span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.confidence-bar {
  width: 96px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

.confidence-bar div {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.reason-text {
  display: block;
  max-width: 320px;
  max-height: 3.3em;
  overflow: hidden;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.items-filter-empty {
  display: grid;
  min-height: 86px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.item-actions {
  display: grid;
  gap: 7px;
  min-width: 104px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.status-verified,
.status-found {
  border-color: #a7dfbf;
  background: #e8f7ee;
  color: #17633a;
}

.status-review {
  border-color: #f1d28d;
  background: #fff6df;
  color: #875b00;
}

.status-missing,
.status-error {
  border-color: #efb0b0;
  background: #fff0f0;
  color: #9b2525;
}

.status-demo {
  border-color: #b8c7df;
  background: #eef3fa;
  color: #38516f;
}

.compact-supplier-diagnostic {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.supplier-diagnostic-indicator {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #b7c4d8;
  border-radius: 50%;
  color: #52657e;
  cursor: help;
  font-size: 11px;
  font-weight: 900;
}

.row-details-toggle {
  width: 100%;
  border: 1px solid #c5cfdd;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.row-details-toggle:hover {
  background: #f2f5f9;
}

.row-details-toggle:focus-visible {
  outline: 3px solid rgba(36, 99, 235, 0.25);
  outline-offset: 2px;
}

.item-details-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 22px;
  padding: 18px 22px;
  border-top: 1px solid #dfe5ed;
  border-bottom: 1px solid #dfe5ed;
}

.item-details-panel > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.item-details-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.item-details-panel strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.item-details-panel a {
  color: var(--primary);
  font-weight: 800;
}

.manual-price-button,
.verify-price-button {
  border: 1px solid #9bbaf4;
  border-radius: 8px;
  width: 100%;
  padding: 7px 8px;
  background: #f8fbff;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.manual-price-button:hover,
.verify-price-button:hover {
  background: #e9f1ff;
}

.verify-price-button {
  border-color: #9fd6b8;
  background: var(--success-bg);
  color: var(--success);
}

.verify-price-button:hover {
  background: #d9f2e4;
}

.verified-badge,
.verified-action-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 900;
}

.verified-action-badge {
  padding: 7px 10px;
  font-size: 13px;
  justify-content: center;
}

/* Search diagnostics */
.diagnostics-card {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #d7e1ec;
}

.diagnostics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diagnostics-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.diagnostics-refresh-button {
  min-height: 36px;
  padding: 0 13px;
  white-space: nowrap;
}

.diagnostics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.diagnostics-summary > span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background: #f7fafc;
}

.diagnostics-summary small,
.diagnostics-summary strong {
  display: block;
}

.diagnostics-summary small {
  color: #637286;
  font-size: 11px;
}

.diagnostics-summary strong {
  margin-top: 2px;
  color: #17263a;
  font-size: 15px;
}

.supplier-status-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.supplier-status-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) auto minmax(100px, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #e5ebf2;
}

.supplier-status-row strong,
.supplier-status-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-status-row small {
  color: #66768a;
  text-align: right;
}

.supplier-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-status-pill.status-success {
  border-color: #9bcbb3;
  background: #eaf7f0;
  color: #216b48;
}

.supplier-status-pill.status-warning {
  border-color: #e4c37b;
  background: #fff8e5;
  color: #875e12;
}

.supplier-status-pill.status-error {
  border-color: #dda2a2;
  background: #fff0f0;
  color: #963f3f;
}

.supplier-status-pill.status-muted {
  border-color: #c8d3df;
  background: #f0f3f7;
  color: #647184;
}

.diagnostics-empty {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px dashed #c8d6e4;
  border-radius: 8px;
  background: #f8fafc;
  color: #68778a;
}

.diagnostics-empty.error {
  border-color: #dda2a2;
  background: #fff7f7;
  color: #963f3f;
}

.item-diagnostic-short {
  display: -webkit-box;
  max-width: 250px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .diagnostics-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .supplier-status-row {
    grid-template-columns: 1fr auto;
  }

  .supplier-status-row small {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Shared command-button language. Component sizing remains locally scoped. */
.primary-button,
.secondary-button,
.icon-button,
.archive-project-button,
.archive-confirm-button,
.delete-project-button,
.delete-confirm-button,
.restore-project-button,
.restore-confirm-button,
.manual-price-button,
.verify-price-button,
.quality-filter {
  border-radius: 10px;
  transition: background-color 170ms ease, border-color 170ms ease, box-shadow 170ms ease, color 170ms ease, transform 170ms ease;
}

.primary-button {
  min-height: 40px;
  border-color: #1d5fd1;
  background: #1d5fd1;
  box-shadow: 0 2px 6px rgba(29, 95, 209, 0.2);
  color: #fff;
}

.primary-button:hover {
  border-color: #2c70dc;
  background: #2c70dc;
  box-shadow: 0 5px 12px rgba(29, 95, 209, 0.25);
  transform: translateY(-1px);
}

.primary-button:active {
  border-color: #164ca7;
  background: #164ca7;
  box-shadow: 0 1px 3px rgba(29, 95, 209, 0.18);
  transform: translateY(0);
}

.secondary-button,
.restore-project-button,
.restore-confirm-button,
.manual-price-button {
  border-color: #9bbaf4;
  background: #f8fbff;
  color: #1d5fd1;
}

.secondary-button:hover,
.restore-project-button:hover,
.restore-confirm-button:hover,
.manual-price-button:hover {
  border-color: #6f9be9;
  background: #e9f1ff;
  color: #164ca7;
  transform: translateY(-1px);
}

.secondary-button:active,
.restore-project-button:active,
.restore-confirm-button:active,
.manual-price-button:active {
  background: #dce9ff;
  transform: translateY(0);
}

.secondary-button.low-emphasis {
  border-color: #c8d5e5;
  background: #f4f7fb;
  color: #5d6b7e;
}

.archive-project-button,
.archive-confirm-button,
.delete-project-button,
.delete-confirm-button {
  border-color: #d58c8c;
  background: #fff7f7;
  color: #9f4242;
}

.archive-project-button:hover,
.archive-confirm-button:hover,
.delete-project-button:hover,
.delete-confirm-button:hover {
  border-color: #bf6d6d;
  background: #ffeded;
  color: #8d3434;
  transform: translateY(-1px);
}

.archive-project-button:active,
.archive-confirm-button:active,
.delete-project-button:active,
.delete-confirm-button:active {
  background: #f8dede;
  transform: translateY(0);
}

.verify-price-button {
  border-color: #8bcba8;
  background: #e8f7ef;
  color: #168a4a;
}

.verify-price-button:hover {
  border-color: #65b78a;
  background: #d9f2e4;
  transform: translateY(-1px);
}

.verify-price-button:active {
  background: #caead8;
  transform: translateY(0);
}

.quality-filter:active,
.icon-button:active {
  transform: translateY(0);
}

.icon-button:hover {
  border-color: #9bbaf4;
  background: #eef5ff;
  color: #1d5fd1;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.archive-project-button:focus-visible,
.archive-confirm-button:focus-visible,
.delete-project-button:focus-visible,
.delete-confirm-button:focus-visible,
.restore-project-button:focus-visible,
.restore-confirm-button:focus-visible,
.manual-price-button:focus-visible,
.verify-price-button:focus-visible,
.quality-filter:focus-visible {
  outline: 2px solid #72c9e4;
  outline-offset: 3px;
}

.primary-button:disabled,
.secondary-button:disabled,
.archive-project-button:disabled,
.archive-confirm-button:disabled,
.delete-project-button:disabled,
.delete-confirm-button:disabled,
.restore-project-button:disabled,
.restore-confirm-button:disabled,
.manual-price-button:disabled,
.verify-price-button:disabled {
  border-color: #d2dce8;
  background: #e8eef5;
  box-shadow: none;
  color: #7b8797;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.modal-backdrop.is-hidden {
  display: none;
}

.passport-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.36);
}

.passport-backdrop.is-hidden { display: none; }

.passport-drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(600px, calc(100vw - 48px));
  height: 100%;
  border-left: 1px solid var(--border);
  background: var(--surface);
  box-shadow: -16px 0 44px rgba(15, 23, 42, 0.16);
}

.passport-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
}

.passport-drawer-head h2 { margin: 2px 0 0; font-size: 23px; }
.passport-drawer-content { overflow-y: auto; padding: 18px 22px 28px; background: #f6fafb; }
.passport-section { margin-bottom: 14px; border: 1px solid #ddecef; border-radius: 8px; padding: 16px; background: #fff; }
.passport-section h3 { margin: 0 0 12px; color: #17233a; font-size: 16px; }
.passport-item-name { display: block; margin-bottom: 12px; overflow-wrap: anywhere; font-size: 17px; line-height: 1.45; }
.passport-facts { display: grid; gap: 10px; margin: 0; }
.passport-facts div { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr); gap: 12px; }
.passport-facts dt { color: #6f7e8e; font-size: 12px; font-weight: 800; }
.passport-facts dd { margin: 0; overflow-wrap: anywhere; color: #17233a; font-size: 13px; }
.passport-price-card { border-color: #bde4df; background: #eaf8f3; }
.passport-price-card > span { color: #507068; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.passport-price-card > strong { display: block; margin: 6px 0 4px; color: #17233a; font-size: 30px; line-height: 1.1; }
.passport-price-card p { margin: 0; color: #48645e; font-weight: 700; }
.passport-warning { margin-top: 10px; border: 1px solid #f1d28e; border-radius: 8px; padding: 10px 12px; background: #fff8e7; color: #765718; font-size: 13px; }
.passport-evidence { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.passport-evidence li { position: relative; padding-left: 25px; line-height: 1.4; }
.passport-evidence li::before { position: absolute; left: 0; content: "✓"; color: #27866e; font-weight: 900; }
.passport-evidence li.is-warning::before { content: "!"; color: #a66b00; }
.passport-candidate-list { display: grid; gap: 10px; }
.passport-candidate { min-width: 0; border: 1px solid #ddecef; border-radius: 8px; padding: 13px; background: #fff; }
.passport-candidate.is-selected { border-color: #8ccac0; background: #f2fbf8; }
.passport-candidate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.passport-candidate-head div { min-width: 0; }
.passport-candidate-head span { display: block; color: #6f7e8e; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.passport-candidate-head strong { overflow-wrap: anywhere; }
.passport-candidate p { margin: 8px 0 0; overflow-wrap: anywhere; color: #56687a; font-size: 12px; }
.passport-candidate a { display: inline-block; margin-top: 10px; color: var(--primary); font-size: 13px; font-weight: 800; text-decoration: none; }
.passport-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.passport-badges span { border-radius: 999px; padding: 4px 8px; background: #eaf7f8; color: #356b73; font-size: 11px; font-weight: 800; }
.passport-badges .is-warning { background: #fff1d6; color: #855b0b; }
.passport-diagnostic-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #56687a; font-size: 13px; }
.passport-history { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.passport-history li { display: grid; gap: 2px; border-left: 2px solid #9ed9df; padding-left: 12px; }
.passport-history time, .passport-history li span, .passport-history-note, .passport-empty { color: #6f7e8e; font-size: 12px; }
.passport-history-note { margin: 12px 0 0; }
.passport-empty { margin: 0; }
.passport-loading, .passport-error { display: grid; justify-items: center; gap: 10px; min-height: 240px; align-content: center; text-align: center; }
.passport-loading span:last-child { color: #6f7e8e; font-size: 13px; }
.passport-spinner { width: 30px; height: 30px; border: 3px solid #d9ecf0; border-top-color: #5aafd0; border-radius: 50%; animation: passport-spin .8s linear infinite; }
@keyframes passport-spin { to { transform: rotate(360deg); } }
.passport-open-button { border: 1px solid #b8dce5; border-radius: 8px; padding: 7px 10px; background: #eaf7f8; color: #245f70; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.passport-open-button:hover { border-color: #5aafd0; background: #dff3f6; }
.passport-open-button:focus-visible, .passport-drawer-panel a:focus-visible { outline: 2px solid #72c9e4; outline-offset: 3px; }
body.passport-open { overflow: hidden; }

@media (max-width: 720px) {
  .passport-drawer-panel { width: min(100%, 560px); }
  .passport-drawer-head { padding: 16px; }
  .passport-drawer-content { padding: 14px; }
  .passport-facts div { grid-template-columns: 1fr; gap: 3px; }
  .passport-candidate-head { flex-direction: column; }
}

.manual-price-modal {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.help-modal-backdrop {
  z-index: 60;
}

.help-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.help-modal-head {
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}

.help-modal-head h2 {
  margin-bottom: 0;
}

.help-modal-content {
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 18px 20px;
}

.help-section {
  min-width: 0;
}

.help-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.help-section p {
  margin: 8px 0;
  line-height: 1.5;
}

.help-list {
  margin: 0;
  padding-left: 22px;
}

.help-visual-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-list li {
  padding-left: 3px;
  line-height: 1.45;
}

.help-step-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.help-step-copy {
  padding: 12px 14px;
}

.help-step-copy span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-step-copy h4 {
  margin: 3px 0 4px;
  font-size: 15px;
}

.help-step-copy p {
  margin: 0;
  font-size: 13px;
}

.help-step-card img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--border);
  background: #f8fbfd;
}

.help-list {
  display: grid;
  gap: 6px;
}

.help-important {
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f5f9ff;
}

.help-template-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f5f9ff;
}

.help-template-box > div {
  min-width: 0;
}

.help-template-box p {
  margin: 4px 0 0;
}

.help-template-download {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.help-modal-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}

@media (max-width: 720px) {
  .help-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .help-modal {
    max-height: calc(100vh - 24px);
  }

  .help-modal-head,
  .help-modal-content,
  .help-modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .help-visual-steps {
    grid-template-columns: 1fr;
  }

  .help-template-box {
    align-items: stretch;
    flex-direction: column;
  }
}

.manual-price-head,
.manual-price-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.manual-price-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.manual-price-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.manual-price-field {
  display: grid;
  gap: 6px;
}

.manual-price-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-price-field input,
.manual-price-field select,
.manual-price-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.manual-price-field textarea {
  resize: vertical;
}

.manual-price-actions {
  align-items: center;
  justify-content: flex-end;
}

.source-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.source-cell a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.source-cell a:hover {
  text-decoration: underline;
}

tbody tr:hover {
  background: #f8fbff;
}

.inline-message {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.inline-message.error {
  color: var(--danger);
}

@media (max-width: 1360px) {
  .current-project-panel {
    grid-template-columns: 1fr;
  }

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

  .upload-card {
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-user {
    margin-top: 18px;
  }

  .workspace {
    width: 100%;
    padding: 18px 16px 32px;
  }

  .project-header,
  .table-header {
    align-items: stretch;
    flex-direction: column;
  }

  .project-header {
    top: 8px;
  }

  .header-meta {
    align-items: stretch;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .header-search-indicator {
    grid-template-columns: minmax(0, 1fr) 72px;
    width: 100%;
    max-width: none;
  }

  .login-screen {
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .login-brand-panel {
    min-height: 360px;
    padding: 48px 28px 72px;
  }

  .login-brand-content {
    transform: none;
  }

  .login-brand-logo {
    width: min(390px, 88vw);
    height: 124px;
    margin-bottom: 30px;
  }

  .login-brand-content h1 {
    font-size: 38px;
  }

  .login-brand-content p {
    font-size: 18px;
  }

  .login-form-panel {
    padding: 42px 24px;
  }

  .login-heading h2 {
    font-size: 40px;
  }

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

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

  .project-metrics .wide {
    grid-column: span 2;
  }

  .quality-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-settings-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-settings-grid {
    grid-template-columns: 1fr;
  }

  .item-details-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .header-search-indicator {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .header-search-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .header-search-copy strong,
  .header-search-copy span {
    white-space: normal;
  }

  .header-search-progress {
    width: 100%;
  }

  .login-brand-panel {
    min-height: 310px;
  }

  .login-card {
    gap: 22px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-shell input {
    min-height: 56px;
    padding-left: 58px;
  }

  .input-shell > svg {
    left: 17px;
  }

  .project-metrics {
    grid-template-columns: 1fr;
  }

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

  .side-nav {
    grid-template-columns: 1fr;
  }

  .quality-filter-panel,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .project-metrics .wide {
    grid-column: span 1;
  }

  .item-details-panel {
    grid-template-columns: 1fr;
  }
}
.structure-review-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid #d7a839;
  border-radius: 8px;
  background: #fff9e9;
}

.structure-review-card h2,
.structure-review-card p {
  margin: 4px 0 0;
}

.structure-review-modal,
.split-item-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.structure-issue-list,
.split-item-rows {
  display: grid;
  gap: 12px;
}

.structure-issue {
  padding: 14px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.structure-issue-source {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 10px 0;
}

.structure-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.split-item-row {
  padding: 12px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f7f9fb;
}

.split-item-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 120px 110px;
  gap: 10px;
}

.split-item-fields label {
  display: grid;
  gap: 5px;
}

.split-warning {
  padding: 10px 12px;
  border-left: 4px solid #d7a839;
  background: #fff9e9;
}

@media (max-width: 760px) {
  .structure-review-card {
    align-items: stretch;
    flex-direction: column;
  }

  .structure-issue-source,
  .split-item-fields {
    grid-template-columns: 1fr;
  }
}
