/* ══════════════════════════════════════════════════════════════════════════════
   Board — Junkerne Dashboard
   Premium dark glassmorphism design
   ══════════════════════════════════════════════════════════════════════════════ */

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

:root {
  /* Slightly lighter dark mode default */
  --bg-primary: #0f172a;
  /* Was #07070f */
  --bg-surface: rgba(255, 255, 255, 0.05);
  /* Slightly more visible cards */
  --bg-surface-hover: rgba(255, 255, 255, 0.09);
  --bg-surface-active: rgba(255, 255, 255, 0.13);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.25);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --nav-bg: rgba(15, 23, 42, 0.85);
  --dropdown-bg: rgba(30, 41, 59, 0.95);

  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-primary-glow: rgba(99, 102, 241, 0.3);
  --accent-cyan: #22d3ee;
  --accent-cyan-glow: rgba(34, 211, 238, 0.2);
  --accent-emerald: #34d399;
  --accent-rose: #fb7185;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);
  --shadow-dropdown: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --logo-filter: invert(1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-surface-hover: rgba(255, 255, 255, 0.95);
    --bg-surface-active: rgba(230, 235, 241, 0.8);
    --border-subtle: rgba(0, 0, 0, 0.05);
    --border-medium: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --dropdown-bg: rgba(255, 255, 255, 0.98);

    --accent-primary: #4f46e5;
    --accent-primary-hover: #4338ca;
    --accent-primary-glow: rgba(79, 70, 229, 0.15);
    --accent-cyan: #0891b2;
    --accent-cyan-glow: rgba(8, 145, 178, 0.15);
    --accent-emerald: #10b981;
    --accent-rose: #e11d48;

    --shadow-glow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-dropdown: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --logo-filter: none;
  }
}

:root[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.8);
  --bg-surface-hover: rgba(255, 255, 255, 0.95);
  --bg-surface-active: rgba(230, 235, 241, 0.8);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-medium: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.15);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --dropdown-bg: rgba(255, 255, 255, 0.98);

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-primary-glow: rgba(79, 70, 229, 0.15);
  --accent-cyan: #0891b2;
  --accent-cyan-glow: rgba(8, 145, 178, 0.15);
  --accent-emerald: #10b981;
  --accent-rose: #e11d48;

  --shadow-glow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-dropdown: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  --logo-filter: none;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Background Effects ────────────────────────────────────────────────────── */
.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15), transparent 70%);
  top: 50%;
  right: -10%;
  animation-delay: -7s;
  animation-duration: 25s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
  bottom: -5%;
  left: 30%;
  animation-delay: -14s;
  animation-duration: 30s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -40px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(40px, 30px) scale(1.02);
  }
}

/* ── App Container ─────────────────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon,
.brand-icon-img {
  font-size: 1.4rem;
  filter: var(--logo-filter);
  transition: filter var(--transition-fast);
}

.brand-text {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.nav-links a.active {
  color: var(--accent-primary-hover);
  background: rgba(99, 102, 241, 0.1);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── User Dropdown ─────────────────────────────────────────────────────────── */
.user-dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
}

.user-dropdown-trigger {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-dropdown-trigger:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-subtle);
}

.nav-username {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.nav-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-primary-glow);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: 2px;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--dropdown-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-dropdown);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition-fast);
  transform-origin: top right;
}

.user-dropdown-menu.hidden {
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  text-decoration: none;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: var(--bg-surface-hover);
}

.dropdown-item.text-danger {
  color: var(--accent-rose);
}

.dropdown-item.text-danger:hover {
  background: rgba(244, 63, 94, 0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

/* ── Content ───────────────────────────────────────────────────────────────── */
#content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 24px 40px;
  min-height: 100vh;
}

/* ── Glass Card ────────────────────────────────────────────────────────────── */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.glass-elevated {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow);
}

