:root {
  /* v6.2.8 — 101 Market palette. Was the old kit teal, which is why the hub
     never matched the storefront, category pages or emails. */
  --sh101-primary: #2F856E;
  --sh101-primary-700: #22694F;
  --sh101-primary-900: #1B5641;
  --sh101-secondary: #FFFFFF;
  --sh101-text: #22231F;
  --sh101-text-soft: #3F4644;
  --sh101-muted: #7A7E7C;
  --sh101-accent: #E07242;
  --sh101-border: #E5E2DC;
  --sh101-border-strong: #CFC9BF;
  --sh101-soft: rgba(77, 174, 148, 0.12);
  --sh101-soft-strong: rgba(77, 174, 148, 0.22);
  --sh101-warn-soft: #FFF4E5;
  --sh101-warn: #B36B00;
  --sh101-danger-soft: #FCE8E8;
  --sh101-danger: #B7262C;
  --sh101-success-soft: #E8F4EE;
  --sh101-success: #1E6B56;
  --sh101-bg: #F4EFE4;
  --sh101-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --sh101-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --sh101-radius: 16px;
  --sh101-radius-sm: 10px;
  --sh101-radius-pill: 999px;
}

.sh101-shell {
  color: var(--sh101-text);
  font-family: inherit;
  --sh101-step: 20px;
}

.sh101-shell *,
.sh101-shell *::before,
.sh101-shell *::after {
  box-sizing: border-box;
}

.sh101-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sh101-primary);
  margin-bottom: 6px;
}

.sh101-muted {
  color: var(--sh101-muted);
}

/* ===================== HERO ===================== */
.sh101-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--sh101-radius);
  background: linear-gradient(135deg, var(--sh101-soft-strong), var(--sh101-soft));
  margin: 0 0 20px;
  border: 1px solid var(--sh101-border);
}

.sh101-hero-text h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: var(--sh101-text);
  line-height: 1.2;
}

.sh101-hero-text p {
  margin: 0;
  color: var(--sh101-text-soft);
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.5;
}

.sh101-hero-art {
  font-size: 56px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(6, 177, 143, 0.18));
}

/* ===================== CARDS ===================== */
.sh101-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.sh101-card {
  background: #fff;
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius);
  padding: 16px 18px;
  box-shadow: var(--sh101-shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.sh101-card:hover {
  border-color: var(--sh101-border-strong);
  transform: translateY(-1px);
}

.sh101-card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--sh101-soft);
  font-size: 20px;
  flex-shrink: 0;
}

.sh101-tone-warn .sh101-card-icon    { background: var(--sh101-warn-soft); }
.sh101-tone-success .sh101-card-icon { background: var(--sh101-success-soft); }
.sh101-tone-muted .sh101-card-icon   { background: var(--sh101-bg); }

.sh101-card-body { display: flex; flex-direction: column; gap: 2px; }

.sh101-card-label {
  color: var(--sh101-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.sh101-card-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--sh101-text);
  line-height: 1.05;
}

.sh101-tone-info  .sh101-card-value { color: var(--sh101-primary-700); }
.sh101-tone-warn  .sh101-card-value { color: var(--sh101-warn); }
.sh101-tone-success .sh101-card-value { color: var(--sh101-success); }
.sh101-tone-muted .sh101-card-value { color: var(--sh101-muted); }

/* ===================== QUICK CTA ===================== */
.sh101-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

/* ===================== PANELS ===================== */
.sh101-panel {
  background: #fff;
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius);
  box-shadow: var(--sh101-shadow);
  padding: 24px 26px;
  margin: 0 0 20px;
}

.sh101-panel-readonly {
  background: #FBFCFD;
}

.sh101-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.sh101-panel-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--sh101-text);
}

.sh101-panel-head .sh101-muted {
  margin: 4px 0 0;
  font-size: 13px;
}

.sh101-detail-head h3 { margin-top: 4px; }

/* ===================== BUTTONS ===================== */
.sh101-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--sh101-radius-pill);
  padding: 11px 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.sh101-btn:active { transform: translateY(1px); }
.sh101-btn-lg { padding: 13px 24px; font-size: 15px; }
.sh101-btn-icon { font-size: 16px; line-height: 1; }

.sh101-btn-primary {
  background: var(--sh101-primary);
  color: #fff !important;
  border-color: var(--sh101-primary);
  box-shadow: 0 4px 12px rgba(6, 177, 143, 0.25);
}
.sh101-btn-primary:hover {
  background: var(--sh101-primary-700);
  border-color: var(--sh101-primary-700);
  color: #fff !important;
}

