/* ═══════════════════════════════════════════════════════════
   Design tokens
════════════════════════════════════════════════════════════ */
:root {
  --bg:          #0a0a0f;
  --bg-2:        #111118;
  --bg-card:     rgba(255,255,255,0.04);
  --bg-hover:    rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --text:        #e8e8f0;
  --text-muted:  #7070a0;
  --text-dim:    #50507a;

  /* Instagram gradient */
  --grad: linear-gradient(135deg, #833AB4 0%, #E1306C 50%, #FCB045 100%);
  --purple: #833AB4;
  --pink:   #E1306C;
  --orange: #FCB045;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);

  --header-h: 60px;
  --sidebar-w: 260px;
  --transition: 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════
   Reset & base
════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

svg { display: inline-block; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════
   Header
════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 200;
}

/* Gradient accent line */
.header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
}

.header-title {
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   Hamburger
════════════════════════════════════════════════════════════ */
.hamburger {
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bg-hover); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   Overlay
════════════════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.overlay.active { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════════════════════
   Sidebar
════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(-1 * var(--sidebar-w)));
  transition: transform var(--transition);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: background var(--transition);
}
.sidebar-close:hover { background: var(--bg-hover); color: var(--text); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: rgba(131,58,180,0.2);
  color: var(--text);
}
.nav-item.active svg { stroke: var(--pink); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item--danger { color: var(--danger); margin-top: auto; }
.nav-item--danger:hover { background: rgba(239,68,68,0.15); }

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

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 4px 12px;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 8px 0;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.nav-avatar {
  width: 36px;
  height: 36px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nav-username { font-weight: 600; font-size: 0.9rem; }
.nav-group { font-size: 0.75rem; color: var(--text-muted); text-transform: capitalize; }

/* ═══════════════════════════════════════════════════════════
   Main layout
════════════════════════════════════════════════════════════ */
.main {
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  padding: 0;
}

.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* ═══════════════════════════════════════════════════════════
   Flash messages
════════════════════════════════════════════════════════════ */
.flash-container {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 500px);
}

.flash-container--auth {
  position: static;
  transform: none;
  left: auto;
  width: 100%;
  margin-bottom: 16px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
  border: 1px solid;
}
.flash--success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); color: #86efac; }
.flash--danger  { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.flash--warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
.flash--info    { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

.flash-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  padding: 2px;
  display: flex;
}
.flash-close svg { width: 14px; height: 14px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   Search bar
════════════════════════════════════════════════════════════ */
.search-form { margin-bottom: 16px; }

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  width: 16px; height: 16px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  padding: 12px 40px 12px 44px;
  transition: border-color var(--transition);
  outline: none;
}
.search-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(131,58,180,0.15);
}
.search-input::placeholder { color: var(--text-dim); }

.search-clear {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  display: flex;
  padding: 4px;
  border-radius: 4px;
}
.search-clear:hover { color: var(--text); }
.search-clear svg { width: 16px; height: 16px; }

.filter-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--purple); }

/* ═══════════════════════════════════════════════════════════
   Message cards
════════════════════════════════════════════════════════════ */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  transition: border-color var(--transition), background var(--transition);
}
.message-card:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.15); }
.message-card--warning { border-color: rgba(245,158,11,0.4); }
.message-card--archived { opacity: 0.85; }

.message-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.message-card__body { flex: 1; min-width: 0; }

