/* ============================================================
   WEDO PROMO — PAINEL ADMINISTRADOR
   Identidade: roxo #6B0FAA → magenta #B83060 → laranja #EA5A00
   ============================================================ */
:root {
  --purple: #6B0FAA;
  --purple-mid: #8B1E7A;
  --magenta: #B83060;
  --orange-red: #E05020;
  --orange: #EA5A00;
  --orange-lt: #F07830;
  --grad: linear-gradient(135deg, #6B0FAA 0%, #B83060 50%, #EA5A00 100%);
  --grad-text: linear-gradient(90deg, #6B0FAA, #EA5A00);

  /* Dark UI surfaces */
  --bg: #0B0B0D;
  --surface: #141417;
  --surface-2: #1B1B1F;
  --surface-3: #232328;
  --border: rgba(245,245,240,0.08);
  --border-strong: rgba(245,245,240,0.14);
  --text: #F5F5F0;
  --text-2: rgba(245,245,240,0.65);
  --text-3: rgba(245,245,240,0.42);
  --text-4: rgba(245,245,240,0.28);

  --green: #22C55E;
  --yellow: #EAB308;
  --red: #EF4444;
  --blue: #3B82F6;

  --sidebar-w: 256px;
  --topbar-h: 64px;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Syne', sans-serif;
  --font-text: 'DM Sans', sans-serif;
  --radius: 12px;
}

/* Light mode */
body.light {
  --bg: #F0EEE9;
  --surface: #FFFFFF;
  --surface-2: #F7F5F1;
  --surface-3: #EDEAE4;
  --border: rgba(26,26,26,0.08);
  --border-strong: rgba(26,26,26,0.14);
  --text: #1A1A1A;
  --text-2: rgba(26,26,26,0.65);
  --text-3: rgba(26,26,26,0.45);
  --text-4: rgba(26,26,26,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

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

/* ============ LOGIN ============ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
}
.login-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 45% at 75% 15%, rgba(107,15,170,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 85%, rgba(234,90,0,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 35% 35% at 90% 90%, rgba(184,48,96,0.12) 0%, transparent 55%);
}
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 44px 40px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.login-logo { height: 54px; margin: 0 auto 28px; }
.login-card h1 {
  font-family: var(--font-display); font-size: 2.2rem;
  text-transform: uppercase; text-align: center; letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.login-card .sub {
  text-align: center; color: var(--text-3);
  font-size: 0.9rem; margin-bottom: 32px;
}
.login-error {
  display: none; background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3); color: #fca5a5;
  border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; margin-bottom: 20px;
}
.login-error.show { display: block; }
.login-hint {
  margin-top: 24px; text-align: center; font-size: 0.78rem; color: var(--text-4);
  line-height: 1.6;
}
.login-hint code {
  background: var(--surface-3); padding: 2px 7px; border-radius: 4px;
  color: var(--orange); font-size: 0.78rem;
}

/* ============ FORM FIELDS (shared) ============ */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.input, .select, .textarea {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 13px 16px;
  color: var(--text); font-family: var(--font-text); font-size: 0.92rem;
  outline: none; transition: border-color 0.25s, background 0.25s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--purple); background: rgba(107,15,170,0.05);
}
.select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23EA5A00' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.select option { background: var(--surface-2); color: var(--text); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; padding: 13px 22px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.04em; transition: all 0.25s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(107,15,170,0.3); }
.btn-full { width: 100%; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn-danger { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ============ APP SHELL ============ */
.admin-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
  transition: transform 0.3s;
}
.sidebar-head {
  height: var(--topbar-h); display: flex; align-items: center;
  padding: 0 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-head img { height: 34px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-group-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-4);
  padding: 16px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px;
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s; margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: rgba(107,15,170,0.12); color: var(--text); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--grad); border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto; background: var(--grad); color: #fff;
  font-size: 0.66rem; font-weight: 700; padding: 2px 7px; border-radius: 100px;
}
.nav-badge.soon {
  background: var(--surface-3); color: var(--text-3);
}
.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 8px; transition: background 0.2s;
}
.user-chip:hover { background: var(--surface-2); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0;
}
.user-meta { overflow: hidden; }
.user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.72rem; color: var(--text-3); }

/* Main area */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all 0.2s; position: relative;
}
.icon-btn:hover { color: var(--text); border-color: var(--purple); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px;
  background: var(--orange); border-radius: 50%; border: 2px solid var(--surface);
}
.hamburger-btn { display: none; }

