/* ═══════════════════════════════════════════════════════════════
   Roots by Shruti — Design System
   Glassmorphism · Mobile-first · Light theme
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --accent:         #4f46e5;
  --accent-dark:    #3730a3;
  --accent-light:   #e0e7ff;
  --accent-rgb:     79, 70, 229;

  --glass-bg:       rgba(255, 255, 255, 0.55);
  --glass-border:   rgba(255, 255, 255, 0.70);
  --glass-shadow:   0 8px 32px rgba(31, 38, 135, 0.12);
  --glass-blur:     blur(18px) saturate(160%);
  --radius:         20px;
  --radius-sm:      12px;
  --radius-xs:      8px;

  --bg-from:        #f5f7fa;
  --bg-mid:         #e8ecf4;
  --bg-to:          #f0e9f7;

  --text-primary:   #1e1b4b;
  --text-secondary: #6366f1;
  --text-muted:     #6b7280;
  --text-danger:    #dc2626;
  --text-success:   #16a34a;

  --border-subtle:  rgba(99, 102, 241, 0.12);
  --surface:        rgba(255, 255, 255, 0.85);

  --nav-height:     60px;
  --sidebar-width:  240px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-mid) 50%, var(--bg-to) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Ambient blobs (decorative background) ─────────────────── */
