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

:root {
  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-card: #16161f;
  --bg-hover: #1e1e2a;
  --border: #ffffff12;
  --border-hover: #ffffff25;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: #6366f130;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px #00000040;
}

[data-theme="light"] {
  --bg-base: #f3f4f6;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f9fafb;
  --border: #e5e7eb;
  --border-hover: #d1d5db;
  --accent: #6366f1;
  --accent-light: #4f46e5;
  --accent-glow: #6366f115;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --shadow: 0 4px 24px #0000001a;
}

html, body, #root {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.app-layout { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo { padding: 24px 20px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo .logo-name { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.sidebar-logo .logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sidebar-logo .logo-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-section { padding: 16px 12px 8px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-nav-item.active { background: var(--accent-glow); color: var(--accent-light); }
.sidebar-nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-footer { margin-top: auto; padding: 16px 12px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.sidebar-user:hover { background: var(--bg-hover); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-info .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-info .user-role { font-size: 11px; color: var(--text-muted); }

/* MAIN */
.main-content { flex: 1; overflow-y: auto; background: var(--bg-base); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg-base);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-action-desktop { display: flex; align-items: center; gap: 12px; }

.topbar-menu-btn { display: none; }
.topbar-logo { display: none; align-items: center; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.topbar-logo-icon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.topbar-logo-text { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }

.sidebar-close-btn { display: none; }
.sidebar-overlay { display: none; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s ease; white-space: nowrap;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }
.btn-danger { background: #ef444415; color: var(--danger); border: 1px solid #ef444430; }
.btn-danger:hover { background: #ef444425; }
.btn-success { background: #22c55e15; color: var(--success); border: 1px solid #22c55e30; }
.btn-success:hover { background: #22c55e25; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* PAGE */
.page-container { padding: 32px; }
.page-container-narrow { padding: 32px; max-width: 1200px; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.blue { background: #3b82f615; }
.stat-icon.green { background: #22c55e15; }
.stat-icon.purple { background: #a855f715; }
.stat-icon.orange { background: #f59e0b15; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 11px; color: var(--success); margin-top: 4px; font-weight: 600; }

/* TABLE */
.table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.table-header-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.table-filters { display: flex; gap: 10px; }

.search-input {
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  color: var(--text-primary); font-size: 12.5px; width: 220px;
  outline: none; transition: border-color 0.2s; font-family: inherit;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.filter-select {
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  color: var(--text-secondary); font-size: 12.5px; outline: none; cursor: pointer;
  font-family: inherit;
}

table { width: 100%; border-collapse: collapse; }
.articles-table { table-layout: fixed; }
th {
  padding: 11px 12px; text-align: left;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border); background: var(--bg-surface);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
td { padding: 12px; font-size: 12.5px; color: var(--text-secondary); border-bottom: 1px solid #ffffff08; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #ffffff03; }

.article-title-cell { color: var(--text-primary); font-weight: 600; font-size: 13.5px; }
.article-category-tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  color: var(--accent-light); background: var(--accent-glow);
  padding: 2px 7px; border-radius: 99px;
}

.article-subcategory-tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  color: #fb923c; background: #f9731615;
  border: 1px solid #f9731630;
  padding: 2px 7px; border-radius: 99px;
}

/* Rich text editor */
[contenteditable][data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
[contenteditable] blockquote {
  border-left: 3px solid var(--accent);
  margin: 12px 0;
  padding: 8px 16px;
  background: var(--accent-glow);
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-style: italic;
}
[contenteditable] a { color: var(--accent-light); text-decoration: underline; }
[contenteditable] img { cursor: pointer; outline: 2px solid transparent; transition: outline-color 0.15s; }
[contenteditable] img:hover { outline-color: var(--accent); }
[contenteditable] h1 { font-size: 1.8em; font-weight: 800; margin: 12px 0 8px; }
[contenteditable] h2 { font-size: 1.5em; font-weight: 700; margin: 12px 0 8px; }
[contenteditable] h3 { font-size: 1.25em; font-weight: 700; margin: 10px 0 6px; }
[contenteditable] h4 { font-size: 1.1em; font-weight: 700; margin: 8px 0 4px; }
[contenteditable] ul, [contenteditable] ol { padding-left: 24px; margin: 8px 0; }
[contenteditable] li { margin: 4px 0; }
[contenteditable] p { margin: 6px 0; }

.seo-score-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 99px;
  white-space: nowrap;
}
.seo-score-badge.good { background: #22c55e15; color: var(--success); border: 1px solid #22c55e30; }
.seo-score-badge.ok   { background: #f59e0b15; color: var(--warning); border: 1px solid #f59e0b30; }
.seo-score-badge.bad  { background: #ef444415; color: var(--danger);  border: 1px solid #ef444430; }
.seo-score-badge.none { background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border); font-weight: 600; white-space: nowrap; font-size: 10.5px; padding: 3px 8px; }

.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
}
.status-badge.publicado { background: #22c55e15; color: var(--success); border: 1px solid #22c55e30; }
.status-badge.rascunho { background: #f59e0b15; color: var(--warning); border: 1px solid #f59e0b30; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.action-buttons { display: flex; gap: 6px; align-items: center; }
.action-btn {
  width: 30px; height: 30px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.action-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }
.action-btn.danger:hover { background: #ef444420; color: var(--danger); border-color: #ef444440; }

/* EDITOR */
.editor-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 32px; }
.editor-main { display: flex; flex-direction: column; gap: 20px; }
.editor-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.editor-card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.editor-card-body { padding: 20px; }

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; }
.form-input {
  width: 100%; background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px; outline: none;
  transition: border-color 0.2s; font-family: inherit;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
  width: 100%; background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px; outline: none; cursor: pointer; font-family: inherit;
}
.form-textarea {
  width: 100%; background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text-primary); font-size: 14px; outline: none;
  resize: vertical; min-height: 280px; line-height: 1.7;
  font-family: inherit; transition: border-color 0.2s;
}
.form-textarea:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* SEO PANEL */
.seo-sidebar { display: flex; flex-direction: column; gap: 20px; }
.seo-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seo-panel-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.seo-panel-title { font-size: 13px; font-weight: 700; color: var(--text-primary); flex: 1; }
.seo-panel-body { padding: 20px; }

.seo-idle { text-align: center; padding: 28px 16px; }
.seo-idle-icon { font-size: 40px; margin-bottom: 12px; }
.seo-idle-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.seo-loading { display: flex; flex-direction: column; align-items: center; padding: 32px 16px; gap: 16px; }
.seo-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.seo-loading-text { font-size: 13px; color: var(--text-secondary); text-align: center; line-height: 1.6; }
.seo-loading-dots span { display: inline-block; animation: dot-blink 1.4s infinite; }
.seo-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.seo-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

.seo-score-ring {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding: 16px;
  background: var(--bg-hover); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.score-circle { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.score-circle svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.score-circle-bg { fill: none; stroke: var(--border); stroke-width: 5; }
.score-circle-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-circle-fill.good { stroke: var(--success); }
.score-circle-fill.ok { stroke: var(--warning); }
.score-circle-fill.bad { stroke: var(--danger); }
.score-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: var(--text-primary); }
.score-info .score-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.score-info .score-sublabel { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.seo-field { margin-bottom: 14px; }
.seo-field-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.seo-field-value {
  font-size: 13px; color: var(--text-primary);
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 12px; line-height: 1.5; word-break: break-word;
}
.seo-field-value.keyword { color: var(--accent-light); font-weight: 700; font-size: 14px; border-color: #6366f140; background: var(--accent-glow); }

.seo-divider { height: 1px; background: var(--border); margin: 18px 0; }
.seo-checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-secondary); }
.checklist-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.checklist-icon.pass { background: #22c55e20; color: var(--success); }
.checklist-icon.fail { background: #ef444420; color: var(--danger); }
.checklist-label.fail { color: var(--text-muted); }

/* COMMENTS */
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; gap: 14px; align-items: flex-start; transition: border-color 0.2s;
}
.comment-card:hover { border-color: var(--border-hover); }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* USERS */
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.user-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color 0.2s; }
.user-card:hover { border-color: var(--border-hover); }
.user-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.user-card-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.user-card-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.user-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.role-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.role-badge.admin { background: var(--accent-glow); color: var(--accent-light); border: 1px solid #6366f140; }
.role-badge.editor { background: #a855f715; color: #c084fc; border: 1px solid #a855f730; }
.user-status { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.user-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.user-status.ativo { color: var(--success); }
.user-status.inativo { color: var(--text-muted); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: #00000070;
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 520px;
  box-shadow: var(--shadow); animation: modal-in 0.2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* UTILS */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb span { cursor: pointer; }
.breadcrumb span:hover { color: var(--text-secondary); }
.breadcrumb-sep { color: var(--border-hover); }
.breadcrumb-current { color: var(--text-secondary); cursor: default !important; }

.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 6px 0; margin-bottom: 20px; background: none; border: none; transition: color 0.15s; font-family: inherit; }
.back-btn:hover { color: var(--text-primary); }

.empty-state { text-align: center; padding: 60px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-text { font-size: 13px; color: var(--text-muted); }

.char-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.char-counter.over { color: var(--danger); }

/* DASHBOARD */
.recent-grid { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 24px; margin-top: 24px; }
.dashboard-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dashboard-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 700; color: var(--text-primary); }
.recent-article-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #ffffff08; cursor: pointer; transition: background 0.15s; }
.recent-article-item:last-child { border-bottom: none; }
.recent-article-item:hover { background: #ffffff03; }
.recent-article-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.recent-article-dot.publicado { background: var(--success); }
.recent-article-dot.rascunho { background: var(--warning); }
.recent-article-title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-article-meta { font-size: 11px; color: var(--text-muted); }
.category-stat-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #ffffff08; }
.category-stat-item:last-child { border-bottom: none; }
.category-stat-name { font-size: 13px; color: var(--text-secondary); }
.category-stat-count { font-size: 13px; font-weight: 700; color: var(--accent-light); }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow); z-index: 200;
  animation: toast-in 0.3s ease; font-size: 14px;
  color: var(--text-primary); font-weight: 500;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.toast.success { border-color: #22c55e40; }

/* RESPONSIVIDADE MOBILE */
@media (max-width: 1024px) {
  .app-layout { flex-direction: column; }

  /* Sidebar vira gaveta (drawer) que desliza por cima do conteúdo,
     em vez de reservar espaço fixo no layout */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(280px, 82vw) !important;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px #00000050;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #00000066;
    z-index: 90;
    animation: fade-in 0.2s ease;
  }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

  .sidebar-logo { display: block; position: relative; }
  .sidebar-close-btn {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 16px; right: 14px;
    width: 26px; height: 26px; border-radius: 7px;
    background: var(--bg-hover); border: none; color: var(--text-muted);
    font-size: 13px; cursor: pointer;
  }
  .sidebar-section-label { display: block; }
  .sidebar-section { display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 8px; }
  .sidebar-nav-item { padding: 9px 12px; font-size: 13.5px; white-space: normal; }
  .sidebar-nav-item .nav-icon { font-size: 16px; }
  .sidebar-footer { display: block; }

  .main-content { overflow-y: auto; }

  /* Topbar mobile: ☰ à esquerda, logo central, tema + notificações à direita */
  .topbar { padding: 0 14px; }
  .topbar-menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    background: none; border: none; color: var(--text-primary);
    font-size: 19px; cursor: pointer;
  }
  .topbar-menu-btn:hover { background: var(--bg-hover); }
  .topbar-title { display: none; }
  .topbar-logo { display: flex; flex: 1; justify-content: center; }
  .topbar-action-desktop { display: none; }
  .topbar-actions { gap: 6px; }

  .page-container { padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11px; }
  .stat-change { font-size: 10px; }

  .editor-layout { grid-template-columns: 1fr; gap: 16px; }
  .seo-sidebar { order: -1; }

  .recent-grid { grid-template-columns: 1fr; }

  .table-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .table-filters { flex-wrap: wrap; width: 100%; }
  .search-input { width: 100%; }

  .users-grid { grid-template-columns: 1fr; }

  .modal { margin: 12px; }
}
@media (max-width: 1024px) {
  .login-branding {
    display: none !important;
  }
  .login-form-side {
    padding: 32px 24px !important;
    align-items: flex-start !important;
    padding-top: 48px !important;
  }
  .login-mobile-brand {
    display: block !important;
  }
}
