/* ==========================================================================
   STRADI SEO MONITOR — globalny motyw (Dark Mode premium)
   Inspiracja: Linear / Vercel / GitHub Dark / Notion / Stripe Dashboard
   Jeden plik motywu. Warstwa wyłącznie wizualna — bez zmian logiki.
   ========================================================================== */

:root {
  /* paleta marki (jasny fallback) */
  --stradi-bg: #f8fafc;
  --stradi-sidebar: #0f172a;
  --stradi-card: #ffffff;
  --stradi-hover: #eef2ff;
  --stradi-border: rgba(148, 163, 184, 0.25);
  --stradi-text: #0f172a;
  --stradi-muted: #64748b;
  --stradi-primary: #3b82f6;
  --stradi-primary-rgb: 59, 130, 246;
  --stradi-success: #22c55e;
  --stradi-warn: #f59e0b;
  --stradi-danger: #ef4444;
  --stradi-radius-card: 16px;
  --stradi-radius-field: 12px;
  --stradi-radius-btn: 11px;
  --stradi-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK THEME (domyślny) =========================================== */
[data-bs-theme="dark"] {
  --stradi-bg: #0b1120;
  --stradi-sidebar: #111827;
  --stradi-card: #1f2937;
  --stradi-hover: #374151;
  --stradi-border: #2d3748;
  --stradi-text: #f9fafb;
  --stradi-muted: #9ca3af;
  --stradi-primary: #3b82f6;
  --stradi-primary-rgb: 59, 130, 246;
  --stradi-success: #22c55e;
  --stradi-warn: #f59e0b;
  --stradi-danger: #ef4444;

  /* mapowanie na zmienne Bootstrap 5.3 */
  --bs-body-bg: var(--stradi-bg);
  --bs-body-color: var(--stradi-text);
  --bs-emphasis-color: #ffffff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-secondary-color: var(--stradi-muted);
  --bs-secondary-bg: var(--stradi-card);
  --bs-tertiary-bg: #0b1120;
  --bs-border-color: var(--stradi-border);
  --bs-border-color-translucent: var(--stradi-border);
  --bs-primary: var(--stradi-primary);
  --bs-primary-rgb: var(--stradi-primary-rgb);
  --bs-link-color: #60a5fa;
  --bs-link-color-rgb: 96, 165, 250;
  --bs-link-hover-color: #93c5fd;
  --bs-heading-color: var(--stradi-text);
}

body,
.app-body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--stradi-bg);
  color: var(--stradi-text);
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .app-body,
[data-bs-theme="dark"] .content-wrapper,
[data-bs-theme="dark"] .wrapper,
[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: var(--stradi-bg) !important;
  color: var(--stradi-text);
}

.page-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--stradi-text);
}

/* ===== SIDEBAR ========================================================= */
.main-sidebar,
[data-bs-theme="dark"] .main-sidebar {
  background: linear-gradient(180deg, #111827 0%, #0d1424 60%, #0b1120 100%) !important;
  
}

.main-sidebar .brand-link {
  border-bottom: 1px solid var(--stradi-border);
  color: var(--stradi-text);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-text { letter-spacing: 0.04em; }

.nav-sidebar .nav-item { margin: 2px 10px; }

.nav-sidebar .nav-link {
  color: #cbd5e1 !important;
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background var(--stradi-transition), color var(--stradi-transition), transform var(--stradi-transition);
}

.nav-sidebar .nav-link:hover {
  background: var(--stradi-hover) !important;
  color: #ffffff !important;
  transform: translateX(2px);
}

.nav-sidebar .nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.9)) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 8px 24px rgba(59, 130, 246, 0.35);
}

.nav-sidebar .nav-link .nav-icon,
.nav-sidebar .nav-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.nav-sidebar .nav-link svg { stroke-width: 2; }

/* ===== NAVBAR ========================================================== */
.main-header.navbar,
[data-bs-theme="dark"] .main-header.navbar {
  background: rgba(17, 24, 39, 0.85) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stradi-border) !important;
}
.main-header .nav-link { color: var(--stradi-text) !important; }
.main-header .nav-link:hover { color: var(--stradi-primary) !important; }

/* ===== CARDS / PANELE ================================================== */
.card,
[data-bs-theme="dark"] .card {
  background-color: var(--stradi-card);
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-card);
  color: var(--stradi-text);
}
.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--stradi-border);
  color: var(--stradi-text);
  font-weight: 600;
}
.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--stradi-border);
}
.card-outline {
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-card);
}
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 18px rgba(0, 0, 0, 0.18) !important; }

