.production-body {
  --bg: #f9f4f2;
  --signature: #08a2a5;
  --signature-dark: #069a9d;
  --text: #15161a;
  --text-soft: rgba(21, 22, 26, 0.62);
  --panel: #8d8f92;
  --line: #2f3033;
  --white: #ffffff;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --border-soft: rgba(47, 48, 51, 0.1);
  --border-control: rgba(47, 48, 51, 0.2);
  --shadow-card: 0 4px 24px rgba(21, 22, 26, 0.06);
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.auth-body {
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(520px, calc(100vw - 32px));
}

.auth-card {
  padding: 32px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-card);
}

.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-brand img {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: contain;
}

.auth-brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.auth-copy {
  margin: 0 0 20px;
  color: var(--text-soft);
}

.auth-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 48, 43, 0.3);
  border-radius: 12px;
  background: rgba(196, 48, 43, 0.08);
  color: #9f241f;
  font-weight: 800;
}

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

.auth-powered-by.sidebar-powered-by {
  justify-content: center;
  width: 100%;
  padding: 20px 6px 0;
}

.auth-powered-by .sidebar-powered-expanded {
  justify-content: center;
}

.password-field {
  display: grid;
  align-items: center;
}

.password-field input {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding-right: 44px;
}

.sidebar-logout-form,
.admin-logout-form {
  margin: 0;
}

.sidebar-logout-form {
  width: 100%;
}

.logout-tab {
  border-color: var(--border-control) !important;
  background: rgba(255, 255, 255, 0.45) !important;
}

.admin-logout-form {
  margin: 24px 0 0;
  padding: 0;
}

.admin-logout-btn {
  min-width: 120px;
  border: 1.6px solid #c4302b;
  border-radius: var(--radius);
  background: transparent;
  color: #c4302b;
  font: inherit;
  font-weight: 900;
  padding: 10px 18px;
  cursor: pointer;
}

.admin-logout-btn:hover {
  background: rgba(196, 48, 43, 0.08);
  border-color: #a82824;
  color: #a82824;
}

.locked-control {
  cursor: not-allowed;
  opacity: 0.72;
}

.role-lock-note {
  color: #9f6b12;
  font-weight: 800;
}

.production-body *,
.production-body *::before,
.production-body *::after {
  box-sizing: border-box;
}

.production-app {
  --sidebar-expanded-width: 280px;
  --sidebar-collapsed-width: 80px;
  --sidebar-transition: 0.5s ease-in-out;
  --sidebar-text-fade: 0.32s ease;
  display: flex;
  min-height: 100vh;
}

.sidebar-shell {
  position: sticky;
  top: 0;
  width: var(--sidebar-expanded-width);
  height: 100vh;
  flex: 0 0 auto;
  z-index: 20;
  overflow: visible;
  transition: width var(--sidebar-transition);
}

.production-app.sidebar-collapsed .sidebar-shell {
  width: var(--sidebar-collapsed-width);
}

.app-sidebar {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.58);
  border-right: 1.6px solid var(--border-soft);
  color: var(--text);
  overflow: hidden;
  transition: padding var(--sidebar-transition);
}

.production-app.sidebar-collapsed .app-sidebar {
  padding: 24px 10px;
}

.production-app.sidebar-collapsed.sidebar-animating .app-sidebar {
  padding: 24px 16px;
}