.message-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.message-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.message-card__username {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.message-card__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.message-card__time {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.message-card__preview {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  word-break: break-word;
}
.message-card__preview--muted { font-style: italic; }

.message-card__duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.message-card__duration svg { width: 13px; height: 13px; }
.duration--over { color: var(--warning) !important; }
.duration-warn { font-weight: 600; }

.message-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Media preview in card */
.message-card__media {
  margin: 8px 0 10px;
}

.media-thumb--image {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  cursor: zoom-in;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
}

/* Media-thumbnail / inline speler (wachtrij + archief) */
.archive-media {
  margin: 10px 0 6px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 180px;
  background: var(--bg-2);
}
.archive-media__thumb {
  display: block;
  width: 100%;
  max-height: 130px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity var(--transition);
  border-radius: var(--radius-sm);
}
.archive-media__thumb:hover { opacity: .85; }
.archive-media__video {
  display: block;
  width: 100%;
  max-height: 150px;
  border-radius: var(--radius-sm);
  background: #000;
}
.archive-media__expired {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--text-muted);
  font-size: .82rem;
}

/* ═══════════════════════════════════════════════════════════
   Reel-statistieken
════════════════════════════════════════════════════════════ */
.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.stats-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .85rem;
  transition: background var(--transition), color var(--transition);
}
.stats-tab:hover { background: var(--bg-hover); text-decoration: none; }
.stats-tab--active { background: var(--grad); color: #fff; border-color: transparent; }

.stats-subtitle {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 16px;
}
.stats-note { font-size: .78rem; opacity: .8; }

.stats-list { display: flex; flex-direction: column; gap: 10px; }
.stats-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.stats-rank {
  flex: 0 0 28px;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
}
.stats-rank--gold   { color: #FFD700; }
.stats-rank--silver { color: #C0C0C0; }
.stats-rank--bronze { color: #CD7F32; }

/* Vaste afmeting zodat elke Reel-thumbnail er even groot uitziet,
   ongeacht de resolutie/verhouding die Instagram teruggeeft. */
.stats-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
}
.stats-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stats-thumb__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.stats-thumb--clickable { cursor: pointer; }
.stats-thumb--clickable:hover { opacity: .85; }

.stats-info { flex: 1 1 auto; min-width: 0; }
.stats-caption {
  font-size: .88rem;
  color: var(--text);
  margin-bottom: 4px;
  overflow-wrap: break-word;
}
.stats-caption--muted { color: var(--text-muted); font-style: italic; }
.stats-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--text-muted);
}
.stats-link { color: var(--pink); }

.stats-likes { flex: 0 0 auto; text-align: center; }
.stats-likes__count { display: block; font-weight: 700; font-size: 1.05rem; }
.stats-likes__label { font-size: .72rem; color: var(--text-muted); }

@media (max-width: 560px) {
  .stats-card { flex-wrap: wrap; }
  .stats-thumb { flex-basis: 56px; width: 56px; height: 56px; }
}

.media-thumb--video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 500;
  transition: background 0.15s;
}
.media-thumb--video:hover { background: var(--hover); }
.media-thumb--video svg { width: 20px; height: 20px; }

.media-audio {
  width: 100%;
  margin-top: 4px;
}

/* Media modal */
.modal--media { max-width: 90vw; width: auto; }
.modal__body--media {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  min-height: 120px;
}
.media-modal__image {
  max-width: 80vw;
  max-height: 75vh;
  border-radius: 8px;
  object-fit: contain;
}
.media-modal__video {
  max-width: 80vw;
  max-height: 75vh;
  border-radius: 8px;
  outline: none;
}



