/* ============================================================
   DS INTELLIGENCE — Design System
   Fonts: Bricolage Grotesque (display) + Onest (body) + JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Onest:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:       #08080d;
  --bg-1:     #0e0e18;
  --bg-2:     #14141f;
  --bg-3:     #1a1a28;
  --bg-4:     #22223300;

  --border:   #1e1e2e;
  --border-2: #2a2a3d;
  --border-3: #38385a;

  --text:     #eeeef5;
  --text-2:   #9292aa;
  --text-3:   #55556a;

  --accent:       #7c84f0;
  --accent-2:     #a5abff;
  --accent-dim:   rgba(124,132,240,0.10);
  --accent-glow:  rgba(124,132,240,0.22);
  --accent-ring:  rgba(124,132,240,0.35);

  --green:    #34d399;
  --yellow:   #fbbf24;
  --red:      #f87171;
  --orange:   #fb923c;
  --pink:     #f472b6;
  --purple:   #c084fc;
  --blue:     #60a5fa;
  --teal:     #2dd4bf;

  --cat-instagram: #e879f9;
  --cat-ia:        #60a5fa;
  --cat-design:    #34d399;
  --cat-marketing: #fbbf24;
  --cat-reels:     #f87171;
  --cat-whatsapp:  #4ade80;
  --cat-facebook:  #818cf8;
  --cat-tiktok:    #f472b6;
  --cat-ferramentas: #a78bfa;
  --cat-tendencias:  #fb923c;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Onest', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --sidebar-w: 240px;
  --header-h:  64px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Background mesh ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(124,132,240,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 80% 100%, rgba(192,132,252,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  grid-column: 1 / -1;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,13,0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: calc(var(--sidebar-w) - 24px);
}
.logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: -0.5px;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.logo-text span { color: var(--accent); }

.header-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 0 36px 0 36px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.header-search input:focus {
  border-color: var(--border-3);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.header-search input::placeholder { color: var(--text-3); }
.search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search-shortcut {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}
.btn-refresh:hover { background: rgba(124,132,240,0.18); }
.btn-refresh.loading .refresh-icon { animation: spin .8s linear infinite; }

.header-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(0.8); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky;
  top: var(--header-h);
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-section {
  margin-bottom: 24px;
}
.sidebar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  position: relative;
  user-select: none;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-2);
}
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 6px;
  color: var(--text-2);
  min-width: 20px;
  text-align: center;
}
.nav-item.active .nav-badge { background: var(--accent-dim); border-color: var(--accent-ring); color: var(--accent-2); }

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 8px 16px; }

/* ── Main Content ────────────────────────────────────────── */
.main {
  min-height: calc(100dvh - var(--header-h));
  overflow-x: hidden;
}

/* ── Dashboard Hero ──────────────────────────────────────── */
.hero {
  padding: 32px 28px 24px;
  border-bottom: 1px solid var(--border);
}
.hero-greeting {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.hero-sub {
  font-size: 13.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}

.stats-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.stat-chip:hover { border-color: var(--border-3); color: var(--text); }
.stat-chip strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Category Tabs ──────────────────────────────────────── */
.category-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-h);
  background: rgba(8,8,13,0.92);
  backdrop-filter: blur(20px);
  z-index: 50;
}
.category-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.tab:hover { background: var(--bg-2); color: var(--text); }
.tab.active { background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent-ring); }
.tab .tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: .7;
}

/* ── Content Area ────────────────────────────────────────── */
.content {
  padding: 24px 28px;
}

