/* ==========================================================================
   REBELPRINTZ // DEEP OBSIDIAN GLOSSY GLASSMORPHISM THEME
   Inspired by High-End Studio Dashboard & 3D Printer Farm Environment
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-card-glass: rgba(15, 18, 29, 0.78);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-top: rgba(255, 255, 255, 0.22);
  
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #080a12;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.015em;
  position: relative;
}

/* User's 3D Printer Background Image - Exactly 40% Visibility */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('assets/user_printer_bg.webp') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.40; /* Exactly 40% visibility requested by user */
  z-index: -2;
  pointer-events-none;
}

/* Subtle Vignette Scrim over 40% visible 3D printer background */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(6, 8, 14, 0.15) 0%, rgba(6, 8, 14, 0.5) 100%);
  z-index: -1;
  pointer-events-none;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   GLOSSY GLASSMORPHISM CONTAINERS
   ========================================================================== */

/* Main Glossy Dashboard Floating Shell with Exactly 40% Background Visibility */
.glass-shell {
  position: relative;
  background: rgba(11, 14, 25, 0.55);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
}

.glass-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/user_printer_bg.webp') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.40; /* Exactly 40% visibility inside main dashboard */
  z-index: 0;
  pointer-events-none;
}

/* Ensure all content inside .glass-shell is crisp and sits above the 40% background */
.glass-shell > * {
  position: relative;
  z-index: 1;
}

/* Glossy Cards */
.glossy-card {
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.72) 0%, rgba(13, 16, 27, 0.85) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.glossy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 24px rgba(99, 102, 241, 0.15);
}

/* Reference Image: Solid Indigo Accent Card (#6388F1) */
.card-indigo-solid {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  color: #ffffff;
}

/* Reference Image: Top Metric Cards */
.metric-box-obsidian {
  background: rgba(14, 17, 28, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Category Portal Cards */
.portal-card-glossy {
  background: linear-gradient(135deg, rgba(22, 27, 43, 0.75) 0%, rgba(13, 16, 27, 0.85) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 22px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.portal-card-glossy:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.2);
}

/* 3D Sandbox Glass Container */
.sandbox-glass {
  background: linear-gradient(135deg, rgba(16, 20, 34, 0.8) 0%, rgba(10, 13, 23, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 22px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 14px 30px rgba(0,0,0,0.5);
}

/* ==========================================================================
   BUTTONS & CONTROLS (GLOSSY OBSIDIAN)
   ========================================================================== */

/* Primary Glossy Indigo Button */
.btn-glossy-indigo {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-weight: 800;
  padding: 9px 20px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-glossy-indigo:hover {
  background: linear-gradient(135deg, #818cf8 0%, #4338ca 100%);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Secondary Glossy Translucent Button */
.btn-glossy-glass {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-glossy-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Header Navigation Pills */
.nav-pill-obsidian {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  color: #94a3b8;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  background: transparent;
}

.nav-pill-obsidian:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-pill-obsidian.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Category Filter Tabs (Pills) */
.pill-tab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 20, 32, 0.7);
  backdrop-filter: blur(12px);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.pill-tab:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(24, 30, 48, 0.85);
}

.pill-tab.active {
  color: #ffffff;
  background: #6366f1;
  border-color: #818cf8;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}

/* Deep Obsidian Inputs */
.input-clean {
  background: rgba(10, 13, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f8fafc;
  width: 100%;
  transition: all 0.15s ease;
  backdrop-filter: blur(10px);
}

.input-clean:focus {
  background: rgba(14, 18, 30, 0.95);
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Product Cards in Obsidian Theme */
.product-card {
  background: linear-gradient(135deg, rgba(18, 22, 35, 0.8) 0%, rgba(12, 15, 26, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.2);
}

/* Product Code Badges */
.badge-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 18, 28, 0.9);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-code-lamp {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.badge-code-gear {
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.12);
}

.badge-code-art {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.35);
  background: rgba(244, 114, 182, 0.12);
}

.badge-code-model {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.12);
}

.badge-custom {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.4);
  text-transform: uppercase;
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 10, 16, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}
/* ==========================================================================
   ADMIN DASHBOARD & FORM STYLING
   ========================================================================== */

/* Admin Tabs Pill Navigation */
/* Segmented Admin Pill Navigation */
.admin-tab-pill {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  color: #94a3b8;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-tab-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab-pill.active {
  color: #ffffff !important;
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.admin-tab-pill.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Drag and Drop Zone */
.admin-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.admin-dropzone:hover, .admin-dropzone.dragover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Color Tag Checkbox Pill */
.color-tag-pill {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  user-select: none;
}

.color-tag-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.color-tag-pill.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #6366f1;
  border-color: #818cf8;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Toast Notifications */
.toast-bubble {
  padding: 12px 18px;
  border-radius: 14px;
  backdrop-filter: blur(20px);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
  max-width: 380px;
}

.toast-success {
  background: rgba(6, 78, 59, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ecfdf5;
}

.toast-error {
  background: rgba(136, 19, 55, 0.9);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #fff1f2;
}

.toast-info {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #f1f5f9;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Wishlist heart button styling & bounce */
.wishlist-btn {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.wishlist-btn:active svg {
  transform: scale(0.85);
}


/* =========================================================================
   MOBILE RESPONSIVE POLISH & TOUCH OPTIMIZATIONS
   ========================================================================= */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

.pill-tab {
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (max-width: 640px) {
  .pill-tab {
    padding: 6px 12px;
    font-size: 11.5px;
  }
  
  .glass-shell {
    border-radius: 18px !important;
  }
}
