:root {
  --bg-dark: #0c0d14;
  --bg-card: #141622;
  --bg-card-hover: #1a1c2c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(139, 92, 246, 0.4);
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --accent-pink: #ec4899;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* ==================== AUTH SCREEN (GLASSMORPHISM NEON) ==================== */
.auth-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 20px;
  background-color: #06070e;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(147, 51, 234, 0.42) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(79, 70, 229, 0.38) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
  overflow: hidden;
}

/* Subtle Matrix Dot Grids in opposite corners */
.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 35px;
  right: 45px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: 0.7;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  bottom: 35px;
  left: 45px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: 0.7;
}

/* Ambient Neon Glow Waves */
.auth-ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.glow-top-left {
  top: -100px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, rgba(139, 92, 246, 0.2) 60%, transparent 80%);
}

.glow-bottom-right {
  bottom: -120px;
  right: -100px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.45) 0%, rgba(59, 130, 246, 0.2) 60%, transparent 80%);
}

.glow-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.25) 0%, transparent 70%);
}

/* Glassmorphism Auth Card */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 510px;
  background: rgba(18, 20, 36, 0.62);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 44px 42px;
  box-shadow:
    0 35px 85px -15px rgba(0, 0, 0, 0.85),
    0 0 50px -10px rgba(147, 51, 234, 0.35),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.22);
  z-index: 2;
  transition: box-shadow 0.3s ease;
}

.auth-card:hover {
  box-shadow:
    0 40px 95px -15px rgba(0, 0, 0, 0.9),
    0 0 65px -8px rgba(147, 51, 234, 0.45),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
}

/* Brand Row: Logo Box + Divider + Title */
.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.logo-box {
  width: 58px;
  height: 58px;
  background: #ffffff;
  border-radius: 16px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-divider {
  width: 1.5px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 18px;
  flex-shrink: 0;
}

.brand-info h2 {
  font-size: 23px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1.15;
}

.brand-info span {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 3px;
  letter-spacing: 0.2px;
}

/* Description Text */
.auth-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 26px;
  font-weight: 400;
}

/* Form Groups & Labels */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 9px;
  user-select: none;
}

.form-label svg {
  width: 16px;
  height: 16px;
  color: #c084fc;
  flex-shrink: 0;
}

/* Input Wrappers & Glass Inputs */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-control-glass {
  width: 100%;
  height: 50px;
  background: rgba(11, 13, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0 46px 0 18px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-control-glass:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25), 0 0 20px rgba(168, 85, 247, 0.2);
  background: rgba(14, 16, 30, 0.85);
}

.form-control-glass::placeholder {
  color: #64748b;
}

/* Eye Toggle Button */
.pass-toggle-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 6px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.pass-toggle-btn:hover {
  color: #ffffff;
  transform: scale(1.08);
}

.pass-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Glowing Pill Capsule Button */
.btn-capsule-submit {
  width: 100%;
  height: 52px;
  border-radius: 9999px;
  border: 0;
  background: linear-gradient(90deg, #9333ea 0%, #6366f1 52%, #3b82f6 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 28px -4px rgba(147, 51, 234, 0.55), 0 0 20px rgba(99, 102, 241, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 26px;
  font-family: inherit;
}

.btn-capsule-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px -4px rgba(147, 51, 234, 0.7), 0 0 30px rgba(99, 102, 241, 0.45);
  filter: brightness(1.08);
}

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

.btn-capsule-submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-capsule-submit .btn-arrow {
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.btn-capsule-submit:hover .btn-arrow {
  transform: translateX(4px);
}

/* DASHBOARD LAYOUT */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 270px;
  background: #0f101a;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h3 {
  font-size: 17px;
  font-weight: 700;
}