.content { padding: 28px; flex: 1; }

/* Page header */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display); font-size: 2.4rem;
  text-transform: uppercase; line-height: 1; letter-spacing: -0.01em;
}
.page-head .desc { color: var(--text-3); font-size: 0.9rem; margin-top: 4px; }

/* ============ DASHBOARD ============ */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s;
}
.stat-card:hover::after { opacity: 1; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(107,15,170,0.12); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; color: var(--purple);
}
.stat-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.stat-icon.orange { background: rgba(234,90,0,0.12); color: var(--orange); }
.stat-icon.magenta { background: rgba(184,48,96,0.12); color: var(--magenta); }
.stat-icon.green { background: rgba(34,197,94,0.12); color: var(--green); }
.stat-value { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; }
.stat-label { color: var(--text-3); font-size: 0.85rem; margin-top: 6px; }
.stat-trend { font-size: 0.78rem; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; }
.panel-head a { font-size: 0.8rem; color: var(--orange); }
.panel-body { padding: 22px; }

/* Activity feed */
.activity-item {
  display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-dot {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--purple);
}
.activity-dot svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.activity-text { font-size: 0.88rem; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 0.76rem; color: var(--text-4); margin-top: 2px; }

/* Bar chart (CSS) */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%; background: var(--grad); border-radius: 6px 6px 0 0; min-height: 4px;
  transition: opacity 0.2s; position: relative;
}
.chart-bar:hover { opacity: 0.8; }
.chart-label { font-size: 0.72rem; color: var(--text-4); }

/* ============ TABLES ============ */
.toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.search-box {
  flex: 1; min-width: 200px; max-width: 360px; position: relative;
}
.search-box svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--text-4); fill: none; stroke-width: 2;
}
.search-box input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px 11px 42px; color: var(--text);
  font-family: var(--font-text); font-size: 0.88rem; outline: none;
}
.search-box input:focus { border-color: var(--purple); }

