/* ═══════════════════════════════════════════════════
   Design system — clean, moderno, sem frameworks
   ═══════════════════════════════════════════════════ */

:root {
  /* palette */
  --bg:           #faf9f8;
  --surface:      #ffffff;
  --fg:           #221d21;
  --fg-secondary: #433d3d;
  --muted:        #b7aea5;
  --border:       #d5cdc6;
  --border-light: #ede8e3;

  /* accent — laranja terroso */
  --accent:       #f77014;
  --accent-hover: #e33c08;
  --accent-light: #fff0e6;
  --accent-subtle:#ffe4d0;

  /* semantic */
  --success:      #059669;
  --warning:      #d97706;
  --danger:       #dc2626;
  --danger-hover: #b91c1c;

  /* misc */
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
  --shadow-xl:    0 20px 40px rgba(0,0,0,.08);
}

/* ── reset & base ──────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

/* ── header ────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #221d21 0%, #3d2e1f 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.15);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}

/* logo */
.logo {
  display: flex; flex-direction: column; gap: 2px;
  font-weight: 800; font-size: 1.45rem; line-height: 1.2;
  color: #fff; text-decoration: none; letter-spacing: -.02em;
  transition: opacity .2s;
}
.logo:hover { opacity: .85; color: #fff; }
.logo .tagline {
  font-weight: 400; font-size: .66rem; color: rgba(255,255,255,.55);
  text-transform: uppercase; letter-spacing: .08em;
}

/* nav */
.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 50px;
  font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.78); text-decoration: none;
  transition: all .2s;
}
.main-nav > a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.main-nav > a .material-symbols-outlined { font-size: 18px }

/* search */
.search-form {
  display: flex; align-items: center; margin-left: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 50px; padding: 2px;
  transition: background .2s, box-shadow .2s;
}
.search-form:focus-within {
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 3px rgba(247,112,20,.35);
}
.search-form .search-icon {
  font-size: 18px; color: rgba(255,255,255,.5);
  margin-left: 12px; pointer-events: none;
}
.search-form input {
  padding: 8px 14px 8px 6px; border: none; border-radius: 50px;
  font-size: .875rem; color: #fff; background: transparent;
  width: 150px; outline: none;
}
.search-form input::placeholder { color: rgba(255,255,255,.4) }

/* ── hero ──────────────────────────────────────── */

.hero {
  padding: 64px 0 48px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, var(--accent-light), transparent);
  opacity: .5; pointer-events: none; z-index: -1;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 12px; }
.hero p  { font-size: 1.15rem; color: var(--fg-secondary); max-width: 560px; margin: 0 auto 24px; }
.hero .btn { font-size: 1rem; padding: 10px 24px; }

/* ── section headings ──────────────────────────── */

.latest h2, .page h2 {
  font-size: 1.35rem; margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light); display: inline-block;
}

/* ── cards grid ────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin-bottom: 32px;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  display: block; overflow: hidden; position: relative;
}
.card-img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  transition: transform .35s;
}
.card:hover .card-img { transform: scale(1.04); }

.card-body { padding: 18px; }
.card-cat {
  display: inline-block; font-size: .72rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px; padding: 3px 8px; border-radius: 4px;
  background: var(--accent-light);
}
.card-cat:hover { background: var(--accent-subtle); }

.card h3 { margin-bottom: 6px; line-height: 1.3; }
.card h3 a { color: var(--fg); }
.card h3 a:hover { color: var(--accent); }

.card-summary {
  color: var(--fg-secondary); font-size: .9rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}

.card time {
  font-size: .8rem; color: var(--muted); display: block; margin-top: 4px;
}

/* ── buttons ───────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  line-height: 1.4;
}
.btn:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: var(--radius-xs); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.btn-outline {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); color: var(--accent); }

/* ── pagination ────────────────────────────────── */

.pagination {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  margin: 40px 0;
}
.pagination a {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--fg-secondary);
  transition: all .15s;
}
.pagination a:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.page-info { font-size: .875rem; color: var(--muted); padding: 0 4px; }

