/*
 * IndexSentry UI layer on top of WowDash (public/vendor/wowdash/css/style.css).
 *
 * WowDash styles bare h1-h6 with huge display sizes and leaves plain form controls, tables and lists untouched, so
 * pages built from semantic HTML looked broken. This layer restyles the semantic elements and the small `ig-*` class
 * vocabulary used across the blades, using WowDash's own CSS variables (so dark mode follows automatically).
 * Redesigned pages use `.ig-dash` (no card wrapper) and WowDash utility classes directly.
 */

/* ---- Inter, self-hosted (the Google Fonts import is blocked by our CSP and would leak visits anyway) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/inter/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/inter/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography inside page content ---- */
.ig-admin-content h1,
.ig-admin-content h2,
.ig-admin-content h3,
.ig-admin-content h4 {
  font-family: inherit;
  line-height: 1.3;
  color: var(--text-primary-light);
  letter-spacing: -0.01em;
}
/* !important: WowDash sets `h1..h6 { font-size: var(--hN) !important }` with display-sized clamps. */
.ig-admin-content h1 { font-size: 1.25rem !important; font-weight: 600; margin: 0 0 0.5rem; }
.ig-admin-content h2 { font-size: 1.0625rem !important; font-weight: 600; margin: 1.75rem 0 0.75rem; }
.ig-admin-content h3 { font-size: 0.9375rem !important; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.ig-admin-content h4 { font-size: 0.875rem !important; font-weight: 600; margin: 1rem 0 0.5rem; }
/* The layout already prints the page title in the header; do not repeat it as the first heading. */
.ig-admin-content > section > h1,
.ig-admin-content > h1 { display: none; }
.ig-admin-content p { color: var(--text-primary-light); line-height: 1.6; margin-bottom: 0.75rem; }
.ig-admin-content a:not(.btn):not(.ig-btn):not(.dropdown-item) { color: var(--primary-600); text-decoration: none; }
.ig-admin-content a:not(.btn):not(.ig-btn):hover { text-decoration: underline; }
.ig-lede { color: var(--text-secondary-light) !important; font-size: 0.9375rem; }

/* ---- Cards: a top-level <section> is one card ---- */
.ig-admin-content > section,
.ig-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0.25rem 1.875rem rgba(46, 45, 116, 0.05);
}
.ig-admin-content > section > section { margin-top: 1.25rem; }

/* ---- Tables ---- */
.ig-admin-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  margin: 0.5rem 0 1rem;
}
.ig-admin-content table th {
  background: var(--neutral-100);
  color: var(--text-secondary-light);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.ig-admin-content table th:first-child { border-radius: 8px 0 0 8px; }
.ig-admin-content table th:last-child { border-radius: 0 8px 8px 0; }
.ig-admin-content table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--text-primary-light);
  vertical-align: middle;
}
.ig-admin-content table tbody tr:last-child td { border-bottom: 0; }
.ig-admin-content table tbody tr:hover td { background: var(--neutral-50, rgba(72, 127, 255, 0.04)); }
.ig-responsive-table { overflow-x: auto; }

/* ---- Forms ---- */
.ig-admin-content label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  margin-bottom: 1rem;
}
.ig-admin-content label > input,
.ig-admin-content label > select,
.ig-admin-content label > textarea { margin-top: 0.375rem; }
.ig-admin-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.ig-admin-content select,
.ig-admin-content textarea {
  display: block;
  width: 100%;
  max-width: 32rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text-primary-light);
  background-color: var(--neutral-50, #f9fafb);
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ig-admin-content textarea { padding: 0.625rem 0.875rem; min-height: 6rem; }
.ig-admin-content input:focus,
.ig-admin-content select:focus,
.ig-admin-content textarea:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(72, 127, 255, 0.18);
}
.ig-admin-content input[type="checkbox"],
.ig-admin-content input[type="radio"] { accent-color: var(--primary-600); margin-right: 0.5rem; }
.ig-filter-form { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.ig-filter-form label { margin-bottom: 0; }
.ig-filter-form input,
.ig-filter-form select { min-width: 10rem; }

/* ---- Buttons ---- */
.ig-admin-content button:not(.btn):not(.dropdown-item):not(.sidebar-toggle):not(.nav-link):not(.accordion-button):not(.btn-close):not([data-bs-dismiss]),
.ig-admin-content input[type="submit"],
.ig-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff !important;
  background: var(--primary-600);
  border: 1px solid var(--primary-600);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s, box-shadow 0.15s;
}
.ig-admin-content button:not(.btn):not(.dropdown-item):not(.nav-link):not(.accordion-button):not(.btn-close):hover,
.ig-btn:hover { background: var(--primary-700, #3d6bd6); border-color: var(--primary-700, #3d6bd6); }
.ig-admin-content button:disabled { opacity: 0.55; cursor: not-allowed; }
.ig-btn-outline {
  background: transparent !important;
  color: var(--primary-600) !important;
}
.ig-inline { display: inline; }
.ig-inline button { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }

/* ---- Text helpers and status pills ---- */
.ig-muted { color: var(--text-secondary-light) !important; }
.ig-error { color: var(--danger-600) !important; font-size: 0.8125rem; }
.ig-ok { color: var(--success-600) !important; }
.ig-warn { color: var(--warning-600) !important; }

.ig-status-text {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  background: var(--neutral-200);
  color: var(--text-secondary-light);
  white-space: nowrap;
}
.ig-severity-critical { background: var(--danger-focus) !important; color: var(--danger-600) !important; }
.ig-severity-high { background: var(--warning-focus) !important; color: var(--warning-600) !important; }
.ig-severity-medium { background: var(--info-focus) !important; color: var(--info-600) !important; }
.ig-severity-low { background: var(--neutral-200) !important; color: var(--text-secondary-light) !important; }

/* flash banner */
.ig-status {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid var(--success-600);
  background: var(--success-focus);
  color: var(--text-primary-light);
  font-size: 0.875rem;
}

/* ---- Lists and misc blocks ---- */
.ig-stack > * + * { margin-top: 1rem; }
.ig-stack-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.ig-stack-list > li { padding: 0.875rem 0; border-bottom: 1px solid var(--neutral-200); }
.ig-stack-list > li:last-child { border-bottom: 0; }
.ig-stack-list > li p { margin: 0.25rem 0 0; font-size: 0.8125rem; }
.ig-admin-content ul:not(.ig-stack-list):not(.dropdown-menu) { padding-left: 1.25rem; margin-bottom: 1rem; }
.ig-admin-content li { margin-bottom: 0.375rem; color: var(--text-primary-light); }
.ig-admin-content details { border: 1px solid var(--neutral-200); border-radius: 8px; padding: 0.75rem 1rem; margin: 0.75rem 0; }
.ig-admin-content details > summary { cursor: pointer; font-weight: 500; }
.ig-admin-content pre,
.ig-pre {
  background: var(--neutral-100);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.8125rem;
  overflow: auto;
  color: var(--text-primary-light);
}
.ig-admin-content code { font-size: 0.8125em; background: var(--neutral-100); padding: 0.125rem 0.375rem; border-radius: 4px; }
.ig-admin-content pre code { background: transparent; padding: 0; }
.ig-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.ig-stat-row > p {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--neutral-100);
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary-light);
}