.sidebar-edge-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  width: 32px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.6px solid var(--border-soft);
  border-left: none;
  border-radius: 0 16px 16px 0;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--text);
  cursor: pointer;
  z-index: 30;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.sidebar-edge-toggle-icons {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sidebar-edge-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.sidebar-edge-arrow.is-collapse {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.production-app.sidebar-collapsed .sidebar-edge-arrow.is-collapse {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
}

.production-app.sidebar-collapsed .sidebar-edge-arrow.is-expand {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.production-body .sidebar-edge-toggle {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--white);
  color: var(--text);
  border-color: var(--border-soft);
}

.production-body .sidebar-edge-toggle:hover {
  background: rgba(8, 162, 165, 0.08);
  color: var(--signature-dark);
  border-color: rgba(8, 162, 165, 0.45);
  box-shadow: 0 6px 20px rgba(8, 162, 165, 0.12);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 8px 6px 20px;
  border-bottom: 1.6px solid var(--border-soft);
}

.sidebar-brand-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
  overflow-wrap: anywhere;
}

.sidebar-brand-copy,
.sidebar-kicker,
.sidebar-powered-expanded,
.tab-label {
  min-width: 0;
}

.production-app.sidebar-text-hidden .sidebar-brand-copy,
.production-app.sidebar-text-hidden .sidebar-kicker,
.production-app.sidebar-text-hidden .sidebar-powered-expanded,
.production-app.sidebar-text-hidden .tab-label {
  display: none;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-brand-copy,
.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-kicker,
.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-expanded,
.production-app.sidebar-collapsed:not(.sidebar-animating) .tab-label {
  display: none;
}

.production-app.sidebar-text-reveal .sidebar-brand-copy,
.production-app.sidebar-text-reveal .sidebar-kicker,
.production-app.sidebar-text-reveal .sidebar-powered-expanded,
.production-app.sidebar-text-reveal .tab-label {
  display: block;
  opacity: 0;
}

.production-app.sidebar-text-reveal .sidebar-powered-expanded {
  display: flex;
}

.production-app.sidebar-text-reveal.sidebar-text-reveal-active .sidebar-brand-copy,
.production-app.sidebar-text-reveal.sidebar-text-reveal-active .sidebar-kicker,
.production-app.sidebar-text-reveal.sidebar-text-reveal-active .sidebar-powered-expanded,
.production-app.sidebar-text-reveal.sidebar-text-reveal-active .tab-label {
  opacity: 1;
  transition: opacity 0.22s ease;
}

.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .app-tab,
.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .admin-tab,
.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .logout-tab {
  justify-content: center;
  gap: 0;
  width: 44px;
  min-width: 44px;
  margin-inline: auto;
  padding: 0;
}

.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .sidebar-brand {
  justify-content: center;
  padding-inline: 0;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-bottom,
.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .sidebar-bottom {
  align-items: center;
}

.sidebar-brand strong {
  font-weight: 900;
}

.sidebar-brand small {
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 700;
}

.app-tabs {
  display: grid;
  gap: 8px;
}

.app-tab,
.sidebar-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-radius: var(--radius);
  border: 1.6px solid transparent;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.tab-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.tab-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tab.active .tab-icon,
.admin-tab.active .tab-icon {
  color: inherit;
}

.app-tab:hover,
.sidebar-link:hover {
  border-color: rgba(8, 162, 165, 0.45);
  background: rgba(8, 162, 165, 0.08);
  color: var(--signature-dark);
}

.app-tab.active {
  border-color: var(--line);
  background: var(--signature);
  color: var(--white);
}

.admin-tab.active {
  border-color: var(--line) !important;
  background: var(--signature) !important;
  color: var(--white) !important;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-brand {
  justify-content: center;
  padding-inline: 0;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
.production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
.production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab {
  justify-content: center;
  gap: 0;
  width: 44px;
  min-width: 44px;
  margin-inline: auto;
  padding: 0;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-powered-by {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0 6px 16px;
}

.sidebar-powered-expanded {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-powered-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-powered-logo {
  height: 24px;
  width: auto;
  max-width: 160px;
  display: block;
  flex-shrink: 1;
  min-width: 0;
  object-fit: contain;
}

.sidebar-powered-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  opacity: 0;
  object-fit: contain;
  pointer-events: none;
  transition: opacity var(--sidebar-text-fade);
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-icon,
.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .sidebar-powered-icon {
  opacity: 1;
  pointer-events: auto;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-expanded,
.production-app.sidebar-text-hidden .sidebar-powered-expanded {
  display: none;
}

.production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-by,
.production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .sidebar-powered-by {
  justify-content: center;
  padding-inline: 0;
  padding-bottom: 12px;
}

.production-app:not(.sidebar-collapsed):not(.sidebar-animating) .sidebar-powered-icon,
.production-app.sidebar-animating:not(.sidebar-text-hidden) .sidebar-powered-icon {
  display: none;
}

.sidebar-footer {
  padding-top: 12px;
  border-top: 1.6px solid var(--border-soft);
}

.sidebar-kicker {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-tab {
  border-color: var(--border-control) !important;
  background: rgba(255, 255, 255, 0.45) !important;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  width: min(1440px, 100%);
  padding: 32px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 24px;
}

.app-header h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.app-header p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-weight: 700;
  max-width: 760px;
}

.app-header .page-subtitle--single-line {
  max-width: none;
  white-space: nowrap;
}

.header-actions,
.panel-actions,
.form-actions,
.store-actions,
.drawer-actions,
.local-test-actions,
.local-downloads {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.app-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -10px 0 18px;
  padding: 12px 14px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-weight: 900;
  box-shadow: var(--shadow-card);
}

.app-status-ready {
  display: none;
}

.app-status-loading {
  border-color: rgba(8, 162, 165, 0.26);
}

.app-status-error {
  border-color: rgba(185, 28, 28, 0.32);
  background: #fff7f7;
  color: #9f241f;
}

.production-body button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--signature);
  color: var(--white);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.production-body button:hover {
  background: var(--signature-dark);
}

.production-body button:focus-visible,
.production-body a:focus-visible,
.production-body input:focus-visible,
.production-body select:focus-visible,
.production-body summary:focus-visible {
  outline: 3px solid rgba(8, 162, 165, 0.28);
  outline-offset: 2px;
}

.production-body button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.production-body .password-field .password-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  width: 32px;
  height: 32px;
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 400;
}

.production-body .password-field .password-toggle:hover {
  color: var(--signature-dark);
  background: rgba(8, 162, 165, 0.08);
}

.production-body .password-field .password-toggle .tab-icon {
  width: 20px;
  height: 20px;
}

.production-body .password-field .password-toggle .icon-hide {
  display: none;
}

.production-body .password-field .password-toggle.is-visible .icon-show {
  display: none;
}

.production-body .password-field .password-toggle.is-visible .icon-hide {
  display: block;
}

.production-body .app-tab {
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.production-body .app-tab:hover {
  border-color: rgba(8, 162, 165, 0.45);
  background: rgba(8, 162, 165, 0.08);
  color: var(--signature-dark);
}

.production-body .app-tab.active,
.production-body .admin-tab.active {
  border-color: var(--line);
  background: var(--signature);
  color: var(--white);
}

.production-body .admin-tab.active {
  border-color: var(--line) !important;
  background: var(--signature) !important;
  color: var(--white) !important;
}

.production-body button.secondary,
.production-body .secondary {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border-color: var(--border-control);
}

.production-body button.secondary:hover,
.production-body .secondary:hover {
  background: rgba(8, 162, 165, 0.08);
  color: var(--signature-dark);
  border-color: var(--signature);
}

.production-body .btn-segmented.production-cta {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  min-height: 46px;
  background: var(--signature);
  color: var(--white);
}

.production-cta .btn-label {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
}

.production-cta .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-left: 1.6px solid rgba(255, 255, 255, 0.35);
  font-size: 19px;
}

.compact-action {
  min-height: 36px;
  padding: 0 12px;
}

.production-body .manual-action-btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 18px;
}

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

.stat,
.surface-panel {
  min-width: 0;
  background: var(--white);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stat {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
}

.stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stat span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.stat small {
  color: var(--text-soft);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dashboard-layout,
.split-layout,
.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.surface-panel {
  padding: 20px;
  overflow: hidden;
}

.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.panel-kicker {
  margin: 0 0 6px !important;
  color: var(--signature) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-transform: uppercase;
}

.panel-head select {
  min-width: 220px;
  max-width: 100%;
}

.store-focus-panel {
  overflow: visible;
}

.store-focus-head {
  align-items: center;
}

.store-selector-shell {
  display: grid;
  gap: 6px;
  min-width: 280px;
  padding: 10px;
  border: 1.6px solid var(--signature);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(36, 25, 20, 0.08);
}

.store-selector-shell span {
  color: var(--signature);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-selector-shell select {
  min-width: 260px;
  border-color: transparent;
  background-color: var(--surface);
}

.selected-store-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1.48fr);
  gap: 14px;
  min-width: 0;
}

.inline-focus-panel {
  margin: 0 0 16px;
  padding: 16px;
  border: 1.6px solid var(--signature);
  border-radius: var(--radius);
  background: rgba(249, 244, 242, 0.58);
}

.inline-run-summary {
  display: grid;
  margin-top: 14px;
}

.store-run-summary {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1.6px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.summary-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.summary-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

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

.summary-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.store-profile,
.store-metrics,
.empty-state,
.health-item,
.activity-item,
.store-item {
  min-width: 0;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(249, 244, 242, 0.42);
}

.empty-state-actionable {
  display: grid;
  gap: 8px;
}

.empty-state-actionable strong {
  font-size: 15px;
}

.empty-state-actionable p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 800;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.store-profile h3,
.store-metrics h3 {
  margin: 0 0 8px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 6px;
}

.detail-list dt {
  color: var(--text-soft);
  font-weight: 800;
}

.detail-list dd {
  min-width: 0;
  margin: 0;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.metric-row,
.local-test-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.testing-mode-panel {
  border-color: rgba(8, 162, 165, 0.24);
}

.testing-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-color: rgba(146, 64, 14, 0.25);
  background: #fffbeb;
}

.testing-banner h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.testing-banner p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-weight: 800;
}

.operations-alert-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.operations-alert-banner h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.operations-alert-banner p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-weight: 800;
}

.operations-alert-banner--warning {
  border-color: rgba(146, 64, 14, 0.25);
  background: #fffbeb;
}

.operations-alert-banner--critical,
.operations-alert-banner--expired {
  border-color: rgba(185, 28, 28, 0.25);
  background: #fef2f2;
}

.operations-alert-banner--unknown {
  border-color: rgba(30, 64, 175, 0.2);
  background: #eff6ff;
}

.mdp-token-guard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 12px;
}

.mdp-token-guard__copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.mdp-token-guard__copy strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.mdp-token-guard__copy p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.mdp-token-guard--green {
  background: #dcfce7;
  border-color: rgba(4, 120, 87, 0.22);
}

.mdp-token-guard--green .mdp-token-guard__copy strong {
  color: #047857;
}

.mdp-token-guard--green .mdp-token-guard__copy p {
  color: #166534;
}

.mdp-token-guard--yellow {
  background: #fef3c7;
  border-color: rgba(146, 64, 14, 0.25);
}

.mdp-token-guard--yellow .mdp-token-guard__copy strong {
  color: #92400e;
}

.mdp-token-guard--yellow .mdp-token-guard__copy p {
  color: #a16207;
}

.mdp-token-guard--red {
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.24);
}

.mdp-token-guard--red .mdp-token-guard__copy strong {
  color: #b91c1c;
}

.mdp-token-guard--red .mdp-token-guard__copy p {
  color: #991b1b;
}

.mdp-token-guard #mdpTokenGuardAction {
  align-self: center;
}

.testing-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(220px, auto);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.testing-mode-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.testing-note {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-weight: 800;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  white-space: nowrap;
  color: var(--text);
  font-weight: 900;
}

.mode-switch input {
  appearance: none;
  width: 46px;
  height: 26px;
  border: 1.6px solid var(--line);
  border-radius: 999px;
  background: rgba(141, 143, 146, 0.24);
  position: relative;
  cursor: pointer;
}

.mode-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(21, 22, 26, 0.18);
  transition: transform 0.16s;
}

.mode-switch input:checked {
  background: var(--signature);
}

.mode-switch input:checked::after {
  transform: translateX(20px);
}

.metric-box {
  min-width: 0;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--white);
}

