/* Settings / Upgrade — GSC shell + purple #5A47B0
   Type scale (keep consistent across panels):
   --st-title  15px  page/hero titles
   --st-h      14px  panel titles
   --st-body   13px  body, buttons, table, feature names
   --st-muted  13px  descriptions (same size, muted color)
   --st-meta   12px  labels, chips, steps meta
*/
.mirolabs-gsc-page .mirolabs-st-wrap {
  --st-accent: #5A47B0;
  --st-accent-hover: #4a3a96;
  --st-accent-soft: #f3f0fa;
  --st-text: #111827;
  --st-muted: #374151;
  --st-border: #e5e7eb;
  --st-title: 15px;
  --st-h: 14px;
  --st-body: 13px;
  --st-meta: 12px;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--st-body);
  line-height: 1.5;
  color: var(--st-text);
}
.mirolabs-gsc-page .mirolabs-st-wrap,
.mirolabs-gsc-page .mirolabs-st-wrap * {
  box-sizing: border-box;
}

/* Hero */
.st-hero {
  margin: 0 0 14px;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--st-border);
  border-left: 4px solid var(--gsc-accent, var(--st-accent));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.st-hero-pill {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gsc-accent-soft, var(--st-accent-soft)); border: 1px solid #e8e2f8;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.st-hero-pill img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.st-hero-pill-fallback {
  font-size: var(--st-meta); font-weight: 600;
  color: var(--gsc-accent, var(--st-accent));
}
.st-hero-main { min-width: 0; }
.st-hero-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.st-hero-title {
  margin: 0;
  font-size: var(--st-title);
  font-weight: 600;
  line-height: 1.35;
  color: var(--st-text);
}
.st-hero-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gsc-accent-soft, var(--st-accent-soft));
  border: 1px solid #e8e2f8;
  color: var(--gsc-accent, var(--st-accent));
  font-weight: 600;
}
.st-hero-sub {
  margin: 0;
  font-size: var(--st-body);
  line-height: 1.5;
  color: var(--st-muted);
}
.st-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st-chip {
  padding: 4px 10px; border-radius: 999px; background: #f9fafb; border: 1px solid var(--st-border);
  font-size: var(--st-meta); line-height: 1.35; display: inline-flex; align-items: center; gap: 6px;
}
.st-chip strong { font-weight: 600; color: var(--st-text); font-size: var(--st-meta); }
.st-chip span { color: var(--st-muted); font-size: var(--st-meta); }
.st-chip-accent { background: var(--gsc-accent-soft, var(--st-accent-soft)); border-color: #e8e2f8; }
.st-chip-on { background: #ecfdf5; border-color: #bbf7d0; }
.st-chip-off { background: #fef2f2; border-color: #fecaca; }
.st-hero-tip {
  min-width: 220px; max-width: 260px; background: #fafafa; border: 1px solid var(--st-border);
  border-radius: 10px; padding: 10px 12px; border-top: 2px solid var(--gsc-accent, var(--st-accent));
}
.st-tip-title { font-size: var(--st-meta); line-height: 1.4; color: var(--st-text); }
.st-tip-title strong { font-weight: 600; }
.st-tip-sub { margin-top: 4px; font-size: var(--st-meta); color: var(--st-muted); line-height: 1.45; }

.st-layout { display: flex; flex-direction: column; gap: 14px; }

.st-notice {
  padding: 10px 12px; border-radius: 8px; font-size: var(--st-body); line-height: 1.45;
}
.st-notice-ok { background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534; }
.st-notice-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.st-notice-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Stats */
.st-top-bar { display: flex; flex-wrap: wrap; gap: 12px; }
.st-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.st-stat {
  background: #fff; border: 1px solid var(--st-border); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.st-stat-label {
  font-size: 11px; color: var(--st-muted); text-transform: uppercase; letter-spacing: 0.03em;
}
.st-stat-val {
  font-size: var(--st-title); font-weight: 700; color: var(--gsc-accent, var(--st-accent));
  line-height: 1.25; margin-top: 2px;
}
.st-stat-val.st-stat-warn { color: #dc2626; }

/* Panels */
.st-panel {
  background: #fff; border: 1px solid var(--st-border); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.st-panel-danger {
  border-color: #fecaca;
  border-left: 4px solid #dc2626;
  background: #fffbfb;
}
.st-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
}
.st-panel-title {
  margin: 0 0 4px;
  font-size: var(--st-h);
  font-weight: 600;
  line-height: 1.35;
  color: var(--st-text);
}
.st-panel-desc {
  margin: 0;
  font-size: var(--st-body);
  color: var(--st-muted);
  line-height: 1.5;
}
.st-panel-danger .st-panel-title { color: #991b1b; }

.st-badge {
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  line-height: 1.3; white-space: nowrap;
}
.st-badge-on { background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534; }
.st-badge-off { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.st-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.st-field { display: flex; flex-direction: column; gap: 4px; }
.st-field-full { grid-column: 1 / -1; }
.st-field label { font-size: var(--st-meta); font-weight: 500; color: #374151; }
.st-field input[type="text"],
.st-field input[type="email"],
.st-field input[type="password"],
.st-field input[type="url"],
.st-field select {
  width: 100%; padding: 7px 10px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: var(--st-body); color: var(--st-text); background: #fff;
}
.st-field input:focus { outline: none; border-color: var(--gsc-accent, var(--st-accent)); box-shadow: 0 0 0 1px rgba(90, 71, 176, 0.2); }
.st-hint { font-size: var(--st-meta); color: var(--st-muted); line-height: 1.45; }
.st-hint-block { margin-top: 12px; }
.st-save-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f3f4f6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.st-lic-purchase-link {
  display: inline-flex;
  align-items: center;
  font-size: var(--st-body);
  font-weight: 600;
  color: var(--gsc-accent, var(--st-accent));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.st-lic-purchase-link:hover,
.st-lic-purchase-link:focus {
  color: #4338ca;
}

.st-lic-status { margin: 0 0 8px; font-size: var(--st-body); }
.st-lic-error { margin: 0 0 8px; color: #dc2626; font-size: var(--st-body); }
.st-lic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* Danger zone */
.st-danger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.st-danger-item {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px;
}
.st-danger-item strong { display: block; font-size: var(--st-body); color: #991b1b; margin-bottom: 4px; }
.st-danger-item p { margin: 0 0 10px; font-size: var(--st-body); color: var(--st-muted); line-height: 1.45; }
.st-danger-item form { margin: 0; }

.st-custom-reset {
  padding-top: 14px;
  border-top: 1px solid #fecaca;
}
.st-custom-reset strong { display: block; margin-bottom: 8px; font-size: var(--st-body); color: #991b1b; }
.st-check-list {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px;
}
.st-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--st-body); color: #374151; cursor: pointer;
}
.st-check input { margin: 0; }

/* Buttons — one size everywhere */
.mirolabs-st-wrap .st-btn-primary,
.mirolabs-st-wrap .button,
.mirolabs-st-wrap .button-primary,
.mirolabs-st-wrap .button-hero {
  border-radius: 6px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  font-size: var(--st-body) !important;
  line-height: 1.35 !important;
  min-height: 34px !important;
  height: auto !important;
  padding: 7px 14px !important;
}
.mirolabs-st-wrap .st-btn-primary,
.mirolabs-st-wrap .button-primary,
.mirolabs-st-wrap .button-hero {
  background: var(--gsc-accent, var(--st-accent)) !important;
  border-color: var(--st-accent-hover) !important;
  color: #fff !important;
}
.mirolabs-st-wrap .st-btn-primary:hover,
.mirolabs-st-wrap .button-primary:hover,
.mirolabs-st-wrap .button-hero:hover {
  background: var(--st-accent-hover) !important;
  color: #fff !important;
}
.mirolabs-st-wrap .button:not(.button-primary):not(.st-btn-primary):not(.st-btn-danger) {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}
.mirolabs-st-wrap .button:not(.button-primary):not(.st-btn-primary):not(.st-btn-danger):hover {
  border-color: var(--gsc-accent, var(--st-accent)) !important;
  color: var(--gsc-accent, var(--st-accent)) !important;
  background: var(--gsc-accent-soft, var(--st-accent-soft)) !important;
}
.mirolabs-st-wrap .st-btn-ghost {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
  border-radius: 6px !important;
  font-size: var(--st-body) !important;
}
.mirolabs-st-wrap .st-btn-ghost:hover {
  border-color: var(--gsc-accent, var(--st-accent)) !important;
  color: var(--gsc-accent, var(--st-accent)) !important;
  background: var(--gsc-accent-soft, var(--st-accent-soft)) !important;
}
.mirolabs-st-wrap .st-btn-danger {
  background: #fff !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
  border-radius: 6px !important;
  font-size: var(--st-body) !important;
  font-weight: 500 !important;
}
.mirolabs-st-wrap .st-btn-danger:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}

/* Free upgrade CTA + comparison */
.st-panel-upgrade {
  border-left: 4px solid var(--gsc-accent, var(--st-accent));
}
.st-badge-pro {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  background: var(--gsc-accent-soft, var(--st-accent-soft));
  color: var(--gsc-accent, var(--st-accent));
  border: 1px solid #e8e2f8;
}
.st-upgrade-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.st-upgrade-list li {
  margin: 0;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid var(--st-border);
  border-radius: 8px;
}
.st-upgrade-list strong {
  display: block;
  font-size: var(--st-body);
  font-weight: 600;
  line-height: 1.35;
  color: var(--st-text);
}
.st-upgrade-list span {
  display: block;
  margin-top: 3px;
  font-size: var(--st-body);
  line-height: 1.45;
  color: var(--st-muted);
  font-weight: 400;
}
.st-upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
}
.st-upgrade-steps {
  margin: 0 0 8px 1.1em;
  color: #374151;
  font-size: var(--st-body);
  line-height: 1.55;
}
.st-compare-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 8px;
}
.st-compare-table th,
.st-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--st-border);
  font-size: var(--st-body);
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}
.st-compare-table thead th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--st-text);
}
.st-compare-table .st-col-free,
.st-compare-table .st-col-pro {
  text-align: center;
  width: 90px;
}
.st-compare-table .st-col-pro {
  background: #faf8fd;
}
.st-compare-table .st-yes {
  color: #16a34a;
  font-weight: 700;
  font-size: var(--st-body);
}
.st-compare-table .st-no {
  color: #cbd0d6;
  font-size: var(--st-body);
}
#adminmenu .mirolabs-menu-upsell {
  color: #ffd166 !important;
  font-weight: 700;
}

@media (max-width: 900px) {
  .st-hero { grid-template-columns: 44px minmax(0, 1fr); }
  .st-hero-tip { grid-column: 1 / -1; max-width: none; }
  .st-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-fields-grid,
  .st-danger-grid,
  .st-check-list { grid-template-columns: 1fr; }
  .st-upgrade-list { grid-template-columns: 1fr; }
}
