/* ══════════════════════════════════════════════════
   AI Digital Audit Dashboard — Stylesheet
   ══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1d4ed8;
  --green-light: #dbeafe;
  --blue:        #1d4ed8;
  --blue-light:  #e3f0ff;
  --accent:      #2db9db;
  --accent2:     #0057ff;
  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --surface2:    #f8fafc;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --text-muted:  #475569;
  --muted:       #475569;
  --sidebar-w:   240px;
  --topbar-h:    64px;
  --radius:      14px;
  --shadow:      0 4px 24px rgba(0,0,0,0.07);
  --shadow-md:   0 8px 40px rgba(0,0,0,0.13);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══ UTILITIES ══════════════════════════════════════ */
.hidden { display: none !important; }

/* ══ UTILITY STATES ══════════════════════════════════ */
.reports-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.placeholder-card {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: .6;
}
.placeholder-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.placeholder-card p {
  font-size: 0.88rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ══ AUTH SCREEN ════════════════════════════════════ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #f8fafc; /* Very light modern gray-white */
  overflow: hidden;
}

/* This creates the professional 'Watermark' pattern effect */
.auth-screen::before {
  content: "";
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-image: url('/logo/PatternBanner-01.png');
  background-size: 600px; /* Smaller pattern size feels more premium */
  background-repeat: repeat;
  /* Key for modern look: keep it barely visible */
  opacity: 0.03; 
  filter: grayscale(100%);
  pointer-events: none;
}

/* Adds a subtle soft glow behind the card for depth */
.auth-screen::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(45, 185, 219, 0.08) 0%, transparent 70%);
  z-index: 0;
}

/* Ensure the auth card stays above the effects */
.auth-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05); /* Soft, modern shadow */
  backdrop-filter: blur(10px);
}

.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}
.blob-1 { width: 500px; height: 500px; background: #062c6e; top: -150px; left: -150px; animation: float 8s ease-in-out infinite; }
.blob-2 { width: 400px; height: 400px; background: #0057ff; bottom: -100px; right: -100px; animation: float 10s ease-in-out infinite reverse; }
.blob-3 { width: 300px; height: 300px; background: #a855f7; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: float 12s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.brand-icon {
  font-size: 2.8rem;
  background: linear-gradient(135deg, var(--green), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand h1 { font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.auth-brand p  { font-size: 0.78rem; color: var(--text-muted); }

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.auth-tab.active {
  background: white;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.auth-message.error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-message.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 0.83rem; font-weight: 600; color: var(--text); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
}
.input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color .2s;
  font-family: 'Inter', sans-serif;
}
.input-wrap input:focus { outline: none; border-color: var(--accent); }

.toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  opacity: 0.5;
  transition: opacity .2s;
}
.toggle-pw:hover { opacity: 1; }

.btn-primary {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--green), var(--accent));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,194,124,.35); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 12px 24px;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--text-muted); background: white; }