.metric-box strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-box span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.settings-status,
.store-operational-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.settings-status {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.settings-status-inline {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.store-operational-grid > div {
  min-width: 0;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--white);
}

.store-operational-grid span,
.store-operational-grid small {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.store-operational-grid strong {
  display: block;
  margin: 2px 0;
  font-size: 17px;
  font-weight: 900;
}

.store-actions-priority {
  align-items: stretch;
  margin-top: 4px;
  width: 100%;
}

.store-action-primary {
  min-width: 160px;
}

.health-list,
.activity-list,
.store-list {
  display: grid;
  gap: 10px;
}

.bar-chart,
.risk-panel,
.driver-mix {
  display: grid;
  gap: 10px;
}

.risk-panel-scroll {
  --risk-card-height: 7.35rem;
  --risk-card-gap: 0.625rem;
  max-height: calc((var(--risk-card-height) * 7) + (var(--risk-card-gap) * 6));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.risk-panel-scroll.has-overflow {
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 8px 10px 10px;
  background: rgba(249, 244, 242, 0.24);
}

.risk-panel-scroll::-webkit-scrollbar {
  width: 8px;
}

.risk-panel-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(8, 162, 165, 0.35);
}

.risk-panel-scroll::-webkit-scrollbar-track {
  background: rgba(21, 22, 26, 0.05);
  border-radius: 999px;
}

.panel-scroll-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.driver-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1.6px solid rgba(8, 162, 165, 0.22);
  border-left: 4px solid var(--signature);
  border-radius: var(--radius);
  background: rgba(8, 162, 165, 0.06);
}

.driver-summary strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.driver-summary span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(140px, 1.4fr) 78px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(249, 244, 242, 0.42);
}

.bar-row-action {
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.bar-row-action:hover,
.bar-row-action:focus-visible {
  border-color: rgba(46, 23, 79, 0.28);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.bar-row-action:active {
  transform: translateY(1px);
}

.bar-label {
  min-width: 0;
}

.bar-label strong,
.bar-label small {
  display: block;
  overflow-wrap: anywhere;
}

.bar-label small {
  color: var(--text-soft);
  font-weight: 800;
}

.bar-track,
.driver-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(141, 143, 146, 0.18);
}

.bar-track span,
.driver-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--signature);
}

.bar-value {
  text-align: right;
  font-weight: 900;
}

.positive {
  color: #047857;
}

.negative {
  color: #b91c1c;
}

.risk-item,
.driver-row {
  min-width: 0;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(249, 244, 242, 0.42);
}

.risk-item header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.risk-item p,
.risk-item small,
.driver-row small {
  display: block;
  margin: 4px 0 0;
  color: var(--text-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.risk-high {
  border-color: rgba(185, 28, 28, 0.28);
}

.risk-medium {
  border-color: rgba(146, 64, 14, 0.28);
}

.risk-low {
  border-color: rgba(4, 120, 87, 0.22);
}

.risk-unavailable {
  border-color: rgba(107, 114, 128, 0.22);
}

.driver-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.72fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: center;
}

.driver-row-explained {
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr);
}

.driver-copy,
.driver-visual {
  min-width: 0;
}

.driver-count {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.health-item,
.activity-item,
.store-item {
  display: grid;
  gap: 12px;
  align-content: start;
}

.health-item header,
.activity-item header,
.store-item header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.health-item strong,
.activity-item strong,
.store-item strong {
  overflow-wrap: anywhere;
}

.health-item p,
.activity-item p,
.store-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-success {
  color: #047857;
}

.status-failed {
  color: #b91c1c;
}

.status-pending_retry {
  color: #92400e;
}

.status-suppressed {
  color: #475569;
}

.pill-success {
  background: #dcfce7;
  color: #047857;
}

.pill-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.pill-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.pill-warning {
  background: #fef3c7;
  color: #92400e;
}

.pill-suppressed {
  background: #e2e8f0;
  color: #475569;
}

.pill-pending_retry {
  background: #fef3c7;
  color: #92400e;
}

.pill-running {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill-skipped {
  background: rgba(141, 143, 146, 0.18);
  color: var(--text-soft);
}

.pill-not_run {
  background: rgba(141, 143, 146, 0.18);
  color: var(--text);
}

.pill-unknown {
  background: rgba(141, 143, 146, 0.18);
  color: var(--text);
}

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

.event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: start;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.event-item strong,
.event-item p,
.event-item small {
  overflow-wrap: anywhere;
}

.event-item p {
  margin: 4px 0;
  color: var(--text-soft);
  font-weight: 700;
}

.event-item pre {
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(246, 243, 241, 0.9);
  border: 1px solid var(--border-soft);
  white-space: pre-wrap;
  font-size: 12px;
}

.event-alert-status {
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-weight: 800;
}

.production-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.production-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.production-form input,
.production-form select,
.panel-head select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1.6px solid var(--border-control);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.production-form input:focus,
.production-form select:focus,
.panel-head select:focus {
  outline: none;
  border-color: var(--signature);
  box-shadow: 0 0 0 3px rgba(8, 162, 165, 0.12);
}

.production-form h3 {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 900;
}

.form-help {
  margin: -6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.manual-batch-wizard-card {
  width: min(560px, 100%);
  gap: 28px;
  padding: 28px 28px 24px;
}

.manual-batch-wizard-head {
  display: block;
  margin-bottom: 0;
}

.manual-batch-wizard-head h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.25;
}

.manual-batch-wizard-subtitle {
  margin: 12px 0 0 !important;
  max-width: 46ch;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.65 !important;
}

.manual-batch-wizard-body {
  display: grid;
  gap: 20px;
  margin-top: 4px;
}

.manual-batch-step-intro {
  margin: 0 0 2px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.manual-batch-wizard-body .report-date-picker-label {
  margin-bottom: 0;
}

.manual-batch-options {
  margin: 0;
  padding: 14px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg);
  display: grid;
  gap: 10px;
}

.production-body .manual-batch-option {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: inherit;
  justify-content: start;
  align-items: start;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.production-body .manual-batch-option:hover {
  border-color: rgba(8, 162, 165, 0.35);
  background: var(--white);
  color: var(--text);
}

.production-body .manual-batch-option.is-selected {
  border-color: rgba(8, 162, 165, 0.55);
  background: rgba(8, 162, 165, 0.12);
  color: var(--text);
}

.production-body .manual-batch-option.is-selected:hover {
  background: rgba(8, 162, 165, 0.12);
  color: var(--text);
  border-color: rgba(8, 162, 165, 0.55);
}

.production-body .manual-batch-option:focus-visible {
  outline: 2px solid rgba(8, 162, 165, 0.55);
  outline-offset: 2px;
}

.manual-batch-option-title {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}

.manual-batch-option.is-selected .manual-batch-option-title {
  color: var(--signature-dark);
}

.manual-batch-option-note {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-soft);
}

.report-choice-grid,
.report-page-grid {
  display: grid;
  gap: 0.75rem;
}

.report-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-page-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-choice-card,
.report-page-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem;
}

.report-choice-card input,
.report-page-card input,
.report-output-options .manual-batch-option input {
  margin-top: 0.18rem;
}

.production-body input[type="checkbox"] {
  accent-color: var(--signature);
  cursor: pointer;
}

.production-body .mode-switch input[type="checkbox"] {
  accent-color: auto;
}

.production-body .report-choice-card:has(input:checked),
.production-body .report-page-card:has(input:checked),
.production-body .calendar-day-toggle:has(input:checked) {
  border-color: rgba(8, 162, 165, 0.45);
  background: rgba(8, 162, 165, 0.04);
}

.report-choice-card strong,
.report-page-card strong {
  color: var(--text);
  display: block;
  font-size: 0.92rem;
}

.report-choice-card small,
.report-page-card small {
  color: var(--text-soft);
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.report-output-options .manual-batch-option {
  cursor: pointer;
}

.manual-batch-date-field {
  gap: 12px;
}

.manual-batch-date-field input[type="date"],
.manual-batch-date-field select {
  min-height: 48px;
}

.manual-batch-summary {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1.6px solid var(--border-soft);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg);
}

.manual-batch-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.manual-batch-summary-row strong {
  font-weight: 800;
  text-align: right;
}

.manual-batch-wizard-actions {
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1.6px solid var(--border-soft);
}

.manual-batch-wizard-actions #manualBatchModalNextBtn {
  margin-left: auto;
}

