/* ============================================================
   SKT WhatsApp Bulk — Application Styles
   Design: White-dominant, black accents, clean minimal admin
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Brand — black accent on white */
  --wa-green:      #111111;
  --wa-green-dark: #000000;
  --wa-green-light:#f0f0f0;

  /* Sidebar — white */
  --sidebar-bg:       #ffffff;
  --sidebar-hover:    #f5f5f5;
  --sidebar-active:   #111111;
  --sidebar-text:     #555555;
  --sidebar-text-act: #ffffff;
  --sidebar-border:   #e8e8e8;
  --sidebar-width:    256px;
  --sidebar-icon:     #888888;

  /* Topbar */
  --topbar-height: 64px;
  --topbar-bg:     #ffffff;
  --topbar-border: #e8e8e8;

  /* Colors */
  --color-bg:       #f7f7f7;
  --color-surface:  #ffffff;
  --color-border:   #e8e8e8;
  --color-text:     #0a0a0a;
  --color-muted:    #777777;
  --color-danger:   #dc2626;
  --color-warning:  #92400e;
  --color-success:  #111111;
  --color-info:     #333333;

  /* Shadows */
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0/.05), 0 1px 2px -1px rgb(0 0 0/.04);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0/.07), 0 2px 4px -2px rgb(0 0 0/.04);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0/.08), 0 4px 6px -4px rgb(0 0 0/.05);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  /* Transitions */
  --transition: 150ms ease;
  --transition-md: 250ms ease;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --sidebar-bg:       #111111;
  --sidebar-hover:    #1c1c1c;
  --sidebar-active:   #ffffff;
  --sidebar-text:     #888888;
  --sidebar-text-act: #111111;
  --sidebar-border:   #222222;
  --topbar-bg:        #111111;
  --topbar-border:    #222222;
  --color-bg:         #0a0a0a;
  --color-surface:    #111111;
  --color-border:     #222222;
  --color-text:       #f0f0f0;
  --color-muted:      #888888;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100dvh;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-md);
}

.page-content {
  flex: 1;
  padding: 1.75rem;
  padding-top: calc(var(--topbar-height) + 1.75rem);
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100dvh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow: hidden;
  transition: transform var(--transition-md);
  border-right: 1px solid var(--sidebar-border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: #111111;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-border) transparent;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--color-text);
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-act);
}

.nav-icon {
  flex-shrink: 0;
  color: inherit;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 0.875rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  text-decoration: none;
  min-width: 0;
}

.user-info { min-width: 0; }