.badge-online {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-meta strong {
  display: block;
  font-size: 13px;
}

.user-meta span {
  font-size: 11px;
  color: var(--text-dim);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.page-title h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-title p {
  font-size: 14px;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.stat-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.stat-hint {
  font-size: 12px;
  color: var(--text-dim);
}

.text-green {
  color: var(--success);
}

.text-indigo {
  color: #818cf8;
}

.text-pink {
  color: #f472b6;
}

.text-amber {
  color: #f59e0b;
}

.text-red {
  color: #f87171;
}

.clickable-stat-card {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.clickable-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.45);
}

.stat-card-btn {
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.clickable-stat-card:hover .stat-card-btn {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.6);
  color: #ffffff;
}

/* QUICK GUIDE */
.quick-guide-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.quick-guide-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 12px;
}

.quick-guide-box ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #d1d5db;
}

.quick-guide-box code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #a5b4fc;
}

/* COOKIE VAULT */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

.vault-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.vault-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mode-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.mode-video {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.mode-image {
  background: rgba(236, 72, 153, 0.15);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.cookie-count-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pink {
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  border-color: rgba(236, 72, 153, 0.3);
}

/* SLOT TABS FOR 10/10 VAULT */
.slot-tabs-wrap {
  margin-bottom: 14px;
  background: #0c0d15;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.slot-tabs-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #141622;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.slot-tab.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.slot-tab-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.slot-tab-badge.has-cookies {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.cookie-box label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cookie-box textarea {
  width: 100%;
  height: 200px;
  background: #0a0b12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #e5e7eb;
  resize: vertical;
  margin-bottom: 14px;
}

.cookie-box textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.vault-head-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.health-badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.health-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.health-badge-red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  animation: pulseDead 1.8s infinite;
}

.health-badge-gray {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.slot-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 2px;
}

.dot-green {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.dot-amber {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.dot-red {
  background: #ef4444;
  box-shadow: 0 0 7px #ef4444;
  animation: pulseDead 1.5s infinite;
}

.dot-gray {
  background: #4b5563;
}

/* DEAD SLOT ALERT BANNER */
.dead-slot-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
  color: #fca5a5;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
  animation: pulseDead 2.5s infinite;
}

/* COOKIE HEALTH & DIAGNOSTICS BOX */
.cookie-health-box {
  margin-top: 14px;
  background: rgba(15, 17, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.health-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.health-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.health-status-text {
  font-size: 12px;
  font-weight: 600;
}

.health-tokens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.token-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.token-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.token-bad {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.health-box-details {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
}

.vault-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.vault-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

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

/* FORMS */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0a0b12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hint {
  display: block;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* TABLE */
.table-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* TABLE TOOLBAR & SEARCH BAR */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 440px;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #a855f7;
  pointer-events: none;
  opacity: 0.85;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 42px;
  background: rgba(14, 16, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.22), 0 0 16px rgba(168, 85, 247, 0.15);
  background: rgba(18, 20, 38, 0.95);
}

.search-input::placeholder {
  color: #64748b;
  font-size: 13px;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
}

.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.search-clear-btn.hidden {
  display: none !important;
}

.search-stats {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-stats .count-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.5px;
}

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

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

.data-table th {
  padding: 14px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.data-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* PILLS & BADGES */
.pill-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}

.pill-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.pill-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.pill-red {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.filter-paid-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

/* ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 18px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* PROJECTS DISPLAY */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #0a0b12;
}

.project-body {
  padding: 14px;
}

.project-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-user {
  font-size: 12px;
  color: var(--text-muted);
}

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

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* LIVE AUTO-SYNC STATUS PULSE */
.sync-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.sync-pulse-badge small {
  font-size: 11px;
  opacity: 0.85;
  font-weight: normal;
}

.sync-pulse-badge.sync-active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.sync-pulse-badge.sync-idle {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.sync-pulse-badge.sync-dead {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.sync-pulse-badge .sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sync-active .sync-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
}

.sync-idle .sync-dot {
  background: #f59e0b;
}

.sync-dead .sync-dot {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}