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

:root {
  --bg-base:       #080a10;
  --bg-surface:    #0f1117;
  --bg-card:       #141720;
  --bg-card-hover: #191d2a;
  --bg-input:      #1a1e2b;
  --border:        rgba(255,255,255,0.07);
  --border-active: rgba(108,99,255,0.5);

  --accent:        #6c63ff;
  --accent-2:      #00d4ff;
  --accent-glow:   rgba(108,99,255,0.25);
  --accent-grad:   linear-gradient(135deg, #6c63ff, #00d4ff);

  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  --text-primary:   #f0f2ff;
  --text-secondary: #8890a8;
  --text-muted:     #4a5168;

  --sidebar-w: 240px;
  --topbar-h:  60px;
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(108,99,255,0.15);
  --transition:  all 0.2s cubic-bezier(0.4,0,0.2,1);
}

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease, width 0.3s ease;
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.main-content {
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.3s ease;
  overflow: hidden;
}
.main-content.expanded { margin-left: 0; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent-grad);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.logo-text { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.logo-accent { color: var(--accent); }

.sidebar-nav {
  flex: 1; overflow-y: auto;
  padding: 16px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 10px 10px 4px;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.nav-item.active {
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item svg { flex-shrink: 0; }
.nav-item span:first-of-type { flex: 1; }
.nav-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 6px; border-radius: 99px;
  text-transform: uppercase;
}
.nav-badge.live { background: rgba(34,197,94,0.2); color: var(--success); }
.nav-badge.new { background: rgba(108,99,255,0.25); color: var(--accent); }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.site-status { display: flex; align-items: center; gap: 7px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.status-text { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.sidebar-version { font-size: 10px; color: var(--text-muted); }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 6px; border-radius: 8px;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.topbar-breadcrumb { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.topbar-period { display: flex; gap: 4px; background: var(--bg-card); border-radius: var(--radius-sm); padding: 3px; }
.period-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); padding: 5px 12px; border-radius: 6px;
  transition: var(--transition);
}
.period-btn.active { background: var(--accent); color: #fff; }
.period-btn:hover:not(.active) { color: var(--text-primary); }

.topbar-export {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 13px;
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: var(--transition);
}
.topbar-export:hover { border-color: var(--accent); color: var(--accent); }

.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer; flex-shrink: 0;
}

.page-container {
  flex: 1; overflow-y: auto;
  padding: 28px 28px;
}

.page-header { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,99,255,0.3), transparent);
  opacity: 0;
  transition: var(--transition);
}
.card:hover { border-color: rgba(108,99,255,0.2); }
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }

.metric-value { font-size: 32px; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 6px; }
.metric-label { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.metric-change {
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 99px;
}
.metric-change.up { background: rgba(34,197,94,0.12); color: var(--success); }
.metric-change.down { background: rgba(239,68,68,0.12); color: var(--danger); }
.metric-icon-bg {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  opacity: 0.08; font-size: 52px;
}

canvas { display: block; }
.chart-wrap { position: relative; width: 100%; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); color: var(--text-primary); }
.data-table tr:last-child td { border-bottom: none; }
.table-rank { font-weight: 700; color: var(--text-muted); }
.table-name { font-weight: 500; color: var(--text-primary); }

.progress-bar-wrap { display: flex; align-items: center; gap: 10px; }
.progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--accent-grad); transition: width 0.8s ease; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px;
}
.badge-success { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-info    { background: rgba(59,130,246,0.12); color: var(--info); }
.badge-purple  { background: rgba(108,99,255,0.15); color: var(--accent); }

.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--success);
}
.live-dot {
  width: 7px; height: 7px; background: var(--success); border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

.heatmap-container {
  position: relative; width: 100%; border-radius: var(--radius-sm);
  overflow: hidden; background: #0c0e14;
  border: 1px solid var(--border);
}
.heatmap-canvas { width: 100%; display: block; }

.click-tracker-list { display: flex; flex-direction: column; gap: 10px; }
.click-tracker-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--bg-input); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.click-tracker-item:hover { border-color: var(--accent); }
.click-tracker-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.click-tracker-id { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.click-tracker-count {
  font-size: 22px; font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.click-tracker-bar { flex: 1; }

.funnel { display: flex; flex-direction: column; gap: 4px; }
.funnel-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-input);
}
.funnel-step-label { font-size: 12px; color: var(--text-secondary); width: 120px; flex-shrink: 0; }
.funnel-step-bar-wrap { flex: 1; position: relative; height: 24px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.funnel-step-bar { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 11px; font-weight: 700; color: #fff; transition: width 1s ease; }
.funnel-step-pct { font-size: 12px; font-weight: 700; color: var(--text-primary); width: 44px; text-align: right; }
.funnel-step-drop { font-size: 11px; color: var(--danger); width: 48px; text-align: right; }

.blog-list { display: flex; flex-direction: column; gap: 10px; }
.blog-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
}
.blog-item:hover { border-color: var(--accent); transform: translateX(4px); }
.blog-item-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.blog-item-meta { font-size: 11.5px; color: var(--text-muted); }
.blog-item-info { flex: 1; }
.blog-item-actions { display: flex; gap: 8px; opacity: 0; transition: var(--transition); }
.blog-item:hover .blog-item-actions { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 16px rgba(108,99,255,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(108,99,255,0.4); }
.btn-ghost {
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn-icon { padding: 8px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: none; align-items: stretch; justify-content: center;
}
.modal-overlay.open { display: flex; }

.blog-editor-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 95vw; max-width: 1300px;
  height: 92vh;
  display: flex; flex-direction: column;
  margin: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-actions { display: flex; gap: 8px; align-items: center; }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text-secondary);
  padding: 6px; border-radius: 8px; transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.1); color: var(--danger); }