.auth-switch { font-size: 0.82rem; color: var(--text-muted); text-align: center; }
.auth-switch a { color: var(--green); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ══ DASHBOARD LAYOUT ══════════════════════════════════ */
.dashboard-screen {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .3px;
}
.brand-icon-sm { font-size: 1.5rem; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255,255,255,.65);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all .2s;
}
.nav-item:hover  { background: rgba(255,255,255,.1); color: white; }
.nav-item.active { background: linear-gradient(135deg, #1d4ed8, #2db9db); color: white; }
.nav-icon { font-size: 1.1rem; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user { flex: 1; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #1d4ed8, #2db9db);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.user-info { overflow: hidden; }
.user-name  { display: block; font-size: .83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; }
.user-role  { display: block; font-size: .72rem; color: rgba(255,255,255,.5); }

.btn-signout {
  background: rgba(255,255,255,.08);
  border: none;
  color: rgba(255,255,255,.6);
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
  flex-shrink: 0;
}
.btn-signout:hover { background: rgba(255,0,0,.2); color: #ff6b6b; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; }
.topbar-title h2 { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.topbar-title span { font-size: .78rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-greeting { font-size: .85rem; color: var(--text-muted); }
.topbar-greeting strong { color: var(--text); }
.topbar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: white; cursor: default;
}

/* ── Pages ── */
.page { padding: 28px; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-label { display: block; font-size: .77rem; color: var(--text-muted); margin-top: 2px; }

/* ── Card ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ── Home Grid ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) { .home-grid { grid-template-columns: 1fr; } }

.home-welcome .welcome-emoji { font-size: 2.5rem; margin-bottom: 12px; }
.home-welcome h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.home-welcome p  { font-size: .88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }

.home-tools-preview h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

.mini-tools-list { display: flex; flex-direction: column; gap: 10px; }
.mini-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}
.mini-tool:hover { background: white; border-color: var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.mini-tool .mt-icon { font-size: 1.3rem; }
.mini-tool .mt-name { font-weight: 600; flex: 1; }
.mini-badge {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-live { background: #d1fae5; color: #065f46; }
.badge-soon { background: #fef3c7; color: #92400e; }

/* ── Tools Grid ── */
.tools-header { margin-bottom: 24px; }
.tools-header h3 { font-size: 1.3rem; font-weight: 800; }
.tools-header p  { font-size: .87rem; color: var(--text-muted); margin-top: 4px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  position: relative;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tool-card.coming-soon { opacity: .8; cursor: default; }
.tool-card.coming-soon:hover { transform: none; box-shadow: var(--shadow); }

.tool-card-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.tool-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(255,255,255,.9);
}
.badge-text-live { color: #065f46; }
.badge-text-soon { color: #92400e; }

.tool-card-body { padding: 20px; }
.tool-card-body h4 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.tool-name-ar      { font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; font-style: italic; direction: rtl; }
.tool-card-body p  { font-size: .82rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; }

.tool-card-footer { padding: 0 20px 20px; }
.btn-run {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  color: white;
}
.btn-run:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-run-disabled {
  width: 100%;
  padding: 11px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: not-allowed;
  background: transparent;
  color: var(--text-muted);
}

/* ── Placeholder Card ── */
.placeholder-card {
  text-align: center;
  padding: 60px 40px;
  max-width: 500px;
  margin: 0 auto;
}
.placeholder-icon { font-size: 3rem; margin-bottom: 16px; }
.placeholder-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.placeholder-card p  { font-size: .88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }

/* ══ MODAL ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein .2s ease;
}
.modal-card {
  background: white;
  border-radius: 22px;
  padding: 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--text-muted);
  transition: all .2s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }

.modal-icon { font-size: 3.5rem; margin-bottom: 12px; }
.modal-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.modal-card p  { font-size: .87rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; }

.modal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.status-live { background: #d1fae5; color: #065f46; }
.status-soon { background: #fef3c7; color: #92400e; }

.modal-url-section { margin-bottom: 20px; }
.modal-url-section p { font-size: .82rem; margin-bottom: 6px; }

.tool-url-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all .2s;
}
.tool-url-badge:hover { background: white; border-color: var(--accent); color: var(--accent); }

.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary { flex: 1; }

.btn-launch { font-size: 1rem; padding: 14px; }

.modal-instructions {
  margin-top: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .82rem;
  color: #92400e;
  text-align: left;
  line-height: 1.6;
}

/* ══ REPORTS PAGE ════════════════════════════════════ */
.reports-loading { padding: 40px; text-align: center; color: var(--text-muted); font-size: 1rem; }
.reports-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }

.reports-list { display: flex; flex-direction: column; gap: 14px; }

/* ── SEO Scan Panel ──────────────────────────────── */
.seo-scan-panel {
  padding: 24px 28px;
  margin-bottom: 28px;
  border: 1px solid rgba(99,102,241,.25);
  background: linear-gradient(135deg, rgba(99,102,241,.04), rgba(139,92,246,.04));
}
.seo-scan-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.seo-scan-icon { font-size: 2rem; }
.seo-scan-title { font-size: 1rem; font-weight: 700; margin: 0 0 3px; }
.seo-scan-sub   { font-size: .82rem; color: var(--text-muted); margin: 0; }

.seo-scan-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.seo-scan-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  gap: 8px;
  transition: border-color .2s;
}
.seo-scan-input-wrap:focus-within { border-color: #6366f1; }
.seo-scan-prefix { font-size: 1rem; }
.seo-scan-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: .92rem;
  padding: 12px 0;
  color: var(--text);
  font-family: 'Inter', sans-serif;
}
.seo-scan-input::placeholder { color: var(--text-muted); }

.btn-seo-scan {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s, transform .15s;
  font-family: 'Inter', sans-serif;
}
.btn-seo-scan:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-seo-scan:disabled { opacity: .6; cursor: not-allowed; }

.seo-scan-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .85rem;
  line-height: 1.55;
}
.seo-status-info    { background: rgba(99,102,241,.08); color: var(--text); border: 1px solid rgba(99,102,241,.2); }
.seo-status-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.seo-status-warn    { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.seo-status-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.seo-inline-score { font-weight: 800; }
.seo-inline-good  { color: #16a34a; }
.seo-inline-warn  { color: #d97706; }
.seo-inline-bad   { color: #dc2626; }
.seo-view-link    { color: #6366f1; font-weight: 600; text-decoration: none; }
.seo-view-link:hover { text-decoration: underline; }

/* ── Tool Type Tags ─────────────────────────────── */
.tool-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.tag-seo   { background: rgba(99,102,241,.15);  color: #818cf8; border: 1px solid rgba(99,102,241,.3);  }
.tag-uiux  { background: rgba(14,165,233,.13);  color: #38bdf8; border: 1px solid rgba(14,165,233,.3);  }
.tag-dga   { background: rgba(26,107,58,.15);   color: #4ade80; border: 1px solid rgba(26,107,58,.35); }
.tag-other { background: rgba(148,163,184,.12); color: #94a3b8; border: 1px solid rgba(148,163,184,.3); }

/* ── Select-all label ────────────────────────────── */
.select-all-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-muted);
  user-select: none;
}
.select-all-wrap input { cursor: pointer; accent-color: #6366f1; }
.select-all-wrap:hover { color: var(--text); }

/* ── Per-card checkbox row (SEO cards) ──────────── */
.card-sel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.card-sel-row input { cursor: pointer; accent-color: #6366f1; }

/* ── Per-card checkbox (list/dash cards) ────────── */
.report-sel-label {
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.report-sel-label input { cursor: pointer; accent-color: #6366f1; }

/* ── report-tool-name-row (name + tag inline) ────── */
.report-tool-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

/* ── Delete button on SEO card ────────────────────── */
.btn-card-delete {
  padding: 8px 10px;
  background: rgba(220,38,38,.08);
  color: #f87171;
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 9px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.btn-card-delete:hover { background: rgba(220,38,38,.2); }

/* ══ BULK ACTION BAR ═════════════════════════════════ */
.bulk-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
  animation: slideUp .2s ease;
  white-space: nowrap;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90vw;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bulk-count {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  padding-right: 10px;
  border-right: 1px solid var(--border);
}
.bulk-actions {
  display: flex;
  gap: 8px;
}
.bulk-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  font-family: 'Inter', sans-serif;
}
.bulk-btn-export  { background: rgba(99,102,241,.12); color: #818cf8; border-color: rgba(99,102,241,.25); }
.bulk-btn-archive { background: rgba(245,158,11,.1);  color: #fbbf24; border-color: rgba(245,158,11,.25); }
.bulk-btn-delete  { background: rgba(220,38,38,.1);   color: #f87171; border-color: rgba(220,38,38,.25);  }
.bulk-btn-cancel  { background: var(--bg); color: var(--text-muted); border-color: var(--border); }
.bulk-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.bulk-btn:active { transform: translateY(0); }

@media (max-width: 500px) {
  .bulk-bar { bottom: 12px; padding: 10px 14px; }
  .bulk-btn { padding: 7px 10px; font-size: .74rem; }
}
.seo-reports-section { margin-bottom: 32px; }

.seo-reports-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.seo-section-icon  { font-size: 1.3rem; }
.seo-reports-section-header h3 { font-size: 1rem; font-weight: 700; margin: 0; flex: 1; }
.seo-report-count  {
  font-size: .75rem; font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--text-muted);
}

.seo-stats-strip {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.seo-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  gap: 3px;
}
.seo-stat:last-child { border-right: none; }
.seo-stat-val  { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.seo-stat-lbl  { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── SEO Report Card Grid ────────────────────────── */
.seo-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.seo-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .2s, transform .15s;
}
.seo-report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.seo-report-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* SVG score ring */
.seo-score-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.seo-score-ring {
  width: 64px;
  height: 64px;
}
.seo-score-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  border-radius: 50%;
}
.seo-score-ring-val.score-high { color: #16a34a; }
.seo-score-ring-val.score-mid  { color: #d97706; }
.seo-score-ring-val.score-low  { color: #dc2626; }
.seo-score-ring-val.score-na   { color: var(--text-muted); }

.seo-report-info { flex: 1; overflow: hidden; }
.seo-report-domain {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seo-report-date {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 7px;
}

/* Score badge */
.seo-score-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.seo-score-badge.score-badge-high { background: #dcfce7; color: #14532d; }
.seo-score-badge.score-badge-mid  { background: #fef9c3; color: #713f12; }
.seo-score-badge.score-badge-low  { background: #fee2e2; color: #7f1d1d; }
.seo-score-badge.score-badge-na   { background: var(--bg); color: var(--text-muted); }

/* Action buttons */
.seo-report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-seo-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 700;
  transition: opacity .2s;
  white-space: nowrap;
}
.btn-seo-view:hover { opacity: .88; }
.btn-seo-rescan {
  padding: 9px 14px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: 'Inter', sans-serif;
}
.btn-seo-rescan:hover { background: var(--surface); color: var(--text); }

@media (max-width: 600px) {
  .seo-reports-grid { grid-template-columns: 1fr; }
  .seo-scan-form    { flex-direction: column; }
  .btn-seo-scan     { width: 100%; justify-content: center; }
}

.report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.report-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 18px 20px;
}
.report-tool-icon { font-size: 1.8rem; flex-shrink: 0; }
.report-info { overflow: hidden; }
.report-tool-name { font-size: .9rem; font-weight: 700; margin-bottom: 3px; }
.report-url {
  font-size: .8rem; color: var(--accent2); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; max-width: 400px;
}
.report-url:hover { text-decoration: underline; }
.report-meta { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

.report-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  flex-shrink: 0;
}
.report-score {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800;
}
.report-score.score-high { background: #dcfce7; color: #14532d; }
.report-score.score-mid  { background: #fef9c3; color: #713f12; }
.report-score.score-low  { background: #fee2e2; color: #7f1d1d; }
.report-score.score-na   { background: #f1f5f9; color: var(--text-muted); font-size: .75rem; }

/* Shared score colour tokens (used in rd-overall-score, rd-crit-pct) */
.score-high { background: #dcfce7; color: #14532d; }
.score-mid  { background: #fef9c3; color: #713f12; }
.score-low  { background: #fee2e2; color: #7f1d1d; }
.score-na   { background: #f1f5f9; color: var(--text-muted); }

.btn-delete-report {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; opacity: .4; transition: opacity .2s;
  padding: 6px;
}
.btn-delete-report:hover { opacity: 1; }

/* ══ RESPONSIVE ══════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-240px);
    width: 240px;
    transition: transform .3s;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .topbar-greeting { display: none; }
  .page { padding: 16px; }
  .tools-grid { grid-template-columns: 1fr; }
  .modal-card { margin: 16px; }
}

/* ══ REPORT DETAIL MODAL ═════════════════════════════ */
.rd-overlay { align-items: flex-start; padding: 24px 16px; overflow-y: auto; }

.rd-card {
  background: white;
  border-radius: 22px;
  width: 100%;
  max-width: 680px;
  margin: auto;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  animation: fadein .25s ease;
}

/* Header */
.rd-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 24px;
  background: var(--bg);
}
.rd-header-icon { font-size: 2.6rem; flex-shrink: 0; }
.rd-header-info { flex: 1; overflow: hidden; }
.rd-title  { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.rd-url    {
  font-size: .82rem; color: var(--accent2); text-decoration: none;
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-url:hover { text-decoration: underline; }
.rd-meta   { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

.rd-overall-score {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
  flex-shrink: 0;
  line-height: 1.1;
}
.rd-overall-score span { font-size: .6rem; font-weight: 600; opacity: .8; }

/* Section */
.rd-section { padding: 22px 28px; border-top: 1px solid var(--border); }
.rd-section-title { font-size: .88rem; font-weight: 700; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }

/* Criteria */
.rd-criteria-list { display: flex; flex-direction: column; gap: 14px; }

.rd-criterion { display: block; }
.rd-crit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rd-crit-name { font-size: .88rem; font-weight: 600; }
.rd-crit-pct  {
  font-size: .8rem; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
  flex-shrink: 0;
}

.rd-bar-bg {
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.rd-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}

.rd-crit-details {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--border);
}

/* Pages */
.rd-pages-list { display: flex; flex-direction: column; gap: 10px; }
.rd-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 10px;
}
.rd-page-url {
  font-size: .82rem; color: var(--accent2); text-decoration: none;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-page-url:hover { text-decoration: underline; }
.rd-page-score {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800;
  flex-shrink: 0;
}

/* Footer */
.rd-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
/* ── Report detail screenshots ── */
.rd-screenshots {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
  padding: 16px 28px;
  background: var(--surface2, #f8fafc);
  border-bottom: 1px solid var(--border);
}
.rd-screenshots > *:only-child { grid-column: 1 / -1; }
.rd-snap-wrap { display: flex; flex-direction: column; gap: 6px; }
.rd-snap-label { font-size: .75rem; font-weight: 700; color: var(--text-muted); }
.rd-snap-img { width: 100%; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* ── ar-btn-pdf ── */
.ar-btn-pdf {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.ar-btn-pdf:hover { background: #dbeafe; }

.btn-delete-report-full {
  padding: 10px 18px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-delete-report-full:hover { background: #fecaca; border-color: #f87171; }

@media (max-width: 600px) {
  .rd-header { flex-wrap: wrap; }
  .rd-overall-score { width: 56px; height: 56px; font-size: 1rem; }
  .rd-section, .rd-footer { padding-left: 18px; padding-right: 18px; }
}

/* ══ REPORT DETAIL — Score Ring ═════════════════════ */
.rd-score-ring-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rd-score-ring-svg {
  width: 96px;
  height: 96px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.rd-score-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.5px;
  line-height: 1;
  flex-direction: row;
  gap: 0;
}
.rd-score-pct-sm {
  font-size: .62rem;
  font-weight: 600;
  opacity: .75;
  margin-top: 4px;
  align-self: flex-end;
}

/* ══ REPORT DETAIL — Loading / Spinner ══════════════ */
.rd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.rd-spinner {
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadein .3s ease;
}

/* ══ REPORT DETAIL — Criterion Groups ═══════════════ */
.rd-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.rd-group:last-child { margin-bottom: 0; }

.rd-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.rd-group-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.rd-group-name {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.rd-group-avg {
  font-size: .78rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.rd-group-items {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
}

/* ══ REPORT DETAIL — Detail Text Colours ════════════ */
.rd-detail-warn {
  border-left-color: #f59e0b !important;
  background: color-mix(in srgb, #f59e0b 8%, var(--bg)) !important;
  color: var(--text) !important;
}
.rd-detail-ok {
  border-left-color: #16a34a !important;
  background: color-mix(in srgb, #16a34a 8%, var(--bg)) !important;
  color: var(--text) !important;
}

/* ── Report Detail — Tab Bar ─────────────────────── */
.rd-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 20px 0;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

.rd-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--bg);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
  bottom: -2px;
  font-family: 'Inter', sans-serif;
}
.rd-tab:hover { background: white; color: var(--text); }
.rd-tab.active {
  background: white;
  color: var(--text);
  border-color: var(--border);
  border-bottom-color: white;
  z-index: 1;
}

/* Score pill inside a tab */
.rd-tab-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  background: rgba(0,0,0,.07);
}
.rd-tab.tab-high .rd-tab-score { background: #d1fae5; color: #065f46; }
.rd-tab.tab-mid  .rd-tab-score { background: #fef3c7; color: #92400e; }
.rd-tab.tab-low  .rd-tab-score { background: #fee2e2; color: #991b1b; }
.rd-tab.active.tab-high { border-top: 3px solid #16a34a; }
.rd-tab.active.tab-mid  { border-top: 3px solid #d97706; }
.rd-tab.active.tab-low  { border-top: 3px solid #dc2626; }

/* Tab body — animated transition */
.rd-tab-body { animation: fadein .2s ease; }

/* Page URL strip inside a tab body */
.rd-page-tab-url {
  padding: 10px 28px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
}
.rd-page-tab-url a {
  color: var(--accent2);
  text-decoration: none;
  word-break: break-all;
}
.rd-page-tab-url a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .rd-tab { font-size: .73rem; padding: 7px 10px; }
  .rd-tab-bar { padding: 10px 12px 0; gap: 4px; }
}

/* ══ ALL REPORTS — unified grouped layout ══ */
.all-reports-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.all-reports-title { font-size: 1.25rem; font-weight: 800; color: var(--text); margin: 0; }
.all-reports-count { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 6px; }
.tool-group { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 28px; overflow: hidden; }
.tool-group-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tool-group-icon { font-size: 1.2rem; flex-shrink: 0; }
.tool-group-name { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }
.tool-group-count { color: var(--muted); font-size: 0.8rem; margin-left: auto; }
.tool-group-stats { display: flex; border-bottom: 1px solid var(--border); }
.tg-stat { flex: 1; text-align: center; padding: 12px 8px; border-right: 1px solid var(--border); }
.tg-stat:last-child { border-right: none; }
.tg-stat-val { display: block; font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.tg-stat-lbl { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.tool-group-empty { padding: 24px 20px; color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.tool-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 20px; }
.report-card-new { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, box-shadow .2s; }
.report-card-new:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.12); }
.rcn-top { display: flex; align-items: flex-start; gap: 12px; }
.rcn-score-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.rcn-score-ring svg { width: 64px; height: 64px; }
.rcn-score { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 900; }
.rcn-info { flex: 1; min-width: 0; }
.rcn-domain { font-size: 0.88rem; font-weight: 700; color: var(--text); word-break: break-all; margin-bottom: 3px; }
.rcn-date { font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.rcn-badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rcn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .tool-group-grid { grid-template-columns: 1fr; padding: 12px; } .tg-stat { min-width: 50%; } }

/* ══ QUICK LAUNCH PANEL (Home page) ══ */
.quick-launch {
  margin-bottom: 28px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.ql-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.ql-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 2px;
}
.ql-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px;
}
.ql-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.ql-domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.ql-domain-row:focus-within {
  border-color: var(--accent);
}
.ql-domain-prefix {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: .6;
}
.ql-domain-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 13px 0;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
}
.ql-domain-input::placeholder { color: var(--muted); }

/* Tool selector pills */
.ql-tools-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ql-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 20px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  min-width: 120px;
  flex: 1;
  color: var(--text);
}
.ql-tool-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface2));
  transform: translateY(-1px);
}
.ql-tool-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.ql-tool-btn-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.6);
}
.ql-tool-icon { font-size: 1.4rem; line-height: 1; }
.ql-tool-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.ql-tool-desc { font-size: 0.7rem; color: var(--muted); }

/* Launch button */
.ql-actions { display: flex; align-items: center; gap: 12px; }
.ql-launch-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, transform .15s, opacity .2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ql-launch-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 85%, #fff);
  transform: translateY(-1px);
}
.ql-launch-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Status messages */
.ql-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.5;
}
.ql-status-info    { background: color-mix(in srgb, var(--accent) 10%, var(--surface2)); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.ql-status-success { background: color-mix(in srgb, #22c55e 10%, var(--surface2));        color: var(--text); border: 1px solid color-mix(in srgb, #22c55e 30%, transparent); }
.ql-status-warn    { background: color-mix(in srgb, #f59e0b 10%, var(--surface2));         color: var(--text); border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent); }
.ql-status-error   { background: color-mix(in srgb, #ef4444 10%, var(--surface2));         color: var(--text); border: 1px solid color-mix(in srgb, #ef4444 30%, transparent); }
.ql-view-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.ql-view-link:hover { text-decoration: underline; }

/* ── Home grid (2 cols) ── */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-recent { padding: 20px; }
.home-recent h3 { font-size: 0.95rem; font-weight: 700; margin: 0 0 14px; }
.home-recent-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.home-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.82rem;
}
.home-recent-domain { flex: 1; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-recent-score { font-weight: 800; font-size: 0.85rem; }
.ql-view-all {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, border-color .2s;
}
.ql-view-all:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); border-color: var(--accent); }

/* ══ ALL REPORTS — flat unified list ══ */
.ar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ar-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.ar-count {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.select-all-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.select-all-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.ar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual report row */
.ar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.ar-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}
.ar-cb { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Coloured tool bar on left */
.ar-tool-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid;
  flex-shrink: 0;
  min-width: 56px;
  text-align: center;
}
.ar-tool-icon { font-size: 1.1rem; line-height: 1; }

/* Main info */
.ar-main { flex: 1; min-width: 0; }
.ar-domain {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.ar-url { font-size: 0.76rem; margin-bottom: 4px; }
.ar-url a { color: var(--accent2, var(--accent)); text-decoration: none; }
.ar-url a:hover { text-decoration: underline; }
.ar-meta { font-size: 0.72rem; color: var(--muted); }

/* Score column */
.ar-score-col { flex-shrink: 0; text-align: center; min-width: 60px; }
.ar-score {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
}
.ar-score-pct { font-size: 0.7rem; font-weight: 600; opacity: .7; }
.ar-score-lbl { font-size: 0.65rem; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.ar-score.score-high { color: #16a34a; background: none; }
.ar-score.score-mid  { color: #d97706; background: none; }
.ar-score.score-low  { color: #dc2626; background: none; }
.ar-score.score-na   { color: var(--muted); background: none; }
.rd-score-ring-val.score-high { color: #16a34a; background: none; }
.rd-score-ring-val.score-mid  { color: #d97706; background: none; }
.rd-score-ring-val.score-low  { color: #dc2626; background: none; }
.rd-score-ring-val.score-na   { color: var(--muted); background: none; }

/* Action buttons */
.ar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ar-btn {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .2s, border-color .2s;
  font-family: inherit;
  white-space: nowrap;
}
.ar-btn:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface2)); border-color: var(--accent); }
.ar-btn-view { background: color-mix(in srgb, var(--accent) 10%, var(--surface2)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.ar-btn-delete { color: #ef4444; border-color: color-mix(in srgb, #ef4444 30%, transparent); }
.ar-btn-delete:hover { background: color-mix(in srgb, #ef4444 10%, var(--surface2)); border-color: #ef4444; }
.ar-btn-rescan { color: var(--muted); }

/* score badge colours for report cards */
.score-badge-high { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; border: 1px solid color-mix(in srgb, #16a34a 30%, transparent); padding: 2px 8px; border-radius: 999px; }
.score-badge-mid  { background: color-mix(in srgb, #d97706 15%, transparent); color: #d97706; border: 1px solid color-mix(in srgb, #d97706 30%, transparent); padding: 2px 8px; border-radius: 999px; }
.score-badge-low  { background: color-mix(in srgb, #dc2626 15%, transparent); color: #dc2626; border: 1px solid color-mix(in srgb, #dc2626 30%, transparent); padding: 2px 8px; border-radius: 999px; }
.score-badge-na   { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .ql-tools-row { gap: 8px; }
  .ql-tool-btn { min-width: 90px; padding: 10px 12px; }
}
@media (max-width: 600px) {
  .ar-card { flex-wrap: wrap; }
  .ar-tool-bar { flex-direction: row; min-width: auto; padding: 5px 10px; }
  .ar-score-col { min-width: 48px; }
  .quick-launch { padding: 16px; }
}

/* ══ WHATSAPP CTA SIDEBAR BUTTON ═════════════════════ */
.sidebar-whatsapp-cta {
  margin: 0 12px 12px;
}
.btn-whatsapp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  background: linear-gradient(135deg, #2db9db, #062c6e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  letter-spacing: .2px;
  line-height: 1.3;
  text-align: center;
}
.btn-whatsapp-cta:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.btn-whatsapp-cta:active { transform: translateY(0); }
.btn-whatsapp-cta .wa-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ══ SITE FOOTER ════════════════════════════════════ */
.site-footer {
  margin-left: var(--sidebar-w);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 28px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--green); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .site-footer { margin-left: 0; }
}

/* ══ HOME PAGE — RECENT REPORTS LIST ════════════════ */
.home-recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-report-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.recent-report-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface2)); }
.rr-icon { font-size: 1.2rem; flex-shrink: 0; }
.rr-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rr-domain { font-size: 0.82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-date { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.rr-score { font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }

/* ══ HOME PAGE — GRID LAYOUT ════════════════════════ */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.home-tools-preview, .home-recent { min-height: 200px; }
.home-tools-preview h3, .home-recent h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }

@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } }
