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

:root {
  --bg: #080808;
  --bg-card: #111;
  --bg-card-hover: #171717;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #e8e8e8;
  --text-muted: rgba(255,255,255,0.42);
  --text-dim: rgba(255,255,255,0.22);
  --accent: #EFE303;
  --accent-dim: rgba(239,227,3,0.12);
  --accent-glow: rgba(239,227,3,0.18);
  --success: #22c55e;
  --success-dim: rgba(34,197,94,0.12);
  --danger: #ef4444;
  --danger-dim: rgba(239,68,68,0.12);
  --warning: #f59e0b;
  --radius: 10px;
  --radius-sm: 6px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left { display: flex; align-items: center; gap: 1.25rem; }
.header-right { display: flex; align-items: center; gap: 1rem; }

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
}
.logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  align-self: center;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.28rem 0.8rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}
.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
  animation: pulse-green 2s ease-in-out infinite;
}
.status-dot.error { background: var(--danger); }

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 3px rgba(34,197,94,0.2); }
}

.uptime {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 500;
}

/* ── Main ─────────────────────────────────────────────────────────────────── */
.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Hero Stats ───────────────────────────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-stat {
  background: var(--bg-card);
  padding: 1.75rem 2rem;
  transition: background 0.2s;
}
.hero-stat:hover { background: var(--bg-card-hover); }

.hero-stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.hero-stat-value.accent { color: var(--accent); }

.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 0.875rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

/* ── Site Grid ────────────────────────────────────────────────────────────── */
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.site-card {
  background: var(--bg-card);
  padding: 1.5rem;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.site-card:hover { background: var(--bg-card-hover); }

.site-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.site-card-info {}
.site-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}
.site-card-url {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.site-card-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: right;
  flex-shrink: 0;
}

.site-accent-bar {
  height: 2px;
  border-radius: 2px;
  width: 100%;
}

.site-card-stats { display: flex; flex-direction: column; gap: 0.5rem; }

.site-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.site-stat-row .label { color: var(--text-muted); }
.site-stat-row .value { color: #fff; font-weight: 500; }

.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 0.5rem; }
.toggle-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.toggle {
  position: relative;
  width: 38px;
  height: 21px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(17px); }

.site-view-link {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
.site-view-link:hover { opacity: 0.7; }

/* ── SEO Panel ────────────────────────────────────────────────────────────── */
.seo-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.seo-panel-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.seo-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  flex: 1;
}

.seo-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.seo-check-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.seo-check.ok .seo-check-dot { background: var(--success); box-shadow: 0 0 5px rgba(34,197,94,0.5); }
.seo-check.pending .seo-check-dot { background: var(--warning); animation: blink 1.4s ease-in-out infinite; }
.seo-check.ok .seo-check-label { color: #ccc; }
.seo-check.pending .seo-check-label { color: var(--text-muted); }

/* ── Site Card Extras ─────────────────────────────────────────────────────── */
.accent-val { color: var(--accent) !important; font-weight: 700; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Two Column Layout ────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── Generate Card ────────────────────────────────────────────────────────── */
.generate-card { padding: 1.5rem; }
.generate-form { display: flex; flex-direction: column; gap: 1rem; }
.generate-form .btn { height: 44px; font-size: 0.875rem; }

.generate-result {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.5;
}
.generate-result.success {
  background: var(--success-dim);
  border-color: rgba(34,197,94,0.25);
  color: var(--success);
}
.generate-result.error {
  background: var(--danger-dim);
  border-color: rgba(239,68,68,0.25);
  color: var(--danger);
}

/* ── Activity Feed ────────────────────────────────────────────────────────── */
.activity-card { overflow: hidden; }

.activity-feed {
  max-height: 320px;
  overflow-y: auto;
}

.activity-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 2.5rem 1.5rem;
  font-size: 0.82rem;
}

.activity-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.78rem;
  animation: fadeInDown 0.3s ease;
  transition: background 0.15s;
}
.activity-entry:hover { background: rgba(255,255,255,0.02); }
.activity-entry:last-child { border-bottom: none; }