/* ═══════════════════════════════════════════════════════════
   Archive-specific
════════════════════════════════════════════════════════════ */
.archive-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.archive-by, .archive-time {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.reply-details {
  margin-top: 6px;
  font-size: 0.85rem;
}
.reply-details summary {
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.reply-text {
  margin-top: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
  font-size: 0.87rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════
   Badges
════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }

.badge--count {
  background: var(--grad);
  color: #fff;
  min-width: 24px;
  justify-content: center;
  font-size: 0.75rem;
}

.badge--type.badge--text    { background: rgba(59,130,246,0.2);  color: #93c5fd; }
.badge--type.badge--image   { background: rgba(34,197,94,0.2);   color: #86efac; }
.badge--type.badge--video   { background: rgba(245,158,11,0.2);  color: #fcd34d; }
.badge--type.badge--audio   { background: rgba(168,85,247,0.2);  color: #d8b4fe; }
.badge--type.badge--other   { background: rgba(100,116,139,0.2); color: #94a3b8; }

.badge--type--clickable {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
}
.badge--type--clickable:hover  { filter: brightness(1.25); transform: scale(1.06); }
.badge--type--clickable:active { transform: scale(0.97); }

.badge--action-received         { background: rgba(59,130,246,0.2);  color: #93c5fd; }
.badge--action-approved         { background: rgba(34,197,94,0.2);   color: #86efac; }
.badge--action-rejected_content { background: rgba(239,68,68,0.2);   color: #fca5a5; }
.badge--action-rejected_duration{ background: rgba(245,158,11,0.2);  color: #fcd34d; }

.badge--group-admins { background: rgba(131,58,180,0.25); color: #c084fc; }
.badge--group-users  { background: rgba(59,130,246,0.2);  color: #93c5fd; }
.badge--group-none   { background: rgba(100,116,139,0.15); color: #94a3b8; }

.badge--active   { background: rgba(34,197,94,0.2);  color: #86efac; }
.badge--inactive { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ═══════════════════════════════════════════════════════════
   Buttons
════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn--primary {
  background: var(--grad);
  color: #fff;
}
.btn--primary:hover { opacity: 0.88; text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn--danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn--danger:hover { background: rgba(239,68,68,0.25); }

.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: 6px 12px; font-size: 0.8rem; }
.btn--icon { padding: 7px; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn--icon:hover { background: var(--bg-hover); color: var(--text); }
.btn--icon.btn--danger { border-color: rgba(239,68,68,0.3); color: var(--danger); }

/* Action buttons */
.btn--action { font-size: 0.78rem; padding: 6px 12px; border: 1px solid; }
.btn--action-received         { background: rgba(59,130,246,0.1);  color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.btn--action-approved         { background: rgba(34,197,94,0.1);   color: #86efac; border-color: rgba(34,197,94,0.3); }
.btn--action-rejected_content { background: rgba(239,68,68,0.1);   color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.btn--action-rejected_duration{ background: rgba(245,158,11,0.1);  color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.btn--action:hover { filter: brightness(1.15); }

/* Loading state */
.btn.loading { pointer-events: none; opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════
   Modal
════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: #16162a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
  overflow: hidden;
}

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

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: 1.05rem; font-weight: 700; }
.modal__close { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; padding: 4px; border-radius: 6px; }
.modal__close:hover { background: var(--bg-hover); color: var(--text); }
.modal__close svg { width: 18px; height: 18px; }

.modal__body { padding: 20px 24px; }
.modal__body--form { display: flex; flex-direction: column; gap: 14px; }
.modal__action-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.modal__action-label strong { color: var(--text); }
.modal__reply-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.modal__reply-preview {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.5;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   Forms
════════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.input-wrapper { position: relative; display: flex; align-items: center; }

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
  width: 16px; height: 16px;
}

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrapper .form-input { padding-left: 44px; }

.form-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(131,58,180,0.15);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input--mono { font-family: 'Courier New', monospace; font-size: 0.85rem; }
.form-input--sm { max-width: 140px; }

.form-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 11px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.form-select:focus { border-color: var(--purple); }

.form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 11px 14px;
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: border-color var(--transition);
  font-family: inherit;
}
.form-textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(131,58,180,0.15); }

.input-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  padding: 4px;
}
.input-toggle-pw:hover { color: var(--text); }
.input-toggle-pw svg { width: 16px; height: 16px; }

.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.checkbox-label input:checked ~ .checkmark {
  background: var(--grad);
  border-color: transparent;
}
.checkbox-label input:checked ~ .checkmark::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 900;
}

/* ═══════════════════════════════════════════════════════════
   Auth pages
════════════════════════════════════════════════════════════ */
.auth-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: #13131f;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon { font-size: 3rem; line-height: 1; margin-bottom: 12px; }

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.auth-logo-sub { font-size: 0.85rem; color: var(--text-muted); }

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

.auth-link {
  font-size: 0.85rem;
  color: var(--pink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-link svg { width: 14px; height: 14px; }

.auth-back { text-align: center; }

/* ═══════════════════════════════════════════════════════════
   Users table
════════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255,255,255,0.04);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.user-row { display: flex; align-items: center; gap: 10px; }

.user-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.actions-col { text-align: right; white-space: nowrap; }

.text-muted { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   Settings page
════════════════════════════════════════════════════════════ */
.settings-form { display: flex; flex-direction: column; gap: 0; }

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.settings-section__title svg { -webkit-text-fill-color: unset; color: var(--purple); width: 18px; height: 18px; }

.settings-section__desc { font-size: 0.83rem; color: var(--text-muted); margin-top: -8px; }
.settings-section__desc code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.settings-footer { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════
   Empty state
════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state__icon {
  margin: 0 auto 16px;
  width: 56px; height: 56px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.empty-state__icon svg { width: 26px; height: 26px; }
.empty-state h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; }

/* ═══════════════════════════════════════════════════════════
   Pagination
════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.page-btn svg { width: 18px; height: 18px; }
.page-info { font-size: 0.85rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   Responsive – desktop sidebar (optional auto-open)
════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .sidebar {
    transform: translateX(0);
    border-right: 1px solid var(--border);
  }
  .main { margin-left: var(--sidebar-w); }
  .header { left: var(--sidebar-w); }
  .hamburger, .sidebar-close, .overlay { display: none !important; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; align-self: flex-end; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .message-card__actions .btn--action { font-size: 0.72rem; padding: 5px 8px; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) { display: none; }
}