.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 14px 20px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 15px 20px; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--surface-2); }
.cell-title { font-weight: 600; }
.cell-sub { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.row-actions { display: flex; gap: 6px; }
.row-btn {
  width: 32px; height: 32px; border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all 0.2s;
}
.row-btn:hover { color: var(--text); border-color: var(--purple); }
.row-btn.del:hover { color: var(--red); border-color: var(--red); }
.row-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Badges / status */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: 100px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.published { background: rgba(34,197,94,0.12); color: var(--green); }
.badge.draft { background: rgba(234,179,8,0.12); color: var(--yellow); }
.badge.scheduled { background: rgba(59,130,246,0.12); color: var(--blue); }
.badge.admin { background: rgba(107,15,170,0.14); color: #c084fc; }
.badge.editor { background: rgba(234,90,0,0.12); color: var(--orange); }
.badge.author { background: rgba(184,48,96,0.12); color: #f0abc0; }

/* Permissions matrix */
.perm-table td { text-align: center; }
.perm-table td:first-child { text-align: left; font-weight: 600; }
.perm-check { color: var(--green); }
.perm-x { color: var(--text-4); }
.perm-check svg, .perm-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; margin: 0 auto; }

/* ============ MEDIA LIBRARY ============ */
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px;
}
.media-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; cursor: pointer; transition: all 0.2s;
}
.media-item:hover { border-color: var(--purple); transform: translateY(-2px); }
.media-thumb {
  aspect-ratio: 1; background: var(--surface-3); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .ph { color: var(--text-4); }
.media-thumb .ph svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.media-info { padding: 10px 12px; }
.media-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-size { font-size: 0.72rem; color: var(--text-4); margin-top: 2px; }
.media-upload {
  border: 2px dashed var(--border-strong); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; aspect-ratio: 1; color: var(--text-3); transition: all 0.25s; cursor: pointer;
  text-align: center; padding: 16px;
}
.media-upload:hover { border-color: var(--purple); color: var(--purple); background: rgba(107,15,170,0.04); }
.media-upload svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.media-upload span { font-size: 0.8rem; font-weight: 600; }

/* ============ EDITOR (blog post) ============ */
.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.editor-main .input.title-input { font-size: 1.4rem; font-weight: 700; padding: 16px 18px; }
.editor-toolbar {
  display: flex; gap: 4px; padding: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; flex-wrap: wrap;
}
.editor-toolbar button {
  width: 34px; height: 34px; border-radius: 6px; background: transparent;
  border: none; color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-weight: 700;
}
.editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.editor-toolbar button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.editor-content {
  min-height: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 0 0 8px 8px; padding: 20px; color: var(--text);
  font-size: 0.95rem; line-height: 1.7; outline: none;
}
.editor-content:focus { border-color: var(--purple); }
.editor-content:empty::before { content: attr(data-ph); color: var(--text-4); }
.editor-side .panel { margin-bottom: 16px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 200px 1fr; gap: 28px; }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; }
.settings-tab {
  padding: 11px 16px; border-radius: 8px; color: var(--text-2);
  font-size: 0.9rem; font-weight: 500; transition: all 0.2s; cursor: pointer;
}
.settings-tab:hover { background: var(--surface-2); color: var(--text); }
.settings-tab.active { background: rgba(107,15,170,0.12); color: var(--text); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.switch-slider {
  position: absolute; inset: 0; background: var(--surface-3);
  border-radius: 100px; transition: 0.3s; cursor: pointer;
}
.switch-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s;
}
.switch input:checked + .switch-slider { background: var(--grad); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-info h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 3px; }
.setting-info p { font-size: 0.82rem; color: var(--text-3); }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--text-3);
}
.empty-state svg { width: 56px; height: 56px; stroke: var(--text-4); fill: none; stroke-width: 1.5; margin: 0 auto 18px; }
.empty-state h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; max-width: 360px; margin: 0 auto 20px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; width: 100%; max-width: 480px; overflow: hidden;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head { padding: 22px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text-3); font-size: 1.4rem; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--green);
  border-radius: 10px; padding: 14px 20px; font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  transform: translateX(140%); transition: transform 0.4s cubic-bezier(0.2,0,0.2,1);
  display: flex; align-items: center; gap: 10px; max-width: 340px;
}
.toast.show { transform: translateX(0); }
.toast svg { width: 18px; height: 18px; stroke: var(--green); fill: none; stroke-width: 2; flex-shrink: 0; }

/* Helper layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.text-muted { color: var(--text-3); }

/* Mobile */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99;
}
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .main { margin-left: 0; }
  .hamburger-btn { display: flex; }
  .content { padding: 18px; }
  .stat-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 2rem; }
  .topbar { padding: 0 16px; }
}

/* ============================================================
   NEW COMPONENTS (v2)
   ============================================================ */

/* Solid danger button */
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #dc2626; transform: translateY(-1px); }

/* Confirm modal icon */
.confirm-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(107,15,170,0.12);
}
.confirm-icon.danger { background: rgba(239,68,68,0.12); }
.confirm-icon svg { width: 30px; height: 30px; stroke: var(--purple); fill: none; stroke-width: 2; }
.confirm-icon.danger svg { stroke: var(--red); }

/* Notification badge on bell */
.notif-count {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px;
  padding: 0 4px; background: var(--grad); color: #fff;
  font-size: 0.62rem; font-weight: 700; border-radius: 100px;
  display: none; align-items: center; justify-content: center;
  border: 2px solid var(--surface); line-height: 1;
}

