:root {
  --bg: #f7f9fd;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --text: #111a2f;
  --muted: #68748a;
  --line: #dfe7f3;
  --primary: #075fe5;
  --primary-2: #42a5ff;
  --success: #0f8a55;
  --warning: #b76a00;
  --danger: #c7384a;
  --shadow: 0 12px 30px rgba(32, 49, 85, 0.07);
}

.provider-readiness-panel { margin-top: 18px; }
.provider-readiness-copy { margin: 0 0 14px; color: #596579; }
.provider-readiness-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.provider-readiness-card { padding: 12px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fbfcfe; }
.provider-readiness-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.provider-readiness-card p { margin: 8px 0 4px; color: #596579; font-size: 12px; }
.provider-readiness-card small { display: block; color: #7a8495; font-size: 11px; line-height: 1.45; }
.provider-status { padding: 3px 6px; border-radius: 5px; background: #fff3d6; color: #8a5b00; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.role-switcher-label { display: block; padding: 0 10px 6px; color: #8d9ab0; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.role-description { color: #8d9ab0; font-size: 10px; }
.dashboard-module-panel { margin-top: 16px; }
.dashboard-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dashboard-module-grid a { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fbfcfe; color: inherit; text-decoration: none; }
.dashboard-module-grid a:hover { border-color: #8db8ef; background: #f5f9ff; }
.dashboard-module-grid strong { color: #111a2f; font-size: 13px; }
.dashboard-module-grid span { color: #68748a; font-size: 11px; line-height: 1.45; }

.demo-sandbox-notice {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 16px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

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

.sidebar {
  background: #ffffff;
  color: var(--text);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 7px 8px;
  text-decoration: none;
  overflow: hidden;
}

.brand-logo {
  width: 196px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.role-switcher {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 8px;
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-switcher a {
  color: #40506c;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 8px;
  display: block;
  line-height: 1.2;
  font-weight: 700;
  font-size: 13px;
}

.role-switcher a.active {
  color: var(--primary);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #cfe0ff;
}

.sidebar nav {
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 2px 0;
}

.sidebar nav a {
  color: #263652;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.2;
  font-weight: 700;
}

.sidebar nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #064bc7);
  box-shadow: 0 12px 24px rgba(7, 95, 229, 0.24);
}

.sidebar nav a:hover:not(.active) {
  color: var(--primary);
  background: #f2f6ff;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d7e4f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #53657f;
  font-size: 10px;
  font-weight: 900;
}

.sidebar nav a.active .nav-icon {
  color: var(--primary);
  border-color: #ffffff;
  background: #ffffff;
}

.mobile-admin-nav {
  display: none;
}

.demo-control-notice {
  margin: 12px 28px 0;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f6f9ff;
  color: #40506c;
  font-size: 12px;
  line-height: 1.4;
}

.demo-control-label {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e5efff;
  color: #0751c5;
  font-weight: 800;
}

.sidebar-promo {
  margin-top: auto;
  border: 1px solid #cfdef3;
  background: linear-gradient(180deg, #f6fbff, #ffffff);
  border-radius: 8px;
  padding: 15px;
}

.sidebar-promo strong,
.sidebar-promo a,
.sidebar-account strong,
.sidebar-account small {
  display: block;
}

.sidebar-promo strong {
  color: var(--primary);
  line-height: 1.45;
}

.sidebar-promo a {
  color: var(--primary);
  margin-top: 14px;
  text-decoration: none;
  font-weight: 800;
}

.sidebar-account {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
}

.account-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #16a35b;
  color: #ffffff;
  font-weight: 900;
}

.sidebar-account small {
  color: var(--muted);
  margin-top: 2px;
}

.main-shell {
  min-width: 0;
}

.topbar {
  height: 76px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e8eef8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.search-box {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(36, 54, 88, 0.04);
}

.topbar-meta,
.header-actions,
.panel-title,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-meta {
  justify-content: flex-end;
}

.topbar-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
}

.user-chip {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.avatar-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e9f2ff;
  color: var(--primary);
  font-weight: 900;
}

.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.15;
}

.user-chip small,
.date-pill {
  color: var(--muted);
}

.date-pill {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
}

.content {
  padding: 24px 28px 30px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 16px;
  margin-bottom: 0;
}

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

.stat-card,
.panel,
.ai-card,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(7, 95, 229, 0.16), rgba(66, 165, 255, 0.08));
  position: absolute;
  top: 16px;
  right: 16px;
}

.stat-card.success-line::before {
  background: rgba(15, 138, 85, 0.14);
}

.stat-card.danger-line::before {
  background: rgba(199, 56, 74, 0.13);
}

.stat-card.warning-line::before {
  background: rgba(183, 106, 0, 0.13);
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

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

.ai-card {
  padding: 18px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.ai-card p {
  margin-bottom: 0;
  color: #39445a;
}

.ai-card-grid {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.ai-card-grid span {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
}

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

.workspace-grid > *,
.dashboard-grid > *,
.right-rail,
.panel {
  min-width: 0;
}

.workspace-main {
  min-width: 0;
}

.filter-bar {
  margin-bottom: 12px;
}

.filter-chip,
.action-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.filter-chip {
  padding: 8px 12px;
}

.filter-chip.active,
.action-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(7, 95, 229, 0.18);
}

.action-button.secondary {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}

.action-button {
  padding: 9px 13px;
  text-decoration: none;
}

.icon-button {
  width: 34px;
  height: 34px;
}

.panel {
  padding: 16px;
}

.table-panel {
  padding-bottom: 10px;
}

.panel-title {
  justify-content: space-between;
  margin-bottom: 12px;
}

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

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

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

th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  background: var(--panel-2);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
  color: #445066;
  background: #edf1f7;
  white-space: normal;
}

.status-badge.success {
  color: var(--success);
  background: #e7f6ef;
}

.status-badge.info {
  color: var(--primary);
  background: #eaf2ff;
}

.status-badge.warning {
  color: var(--warning);
  background: #fff3dc;
}

.status-badge.danger {
  color: var(--danger);
  background: #fde9ed;
}

.status-badge.blocked {
  color: #6d28d9;
  background: #f0e9ff;
}

.status-badge.draft {
  color: #64748b;
  background: #f1f5f9;
}

.status-explanation {
  display: block;
  max-width: 260px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.side-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-panel p,
.side-panel dd {
  color: var(--muted);
}

.side-panel dl {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.side-panel dt {
  font-weight: 800;
}

.side-panel dd {
  margin: 4px 0 0;
}

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

.task-row {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #ffffff;
}

.task-row > span {
  flex: 1 1 160px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-row small,
td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.right-rail {
  display: grid;
  gap: 14px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.seller-dashboard-layout,
.producer-dashboard-layout,
.wide-main-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.dashboard-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.five-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.six-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.store-card-grid,
.quick-action-grid,
.chip-grid {
  display: grid;
  gap: 10px;
}

.store-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.store-card,
.quick-action,
.chip-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.store-card {
  min-width: 0;
  min-height: 112px;
  padding: 13px;
  display: grid;
  align-content: space-between;
  overflow-wrap: anywhere;
}

.store-card strong,
.quick-action strong,
.quick-action span {
  display: block;
}

.store-card small {
  color: var(--muted);
}

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

.quick-action {
  min-height: 74px;
  padding: 13px;
  text-decoration: none;
  color: var(--text);
}

.quick-action span {
  color: var(--muted);
  margin-top: 6px;
}

.score-panel {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

.score-panel strong {
  font-size: 42px;
  color: var(--primary);
}

.score-panel span,
.text-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

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

.row-actions button,
td button {
  border: 1px solid #cfe0ff;
  background: #f5f8ff;
  color: var(--primary);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.form-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.upload-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.upload-box {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #8db5ff;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--primary);
}

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

.upload-box span {
  color: var(--muted);
  margin-top: 8px;
}

.upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.chip-grid span {
  padding: 10px 12px;
  color: #29405f;
  font-weight: 800;
  background: #f8fbff;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.checklist span {
  border: 1px solid #d8eee5;
  background: #f1fbf6;
  color: var(--success);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.side-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.page-description {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 820px;
}

.panel-description {
  color: var(--muted);
  margin: 6px 0 0;
}

.demo-flow-panel {
  margin-bottom: 16px;
}

.demo-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.demo-flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
  color: var(--text);
  text-decoration: none;
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.demo-flow-step > span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.demo-flow-step strong {
  line-height: 1.25;
}

.demo-core-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}

.demo-core-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.demo-core-summary strong,
.demo-core-summary span {
  display: block;
}

.demo-core-summary span {
  color: var(--muted);
  margin-top: 4px;
}

.cargo-stat-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.notice-panel {
  background: #f3f7ff;
  color: #254068;
  border: 1px solid #d6e4ff;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.cargo-bridge-panel,
.cargo-finance-panel {
  grid-column: span 2;
}

.cargo-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.cargo-flow div,
.money-split-card div,
.finance-bridge-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.cargo-flow strong,
.cargo-flow span,
.money-split-card span,
.money-split-card small,
.finance-bridge-summary span {
  display: block;
}

.cargo-flow > span {
  color: var(--primary);
  font-weight: 900;
  text-align: center;
}

.cargo-flow div span,
.money-split-card span,
.money-split-card small,
.finance-bridge-summary span {
  color: var(--muted);
  margin-top: 4px;
}

.money-split-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.money-split-card strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font-size: 18px;
}

.finance-bridge-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.finance-bridge-summary strong {
  display: block;
  margin-top: 6px;
}

.tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 4px;
}

.tab-button {
  min-height: 38px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.tab-button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

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

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

.health-stack div {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 12px;
}

.health-stack strong,
.health-stack span {
  display: block;
}

.health-stack span {
  color: var(--muted);
  margin-top: 4px;
}

.mini-bars {
  display: grid;
  gap: 12px;
}

.mini-bars span {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  isolation: isolate;
}

.mini-bars span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: rgba(7, 95, 229, 0.13);
}

.mini-bars span::after {
  content: "";
}

.cta-panel p {
  color: var(--muted);
}

.selectable-row {
  cursor: pointer;
}

.selectable-row:hover {
  background: #f5f8ff;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

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

  .cargo-bridge-panel,
  .cargo-finance-panel {
    grid-column: span 1;
  }

  .cargo-flow,
  .money-split-card,
  .finance-bridge-summary {
    grid-template-columns: 1fr;
  }

  .cargo-flow > span {
    transform: rotate(90deg);
  }

  .dashboard-stat-grid,
  .five-stat-grid,
  .six-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .store-card-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

  .sidebar-promo,
  .sidebar-account {
    display: none;
  }

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

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

  .workspace-grid,
  .ai-card,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    position: static;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .demo-sandbox-notice {
    position: static;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.35;
  }

  .content,
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .demo-control-notice {
    margin: 10px 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .page-header {
    flex-direction: column;
  }

  .stat-grid,
  .cargo-stat-grid,
  .dashboard-stat-grid,
  .five-stat-grid,
  .six-stat-grid,
  .demo-flow-grid,
  .demo-core-summary,
  .store-card-grid,
  .quick-action-grid,
  .form-grid,
  .chip-grid,
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .sidebar nav a {
    min-width: 0;
    padding: 9px;
  }

  .role-admin > .admin-desktop-nav {
    display: none;
  }

  .mobile-admin-nav {
    display: block;
    min-width: 0;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
    background: #f8fbff;
  }

  .mobile-admin-nav summary {
    min-height: 54px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #263652;
    cursor: pointer;
    list-style: none;
  }

  .mobile-admin-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-admin-nav summary:focus-visible {
    outline: 3px solid #075fe5;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(7, 95, 229, 0.18);
  }

  .mobile-admin-nav summary span:first-child {
    min-width: 0;
  }

  .mobile-admin-nav summary small,
  .mobile-admin-nav summary strong {
    display: block;
  }

  .mobile-admin-nav summary small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-admin-nav summary strong {
    overflow-wrap: anywhere;
  }

  .mobile-admin-nav-toggle {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 6px;
    background: #e5efff;
    color: #0751c5;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-admin-nav[open] .mobile-admin-nav-toggle::after {
    content: " kapat";
  }

  .mobile-admin-nav nav {
    max-height: 52vh;
    padding: 0 8px 8px;
    overflow-y: auto;
  }

  .role-switcher a {
    min-width: 0;
    padding: 8px;
    text-align: center;
  }

  .user-chip,
  .date-pill {
    display: none;
  }
}

/* Seller dashboard visual system: light workspace, compact navigation and
   reference-style information cards. This layer is presentation-only. */
:root {
  --bg: #f6f9fe;
  --panel: #ffffff;
  --panel-2: #fbfcff;
  --text: #14213b;
  --muted: #6d7b92;
  --line: #e2e9f3;
  --primary: #1268e8;
  --primary-2: #5aa8ff;
  --shadow: 0 6px 18px rgba(31, 62, 107, 0.055);
}

body {
  letter-spacing: -0.005em;
}

.app-shell {
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  padding: 18px 10px 14px;
  gap: 12px;
  background: #ffffff;
  border-right-color: #e5ebf4;
}

.brand {
  min-height: 52px;
  padding: 0 10px 8px;
}

.brand-logo {
  width: 168px;
  height: 38px;
}

.role-switcher {
  margin: 0 6px;
  padding: 7px;
  border-radius: 10px;
  background: #f5f8fd;
}

.role-switcher a {
  padding: 8px 9px;
  border-radius: 8px;
  color: #425471;
  font-size: 12px;
}

.role-switcher a.active {
  color: var(--primary);
  background: #eaf2ff;
  box-shadow: none;
}

.sidebar nav {
  gap: 3px;
  padding: 0 2px;
}

.sidebar nav a {
  margin: 0 2px;
  padding: 9px 10px;
  border-radius: 9px;
  gap: 9px;
  color: #2a3b58;
  font-size: 13px;
}

.sidebar nav a.active {
  background: linear-gradient(135deg, #176ce8, #0e5bd1);
  box-shadow: 0 7px 16px rgba(18, 104, 232, 0.2);
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f7faff;
  border-color: #dce7f6;
}

.sidebar-promo {
  margin: auto 6px 0;
  padding: 13px;
  border-radius: 11px;
  border-color: #d7e5fb;
  background: linear-gradient(180deg, #f3f8ff, #ffffff);
}

.sidebar-account {
  margin: 0 6px;
  min-height: 54px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fbff;
}

.main-shell {
  background: var(--bg);
}

.topbar {
  height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: #e5ebf4;
}

.search-box {
  max-width: 440px;
  border-radius: 10px;
  padding: 10px 13px;
  box-shadow: 0 4px 12px rgba(31, 62, 107, 0.04);
}

.topbar-icon {
  width: 36px;
  height: 36px;
}

.content {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 28px 42px;
}

.page-header {
  margin-bottom: 17px;
}

.eyebrow {
  color: #397edc;
  font-size: 11px;
  letter-spacing: .04em;
}

h1 {
  color: #13223d;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.page-description {
  color: #6b7890;
  font-size: 13px;
}

.stat-grid,
.dashboard-grid,
.workspace-grid {
  gap: 12px;
}

.stat-card,
.panel,
.ai-card,
.side-panel {
  border-radius: 12px;
  border-color: #e1e8f2;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 15px;
}

.stat-card strong {
  color: #152540;
  font-size: 25px;
}

.ai-card {
  margin-bottom: 12px;
  padding: 16px 18px;
  border-color: #d8e7fb;
  background: linear-gradient(110deg, #edf6ff 0%, #ffffff 72%);
}

.ai-card-grid span,
.dashboard-module-grid a,
.store-card,
.task-row,
.health-stack div,
.quick-action {
  border-color: #e3eaf4;
  border-radius: 10px;
  background: #ffffff;
}

.dashboard-module-panel {
  margin-top: 12px;
}

.dashboard-module-grid {
  gap: 9px;
}

.dashboard-module-grid a {
  padding: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dashboard-module-grid a:hover {
  border-color: #9fc4f3;
  box-shadow: 0 5px 14px rgba(18, 104, 232, .08);
  transform: translateY(-1px);
}

.panel {
  padding: 15px;
}

.panel-title {
  margin-bottom: 11px;
}

.panel-title h2 {
  color: #192945;
  font-size: 15px;
}

table {
  min-width: 700px;
}

th,
td {
  padding: 10px 9px;
  border-bottom-color: #edf1f6;
}

th {
  color: #75829a;
  background: #fbfcff;
  font-size: 11px;
}

.right-rail {
  gap: 12px;
}

.text-link {
  color: #176be1;
}

.demo-control-notice {
  margin-top: 10px;
  border-radius: 10px;
  background: #f2f7ff;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .content {
    padding-top: 18px;
  }

  .topbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Seller dashboard composition: keep the reference's first viewport focused on
   stores, profit, alerts, operations and daily tasks. */
.seller-dashboard-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.seller-dashboard-top-grid {
  display: grid;
  grid-template-columns: minmax(210px, .78fr) minmax(0, 1.22fr);
  gap: 12px;
  align-items: stretch;
}

.seller-dashboard-top-grid > .panel {
  min-width: 0;
}

.seller-dashboard-top-grid .table-panel {
  overflow: hidden;
}

.seller-dashboard-top-grid table {
  min-width: 0;
}

.seller-dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.seller-dashboard-lower-grid > .panel {
  min-width: 0;
}

.seller-operations-panel .panel-description {
  margin-top: 4px;
  font-size: 11px;
}

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

.seller-operation-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e3eaf4;
  border-radius: 10px;
  background: #fbfcff;
  color: var(--text);
  text-decoration: none;
}

.seller-operation-card strong,
.seller-operation-card span {
  overflow-wrap: anywhere;
}

.seller-operation-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.seller-operation-card .status-badge {
  justify-self: start;
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .seller-dashboard-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .seller-dashboard-top-grid,
  .seller-dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .seller-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

.seller-ai-card {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1.05fr);
  min-height: 142px;
  padding: 16px 18px;
  background: linear-gradient(108deg, #edf6ff 0%, #f8fbff 52%, #ffffff 100%);
}

.seller-ai-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.seller-ai-summary p {
  max-width: 570px;
  margin: 7px 0 5px;
  color: #233754;
  line-height: 1.45;
}

.seller-ai-summary small {
  color: #71819a;
  font-size: 11px;
}

.assistant-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 6px solid #dceeff;
  border-radius: 50%;
  background: #1268e8;
  color: #ffffff;
  font-size: 26px;
  box-shadow: 0 6px 16px rgba(18, 104, 232, .18);
}

.seller-ai-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.seller-ai-actions a {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  color: var(--text);
  text-decoration: none;
}

.seller-ai-actions a:hover {
  border-color: #9fc4f3;
  box-shadow: 0 5px 14px rgba(18, 104, 232, .08);
}

.seller-ai-actions span {
  color: var(--muted);
  font-size: 11px;
}

.store-card {
  min-height: 126px;
  gap: 6px;
  align-content: start;
}

.store-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.store-card:nth-child(2) .store-mark { background: #e9f8ef; color: #148550; }
.store-card:nth-child(3) .store-mark { background: #f3edff; color: #7048d4; }
.store-card:nth-child(4) .store-mark { background: #fff1e3; color: #c46a12; }
.store-card:nth-child(5) .store-mark { background: #e8f8f8; color: #178b8b; }

.store-state {
  display: block;
  min-height: 26px;
  color: #65758f;
  font-size: 10px;
  line-height: 1.3;
}

.seller-dashboard-top-grid .table-panel td:first-child {
  max-width: 170px;
  font-weight: 700;
}

.seller-dashboard-top-grid .table-panel td:first-child,
.seller-dashboard-top-grid .table-panel th:first-child {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .seller-ai-card {
    grid-template-columns: 1fr;
  }

  .seller-ai-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .seller-ai-actions {
    grid-template-columns: 1fr;
  }
}