.activity-icon { font-size: 0.8rem; flex-shrink: 0; margin-top: 1px; }
.activity-time { color: var(--text-dim); font-size: 0.68rem; white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.activity-site {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 28px;
  margin-top: 2px;
}
.activity-msg { color: var(--text); flex: 1; line-height: 1.45; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-card { overflow: hidden; }

.table-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table th {
  padding: 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.empty-row { text-align: center; color: var(--text-dim); padding: 3rem !important; }

.site-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-pill.memehousela { background: rgba(127,255,0,0.1); color: #7fff00; border: 1px solid rgba(127,255,0,0.2); }
.site-pill.memehouseproductions { background: rgba(239,227,3,0.1); color: #EFE303; border: 1px solid rgba(239,227,3,0.2); }
.site-pill.scc { background: rgba(251,146,60,0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }

.title-cell { max-width: 280px; }
.title-cell a { color: var(--text); text-decoration: none; font-weight: 500; }
.title-cell a:hover { color: var(--accent); }
.keyword-cell { max-width: 200px; color: var(--text-muted); font-size: 0.75rem; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.25rem; }
.pagination button {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s;
  min-height: 32px;
}
.pagination button:hover { border-color: var(--border-hover); color: #fff; }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }

/* ── Settings ─────────────────────────────────────────────────────────────── */
.settings-card { padding: 2rem; }
.settings-grid { display: flex; flex-direction: column; gap: 2rem; }
.settings-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }
.settings-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.save-status { color: var(--success); font-size: 0.82rem; font-weight: 600; }

/* ── Form Elements ────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-hint { color: var(--text-dim); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.68rem; }

.form-input, .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  background: rgba(239,227,3,0.04);
}
.form-input::placeholder { color: var(--text-dim); }
.form-select { cursor: pointer; }
.form-select.sm { width: auto; min-width: 160px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.02em;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: #fff700; border-color: #fff700; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: #fff; border-color: var(--border-hover); background: rgba(255,255,255,0.04); }

.btn-success {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(34,197,94,0.25);
}
.btn-success:hover { background: var(--success); color: #000; }

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(239,68,68,0.25);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.btn-xs { padding: 0.28rem 0.6rem; font-size: 0.72rem; }

.action-buttons { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* ── Badge ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  border-radius: 100px;
  padding: 0.12rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.5rem;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal {
  background: #131313;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 600; color: #fff; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  transition: color 0.15s;
  line-height: 1;
}
.modal-close:hover { color: #fff; }

.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.modal-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.modal-meta span strong { color: var(--text); }

.modal-content {
  font-size: 0.88rem;
  line-height: 1.75;
  color: #ccc;
}
.modal-content h1 { font-size: 1.35rem; color: #fff; margin-bottom: 1rem; }
.modal-content h2 { font-size: 1.05rem; color: #fff; margin: 1.5rem 0 0.5rem; }
.modal-content h3 { font-size: 0.92rem; color: #aaa; margin: 1rem 0 0.4rem; }
.modal-content p { margin-bottom: 0.85rem; }
.modal-content ul, .modal-content ol { margin: 0.75rem 0 1rem 1.5rem; }
.modal-content li { margin-bottom: 0.35rem; }

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* ── Generating Badge ─────────────────────────────────────────────────────── */
.generating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239,227,3,0.08);
  border: 1px solid rgba(239,227,3,0.25);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.spinner-sm {
  width: 10px; height: 10px;
  border: 2px solid rgba(239,227,3,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ── Loading spinner ──────────────────────────────────────────────────────── */
.spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-size: 0.82rem;
  color: var(--text);
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  font-weight: 500;
}
.toast.toast-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--accent); }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet ────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {

  /* Header */
  .header { padding: 0 1rem; height: 54px; }
  .header-right .uptime { display: none; }
  .logo { font-size: 1.35rem; gap: 0.35rem; }
  .logo-sub { display: none; }
  .status-badge { padding: 0.22rem 0.65rem; font-size: 0.68rem; }

  /* Main */
  .main { padding: 1.25rem 1rem 5rem; gap: 1.5rem; }

  /* Hero Stats — 2-col */
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stat { padding: 1.25rem 1.25rem; }
  .hero-stat-value { font-size: 2.4rem; }
  .hero-stat-label { font-size: 0.65rem; }

  /* Site grid — 1 col */
  .site-grid { grid-template-columns: 1fr; }

  /* Two col — stack */
  .two-col { grid-template-columns: 1fr; }

  /* Generate */
  .generate-card { padding: 1.25rem; }
  .generate-form .btn { width: 100%; }

  /* Settings */
  .settings-card { padding: 1.25rem; }
  .form-row { flex-direction: column; gap: 0.75rem; }
  .form-row .form-group { min-width: unset; width: 100%; }
  .settings-footer { flex-direction: column; align-items: stretch; }
  .settings-footer .btn { width: 100%; height: 46px; font-size: 0.9rem; }

  /* Table filters */
  .table-filters { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem; }
  .table-filters .form-select.sm { width: 100%; min-width: unset; }
  .table-filters .pagination { align-self: flex-end; }

  /* Tables → card rows */
  .table-wrap { overflow-x: unset; }
  .table thead { display: none; }
  .table tbody tr {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
  }
  .table tbody tr:hover td { background: none; }
  .table tbody tr:last-child { border-bottom: none; }
  .table td {
    display: block;
    padding: 0;
    border-bottom: none;
    font-size: 0.82rem;
    line-height: 1.5;
  }
  .title-cell {
    max-width: 100%;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.35rem;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }
  .keyword-cell {
    max-width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    white-space: normal;
  }
  /* Hide words + date cols on mobile */
  .table td:nth-child(4),
  .table td:nth-child(5) { display: none; }
  /* Site pill inline */
  .table td:nth-child(2) { display: inline-block; margin-right: 0.5rem; margin-bottom: 0.5rem; }
  /* Actions row */
  .table td:last-child { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
  .action-buttons { flex-wrap: nowrap; }
  .btn-xs { padding: 0.4rem 0.85rem; font-size: 0.75rem; min-height: 36px; }
  .btn-sm { padding: 0.4rem 0.9rem; min-height: 36px; }
  /* Fix empty row */
  .empty-row { display: table-row; }
  .empty-row td { display: table-cell; text-align: center; padding: 2rem !important; }

  /* Activity feed */
  .activity-entry { padding: 0.65rem 1rem; }
  .activity-msg { white-space: normal; line-height: 1.4; }

  /* Modal — bottom sheet */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-body { padding: 1.25rem; }
  .modal-meta { flex-direction: column; gap: 0.4rem; }
  .modal-footer { padding: 1rem 1.25rem; }

  /* Toast — full width */
  .toast-container { left: 0.75rem; right: 0.75rem; bottom: 1rem; }
  .toast { max-width: 100%; }

  /* Form inputs bigger tap targets */
  .form-input, .form-select { padding: 0.75rem 0.9rem; font-size: 0.9rem; min-height: 46px; }
  .pagination button { padding: 0.4rem 0.85rem; min-height: 36px; }

  /* SEO panel — stack on mobile */
  .seo-panel { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem; }
  .seo-checks { gap: 0.5rem 1rem; }
  .seo-check { font-size: 0.72rem; }
}
