/* ================================================
   AutoFlow Dashboard — CSS
   Clean dark admin panel design
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:        #0f1117;
  --bg2:       #161b27;
  --bg3:       #1e2535;
  --card:      #1a2032;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --accent:    #4f7bff;
  --accent2:   #3b5fe0;
  --accent3:   #a78bfa;
  --grad:      linear-gradient(135deg, var(--accent), var(--accent3));
  --green:     #22c55e;
  --red:       #ef4444;
  --orange:    #f97316;
  --yellow:    #eab308;
  --text:      #f1f5f9;
  --text2:     #94a3b8;
  --text3:     #64748b;
  --sidebar-w: 240px;
  --font:      'Inter', system-ui, sans-serif;
  --r:         10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.logo-text { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }

.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-section-label {
  font-size: 0.68rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 16px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--text2); font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s, color 0.15s; cursor: pointer;
  text-decoration: none; position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(79,123,255,0.15); color: var(--accent); }
.nav-item.active .nav-icon { filter: none; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: white;
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 99px; min-width: 18px; text-align: center;
}
.nav-badge.green { background: var(--green); }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text3);
}
.status-dot-wrap { display: flex; align-items: center; gap: 8px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
}

/* ===== MAIN ===== */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ===== TOP BAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 58px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none; background: none; border: none;
  color: var(--text2); font-size: 1.2rem; padding: 4px;
}
.breadcrumb { font-size: 0.875rem; font-weight: 600; color: var(--text2); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.btn-run {
  background: var(--accent); color: white;
  border: none; border-radius: 8px;
  font-size: 0.8rem; font-weight: 700; padding: 8px 16px;
  transition: background 0.15s, transform 0.15s;
}
.btn-run:hover { background: var(--accent2); transform: scale(1.02); }
.topbar-notif {
  position: relative; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border-radius: 8px;
  cursor: pointer; font-size: 1rem;
}
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--red); color: white;
  font-size: 0.6rem; font-weight: 800;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent); color: white;
  font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ===== PAGE CONTENT ===== */
.page-content { flex: 1; padding: 28px 24px; }
.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.page-header p { color: var(--text2); font-size: 0.875rem; margin-top: 4px; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
  border: 1px solid var(--border2);
}
/* Translucent tints that sit well on the dark theme (replaces light pastels) */
.stat-icon.tint-blue   { background: rgba(79,123,255,0.14);  border-color: rgba(79,123,255,0.30); }
.stat-icon.tint-indigo { background: rgba(167,139,250,0.14); border-color: rgba(167,139,250,0.30); }
.stat-icon.tint-green  { background: rgba(34,197,94,0.14);   border-color: rgba(34,197,94,0.30); }
.stat-icon.tint-pink   { background: rgba(236,72,153,0.14);  border-color: rgba(236,72,153,0.30); }
.stat-num { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.stat-change { font-size: 0.72rem; margin-top: 4px; }
.stat-change.green { color: var(--green); }
.stat-change.red { color: var(--red); }
.stat-change.muted { color: var(--text3); }

/* ===== CARDS ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== FORMS ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text2); }
.form-group small { font-size: 0.72rem; color: var(--text3); }
.form-group small a { color: var(--accent); }
.form-input {
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  color: var(--text); font-family: var(--font); font-size: 0.875rem;
  outline: none; transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus { border-color: var(--accent); }
.form-input.small { width: auto; min-width: 120px; }
.form-input option { background: var(--bg2); }
.form-textarea {
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-family: var(--font); font-size: 0.875rem;
  outline: none; resize: vertical; width: 100%;
  transition: border-color 0.2s;
}
.form-textarea:focus { border-color: var(--accent); }
.form-actions {
  display: flex; gap: 10px; padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn .form-input { flex: 1; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent); color: white;
  border: none; border-radius: 8px;
  font-size: 0.875rem; font-weight: 600; padding: 10px 18px;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent2); transform: scale(1.01); }
.btn-primary.loading { opacity: 0.7; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.875rem; font-weight: 500; padding: 10px 18px;
  cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border2); }
.btn-small {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.78rem; font-weight: 500; padding: 5px 12px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn-small:hover { color: var(--text); border-color: var(--border2); }
.btn-small.green { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }
.btn-test {
  background: rgba(79,123,255,0.12); color: var(--accent);
  border: 1px solid rgba(79,123,255,0.3); border-radius: 8px;
  font-size: 0.875rem; font-weight: 600; padding: 10px 18px;
  cursor: pointer; transition: all 0.15s;
}
.btn-test:hover { background: rgba(79,123,255,0.2); }
.btn-danger {
  background: rgba(239,68,68,0.1); color: var(--red);
  border: 1px solid rgba(239,68,68,0.25); border-radius: 8px;
  font-size: 0.82rem; font-weight: 600; padding: 9px 16px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.5); }

/* ===== TOGGLE ===== */
.toggle { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg3); border-radius: 99px; border: 1px solid var(--border);
  transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: var(--text3); border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: white; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text2);
}
.toggle-row:last-of-type { border-bottom: none; }

