/* Redirections — GSC shell + purple #5A47B0 */
.mirolabs-gsc-page .mirolabs-rd-wrap {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}
.mirolabs-gsc-page .mirolabs-rd-wrap,
.mirolabs-gsc-page .mirolabs-rd-wrap * {
  box-sizing: border-box;
}

/* Hero */
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-hero {
  margin: 0 0 14px;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--gsc-accent, #5A47B0);
  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;
}
.rd-hero-pill {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gsc-accent-soft, #f3f0fa);
  border: 1px solid #e8e2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rd-hero-pill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.rd-hero-pill-fallback {
  font-size: 11px;
  font-weight: 600;
  color: var(--gsc-accent, #5A47B0);
}
.rd-hero-main { min-width: 0; }
.rd-hero-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.rd-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.rd-hero-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gsc-accent-soft, #f3f0fa);
  border: 1px solid #e8e2f8;
  color: var(--gsc-accent, #5A47B0);
  font-weight: 600;
}
.rd-hero-sub {
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.rd-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.rd-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rd-chip strong { font-weight: 600; color: #111827; }
.rd-chip strong.rd-chip-warn { color: #dc2626; }
.rd-chip span { color: #374151; font-size: 11px; }
.rd-chip-accent { background: var(--gsc-accent-soft, #f3f0fa); border-color: #e8e2f8; }
.rd-chip-on { background: #ecfdf5; border-color: #bbf7d0; }
.rd-chip-off { background: #fef2f2; border-color: #fecaca; }
.rd-hero-tip {
  min-width: 220px;
  max-width: 260px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  border-top: 2px solid var(--gsc-accent, #5A47B0);
}
.rd-tip-title { font-size: 12px; color: #111827; }
.rd-tip-title strong { font-weight: 600; }
.rd-tip-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #374151;
  line-height: 1.4;
}

.rd-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rd-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 13px;
}

/* Stats bar */
.rd-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.rd-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.rd-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rd-stat-label {
  font-size: 11px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rd-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--gsc-accent, #5A47B0);
  line-height: 1.2;
  margin-top: 2px;
}
.rd-stat-val.rd-stat-warn { color: #dc2626; }
.rd-engine-badge {
  align-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.rd-engine-badge.is-on {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.rd-engine-badge.is-off {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Panels */
.rd-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rd-panel-highlight {
  border-color: #e8e2f8;
  background: var(--gsc-accent-soft, #f3f0fa);
}


.rd-panel-settings {
  background: #F6F7F7;
  border: none;
  border-radius: 12px;
  padding: 18px 18px 20px;
  box-shadow: none;
}
.rd-panel-settings > .rd-panel-title {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.rd-panel-settings > .rd-panel-desc {
  margin-bottom: 16px;
  max-width: 62ch;
}
.rd-panel-settings .rd-settings-split {
  gap: 12px;
}
.rd-panel-settings .rd-subpanel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rd-panel-settings .rd-subpanel:hover {
  border-color: rgba(90, 71, 176, 0.18);
  box-shadow: 0 4px 14px rgba(90, 71, 176, 0.07);
}
.rd-panel-settings .rd-subpanel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}
.rd-panel-settings .rd-subpanel-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--gsc-accent, #5A47B0);
  flex-shrink: 0;
}
.rd-panel-settings .rd-subpanel-title-mt {
  margin-top: 18px;
}
.rd-panel-settings .rd-row {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #eef0f2;
  background: #fafbfc;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rd-panel-settings .rd-row:hover {
  background: #f8f6fc;
  border-color: rgba(90, 71, 176, 0.14);
}
.rd-panel-settings .rd-row:has(input[type="text"]),
.rd-panel-settings .rd-row:has(select) {
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.rd-panel-settings .rd-row:has(input[type="text"]):hover,
.rd-panel-settings .rd-row:has(select):hover {
  background: transparent;
  border-color: transparent;
}
.rd-panel-settings .rd-row > label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  line-height: 1.45;
}
.rd-panel-settings .rd-row > label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #111827;
  cursor: pointer;
}
.rd-panel-settings .rd-row > label:has(input[type="checkbox"]) input {
  margin: 3px 0 0;
  flex-shrink: 0;
}
.rd-panel-settings .rd-label-row {
  align-items: flex-start;
}
.rd-panel-settings .rd-label-row > label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: #111827;
  line-height: 1.45;
  cursor: pointer;
}
.rd-panel-settings .rd-label-row > label input[type="checkbox"] {
  margin: 3px 0 0;
  flex-shrink: 0;
}
.rd-panel-settings .rd-row-col {
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
}
.rd-panel-settings .rd-row.rd-row-col,
.rd-panel-settings .rd-row.rd-row-col:hover {
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: transparent;
}
.rd-panel-settings .rd-row-col:hover {
  background: transparent;
  border-color: transparent;
}
.rd-panel-settings .rd-label-inline {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #eef0f2;
  background: #fafbfc;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rd-panel-settings .rd-label-inline:hover {
  background: #f8f6fc;
  border-color: rgba(90, 71, 176, 0.18);
}
.rd-panel-settings .rd-label-inline:has(input:checked) {
  border-color: rgba(90, 71, 176, 0.35);
  background: var(--gsc-accent-soft, #f3f0fa);
  color: #111827;
  font-weight: 500;
}
.rd-panel-settings .rd-label-inline input[type="radio"] {
  margin: 0;
  accent-color: var(--gsc-accent, #5A47B0);
}
.rd-panel-settings .rd-hint {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #eef0f2;
  font-size: 11px;
}
.rd-panel-settings .rd-tag {
  flex-shrink: 0;
  margin-top: 1px;
}
.rd-panel-settings input[type="text"],
.rd-panel-settings select {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
}
.rd-panel-settings .rd-save-row {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.rd-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.rd-panel-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.rd-panel-desc {
  margin: 0;
  font-size: 12px;
  color: #374151;
  line-height: 1.45;
}
.rd-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rd-settings-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rd-subpanel {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
}
.rd-subpanel-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.rd-subpanel-title-mt { margin-top: 14px; }

.rd-row { margin: 8px 0; font-size: 13px; }
.rd-row-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rd-label-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.rd-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #374151;
  line-height: 1.4;
}
.rd-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rd-tag-safe { background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534; }
.rd-tag-warn { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }

.rd-save-row {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* Forms */
.mirolabs-rd-wrap input[type="text"],
.mirolabs-rd-wrap textarea,
.mirolabs-rd-wrap select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  color: #111827;
  background: #fff;
}
.mirolabs-rd-wrap input[type="text"]:focus,
.mirolabs-rd-wrap textarea:focus,
.mirolabs-rd-wrap select:focus {
  outline: none;
  border-color: var(--gsc-accent, #5A47B0);
  box-shadow: 0 0 0 1px rgba(90, 71, 176, 0.2);
}

.rd-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  padding: 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
}
.rd-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #374151;
}
.rd-w120 { min-width: 100px; flex: 0 1 100px; }
.rd-w180 { min-width: 140px; flex: 0 1 140px; }
.rd-w200 { min-width: 160px; flex: 0 1 160px; }
.rd-w240 { min-width: 180px; flex: 1 1 180px; }

.rd-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: #374151;
  font-size: 13px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
}

/* Table */
.rd-table-scroll { overflow-x: auto; }
.rd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.rd-table thead { background: #f9fafb; }
.rd-table th {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.rd-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.rd-table tbody tr:last-child td { border-bottom: none; }
.rd-table tbody tr:nth-child(even) td { background: #fafafa; }
.rd-row-paused td { opacity: 0.65; }
.rd-table code {
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  word-break: break-all;
}
.rd-type-chip {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--gsc-accent-soft, #f3f0fa);
  color: var(--gsc-accent, #5A47B0);
  vertical-align: middle;
}

.rd-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.rd-status-3xx { background: #eff6ff; color: #1d4ed8; }
.rd-status-410 { background: #fff7ed; color: #9a3412; }
.rd-status-451 { background: #fef2f2; color: #b91c1c; }

.rd-hits { font-weight: 600; font-variant-numeric: tabular-nums; }
.rd-last-hit {
  display: block;
  font-size: 10px;
  color: #374151;
  margin-top: 2px;
}
.rd-auto-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--gsc-accent-soft, #f3f0fa);
  color: var(--gsc-accent, #5A47B0);
  border: 1px solid #e8e2f8;
}
.rd-cat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f3f4f6;
  color: #374151;
}
.rd-muted { color: #374151; }

.rd-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.rd-actions form { margin: 0; }

.rd-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--gsc-accent, #5A47B0);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.rd-link:hover,
.rd-link:focus {
  border-color: var(--gsc-accent, #5A47B0);
  background: var(--gsc-accent-soft, #f3f0fa);
}

.rd-json {
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

/* Export / Import panels */
.rd-io-panel > .rd-panel-title {
  margin-bottom: 10px;
}
.rd-io-panel > .rd-panel-desc {
  margin: 0 0 12px;
}
.rd-io-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
}
.rd-io-row .rd-panel-desc {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  padding-bottom: 2px;
}
.rd-io-form {
  margin: 0;
  flex: 0 0 auto;
}
.rd-io-form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.rd-io-form-stack .rd-json {
  width: 100%;
  margin: 0;
}
.rd-io-actions {
  display: flex;
  justify-content: flex-end;
}

/* Buttons — compact; override WP core + global gold admin.css */
.mirolabs-gsc-page .mirolabs-rd-wrap .button,
.wp-core-ui .mirolabs-rd-wrap .button,
.mirolabs-rd-wrap button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  line-height: 1.25 !important;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary,
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary-sm,
.mirolabs-gsc-page .mirolabs-rd-wrap .button-primary,
.wp-core-ui .mirolabs-rd-wrap .button.rd-btn-primary,
.wp-core-ui .mirolabs-rd-wrap .button.rd-btn-primary-sm,
.wp-core-ui .mirolabs-rd-wrap button.rd-btn-primary,
.mirolabs-rd-wrap .rd-btn-primary,
.mirolabs-rd-wrap .rd-btn-primary-sm,
.mirolabs-rd-wrap input.rd-btn-primary[type="submit"],
.mirolabs-rd-wrap button.rd-btn-primary {
  background: var(--gsc-accent, #5A47B0) !important;
  border: 1px solid #4a3a96 !important;
  color: #fff !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  min-height: 0 !important;
}
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary:hover,
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary:focus,
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary-sm:hover,
.mirolabs-gsc-page .mirolabs-rd-wrap .rd-btn-primary-sm:focus,
.wp-core-ui .mirolabs-rd-wrap .button.rd-btn-primary:hover,
.wp-core-ui .mirolabs-rd-wrap .button.rd-btn-primary-sm:hover,
.mirolabs-rd-wrap .rd-btn-primary:hover,
.mirolabs-rd-wrap .rd-btn-primary:focus,
.mirolabs-rd-wrap .rd-btn-primary-sm:hover,
.mirolabs-rd-wrap .rd-btn-primary-sm:focus {
  background: #4a3a96 !important;
  border-color: #3d2f7d !important;
  color: #fff !important;
}
.rd-btn-sm {
  border-radius: 6px !important;
  font-size: 11px !important;
  padding: 2px 8px !important;
  min-height: 26px !important;
}
.rd-toggle-on {
  border-color: #bbf7d0 !important;
  color: #166534 !important;
  background: #ecfdf5 !important;
}
.rd-toggle-off {
  border-color: #fde68a !important;
  color: #92400e !important;
  background: #fffbeb !important;
}
.rd-btn-del {
  border-color: #fecaca !important;
  color: #b91c1c !important;
}
.rd-btn-del:hover {
  background: #fef2f2 !important;
}

@media (max-width: 900px) {
  .mirolabs-gsc-page .mirolabs-rd-wrap .rd-hero {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .mirolabs-gsc-page .mirolabs-rd-wrap .rd-hero-tip {
    grid-column: 1 / -1;
    max-width: none;
  }
  .rd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-settings-split,
  .rd-split { grid-template-columns: 1fr; }
  .rd-engine-badge { width: 100%; text-align: center; }
  .rd-io-row {
    flex-direction: column;
    align-items: stretch;
  }
  .rd-io-form {
    align-self: flex-start;
  }
}