.dashboard-backfill-fields {
  margin-top: 4px;
}

.batch-job-progress {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(8, 162, 165, 0.06);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.35s ease;
}

.batch-job-progress.is-running,
.batch-job-progress.is-complete {
  border-color: rgba(8, 162, 165, 0.28);
  background: rgba(8, 162, 165, 0.06);
  box-shadow: 0 0 0 1px rgba(8, 162, 165, 0.08);
}

.batch-job-progress.is-failed {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.07);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.batch-job-progress.is-complete .batch-job-progress-head strong,
.batch-job-progress.is-failed .batch-job-progress-head strong {
  letter-spacing: 0.01em;
}

.batch-job-progress.is-failed .batch-job-progress-bar span {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.batch-job-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.batch-job-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(21, 22, 26, 0.08);
  overflow: hidden;
}

.batch-job-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--signature) 0%, var(--signature-dark) 100%);
  transition: width 0.2s ease;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.field-row,
.field-row.three,
.field-row.four,
.field-row.five,
.field-row.compact,
.local-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

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

.local-test-grid .span-2 {
  grid-column: 1 / -1;
}

.schedule-grid {
  display: grid;
  gap: 8px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  min-width: 0;
}

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

.rule-grid label {
  padding: 12px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.rule-grid label span {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.calendar-weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 8px;
  min-width: 0;
}

.calendar-day-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 900;
}

.calendar-day-toggle input {
  width: auto;
  min-height: auto;
}

.calendar-overrides {
  display: grid;
  gap: 8px;
}

.calendar-override-row {
  display: grid;
  grid-template-columns: minmax(136px, 0.9fr) minmax(96px, 0.55fr) minmax(112px, 0.7fr) minmax(112px, 0.7fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.inherited-disabled {
  opacity: 0.58;
}

.inherited-note {
  padding: 10px 12px;
  border: 1.6px solid rgba(8, 162, 165, 0.22);
  border-left: 4px solid var(--signature);
  border-radius: var(--radius);
  background: rgba(8, 162, 165, 0.06);
}

.chart-color-grid input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 4px;
  border-radius: var(--radius);
  cursor: pointer;
}

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

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(150px, 180px);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(249, 244, 242, 0.42);
}

.table-toolbar label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.table-toolbar input,
.table-toolbar select {
  width: 100%;
  min-height: 40px;
  border: 1.6px solid var(--border-control);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

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

th,
td {
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  padding: 10px 8px;
  font-size: 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
  color: var(--text-soft);
  font-weight: 900;
}

.local-test-panel {
  max-width: 1060px;
}

.local-test-results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1.6px solid var(--border-soft);
}

.settings-panel {
  max-width: 980px;
}

.settings-stack {
  display: grid;
  gap: 18px;
  max-width: 980px;
}

.settings-stack > .surface-panel {
  margin: 0;
  display: grid;
  gap: 14px;
}

.settings-save-panel .form-actions {
  margin: 0;
  padding: 0;
  border-top: none;
}

.settings-form {
  max-width: none;
}

.settings-subsection {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 16px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.subsection-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.subsection-head h3 {
  margin: 0;
}

.subsection-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.schedule-summary {
  margin: 0;
  padding: 12px 14px;
  border: 1.6px solid var(--border-soft);
  border-left: 4px solid var(--signature);
  border-radius: var(--radius);
  background: rgba(8, 162, 165, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(21, 22, 26, 0.28);
}

.store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: min(720px, 100vw);
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  background: var(--bg);
  border-left: 2px solid var(--border-soft);
  box-shadow: -18px 0 48px rgba(21, 22, 26, 0.16);
  transform: translateX(104%);
  transition: transform 0.18s ease;
}

.store-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 22px;
  background: var(--white);
  border-bottom: 1.6px solid var(--border-soft);
}

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

.drawer-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.drawer-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.drawer-form-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.drawer-open,
.modal-open {
  overflow: hidden;
}

.report-date-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(21, 22, 26, 0.32);
}

.report-date-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.report-date-modal-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px 22px 20px;
  border: 1.6px solid var(--border-soft);
  border-radius: calc(var(--radius) + 2px);
  background: var(--white);
  box-shadow: 0 24px 64px rgba(21, 22, 26, 0.18);
}

.report-date-modal-head {
  margin: 0;
}

.report-date-picker-label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.report-date-picker-label input[type="date"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.report-date-picker-label input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.72;
}

.report-date-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.run-issue-modal-card {
  width: min(760px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
  padding: 22px 24px 20px;
}

.run-issue-modal-head {
  margin: 0;
}

.run-issue-modal-head h2 {
  margin-top: 4px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.run-issue-modal-head p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.run-issue-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.run-issue-controls-row {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.run-issue-retry-schedule {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}

.run-issue-retry-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.run-issue-retry-delay-row {
  display: contents;
}

.run-issue-retry-delay-row input,
.run-issue-retry-delay-row select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  font: inherit;
  background: var(--white);
}

.run-issue-retry-delay-row input {
  width: 72px;
}

.run-issue-retry-delay-row select {
  width: 108px;
}

.run-issue-retry-preview {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.run-issue-modal textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  font: inherit;
  resize: none;
}

.run-issue-note-label {
  margin: 0;
  height: 100%;
}

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

.run-issue-meta-item {
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-muted);
}

.run-issue-meta-item span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.run-issue-meta-item strong {
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}

.run-issue-error-block {
  border: 1.6px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius);
  background: rgba(254, 226, 226, 0.45);
  padding: 10px 12px;
  margin-bottom: 0;
  height: 100%;
}