.sh101-btn-secondary {
  background: #fff;
  color: var(--sh101-primary) !important;
  border-color: var(--sh101-primary);
}
.sh101-btn-secondary:hover {
  background: var(--sh101-soft);
  color: var(--sh101-primary-700) !important;
}

.sh101-btn-ghost {
  background: transparent;
  color: var(--sh101-muted) !important;
  border-color: transparent;
}
.sh101-btn-ghost:hover {
  color: var(--sh101-text) !important;
  background: var(--sh101-bg);
}

/* ===================== FORMS ===================== */
.sh101-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sh101-form-section {
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius);
  background: #fff;
  padding: 20px 22px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sh101-section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sh101-muted);
  padding: 0 6px;
}

.sh101-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sh101-field-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--sh101-text);
}

.sh101-form input[type="text"],
.sh101-form input[type="number"],
.sh101-form input[type="search"],
.sh101-form input[type="email"],
.sh101-form select,
.sh101-form textarea {
  width: 100%;
  border: 1.5px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  color: var(--sh101-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.sh101-form textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.sh101-form input:focus,
.sh101-form select:focus,
.sh101-form textarea:focus {
  outline: none;
  border-color: var(--sh101-primary);
  box-shadow: 0 0 0 3px var(--sh101-soft-strong);
}

/* Custom select wrapper for a real chevron */
.sh101-select-wrap {
  position: relative;
}
.sh101-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: none;
}
.sh101-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--sh101-text);
  border-bottom: 2px solid var(--sh101-text);
  pointer-events: none;
  margin-top: -3px;
}

.sh101-form-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.sh101-helper {
  margin: 0;
  font-size: 12.5px;
  color: var(--sh101-muted);
  line-height: 1.5;
}

.sh101-helper-warn {
  color: var(--sh101-warn);
  font-weight: 700;
}

/* ===================== ITEM CHECKLIST + ITEMS BLOCK ===================== */
.sh101-item-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.sh101-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: var(--sh101-text);
  transition: border-color 0.15s ease, background 0.1s ease;
}

.sh101-item-row:hover {
  border-color: var(--sh101-primary);
  background: var(--sh101-soft);
}

.sh101-item-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sh101-primary);
  flex-shrink: 0;
}

.sh101-items-block {
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: var(--sh101-soft);
  padding: 12px 14px;
  margin: 0 0 18px;
}

.sh101-items-block-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--sh101-primary-900);
  margin-bottom: 6px;
}

.sh101-items-list {
  margin: 0;
  padding-left: 18px;
  color: var(--sh101-text);
  font-size: 14px;
}

.sh101-items-list li {
  margin: 2px 0;
}

.sh101-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--sh101-text);
}

/* ===================== SCOPE TILES ===================== */
.sh101-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.sh101-scope-tile {
  position: relative;
  display: block;
  cursor: pointer;
}

.sh101-scope-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.sh101-scope-tile-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  border: 1.5px solid var(--sh101-border);
  border-radius: var(--sh101-radius);
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  position: relative;
}

.sh101-scope-tile-icon {
  font-size: 22px;
  line-height: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sh101-soft);
  margin-bottom: 4px;
}

.sh101-scope-tile-title {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--sh101-text);
  display: block;
  line-height: 1.3;
}

.sh101-scope-tile-desc {
  font-size: 12.5px;
  color: var(--sh101-muted);
  line-height: 1.5;
  display: block;
}

.sh101-scope-tile-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--sh101-border-strong);
  background: #fff;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.sh101-scope-tile:hover .sh101-scope-tile-inner {
  border-color: var(--sh101-primary);
  box-shadow: 0 4px 14px rgba(6, 177, 143, 0.12);
}

.sh101-scope-tile input[type="radio"]:checked ~ .sh101-scope-tile-inner {
  border-color: var(--sh101-primary);
  background: var(--sh101-soft);
  box-shadow: 0 6px 18px rgba(6, 177, 143, 0.18);
}

.sh101-scope-tile input[type="radio"]:checked ~ .sh101-scope-tile-inner .sh101-scope-tile-check {
  background: var(--sh101-primary);
  color: #fff;
  border-color: var(--sh101-primary);
}

.sh101-scope-tile input[type="radio"]:focus-visible ~ .sh101-scope-tile-inner {
  box-shadow: 0 0 0 3px var(--sh101-soft-strong);
}