/* ---- Dashboard widgets (redesigned pages) ---- */
.ig-kpi { position: relative; padding: 1.25rem 1.5rem; border-radius: 12px; border: 1px solid var(--neutral-200); overflow: hidden; }
.ig-kpi .ig-kpi-label { font-size: 0.875rem; font-weight: 500; color: var(--text-primary-light); margin: 0; }
.ig-kpi .ig-kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin: 0.375rem 0 0.25rem; color: var(--text-primary-light); }
.ig-kpi .ig-kpi-sub { font-size: 0.8125rem; color: var(--text-secondary-light); margin: 0; }
.ig-kpi .ig-kpi-icon { position: absolute; top: 1.25rem; right: 1.25rem; width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; }
.ig-panel { background: var(--white); border-radius: 12px; padding: 1.5rem; box-shadow: 0 0.25rem 1.875rem rgba(46, 45, 116, 0.05); height: 100%; }
.ig-panel > h2, .ig-panel-title { font-size: 1.0625rem; font-weight: 600; margin: 0 0 1rem; }
.ig-chart { min-height: 15rem; }
.ig-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.8125rem; color: var(--text-secondary-light); }
.ig-dot { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 50%; margin-right: 0.375rem; }
.ig-empty { text-align: center; padding: 2rem 1rem; color: var(--text-secondary-light); }
.ig-empty i { font-size: 2.5rem; color: var(--neutral-400); display: block; margin-bottom: 0.5rem; }
.ig-score-ring { width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }

/* ---- Top bar controls that were unstyled ---- */
.navbar-header select {
  min-height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-primary-light);
}