/* ── article (post) ────────────────────────────── */

.post { max-width: 780px; margin: 0 auto; padding: 40px 0 60px; }

.post-cover {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.post h1 {
  font-size: 2.4rem; line-height: 1.2; margin-bottom: 12px;
}

.post-meta {
  display: flex; gap: 16px; align-items: center;
  color: var(--muted); font-size: .875rem; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}

.post-summary {
  font-size: 1.1rem; color: var(--fg-secondary); line-height: 1.65;
  margin-bottom: 28px; padding: 16px 20px;
  background: var(--accent-light); border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* conteúdo do artigo (vem do TinyMCE) */
.post-content {
  font-size: 1.05rem; line-height: 1.8; color: var(--fg);
}
.post-content h2 { font-size: 1.6rem; margin: 36px 0 12px; }
.post-content h3 { font-size: 1.25rem; margin: 28px 0 8px; }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin-bottom: 18px; padding-left: 24px; }
.post-content li { margin-bottom: 6px; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 18px; margin: 20px 0;
  background: var(--accent-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--fg-secondary); font-style: italic;
}
.post-content pre {
  background: #f6f4f2; padding: 14px 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow-x: auto; margin: 20px 0;
  font-size: .875rem; line-height: 1.6;
}
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }
.post-content :not(pre) > code {
  background: var(--accent-light); color: var(--accent);
  padding: 2px 6px; border-radius: 4px; font-weight: 500;
}
.post-content img { border-radius: var(--radius-sm); margin: 16px 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .92rem; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.post-content th { background: var(--accent-light); font-weight: 600; }

/* ── reactions ─────────────────────────────────── */

.reactions {
  display: flex; gap: 10px; margin: 36px 0; flex-wrap: wrap;
}
.reactions button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 24px;
  background: var(--surface); color: var(--fg-secondary); cursor: pointer;
  font-size: .92rem; transition: all .15s;
}
.reactions button:hover { border-color: var(--accent); background: var(--accent-light); }
.reactions button.reacted { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* ── footer ────────────────────────────────────── */

.site-footer {
  background: var(--fg); color: #cbd5e1;
  margin-top: 72px; padding: 40px 0 28px; font-size: .9rem;
}
.site-footer .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.site-footer a { color: #b7aea5; }
.site-footer a:hover { color: #f77014; }
.site-footer h4 { color: #f0ebe4; font-size: .95rem; margin-bottom: 10px; }

.footer-brand p { line-height: 1.6; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }

.newsletter-form {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
}
.newsletter-form label { color: #e2e8f0; font-weight: 500; }
.newsletter-form input {
  padding: 9px 14px; border: 1px solid #5c5252; border-radius: var(--radius-sm);
  background: #2d262d; color: #e0d8d0; font-size: .875rem;
  transition: border-color .15s;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-form input::placeholder { color: #8c7e7e; }
.newsletter-form button {
  padding: 9px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.newsletter-form button:hover { background: var(--accent-hover); }
.newsletter-msg { font-size: .8rem; margin-left: 4px; }
.newsletter-msg.ok { color: #34d399; }
.newsletter-msg.err { color: #f87171; }

.footer-bottom {
  grid-column: 1 / -1; border-top: 1px solid #5c5252;
  padding-top: 20px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
}

.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── pages (sobre, termos, privacidade) ────────── */

.page { max-width: 760px; margin: 0 auto; padding: 40px 0 60px; }
.page h1 { margin-bottom: 20px; }
.page h2 { font-size: 1.2rem; margin: 32px 0 10px; }
.page p, .page li { line-height: 1.75; color: var(--fg-secondary); margin-bottom: 12px; }
.page ul { padding-left: 20px; margin-bottom: 16px; }

/* ── category list page ────────────────────────── */

.category-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.category-list li {
  padding: 16px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: box-shadow .15s;
}
.category-list li:hover { box-shadow: var(--shadow); }
.category-list li a { font-weight: 600; font-size: 1.05rem; }
.category-list li span { color: var(--fg-secondary); margin-left: 8px; }

/* ═══════════════════════════════════════════════════
   Dashboard
   ═══════════════════════════════════════════════════ */

/* login / register pages */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f77014 0%, #e33c08 100%);
}

.login-box {
  background: var(--surface); padding: 36px; border-radius: var(--radius);
  width: 380px; max-width: 90vw; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-xl);
}
.login-box h1 { text-align: center; font-size: 1.5rem; }
.login-box input {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .92rem; transition: border-color .15s, box-shadow .15s;
}
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.login-box button {
  padding: 11px; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  font-size: .95rem; transition: background .15s;
}
.login-box button:hover { background: var(--accent-hover); }
.login-box .muted { font-size: .85rem; color: var(--muted); text-align: center; }
.login-box .muted a { color: var(--accent); font-weight: 500; }

.error {
  background: #fef2f2; color: var(--danger); padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: .88rem; border: 1px solid #fecaca;
}

.flash { padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .88rem }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0 }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000 }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; min-width: 480px; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.18) }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px }
.modal-head h3 { margin: 0; font-size: 1.1rem }

/* dashboard layout — sidebar + content */
.dashboard { background: #f4f1ee; min-height: 100vh; }

.dash-layout { display: flex; min-height: 100vh; }

/* ── sidebar ──────────────────────────────────── */

.dash-sidebar {
  width: 260px; min-width: 260px;
  background: #1c181c; color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh; z-index: 60; overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0,0,0,.08);
  transition: transform .25s;
}
.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid #2d262d;
}
.sidebar-brand h2 {
  font-size: 1.15rem; font-weight: 800; color: #f0ebe4; letter-spacing: -.01em;
}
.sidebar-brand span {
  display: block; font-size: .68rem; color: #8c7e7e;
  text-transform: uppercase; letter-spacing: .06em; margin-top: 2px;
}
.sidebar-user {
  padding: 14px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #2d262d;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.sidebar-user-info { font-size: .82rem; line-height: 1.3; }
.sidebar-user-info strong { color: #f0ebe4; display: block; }
.sidebar-user-info span { color: #8c7e7e; font-size: .72rem; text-transform: capitalize; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  color: #b7aea5; font-size: .88rem; font-weight: 500;
  transition: all .15s; border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: #2d262d; color: #f0ebe4; }
.sidebar-nav a.active {
  background: #2d262d; color: var(--accent);
  border-left-color: var(--accent);
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav .nav-section {
  padding: 16px 20px 6px; font-size: .68rem; color: #5c5252;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}

.sidebar-footer {
  padding: 14px 20px; border-top: 1px solid #2d262d;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  color: #8c7e7e; font-size: .8rem; transition: color .15s;
}
.sidebar-footer a:hover { color: #f87171; }
.sidebar-footer a svg { width: 16px; height: 16px; }

/* ── main content area ─────────────────────────── */

.dash-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dash-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); gap: 12px;
}
.dash-topbar h1 { font-size: 1.15rem; font-weight: 700; }
.dash-topbar-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--fg-secondary); border-radius: 6px;
}
.menu-toggle:hover { background: var(--accent-light); }
.menu-toggle svg { width: 22px; height: 22px; }

.dash-main { flex: 1; padding: 28px; max-width: 1200px; width: 100%; }

/* ── sidebar mobile overlay ────────────────────── */

.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 55;
}
.sidebar-open .sidebar-overlay { display: block; }
.sidebar-open .dash-sidebar { transform: translateX(0); }

/* ── header antigo (deprecated, mantido pra login) ── */

.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.dash-header h1 { font-size: 1.2rem; }
.dash-header > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-header > div > span { color: var(--fg-secondary); font-size: .88rem; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; text-align: center;
}
.stat strong { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat::after { content: attr(data-label); display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* panels */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.1rem; margin-bottom: 14px; }

.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.panel-head-actions { display: flex; gap: 8px; align-items: center; }

/* panel tabs */
.panel-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.panel-tab {
  padding: 10px 20px; font-size: .85rem; font-weight: 600; color: var(--muted);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
}
.panel-tab:hover { color: var(--fg); }
.panel-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* search bar (dashboard) */
.dash-search {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.dash-search input {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .88rem; width: 260px; transition: border-color .15s, box-shadow .15s;
  background: var(--bg);
}
.dash-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.dash-search .clear-search {
  font-size: .82rem; color: var(--muted); cursor: pointer;
}
.dash-search .clear-search:hover { color: var(--danger); }

/* empty state */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: .92rem; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { font-weight: 600; color: var(--fg-secondary); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--accent-light); }
td.col-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; color: var(--muted); width: 60px; }
td.col-title { max-width: 300px; }
td.col-title a { color: var(--fg); font-weight: 600; }
td.col-title a:hover { color: var(--accent); }
td.col-views { text-align: center; width: 70px; font-variant-numeric: tabular-nums; }
td.col-date { font-size: .8rem; color: var(--muted); white-space: nowrap; }
td.col-actions { white-space: nowrap; text-align: right; }

/* table action button group */
.table-actions { display: inline-flex; gap: 4px; align-items: center; }
.table-actions .btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--fg-secondary); cursor: pointer; transition: all .15s;
}
.table-actions .btn-icon:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.table-actions .btn-icon.danger:hover { border-color: var(--danger); background: #fef2f2; color: var(--danger); }
.table-actions .btn-icon svg { width: 16px; height: 16px; }
.table-actions .btn-icon[title] { position: relative; }

/* inline status select no próprio <td> */
.status-inline { display: inline-flex; gap: 4px; align-items: center; }
.status-inline select {
  padding: 4px 8px; border: 1px solid transparent; border-radius: var(--radius-xs);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  background: transparent; transition: all .15s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238c7e7e'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center; padding-right: 16px;
}
.status-inline select:hover { border-color: var(--border); background: var(--bg); }
.status-inline select:focus { outline: none; border-color: var(--accent); }
.status-inline select.status-draft { color: #92400e; }
.status-inline select.status-published { color: #065f46; }
.status-inline select.status-archived { color: #433d3d; }

/* highlight row ao mudar status */
tr.status-changed { animation: status-flash .6s ease-out; }
@keyframes status-flash { 0% { background: var(--accent-light); } 100% { background: transparent; } }

/* badges */
.badge { padding: 3px 10px; border-radius: 12px; font-size: .73rem; font-weight: 600; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-archived { background: #e0dcd6; color: #433d3d; }

/* forms (dashboard) */
.inline-form { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.inline-form input {
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; transition: border-color .15s;
}
.inline-form input:focus { outline: none; border-color: var(--accent); }

.stacked-form { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }
.stacked-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; color: var(--fg-secondary); }
.stacked-form input, .stacked-form textarea, .stacked-form select {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 400; font-size: .92rem; font-family: inherit; color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
.stacked-form input:focus, .stacked-form textarea:focus, .stacked-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.stacked-form textarea { resize: vertical; min-height: 80px; }

.stacked-form label.check {
  flex-direction: row; align-items: center; gap: 8px; font-weight: 400;
}

/* log viewer */
.log-view {
  background: #1c181c; color: #d0c8c0; padding: 20px; border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; line-height: 1.55; max-height: 70vh; overflow: auto;
  white-space: pre-wrap; word-break: break-word;
}

/* ── responsive ────────────────────────────────── */

@media (max-width: 1024px) {
  .dash-sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%);
  }
  .menu-toggle { display: flex; }
  .dash-main { padding: 20px 16px; }
}

@media (max-width: 768px) {
  .site-header .container { flex-direction: column; gap: 10px; }
  .main-nav { flex-wrap: wrap; justify-content: center; }
  .search-form input { width: 120px; }

  .hero h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; }

  .site-footer .container { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; }

  .post h1 { font-size: 1.7rem; }

  .dash-header { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .dash-topbar { padding: 10px 14px; }
  .dash-topbar h1 { font-size: 1rem; }
  .dash-main { padding: 14px 10px; }
}