/* ===== KAFELKI STATYSTYK (Dashboard) ================================== */
.stat-tile {
  background: var(--stradi-card);
  border-radius: var(--stradi-radius-card);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--stradi-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform var(--stradi-transition), box-shadow var(--stradi-transition), border-color var(--stradi-transition);
  height: 100%;
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.stat-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(var(--stradi-primary-rgb), 0.5);
}
.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  background: rgba(var(--stradi-primary-rgb), 0.12);
}
.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--stradi-text);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.stat-value-main { color: var(--stradi-text); }
.stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--stradi-muted);
  margin-top: auto;
  padding-top: 0.5rem;
}
.stat-tile-priority {
  border-color: rgba(var(--stradi-primary-rgb), 0.45);
}
.stat-trend {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.stat-value .stat-trend-up { color: #22c55e !important; }
.stat-value .stat-trend-down { color: #ef4444 !important; }

.tile-indigo .stat-icon { color: #818cf8; background: rgba(129, 140, 248, 0.14); }
.tile-emerald .stat-icon { color: #34d399; background: rgba(52, 211, 153, 0.14); }
.tile-sky .stat-icon { color: #38bdf8; background: rgba(56, 189, 248, 0.14); }
.tile-violet .stat-icon { color: #a78bfa; background: rgba(167, 139, 250, 0.14); }
.tile-amber .stat-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.tile-rose .stat-icon { color: #fb7185; background: rgba(251, 113, 133, 0.14); }
.tile-cyan .stat-icon { color: #22d3ee; background: rgba(34, 211, 238, 0.14); }
.tile-green .stat-icon { color: #4ade80; background: rgba(74, 222, 128, 0.14); }
.tile-red .stat-icon { color: #f87171; background: rgba(248, 113, 113, 0.14); }

/* ===== WYKRESY ========================================================= */
.chart-box {
  position: relative;
  height: 220px;
  width: 100%;
  overflow: hidden;
}
.chart-box canvas { max-height: 220px !important; }
.chart-box-kw7 { height: 180px; max-height: 180px; }
.chart-box-kw7 canvas { max-height: 180px !important; height: 100% !important; }
.chart-box-tall { height: 280px; max-height: 280px; }
.chart-box-tall canvas { max-height: 280px !important; height: 100% !important; }
.chart-box-mid { height: 220px; max-height: 220px; }
.chart-box-mid canvas { max-height: 220px !important; height: 100% !important; }
.chart-box-donut { height: 260px; width: 100%; max-width: 280px; }
.chart-box-donut canvas { max-height: 260px !important; }
.apexcharts-tooltip {
  background: #0b1120 !important;
  border: 1px solid var(--stradi-border) !important;
  color: var(--stradi-text) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}
.apexcharts-tooltip-title {
  background: #111827 !important;
  border-bottom: 1px solid var(--stradi-border) !important;
}
.apexcharts-legend-text { color: var(--stradi-muted) !important; }

/* ===== TABELE ========================================================== */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--stradi-text);
  --bs-table-border-color: var(--stradi-border);
  color: var(--stradi-text);
}
.table > :not(caption) > * > * { background-color: transparent; }
.table thead th {
  color: var(--stradi-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--stradi-border);
  background-color: var(--stradi-card);
}
.table-responsive { border-radius: var(--stradi-radius-card); }
.table-hover > tbody > tr { transition: background var(--stradi-transition); }
.table-hover > tbody > tr:hover > * {
  background-color: var(--stradi-hover) !important;
  color: var(--stradi-text);
}
.table tbody td { border-color: var(--stradi-border); vertical-align: middle; padding: 0.7rem 0.75rem; }

/* sticky header dla tabel w przewijanym kontenerze (Konkurencja) */
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
/* DataTables (Frazy) ma własny stały nagłówek przy scrollY */
.dataTables_scrollHead, .dataTables_scrollHead table { background: var(--stradi-card); }
.dataTables_scrollHead thead th { border-bottom: 1px solid var(--stradi-border); }

/* wiersz „Twoja domena” — bez Bootstrap table-warning (żółty + biały tekst) */
.table.table-striped tbody tr.stradi-row-target > *,
.table tbody tr.stradi-row-target > * {
  background-color: rgba(59, 130, 246, 0.22) !important;
  color: #f3f4f6 !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  box-shadow: inset 4px 0 0 #3b82f6;
}
.table.table-striped tbody tr.stradi-row-target:hover > *,
.table tbody tr.stradi-row-target:hover > * {
  background-color: rgba(59, 130, 246, 0.32) !important;
  color: #fff !important;
}
.stradi-dot-you { background: #3b82f6 !important; }

/* Historia SERP — premium (ciemny motyw) */
.stradi-serp-premium {
  border: 1px solid #2d3748;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.stradi-serp-premium__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(180deg, #1a2332 0%, #111827 100%);
  border-bottom: 1px solid #2d3748;
  font-weight: 600;
  font-size: 0.92rem;
  color: #e2e8f0;
}
.stradi-serp-premium__table {
  --bs-table-bg: transparent;
  --bs-table-color: #cbd5e1;
  --bs-table-hover-bg: rgba(59, 130, 246, 0.06);
  border-collapse: separate;
  border-spacing: 0;
}
.stradi-serp-premium__table thead th {
  background: #151d2b;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid #2d3748;
  white-space: nowrap;
}
.stradi-serp-premium__col-type { width: 3.5rem; text-align: center; }
.stradi-serp-premium__col-pos { width: 5rem; text-align: center; }
.stradi-serp-premium__row td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(45, 55, 72, 0.55);
  vertical-align: middle;
}
.stradi-serp-premium__row:nth-child(even) td {
  background: rgba(15, 23, 42, 0.45);
}
.stradi-serp-premium__row:nth-child(odd) td {
  background: rgba(17, 24, 39, 0.35);
}
.stradi-serp-premium__row:hover td {
  background: rgba(59, 130, 246, 0.07) !important;
}
.stradi-serp-premium__row--block .stradi-serp-premium__name,
.stradi-serp-premium__row--block .stradi-serp-premium__type-icon {
  color: #64748b;
}
.stradi-serp-premium__type {
  text-align: center;
}
.stradi-serp-premium__type-icon {
  font-size: 1rem;
  color: #94a3b8;
}
.stradi-serp-premium__pos {
  text-align: center;
}
.stradi-serp-premium__pos-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}
.stradi-serp-premium__pos-empty {
  color: #475569;
  font-size: 1rem;
}
.stradi-serp-premium__addr-inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.stradi-serp-premium__you-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.stradi-serp-premium__name,
.stradi-serp-premium__link {
  font-size: 0.92rem;
  color: #cbd5e1;
  text-decoration: none;
  word-break: break-word;
}
.stradi-serp-premium__link:hover {
  color: #93c5fd;
  text-decoration: underline;
}
.stradi-serp-premium__name--you,
.stradi-serp-premium__link--you {
  font-weight: 700;
  color: #f8fafc;
}
.stradi-serp-premium__row--you td {
  background: rgba(245, 158, 11, 0.08) !important;
}
.stradi-serp-premium__row--you:hover td {
  background: rgba(245, 158, 11, 0.12) !important;
}

/* Legacy SERP table (inne widoki) */
tr.stradi-serp-you > * {
  background-color: rgba(34, 197, 94, 0.18) !important;
  color: #e5e7eb !important;
  box-shadow: inset 3px 0 0 #22c55e;
}
tr.stradi-serp-you.stradi-serp-you-maps > * {
  background-color: #57736892 !important;
  color: #f0fdf4 !important;
  box-shadow: inset 3px 0 0 #577368;
}
tr.stradi-serp-block > * {
  background-color: rgba(148, 163, 184, 0.08) !important;
  color: var(--stradi-muted) !important;
}
.stradi-serp-type-badge {
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: none;
}
.stradi-serp-table td {
  vertical-align: top;
}

.stradi-badge-you {
  background: rgba(59, 130, 246, 0.35);
  color: #e0e7ff;
  border: 1px solid rgba(96, 165, 250, 0.5);
}
.table-warning,
.table-warning > * {
  background-color: rgba(59, 130, 246, 0.14) !important;
  color: var(--stradi-text) !important;
  box-shadow: inset 3px 0 0 var(--stradi-primary);
}
.table-primary,
.table-primary > * {
  background-color: rgba(59, 130, 246, 0.16) !important;
  color: var(--stradi-text) !important;
}
.table-success,
.table-success > * {
  background-color: rgba(34, 197, 94, 0.14) !important;
  color: var(--stradi-text) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--stradi-text);
}

/* ===== FORMULARZE / FILTRY ============================================ */
.form-control,
.form-select {
  background-color: #0f1726;
  border: 1px solid var(--stradi-border);
  color: var(--stradi-text);
  border-radius: var(--stradi-radius-field);
  padding: 0.5rem 0.8rem;
  transition: border-color var(--stradi-transition), box-shadow var(--stradi-transition);
}
.form-control::placeholder { color: var(--stradi-muted); }
.form-control:focus,
.form-select:focus {
  background-color: #0f1726;
  color: var(--stradi-text);
  border-color: var(--stradi-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--stradi-primary-rgb), 0.3);
}
.form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-control-sm, .form-select-sm { border-radius: 9px; }
.form-check-input { background-color: #0f1726; border-color: var(--stradi-border); }
.form-check-input:checked { background-color: var(--stradi-primary); border-color: var(--stradi-primary); }
.input-group-text { background-color: #0f1726; border-color: var(--stradi-border); color: var(--stradi-muted); }
.form-label { color: var(--stradi-muted); font-weight: 500; }

/* ===== PRZYCISKI ====================================================== */
.btn {
  border-radius: var(--stradi-radius-btn);
  font-weight: 600;
  transition: background var(--stradi-transition), border-color var(--stradi-transition),
    transform var(--stradi-transition), box-shadow var(--stradi-transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--stradi-primary);
  border-color: var(--stradi-primary);
  color: #fff;
}
.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 8px 20px rgba(var(--stradi-primary-rgb), 0.4);
}
.btn-outline-primary {
  color: #60a5fa;
  border-color: rgba(var(--stradi-primary-rgb), 0.55);
  background: transparent;
}
.btn-outline-primary:hover {
  background: rgba(var(--stradi-primary-rgb), 0.15);
  color: #fff;
  border-color: var(--stradi-primary);
}
.btn-secondary,
.btn-outline-secondary {
  color: var(--stradi-text);
  border-color: var(--stradi-border);
  background: transparent;
}
.btn-secondary { background: var(--stradi-hover); }
.btn-outline-secondary:hover,
.btn-secondary:hover {
  background: var(--stradi-hover);
  color: #fff;
  border-color: var(--stradi-muted);
}
.btn-danger {
  background: var(--stradi-danger);
  border-color: var(--stradi-danger);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4); }
.btn-outline-danger { color: #f87171; border-color: rgba(239, 68, 68, 0.5); }
.btn-outline-danger:hover { background: rgba(239, 68, 68, 0.15); color: #fff; }
.btn-success { background: var(--stradi-success); border-color: var(--stradi-success); }

/* ikona-akcja w tabelach (np. lupa w Konkurencji) */
.btn-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
}

/* ===== BADGE / SPARKLINE / TRENDY ===================================== */
.badge { font-weight: 600; }
.text-bg-primary { background-color: var(--stradi-primary) !important; }
.text-bg-success { background-color: #038d35; }
.text-bg-warning { background-color: var(--stradi-warn) !important; color: #1f2937 !important; }
.text-bg-danger { background-color: var(--stradi-danger) !important; }
.text-bg-secondary { background-color: #475569 !important; }
.text-bg-info { background-color: #38bdf8 !important; }

.pos-badge {
  font-size: 0.9rem;
  padding: 0.45em 0.7em;
  border-radius: 8px;
  font-weight: 600;
}

.metric-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-field);
  padding: 0.85rem;
  color: var(--stradi-text);
}

.project-switch { min-width: 180px; }
.sparkline-cell { width: 90px; height: 28px; }
.pos-change-up { color: var(--stradi-success); font-weight: 600; }
.pos-change-down { color: var(--stradi-danger); font-weight: 600; }
.pos-change-neutral { opacity: 0.5; }

/* ===== LIST GROUP ===================================================== */
.list-group-item {
  background-color: transparent;
  border-color: var(--stradi-border);
  color: var(--stradi-text);
}

/* ===== DROPDOWN / MODAL =============================================== */
.dropdown-menu {
  background-color: var(--stradi-card);
  border: 1px solid var(--stradi-border);
}
.dropdown-item { color: var(--stradi-text); }
.dropdown-item:hover { background-color: var(--stradi-hover); color: #fff; }
.modal-content {
  background-color: var(--stradi-card);
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-card);
  color: var(--stradi-text);
}
.modal-header, .modal-footer { border-color: var(--stradi-border); }

/* ===== ALERTY ========================================================= */
.alert-info {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}
.alert-success {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}
.alert-danger {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

/* ===== ANIMACJE ======================================================= */
.animate-in { animation: fadeUp 0.45s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== AUTH =========================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.22), transparent 42%),
    radial-gradient(circle at 90% 90%, rgba(34, 211, 238, 0.16), transparent 38%),
    #0b1120;
  padding: 1rem;
}
.auth-shell {
  width: min(560px, 100%);
}
.auth-card {
  width: 100%;
  background: #1f2937;
  border: 1px solid var(--stradi-border);
  border-radius: 20px;
  padding: 1.75rem;
  color: var(--stradi-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.auth-brand {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--stradi-border);
}
.auth-brand h1 { font-size: 1.1rem; margin: 0; font-weight: 700; }
.auth-brand p { margin: 0; font-size: 0.85rem; color: var(--stradi-muted); }
.auth-logo {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff; font-weight: 800; font-size: 1.25rem;
}
.auth-body .form-control,
.auth-body .form-select {
  width: 100%;
}
.auth-home-link {
  margin: 0.875rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--stradi-muted);
}
.auth-home-link a { color: var(--stradi-primary); text-decoration: none; }
.auth-home-link a:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
  .auth-page { padding: 0.625rem; align-items: flex-start; padding-top: 1rem; }
  .auth-shell { width: 100%; }
  .auth-card { padding: 1.25rem 1rem; border-radius: 16px; }
  .auth-brand { gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 1rem; }
  .auth-brand h1 { font-size: 1rem; }
  .auth-logo { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ===== FOOTER ========================================================= */
.main-footer {
  background: transparent;
  border-top: 1px solid var(--stradi-border);
  color: var(--stradi-muted);
}

/* ===== AdminLTE 3 + Bootstrap 5 — modale i overlay (z-index) ========== */
.content-wrapper,
.main-footer { z-index: auto !important; }
.stradi-modal { z-index: 2000 !important; }
.modal-backdrop { z-index: 1990 !important; }
.swal2-container { z-index: 3000 !important; }

/* SweetAlert2 dark */
[data-bs-theme="dark"] .swal2-popup {
  background: #1f2937 !important;
  color: var(--stradi-text) !important;
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-card);
}
[data-bs-theme="dark"] .swal2-input {
  background: #0f1726 !important;
  color: var(--stradi-text) !important;
  border: 1px solid var(--stradi-border) !important;
}

/* DataTables dark */
.dataTables_wrapper,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { color: var(--stradi-muted); }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--stradi-text) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--stradi-primary) !important;
  border-color: var(--stradi-primary) !important;
  color: #fff !important;
  border-radius: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--stradi-hover) !important;
  border-color: var(--stradi-border) !important;
  color: #fff !important;
}
div.dataTables_wrapper div.dataTables_processing {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: auto !important;
  height: auto !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  transform: translate(-50%, -50%);
  z-index: 5 !important;
  background: rgba(31, 41, 55, 0.95) !important;
  color: var(--stradi-text) !important;
  border: 1px solid var(--stradi-border) !important;
  border-radius: 10px;
  box-shadow: none !important;
  padding: 0.75rem 1.25rem !important;
  pointer-events: none;
}

/* ===== RESPONSYWNOŚĆ — sidebar mobilny ================================ */
@media (max-width: 991.98px) {
  .stat-value { font-size: 1.55rem; }
  .table-responsive { font-size: 0.9rem; }
  body:not(.sidebar-open) .main-sidebar {
    margin-left: -250px;
  }
  body.sidebar-open .main-sidebar {
    margin-left: 0;
  }
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1037;
  }
}

/* Cel pozycji — kolor organic w tabeli */
.kw-organic {
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: inline-block;
  min-width: 2rem;
  text-align: center;
}.stat-tile-trend
.kw-goal-ok { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.kw-goal-warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.kw-goal-bad { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.kw-goal-muted { color: var(--stradi-muted); background: transparent; }

/* Dashboard — Lp. w rankingu widoczności na kafelku śr. pozycji */
.stat-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.stat-rank-badge {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.stat-tile-trend {
  margin-left: auto;
  font-size: 1.35rem;
}
.stat-icon-row .stat-trend-up { color: #22c55e !important; }
.stat-icon-row .stat-trend-down { color: #ef4444 !important; }

/* Dashboard — lista „Ruchy” (kompakt: fraza + zmiana obok siebie) */
.movers-list {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.65rem;
  row-gap: 0;
  width: max-content;
  max-width: 100%;
  font-size: 0.85rem;
}
.movers-list-label {
  color: var(--stradi-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--stradi-border);
}
.movers-phrase {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(45, 55, 72, 0.45);
  min-width: 0;
  max-width: 28rem;
  word-break: break-word;
}
.movers-change {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(45, 55, 72, 0.45);
  white-space: nowrap;
}
.movers-list > .movers-phrase:nth-last-child(2),
.movers-list > .movers-change:last-child {
  border-bottom: none;
}
.movers-list-interactive {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}
.movers-list-interactive .movers-list-head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--stradi-border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
}
.movers-list-interactive .movers-list-head .movers-list-label {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.movers-list-interactive .movers-list-head .movers-list-label:first-child {
  flex: 1 1 0;
  min-width: 0;
}
.movers-list-interactive .movers-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 -0.4rem;
  padding: 0 0.4rem;
  border-radius: 8px;
  border-bottom: 1px solid rgba(45, 55, 72, 0.45);
  transition: background-color 0.15s ease;
}
.movers-list-interactive .movers-phrase {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.movers-list-interactive .movers-change {
  flex: 0 0 auto;
}
.movers-list-interactive .movers-pos {
  flex: 0 0 auto;
  margin-right: 0.65rem;
}
.movers-list-interactive .movers-list-head .movers-list-label-pos {
  margin-right: 0.65rem;
}
.movers-list-interactive .movers-pill {
  padding: 0.12rem 0.55rem;
}
.movers-list-interactive .movers-list-head .movers-list-label-change,
.movers-list-interactive .movers-list-head .movers-list-label-pos {
  flex: 0 0 auto;
}
.movers-list-interactive .movers-row:last-child {
  border-bottom: none;
}
.movers-list-interactive .movers-row:hover {
  background: rgba(59, 130, 246, 0.12);
}
.movers-list-interactive .movers-row .movers-phrase,
.movers-list-interactive .movers-row .movers-pos,
.movers-list-interactive .movers-row .movers-change {
  border-bottom: none;
}
.movers-pos {
  padding: 0.4rem 0;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--stradi-text);
  text-align: right;
  min-width: 2.25rem;
}
.movers-list-label-pos {
  text-align: right;
}
.movers-phrase a { color: var(--stradi-text); }
.movers-phrase a:hover { color: var(--stradi-primary); }
.movers-arrow { color: var(--stradi-muted); margin: 0 0.15rem; }
.movers-pill {
  display: inline-block;
  padding: 0.12rem 1.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.movers-pill-up { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.movers-pill-down { background: rgba(239, 68, 68, 0.18); color: #f87171; }

.dashboard-movers-ai {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  height: 100%;
  min-width: 0;
}
.dashboard-movers-ai .movers-list:not(.movers-list-interactive) {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
}
.movers-list-ai .movers-phrase {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.movers-list-ai .movers-change .badge {
  font-size: 0.68rem;
  font-weight: 600;
}
@media (max-width: 767px) {
  .dashboard-movers-ai { grid-template-columns: 1fr; }
}

.kw-maps-badge {
  display: inline-flex;
  align-items: center;
    gap: 0.25rem;
    margin-left: 0.65rem;
    padding: 0.20rem 0.45rem;
    font-size: 0.80rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
    white-space: nowrap;
    vertical-align: middle;
}
.kw-maps-badge i { font-size: 0.7rem; }
.kw-maps-badge.kw-maps-up { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.kw-maps-badge.kw-maps-down { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.kw-priority {
  font-size: 0.75rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}
.priority-high { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.priority-low { background: rgba(107, 114, 128, 0.25); color: #9ca3af; }

/* Mobile — karty fraz */
.keywords-table-wrap { width: 100%; }

/* Pasek GSC na liście fraz (ciemny, spójny z kartą) */
.kw-gsc-bar {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-field);
  color: var(--stradi-muted);
}
[data-bs-theme="dark"] .kw-gsc-bar {
  background: rgba(11, 17, 32, 0.65);
}
.kw-gsc-bar-text strong,
.kw-gsc-bar strong {
  color: var(--stradi-text);
  font-weight: 600;
}
.kw-gsc-bar code {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.kw-gsc-bar--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
}
.kw-gsc-bar--warn strong { color: #fef3c7; }

.keywords-table-wrap .dataTables_scrollBody { border-bottom: 1px solid var(--stradi-border); }

/* Frazy — przełącznik lista / historia */
.kw-view-toggle .btn.active {
  background: var(--stradi-primary);
  border-color: var(--stradi-primary);
  color: #fff;
}
#keywordsPage #keywordsGridWrap,
#keywordsPage #keywordsListWrap {
  display: none;
}
@media (min-width: 992px) {
  #keywordsPage.kw-view-list #keywordsListWrap {
    display: block;
  }
  #keywordsPage.kw-view-grid #keywordsGridWrap {
    display: block;
  }
}

.kw-grid-wrap { width: 100%; }
.kw-grid-scroll {
  overflow: auto;
  max-height: min(72vh, 900px);
  border: 1px solid var(--stradi-border);
  border-radius: var(--stradi-radius-card);
  background: var(--stradi-card);
}
.kw-grid-table {
  font-size: 0.88rem;
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
}
.kw-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--stradi-card-elevated, #1e293b);
  color: var(--stradi-muted);
  font-weight: 600;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--stradi-border);
  white-space: nowrap;
}
.kw-grid-table thead th.kw-grid-sticky {
  z-index: 5;
  left: 0;
  text-align: left;
}
.kw-grid-table thead th.kw-grid-sticky-2 { left: 2.5rem; }
.kw-grid-table thead th.kw-grid-sortable {
  cursor: pointer;
  user-select: none;
}
.kw-grid-table thead th.kw-grid-sortable:hover {
  background: rgba(255, 255, 255, 0.06);
}
.kw-grid-table thead th.kw-grid-sort-active {
  color: var(--stradi-text);
}
.kw-grid-fav-head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  line-height: 1;
}
.kw-grid-sort-mark {
  font-size: 0.55rem;
  color: var(--stradi-primary);
  line-height: 1;
}
.kw-grid-table tbody td {
  text-align: center;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid rgba(45, 55, 72, 0.35);
  vertical-align: middle;
}
.kw-grid-table tbody td.kw-grid-day-td {
  padding: 0.55rem 0.4rem;
}
.kw-grid-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.kw-grid-table tbody td.kw-grid-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--stradi-card);
  text-align: center;
}
.kw-grid-table tbody td.kw-grid-sticky-2 {
  position: sticky;
  left: 2.5rem;
  z-index: 2;
  background: var(--stradi-card);
  text-align: left;
  min-width: 12rem;
  max-width: 18rem;
  padding: 0.65rem 0.65rem;
}
.kw-grid-table tbody tr:hover td.kw-grid-sticky,
.kw-grid-table tbody tr:hover td.kw-grid-sticky-2 {
  background: var(--stradi-card-elevated, #1e293b);
}
.kw-grid-phrase {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  display: block;
  color: inherit;
  text-decoration: none;
}
.kw-grid-phrase:hover { color: var(--stradi-primary); }
.kw-grid-url {
  display: block;
  font-size: 0.65rem;
  color: var(--stradi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
  margin-top: 0.1rem;
}
.kw-grid-day-head { min-width: 3.5rem; }
.kw-grid-day-head small {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.75;
}
.kw-grid-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.2rem;
  min-width: 3.25rem;
  min-height: 3.1rem;
  padding: 0.35rem 0.4rem;
  line-height: 1.2;
  border-radius: 8px;
  font-weight: 700;
  box-sizing: border-box;
}
.kw-grid-cell-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}
.kw-grid-pos {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  min-width: 1.1rem;
  text-align: center;
}
.kw-grid-pos-empty {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.55;
}
.kw-grid-delta {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.kw-grid-cell-empty { color: var(--stradi-muted); font-weight: 400; }
.kw-grid-cell-top3 { background: rgba(34, 197, 94, 0.22); color: #4ade80; }
.kw-grid-cell-top10 { background: rgba(34, 197, 94, 0.1); color: #86efac; }
.kw-grid-cell-mid { color: var(--stradi-text); }
.kw-grid-cell-low { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.kw-grid-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fb7185;
  line-height: 1;
}
.kw-grid-maps .kw-grid-delta {
  font-size: 0.58rem;
}
.kw-grid-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem !important;
  position: sticky;
  right: 0;
  background: var(--stradi-card);
  z-index: 2;
  white-space: nowrap;
}
.kw-grid-action .kw-check-now {
  color: var(--stradi-muted);
  border: none;
  background: transparent;
  line-height: 1;
}
.kw-grid-action .kw-check-now:hover:not(:disabled) {
  color: var(--stradi-primary);
}

/* Sprawdzenie frazy na żądanie — pasek (nie blokuje nawigacji) */
.kw-check-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1060;
  max-width: min(36rem, calc(100vw - 1.5rem));
  width: 100%;
  pointer-events: none;
}
.kw-check-banner[hidden] {
  display: none !important;
}
.kw-check-banner-inner {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--stradi-radius-card, 10px);
  border: 1px solid var(--stradi-border);
  background: var(--stradi-card-elevated, #1e293b);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: var(--stradi-text);
}
.kw-check-banner-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  color: var(--stradi-primary);
  margin-top: 0.1rem;
}
.kw-check-banner--ok .kw-check-banner-icon { color: #4ade80; }
.kw-check-banner--err .kw-check-banner-icon { color: #f87171; }
.kw-check-banner-body { flex: 1; min-width: 0; }
.kw-check-banner-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.kw-check-banner-hint {
  color: var(--stradi-muted);
  line-height: 1.4;
  font-size: 0.8rem;
}
.kw-check-banner-dismiss {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.75rem;
}
.kw-check-now-busy {
  opacity: 0.85;
}
.kw-grid-action a {
  color: var(--stradi-muted);
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}
.kw-grid-action a:hover { color: var(--stradi-primary); background: rgba(255, 255, 255, 0.06); }
.kw-grid-loading {
  padding: 2rem;
  text-align: center;
  color: var(--stradi-muted);
}

.dashboard-fold-card .card-header {
  cursor: pointer;
  user-select: none;
}
.dashboard-fold-card .card-tools .btn-tool {
  color: var(--stradi-muted, #9ca3af);
}
.dashboard-collapsible-row .dashboard-fold-card:not(.collapsed-card) {
  min-height: auto;
}

.dashboard-daily-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: calc(100% + var(--bs-gutter-x, 1.5rem));
  max-width: none;
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}
.dashboard-daily-progress-row > .dashboard-daily-progress {
  flex: 1 1 100%;
  min-width: 0;
  width: auto;
  margin: 0;
}
@media (min-width: 992px) {
  .dashboard-daily-progress-row.has-global > .dashboard-daily-progress {
    flex: 1 1 0;
    max-width: 50%;
  }
  .dashboard-daily-progress-row.has-global > .dashboard-daily-progress-project .dashboard-daily-progress-inner {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .dashboard-daily-progress-row.has-global > .dashboard-daily-progress-global .dashboard-daily-progress-inner {
    border-left: 1px solid rgba(45, 55, 72, 0.85);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}
.dashboard-daily-progress {
  width: calc(100% + var(--bs-gutter-x, 1.5rem));
  max-width: none;
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}
.dashboard-daily-progress-row .dashboard-daily-progress {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}
.dashboard-daily-progress-inner {
  padding: 0.85rem 1rem 0.75rem;
  border-radius: 0;
  border: 1px solid rgba(45, 55, 72, 0.85);
  border-left: none;
  border-right: none;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.35) 100%);
}
.dashboard-daily-progress-title {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--stradi-text);
}
.dashboard-daily-progress-stats {
  color: var(--stradi-muted);
}
.dashboard-daily-progress-num {
  font-weight: 700;
  color: var(--stradi-text);
}
.dashboard-daily-progress-num-ok {
  color: #86efac;
}
.dashboard-daily-progress-num-pending {
  color: #fcd34d;
}
.dashboard-daily-progress-foot {
  color: var(--stradi-muted);
}
.dashboard-daily-progress-bar {
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}
.dashboard-daily-progress-bar .progress-bar {
  transition: width 0.35s ease, background 0.35s ease;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}
.dashboard-daily-progress-bar.is-complete {
  background: #166534;
}
.dashboard-daily-progress-bar.is-complete .progress-bar {
  background: #00cb48;
}
.dashboard-daily-progress-global .dashboard-daily-progress-inner {
  padding: 0.85rem 1rem 0.75rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.25) 100%);
}
.dashboard-daily-progress-bar-global .progress-bar {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}
.dashboard-daily-progress-bar-global.is-complete .progress-bar {
  background: #35d922;
}

.kw-phrase-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}
.kw-phrase-link { color: inherit; }
.kw-phrase-link:hover { color: var(--stradi-primary); }
.kw-ai-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: #0ea5e9;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.kw-ai-btn:hover {
  color: #fff;
  background: #38bdf8;
}
.kw-fav-spacer { display: inline-block; width: 1.35rem; flex-shrink: 0; }
.kw-fav-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0.15rem 0.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  color: var(--stradi-muted);
}
.kw-fav-btn:hover { background: rgba(255, 255, 255, 0.06); }
.kw-fav-btn .kw-fav-on { color: #fbbf24; }
.kw-fav-btn .kw-fav-off { color: #6b7280; }
.kw-fav-btn:hover .kw-fav-off { color: #9ca3af; }
.kw-fav-readonly { cursor: default; padding: 0.15rem 0.25rem; }
th.kw-col-fav, td.kw-col-fav { width: 2.5rem; padding-left: 0.35rem !important; padding-right: 0.35rem !important; }

.kw-mobile-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.kw-mobile-card {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--stradi-radius-card);
  border: 1px solid var(--stradi-border);
  background: var(--stradi-card);
  color: inherit;
  text-decoration: none;
}
.kw-mobile-card:hover { border-color: var(--stradi-primary); color: inherit; }
.kw-mobile-card-title { font-weight: 600; margin-bottom: 0.35rem; }
.kw-mobile-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

.notif-dropdown { min-width: 280px; max-width: 360px; max-height: 70vh; overflow-y: auto; }
.notif-badge { font-size: 0.65rem; padding: 0.2em 0.45em; }

@media (max-width: 991.98px) {
  .main-header.navbar {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .main-header .navbar-nav:first-child .nav-link {
    padding-left: 0.65rem;
    padding-right: 0.35rem;
  }
  .main-header .navbar-nav.ms-auto {
    padding-right: 0.35rem;
    gap: 0.15rem !important;
  }
  .main-header .project-switch {
    min-width: 0;
    max-width: 9.5rem;
    font-size: 0.8rem;
    padding-left: 0.4rem;
    padding-right: 1.5rem;
  }
  #navNotifWrap .nav-link {
    padding-left: 0.55rem;
    padding-right: 0.85rem;
    margin-right: 0.15rem;
  }
  #navNotifBtn .notif-badge {
    top: 0.2rem !important;
    right: 0.35rem !important;
    left: auto !important;
    transform: none !important;
  }
}

/* ===== SERP Queue stats — panel Status CRON ========================== */
.cron-queue-stats {
  padding: 0.6rem 0.75rem;
  border-radius: var(--stradi-radius-field, 8px);
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.06);
}
.cron-queue-stats-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--stradi-muted);
  margin-bottom: 0.45rem;
}
.cron-queue-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.cron-queue-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.cron-queue-stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stradi-muted);
  line-height: 1;
}
.cron-queue-stat-value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--stradi-text);
}
.cron-queue-val-ok  { color: #4ade80; }
.cron-queue-val-warn { color: #fbbf24; }
.cron-queue-val-err  { color: #f87171; }
.cron-queue-fetch-time {
  font-size: 0.75rem;
  color: var(--stradi-muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.cron-queue-fetch-time strong { color: var(--stradi-text); }

/* Historia audytów SEO */
.seo-audit-chart-wrap {
  position: relative;
  min-height: 180px;
}
.seo-audit-compare-panel {
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.06);
}
.seo-audit-delta-up { color: #4ade80; }
.seo-audit-delta-down { color: #f87171; }
.seo-audit-delta-neutral { color: var(--stradi-muted); }
#pageSeoAuditHistoryTable tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.08);
}

/* Pasek postępu audytu SEO */
.seo-audit-progress-card .progress {
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}
.seo-audit-progress-card .progress-bar {
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  transition: width 0.45s ease;
}
.seo-audit-progress-card.is-complete .progress-bar {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.seo-audit-progress-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.seo-audit-progress-step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  color: var(--stradi-muted, #94a3b8);
  line-height: 1.35;
}
.seo-audit-progress-step-dot {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.seo-audit-progress-step.is-active {
  color: var(--stradi-text, #e2e8f0);
  font-weight: 600;
}
.seo-audit-progress-step.is-active .seo-audit-progress-step-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  animation: seo-audit-pulse 1.2s ease-in-out infinite;
}
.seo-audit-progress-step.is-done {
  color: #86efac;
}
.seo-audit-progress-step.is-done .seo-audit-progress-step-dot {
  background: #22c55e;
  box-shadow: none;
}
@keyframes seo-audit-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.08); }
}

.seo-audit-details {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.2);
}
.seo-audit-details-summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: outside;
}
.seo-audit-details-summary::-webkit-details-marker {
  color: #60a5fa;
}
.seo-audit-cwv-tile {
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.25);
}
.seo-audit-cwv-tile.grade-good { border-color: rgba(34, 197, 94, 0.35); }
.seo-audit-cwv-tile.grade-needs_improvement { border-color: rgba(251, 191, 36, 0.35); }
.seo-audit-cwv-tile.grade-poor { border-color: rgba(248, 113, 113, 0.35); }
.seo-audit-ranking-impact {
  border-top-color: rgba(59, 130, 246, 0.25) !important;
}