.run-issue-error-block span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.run-issue-error-block p {
  margin: 0;
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}

.run-issue-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.run-issue-modal-actions {
  margin-top: 0;
}

@media (max-width: 720px) {
  .run-issue-main-grid,
  .run-issue-controls-row,
  .run-issue-meta {
    grid-template-columns: 1fr;
  }

  .run-issue-retry-schedule {
    grid-template-columns: 1fr;
  }

  .run-issue-retry-delay-row {
    display: grid;
    grid-template-columns: 72px 108px;
    gap: 10px;
  }
}

.run-row-actionable {
  cursor: pointer;
}

.run-row-actionable td {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.run-row-actionable:hover td,
.run-row-actionable:focus-within td {
  background: rgba(15, 118, 110, 0.07);
}

.run-row-actionable td:first-child {
  box-shadow: inset 3px 0 0 rgba(15, 118, 110, 0.28);
}

.run-row-actionable:hover td:first-child,
.run-row-actionable:focus-within td:first-child {
  box-shadow: inset 3px 0 0 #0f766e;
}

.run-row-action-cue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.18);
  white-space: nowrap;
}

.run-row-actionable:hover .run-row-action-cue,
.run-row-actionable:focus-within .run-row-action-cue {
  background: rgba(15, 118, 110, 0.18);
}

.activity-item.run-row-actionable {
  border: 1.6px dashed rgba(15, 118, 110, 0.28);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.activity-item.run-row-actionable:hover,
.activity-item.run-row-actionable:focus-within {
  border-color: rgba(15, 118, 110, 0.55);
  background: rgba(15, 118, 110, 0.05);
}

.table-interaction-hint {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.run-operator-note {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.run-retry-flag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(234, 179, 8, 0.18);
  color: #854d0e;
}

.run-issue-hint {
  margin-top: 6px;
  font-size: 0.88rem;
}

.drawer-section {
  border: 1.6px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--white);
  overflow: visible;
  min-width: 0;
  width: 100%;
  align-self: stretch;
}

.drawer-section summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.drawer-section summary::-webkit-details-marker {
  display: none;
}

.drawer-section summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 162, 165, 0.08);
  color: var(--signature-dark);
  font-size: 18px;
  line-height: 1;
}

.drawer-section[open] summary {
  border-bottom: 1.6px solid var(--border-soft);
  background: var(--white);
}

.drawer-section[open] summary::after {
  content: "-";
}

.drawer-section-body {
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.drawer-section[open] .drawer-section-body {
  display: grid;
}

.drawer-section:not([open]) > :not(summary) {
  display: none;
}

.drawer-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 16px 22px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1.6px solid var(--border-soft);
  box-shadow: 0 -10px 24px rgba(21, 22, 26, 0.06);
}

.store-drawer .field-row,
.store-drawer .field-row.three,
.store-drawer .rule-grid {
  gap: 14px;
}

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

.store-drawer .calendar-weekday-grid,
.store-drawer .calendar-override-row {
  grid-template-columns: 1fr;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  padding: 12px 14px;
  border: 1.6px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-card);
  font-weight: 900;
  animation: toast-in 0.18s ease;
}

.toast-success {
  border-color: rgba(8, 162, 165, 0.45);
}

.toast-error {
  border-color: rgba(185, 28, 28, 0.42);
  color: #b91c1c;
}

