/* ============================================================
   COLLEGE DE BETHEL — ADMIN PANEL CSS
   Professional dark sidebar + clean content layout
   ============================================================ */

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

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --sidebar-bg:       #0c1220;
  --sidebar-border:   rgba(255,255,255,0.06);
  --sidebar-text:     #8899b0;
  --sidebar-hover:    rgba(255,255,255,0.06);
  --sidebar-active-bg:rgba(249,115,22,0.12);
  --sidebar-active:   #f97316;
  --sidebar-width:    260px;

  --orange:           #f97316;
  --orange-dark:      #ea6c0a;
  --blue:             #2b4c96;

  --bg:               #f0f4f8;
  --card:             #ffffff;
  --border:           #e4eaf1;
  --text:             #0f172a;
  --text-muted:       #64748b;
  --text-light:       #94a3b8;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.12);

  --radius:     12px;
  --radius-sm:  8px;
  --transition: 0.2s ease;
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Layout Shell ───────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
  border-right: 1px solid var(--sidebar-border);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Sidebar Logo */
.sb-logo {
  padding: 24px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sb-logo img {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover; border: 2px solid rgba(249,115,22,0.4);
}
.sb-logo-text .name {
  color: #fff; font-weight: 700; font-size: 0.88rem; line-height: 1.2;
}
.sb-logo-text .sub {
  color: var(--orange); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
}

/* Sidebar Menu */
.sb-menu { padding: 16px 12px; flex: 1; }
.sb-section-label {
  color: rgba(255,255,255,0.25); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px 8px; margin-top: 8px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition); cursor: pointer; margin-bottom: 2px;
  position: relative;
}
.sb-item i { width: 18px; text-align: center; font-size: 0.95rem; }
.sb-item:hover { background: var(--sidebar-hover); color: #fff; }
.sb-item.active {
  background: var(--sidebar-active-bg);
  color: var(--orange);
}
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--orange); border-radius: 0 2px 2px 0;
}
.sb-badge {
  margin-left: auto; background: var(--orange); color: #fff;
  font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

/* Sidebar Footer */
.sb-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--sidebar-border);
}
.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.sb-user-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  overflow: hidden;
}
.sb-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-user-name { color: #fff; font-size: 0.82rem; font-weight: 600; }
.sb-user-role {
  color: var(--orange); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.sb-user-logout {
  margin-left: auto; color: rgba(255,255,255,0.3);
  font-size: 0.85rem; cursor: pointer; transition: color var(--transition);
}
.sb-user-logout:hover { color: #ef4444; }

/* ── MAIN AREA ──────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Bar */
.topbar {
  height: 64px; background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.1rem; padding: 6px;
}
.topbar-breadcrumb {
  flex: 1; display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 0.82rem;
}
.topbar-breadcrumb .sep { color: var(--border); }
.topbar-breadcrumb .current { color: var(--text); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); font-size: 0.9rem;
  transition: all var(--transition);
}
.topbar-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.topbar-user {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.topbar-user:hover { border-color: var(--orange); }
.topbar-user-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.75rem; overflow: hidden;
}
.topbar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-username { font-size: 0.82rem; font-weight: 600; }
.topbar-role { font-size: 0.7rem; color: var(--orange); font-weight: 600; text-transform: uppercase; }

/* Content Area */
.admin-content { padding: 28px; flex: 1; }

/* Page Header */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-header h1 {
  font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 2px;
}
.page-header p { color: var(--text-muted); font-size: 0.85rem; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.card-header h3 { font-size: 0.95rem; font-weight: 700; }
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── STAT CARDS ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 28px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  position: relative; overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--stat-color, var(--orange));
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; flex-shrink: 0;
  background: var(--stat-color, var(--orange));
}
.stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 3px; }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 12px 16px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(249,115,22,0.02); }
.td-title { font-weight: 600; color: var(--text); max-width: 280px; }
.td-title small { display: block; color: var(--text-muted); font-weight: 400; font-size: 0.78rem; margin-top: 2px; }
.td-img {
  width: 52px; height: 36px; border-radius: 6px;
  object-fit: cover; border: 1px solid var(--border);
  background: var(--bg);
}
.td-img-placeholder {
  width: 52px; height: 36px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 0.9rem;
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 700;
}
.badge-published { background: #dcfce7; color: #16a34a; }
.badge-draft     { background: #fef3c7; color: #d97706; }
.badge-admin     { background: rgba(249,115,22,0.12); color: var(--orange); }
.badge-editor    { background: rgba(43,76,150,0.12); color: var(--blue); }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger  { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-success { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }
.btn-success:hover { background: #16a34a; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); justify-content: center; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
label .required { color: #ef4444; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg);
  color: var(--text); font-size: 0.88rem; transition: all var(--transition);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--orange);
  background: var(--card); box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); }
.form-error { font-size: 0.75rem; color: #dc2626; }

/* Post Editor Layout */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.editor-sidebar { display: flex; flex-direction: column; gap: 18px; }
.editor-main { display: flex; flex-direction: column; gap: 18px; }

/* Title Input */
.post-title-input {
  width: 100%; padding: 14px 18px;
  font-size: 1.4rem; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: var(--text);
  transition: all var(--transition);
}
.post-title-input:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
}

/* Image Upload */
.img-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--bg);
}
.img-drop-zone:hover, .img-drop-zone.dragover {
  border-color: var(--orange); background: rgba(249,115,22,0.04);
}
.img-drop-zone i { font-size: 2rem; color: var(--text-light); margin-bottom: 8px; }
.img-drop-zone p { color: var(--text-muted); font-size: 0.82rem; }
.img-preview-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.img-preview-wrap img { width: 100%; height: 160px; object-fit: cover; display: block; }
.img-remove {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: background var(--transition);
}
.img-remove:hover { background: #dc2626; }

/* ── SEARCH + FILTERS ───────────────────────────────────── */
.table-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-box {
  position: relative; flex: 1; min-width: 200px;
}
.search-box i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.85rem;
}
.search-box input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); font-size: 0.85rem;
  transition: border-color var(--transition);
}
.search-box input:focus { outline: none; border-color: var(--orange); }
.filter-select {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg);
  font-size: 0.82rem; cursor: pointer; color: var(--text);
}
.filter-select:focus { outline: none; border-color: var(--orange); }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 20px; font-size: 0.85rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px; border: 1px solid;
}
.alert-success { background: #dcfce7; color: #15803d; border-color: #86efac; }
.alert-error   { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.alert-warning { background: #fef3c7; color: #d97706; border-color: #fcd34d; }

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex; gap: 4px; align-items: center;
  padding: 16px 22px;
}
.page-btn {
  min-width: 32px; height: 32px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; cursor: pointer; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--orange); color: var(--orange); }
.page-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── TOAST NOTIFICATIONS ────────────────────────────────── */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--sidebar-bg); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 0.85rem; font-weight: 500;
  min-width: 280px; animation: slideIn 0.3s ease;
  border-left: 3px solid var(--orange);
}
.toast.success { border-left-color: #16a34a; }
.toast.error   { border-left-color: #dc2626; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── USER AVATAR CIRCLE ──────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.admin  { background: linear-gradient(135deg, #f97316, #ea580c); }
.avatar.editor { background: linear-gradient(135deg, #2b4c96, #1e3a8a); }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; max-width: 440px; width: 90%;
  transform: scale(0.95); transition: transform 0.2s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.modal p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── QUILL EDITOR ─────────────────────────────────────────── */
.ql-container.ql-snow { border-color: var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.ql-toolbar.ql-snow   { border-color: var(--border); border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--bg); }
.ql-editor { min-height: 300px; font-family: 'Inter', sans-serif; font-size: 0.9rem; }
.ql-editor.ql-blank::before { color: var(--text-light); font-style: normal; }

/* ── SETTINGS ────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-section { border-radius: var(--radius); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .editor-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh; background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(43,76,150,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(249,115,22,0.1) 0%, transparent 50%);
}
.login-card {
  background: #141f35; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px; padding: 48px 44px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo img {
  width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 14px;
  border: 2px solid rgba(249,115,22,0.5);
}
.login-logo h2 {
  color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: 4px;
}
.login-logo p { color: var(--sidebar-text); font-size: 0.82rem; }
.login-form-group { margin-bottom: 16px; }
.login-form-group label {
  display: block; color: var(--sidebar-text);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 7px;
}
.login-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: #fff; font-size: 0.9rem;
  transition: all 0.2s; font-family: inherit;
}
.login-input:focus {
  outline: none; border-color: var(--orange);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.login-input::placeholder { color: rgba(255,255,255,0.2); }
.login-btn {
  width: 100%; padding: 13px;
  background: var(--orange); color: #fff;
  border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  margin-top: 8px;
}
.login-btn:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,0.35); }
.login-error {
  background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.3);
  color: #f87171; padding: 10px 14px; border-radius: 8px;
  font-size: 0.83rem; margin-bottom: 16px; text-align: center;
}
.login-back { text-align: center; margin-top: 20px; }
.login-back a { color: var(--sidebar-text); font-size: 0.82rem; transition: color 0.2s; }
.login-back a:hover { color: var(--orange); }
.login-hint {
  background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.15);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 18px;
  font-size: 0.78rem; color: var(--sidebar-text);
}
.login-hint strong { color: var(--orange); }

/* ── DARK MODE for Admin ────────────────────────────────────── */
[data-admin-theme="dark"] {
  --bg:     #0f172a;
  --card:   #1e293b;
  --border: #2d3f55;
  --text:   #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #64748b;
}
[data-admin-theme="dark"] .topbar { background: #1e293b; }
[data-admin-theme="dark"] .form-input,
[data-admin-theme="dark"] .form-select,
[data-admin-theme="dark"] .form-textarea,
[data-admin-theme="dark"] .search-box input,
[data-admin-theme="dark"] .filter-select { background: #0f172a; color: #e2e8f0; }
[data-admin-theme="dark"] .post-title-input { background: #1e293b; color: #e2e8f0; border-color: #2d3f55; }
[data-admin-theme="dark"] .ql-toolbar.ql-snow { background: #1a2740; }
[data-admin-theme="dark"] .ql-container.ql-snow { background: #1e293b; }
[data-admin-theme="dark"] .ql-editor { color: #e2e8f0; }
[data-admin-theme="dark"] .ql-stroke { stroke: #94a3b8 !important; }
[data-admin-theme="dark"] .ql-fill { fill: #94a3b8 !important; }
[data-admin-theme="dark"] .ql-picker { color: #94a3b8 !important; }

/* Theme toggle button */
.admin-theme-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); font-size: 0.9rem;
  transition: all var(--transition);
}
.admin-theme-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ── RECYCLE BIN ────────────────────────────────────────────── */
.badge-deleted  { background: #fee2e2; color: #dc2626; }
.badge-trashed  { background: #fee2e2; color: #dc2626; }
.badge-pending  { background: #fef9c3; color: #a16207; }
.badge-approved { background: #dcfce7; color: #16a34a; }
.badge-denied   { background: #fee2e2; color: #dc2626; }
.badge-cancelled{ background: #fef3c7; color: #d97706; }
.badge-moderator { background: rgba(139,92,246,0.12); color: #7c3aed; }

/* ── POST TYPE BADGES ─────────────────────────────────────── */
.badge-article      { background: rgba(43,76,150,0.12); color: #2b4c96; }
.badge-announcement { background: rgba(249,115,22,0.12); color: #f97316; }
.badge-event        { background: rgba(8,145,178,0.12); color: #0891b2; }
.badge-unpublished  { background: #f3f4f6; color: #6b7280; }

/* ── PUBLISH TOGGLE ──────────────────────────────────────── */
.publish-toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.toggle-switch {
  position: relative; width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 12px; transition: 0.3s; cursor: pointer;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: #16a34a; }
input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── GALLERY GRID ────────────────────────────────────────── */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-top: 12px;
}
.gallery-item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); background: var(--bg);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .remove-gallery {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff; border: none;
  cursor: pointer; font-size: 0.7rem; display: flex;
  align-items: center; justify-content: center; transition: background 0.2s;
}
.gallery-item .remove-gallery:hover { background: #dc2626; }

/* ── APPLICATION CARDS ──────────────────────────────────── */
.app-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all var(--transition); margin-bottom: 12px;
  display: flex; gap: 16px; align-items: flex-start;
}
.app-card:hover { box-shadow: var(--shadow); }
.app-avatar {
  width: 44px; height: 44px; min-width: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem;
}
.app-details { flex: 1; }
.app-details h4 { font-weight: 700; margin-bottom: 2px; }
.app-details p { color: var(--text-muted); font-size: 0.82rem; }
.app-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); }
.app-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* ── SIDEBAR OVERLAY (mobile) ───────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 199;
}
@media (max-width:1024px) {
  .sidebar-overlay.open { display: block; }
}