/* Bootstrap pills used for tabs on the account page */
.ig-admin-content .nav-pills .nav-link { background: var(--neutral-100); color: var(--text-secondary-light); border: 0; border-radius: 8px; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; }
.ig-admin-content .nav-pills .nav-link.active { background: var(--primary-600); color: #fff; }

/* ---- Sign-in / register hero panel ---- */
.auth-left { background: linear-gradient(155deg, #eef3ff 0%, #dde7ff 48%, #f3eaff 100%); }
.ig-auth-hero { max-width: 40rem; margin: 0 auto; gap: 2rem; }
.ig-auth-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.875rem; border-radius: 999px; background: #fff; color: var(--primary-600); font-weight: 600; font-size: 0.875rem; box-shadow: 0 0.25rem 1rem rgba(46, 45, 116, 0.08); }
.ig-auth-hero-title { font-size: 2rem !important; line-height: 1.25 !important; font-weight: 700; letter-spacing: -0.02em; margin: 1rem 0 0.75rem; color: #1c2434; }
.ig-auth-hero-sub { font-size: 1.0625rem; color: #4b5563; margin: 0; max-width: 32rem; }
.ig-auth-illustration { width: 100%; height: auto; max-height: 22rem; overflow: visible; }
.ig-auth-points li { display: flex; align-items: center; gap: 0.625rem; font-size: 0.9375rem; color: #1c2434; padding: 0.3rem 0; }
.ig-auth-points i { color: var(--success-600); font-size: 1.25rem; }

/* ---- Onboarding checklist as a card on the dashboard ---- */
.ig-dash .ig-onboarding { background: var(--white); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 0.25rem 1.875rem rgba(46, 45, 116, 0.05); }
.ig-dash .ig-onboarding h2 { margin-top: 0; }

/* ---- Notifications inbox ---- */
.ig-filter-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ig-filter-tabs a { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.4375rem 0.875rem; border-radius: 999px; border: 1px solid var(--neutral-200); color: var(--text-secondary-light, #4b5563); font-size: 0.875rem; text-decoration: none; }
.ig-filter-tabs a:hover { background: var(--neutral-100, #f3f4f6); text-decoration: none; }
.ig-filter-tabs a.active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.ig-notice-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.ig-notice-list > li { display: flex; gap: 0.875rem; padding: 1rem 0.75rem; border-bottom: 1px solid var(--neutral-200); border-radius: 8px; }
.ig-notice-list > li:last-child { border-bottom: 0; }
.ig-notice-list > li.ig-unread { background: rgba(72, 127, 255, 0.07); box-shadow: inset 3px 0 0 var(--primary-600); }
.ig-notice-icon { flex: 0 0 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.25rem; }
.ig-notice-body { flex: 1; min-width: 0; }
.ig-link-btn { background: none !important; border: 0 !important; padding: 0 !important; color: var(--primary-600) !important; font-size: 0.875rem !important; cursor: pointer; box-shadow: none !important; }
.ig-link-btn:hover { text-decoration: underline; }
.ig-form-grid { display: grid; gap: 1rem; max-width: 40rem; }
.ig-form-grid label { display: grid; gap: 0.375rem; font-weight: 500; }
.ig-form-grid fieldset label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin-bottom: 0.5rem; }
.ig-form-grid fieldset { border: 1px solid var(--neutral-200); border-radius: 10px; padding: 1rem 1.25rem; }
.ig-form-grid legend { font-size: 0.9375rem; font-weight: 600; padding: 0 0.5rem; width: auto; float: none; }
.ig-form-grid button[type=submit] { justify-self: start; }

/* ---- Fixes found on the notification pages ---- */
/* The template resets `input { appearance: none }`, which made every checkbox/radio in the app invisible. */
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; width: 1.0625rem; height: 1.0625rem; flex: 0 0 auto; vertical-align: middle; }
/* These must beat `.ig-admin-content a:not(...)` / the generic button rule. */
.ig-admin-content .ig-filter-tabs a { color: var(--text-secondary-light, #4b5563); }
.ig-admin-content .ig-filter-tabs a.active { color: #fff; }
.ig-admin-content .ig-notice-list button.ig-link-btn { color: var(--primary-600) !important; background: none !important; padding: 0 !important; border: 0 !important; }
.ig-admin-content select { line-height: 2.75rem; padding-top: 0; padding-bottom: 0; }
.ig-admin-content details > summary { list-style: none; }
.ig-admin-content details > summary::-webkit-details-marker { display: none; }
.ig-admin-content details > summary::before { content: "\eb7a"; font-family: remixicon; margin-right: 0.5rem; }
/* Specificity bumps: the generic link/button rules use :not() chains that outrank a single class. */
.ig-admin-content .ig-filter-tabs a.active.active.active { color: #fff !important; }
.ig-admin-content .ig-notice-list button.ig-link-btn.ig-link-btn.ig-link-btn { color: var(--primary-600) !important; background: none !important; border: 0 !important; padding: 0 !important; }
.ig-admin-content .ig-notice-list .ig-inline button.ig-link-btn.ig-link-btn.ig-link-btn.ig-link-btn.ig-link-btn { color: var(--primary-600) !important; }

/* Top bar on phones: the template's fixed 4.5rem height let wrapped items spill over the page title. */
.navbar-header { height: auto; min-height: 4.5rem; }
@media (max-width: 575.98px) {
  .navbar-header { padding: 0.75rem 1rem; }
  .navbar-header .row { flex-wrap: wrap; row-gap: 12px; }
  .navbar-header .col-auto > .d-flex { flex-wrap: wrap !important; gap: 0.5rem !important; }
  .navbar-header select { max-width: 6.5rem; }
}
.ig-admin-content ul.ig-notice-list { padding-left: 0; margin-left: 0; }

/* ---- Sites, site detail, billing ---- */
.ig-site-card { display: flex; align-items: center; gap: 0.875rem; padding: 1rem 1.125rem; border: 1px solid var(--neutral-200); border-radius: 12px; background: var(--white); text-decoration: none !important; transition: box-shadow 0.15s, border-color 0.15s; height: 100%; }
.ig-site-card:hover { border-color: var(--primary-600); box-shadow: 0 0.25rem 1.25rem rgba(72, 127, 255, 0.12); }
.ig-site-meta { display: grid; gap: 0.125rem; min-width: 0; flex: 1; }
.ig-site-meta strong { color: var(--text-primary-light); }
.ig-site-meta .ig-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-site-go { font-size: 1.5rem; color: var(--neutral-400, #9ca3af); }
.ig-site-avatar { flex: 0 0 2.75rem; height: 2.75rem; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(72, 127, 255, 0.12); color: var(--primary-600); font-weight: 700; font-size: 1.125rem; }
.ig-site-avatar-lg { flex-basis: 4rem; height: 4rem; font-size: 1.5rem; border-radius: 16px; }
.ig-site-head { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; padding: 1.25rem; border: 1px solid var(--neutral-200); border-radius: 12px; }
.ig-site-info { flex: 1; min-width: 14rem; }
.ig-site-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ig-btn-danger { background: var(--danger-600, #dc2626) !important; border-color: var(--danger-600, #dc2626) !important; }
.ig-notice-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.875rem 1.125rem; border-radius: 10px; background: rgba(72, 127, 255, 0.1); margin-bottom: 1.5rem; }
.ig-quota { padding: 0.875rem 1rem; border: 1px solid var(--neutral-200); border-radius: 10px; display: grid; gap: 0.5rem; height: 100%; }
.ig-quota progress { width: 100%; height: 0.5rem; border-radius: 999px; overflow: hidden; -webkit-appearance: none; appearance: none; background: var(--neutral-200); border: 0; }
.ig-quota progress::-webkit-progress-bar { background: var(--neutral-200); }
.ig-quota progress::-webkit-progress-value { background: var(--primary-600); border-radius: 999px; }
.ig-quota progress::-moz-progress-bar { background: var(--primary-600); border-radius: 999px; }
.ig-quota-warm progress::-webkit-progress-value { background: #ff9f29; }
.ig-quota-hot progress::-webkit-progress-value { background: #ef4a00; }
.ig-quota-warm progress::-moz-progress-bar { background: #ff9f29; }
.ig-quota-hot progress::-moz-progress-bar { background: #ef4a00; }
.ig-plan { display: grid; gap: 0.5rem; justify-items: start; padding: 1.25rem; border: 1px solid var(--neutral-200); border-radius: 12px; height: 100%; }
.ig-plan-current { border-color: var(--primary-600); box-shadow: 0 0 0 2px rgba(72, 127, 255, 0.2); }
.ig-plan-price { font-size: 1.75rem; font-weight: 700; margin: 0; }
.ig-plan-price small { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary-light); }
.ig-inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; max-width: 30rem; }
.ig-inline-form input { flex: 1; min-width: 10rem; }
.ig-admin-content .ig-plan .ig-inline button { width: auto; }

/* Outline buttons: the generic button rule forces white text with a long :not() chain, so outrank it. */
.ig-admin-content button.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline { color: var(--primary-600) !important; background: transparent !important; }
.ig-admin-content button.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline.ig-btn-outline:hover { background: rgba(72, 127, 255, 0.08) !important; }
.ig-site-meta .ig-status-text { justify-self: start; }

/* "Label: value" stat rows used across portfolio/agency/GEO pages: card look with an accent edge. */
.ig-admin-content .ig-stat-row > p { background: var(--white); border: 1px solid var(--neutral-200); border-left: 3px solid var(--primary-600); font-size: 0.9375rem; font-weight: 600; color: var(--text-primary-light); box-shadow: 0 0.125rem 0.5rem rgba(46, 45, 116, 0.04); }
.ig-admin-content .ig-stat-row > p.ig-muted { border-left-color: var(--neutral-300); font-weight: 400; color: var(--text-secondary-light); }

/* ---- Definition lists, filter bars, severity icons ---- */
.ig-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem 1.5rem; margin: 0; }
.ig-dl > div { padding: 0.75rem 1rem; border: 1px solid var(--neutral-200); border-radius: 10px; }
.ig-dl dt { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary-light); margin-bottom: 0.25rem; }
.ig-dl dd { margin: 0; font-weight: 500; }
.ig-sev-icon-critical { background: #ef4a00; } .ig-sev-icon-high { background: #ff9f29; } .ig-sev-icon-medium { background: #487fff; } .ig-sev-icon-low { background: #a1a9b8; }
/* A bare GET form at the top of a page (search / filters) reads as one filter bar. */
.ig-admin-content section > form[method="get" i], .ig-admin-content section > form[method="GET"] { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.25rem; }
.ig-admin-content section > form[method="get" i] label { margin-bottom: 0; }

/* Wide tables scroll inside the card instead of stretching the whole page on phones. */
@media (max-width: 767.98px) {
  .ig-admin-content section > table, .ig-admin-content section > form > table, .ig-admin-content details > table { display: block; max-width: 100%; overflow-x: auto; }
}
.ig-status-text.ig-ok { background: rgba(69, 179, 105, 0.15); color: #2e8b4f; }

/* ---- Admin: plans grid, fieldset legends, tables ---- */
.ig-limit-head, .ig-limit-row { display: grid; grid-template-columns: minmax(12rem, 1.6fr) 5.5rem minmax(9rem, 1.2fr) 6rem 6rem 6.5rem 4.5rem; gap: 0.5rem; align-items: center; }
.ig-limit-head { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-secondary-light); padding: 0.5rem 0; }
.ig-admin-content .ig-limit-row label { margin: 0; }
.ig-admin-content .ig-limit-row input, .ig-admin-content .ig-limit-row select { min-height: 2.25rem; padding: 0 0.5rem; }
.ig-admin-content .ig-limit-row button { padding: 0.4375rem 0.875rem; }
.ig-stack-list > li:has(.ig-limit-row) { padding: 0.375rem 0; }
.ig-plan-admin { margin-bottom: 0.75rem; }
.ig-plan-admin > details { margin: 0; }
.ig-plan-admin summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
@media (max-width: 991.98px) {
  .ig-limit-head { display: none; }
  .ig-limit-row { grid-template-columns: 1fr 1fr; }
  .ig-limit-key { grid-column: 1 / -1; }
}
/* Fieldset legends render as page-size headings otherwise. */
.ig-admin-content legend { font-size: 1rem; font-weight: 600; float: none; width: auto; padding: 0; margin-bottom: 0.5rem; }
.ig-admin-content fieldset { border: 0; padding: 0; margin: 0 0 1rem; }

/* ---- Agency pages: warning banner variant ---- */
.ig-notice-banner.ig-notice-warning { background: rgba(255, 159, 41, 0.14); }
.ig-notice-banner.ig-notice-warning i { color: #ff9f29; }

/* ---- Admin: repeated <article> records (AI providers, legal docs, breaches, DSAR, DLQ jobs...) ---- */
.ig-admin-content article { border: 1px solid var(--neutral-200); border-radius: 10px; padding: 1.125rem 1.25rem; margin-bottom: 1rem; }
.ig-admin-content article > h3:first-child { margin-top: 0; }
.ig-admin-content article article { background: var(--neutral-50, #f9fafb); }
.ig-admin-content article form { margin-top: 0.5rem; }
.ig-admin-content article form + form { margin-top: 0.75rem; }
/* Nested inline forms (toggle buttons next to a title) shouldn't force full-width fields. */
.ig-admin-content li form[style*="inline"], .ig-admin-content article > form:first-of-type:has(input[type=hidden][name=is_active]) { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0; margin-right: 0.5rem; }

/* ---- Action detail: comments, attachments, confidence pills ---- */
.ig-comment { border: 1px solid var(--neutral-200); border-radius: 10px; padding: 0.875rem 1rem; margin-bottom: 0.75rem; }
.ig-attachment-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.625rem 0; border-bottom: 1px solid var(--neutral-200); }
.ig-attachment-row:last-of-type { border-bottom: 0; }
.ig-confidence-LOW { background: var(--neutral-200) !important; color: var(--text-secondary-light) !important; }
.ig-confidence-MEDIUM { background: var(--info-focus) !important; color: var(--info-600) !important; }
.ig-confidence-HIGH { background: var(--success-focus) !important; color: var(--success-600) !important; }
.ig-confidence-VERY_HIGH { background: var(--success-600) !important; color: #fff !important; }

/* ---- Ported from the old pre-WowDash theme.css (now removed) ---- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}
.ig-skip-link {
  position: absolute; left: -9999px; top: 0.5rem; z-index: 100;
  padding: 0.5rem 1rem; background: var(--primary-600); color: #fff !important;
  text-decoration: none !important; border-radius: 6px;
}
.ig-skip-link:focus { left: 0.5rem; }
.ig-impersonation-banner {
  background: var(--warning-focus, #fef3c7); color: var(--warning-600, #92400e);
  padding: 0.75rem 1.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: center; justify-content: space-between;
}
.ig-impersonation-banner p { margin: 0; color: inherit; }
.ig-impersonation-banner button { background: var(--warning-600, #92400e) !important; border-color: var(--warning-600, #92400e) !important; }

/* Mobile card layout for the two/three tables that opted in with data-label (actions, issues, urls index). */
@media (max-width: 767.98px) {
  .ig-responsive-table tbody tr:has(td[data-label]) {
    display: block; border: 1px solid var(--neutral-200); border-radius: 10px;
    padding: 0.875rem 1rem; margin-bottom: 0.75rem; background: var(--white);
  }
  .ig-responsive-table tbody tr:has(td[data-label]):last-child { margin-bottom: 0; }
  .ig-responsive-table tr:has(td[data-label]) td { display: block; border: 0; padding: 0.25rem 0; }
  .ig-responsive-table thead:has(+ tbody td[data-label]) { display: none; }
  .ig-responsive-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary-light); margin-bottom: 0.125rem;
  }
}

/* ---- Pagination (resources/views/vendor/pagination/ig.blade.php) ---- */
.ig-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1.25rem; }
.ig-pagination-summary { margin: 0; color: var(--text-secondary-light); font-size: 0.8125rem; }
.ig-pagination-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.ig-pagination-list li { display: inline-flex; }
.ig-pagination-list a, .ig-pagination-list span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.625rem; border-radius: 8px;
  font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary-light);
  text-decoration: none !important; border: 1px solid transparent;
}
.ig-pagination-list a:hover { background: var(--neutral-100, #f3f4f6); color: var(--text-primary-light); }
.ig-pagination-active span { background: var(--primary-600); color: #fff; }
.ig-pagination-disabled span { color: var(--neutral-300); cursor: not-allowed; }
.ig-pagination-dots span { color: var(--neutral-400); }

/* Clickable KPI card variant (e.g. site show's Errors card -> crawl errors list). */
.ig-kpi-link { display: block; text-decoration: none !important; transition: box-shadow 0.15s, border-color 0.15s; cursor: pointer; }
.ig-kpi-link:hover { border-color: var(--danger-600, #ef4a00); box-shadow: 0 0.25rem 1rem rgba(239, 74, 0, 0.12); }
.ig-kpi-link .ig-kpi-sub { color: var(--danger-600, #ef4a00) !important; font-weight: 500; }

/* Long flat URL sample list: two columns on wide screens instead of one very tall column. */
@media (min-width: 992px) {
  .ig-url-sample { columns: 2; column-gap: 2rem; }
  .ig-url-sample > li { break-inside: avoid; }
}

/* ---- Form Switch UI & WowDash Normalization ---- */
.form-switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding-left: 0 !important;
  padding-inline-start: 0 !important;
  min-height: auto !important;
  margin-bottom: 0 !important;
}
.form-switch .form-check-input {
  box-shadow: none !important;
  margin: 0 !important;
  position: relative !important;
  float: none !important;
  width: 38px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background-color: var(--neutral-400, #9ca3af) !important;
  background-image: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.form-switch .form-check-input:checked {
  background-color: var(--primary-600, #487fff) !important;
}
.form-switch .form-check-input::before {
  position: absolute !important;
  content: "" !important;
  width: 16px !important;
  height: 16px !important;
  background: #fff !important;
  border-radius: 50% !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: 2px !important;
  transition: left 0.18s ease-in-out !important;
}
.form-switch .form-check-input:checked::before {
  left: calc(100% - 18px) !important;
}
.form-switch .form-check-label {
  display: inline-block !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  cursor: pointer !important;
  line-height: 1.25 !important;
  user-select: none;
}

/* ---- Modal & Close Button Enhancement ---- */
.btn-close,
.modal-header .btn-close,
.ig-admin-content .btn-close {
  box-sizing: border-box;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--neutral-600, #475569) !important;
  opacity: 0.85 !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.btn-close:hover,
.modal-header .btn-close:hover,
.ig-admin-content .btn-close:hover {
  color: var(--neutral-900, #0f172a) !important;
  background-color: var(--neutral-100, #f1f5f9) !important;
  border-color: var(--neutral-200, #e2e8f0) !important;
  opacity: 1 !important;
}

.btn-close:focus,
.modal-header .btn-close:focus,
.ig-admin-content .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(72, 127, 255, 0.2) !important;
  outline: none !important;
}

.btn-close i,
.modal-header .btn-close i {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  color: inherit !important;
  pointer-events: none;
}

.btn-close:empty::before,
.modal-header .btn-close:empty::before {
  content: "\eb99" !important; /* Remixicon ri-close-line */
  font-family: 'remixicon' !important;
  font-style: normal;
  font-weight: normal;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  color: inherit !important;
  display: inline-block !important;
  pointer-events: none;
}

[data-theme="dark"] .btn-close,
[data-theme="dark"] .modal-header .btn-close,
[data-theme="dark"] .ig-admin-content .btn-close {
  color: var(--neutral-300, #cbd5e1) !important;
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
}

[data-theme="dark"] .btn-close:hover,
[data-theme="dark"] .modal-header .btn-close:hover,
[data-theme="dark"] .ig-admin-content .btn-close:hover {
  color: #ffffff !important;
  background-color: var(--neutral-700, #334155) !important;
  border-color: var(--neutral-600, #475569) !important;
}

/* Secondary & Outline Secondary buttons inside Modals & Admin */
.btn-secondary {
  background-color: var(--neutral-600, #475569) !important;
  border-color: var(--neutral-600, #475569) !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background-color: var(--neutral-700, #334155) !important;
  border-color: var(--neutral-700, #334155) !important;
  color: #ffffff !important;
}

.btn-outline-secondary {
  background-color: transparent !important;
  border: 1px solid var(--neutral-300, #cbd5e1) !important;
  color: var(--neutral-700, #334155) !important;
}

.btn-outline-secondary:hover {
  background-color: var(--neutral-100, #f1f5f9) !important;
  border-color: var(--neutral-400, #94a3b8) !important;
  color: var(--neutral-900, #0f172a) !important;
}

[data-theme="dark"] .btn-secondary {
  background-color: var(--neutral-700, #334155) !important;
  border-color: var(--neutral-600, #475569) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: var(--neutral-600, #475569) !important;
  border-color: var(--neutral-500, #64748b) !important;
}

[data-theme="dark"] .btn-outline-secondary {
  border-color: var(--neutral-600, #475569) !important;
  color: var(--neutral-300, #cbd5e1) !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--neutral-700, #334155) !important;
  border-color: var(--neutral-500, #64748b) !important;
  color: #ffffff !important;
}

/* Shared next-action summary: keep evidence and the primary action together. */
.ig-admin-content .ig-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 24px;
  border: 1px solid var(--neutral-200, #e2e8f0);
  border-inline-start: 4px solid var(--primary-600, #2563eb);
  border-radius: 12px;
  background: var(--white, #fff);
  color: var(--text-primary-light, #1e293b);
  box-shadow: none;
}
.ig-admin-content .ig-next-step--warning { border-inline-start-color: #b45309; }
.ig-next-step-copy, .ig-page-header > div { min-width: 0; }
.ig-next-step h2 { font-size: 1.35rem; line-height: 1.4; margin: 0 0 8px; overflow-wrap: anywhere; }
.ig-next-step .ig-eyebrow { font-size: .75rem; font-weight: 600; margin: 0 0 8px; }
.ig-next-step-description { max-width: 75ch; margin: 0; line-height: 1.65; }
.ig-evidence { font-size: .8125rem; color: var(--text-secondary-light, #475569); margin: 12px 0 0; }
.ig-next-step > .btn { flex-shrink: 0; white-space: normal; }
.ig-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ig-page-header h1 { display: block !important; overflow-wrap: anywhere; margin: 0 0 8px; }
.ig-page-header p { margin: 0; color: var(--text-secondary-light, #475569); }
.ig-admin-content :is(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--primary-600, #2563eb); outline-offset: 3px; }
@media (max-width: 767px) {
  .ig-admin-content .ig-next-step { align-items: stretch; flex-direction: column; gap: 16px; }
  .ig-next-step > .btn { align-self: flex-start; max-width: 100%; }
}

.ig-onboarding { padding: 24px; background: var(--white, #fff); border: 1px solid var(--neutral-200, #e2e8f0); border-radius: 12px; }
.ig-onboarding > .ig-stack-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ig-onboarding-optional { margin-bottom: 16px; }
.ig-onboarding-optional summary { cursor: pointer; color: var(--text-secondary-light, #475569); }
@media (max-width: 575.98px) { .ig-onboarding > .ig-stack-list { grid-template-columns: 1fr; gap: 0; } }

.ig-site-identity { min-width: 0; max-width: 100%; }
.ig-site-identity > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.ig-site-identity .badge { white-space: normal; text-align: start; line-height: 1.5; }
@media (max-width: 575.98px) { .ig-site-identity { flex-direction: column; align-items: flex-start !important; } }

/* Long translated labels (German especially) must be able to wrap inside narrow flex rows;
   Bootstrap's nowrap badge otherwise refuses to shrink and widens the whole page at 360px. */
.badge {
    white-space: normal;
    text-align: start;
    max-width: 100%;
}

/* ---- Accessible palette (WCAG 2.1 AA, light theme) ----------------------------------------
   The template's brand tones fail the 4.5:1 text contrast minimum: white on #487fff is 3.64:1,
   its green, orange and red text tones are 1.9-3.5:1 on their pale badge backgrounds. These
   darker steps keep the hues and clear 4.5:1 on white and on the tinted badge backgrounds. */
:root[data-theme="light"] {
    --primary-600: #2f5fe0;
    --success-600: #166534;
    --warning-600: #92400e;
    --danger-600: #b91c1c;
    --danger-main: #c2410c;
    --info-600: #1d4ed8;
    --bs-primary: #2f5fe0;
    --bs-primary-rgb: 47, 95, 224;
}
:root[data-theme="light"] .badge.bg-success-subtle.text-success,
:root[data-theme="light"] .badge.bg-success-subtle { color: #0f5132 !important; }
:root[data-theme="light"] .badge.bg-danger-subtle.text-danger,
:root[data-theme="light"] .badge.bg-danger-subtle { color: #842029 !important; }
:root[data-theme="light"] .badge.bg-warning-subtle.text-warning,
:root[data-theme="light"] .badge.bg-warning-subtle { color: #664d03 !important; }
:root[data-theme="light"] .badge.bg-info-subtle.text-info,
:root[data-theme="light"] .badge.bg-info-subtle { color: #055160 !important; }
:root[data-theme="light"] .badge.bg-primary-subtle.text-primary,
:root[data-theme="light"] .badge.bg-primary-subtle { color: #052c65 !important; }
:root[data-theme="light"] .badge.bg-secondary-subtle.text-secondary,
:root[data-theme="light"] .badge.bg-secondary-subtle { color: #2b2f32 !important; }
:root[data-theme="light"] .btn-outline-neutral-300 { color: #374151 !important; }
:root[data-theme="light"] .btn-outline-neutral-300:hover { background-color: #e5e7eb !important; color: #111827 !important; }
:root[data-theme="light"] .btn-outline-primary { --bs-btn-color: #0b5ed7; --bs-btn-border-color: #0b5ed7; }

/* Bootstrap resets the outline on .btn:focus-visible and the template's .shadow-none removes the
   ring it uses instead, leaving keyboard users with no focus indicator on buttons. */
.btn:focus-visible,
.dropdown-toggle:focus-visible {
    outline: 3px solid var(--primary-600);
    outline-offset: 2px;
}

/* Remaining text tones on pale tinted backgrounds (see the palette note above). */
:root[data-theme="light"] {
    --bs-success-rgb: 22, 101, 52;
    --bs-danger-rgb: 185, 28, 28;
    --primary-700: #2b4cc0;
    --primary-800: #2a3fa8;
}
:root[data-theme="light"] .text-warning-main,
:root[data-theme="light"] .text-warning-600,
:root[data-theme="light"] .text-warning-700 { color: #92400e !important; }
:root[data-theme="light"] .text-danger-main { color: #9a3412 !important; }
:root[data-theme="light"] code { color: #a61e4d; }

/* Scripts the interface font (Inter) has no glyphs for. Naming a system font per language keeps the
   browser from guessing, so Arabic, Indic and CJK text renders with a proper face on every OS. */
body:lang(ar), body:lang(ur) { font-family: "Inter", "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
body:lang(hi) { font-family: "Inter", "Nirmala UI", "Noto Sans Devanagari", "Mangal", sans-serif; }
body:lang(bn) { font-family: "Inter", "Nirmala UI", "Noto Sans Bengali", "Vrinda", sans-serif; }
body:lang(ja) { font-family: "Inter", "Yu Gothic UI", "Hiragino Sans", "Meiryo", "Noto Sans JP", sans-serif; }
body:lang(zh) { font-family: "Inter", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; }
body:lang(ko) { font-family: "Inter", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
/* Letter spacing breaks the joined letters of Arabic script; uppercase does not exist in these scripts. */
body:lang(ar) *, body:lang(ur) * { letter-spacing: 0 !important; text-transform: none !important; }

/* ---- Dark theme: readable text and chips (found by the axe sweep; the theme left dark text on dark cards) ----
   Cards are #273142 on a #1b2431 page. Everything below is for text and tinted chips on those surfaces. */
:root[data-theme="dark"] {
  --ig-dark-strong: #e6edf5;
  --ig-dark-muted: #aab8c8;
  --ig-dark-link: #94b6ff;
}
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] th, [data-theme="dark"] strong, [data-theme="dark"] b,
[data-theme="dark"] .text-dark, [data-theme="dark"] .text-neutral-700, [data-theme="dark"] .text-neutral-800, [data-theme="dark"] .text-neutral-900,
[data-theme="dark"] .text-body, [data-theme="dark"] .card-title, [data-theme="dark"] .form-label { color: var(--ig-dark-strong) !important; }
[data-theme="dark"] .text-muted, [data-theme="dark"] .text-secondary, [data-theme="dark"] .text-secondary-light, [data-theme="dark"] .tracking-wide,
[data-theme="dark"] .text-neutral-500, [data-theme="dark"] .text-neutral-600, [data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-neutral-300, [data-theme="dark"] .btn-outline-neutral-300 .text-xs { color: var(--ig-dark-muted) !important; }
[data-theme="dark"] .btn-outline-secondary, [data-theme="dark"] .btn-outline-neutral-300 { border-color: #4a5a70 !important; }
[data-theme="dark"] .text-primary, [data-theme="dark"] .text-primary-600, [data-theme="dark"] .text-primary-700, [data-theme="dark"] .text-primary-800, [data-theme="dark"] .text-primary-900,
[data-theme="dark"] a.text-decoration-none, [data-theme="dark"] summary, [data-theme="dark"] .btn-outline-primary { color: var(--ig-dark-link) !important; }
[data-theme="dark"] .btn-outline-primary { border-color: var(--ig-dark-link) !important; }
[data-theme="dark"] .btn-outline-primary:hover { background: rgba(148, 182, 255, 0.14) !important; }
/* tinted chips: translucent tint with the light variant of the colour as text */
[data-theme="dark"] .bg-success-subtle, [data-theme="dark"] .bg-success-focus, [data-theme="dark"] .bg-success-100 { background: rgba(52, 211, 153, 0.16) !important; }
[data-theme="dark"] .bg-success-subtle, [data-theme="dark"] .bg-success-focus, [data-theme="dark"] .bg-success-100,
[data-theme="dark"] .text-success, [data-theme="dark"] .text-success-600, [data-theme="dark"] .text-success-700, [data-theme="dark"] .text-success-main { color: #6ee7b7 !important; }
[data-theme="dark"] .bg-warning-subtle, [data-theme="dark"] .bg-warning-focus, [data-theme="dark"] .bg-warning-100 { background: rgba(251, 191, 36, 0.16) !important; }
[data-theme="dark"] .bg-warning-subtle, [data-theme="dark"] .bg-warning-focus, [data-theme="dark"] .bg-warning-100,
[data-theme="dark"] .text-warning, [data-theme="dark"] .text-warning-600, [data-theme="dark"] .text-warning-700, [data-theme="dark"] .text-warning-main { color: #fcd34d !important; }
[data-theme="dark"] .bg-danger-subtle, [data-theme="dark"] .bg-danger-focus, [data-theme="dark"] .bg-danger-100 { background: rgba(248, 113, 113, 0.18) !important; }
[data-theme="dark"] .bg-danger-subtle, [data-theme="dark"] .bg-danger-focus, [data-theme="dark"] .bg-danger-100,
[data-theme="dark"] .text-danger, [data-theme="dark"] .text-danger-600, [data-theme="dark"] .text-danger-700, [data-theme="dark"] .text-danger-main { color: #fca5a5 !important; }
[data-theme="dark"] .bg-info-subtle, [data-theme="dark"] .bg-info-focus, [data-theme="dark"] .bg-info-100,
[data-theme="dark"] .bg-primary-subtle, [data-theme="dark"] .bg-primary-focus, [data-theme="dark"] .bg-primary-100 { background: rgba(96, 165, 250, 0.18) !important; }
[data-theme="dark"] .bg-info-subtle, [data-theme="dark"] .bg-info-focus, [data-theme="dark"] .bg-info-100,
[data-theme="dark"] .bg-primary-subtle .text-primary, [data-theme="dark"] .bg-primary-focus .text-primary-600 { color: #93c5fd !important; }
[data-theme="dark"] .bg-secondary-subtle, [data-theme="dark"] .bg-neutral-100, [data-theme="dark"] .bg-neutral-200 { background: rgba(148, 163, 184, 0.18) !important; color: var(--ig-dark-muted) !important; }
[data-theme="dark"] .alert-warning, [data-theme="dark"] .alert-danger, [data-theme="dark"] .alert-info, [data-theme="dark"] .alert-success { color: #0b1c33 !important; }
[data-theme="dark"] .alert-warning .text-danger { color: #8a1c1c !important; }

/* any theme: the active page in pagination was white on #487fff (3.6:1) */
.pagination .active-page > span, .pagination .active > .page-link { background-color: #3563d6 !important; border-color: #3563d6 !important; color: #fff !important; }

/* Dark theme: cards and panels that set an explicit light background stay light otherwise, and the light text
   above would sit on white. They get the same surface as the other cards. */
[data-theme="dark"] .bg-white, [data-theme="dark"] .bg-body, [data-theme="dark"] .bg-body-tertiary, [data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-neutral-50, [data-theme="dark"] .bg-neutral-100, [data-theme="dark"] .bg-base { background-color: #273142 !important; }
[data-theme="dark"] .border-neutral-200, [data-theme="dark"] .border-neutral-300, [data-theme="dark"] .border { border-color: #3a4a60 !important; }
[data-theme="dark"] .btn-outline-danger { color: #ff9b85 !important; border-color: #ff9b85 !important; }
[data-theme="dark"] .btn-outline-danger:hover { background: rgba(255, 155, 133, 0.14) !important; }
[data-theme="dark"] code { color: #f3b0d5; }

/* Dark theme: Bootstrap tables paint every cell with --bs-table-bg (white); alerts keep their light tint, so text inside
   them stays dark. */
[data-theme="dark"] .table, [data-theme="dark"] .table > :not(caption) > * > * {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ig-dark-strong);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-table-border-color: #3a4a60;
  background-color: transparent;
  color: var(--ig-dark-strong);
  border-color: #3a4a60;
}
[data-theme="dark"] .alert strong, [data-theme="dark"] .alert .text-dark, [data-theme="dark"] .alert a { color: #0b1c33 !important; }

/* White text on the theme's #487fff is 3.6:1; this blue is 5.3:1 with white. */
.active-page > span, .bg-primary-600 { background-color: #3563d6 !important; border-color: #3563d6 !important; color: #fff !important; }
[data-theme="dark"] .accordion-button { color: var(--ig-dark-strong) !important; background-color: #273142 !important; }
[data-theme="dark"] .accordion-button:not(.collapsed) { background-color: #2f3b52 !important; }
