:root {
  --ink: #172027;
  --muted: #66717b;
  --line: #d9e0e5;
  --paper: #f6f8f7;
  --panel: #ffffff;
  --teal: #176b64;
  --teal-dark: #0f4c47;
  --red: #a84436;
  --amber: #a66b15;
  --blue: #245d91;
  --green: #247047;
  --shadow: 0 18px 50px rgba(23, 32, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: min(168px, 46vw);
  height: auto;
}

main {
  padding: 24px 28px 28px;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.auth-layout {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 24px;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
}

.auth-layout.active-view {
  display: grid;
}

.intro-panel,
.auth-panel,
.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px;
  background:
    linear-gradient(rgba(23, 32, 39, 0.2), rgba(23, 32, 39, 0.78)),
    url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: white;
}

.admin-intro-panel {
  background:
    linear-gradient(rgba(10, 17, 34, 0.48), rgba(10, 17, 34, 0.82)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.intro-panel .label,
.intro-panel p {
  color: #e5eeee;
}

.intro-panel p {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-panel,
.panel {
  padding: 22px;
}

.tab-row,
.topbar-actions,
.button-row,
menu,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-row {
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f1;
}

.tab-button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.tab-button.active {
  background: white;
  box-shadow: 0 3px 12px rgba(23, 32, 39, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.onboarding-step {
  border-radius: 999px;
  padding: 8px 10px;
  background: #edf3f1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.onboarding-step.active {
  background: var(--teal);
  color: white;
}

.onboarding-step.complete {
  background: #d9f0e9;
  color: var(--teal-dark);
}

.register-step {
  display: grid;
  gap: 14px;
}

.register-step h2 {
  font-size: 1.35rem;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.register-review {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfa;
}

.register-review div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7eeee;
  padding-bottom: 7px;
}

.register-review div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.register-review span {
  color: var(--muted);
  font-size: 0.88rem;
}

.register-review strong {
  text-align: right;
}

.notice-box {
  margin-bottom: 16px;
  border: 1px solid #cfe0dd;
  border-radius: 8px;
  padding: 14px;
  background: #f1f7f5;
}

.notice-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
}

.notice-box p {
  margin: 0;
  color: #425059;
  line-height: 1.45;
}

.compact-notice {
  margin-top: 4px;
}

.step-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 20px;
  color: #34424a;
}

.step-list li {
  padding-left: 4px;
  line-height: 1.45;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: #34424a;
  font-size: 0.9rem;
  font-weight: 700;
}

.optional-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfd;
}

.checkline input {
  width: 18px;
  margin-top: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.primary-button,
.ghost-button,
.danger-button,
.text-button,
.small-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

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

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

.ghost-button,
.small-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.danger-button {
  border: 1px solid #efc8c1;
  background: #fff7f5;
  color: var(--red);
}

.danger-small-button {
  border-color: #efc8c1;
  background: #fff7f5;
  color: var(--red);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-info {
  display: grid;
  gap: 10px;
  border: 1px solid #cfe0dd;
  border-radius: 8px;
  padding: 12px;
  background: #f1f7f5;
  color: #34424a;
}

.site-info:empty {
  display: none;
}

.site-info strong {
  display: block;
  margin-bottom: 2px;
  color: var(--teal-dark);
}

.site-info span {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: white;
  color: #34424a;
  font-weight: 700;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto 22px;
}

.client-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.profile-icon-button:hover {
  border-color: #b9d8d3;
  background: #f1f7f5;
}

.profile-icon-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.stepper {
  display: flex;
  max-width: 1280px;
  margin: 0 auto 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: white;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.step-pill.active {
  border-color: #cfe0dd;
  background: #f1f7f5;
  color: var(--teal-dark);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #e8f0ed;
  color: var(--teal-dark);
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.profile-panel {
  max-width: 1280px;
  margin: 0 auto 20px;
}

.profile-credit-panel {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.credit-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  padding: 13px;
  background: #f8fbfa;
}

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

.credit-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.credit-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dfe9e6;
}

.credit-progress span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.marketplace-layout {
  max-width: 1280px;
  margin: 0 auto 20px;
}

.marketplace-panel {
  margin: 0;
}

.compact-button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 0.8rem;
}

.cart-summary {
  border: 1px solid #cfe0dd;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f1f7f5;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.marketplace-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.marketplace-searchbar input {
  min-height: 54px;
  border-radius: 8px;
  padding-left: 18px;
  font-size: 1rem;
}

.marketplace-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.filter-control {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.metric-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-filters label {
  position: relative;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.metric-filters span {
  position: absolute;
  top: 11px;
  right: 12px;
  color: var(--teal-dark);
  font-weight: 900;
}

.metric-filters input[type="range"] {
  padding: 0;
  accent-color: var(--teal);
}

.marketplace-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.marketplace-statusbar strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.billing-note {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #d7e5f3;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f3f8fd;
  color: #34424a;
}

.billing-note strong {
  color: var(--blue);
}

.stats-update-note {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f1f8f6;
  color: #34424a;
}

.stats-update-note strong {
  color: var(--teal-dark);
}

.selected-sites {
  display: flex;
  min-height: 38px;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.selected-site-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfe0dd;
  border-radius: 8px;
  padding: 8px 9px 8px 11px;
  background: #f1f7f5;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.selected-site-chip > span,
.selected-site-chip small {
  display: block;
}

.selected-site-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.selected-site-chip button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--teal-dark);
}

.chip-quantity-controls {
  display: inline-grid !important;
  grid-template-columns: 24px 28px 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cfe0dd;
  border-radius: 999px;
  background: white;
}

.chip-quantity-controls button,
.chip-quantity-controls b {
  display: grid;
  width: 100%;
  height: 24px;
  place-items: center;
  border: 0;
  background: white;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.chip-quantity-controls b {
  border-right: 1px solid #cfe0dd;
  border-left: 1px solid #cfe0dd;
}

.quantity-add-control {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 132px;
  flex-wrap: wrap;
}

.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 34px 44px 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.quantity-stepper button,
.quantity-stepper span {
  display: grid;
  width: 100%;
  height: 38px;
  place-items: center;
  border: 0;
  background: white;
  color: var(--ink);
  text-align: center;
  font-weight: 800;
}

.quantity-stepper button {
  background: #f4f7f6;
}

.quantity-stepper span {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 0;
}

.package-button-row {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 220px;
}

.package-buy-button {
  border: 1px solid #cfe0dd;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbfa;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: left;
}

.package-buy-button span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.site-delivery-list {
  display: grid;
  gap: 14px;
}

.site-delivery-card {
  border: 1px solid #d7e5f3;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 14px 34px rgba(18, 33, 46, 0.06);
}

.delivery-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.delivery-card-heading h3 {
  margin: 2px 0 0;
  font-size: 1.1rem;
}

.delivery-sections {
  display: grid;
  gap: 14px;
}

.delivery-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.delivery-section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.delivery-section-heading h4 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1rem;
}

.delivery-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.step-dot {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.delivery-option,
.choice-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  border: 1px solid #d7e5f3;
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfd;
}

.delivery-option:focus-within,
.choice-card:focus-within {
  border-color: #95c7bf;
  box-shadow: 0 0 0 3px rgba(24, 122, 109, 0.12);
}

.option-title {
  color: var(--ink);
  font-weight: 900;
}

.option-description,
.choice-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.choice-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
}

.choice-card input[type="checkbox"] {
  width: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

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

.delivery-option input[type="file"] {
  min-height: 44px;
  padding: 9px;
  background: white;
}

.compact-section-heading {
  margin-top: 20px;
}

.marketplace-wrap {
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.marketplace-table {
  min-width: 1040px;
}

.marketplace-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfc;
}

.marketplace-table td {
  background: white;
}

.marketplace-table tbody tr:hover td {
  background: #f7fbfa;
}

.marketplace-table tr.featured-market-row td {
  background: #fffdf5;
}

.featured-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid #f2d48b;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff3c4;
  color: #7a5200;
  font-size: 0.78rem;
  font-weight: 900;
}

.buy-button {
  min-height: 38px;
  border: 1px solid #13a979;
  border-radius: 8px;
  padding: 8px 12px;
  background: #13a979;
  color: white;
  font-weight: 800;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 11px;
  background: #d9f8e8;
  color: #0d7d55;
  font-weight: 800;
  white-space: nowrap;
}

.package-options {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.package-options span {
  display: block;
}

.category-pill {
  display: inline-flex;
  margin: 2px;
  border-radius: 6px;
  padding: 5px 8px;
  background: #ece9ff;
  color: #5746b8;
  font-size: 0.82rem;
  font-weight: 800;
}

.route-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.route-owned {
  background: #e8f2ff;
  color: var(--blue);
}

.route-partner {
  background: #fff3d9;
  color: var(--amber);
}

.admin-package-cell {
  display: grid;
  min-width: 260px;
  gap: 8px;
}

.admin-credit-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  background: #f1f7f5;
  color: var(--teal-dark);
  font-size: 0.82rem;
}

.admin-package-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

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

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.top-step-actions {
  justify-content: flex-start;
  margin: 0 0 12px;
}

.review-panel {
  max-width: 1280px;
  margin: 0 auto 20px;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.55fr);
  gap: 14px;
  margin-bottom: 14px;
}

.review-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.review-card p {
  margin: 0;
  color: #34424a;
}

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

.review-site-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.4fr) minmax(130px, auto);
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  min-width: 0;
}

.review-site-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.review-site-row span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.review-delivery-list {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.review-delivery-list span {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.review-delivery-list strong {
  display: inline;
  color: var(--ink);
  font-size: 0.86rem;
  white-space: nowrap;
}

.review-line-price {
  justify-self: end;
  max-width: 150px;
  color: var(--ink);
  text-align: right;
  white-space: normal;
}

.total-card {
  background: #f1f7f5;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

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

.stack-list {
  display: grid;
  gap: 10px;
}

.request-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.request-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-id {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.icon-text-button {
  min-height: 30px;
  border: 1px solid #f0c8c2;
  border-radius: 8px;
  padding: 5px 9px;
  background: #fff8f7;
  color: #a74436;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.icon-text-button:hover {
  background: #ffe9e6;
}

.client-request-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  color: #34424a;
  font-size: 0.86rem;
}

.delivery-total-card {
  border-color: #b9d8d3;
  background: #f1f7f5;
}

.summary-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  color: #34424a;
  font-size: 0.9rem;
}

.summary-lines b {
  color: var(--ink);
  text-align: right;
}

.request-card strong,
td {
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #edf2f7;
  color: #43505a;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-new {
  background: #fff3d9;
  color: var(--amber);
}

.status-sent_to_n8n {
  background: #e8f2ff;
  color: var(--blue);
}

.status-live {
  background: #e3f4ea;
  color: var(--green);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto 20px;
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
}

.settings-panel {
  max-width: 900px;
  margin: 0 auto;
}

.admin-settings-panel {
  max-width: 1280px;
  margin-top: 20px;
}

.catalog-wrap {
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.catalog-table {
  min-width: 1180px;
}

.catalog-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: white;
}

.catalog-table input,
.catalog-table select {
  min-width: 90px;
  padding: 8px;
}

.catalog-table input[type="checkbox"] {
  min-width: 0;
  width: 18px;
}

dialog {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 22px 70px rgba(23, 32, 39, 0.25);
}

dialog::backdrop {
  background: rgba(23, 32, 39, 0.45);
}

.dialog-card {
  padding: 22px;
}

.dialog-card p {
  color: var(--muted);
  line-height: 1.5;
}

.payload-preview {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f6f8f7;
  white-space: pre-wrap;
}

menu {
  justify-content: flex-end;
  margin: 18px 0 0;
  padding: 0;
}

@media (max-width: 960px) {
  .auth-layout,
  .content-grid,
  .metric-grid,
  .marketplace-searchbar,
  .metric-filters,
  .delivery-choice-grid,
  .review-grid,
  .review-site-row {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  main,
  .topbar {
    padding: 18px;
  }

  .topbar {
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-logo {
    width: min(150px, 58vw);
  }

  .topbar,
  .page-heading,
  .inline-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .register-review div {
    align-items: flex-start;
    flex-direction: column;
  }

  .register-review strong {
    text-align: left;
  }
}
