/* =====================================================
   ADMIN PORTAL — Instagram Post Maker
   Bawar Salah Saeed | IR Website

/* ─── Auth Screen ─── */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07090f;
  padding: 1rem;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 70%, rgba(74,158,142,0.04) 0%, transparent 55%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 2;
  background: #0d1117;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 20px;
  padding: 2.8rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.06);
  animation: authIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes authIn {
  from { opacity:0; transform: scale(0.88) translateY(20px); }
  to   { opacity:1; transform: none; }
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #c9a84c, #7a5a1e);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(201,168,76,0.25);
}

.auth-logo-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #e2e8f0;
}
.auth-logo-name span { color: #c9a84c; }
.auth-logo-sub { font-size: 0.75rem; color: #718096; margin-top: 0.15rem; }

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.auth-desc {
  font-size: 0.86rem;
  color: #718096;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}

.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.auth-input-icon {
  position: absolute;
  left: 1rem;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.5;
}

.auth-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.85rem 3rem 0.85rem 2.8rem;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  letter-spacing: 0.1em;
  transition: border-color 0.25s;
}
.auth-input-wrap input:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.07);
}

.auth-eye-btn {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 0.2rem;
}
.auth-eye-btn:hover { opacity: 0.9; }

.auth-error {
  display: none;
  font-size: 0.82rem;
  color: #fc8181;
  margin-bottom: 0.8rem;
  padding: 0.5rem 0.8rem;
  background: rgba(229,62,62,0.1);
  border-radius: 6px;
  border: 1px solid rgba(229,62,62,0.2);
}
.auth-error.show { display: block; animation: shake 0.35s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-6px); }
  40%, 80%  { transform: translateX(6px); }
}

.auth-submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  border: none;
  border-radius: 10px;
  color: #07090f;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}
.auth-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,168,76,0.42); }
.auth-submit-btn:active { transform: translateY(0); }

.auth-hint {
  font-size: 0.75rem;
  color: #4a5568;
  margin-top: 1.3rem;
  text-align: center;
}
.auth-hint code { background: rgba(255,255,255,0.06); padding: 0.1rem 0.4rem; border-radius: 4px; color: #718096; }

/* ─── Auth screen hidden state ─── */
#auth-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

   Dark Dashboard Theme
   ===================================================== */

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

/* ─── Variables ─── */
:root {
  --bg:          #07090f;
  --bg-2:        #0d1117;
  --bg-3:        #111827;
  --card:        #161d2c;
  --card-2:      #1c2535;
  --border:      rgba(255,255,255,0.07);
  --border-gold: rgba(201,168,76,0.3);
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --teal:        #4a9e8e;
  --text:        #e2e8f0;
  --muted:       #718096;
  --dim:         #4a5568;
  --danger:      #e53e3e;
  --success:     #38a169;
  --radius:      10px;
  --radius-lg:   16px;
  --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
  --shadow:      0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.5);

  /* Post palette */
  --post-blue:    #0f2044;
  --post-teal:    #0a2a26;
  --post-maroon:  #2a0f14;
  --post-purple:  #1a0f2e;
  --post-slate:   #0f1a2e;
  --post-olive:   #1a2210;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ─── Layout ─── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ─── Topbar ─── */
.admin-topbar {
  grid-column: 1 / -1;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold), #8a6a1e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.brand-name span { color: var(--gold); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: rgba(56,161,105,0.12);
  border: 1px solid rgba(56,161,105,0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  color: #68d391;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #68d391;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(104,211,145,0.6); }
  50%       { box-shadow: 0 0 0 5px rgba(104,211,145,0); }
}

.topbar-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.topbar-api-btn {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}
.topbar-api-btn:hover { background: rgba(201,168,76,0.18); }

/* ─── Sidebar ─── */
.admin-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0 1.2rem;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}
.sidebar-section-label:first-child { margin-top: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.07);
  border-left-color: var(--gold);
}
.sidebar-link .icon { font-size: 1rem; }

.sidebar-divider {
  margin: 0.75rem 1.2rem;
  border: none;
  border-top: 1px solid var(--border);
}

/* ─── Main Content ─── */
.admin-main {
  padding: 2rem;
  overflow-y: auto;
}

/* ─── Page Header ─── */
.page-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-hdr-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.page-hdr-text p { font-size: 0.85rem; color: var(--muted); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #a87c2a);
  color: #0a0a0a;
  box-shadow: 0 3px 12px rgba(201,168,76,0.25);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,76,0.35); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.05); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); }