/* ===================== CONTEXT BITS ===================== */
.sh101-vendor-confirm {
  margin: 4px 0 0;
}

.sh101-chip-vendor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--sh101-radius-pill);
  background: var(--sh101-soft);
  color: var(--sh101-primary-900);
  font-size: 12px;
  font-weight: 700;
}

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

/* ===================== SUB-ORDER BANNER ===================== */
.sh101-suborder-banner {
  margin: 12px 0 18px;
  padding: 18px 20px;
  border: 1.5px dashed var(--sh101-primary);
  border-radius: var(--sh101-radius);
  background: var(--sh101-soft);
}

.sh101-suborder-banner-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.sh101-suborder-banner-head strong { color: var(--sh101-text); font-size: 15px; }
.sh101-suborder-banner-head span { color: var(--sh101-text-soft); font-size: 13px; }

.sh101-suborder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.sh101-suborder-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1.5px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: #fff;
  text-decoration: none;
  color: var(--sh101-text);
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.sh101-suborder-card:hover {
  border-color: var(--sh101-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(6, 177, 143, 0.14);
}

.sh101-suborder-vendor { font-weight: 800; }
.sh101-suborder-meta { font-size: 12px; color: var(--sh101-muted); }
.sh101-suborder-cta { font-size: 12px; font-weight: 800; color: var(--sh101-primary); margin-top: 6px; }

/* ===================== ORDER HELP STRIP ===================== */
.sh101-order-help {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sh101-order-help-disabled {
  padding: 12px 14px;
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: var(--sh101-bg);
}

.sh101-line-help {
  margin-top: 6px;
}

.sh101-line-help-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sh101-primary);
  text-decoration: none;
}

.sh101-line-help-link:hover { text-decoration: underline; }

/* ===================== LIST ===================== */
.sh101-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sh101-list-row {
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: #fff;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.sh101-list-row:hover {
  border-color: var(--sh101-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 177, 143, 0.1);
}

.sh101-list-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
}

.sh101-list-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.sh101-list-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--sh101-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60ch;
}

.sh101-list-meta { font-size: 12.5px; color: var(--sh101-muted); }
.sh101-list-status { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sh101-list-updated { font-size: 12px; color: var(--sh101-muted); }

/* ===================== PILLS ===================== */
.sh101-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--sh101-radius-pill);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.sh101-pill-lg { padding: 6px 16px; font-size: 13px; }
.sh101-pill-info    { background: var(--sh101-soft); color: var(--sh101-primary-900); }
.sh101-pill-warn    { background: var(--sh101-warn-soft); color: var(--sh101-warn); }
.sh101-pill-success { background: var(--sh101-success-soft); color: var(--sh101-success); }
.sh101-pill-muted   { background: var(--sh101-bg); color: var(--sh101-muted); }

/* ===================== META GRID ===================== */
.sh101-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sh101-meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  background: var(--sh101-bg);
}

.sh101-meta-grid > div span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--sh101-muted);
}

.sh101-meta-grid > div strong {
  font-size: 14px;
  color: var(--sh101-text);
}

.sh101-meta-grid > div code {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--sh101-border);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ===================== THREAD ===================== */
.sh101-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.sh101-message {
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  padding: 14px 16px;
  background: #fff;
}

.sh101-message header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--sh101-muted);
}

.sh101-message header strong { color: var(--sh101-text); }
.sh101-message-body { font-size: 14px; color: var(--sh101-text); }
.sh101-message-body p { margin: 0 0 8px; }

.sh101-message-customer { border-left: 3px solid var(--sh101-primary); }
.sh101-message-vendor   { border-left: 3px solid var(--sh101-accent); background: #FFF8F2; }
.sh101-message-admin    { border-left: 3px solid #1F2937; background: #FAFBFC; }

.sh101-vis-internal {
  background: #FFF8DB;
  border-left-color: #D97706;
}

.sh101-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.sh101-attachments a {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh101-primary);
  text-decoration: none;
}
.sh101-attachments a:hover { text-decoration: underline; }

/* ===================== EMPTY / NOTICE ===================== */
.sh101-empty {
  padding: 32px 20px;
  text-align: center;
  background: var(--sh101-bg);
  border: 1.5px dashed var(--sh101-border);
  border-radius: var(--sh101-radius);
  color: var(--sh101-muted);
}

.sh101-empty-inline {
  padding: 14px 16px;
  text-align: left;
}

.sh101-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--sh101-radius-sm);
  padding: 14px 16px;
  margin: 0 0 18px;
  border-left: 4px solid;
  background: #fff;
  font-size: 14px;
}