.blobs {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.blob-1 { width: 600px; height: 600px; background: #c7d2fe; top: -200px; left: -150px; }
.blob-2 { width: 500px; height: 500px; background: #ddd6fe; bottom: -100px; right: -100px; }
.blob-3 { width: 400px; height: 400px; background: #fbcfe8; top: 40%; left: 40%; }

/* ── Glass card ────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(255, 255, 255, 0.92); }
}
.glass-sm {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(31, 38, 135, 0.08);
}

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 16px); /* room for mobile nav */
}
.container {
  width: 100%; max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.page-content {
  padding: 24px 16px;
}

/* Desktop sidebar layout */
@media (min-width: 1100px) {
  .app-wrapper { display: flex; padding-bottom: 0; }
  .sidebar { width: var(--sidebar-width); flex-shrink: 0; }
  .main-area { flex: 1; min-width: 0; padding: 32px; }
  .page-content { padding: 0; }
}

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }
p { line-height: 1.6; color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); font-size: 0.875rem; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font-weight: 600; font-size: 0.9rem;
  border: none; border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px; /* touch target */
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45); text-decoration: none; color: #fff; }
.btn-secondary {
  background: var(--glass-bg); color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: var(--accent-light); text-decoration: none; }
.btn-danger {
  background: #fee2e2; color: var(--text-danger);
  border: 1px solid #fca5a5;
}
.btn-danger:hover { background: #fecaca; text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { background: rgba(255,255,255,0.6); color: var(--text-primary); text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; min-height: 36px; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { padding: 10px; min-width: 44px; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(99,102,241,0.18);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  min-height: 44px;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.form-control::placeholder { color: #a5a5b8; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-control.error { border-color: var(--text-danger); }
.field-error { font-size: 0.78rem; color: var(--text-danger); margin-top: 2px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ── OTP input (6 boxes) ────────────────────────────────────── */
.otp-group {
  display: flex; gap: 10px; justify-content: center;
  margin: 20px 0;
}
.otp-input {
  width: 48px; height: 56px;
  text-align: center; font-size: 1.4rem; font-weight: 700;
  background: rgba(255,255,255,0.8);
  border: 2px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-xs);
  caret-color: var(--accent);
  transition: var(--transition);
}
.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
  outline: none;
  background: #fff;
}
.otp-input.filled { border-color: var(--accent); background: var(--accent-light); }

/* ── Auth card ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 420px;
  padding: 40px 36px;
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-logo .brand-name {
  font-size: 1.3rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo .brand-tagline { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 28px; }
.auth-footer { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 20px; }

/* ── Alerts / Flash messages ─────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  font-size: 0.875rem; font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-error   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border-color: #86efac; }
.alert-info    { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* ── Toast notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; right: 16px; left: 16px;
  z-index: 9999;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.toast {
  pointer-events: auto;
  min-width: 260px; max-width: min(360px, 90vw);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 300ms ease forwards;
  color: #fff;
}
.toast.toast-success { background: #16a34a; }
.toast.toast-error   { background: #dc2626; }
.toast.toast-info    { background: var(--accent); }
.toast.toast-warning { background: #d97706; }
.toast.toast-out     { animation: toastOut 300ms ease forwards; }
@keyframes toastIn  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ── Video card grid ─────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 768px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
}
.video-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.video-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(31,38,135,0.18); text-decoration: none; }
.video-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  position: relative; overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-raw    { background: rgba(79,70,229,0.85); color: #fff; }
.badge-edited { background: rgba(22,163,74,0.85);  color: #fff; }
.video-info { padding: 12px; flex: 1; }
.video-title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-meta  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Folder cards ────────────────────────────────────────────── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
@media (min-width: 768px) {
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
.folder-card {
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.folder-card:hover { transform: translateY(-2px); text-decoration: none; }
.folder-icon { font-size: 2.2rem; }
.folder-name { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.folder-count { font-size: 0.75rem; color: var(--text-muted); }

/* ── Upload progress card ────────────────────────────────────── */
.upload-card { padding: 24px; }
.upload-zone {
  border: 2px dashed rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: rgba(255,255,255,0.4);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-zone-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.upload-zone-text { font-size: 0.95rem; font-weight: 500; color: var(--text-primary); }
.upload-zone-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

.progress-card { padding: 20px; margin-top: 16px; }
.progress-bar-wrap {
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 99px; height: 10px; overflow: hidden; margin: 10px 0;
}
.progress-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  transition: width 300ms ease;
}
.progress-info {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ── Player page ─────────────────────────────────────────────── */
.player-page { max-width: 900px; margin: 0 auto; }
.player-wrap { border-radius: var(--radius); overflow: hidden; background: #000; }
.player-meta { padding: 20px; margin-top: 16px; }
.meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 12px;
}
@media (min-width: 768px) {
  .meta-grid { grid-template-columns: repeat(3, 1fr); }
}
.meta-item label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; display: block; }
.meta-item span  { font-size: 0.875rem; font-weight: 500; }

.player-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px;
}

.no-preview-banner {
  background: #fef3c7; border: 1px solid #fcd34d;
  border-radius: var(--radius-xs); padding: 16px;
  font-size: 0.875rem; color: #92400e;
  display: flex; align-items: flex-start; gap: 10px; margin-top: 12px;
}

/* ── Admin tables ────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); }
.admin-table td { padding: 14px 14px; font-size: 0.875rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.4); }

/* Stacked cards on mobile for admin tables */
@media (max-width: 767px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table tr { margin-bottom: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); background: var(--glass-bg); }
  .admin-table td { padding: 6px 0; border: none; font-size: 0.875rem; }
  .admin-table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 2px; }
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-header h1, .page-header h2 { margin: 0; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-indigo  { background: #e0e7ff; color: #3730a3; }
.badge-green   { background: #dcfce7; color: #166534; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-yellow  { background: #fef3c7; color: #92400e; }
.badge-gray    { background: #f3f4f6; color: #374151; }
.badge-purple  { background: #ede9fe; color: #5b21b6; }

/* ── Mobile bottom nav ───────────────────────────────────────── */
.mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex; align-items: stretch;
  z-index: 100;
  border-top: 1px solid var(--glass-border);
}
.mobile-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; transition: var(--transition); padding: 6px 4px;
}
.mobile-nav a.active, .mobile-nav a:hover { color: var(--accent); }
.mobile-nav a svg { width: 22px; height: 22px; }
@media (min-width: 1100px) { .mobile-nav { display: none; } }

/* ── Sidebar (desktop) ───────────────────────────────────────── */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 28px 16px;
  border-right: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
}
@media (min-width: 1100px) { .sidebar { display: flex; flex-direction: column; } }
.sidebar-brand { padding: 0 8px 24px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; }
.sidebar-brand .brand-name { font-size: 1rem; font-weight: 700; color: var(--accent); }
.sidebar-brand .brand-tag  { font-size: 0.72rem; color: var(--text-muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 12px 12px 4px; }

/* ── Top bar (mobile) ────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
@media (min-width: 1100px) { .topbar { display: none; } }
.topbar-brand { font-size: 0.95rem; font-weight: 700; color: var(--accent); }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: 24px 0; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 3.5rem; }
.empty-title { font-size: 1.1rem; font-weight: 600; }
.empty-text  { font-size: 0.875rem; color: var(--text-muted); max-width: 320px; }

/* ── Modal / bottom sheet ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 768px) {
  .modal-overlay { align-items: center; padding: 24px; }
}
.modal {
  width: 100%; max-width: 520px;
  padding: 28px 24px 32px;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 90vh; overflow-y: auto;
}
@media (min-width: 768px) {
  .modal { border-radius: var(--radius); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 1.1rem; font-weight: 700; }
.modal-close  { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 4px; }

/* ── Checkbox / toggle ───────────────────────────────────────── */
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; cursor: pointer; min-height: 44px;
}
.checkbox-label input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
}
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}

/* ── Stat tiles ──────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-tile { padding: 20px; text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--border-subtle); text-decoration: none; color: var(--text-primary);
  transition: var(--transition);
}
.pagination a:hover { background: var(--accent-light); border-color: var(--accent); text-decoration: none; }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ── Utilities ───────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4  { padding: 16px; }
.p-6  { padding: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Storage bar ─────────────────────────────────────────────── */
.storage-bar-wrap { background: var(--accent-light); border-radius: 99px; height: 8px; overflow: hidden; margin: 8px 0; }
.storage-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #7c3aed); border-radius: 99px; }
