:root {
  --brand-primary: #4f46e5;
  --brand-primary-dark: #3730a3;
  --brand-accent: #06b6d4;
  --bg-soft: #f5f6fb;
}

body {
  background: var(--bg-soft);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1f2430;
}

/* ---------- Topbar ---------- */
.topbar {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  z-index: 1030;
}
.topbar .navbar-brand { color: #fff; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 230px;
  min-height: calc(100vh - 56px);
  background: #ffffff;
  border-right: 1px solid #e9eaf2;
  padding-top: 1rem;
  flex-shrink: 0;
}
.side-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.25rem;
  color: #4b4f5c;
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.side-link:hover,
.side-link.active {
  background: #eef0ff;
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -240px;
    top: 56px;
    z-index: 1025;
    transition: left .2s ease;
    box-shadow: 4px 0 12px rgba(0,0,0,.08);
  }
  .sidebar.show { left: 0; }
}

/* ---------- Cards / widgets ---------- */
.stat-card {
  border: none;
  border-radius: 1rem;
  color: #fff;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 20px rgba(79,70,229,.15);
}
.stat-card.blue   { background: linear-gradient(135deg,#4f46e5,#6366f1); }
.stat-card.cyan   { background: linear-gradient(135deg,#06b6d4,#0891b2); }
.stat-card.green  { background: linear-gradient(135deg,#16a34a,#22c55e); }
.stat-card.amber  { background: linear-gradient(135deg,#f59e0b,#f97316); }
.stat-card .stat-num { font-size: 2rem; font-weight: 700; }

.card { border: none; border-radius: .9rem; box-shadow: 0 2px 10px rgba(20,20,43,.06); }

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 1.1rem;
  overflow: hidden;
}
.auth-card .card-header {
  background: #fff;
  border: none;
  text-align: center;
  padding-top: 2rem;
}

.media-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: .6rem;
  background: #eceefc;
}
.media-thumb-doc {
  width: 100%;
  height: 140px;
  border-radius: .6rem;
  background: #eceefc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--brand-primary);
}

.badge-category { background: #eef0ff; color: var(--brand-primary); font-weight: 600; }

.empty-state { text-align: center; padding: 3rem 1rem; color: #8a8fa3; }
.empty-state i { font-size: 3rem; display: block; margin-bottom: .75rem; }

.drop-zone {
  border: 2px dashed #c7cbe6;
  border-radius: .75rem;
  padding: 2rem;
  text-align: center;
  color: #6b7086;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop-zone.dragover { border-color: var(--brand-primary); background: #f2f2ff; }

.spinner-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.7);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