/* Notifications dropdown panel */
.notif-panel {
  position: fixed; top: calc(var(--topbar-h) + 6px); right: 28px; z-index: 1500;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  overflow: hidden; animation: notifIn 0.22s ease;
}
@keyframes notifIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.notif-head h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; }
.notif-readall { background: none; border: none; color: var(--orange); font-size: 0.76rem; font-weight: 600; }
.notif-readall:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); position: relative; transition: background 0.2s;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(107,15,170,0.05); }
.notif-item.unread::before {
  content: ''; position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--grad);
}
.notif-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(107,15,170,0.12); color: var(--purple);
}
.notif-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.notif-icon.user { background: rgba(34,197,94,0.12); color: var(--green); }
.notif-icon.post { background: rgba(234,90,0,0.12); color: var(--orange); }
.notif-icon.media { background: rgba(184,48,96,0.12); color: var(--magenta); }
.notif-icon.system { background: rgba(59,130,246,0.12); color: var(--blue); }
.notif-title { font-size: 0.86rem; font-weight: 600; }
.notif-text { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.notif-time { font-size: 0.72rem; color: var(--text-4); margin-top: 4px; }
.notif-foot { padding: 12px 18px; text-align: center; border-top: 1px solid var(--border); }
.notif-foot a { font-size: 0.84rem; color: var(--orange); font-weight: 600; }

/* Progress bars */
.progress-track {
  width: 100%; height: 8px; background: var(--surface-3);
  border-radius: 100px; overflow: hidden;
}
.progress-track.sm { height: 5px; }
.progress-fill {
  height: 100%; background: var(--grad); border-radius: 100px;
  transition: width 0.15s ease; width: 0%;
}

/* Upload modal rows */
.upload-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.upload-row:last-of-type { border-bottom: none; }
.upload-row-icon {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: all 0.3s;
}
.upload-row.complete .upload-row-icon { background: rgba(34,197,94,0.12); color: var(--green); }
.upload-row-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.upload-row-info { flex: 1; min-width: 0; }
.upload-row-name {
  font-size: 0.84rem; font-weight: 500; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-row-status {
  font-size: 0.78rem; color: var(--text-3); min-width: 38px; text-align: right;
  display: flex; align-items: center; justify-content: flex-end;
}
.upload-overall {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
}
.upload-overall-label {
  display: flex; justify-content: space-between; font-size: 0.82rem;
  color: var(--text-2); margin-bottom: 8px; font-weight: 500;
}

/* Logs table */
.log-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 100px;
}
.log-action.login { background: rgba(59,130,246,0.12); color: var(--blue); }
.log-action.create { background: rgba(34,197,94,0.12); color: var(--green); }
.log-action.update { background: rgba(234,179,8,0.12); color: var(--yellow); }
.log-action.delete { background: rgba(239,68,68,0.12); color: var(--red); }
.log-action.upload { background: rgba(184,48,96,0.12); color: var(--magenta); }
.log-action.settings { background: rgba(107,15,170,0.14); color: #c084fc; }

/* Roles / permission editor */
.role-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
}
.role-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.role-card-title { display: flex; align-items: center; gap: 12px; }
.role-card-title h4 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; }
.perm-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.perm-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.82rem; cursor: pointer; transition: all 0.2s; user-select: none;
}
.perm-toggle:hover { border-color: var(--border-strong); }
.perm-toggle.on { background: rgba(107,15,170,0.1); border-color: rgba(107,15,170,0.3); color: var(--text); }
.perm-toggle .pc {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.perm-toggle.on .pc { background: var(--grad); border-color: transparent; }
.perm-toggle .pc svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }
.perm-toggle.on .pc svg { opacity: 1; }

@media (max-width: 768px) {
  .perm-checks { grid-template-columns: 1fr 1fr; }
  .notif-panel { right: 12px; left: 12px; width: auto; }
}

/* Media selection checkmark */
.media-sel-check {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(0,0,0,0.5); border: 1.5px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: bold;
}
.media-sel-check.on { background: var(--grad); border-color: transparent; }
