:root {
  --blue-950: #05085f;
  --blue-900: #070b80;
  --blue-700: #151aa8;
  --blue-100: #eef2ff;
  --red-600: #ed1c24;
  --red-700: #c9151d;
  --green-600: #078b4f;
  --amber-500: #f5a400;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #687386;
  --border: #dbe2ef;
  --radius: 8px;
  --shadow: 0 16px 44px rgba(3, 7, 18, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}
button, input, select {
  font: inherit;
}
button {
  cursor: pointer;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(237, 28, 36, .14), transparent 28%),
    linear-gradient(135deg, var(--blue-950), var(--blue-700));
}
.login-card {
  width: min(420px, 100%);
  padding: 30px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.login-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 28px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  background: var(--blue-900);
  border-radius: 6px;
  border-right: 18px solid var(--red-600);
}
.brand-text {
  line-height: 1.1;
}
.brand-text strong { display: block; color: var(--blue-950); }
.brand-text span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.field label {
  color: #26334d;
  font-size: 13px;
  font-weight: 800;
}
.input, .select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.input:focus, .select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(21, 26, 168, .12);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
}
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); }
.btn-blue { background: var(--blue-900); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-950); border-color: var(--border); }
.btn-soft { background: var(--blue-100); color: var(--blue-950); }
.btn-danger { color: var(--red-600); background: #fff1f2; }
.btn:disabled { cursor: wait; opacity: .65; }
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-width: 0;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  background: var(--blue-950);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .74);
  background: transparent;
  font-weight: 800;
  text-align: left;
}
.nav button.active, .nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}
.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  font-size: 12px;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 1.5;
}
.main {
  min-width: 0;
  width: 100%;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 26px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.search {
  width: min(520px, 100%);
  position: relative;
}
.search input { padding-left: 38px; }
.search::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  transform: translateY(-50%);
}
.search::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 39px;
  width: 7px;
  height: 2px;
  background: #94a3b8;
  transform: rotate(45deg);
}
.content {
  padding: 26px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}
.page-title h1 {
  margin: 0 0 8px;
  color: var(--blue-950);
  font-size: 26px;
  line-height: 1.1;
}
.page-title p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.metric {
  padding: 18px;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.metric strong {
  display: block;
  margin-top: 9px;
  color: var(--blue-950);
  font-size: 28px;
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 18px;
}
.panel {
  padding: 18px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.panel-title {
  display: grid;
  gap: 3px;
}
.panel-title h2 {
  margin: 0;
  color: var(--blue-950);
  font-size: 18px;
}
.panel-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.channel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  margin-bottom: 10px;
}
.channel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.channel-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-950);
  font-weight: 900;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fff7ed; color: #9a3412; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-info { background: var(--blue-100); color: var(--blue-950); }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