.blog-editor-layout {
  display: grid; grid-template-columns: 1fr 340px;
  flex: 1; overflow: hidden;
}

.editor-column {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.editor-title-input {
  font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text-primary); padding: 18px 24px;
  outline: none; flex-shrink: 0;
}
.editor-title-input::placeholder { color: var(--text-muted); }

.editor-toolbar {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg-base);
}
.toolbar-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); padding: 6px 9px; border-radius: 6px;
  transition: var(--transition); display: flex; align-items: center;
}
.toolbar-btn:hover { background: rgba(255,255,255,0.07); color: var(--text-primary); }
.toolbar-btn.active { background: rgba(108,99,255,0.2); color: var(--accent); }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.editor-content {
  flex: 1; overflow-y: auto;
  padding: 24px; outline: none;
  font-size: 15px; line-height: 1.75; color: var(--text-primary);
  min-height: 0;
}
.editor-content:empty::before {
  content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}
.editor-content h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.editor-content h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; margin-top: 24px; }
.editor-content h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; margin-top: 18px; }
.editor-content p { margin-bottom: 14px; }
.editor-content ul, .editor-content ol { margin-left: 24px; margin-bottom: 14px; }
.editor-content blockquote {
  border-left: 3px solid var(--accent); padding-left: 16px;
  color: var(--text-secondary); font-style: italic; margin: 16px 0;
}
.editor-content a { color: var(--accent); }
.editor-content strong { color: var(--text-primary); }

.seo-column { overflow-y: auto; display: flex; flex-direction: column; gap: 0; }
.seo-panel {
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.seo-panel h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }

.seo-score-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seo-score-circle { position: relative; width: 52px; height: 52px; }
.seo-score-circle svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.seo-circle-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 3; }
.seo-circle-fill { fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.5s ease, stroke 0.5s ease; }
.seo-score-num {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 13px; font-weight: 800; color: var(--text-primary);
}

.seo-checklist { display: flex; flex-direction: column; gap: 6px; }
.seo-check {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.4;
}
.seo-check-icon { flex-shrink: 0; margin-top: 1px; }
.seo-check.pass .seo-check-icon { color: var(--success); }
.seo-check.fail .seo-check-icon { color: var(--danger); }
.seo-check.warn .seo-check-icon { color: var(--warning); }

.seo-field { margin-bottom: 12px; }
.seo-field label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px;
}
.field-counter { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.field-counter.warn { color: var(--warning); }
.field-counter.good { color: var(--success); }
.seo-input, .seo-textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 12.5px;
  padding: 8px 10px; outline: none; transition: var(--transition);
}
.seo-input:focus, .seo-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(108,99,255,0.1); }
.seo-textarea { resize: vertical; min-height: 72px; }
.slug-input-wrap { display: flex; align-items: center; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition); }
.slug-input-wrap:focus-within { border-color: var(--accent); }
.slug-prefix { font-size: 11.5px; color: var(--text-muted); padding: 8px 6px 8px 10px; flex-shrink: 0; }
.slug-input { background: none; border: none; padding: 8px 8px 8px 0; font-size: 12.5px; }
.slug-input:focus { box-shadow: none; }

.google-preview {
  background: #fff; border-radius: 8px; padding: 12px 14px;
  font-family: Arial, sans-serif;
}
.google-preview-url { font-size: 11px; color: #1a0dab; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.google-preview-title { font-size: 17px; color: #1a0dab; font-weight: 400; margin-bottom: 4px; line-height: 1.3; }
.google-preview-desc { font-size: 12.5px; color: #545454; line-height: 1.5; }

.featured-img-upload {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: var(--transition); color: var(--text-muted); font-size: 12px;
}
.featured-img-upload:hover { border-color: var(--accent); color: var(--accent); }

.config-section { margin-bottom: 24px; }
.config-section h2 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.tracker-add-form {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.tracker-add-form input {
  flex: 1; min-width: 160px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px;
  color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 13px;
  outline: none;
}
.tracker-add-form input:focus { border-color: var(--accent); }
.tracker-item-config {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px;
}
.tracker-item-info { flex: 1; }
.tracker-item-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.tracker-item-selector { font-size: 11px; color: var(--text-muted); font-family: monospace; margin-top: 2px; }

.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 18px;
  font-size: 13.5px; font-weight: 500; color: var(--text-primary);
  box-shadow: var(--shadow-card);
  transform: translateY(20px); opacity: 0;
  transition: all 0.3s ease; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; margin-bottom: 20px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .blog-editor-layout { grid-template-columns: 1fr; }
  .seo-column { display: none; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .main-content { margin-left: 0; }
}

@keyframes count-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.count-up { animation: count-up 0.5s ease forwards; }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.login-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.login-overlay.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: slide-up 0.5s ease;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
}

/* Tooltip pour les graphiques */
.chart-bar:hover {
  opacity: 1 !important;
}
.chart-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  z-index: 100;
  text-align: center;
}
.chart-bar:hover .chart-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}