/* ===== TABLES ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th {
  background: var(--bg3); padding: 11px 16px;
  text-align: left; font-weight: 600; color: var(--text2);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  color: var(--text2); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table td .site-name { color: var(--text); font-weight: 600; }
.data-table td .article-title { color: var(--text); font-weight: 500; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-filters { display: flex; gap: 8px; }

/* ===== STATUS PILLS ===== */
.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 700;
}
.status-pill.green { background: rgba(34,197,94,0.15); color: var(--green); }
.status-pill.gray { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }
.status-pill.orange { background: rgba(249,115,22,0.15); color: var(--orange); }
.status-pill.blue { background: rgba(79,123,255,0.15); color: var(--accent); }
.green-text { color: var(--green); font-size: 0.75rem; }

/* ===== SITES LIST (DASHBOARD) ===== */
.sites-list { padding: 4px 0; }
.site-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.site-row:last-child { border-bottom: none; }
.site-row-left { display: flex; align-items: center; gap: 12px; }
.site-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(79,123,255,0.15); color: var(--accent);
  font-size: 0.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.site-row-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.site-row-url { font-size: 0.72rem; color: var(--text3); }

/* ===== ACTIVITY ===== */
.activity-list { padding: 4px 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
}
.activity-dot.green { background: var(--green); }
.activity-dot.blue { background: var(--accent); }
.activity-dot.orange { background: var(--orange); }
.activity-dot.red { background: var(--red); }
.activity-text { font-size: 0.82rem; color: var(--text2); line-height: 1.5; }
.activity-text strong { color: var(--text); }
.activity-time { font-size: 0.72rem; color: var(--text3); margin-top: 2px; }

/* ===== PIPELINE ===== */
.pipeline { display: flex; align-items: center; padding: 20px; gap: 8px; overflow-x: auto; }
.pipe-step {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--border);
  min-width: 100px; transition: all 0.2s;
}
.pipe-step.active { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.06); }
.pipe-icon { font-size: 1.4rem; margin-bottom: 6px; }
.pipe-label { font-size: 0.75rem; font-weight: 600; color: var(--text); text-align: center; }
.pipe-status { font-size: 0.68rem; margin-top: 4px; }
.pipe-arrow { color: var(--text3); font-size: 1.2rem; flex-shrink: 0; }

/* ===== TEST RESULT ===== */
.test-result {
  margin: 0 20px 16px; padding: 12px 16px;
  border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  display: none;
}
.test-result.success { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.3); display: block; }
.test-result.error { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.3); display: block; }

/* ===== GENERATED ARTICLE ===== */
.gen-result {
  margin: 0 20px 20px; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.gen-result-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg3); border-bottom: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 600; color: var(--text2);
}
.gen-actions { display: flex; gap: 8px; }
.gen-title { padding: 16px 16px 8px; font-size: 1rem; font-weight: 700; color: var(--text); }
.gen-preview {
  padding: 0 16px 16px; font-size: 0.82rem; color: var(--text2);
  line-height: 1.7; max-height: 200px; overflow-y: auto;
}

/* ===== SOURCES ===== */
.sources-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.source-card { padding: 20px; }
.source-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.source-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg3); font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.source-header h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.active-source { border-color: rgba(34,197,94,0.35) !important; }

/* ===== SCHEDULE ===== */
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.range-input { width: 100%; accent-color: var(--accent); margin-top: 4px; }
.range-val { font-size: 0.78rem; color: var(--text2); margin-top: 4px; }
.time-range { display: flex; align-items: center; gap: 10px; }
.time-range span { color: var(--text3); }
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.time-chip {
  padding: 5px 12px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text3); font-size: 0.78rem; cursor: pointer;
  transition: all 0.15s;
}
.time-chip.active { background: rgba(79,123,255,0.15); border-color: rgba(79,123,255,0.4); color: var(--accent); }