.toast-exit {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .production-app {
    display: block;
  }

  .sidebar-shell {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
  }

  .production-app.sidebar-collapsed .sidebar-shell {
    width: auto;
  }

  .app-sidebar {
    height: auto;
    overflow: visible;
    padding: 24px 18px;
  }

  .production-app.sidebar-collapsed .app-sidebar {
    padding: 24px 18px;
  }

  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-brand-copy,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-kicker,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .tab-label,
  .production-app.sidebar-text-hidden .sidebar-brand-copy,
  .production-app.sidebar-text-hidden .sidebar-kicker,
  .production-app.sidebar-text-hidden .tab-label {
    display: block;
  }

  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-expanded,
  .production-app.sidebar-text-hidden .sidebar-powered-expanded {
    display: flex;
  }

  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-icon,
  .production-app.sidebar-text-hidden .sidebar-powered-icon {
    display: none;
  }

  .production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab,
  .production-app.sidebar-animating .app-tab,
  .production-app.sidebar-animating .admin-tab,
  .production-app.sidebar-animating .logout-tab {
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding: 0 14px;
  }

  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-footer,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-bottom,
  .production-app.sidebar-animating .sidebar-footer,
  .production-app.sidebar-animating .sidebar-bottom {
    display: block;
  }

  .sidebar-edge-toggle {
    display: none;
  }

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

  .sidebar-footer {
    margin-top: 0;
  }

  .dashboard-layout,
  .split-layout,
  .analytics-grid,
  .testing-mode-grid,
  .summary-stat-grid,
  .selected-store-overview,
  .testing-banner,
  .operations-alert-banner,
  .mdp-token-guard,
  .settings-status {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-main {
    padding: 20px;
  }

  .app-header,
  .panel-head {
    grid-template-columns: 1fr;
  }

  .app-tabs,
  .kpi-grid,
  .table-toolbar,
  .field-row,
  .field-row.three,
  .field-row.four,
  .field-row.five,
  .field-row.compact,
  .local-test-grid,
  .metric-row,
  .local-test-summary,
  .store-operational-grid,
  .summary-head,
  .summary-stat-grid,
  .rule-grid,
  .subsection-head,
  .bar-row,
  .driver-row,
  .calendar-weekday-grid,
  .calendar-override-row {
    grid-template-columns: 1fr;
  }

  .bar-value {
    text-align: left;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .panel-head select {
    min-width: 0;
  }
}

/* Responsive hardening for tablet and mobile production use. */
html {
  -webkit-text-size-adjust: 100%;
}

.production-body {
  overflow-x: hidden;
}

.production-app,
.app-main,
.surface-panel,
.stat,
.metric-box,
.store-item,
.selected-store-overview,
.inline-focus-panel,
.settings-subsection {
  min-width: 0;
}

.surface-panel,
.stat,
.metric-box,
.store-item,
.store-operational-grid strong,
.store-operational-grid span,
.store-operational-grid small,
.detail-list dd,
.detail-list dt,
.panel-head h2,
.app-header h1 {
  overflow-wrap: anywhere;
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
}

.header-actions,
.panel-actions,
.drawer-actions,
.local-test-actions,
.testing-mode-actions {
  flex-wrap: wrap;
}

.header-actions > *,
.panel-actions > *,
.drawer-actions > *,
.local-test-actions > *,
.testing-mode-actions > * {
  min-width: 0;
}

@media (max-width: 768px) {
  .sidebar-shell {
    position: sticky;
    top: 0;
    z-index: 25;
    border-bottom: 1.6px solid var(--border-soft);
    background: var(--white);
  }

  .app-sidebar,
  .production-app.sidebar-collapsed .app-sidebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: var(--white);
    border-right: 0;
  }

  .sidebar-brand {
    min-height: 0;
    padding: 0;
    border-bottom: 0;
  }

  .sidebar-brand-logo {
    width: 50px;
    height: 50px;
  }

  .app-tabs {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding: 2px 0 6px;
  }

  .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab,
  .production-app.sidebar-animating .app-tab,
  .production-app.sidebar-animating .admin-tab,
  .production-app.sidebar-animating .logout-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 44px;
    padding: 0 14px;
  }

  .sidebar-bottom {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    margin-top: 0;
  }

  .sidebar-powered-by {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .sidebar-logout-form {
    margin: 0;
  }

  .admin-tab,
  .logout-tab {
    margin-top: 0;
  }

  .app-main {
    width: 100%;
    max-width: none;
    padding: 26px;
  }

  .app-header {
    gap: 16px;
  }

  .app-header h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  .page-subtitle--single-line {
    white-space: normal;
  }

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

  .selected-store-overview {
    grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  }

  .summary-stat-grid,
  .testing-mode-grid,
  .settings-status,
  .local-test-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .app-sidebar,
  .production-app.sidebar-collapsed .app-sidebar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .sidebar-brand {
    justify-content: center;
  }

  .sidebar-bottom {
    justify-content: center;
  }

  .sidebar-footer {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .app-header,
  .panel-head,
  .testing-banner,
  .operations-alert-banner,
  .mdp-token-guard,
  .subsection-head,
  .drawer-head {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .panel-actions {
    width: 100%;
  }

  .header-actions button,
  .panel-actions button,
  .panel-actions .button-link {
    flex: 1 1 190px;
  }

  .kpi-grid,
  .analytics-grid,
  .dashboard-layout,
  .split-layout,
  .selected-store-overview,
  .summary-stat-grid,
  .testing-mode-grid,
  .settings-status,
  .local-test-summary,
  .store-operational-grid,
  .field-row,
  .field-row.three,
  .field-row.four,
  .field-row.five,
  .field-row.compact,
  .local-test-grid,
  .rule-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .store-selector-shell,
  .store-selector-shell select,
  .panel-head select {
    width: 100%;
    min-width: 0;
  }

  .store-drawer {
    width: 100vw;
    border-left: 0;
  }

  .drawer-head {
    padding: 18px;
  }

  .drawer-form-scroll {
    padding: 18px;
  }

  .drawer-actions {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  .production-body {
    background:
      radial-gradient(circle at 18% -6%, rgba(8, 162, 165, 0.08), transparent 30%),
      var(--bg);
  }

  .app-sidebar,
  .production-app.sidebar-collapsed .app-sidebar {
    padding: 10px 12px;
  }

  .sidebar-brand {
    justify-content: flex-start;
  }

  .sidebar-brand-logo {
    width: 44px;
    height: 44px;
  }

  .sidebar-brand-copy strong {
    font-size: 18px;
  }

  .sidebar-brand-copy small {
    font-size: 13px;
  }

  .app-tabs {
    margin-inline: -2px;
    padding-bottom: 4px;
  }

  .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab,
  .production-app.sidebar-animating .app-tab,
  .production-app.sidebar-animating .admin-tab,
  .production-app.sidebar-animating .logout-tab {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 14px;
  }

  .tab-icon {
    width: 19px;
    height: 19px;
  }

  .app-main {
    padding: 16px 12px 24px;
  }

  .app-header {
    margin-bottom: 16px;
  }

  .app-header h1 {
    font-size: 28px;
  }

  .app-header p,
  .panel-head p,
  .form-help,
  .subsection-head p {
    font-size: 13px;
  }

  .surface-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .panel-head {
    gap: 12px;
    margin-bottom: 12px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .kpi-grid,
  .analytics-grid,
  .tab-panel,
  .settings-stack,
  .production-form,
  .local-test-results {
    gap: 12px;
  }

  .stat {
    min-height: auto;
    padding: 14px;
  }

  .stat strong {
    font-size: 28px;
  }

  .metric-box {
    min-height: auto;
    padding: 14px;
  }

  .metric-box strong {
    font-size: 22px;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 9px 0;
  }

  .detail-list dd {
    text-align: left;
  }

  .production-form input,
  .production-form select,
  .panel-head select {
    min-height: 46px;
    font-size: 16px;
  }

  .production-form .checkbox-row input,
  .mode-switch input {
    width: auto;
    min-height: auto;
  }

  .checkbox-row {
    align-items: flex-start;
  }

  .schedule-row {
    grid-template-columns: 1fr;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .schedule-row:last-child {
    border-bottom: 0;
  }

  .rule-grid label,
  .settings-subsection {
    padding: 12px;
  }

  .header-actions button,
  .panel-actions button,
  .panel-actions .button-link,
  .testing-mode-actions button,
  .local-test-actions button,
  .drawer-actions button,
  .download-row .button-link,
  .store-actions button {
    width: 100%;
    min-height: 46px;
  }

  .download-row,
  .store-actions,
  .local-test-actions,
  .testing-mode-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .table-wrap {
    border-radius: 12px;
    margin-inline: -2px;
  }

  table {
    min-width: 760px;
  }

  th,
  td {
    padding: 9px 8px;
    font-size: 12px;
  }

  .drawer-backdrop {
    background: rgba(21, 22, 26, 0.34);
  }

  .store-drawer {
    height: 100dvh;
  }

  .drawer-head {
    padding: 16px 14px;
  }

  .drawer-head h2 {
    font-size: 21px;
  }

  .drawer-form-scroll {
    padding: 14px;
  }

  .drawer-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .toast-stack {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .app-main {
    padding-inline: 10px;
  }

  .surface-panel {
    padding: 12px;
  }

  .app-header h1 {
    font-size: 25px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .sidebar-brand-copy strong {
    font-size: 16px;
  }

  .sidebar-brand-copy small {
    font-size: 12px;
  }

  .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab,
  .production-app.sidebar-animating .app-tab,
  .production-app.sidebar-animating .admin-tab,
  .production-app.sidebar-animating .logout-tab {
    padding: 0 10px;
    font-size: 13px;
  }

  table {
    min-width: 700px;
  }
}

@media (hover: none) and (pointer: coarse) {
  button,
  .button-link,
  .app-tab,
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 44px;
  }
}

.production-body .mobile-sidebar-btn,
.production-body .mobile-sidebar-backdrop {
  display: none;
}

.mobile-sidebar-btn {
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1.6px solid var(--border-control);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.mobile-sidebar-btn span {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-sidebar-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-sidebar-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-sidebar-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(21, 22, 26, 0.36);
}

.mobile-nav-locked {
  overflow: hidden;
}

.auth-powered-by.sidebar-powered-by {
  display: flex !important;
}

@media (max-width: 768px) {
  .production-body .mobile-sidebar-btn {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .production-body .mobile-sidebar-backdrop:not([hidden]) {
    display: block;
  }

  .production-app {
    display: block;
  }

  .sidebar-shell,
  .production-app.sidebar-collapsed .sidebar-shell {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: min(330px, calc(100vw - 54px));
    height: 100dvh;
    overflow: visible;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    border-bottom: 0;
    background: transparent;
  }

  .production-app.mobile-sidebar-open .sidebar-shell {
    transform: translateX(0);
  }

  .app-sidebar,
  .production-app.sidebar-collapsed .app-sidebar {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.96);
    border-right: 1.6px solid var(--border-soft);
    box-shadow: 18px 0 42px rgba(21, 22, 26, 0.14);
  }

  .sidebar-brand,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-brand {
    justify-content: flex-start;
    min-height: auto;
    padding: 4px 4px 16px;
    border-bottom: 1.6px solid var(--border-soft);
  }

  .sidebar-brand-copy,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-brand-copy,
  .production-app.sidebar-text-hidden .sidebar-brand-copy,
  .tab-label,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .tab-label,
  .production-app.sidebar-text-hidden .tab-label {
    display: block;
  }

  .app-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .app-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .admin-tab,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .logout-tab,
  .production-app.sidebar-animating .app-tab,
  .production-app.sidebar-animating .admin-tab,
  .production-app.sidebar-animating .logout-tab {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0 14px;
    border-radius: var(--radius);
  }

  .sidebar-bottom,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-bottom,
  .production-app.sidebar-animating .sidebar-bottom {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
  }

  .sidebar-powered-by,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-by,
  .production-app.sidebar-animating.sidebar-text-hidden:not(.sidebar-collapsed) .sidebar-powered-by {
    display: flex;
    justify-content: flex-start;
    padding: 12px 6px 0;
  }

  .sidebar-powered-expanded,
  .production-app.sidebar-collapsed:not(.sidebar-animating) .sidebar-powered-expanded,
  .production-app.sidebar-text-hidden .sidebar-powered-expanded {
    display: flex;
  }

  .sidebar-powered-icon {
    display: none !important;
  }

  .sidebar-footer {
    display: grid;
    gap: 8px;
    max-width: none;
    overflow: visible;
    padding: 12px 0 0;
    border-top: 1.6px solid var(--border-soft);
  }

  .sidebar-logout-form {
    width: 100%;
  }

  .sidebar-edge-toggle {
    display: none !important;
  }

  .app-main {
    width: 100%;
    max-width: none;
    padding: 16px 12px 24px;
  }

  .app-header {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .app-header > div:first-of-type {
    min-width: 0;
    max-width: 100%;
  }

  .app-header .page-subtitle,
  .app-header .page-subtitle--single-line {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
  }

  .app-header .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-actions button,
  #refreshBtn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .auth-body {
    place-items: center;
    min-height: 100dvh;
    padding: 16px;
  }

  .auth-shell {
    width: 100%;
    display: grid;
    gap: 12px;
  }

  .auth-card {
    padding: 22px;
  }

  .auth-brand {
    align-items: flex-start;
    gap: 12px;
  }

  .auth-brand img {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .auth-powered-by.sidebar-powered-by {
    min-height: auto;
    padding: 8px 0 0;
    justify-content: center;
  }

  .auth-powered-by .sidebar-powered-expanded {
    display: flex !important;
    justify-content: center;
  }

  .auth-powered-by .sidebar-powered-logo {
    max-width: 180px;
    height: 24px;
  }

  .password-toggle {
    width: 40px !important;
    min-height: 40px !important;
  }
}
