/* 404 Monitor — GSC shell + purple #5A47B0 */
.mirolabs-gsc-page .mirolabs-i4-wrap {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}
.mirolabs-gsc-page .mirolabs-i4-wrap,
.mirolabs-gsc-page .mirolabs-i4-wrap * {
  box-sizing: border-box;
}

/* Hero */
.mirolabs-gsc-page .mirolabs-i4-wrap .i4-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;
}
.i4-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;
}
.i4-hero-pill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.i4-hero-pill-fallback {
  font-size: 11px;
  font-weight: 600;
  color: var(--gsc-accent, #5A47B0);
}
.i4-hero-main { min-width: 0; }
.i4-hero-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.i4-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.i4-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;
}
.i4-hero-sub {
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.i4-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.i4-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.i4-chip strong { font-weight: 700; color: #0f172a; }
.i4-chip span { color: #374151; font-size: 11px; font-weight: 500; }
.i4-chip-warn { background: #fee2e2; border-color: #fca5a5; }
.i4-chip-warn strong { color: #991b1b; }
.i4-chip-warn span { color: #7f1d1d; }
.i4-chip-accent { background: #ebe6f7; border-color: #cfc5e8; }
.i4-chip-accent strong { color: #2f2466; }
.i4-chip-accent span { color: #3f3570; }
.i4-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);
}
.i4-tip-title { font-size: 12px; color: #111827; }
.i4-tip-title strong { font-weight: 600; }
.i4-tip-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #374151;
  line-height: 1.4;
}

.i4-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Stats + actions bar */
.i4-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.i4-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.i4-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.i4-stat-label {
  font-size: 11px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.i4-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--gsc-accent, #5A47B0);
  line-height: 1.2;
  margin-top: 2px;
}
.i4-stat-val.i4-stat-warn { color: #dc2626; }
.i4-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}
.i4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.i4-btn-primary {
  background: var(--gsc-accent, #5A47B0) !important;
  border: 1px solid #4a3a96 !important;
  color: #fff !important;
}
.i4-btn-primary:hover,
.i4-btn-primary:focus {
  background: #4a3a96 !important;
  color: #fff !important;
}
.i4-btn-ghost {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}
.i4-btn-ghost:hover,
.i4-btn-ghost:focus {
  border-color: var(--gsc-accent, #5A47B0) !important;
  color: var(--gsc-accent, #5A47B0) !important;
  background: var(--gsc-accent-soft, #f3f0fa) !important;
}
.i4-form-inline { margin: 0; }

/* Top lists split */
.i4-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.i4-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.i4-panel-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.i4-panel-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: #374151;
}
.i4-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
}
.i4-list li {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.4;
}
.i4-list li:last-child { border-bottom: none; }
.i4-list code {
  font-size: 13px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
  flex: 0 1 auto;
  max-width: calc(100% - 48px);
  min-width: 0;
  color: #111827;
  font-weight: 500;
}
.i4-list-count {
  flex-shrink: 0;
  font-weight: 700;
  color: #43328a;
  font-size: 13px;
  margin-left: 0;
}
.i4-empty-line {
  font-size: 13px;
  color: #374151;
  padding: 8px 0;
}

/* Log table */
.i4-table-panel .i4-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
}
.i4-log-meta {
  font-size: 11px;
  color: #374151;
}
.i4-table-scroll {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.mirolabs-i4-wrap table.i4-table,
.mirolabs-i4-wrap table.widefat {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin: 0;
  border: none;
  background: #fff;
  table-layout: auto;
}
.mirolabs-i4-wrap table.i4-table thead th,
.mirolabs-i4-wrap table.widefat thead th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  position: relative;
  white-space: nowrap;
}
.mirolabs-i4-wrap table.i4-table tbody td,
.mirolabs-i4-wrap table.widefat tbody td {
  padding: 8px 12px;
  font-size: 12px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
  font-weight: 400;
}
.mirolabs-i4-wrap table.i4-table tbody tr:hover td,
.mirolabs-i4-wrap table.widefat tbody tr:hover td {
  background: #fafafa;
}
.mirolabs-i4-wrap table.i4-table tbody tr:last-child td,
.mirolabs-i4-wrap table.widefat tbody tr:last-child td {
  border-bottom: none;
}
.i4-col-when { width: 130px; white-space: nowrap; }
.i4-col-hits { width: 56px; text-align: center; }
.i4-col-url { min-width: 180px; max-width: 320px; }
.i4-col-url-inner {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
}
.i4-col-ref {
  max-width: 200px;
  word-break: break-all;
  font-size: 11px;
  color: #374151;
}
.i4-hits {
  font-weight: 600;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}
.i4-empty-table {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #374151;
}

/* Column resizer */
.mirolabs-i4-wrap .mirolabs-404-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}
.mirolabs-i4-wrap th.mirolabs-404-resizing,
.mirolabs-i4-wrap th.mirolabs-404-resizing * {
  cursor: col-resize !important;
}

@media (max-width: 1100px) {
  .i4-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .i4-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .mirolabs-gsc-page .mirolabs-i4-wrap .i4-hero {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .mirolabs-gsc-page .mirolabs-i4-wrap .i4-hero-tip {
    grid-column: 1 / -1;
    max-width: none;
  }
  .i4-top-bar { flex-direction: column; }
  .i4-actions { flex-direction: row; flex-wrap: wrap; }
}