/* ── Section Header ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-more {
  font-size: 12px;
  color: var(--text-3);
  transition: color .15s;
  cursor: pointer;
}
.section-more:hover { color: var(--accent); }

/* ── News Grid ───────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

/* ── News Card ───────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  animation: card-in .35s ease-out forwards;
}
.card:hover {
  border-color: var(--border-3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border-2);
}
.card.read { opacity: .55; }
.card.read:hover { opacity: 1; }

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
  flex-shrink: 0;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-image img { transform: scale(1.03); }
.card-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  opacity: .25;
}

.card-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.badge {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  backdrop-filter: blur(12px);
}
.badge-low    { background: rgba(52,211,153,0.2); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.badge-medium { background: rgba(251,191,36,0.2); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.badge-high   { background: rgba(248,113,113,0.2); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.badge-urgent { background: rgba(251,146,60,0.25); color: #fb923c; border: 1px solid rgba(251,146,60,0.4);
                animation: badge-pulse 1.5s ease-in-out infinite; }
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,146,60,0.3); }
  50% { box-shadow: 0 0 0 4px rgba(251,146,60,0); }
}

.card-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-category {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  opacity: .9;
}
.card-category .cat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-left: auto;
}

.card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.15px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-summary {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-ai {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  display: none;
}
.card-ai.visible { display: block; }
.card-ai-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.card-ai-content { color: var(--text-2); }

.card-source {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-source img {
  width: 12px; height: 12px;
  border-radius: 2px;
}

.card-footer {
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all .15s;
}
.card-btn-primary {
  background: var(--accent-dim);
  border: 1px solid var(--accent-ring);
  color: var(--accent-2);
  flex: 1;
  justify-content: center;
}
.card-btn-primary:hover { background: rgba(124,132,240,0.18); }
.card-btn-icon {
  width: 28px; height: 28px;
  padding: 0;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius-sm);
}
.card-btn-icon:hover { border-color: var(--border-3); color: var(--text); background: var(--bg-3); }
.card-btn-icon.active { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }

/* ── AI Summary Expand ───────────────────────────────────── */
.card-expand-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
}
.card-expand-btn:hover { opacity: .75; }
.card-expand-btn svg { transition: transform .2s; }
.card-expand-btn.open svg { transform: rotate(180deg); }

/* ── Tools Card (special layout) ──────────────────────────── */
.tool-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  transition: all .2s;
  opacity: 0;
  animation: card-in .35s ease-out forwards;
}
.tool-card:hover { border-color: var(--border-3); box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.tool-body { flex: 1; min-width: 0; }
.tool-name { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.tool-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.45; margin-bottom: 8px; }
.tool-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tool-tag {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  color: var(--text-3);
}
.tool-tag.price { color: var(--green); border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.06); }
.tool-tag.free { color: var(--green); }