.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.6875rem;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logout-btn {
  color: var(--sidebar-text);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.logout-btn:hover {
  color: var(--color-danger);
  background: rgba(220,38,38,0.08);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1039;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-md);
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1030;
  transition: left var(--transition-md);
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .topbar { left: 0; }
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.breadcrumb-nav { display: none; }
@media (min-width: 576px) { .breadcrumb-nav { display: block; } }

.breadcrumb {
  font-size: 0.8125rem;
  --bs-breadcrumb-divider-color: var(--color-muted);
  --bs-breadcrumb-item-active-color: var(--color-text);
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: #aaaaaa;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.sidebar-toggle-btn:hover { color: var(--color-text); }

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.625rem;
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.user-btn:hover {
  background: var(--color-bg);
  border-color: #aaaaaa;
}

/* ── Avatar ────────────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

/* ── Primary Button ────────────────────────────────────────── */
.btn-wa {
  background: #111111;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.btn-wa:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-wa:active { transform: translateY(0); }

.btn-wa.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.card-body { padding: 1.25rem; }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.green,
.stat-icon.blue,
.stat-icon.purple,
.stat-icon.teal,
.stat-icon.sky,
.stat-icon.indigo,
.stat-icon.orange { background: #111111; color: #ffffff; }

.stat-icon.red { background: #fce8e8; color: #dc2626; }

.stat-body { min-width: 0; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.125rem;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive { overflow-x: auto; }

.table {
  margin: 0;
  font-size: 0.875rem;
}

.table th {
  background: var(--color-bg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: #fafafa; }

/* ── Badges / Status ───────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-sent      { background: #f0f0f0; color: #111111; }
.status-pending   { background: #ebebeb; color: #555555; }
.status-scheduled { background: #e8e8e8; color: #333333; }
.status-failed    { background: #fce8e8; color: #dc2626; }
.status-draft     { background: #f5f5f5; color: #777777; }
.status-sending   { background: #e5e5e5; color: #222222; }
.status-cancelled { background: #f0f0f0; color: #888888; }
.status-delivered { background: #eaeaea; color: #111111; }
.status-read      { background: #e0e0e0; color: #111111; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-control,
.form-select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.form-control:focus,
.form-select:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
  outline: none;
}

.form-control::placeholder { color: var(--color-muted); opacity: 0.6; }

textarea.form-control { min-height: 110px; resize: vertical; }

.input-group-text {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ── Search Bar ────────────────────────────────────────────── */
.search-wrap { position: relative; }

.search-wrap .form-control { padding-left: 2.5rem; }

.search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination { gap: 4px; }

.page-link {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.8125rem;
  padding: 0.375rem 0.625rem;
  min-width: 36px;
  text-align: center;
  background: var(--color-surface);
  transition: all var(--transition);
}

.page-link:hover {
  background: var(--color-bg);
  border-color: #111111;
  color: #111111;
}

.page-item.active .page-link {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.page-item.disabled .page-link { opacity: 0.5; pointer-events: none; }

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

.page-header-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-header-sub {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* ── Toolbar ───────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--color-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #cccccc;
}

.empty-state h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
}

/* ── Media Library ─────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.media-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.media-item:hover {
  border-color: #111111;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.media-item.selected {
  border-color: #111111;
  box-shadow: 0 0 0 2px #111111;
}

.media-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--color-bg);
}

.media-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}

.media-info {
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--color-border);
}

.media-filename {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}

.media-meta {
  font-size: 0.6875rem;
  color: var(--color-muted);
}

.media-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 22px;
  height: 22px;
  background: #111111;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.media-item.selected .media-check { display: flex; }

/* ── Dropzone ──────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--color-surface);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #111111;
  background: #fafafa;
}

.dropzone-icon {
  color: #333333;
  margin-bottom: 1rem;
}

.dropzone h6 { font-weight: 600; margin-bottom: 0.375rem; }
.dropzone p  { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1rem; }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress {
  height: 8px;
  border-radius: 99px;
  background: #eeeeee;
}

.progress-bar {
  background: #111111;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ── Checkbox custom ───────────────────────────────────────── */
.form-check-input:checked {
  background-color: #111111;
  border-color: #111111;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast { border-radius: var(--radius-md); }

/* ── Utilities ─────────────────────────────────────────────── */
.text-wa    { color: #111111 !important; }
.bg-wa-soft { background: #f0f0f0 !important; }

.font-mono { font-family: var(--font-mono); font-size: 0.8125rem; }

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-logo-text {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0a0a0a;
  letter-spacing: -0.03em;
}

.login-card .form-label { color: #333333; }

.login-card .form-control {
  background: #f7f7f7;
  border-color: #e0e0e0;
  color: #0a0a0a;
}

.login-card .form-control:focus {
  border-color: #111111;
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.login-card .form-control::placeholder { color: #aaaaaa; }

.login-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0a0a0a;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: #777777;
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Broadcast progress ─────────────────────────────────────── */
.recipient-progress {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ── Contact tags ──────────────────────────────────────────── */
.tag-badge {
  display: inline-block;
  background: #eeeeee;
  color: #444444;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  margin: 0.125rem;
}

/* ── Select all toolbar ────────────────────────────────────── */
.bulk-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #dddddd;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.bulk-actions.show { display: flex; }

/* ── Placeholder / shimmer ─────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar         { width: 6px; height: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: #dddddd; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #bbbbbb; }

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 575.98px) {
  .page-content { padding: 1rem; padding-top: calc(var(--topbar-height) + 1rem); }
  .stat-value   { font-size: 1.5rem; }
  .page-header  { flex-direction: column; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