/* ── Auth Pages ────────────────────────────────────────────────────────────── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 128px);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: fadeSlideUp 0.5s ease-out;
}

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

.auth-header .brand-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
  background: rgba(255, 255, 255, 0.06);
}

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

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  color: white;
  box-shadow: 0 4px 20px var(--accent-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px var(--accent-primary-glow);
}

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.btn-success:hover {
  background: rgba(52, 211, 153, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Page Headers ──────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Dashboard Grid ────────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: left;
  min-height: 180px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: border-color 0.25s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .dashboard-card:hover {
    border-color: var(--border-medium);
  }
}

.dashboard-card-content {
  padding: 24px;
  flex-grow: 1;
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dashboard-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.dashboard-card .description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.dashboard-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-surface-hover);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.dashboard-card-footer.clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Remove gray tap highlight on iOS */
}

@media (hover: hover) {
  .dashboard-card-footer.clickable:hover {
    background: rgba(99, 102, 241, 0.05);
  }
}

.dashboard-card-footer .stat {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.go-btn {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-primary);
  border-radius: 8px;
  text-decoration: none;
  max-width: 180px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.go-btn .btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: hover) {
  .go-btn:hover {
    background: var(--accent-hover);
  }
}

.go-btn .arrow {
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .go-btn:hover .arrow {
    transform: translateX(4px);
  }
}

/* On touch devices: always show actions. On hover devices: reveal on hover */
@media (hover: hover) {
  .card-actions {
    opacity: 0;
    transform: translateX(10px);
  }

  .dashboard-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.card-action-btn:hover {
  background: var(--bg-surface-active);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.card-action-btn.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* ── New Dashboard Card ────────────────────────────────────────────────────── */
.new-dashboard-card {
  border: 2px dashed var(--border-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
}

.new-dashboard-card:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.new-dashboard-card .plus-icon {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.new-dashboard-card:hover .plus-icon {
  color: var(--accent-primary);
  transform: scale(1.1);
}

.new-dashboard-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Links Grid ────────────────────────────────────────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.link-card {
  padding: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

@media (hover: hover) {
  .link-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-medium);
    transform: translateY(-2px);
  }
}

.link-favicon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.link-favicon img {
  width: 24px;
  height: 24px;
}

.link-info {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 480px) {
  .link-info {
    max-width: none;
    margin-right: auto;
  }
}

.link-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-info .link-url {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
  width: 100%;
  justify-content: flex-end;
  margin-top: 4px;
}

@media (min-width: 480px) {
  .link-card {
    padding: 20px;
    flex-wrap: nowrap;
    gap: 16px;
  }

  .link-actions {
    width: auto;
    justify-content: flex-end;
    margin-top: 0;
    gap: 4px;
    flex-shrink: 0;
  }
}

/* ── Add Link Card ─────────────────────────────────────────────────────────── */
.add-link-card {
  border: 2px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: transparent;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.add-link-card:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-primary);
}

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeSlideUp 0.5s ease-out;
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto 24px;
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  animation: fadeIn 0.2s ease-out;
}

#modal-overlay.hidden {
  display: none;
}

.modal {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  animation: fadeSlideUp 0.3s ease-out;
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── Toast Notifications ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: toastSlideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast-success {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-emerald);
}

.toast-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.toast-info {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary-hover);
}

.toast-exit {
  animation: toastSlideOut 0.3s ease-in forwards;
}

/* ── Admin Tables ──────────────────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border-subtle);
}

.admin-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  flex: 1;
  text-align: center;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--accent-primary);
  color: white;
}

.data-table-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-surface);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-admin {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary-hover);
}

.badge-user {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
}

.badge-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 12px;
}

/* ── Search Bar ────────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition-fast);
  outline: none;
}

.search-bar input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Back Link ─────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
  transition: var(--transition-fast);
}

.back-link:hover {
  color: var(--text-primary);
}

/* ── Auth Link ─────────────────────────────────────────────────────────────── */
.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--accent-primary-hover);
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* ── Loading Spinner ───────────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.fade-in {
  animation: fadeSlideUp 0.4s ease-out;
}

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

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

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #content {
    padding: 80px 16px 32px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-content {
    padding: 0 16px;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .modal {
    padding: 24px;
    margin: 16px;
  }

  .data-table-wrapper {
    overflow-x: auto;
  }

  .hide-mobile {
    display: none !important;
  }

  .data-table {
    min-width: 600px;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .nav-brand .brand-text {
    display: none;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

  .dashboard-card {
    padding: 20px;
  }
}