.btn-danger {
  background: rgba(229,62,62,0.12);
  border: 1px solid rgba(229,62,62,0.3);
  color: #fc8181;
}
.btn-danger:hover { background: rgba(229,62,62,0.2); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Stats Row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.gold { background: rgba(201,168,76,0.12); }
.stat-icon.teal { background: rgba(74,158,142,0.12); }
.stat-icon.blue { background: rgba(66,153,225,0.12); }
.stat-icon.green { background: rgba(56,161,105,0.12); }

.stat-info {}
.stat-val { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-lbl { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

/* ─── Main Grid ─── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  align-items: start;
}

/* ─── Card ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body { padding: 1.5rem; }

/* ─── News Feed ─── */
.news-loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.news-loading .dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.8rem;
}
.news-loading .dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: dotBounce 1.4s infinite both;
}
.news-loading .dots span:nth-child(2) { animation-delay: 0.16s; }
.news-loading .dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40%           { transform: scale(1.2); opacity: 1; }
}

.news-list { display: flex; flex-direction: column; gap: 0.6rem; }

.news-item {
  display: flex;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
  transition: all var(--transition);
  align-items: flex-start;
}
.news-item:hover {
  border-color: var(--border-gold);
  background: rgba(201,168,76,0.04);
  transform: translateX(3px);
}
.news-item.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.news-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 20px;
  margin-top: 2px;
}

.news-content {}
.news-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}
.news-meta {
  display: flex;
  gap: 0.7rem;
  font-size: 0.73rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.news-cat-tag {
  padding: 0.15rem 0.5rem;
  background: rgba(201,168,76,0.1);
  border-radius: 3px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-generate-btn {
  margin-left: auto;
  padding: 0.3rem 0.7rem;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold);
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}
.news-generate-btn:hover { background: rgba(201,168,76,0.2); }

/* ─── Post Preview Panel ─── */
.post-panel { position: sticky; top: 80px; }

.canvas-wrap {
  position: relative;
  background: #0a0a0a;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#post-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius);
}

.canvas-placeholder {
  text-align: center;
  color: var(--dim);
  padding: 2rem;
}
.canvas-placeholder .big-icon { font-size: 3rem; margin-bottom: 1rem; }
.canvas-placeholder p { font-size: 0.85rem; line-height: 1.6; }

/* ─── Color Palette Selector ─── */
.palette-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.palette-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.palette-swatch:hover, .palette-swatch.active {
  transform: scale(1.15);
  border-color: white;
}

/* ─── Caption Box ─── */
.caption-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 120px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
}

.caption-box.empty { color: var(--dim); font-style: italic; }

/* ─ Live typing cursor animation ─ */
.caption-box.typing {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.08), inset 0 0 12px rgba(201,168,76,0.04);
  animation: captionPulse 1.8s ease-in-out infinite;
}

.caption-box.typing::after {
  content: '|';
  display: inline-block;
  color: var(--gold);
  margin-left: 2px;
  animation: blinkCursor 0.75s step-end infinite;
  font-weight: 300;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes captionPulse {
  0%, 100% { border-color: rgba(201,168,76,0.4); }
  50% { border-color: rgba(201,168,76,0.65); }
}

/* ─ Logo image in auth/topbar ─ */
.auth-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(201,168,76,0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.topbar-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  object-fit: cover;
  flex-shrink: 0;
}

/* ─── Action Buttons Row ─── */
.post-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

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

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  animation: modalIn 0.3s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.modal p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.form-group input, .form-group select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); }

.modal-footer { display: flex; gap: 0.7rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.7rem 1.1rem;
  font-size: 0.83rem;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease both;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.toast.success { border-color: rgba(56,161,105,0.4); }
.toast.error   { border-color: rgba(229,62,62,0.4); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* ─── History Tab ─── */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}

.history-thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  aspect-ratio: 1;
  background: #0a0a0a;
  position: relative;
}
.history-thumb:hover { border-color: var(--gold); transform: scale(1.03); }
.history-thumb canvas { width: 100%; height: 100%; display: block; }
.history-thumb .thumb-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0.3rem 0.5rem;
  text-align: center;
}

.empty-history {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ─── Tab Nav ─── */
.tab-nav {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  background: var(--bg-2);
}

.tab-btn {
  padding: 0.8rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Style Button Row ─── */
.style-btn-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.style-btn {
  padding: 0.38rem 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.style-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}
.style-btn.active {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}

/* ─── Responsive ─── */

@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .main-grid { grid-template-columns: 1fr; }
  .post-panel { position: static; }
}

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-topbar { padding: 0 1rem; }
  .admin-main { padding: 1rem; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
}