/* ── Trends Grid ─────────────────────────────────────────── */
.trend-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all .2s;
  opacity: 0;
  animation: card-in .35s ease-out forwards;
}
.trend-card:hover { border-color: var(--border-3); }
.trend-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  min-width: 20px;
  line-height: 1;
  padding-top: 2px;
}
.trend-body { flex: 1; }
.trend-title { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.trend-sub { font-size: 12px; color: var(--text-2); }
.trend-arrow {
  color: var(--text-3);
  margin-left: auto;
  padding-top: 2px;
}

/* ── Search Results Overlay ──────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,8,13,0.8);
  backdrop-filter: blur(8px);
}
.search-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 20px;
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
}
.search-results { max-height: 400px; overflow-y: auto; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border: none; }
.search-result-item:hover { background: var(--bg-2); }
.search-result-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-title { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 11px; color: var(--text-3); }
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
}

/* ── Filters Bar ──────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 6px;
  padding: 0 28px 16px;
  align-items: center;
}
.filter-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  border: 1px solid var(--border);
  transition: all .15s;
  background: none;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-2); }
.filter-btn.active { color: var(--text); background: var(--bg-2); border-color: var(--border-3); }
.filter-sep { flex: 1; }

/* ── Admin Panel ─────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100dvh;
}
.admin-sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky;
  top: var(--header-h);
  height: calc(100dvh - var(--header-h));
}
.admin-main { padding: 28px; }
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.admin-form-group { margin-bottom: 14px; }
.admin-label { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; display: block; }
.admin-input {
  width: 100%;
  height: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
  outline: none;
  transition: border-color .15s;
}
.admin-input:focus { border-color: var(--accent); }
.admin-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  transition: border-color .15s;
}
.admin-textarea:focus { border-color: var(--accent); }
.admin-select {
  width: 100%;
  height: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
  outline: none;
}
.btn-primary {
  height: 36px;
  padding: 0 16px;
  background: var(--accent);
  border-radius: var(--radius);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity .15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: .85; }
.btn-danger {
  height: 36px;
  padding: 0 16px;
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
}
.btn-danger:hover { background: rgba(248,113,113,0.25); }

.news-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-admin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-admin-title { flex: 1; font-size: 13px; font-weight: 500; }
.news-admin-cat { font-size: 11px; color: var(--text-3); }
.news-admin-actions { display: flex; gap: 6px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.admin-table tr:last-child td { border: none; }

/* ── Loading Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.card-skeleton {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.card-skeleton-img { aspect-ratio: 16/9; }
.card-skeleton-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-skeleton-tag { height: 14px; width: 80px; }
.card-skeleton-title { height: 16px; width: 90%; }
.card-skeleton-title-2 { height: 16px; width: 70%; }
.card-skeleton-text { height: 12px; width: 100%; }
.card-skeleton-text-2 { height: 12px; width: 85%; }
.card-skeleton-text-3 { height: 12px; width: 60%; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty-state-sub { font-size: 13px; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: toast-in .25s ease-out;
  pointer-events: auto;
}
.toast.success { border-color: rgba(52,211,153,0.3); }
.toast.error   { border-color: rgba(248,113,113,0.3); }
@keyframes toast-in { from { opacity:0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity:0; transform: translateY(8px); } }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .layout { grid-template-columns: 1fr; }

  /* Sidebar: fixed overlay no mobile */
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 200;
    transition: left .25s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .sidebar.mobile-open { left: 0; }

  /* Sidebar overlay visible on mobile */
  #sidebarOverlay { display: block !important; }
  #sidebarOverlay:not(.active) { pointer-events: none; opacity: 0; }
  #sidebarOverlay.active { pointer-events: all; opacity: 1; }

  /* Show mobile menu button */
  .btn-mobile-menu { display: flex !important; }

  .hero { padding: 20px 16px 16px; }
  .category-tabs { padding: 12px 16px; overflow-x: auto; }
  .filters-bar { padding: 0 16px 12px; overflow-x: auto; }
  .content { padding: 16px; }
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-greeting { font-size: 20px; }
  .stats-row { gap: 6px; overflow-x: auto; flex-wrap: nowrap; }
  .stat-chip { font-size: 11px; white-space: nowrap; }
  .header-search { display: none; }
  /* Show search button as icon instead */
  .header-actions { gap: 6px; }
}
@media (max-width: 400px) {
  .card-footer { flex-wrap: wrap; }
  .header { padding: 0 12px; }
}

/* ── Utility classes ────────────────────────────────────────── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-2); }
.fw-700 { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Stagger delays for card animations ────────────────────── */
.card:nth-child(1)  { animation-delay: .03s; }
.card:nth-child(2)  { animation-delay: .06s; }
.card:nth-child(3)  { animation-delay: .09s; }
.card:nth-child(4)  { animation-delay: .12s; }
.card:nth-child(5)  { animation-delay: .15s; }
.card:nth-child(6)  { animation-delay: .18s; }
.card:nth-child(7)  { animation-delay: .21s; }
.card:nth-child(8)  { animation-delay: .24s; }
.card:nth-child(9)  { animation-delay: .27s; }
.card:nth-child(10) { animation-delay: .30s; }
.card:nth-child(11) { animation-delay: .33s; }
.card:nth-child(12) { animation-delay: .36s; }