.sh101-notice-icon { font-size: 18px; line-height: 1.2; flex-shrink: 0; }

.sh101-notice-success {
  background: var(--sh101-success-soft);
  border-color: var(--sh101-success);
  color: #065F46;
}

.sh101-notice-error {
  background: var(--sh101-danger-soft);
  border-color: var(--sh101-danger);
  color: #7F1D1D;
}

/* ===================== BACK LINK ===================== */
.sh101-back {
  display: inline-block;
  font-size: 13px;
  color: var(--sh101-primary);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 6px;
}
.sh101-back:hover { text-decoration: underline; }

/* ===================== ADMIN ===================== */
.sh101-admin-wrap .sh101-shell { margin-top: 12px; }

.sh101-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.sh101-side-stack > .sh101-panel { margin-bottom: 14px; }

.sh101-admin-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--sh101-border);
  border-radius: var(--sh101-radius-sm);
  overflow: hidden;
  background: #fff;
}

.sh101-admin-table thead th {
  background: var(--sh101-bg);
  text-align: left;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--sh101-muted);
  padding: 12px 14px;
}

.sh101-admin-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--sh101-border);
  vertical-align: top;
  font-size: 13px;
}

.sh101-admin-table tbody tr:hover { background: var(--sh101-bg); }

.sh101-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.sh101-filter-bar select,
.sh101-filter-bar input[type="search"] {
  padding: 10px 12px;
  border-radius: var(--sh101-radius-sm);
  border: 1.5px solid var(--sh101-border);
  background: #fff;
  font-family: inherit;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .sh101-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sh101-hero,
  .sh101-panel {
    padding: 18px;
  }
  .sh101-list-link,
  .sh101-panel-head,
  .sh101-message header,
  .sh101-form-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .sh101-list-status { align-items: flex-start; }
  .sh101-btn,
  .sh101-shell .button {
    width: 100%;
  }
  .sh101-hero-art { display: none; }
}

/* ===================== RESPONSIVE — v6.2.7 =====================
   The block above only reflowed four containers, so on a phone the customer
   surfaces still had: 4-across stat cards squeezed to ~70px, scope tiles and
   sub-order cards in fixed multi-column grids, tables wider than the viewport,
   and 14px selects — which iOS silently zooms into, throwing the page sideways.
   Everything here is layout only; no colour, type scale or spacing token moves. */