/* ===== LOGS ===== */
.logs-list { font-family: 'Courier New', monospace; font-size: 0.78rem; }
.log-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
}
.log-item:last-child { border-bottom: none; }
.log-time { color: var(--text3); white-space: nowrap; flex-shrink: 0; }
.log-type {
  padding: 1px 6px; border-radius: 4px; font-size: 0.68rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.log-type.success { background: rgba(34,197,94,0.15); color: var(--green); }
.log-type.info    { background: rgba(79,123,255,0.15); color: var(--accent); }
.log-type.error   { background: rgba(239,68,68,0.15); color: var(--red); }
.log-type.warn    { background: rgba(234,179,8,0.15); color: var(--yellow); }
.log-msg { color: var(--text2); }

/* ===== AI / SETTINGS ===== */
.cost-grid { padding: 20px; }
.cost-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 0.875rem; color: var(--text2); }
.cost-result { display: flex; gap: 24px; align-items: center; margin-top: 20px; padding: 16px; background: var(--bg3); border-radius: 8px; }
.cost-num { font-size: 1.6rem; font-weight: 800; color: var(--green); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Server Info Card */
.server-info { padding: 4px 0 16px; }
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem;
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--text2); }
.info-row strong { color: var(--text); }

/* Settings action buttons stack */
.action-buttons-stack {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}
.action-buttons-stack .btn-action-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text2); transition: all 0.15s; width: 100%;
}
.action-btn:hover { color: var(--text); border-color: var(--border2); background: rgba(255,255,255,0.04); }
.action-btn.export { color: var(--accent); border-color: rgba(79,123,255,0.3); background: rgba(79,123,255,0.08); }
.action-btn.export:hover { background: rgba(79,123,255,0.15); }
.action-btn.import { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.action-btn.import:hover { background: rgba(34,197,94,0.15); }
.action-btn.danger { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.action-btn.danger:hover { background: rgba(239,68,68,0.15); }

/* ===== TOAST ===== */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 500; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
  min-width: 240px;
}
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid, .schedule-grid, .settings-grid { grid-template-columns: 1fr; }
  .sources-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); }
}

/* ===== LOGIN OVERLAY ===== */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #0a0d16 0%, #111827 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-overlay.hidden { display: none; }
.login-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 48px 40px;
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.login-logo {
  font-size: 1.8rem; font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.login-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { color: var(--text2); margin-bottom: 28px; }
.login-btn { width: 100%; padding: 14px; font-size: 1rem; margin-top: 8px; }
.login-hint { margin-top: 20px; font-size: 0.78rem; color: var(--text3); text-align: center; }

/* ===== SIDEBAR USER ===== */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: white; flex-shrink: 0;
}
.user-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.user-role { font-size: 0.72rem; color: var(--text3); text-transform: capitalize; }

/* ===== TOPBAR USER ===== */
.topbar-user {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 14px; background: rgba(255,255,255,0.06);
  border-radius: 20px; border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 500; color: var(--text);
  transition: background 0.2s;
}
.topbar-user:hover { background: rgba(255,255,255,0.1); }

/* ===== WORDPRESS GUIDE ===== */
.guide-body { padding: 16px 20px; }
.guide-body.hidden { display: none; }
.guide-step {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.guide-step:last-child { border-bottom: none; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.guide-step code {
  background: rgba(255,255,255,0.08); padding: 2px 6px;
  border-radius: 4px; font-size: 0.8rem; font-family: monospace;
}

/* ===== META AI KEY CARDS ===== */
.meta-key-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; gap: 10px;
}
.meta-key-label { font-weight: 600; font-size: 0.85rem; }
.meta-key-preview { color: var(--text3); font-size: 0.78rem; font-family: monospace; }
.meta-key-status {
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
}
.meta-key-status.ok { background: rgba(34,197,94,0.15); color: var(--green); }
.meta-key-status.error { background: rgba(239,68,68,0.15); color: var(--red); }
.meta-key-status.untested { background: rgba(148,163,184,0.15); color: var(--text3); }
.meta-key-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== SITES TABLE BADGE ===== */
.badge-type {
  padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 600;
}
.badge-type.wordpress { background: rgba(33,117,192,0.2); color: #60a5fa; }
.badge-type.static { background: rgba(34,197,94,0.15); color: var(--green); }

