/* ============================================================
   FIX-DL.DE — Main Stylesheet
   Dark Mode · Glassmorphism · Modern Design
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-base:     #070b14;
  --bg-surface:  #0d1424;
  --bg-elevated: #121b30;
  --bg-card:     rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border:      rgba(255, 255, 255, 0.08);
  --border-glow: rgba(79, 142, 247, 0.3);

  --primary:       #4f8ef7;
  --primary-light: #6fa5ff;
  --primary-dark:  #3670d0;
  --secondary:     #7c3aed;
  --accent:        #06d6a0;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #38bdf8;

  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-subtle: #94a3b8;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, #4f8ef7 0%, #7c3aed 100%);
  --grad-success:  linear-gradient(135deg, #06d6a0 0%, #059669 100%);
  --grad-danger:   linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --grad-warning:  linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-surface:  linear-gradient(180deg, #0d1424 0%, #070b14 100%);

  /* Sidebar */
  --sidebar-w: 260px;
  --sidebar-bg: rgba(13, 20, 36, 0.95);

  /* Spacing */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(79, 142, 247, 0.2);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: rgba(79,142,247,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79,142,247,0.5); }

/* ── App Layout ────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(79,142,247,0.3);
}
.sidebar-logo .logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0 8px;
  margin: 16px 0 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-subtle);
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}
.nav-item.active {
  background: rgba(79, 142, 247, 0.12);
  color: var(--primary-light);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon {
  font-size: 17px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--grad-primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-card-hover); }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 13px; font-weight: 600; }
.user-info .user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}
.topbar-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-content {
  padding: 28px;
  flex: 1;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.card:hover { border-color: rgba(79,142,247,0.2); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
}
.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  transform: translate(20px, -20px);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-glow); }
.stat-card.blue::before { background: var(--primary); }
.stat-card.purple::before { background: var(--secondary); }
.stat-card.green::before { background: var(--accent); }
.stat-card.orange::before { background: var(--warning); }
.stat-icon {
  font-size: 28px;
  margin-bottom: 14px;
}
.stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-value.blue { color: var(--primary-light); }
.stat-value.purple { color: #a78bfa; }
.stat-value.green { color: var(--accent); }
.stat-value.orange { color: var(--warning); }
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(79,142,247,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(79,142,247,0.4); }

.btn-success {
  background: var(--grad-success);
  color: white;
  box-shadow: 0 4px 15px rgba(6,214,160,0.3);
}
.btn-danger {
  background: var(--grad-danger);
  color: white;
  box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}
.btn-warning {
  background: var(--grad-warning);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--text-subtle);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-glow); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 9px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--primary);
  background: rgba(79,142,247,0.05);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.1);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check-label { font-size: 14px; cursor: pointer; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: rgba(79,142,247,0.06);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody td {
  padding: 13px 16px;
  vertical-align: middle;
}
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-primary { background: rgba(79,142,247,0.15); color: var(--primary-light); }
.badge-success { background: rgba(6,214,160,0.15); color: #34d399; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-muted   { background: rgba(100,116,139,0.15); color: var(--text-subtle); }
.badge-purple  { background: rgba(124,58,237,0.15); color: #a78bfa; }

/* ── Upload Zone ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition-slow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}
.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: var(--transition-slow);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(79,142,247,0.05);
}
.upload-zone.dragover::before { opacity: 0.04; }
.upload-zone.dragover {
  box-shadow: 0 0 40px rgba(79,142,247,0.15);
  transform: scale(1.01);
}
.upload-zone > * { position: relative; }

.upload-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.upload-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.upload-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}
.upload-or {
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-or::before, .upload-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.upload-input { display: none; }

/* Upload Queue */
.upload-queue {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.upload-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.upload-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.upload-item-icon { font-size: 20px; flex-shrink: 0; }
.upload-item-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-item-size {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.upload-item-status {
  font-size: 12px;
  font-weight: 600;
}
.upload-item-status.uploading { color: var(--primary-light); }
.upload-item-status.done { color: var(--accent); }
.upload-item-status.error { color: var(--danger); }

.progress-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--grad-primary);
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { left: 200%; } }
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── File Grid / List ──────────────────────────────────────── */
.file-icon-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.file-thumb-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.file-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.file-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar input {
  padding-left: 38px;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}
.page-link {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.page-link:hover { background: var(--bg-card-hover); color: var(--text); }
.page-link.active { background: var(--grad-primary); color: white; border-color: transparent; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--bg-card-hover); }
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Preview Modal ─────────────────────────────────────────── */
.preview-modal .modal {
  max-width: 900px;
  background: var(--bg-base);
}
.preview-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.preview-video {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}
.preview-audio {
  width: 100%;
}
.preview-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: var(--radius-sm);
}
.preview-code {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow: auto;
  max-height: 70vh;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  color: #e2e8f0;
}

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(79,142,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 40%, rgba(124,58,237,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(6,214,160,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo .logo-ring {
  width: 72px; height: 72px;
  background: var(--grad-primary);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  box-shadow: 0 0 40px rgba(79,142,247,0.3);
}
.login-logo h1 {
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.login-error.show { display: block; }

/* ── Toast Notifications ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  min-width: 280px;
  max-width: 400px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateX(0); }
.toast.success { background: rgba(6,214,160,0.12); border-color: rgba(6,214,160,0.3); }
.toast.error   { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); }
.toast.info    { background: rgba(79,142,247,0.12); border-color: rgba(79,142,247,0.3); }
.toast.warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }

/* ── License Keys ──────────────────────────────────────────── */
.key-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg-surface);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-value:hover {
  border-color: var(--primary);
  background: rgba(79,142,247,0.05);
}

/* ── Permission Checkboxes ─────────────────────────────────── */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}
.perm-item:hover { border-color: var(--border-glow); }
.perm-item input:checked ~ .perm-name { color: var(--primary-light); }
.perm-item input[type="checkbox"] { accent-color: var(--primary); }
.perm-name { font-size: 13px; font-weight: 500; }
.perm-icon { font-size: 15px; }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text-subtle); margin-bottom: 8px; }
.empty-state-text { font-size: 14px; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.tab {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad-primary); color: white; }

/* ── Code / Mono ───────────────────────────────────────────── */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); transition: var(--transition); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .perm-grid { grid-template-columns: 1fr; }
}

/* ── Utility ───────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary-light); }
.text-danger { color: #f87171; }
.text-warning { color: var(--warning); }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.fw-700 { font-weight: 700; }