td {
  font-size: 14px;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
  border: 1px solid var(--border);
}
.muted { color: var(--muted); }
.forms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.full { grid-column: 1 / -1; }
.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--blue-100);
  color: var(--blue-950);
  font-weight: 800;
  line-height: 1.45;
}
.notice.error {
  background: #fee2e2;
  color: #991b1b;
}
.logs {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.log-entry {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 13px;
}
.log-entry strong {
  display: block;
  color: var(--blue-950);
  margin-bottom: 3px;
}
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hidden { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.order-filters { display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap; }
.order-filters .select { width:220px; }
.order-filters label { font-size:12px;font-weight:600; }
.print-toolbar { display:flex;align-items:center;gap:16px;background:#fff;border:1px solid var(--border);border-radius:6px;padding:14px 18px;margin-bottom:14px;flex-wrap:wrap; }
.print-toolbar .select { width:auto;max-width:100%; }
.print-toolbar > span { margin-right:auto; }
.select-all { display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:12px;cursor:pointer; }
.select-all input { width:18px;height:18px;accent-color:var(--blue-900); }
.orders-table td { vertical-align:top; }
.orders-table input[type="checkbox"] { width:18px;height:18px;accent-color:var(--blue-900);cursor:pointer; }
.orders-table .muted { font-size:11px;margin-top:4px; }
.order-item { font-size:12px;color:var(--muted);max-width:340px;margin-top:6px; }
.empty-state { padding:56px 20px;text-align:center;color:var(--muted); }
.empty-state svg.lucide { width:32px;height:32px;margin-bottom:12px; }
.empty-state h2 { font-size:16px;font-weight:600;color:var(--text);margin:4px 0; }
.empty-state p { font-size:13px; }
.pagination { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px; }
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Operational shell: restrained navigation, unframed sections and compact data. */
:root { --bg: #f6f7f9; --border: #e2e5ea; --muted: #606a78; }
body { font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: #fff; color: var(--text); border-right: 1px solid var(--border); padding: 28px 16px; gap: 26px; }
.sidebar .brand-text strong { color: var(--blue-950) !important; font-size: 18px; }
.sidebar .brand-text span { color: var(--muted) !important; font-size: 11px; letter-spacing: 0; }
.sidebar .brand-lockup { padding: 0 8px; margin-bottom: 12px; }
.nav { gap: 5px; }
.nav button { color: #535d6d; font-weight: 500; border-radius: 6px; padding: 12px; gap: 12px; }
.nav button.active { color: var(--blue-900); background: #eeeffb; font-weight: 650; }
.nav button:hover { color: var(--blue-900); background: #f2f3f8; }
svg.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.7; }
.sidebar-footer { color: var(--muted); border-color: var(--border); padding: 20px 10px 0; }
.sidebar-footer strong { color: #303b4b; font-weight: 600; }
.topbar { background: #fff; min-height: 76px; padding: 16px 32px; backdrop-filter: none; }
.search { width: min(400px, 100%); }
.search input { background: #f7f8fa; min-height: 38px; font-size: 13px; }
.search::after { top: 25px; }
.content { padding: 30px 32px; max-width: 1720px; margin: auto; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.page-title { align-items: center; margin-bottom: 28px; }
.page-title h1 { color: #1d2635; font-size: 26px; font-weight: 650; line-height: 1.3; }
.page-title p { font-size: 13px; font-weight: 400; max-width: 560px; }
.btn { min-height: 38px; padding: 9px 14px; font-size: 13px; font-weight: 600; border-radius: 6px; }
.btn-primary { background: var(--blue-900); }
.btn-primary:hover { background: var(--blue-950); }
.btn-soft { color: #344054; background: #fff; border-color: var(--border); }
.btn-ghost:hover,.btn-soft:hover { background: #f4f5f8; }
.cards { gap: 16px; margin-bottom: 32px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.card { box-shadow: none; border-radius: 6px; }
.metric { padding: 20px 22px; border-top: 2px solid #d8dbea; }
.metric span { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.metric strong { color: #232c3d; font-size: 30px; font-weight: 650; margin-top: 14px; }
.grid-two { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 30px; }
.panel { padding: 0; min-width: 0; }
.panel.card { background: #fff; padding: 24px; }
.panel-title { margin-bottom: 18px; }
.panel-title h2 { color: #293345; font-weight: 600; font-size: 16px; }
.panel-title span { font-size: 12px; font-weight: 400; }
.channel-row { background: #fff; padding: 18px; border-radius: 6px; margin-bottom: 12px; }
.channel-title { font-weight: 600; font-size: 14px; }
.channel-logo { border-radius: 6px; background: #f4f5f8; font-weight: 600; }
.channel-row .muted { font-size: 12px; }
.badge { font-size: 11px; font-weight: 600; min-height: 22px; padding: 3px 8px; white-space: nowrap; }
.logs { gap: 0; max-height: 390px; background: #fff; border-top: 1px solid var(--border); }
.log-entry { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: #fff; padding: 14px 16px; line-height: 1.65; overflow-wrap: anywhere; }
.log-entry strong { font-size: 12px; color: #515c6e; font-weight: 500; }
.log-entry .muted { font-size: 11px; margin-top: 4px; }
.table-wrap { background: #fff; border-radius: 6px; }
th { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; background: #f9fafb; }
th,td { padding: 15px 18px; }
td { font-size: 13px; }
tbody tr:hover { background: #fafbfe; }
.product-cell { min-width: 210px; max-width: 420px; }
.product-cell strong { font-weight: 550; }
.product-cell .muted { font-size: 11px; margin-top: 3px; }
.thumb { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 4px; }
.connection-summary { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 20px 0; margin: 0 0 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; }
.connection-summary span { color: var(--muted); }
.connection-summary strong { font-weight: 550; }
.advanced { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.advanced summary { cursor: pointer; font-size: 13px; color: #525e71; font-weight: 500; }
.advanced[open] summary { margin-bottom: 20px; }
#settingsForm { max-width: 860px; }
.field label { font-weight: 550; font-size: 12px; }
.notice { font-weight: 500; overflow-wrap: anywhere; }
.login-shell { background: #f4f5f9; border-top: 4px solid var(--blue-900); }
.login-card { border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 40px #18213b0a; padding: 36px; }
.login-card h1 { font-size: 24px; font-weight: 600; }
:focus-visible { outline: 3px solid #8089d9; outline-offset: 3px; }
@media (max-width: 1100px) { .grid-two { grid-template-columns: 1fr; } .cards { grid-template-columns: repeat(2,minmax(0,1fr)); } }

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: hidden;
  }
  .sidebar {
    position: static;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    width: 100%;
    max-width: 100vw;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
  }
  .sidebar-footer { display: none; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100vw;
  }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-two { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
  .nav button { width: 100%; white-space: normal; font-size: 12px; min-height: 44px; }
  .sidebar { padding: 18px; gap: 8px; }
  .sidebar .brand-lockup { margin-bottom: 12px; }
  .content, .topbar { padding: 18px; }
  .page-title { flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .forms-grid { grid-template-columns: 1fr; }
  .channel-row { grid-template-columns: 1fr; }
  .table-wrap {
    overflow: visible;
    border: 0;
  }
  table {
    min-width: 0;
    display: block;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 12px;
  }
  tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
  }
  th, td {
    display: block;
    padding: 0;
    border: 0;
  }
  .product-cell {
    min-width: 0;
    align-items: flex-start;
  }
}

/* Module rail and contextual workspace navigation. */
.app-shell { grid-template-columns: 64px 218px minmax(0,1fr); }
.module-rail { position:sticky;top:0;height:100vh;background:#070b46;color:white;display:flex;flex-direction:column;align-items:center;padding:18px 8px;gap:24px;z-index:12; }
.rail-brand { font-size:27px;font-weight:800;color:white;text-decoration:none;line-height:1.1; }
.rail-brand span { color:#ef343e; }
.module-rail nav { display:grid;gap:8px; }
.rail-button { display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:6px;background:transparent;color:#b5bbd2; }
.rail-button.active,.rail-button:hover { background:#292e66;color:white; }
.rail-button svg.lucide { width:21px;height:21px; }
.rail-bottom { margin-top:auto;border-top:1px solid #393d68;padding-top:16px;font-size:11px;font-weight:700;color:#c0c5dc; }
.sidebar { padding:26px 12px 20px;gap:12px;overflow-y:auto; }
.sidebar .brand-lockup { padding:0 12px;margin-bottom:14px; }
.sidebar .brand-text strong { font-size:17px; }
.sidebar .brand-text span { text-transform:none;font-weight:400;font-size:11px; }
.sidebar-section-title { font-size:15px;font-weight:650;color:#202b3d;padding:12px 12px 4px; }
.sidebar .nav { display:grid;grid-template-columns:1fr;gap:4px;overflow:visible; }
.sidebar .nav button { white-space:normal;min-height:42px;padding:10px;font-size:12px;border-radius:4px;gap:7px; }
.sidebar .nav svg.lucide { width:13px;height:13px; }
.sidebar-subheading { font-size:10px;font-weight:650;color:#6a7485;padding:20px 12px 6px; }
.sidebar-statuses { display:grid;gap:2px; }
.workflow-filter,.channel-shortcut { border:0;background:transparent;text-align:left;padding:9px 12px;color:#4c586c;display:flex;align-items:center;gap:9px;font-size:12px;border-radius:4px; }
.workflow-filter:hover,.channel-shortcut:hover { background:#f1f3f8; }
.color-dot { display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:8px;flex-shrink:0; }
.workflow-filter .color-dot { margin:0; }
.status-dot { display:inline-block;width:7px;height:7px;border-radius:50%;background:#9b6b24; }
.status-dot.online { background:#288256; }
.topbar { min-height:68px;padding:14px 28px;gap:14px;flex-direction:row; }
.search::after { top:25px; }
.icon-button.mobile-menu-button,.nav-scrim { display:none; }
.icon-button { width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:white;border:1px solid var(--border);border-radius:5px;color:#4b586e; }
.icon-button:hover { background:#eff1f7;color:var(--blue-900); }
.icon-button svg { width:16px;height:16px; }
.text-link { padding:4px 0;border:0;background:transparent;color:var(--blue-900);text-align:left;text-decoration:none;cursor:pointer;font:inherit;font-weight:550; }
.text-link:hover { text-decoration:underline; }
.back-link { display:inline-block;margin-bottom:18px; }
.catalog-tabs { display:flex;gap:24px;border-bottom:1px solid var(--border);margin:0 0 20px;overflow:auto; }
.catalog-tabs button,.catalog-tabs span { flex-shrink:0;border:0;background:transparent;padding:12px 0;font-size:13px;color:#536077; }
.catalog-tabs .active { border-bottom:2px solid var(--blue-900);color:var(--blue-900);font-weight:600; }
.info-band { padding:15px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:24px;color:#556176;font-size:13px;line-height:1.6; }
.unframed-section { padding:0 0 28px;margin:0 0 24px;min-width:0; }
.unframed-section h2,.settings-surface h2 { font-size:16px;color:#263247;font-weight:600;margin:0 0 18px; }
.section-note { font-size:12px;line-height:1.6;margin-top:20px; }
.document-name { display:flex;gap:12px;align-items:center;min-width:180px; }
.document-name svg { color:#6a7490; }
.cell-actions { display:flex;align-items:center;gap:8px;white-space:nowrap; }
.cell-actions .btn { height:40px;flex-shrink:0;line-height:18px; }
.cell-actions .btn svg { width:18px;height:18px;flex-shrink:0; }
.cell-actions .icon-button { vertical-align:middle; }
.kit-catalog-product { display:flex;align-items:center;gap:12px;min-width:250px; }
.kit-catalog-product img { display:block;width:64px;height:64px;object-fit:contain;background:#fff;border:1px solid var(--border);border-radius:4px; }
.kit-catalog-product > div { min-width:0; }
.kit-image-warning { font-size:12px;max-width:240px; }
.kit-image-warning p { white-space:normal;line-height:1.5; }
.settings-surface { max-width:680px; }
.settings-surface .field { max-width:360px; }
.toggle-line { display:flex;align-items:center;gap:12px;min-height:44px;margin:12px 0 24px;font-size:13px;cursor:pointer; }
.toggle-line input { accent-color:var(--blue-900);width:18px;height:18px; }
.detail-list { display:grid;grid-template-columns:minmax(100px,1fr) minmax(120px,1.3fr);gap:0;margin:0 0 24px;border-top:1px solid var(--border); }
.detail-list dt,.detail-list dd { margin:0;padding:13px 0;border-bottom:1px solid var(--border);font-size:13px;overflow-wrap:anywhere; }
.detail-list dt { color:var(--muted);padding-right:12px; }
.detail-list dd { font-weight:550; }
.product-detail-layout { display:grid;grid-template-columns:minmax(180px,300px) minmax(0,700px);gap:40px; }
.product-detail-image { width:100%;aspect-ratio:1;object-fit:contain;background:white;border:1px solid var(--border);border-radius:6px;padding:24px; }
.notes-list { margin-top:24px; }
.notes-list p { white-space:pre-wrap;margin:6px 0; }
.toast { position:fixed;right:24px;bottom:24px;z-index:100;max-width:min(460px,calc(100vw - 32px));padding:15px 20px;border:1px solid #c4daca;background:#f0fbf4;color:#205a37;border-radius:6px;box-shadow:0 8px 30px #11182714;font-size:13px; }
.toast-error { color:#982f35;background:#fff3f3;border-color:#edc9cc; }
[hidden] { display:none !important; }
.busy-indicator { color:var(--blue-900);font-size:12px;align-self:center; }
dialog { width:min(650px,calc(100vw - 32px));max-height:90vh;border:1px solid var(--border);border-radius:8px;padding:0;color:var(--text);box-shadow:0 24px 80px #11182730; }
dialog::backdrop { background:#11182766; }
.dialog-heading { display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--border);background:#fff;position:sticky;top:0;z-index:1; }
.dialog-heading h2 { font-size:18px;margin:0; }
.dialog-content { padding:24px; }
.dialog-content h3 { font-size:14px;font-weight:600; }
.dialog-footer { display:flex;justify-content:flex-end;border-top:1px solid var(--border);padding-top:18px;margin-top:22px; }
.kit-line { display:grid;grid-template-columns:minmax(0,1fr) 76px 36px;gap:10px;align-items:center;margin-bottom:12px; }
.kit-line .select { min-width:0; }
.kit-base-product { display:flex;align-items:center;gap:12px;margin-bottom:20px; }
.kit-base-product img { width:56px;height:56px;object-fit:contain;flex:none; }
.kit-packing-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.kit-summary { padding:16px 0;margin:12px 0;border-top:1px solid var(--border,#dfe3e9);border-bottom:1px solid var(--border,#dfe3e9); }
.kit-summary dl { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0; }
.kit-summary dt { font-size:12px;color:var(--muted,#596171); }
.kit-summary dd { margin:6px 0 0;font-size:17px;font-weight:700; }
@media(max-width:600px) {
  .kit-packing-grid { grid-template-columns:1fr; }
  .kit-summary dl { grid-template-columns:1fr; }
  #kitForm .dialog-footer { flex-wrap:wrap;gap:12px; }
}
.btn:disabled { cursor:not-allowed; }
textarea.input { resize:vertical; }
@media(max-width:1100px) {
  .app-shell { grid-template-columns:58px 190px minmax(0,1fr); }
  .content { padding:24px; }
  .topbar { padding:14px 24px; }
  .page-title { align-items:flex-start;flex-wrap:wrap; }
  .product-detail-layout { grid-template-columns:180px minmax(0,1fr);gap:24px; }
}
@media(max-width:980px) {
  .app-shell { display:block; }
  .main { width:100%; }
  .module-rail { position:fixed;left:0;top:0;width:64px;transform:translateX(-100%);height:100dvh;z-index:32; }
  .sidebar { position:fixed;top:0;left:64px;width:min(240px,calc(100vw - 88px));height:100dvh;max-width:none;z-index:32;transform:translateX(calc(-100% - 64px));border-bottom:0; }
  .menu-open .module-rail,.menu-open .sidebar { transform:translateX(0); }
  .menu-open .nav-scrim { display:block;position:fixed;inset:0;border:0;background:#18203366;z-index:30; }
  .icon-button.mobile-menu-button { display:inline-flex; }
  .topbar { display:grid;grid-template-columns:36px minmax(0,1fr);padding:12px 16px;gap:12px; }
  .topbar .drawer-actions { grid-column:2;justify-content:flex-end; }
  .sidebar-footer { display:block; }
  .search { width:100%; }
  .content { padding:22px 16px; }
  .page-title { align-items:flex-start;text-align:left; }
  .page-title h1 { font-size:23px;overflow-wrap:anywhere; }
  .page-title p { font-size:12px; }
  .product-detail-layout { grid-template-columns:1fr; }
  .product-detail-image { width:200px;justify-self:center; }
  .catalog-tabs { gap:18px; }
  .print-toolbar { gap:12px;padding:14px; }
  .print-toolbar .select { width:100%;font-size:12px; }
  .print-toolbar > .btn { width:100%; }
  .order-filters .select { max-width:100%; }
  .text-link { min-height:36px; }
  .icon-button,.btn { min-height:44px; }
  .kit-line { grid-template-columns:minmax(0,1fr) 60px 36px;gap:6px; }
  .dialog-heading,.dialog-content { padding:16px; }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric { padding:14px; }
  .metric strong { font-size:26px; }
  td[data-label]::before { content:attr(data-label) ': ';color:var(--muted);font-size:11px;margin-right:6px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important;transition:none !important; } }
/* The module flyout is outside the scrollable sidebar. */
.module-flyout { position:fixed; z-index:100; width:260px; max-width:calc(100vw - 72px); max-height:calc(100vh - 16px); overflow:auto; background:#070b46; border:1px solid #ffffff26; border-radius:6px; box-shadow:0 12px 30px #14213d26; padding:10px; display:grid; gap:3px; }
.module-flyout strong { padding:10px; color:#fff; font-size:13px; }
.module-flyout a { color:#e5e7f5; padding:11px 10px; text-decoration:none; border-radius:4px; font-size:13px; }
.module-flyout a:hover,.module-flyout a:focus-visible { background:#ffffff1f; color:#fff; outline:2px solid #9ba8ef; outline-offset:-2px; }
@media (min-width:981px) {
  .app-shell { grid-template-columns:64px minmax(0,1fr); }
  .app-shell > .sidebar { display:none; }
}
.ml-review-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-block:1px solid var(--border,#dce1eb); margin-bottom:24px; }
.ml-review-summary > div { padding:18px 12px; display:grid; gap:6px; }
.ml-review-summary span { color:var(--muted,#687489); font-size:13px; }
.ml-review-summary strong { font-size:25px; }
.ml-review-toolbar { display:flex; align-items:end; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.ml-review-toolbar .field { flex:1; min-width:180px; margin:0; }
.ml-review-table { table-layout:fixed; width:100%; }
.ml-review-table th:first-child { width:30%; }
.ml-review-table th:last-child { width:160px; }
.ml-review-table .ml-review-open { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:104px; white-space:nowrap; overflow-wrap:normal; word-break:normal; padding:10px 12px; }
.ml-review-open svg { flex-shrink:0; }
.ml-review-product { display:flex; align-items:center; gap:12px; }
.ml-review-product > div:last-child { min-width:0; }
.ml-review-photo { width:56px; height:56px; flex:0 0 56px; display:flex; align-items:center; justify-content:center; background:#fff; border:1px solid #e1e5ed; border-radius:4px; color:#6a7485; }
.ml-review-photo img { width:100%; height:100%; object-fit:contain; border-radius:4px; }
.ml-review-photo svg { width:20px; height:20px; }
.ml-review-table td { overflow-wrap:anywhere; vertical-align:top; }
.ml-review-table .btn svg { width:16px; height:16px; }
.ml-product-heading { display:flex; gap:18px; align-items:center; margin-bottom:24px; }
.ml-product-heading h2 { margin:0 0 5px; font-size:18px; overflow-wrap:anywhere; }
.ml-review-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr); gap:32px; align-items:start; }
.ml-review-form,.ml-review-inspector { min-width:0; }
.ml-review-section { border-top:1px solid var(--border,#dce1eb); padding:22px 0; }
.ml-review-section h2 { font-size:16px; margin:0 0 20px; display:flex; align-items:center; gap:10px; }
.ml-review-section h3 { font-size:14px; margin:24px 0 8px; }
.ml-review-section summary { cursor:pointer; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.ml-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:end; }
.ml-field-grid .field { min-width:0; }
.ml-category-row { row-gap:7px; margin-bottom:18px; }
.ml-category-row .field { margin-bottom:0; }
.ml-category-row #mlLoadCategory { min-height:42px; align-self:end; }
.ml-category-note { grid-column:1 / -1; }
.ml-attribute { align-self:start; }
.ml-attribute small { display:block; line-height:1.5; overflow-wrap:anywhere; }
.ml-required,.ml-field-error { color:#ad243c; }
.ml-source-present { color:#216b50; }
.ml-issues { list-style:none; margin:0; padding:0; }
.ml-issue { display:grid; gap:6px; font-size:13px; line-height:1.5; padding:12px 0; border-bottom:1px solid var(--border,#dce1eb); overflow-wrap:anywhere; }
.ml-issue strong { color:#9c2538; }
.ml-issue small { color:var(--muted,#687489); font-size:12px; }
.ml-issue code { font-size:11px; color:var(--muted,#687489); }
.ml-issue-ok { color:#216b50; }
.ml-source-fields { margin:0; }
.ml-source-fields > div { padding:10px 0; border-bottom:1px solid var(--border,#dce1eb); }
.ml-source-fields dt { font-weight:600; font-size:12px; }
.ml-source-fields dd { margin:4px 0 0; font-size:13px; overflow-wrap:anywhere; }
.ml-source-fields small { display:block; color:var(--muted,#687489); margin-top:4px; }
.ml-review-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:16px 0; }
.ml-review-actions svg { width:16px; height:16px; }
.ml-history-entry { padding:14px 0; border-bottom:1px solid var(--border,#dce1eb); }
.ml-history-entry pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }
@media(max-width:1100px) { .ml-review-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
  .ml-review-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ml-field-grid { grid-template-columns:minmax(0,1fr); }
  .ml-product-heading { align-items:start; flex-direction:column; }
  .ml-review-table,.ml-review-table tbody,.ml-review-table tr,.ml-review-table td { display:block; width:100%; }
  .ml-review-table thead { display:none; }
  .ml-review-table tr { padding:12px 0; border-bottom:1px solid var(--border,#dce1eb); }
  .ml-review-table td { border:0; padding:8px 12px; }
}
