/* ── Consolidated app patches — merged from all patch CSS files ── */
/* Settings page UI (from settings-responsive.css) */
.settingsAllPage { display: none; }
.settingsAllPage.panel { padding: 0; background: transparent; border: 0; }
.settingsAllHero { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #18191c; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 20px; margin-bottom: 14px; }
.settingsAllHero b { display: block; color: #fff; font-size: 25px; letter-spacing: -.04em; }
.settingsAllHero p { margin: 4px 0 0; color: #9ca3af; }
.settingsAllGrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.settingsBlock { background: #18191c; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 16px; min-width: 0; overflow: hidden; }
.settingsBlock.wide { grid-column: 1 / -1; }
.settingsBlock h3 { margin: 0 0 12px; color: #f5f5f5; font-size: 17px; }
.settingsAllForm { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.settingsAllForm label { display: grid; gap: 6px; color: #9ca3af; font-size: 12px; font-weight: 800; }
.settingsAllForm label.wide, .settingsAllForm .wide { grid-column: 1 / -1; }
.settingsAllForm input, .settingsAllForm select, .settingsAllForm textarea { width: 100%; min-width: 0; box-sizing: border-box; background: #101116; border: 1px solid rgba(255,255,255,.08); color: #e5e7eb; border-radius: 11px; padding: 11px 12px; outline: none; }
.settingsAllForm button, .settingsTableWrap button, .settingsChip button { background: #2f3136; color: #fff; border: 0; border-radius: 10px; padding: 10px 12px; font-weight: 900; cursor: pointer; }
.settingsAllForm button:hover, .settingsTableWrap button:hover { background: #3a3c42; }
.settingsChips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.settingsChip { display: inline-flex; align-items: center; gap: 6px; background: #101116; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; color: #cbd5e1; padding: 7px 9px; font-size: 12px; max-width: 100%; overflow-wrap: anywhere; }
.settingsChip button { width: 22px; height: 22px; padding: 0; border-radius: 999px; background: #3a1d22; color: #fecdd3; }
.settingsTableWrap { width: 100%; overflow-x: auto; margin-top: 12px; }
.settingsTableWrap table { min-width: 760px; }
.settingsTableWrap th, .settingsTableWrap td { white-space: normal; }

/* AI Advisor sidebar (merged from ai-responsive-final.css + ai-scroll-fix.css) */
.aiAdvisorToggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 130;
  width: 76px; height: 76px; padding: 0; border-radius: 999px;
  background: #111317; border: 1px solid rgba(80,210,255,.38);
  color: transparent; font-size: 0; overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.45), 0 0 34px rgba(34,211,238,.18);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.aiAdvisorToggle::before {
  content: "";
  position: absolute; inset: 7px; border-radius: 999px;
  background: radial-gradient(circle at center,rgba(34,197,94,.95) 0 5px,rgba(34,197,94,.22) 6px 9px,transparent 10px),
    repeating-radial-gradient(circle at center,rgba(56,189,248,.28) 0 1px,transparent 2px 15px),
    conic-gradient(from 0deg,transparent 0deg,rgba(56,189,248,.72) 35deg,transparent 72deg);
  animation: aiFloatRadar 1.7s linear infinite;
}
.aiAdvisorToggle::after {
  content: "AI";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 1000; letter-spacing: -.04em;
  text-shadow: 0 1px 10px rgba(0,0,0,.85); margin: 0;
}
.aiSidebarOpen .aiAdvisorToggle { opacity: .75; }
@keyframes aiFloatRadar { to { transform: rotate(360deg); } }

.aiAdvisorSidebar {
  position: fixed; top: 12px; right: 12px; bottom: 12px;
  width: 310px; max-width: min(310px, calc(100vw - 24px));
  z-index: 120; border-radius: 22px;
  background: #1d1e22; border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 9px;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 12px;
  transform: translateX(calc(100% + 28px));
  transition: transform .28s ease;
}
.aiSidebarOpen .aiAdvisorSidebar { transform: translateX(0); }
.aiAdvisorSidebar * { max-width: 100%; box-sizing: border-box; }

.aiSideHead { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 0; }
.aiSideHead > div { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; align-items: center; }
.aiSideHead b { color: #f8fafc; font-size: 14px; }
.aiSideHead small { grid-column: 2; color: #93c5fd; font-size: 10px; }
.aiSideHead button { width: 30px; height: 30px; border-radius: 999px; border: 1px solid rgba(148,163,184,.18); background: rgba(15,23,42,.8); color: #cbd5e1; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }

.aiScannerBox { flex: 0 0 auto; display: grid; grid-template-columns: 50px 1fr; gap: 9px; align-items: center; padding: 9px; border-radius: 14px; background: #15161a; border: 1px solid rgba(56,189,248,.16); margin-bottom: 0; }
.aiRadar { position: relative; width: 46px; height: 46px; border-radius: 999px; background: radial-gradient(circle,rgba(14,165,233,.12),rgba(2,6,23,.7)); border: 1px solid rgba(125,211,252,.28); overflow: hidden; }

.aiMetricMini { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin-bottom: 0; }
.aiMetricMini span { padding: 7px 4px; border-radius: 11px; display: block; text-align: center; }
.aiMetricMini b { display: block; font-size: 14px; }

.aiAdvisorText { flex: 0 0 auto; max-height: 130px; overflow: auto; padding: 10px; border-radius: 13px; background: #15161a; }
.aiAdvisorText p { font-size: 11px; line-height: 1.4; margin: 0; }

.aiSamples { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.aiSamples div { padding: 9px; border-radius: 12px; background: #15161a; }
.aiSamples b { font-size: 11px; display: block; }
.aiSamples small { font-size: 10px; color: var(--muted, #8b98a8); }

.aiPromptChips { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 5px; }
.aiPromptChips button { font-size: 10px; padding: 6px 7px; border-radius: 10px; white-space: normal; }

.aiAnswerBox { flex: 1 1 auto; min-height: 90px; max-height: 180px; overflow-y: auto; padding: 10px; background: #15161a; border-radius: 13px; }
.aiAnswerBox b { font-size: 12px; display: block; margin-bottom: 4px; }
.aiAnswerBox p { font-size: 11px; line-height: 1.4; margin: 0; }

.aiAskBox { flex: 0 0 auto; position: sticky; bottom: 0; background: #1d1e22; padding-top: 8px; z-index: 2; display: grid; grid-template-columns: 1fr 52px; gap: 7px; }
.aiAskBox input { height: 38px; font-size: 12px; border-radius: 11px; }
.aiAskBox button { height: 38px; border-radius: 11px; padding: 0; }
.aiRefreshFull { flex: 0 0 auto; height: 38px; }

.aiAdvisorText, .aiSamples div, .aiAnswerBox { overflow-wrap: anywhere; }
.aiPromptChips button { white-space: normal; }
.aiAdvisorSpark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: rgba(56,189,248,.14); color: #7dd3fc; box-shadow: 0 0 20px rgba(56,189,248,.22); }

/* Alert center mobile */
.alertList { align-items: stretch; }
.alertItem { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; padding: 12px; overflow: hidden; }
.alertItem b, .alertItem strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alertItem small, .alertItem span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }

/* Analytics page */
.analyticsMode main > :not(#analyticsPage) { display: none; }
#analyticsPage { display: none; }
.analyticsMode #analyticsPage { display: block; width: 100%; max-width: 100%; overflow-x: hidden; }
.analyticsPage, .analyticsPage * { box-sizing: border-box; min-width: 0; }
.analyticsHero { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 1px solid rgba(56,189,248,.18); background: radial-gradient(circle at top left,rgba(56,189,248,.14),transparent 34%), linear-gradient(135deg,rgba(15,23,42,.94),rgba(2,6,23,.95)); border-radius: 18px; padding: 20px; margin-bottom: 14px; }
.analyticsHero b { color: #f8fafc; font-size: 24px; }
.analyticsHero p { color: #94a3b8; margin: 6px 0 0; }
.analyticsGridTop { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.analyticsGridTop div, .analyticsCard { background: rgba(15,23,42,.72); border: 1px solid rgba(148,163,184,.12); border-radius: 16px; padding: 16px; }
.analyticsGridTop b { display: block; color: #fff; font-size: 28px; }
.analyticsGridTop span { color: #93c5fd; font-size: 11px; text-transform: uppercase; }
.analyticsTwoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.analyticsCard h3 { margin: 0 0 10px; color: #f8fafc; font-size: 15px; }
.analyticsCard p, .analyticsCard span, .analyticsCard small { overflow-wrap: anywhere; word-break: break-word; }
.analyticsSamples, .projectSeoGrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 10px; }
.projectSeoCard { min-width: 0; overflow: hidden; background: rgba(15,23,42,.72); border: 1px solid rgba(148,163,184,.12); border-radius: 16px; padding: 16px; }
.projectSeoCard p, .projectSeoCard small, .projectSeoCard li { overflow-wrap: anywhere; word-break: break-word; }
.projectSeoCard div { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.projectSeoCard div span { white-space: normal; text-align: right; }

/* Node status card (clean overrides without !important) */
.nodeStatusGrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
.nodeStatusCard { min-width: 0; overflow: hidden; }

/* ── Responsive breakpoints ── */
@media (max-width: 1280px) {
  .aiAdvisorSidebar { width: 292px; max-width: min(292px,calc(100vw - 20px)); }
}
@media (max-width: 1100px) {
  .settingsAllGrid { grid-template-columns: 1fr; }
  .settingsAllHero { align-items: flex-start; }
  .settingsAllForm { grid-template-columns: 1fr; }
  .analyticsTwoCol { grid-template-columns: 1fr; }
  .analyticsGridTop { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .aiAdvisorSidebar { width: 300px; }
}
@media (max-width: 760px) {
  .settingsAllHero { flex-direction: column; }
  .settingsAllHero .smallBtn { width: 100%; }
  .settingsBlock { padding: 14px; }
  .settingsAllForm input, .settingsAllForm select, .settingsAllForm textarea { font-size: 16px; }
  .settingsTableWrap table { min-width: 680px; }
  .alertList { grid-template-columns: 1fr; }
  .alertItem { grid-template-columns: 1fr; gap: 7px; padding: 13px; }
  .alertItem b, .alertItem strong { white-space: normal; overflow-wrap: anywhere; }
  .alertItem .badge { width: max-content; }
  .panelHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .analyticsGridTop { grid-template-columns: 1fr 1fr; }
  .analyticsTwoCol { grid-template-columns: 1fr; }
  .analyticsSamples, .projectSeoGrid { grid-template-columns: 1fr; }
  .aiAdvisorSidebar { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; max-width: none; }
  .aiAnswerBox { max-height: 140px; }
  .aiPromptChips { display: grid; grid-template-columns: 1fr 1fr; }
  .aiPromptChips button { min-height: 36px; }
  .aiRefreshFull { display: none; }
  .aiAdvisorToggle { right: 14px; bottom: 96px; z-index: 150; width: 62px; height: 62px; }
  /* Mobile table: card layout */
  .panel:has(table) { overflow: hidden; }
  .panel table { display: block; width: 100%; max-width: 100%; min-width: 0; }
  .panel thead { display: none; }
  .panel tbody { display: grid; gap: 10px; width: 100%; }
  .panel tbody tr { display: block; width: 100%; background: #202124; border: 1px solid #303136; border-radius: 16px; padding: 12px; overflow: hidden; }
  .panel tbody td { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 8px; align-items: start; width: 100%; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); padding: 8px 0; font-size: 14px; line-height: 1.35; word-break: break-word; overflow-wrap: anywhere; }
  .panel tbody td:last-child { border-bottom: 0; }
  .panel tbody td::before { color: #9ca3af; font-size: 10px; font-weight: 1000; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
  .panel tbody td:nth-child(1)::before { content: 'Domain'; }
  .panel tbody td:nth-child(2)::before { content: 'Project'; }
  .panel tbody td:nth-child(3)::before { content: 'Status'; }
  .panel tbody td:nth-child(4)::before { content: 'Last'; }
  .panel tbody td:nth-child(5)::before { content: 'Checked'; }
  .panel tbody td:nth-child(6)::before { content: 'Active'; }
  .panel tbody td:nth-child(7)::before { content: 'Actions'; }
  .panel tbody td:nth-child(7) { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .panel tbody td:nth-child(7)::before { width: 92px; flex: 0 0 92px; }
  .panel tbody td:nth-child(7) button { width: 42px; height: 42px; border-radius: 12px; }
  .domainCell { font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight: 900; }
  .badge { writing-mode: horizontal-tb; display: inline-flex; min-width: auto; width: auto; height: auto; padding: 6px 10px; line-height: 1; white-space: nowrap; }
  .cards { gap: 12px; }
  .card { min-height: 120px; padding: 18px; }
  .panel { border-radius: 16px; }
  .filters { grid-template-columns: 1fr; gap: 10px; }
  .filters input, .filters select { width: 100%; font-size: 16px; }
  .settingsAllGrid, .settingsAllForm { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { padding-bottom: 92px; }
  .aiAdvisorToggle { bottom: 92px; }
}
@media (max-width: 420px) {
  .panel tbody td { grid-template-columns: 82px minmax(0,1fr); }
  .panel tbody td:nth-child(7)::before { width: 82px; flex-basis: 82px; }
}