@media (max-width: 900px) {
  .sh101-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh101-scope-grid,
  .sh101-suborder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh101-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  /* one column, and let long order numbers / store names wrap instead of
     forcing the row wider than the screen */
  .sh101-cards,
  .sh101-scope-grid,
  .sh101-suborder-grid,
  .sh101-meta-grid { grid-template-columns: minmax(0, 1fr); }
  .sh101-card,
  .sh101-list-row,
  .sh101-message,
  .sh101-meta-grid > div { min-width: 0; }
  .sh101-card-value { font-size: 26px; }
  .sh101-list-title,
  .sh101-list-meta,
  .sh101-message p { overflow-wrap: anywhere; }

  /* 16px is the threshold below which iOS zooms on focus */
  .sh101-shell input[type="text"],
  .sh101-shell input[type="email"],
  .sh101-shell input[type="number"],
  .sh101-shell input[type="search"],
  .sh101-shell select,
  .sh101-shell textarea { font-size: 16px !important; }
  .sh101-select-wrap select { padding-right: 38px; }

  /* tables scroll in place rather than stretching the layout */
  .sh101-table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sh101-table thead th,
  .sh101-table tbody td { white-space: nowrap; }

  /* thread: give the message body the width back */
  .sh101-thread { gap: 12px; }
  .sh101-message { padding: 14px; }
  .sh101-message header { gap: 4px; }

  /* stacked buttons need real gaps, not the row's justify spacing */
  .sh101-form-footer { gap: 10px; }
  .sh101-quick { flex-direction: column; align-items: stretch; gap: 10px; }
  .sh101-quick .sh101-btn { width: 100%; }

  /* the order-page entry points sit under the order table on mobile */
  .sh101-order-help { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sh101-order-help .sh101-btn { width: 100%; }
  .sh101-suborder-banner-head { gap: 4px; }

  .sh101-pill { white-space: nowrap; }
  .sh101-list-updated { font-size: 11.5px; }
}

@media (max-width: 380px) {
  .sh101-hero, .sh101-panel { padding: 14px; }
  .sh101-scope-tile-desc { display: none; }
}


/* ===================== CONTRAST & CONTAINMENT — v6.2.8 =====================
   Reported from a 400px viewport: the selected scope tile's text went white on
   pale green, "Create ticket" rendered grey-on-grey, status pills were pale on
   pale, ticket titles clipped mid-word, the panel overflowed sideways, and the
   sticky mobile nav sat on top of the last row. All of these are the theme
   winning the cascade on generic button/label/select rules — hence the
   explicit, scoped overrides here rather than edits above. */

.sh101-shell { max-width: 100%; }
.sh101-shell,
.sh101-shell .sh101-panel,
.sh101-shell .sh101-hero { overflow-wrap: break-word; }
.sh101-shell input,
.sh101-shell select,
.sh101-shell textarea { max-width: 100%; }

/* primary / ghost buttons: the theme was overriding both background and text */
.sh101-shell .sh101-btn-primary,
.sh101-shell button.sh101-btn-primary,
.sh101-shell a.sh101-btn-primary {
  background: var(--sh101-primary) !important;
  border-color: var(--sh101-primary) !important;
  color: #fff !important;
  opacity: 1 !important;
}
.sh101-shell .sh101-btn-primary:hover,
.sh101-shell button.sh101-btn-primary:hover {
  background: var(--sh101-primary-700) !important;
  border-color: var(--sh101-primary-700) !important;
}
.sh101-shell .sh101-btn-ghost,
.sh101-shell button.sh101-btn-ghost {
  background: #fff !important;
  color: var(--sh101-text) !important;
  border: 1.5px solid var(--sh101-border-strong) !important;
}
.sh101-shell .sh101-btn[disabled],
.sh101-shell .sh101-btn:disabled { opacity: .5 !important; }

/* scope tiles: keep the copy readable in the selected state, and show the tick
   only on the tile that is actually chosen */
.sh101-shell .sh101-scope-tile-title { color: var(--sh101-text) !important; }
.sh101-shell .sh101-scope-tile-desc  { color: var(--sh101-muted) !important; }
.sh101-shell .sh101-scope-tile input[type="radio"]:checked ~ .sh101-scope-tile-inner .sh101-scope-tile-title { color: var(--sh101-primary-900) !important; }
.sh101-shell .sh101-scope-tile input[type="radio"]:checked ~ .sh101-scope-tile-inner .sh101-scope-tile-desc  { color: var(--sh101-text-soft) !important; }
.sh101-shell .sh101-scope-tile-check { opacity: 0; background: transparent; color: transparent; border-color: var(--sh101-border) !important; }
.sh101-shell .sh101-scope-tile input[type="radio"]:checked ~ .sh101-scope-tile-inner .sh101-scope-tile-check {
  opacity: 1;
  background: var(--sh101-primary) !important;
  border-color: var(--sh101-primary) !important;
  color: #fff !important;
}

/* status pills: solid pairs, so "Open" stops disappearing into the card */
.sh101-shell .sh101-pill { border: 1px solid transparent; }
.sh101-shell .sh101-pill-info    { background: var(--sh101-soft) !important; color: var(--sh101-primary-900) !important; border-color: rgba(47,133,110,.28) !important; }
.sh101-shell .sh101-pill-warn    { background: #FBEBD9 !important; color: #8A4A16 !important; border-color: rgba(138,74,22,.22) !important; }
.sh101-shell .sh101-pill-success { background: var(--sh101-success-soft) !important; color: var(--sh101-success) !important; border-color: rgba(30,107,86,.24) !important; }
.sh101-shell .sh101-pill-muted   { background: #EFECE5 !important; color: #5F6360 !important; border-color: rgba(95,99,96,.20) !important; }
.sh101-shell .sh101-pill-danger  { background: var(--sh101-danger-soft) !important; color: var(--sh101-danger) !important; border-color: rgba(183,38,44,.22) !important; }

@media (max-width: 600px) {
  /* titles wrap over two lines instead of being cut mid-word */
  .sh101-shell .sh101-list-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
  }
  /* clear the site's sticky bottom nav */
  .sh101-shell { padding-bottom: 84px; }
  .sh101-scope-tile-inner { padding: 14px; }
  .sh101-scope-tile-check { top: 10px; right: 10px; }
}
