/* =============================================================================
   BIOPORT — ULTRA-PREMIUM VISIONOS LIQUID GLASS SYSTEM
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  /* ======================================================
     DEFAULT THEME — Matched to BioPort Homepage Palette
     Primary : #e91e8c (Hot Pink / Neon Magenta)
     Accent  : #7c3aed (Deep Violet / Purple)
     BG Void : #060914 (Ultra Deep Void Black)
     ====================================================== */
  --p-indigo:          #e91e8c;
  --p-cyan:            #7c3aed;
  --bg-void:           #060914;
  --bg-deep:           #0d1225;
  --bg-card:           rgba(13, 18, 37, 0.45);
  
  /* Glass Refraction Tokens */
  --border-glass:      rgba(255, 255, 255, 0.07);
  --border-glass-hi:   rgba(255, 255, 255, 0.15);
  --glass-opacity:     0.05;
  --glass-blur:        20px;
  
  /* Shadows */
  --shadow-premium:    0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-elevated:   0 30px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  
  /* Typography */
  --font-sans:         'Poppins', system-ui, -apple-system, sans-serif;
  --font-display:      'Jost', sans-serif;
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:       cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-sans) !important;
  background-color: var(--bg-void) !important;
  color: #f1f5f9 !important;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 🌀 Modern Clean Ambient Grid & Aurora (No floating/spinning orbs) */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-void) !important;
}

.aurora-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(233, 30, 140, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(124, 58, 237, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(233, 30, 140, 0.06) 0%, transparent 55%);
  opacity: 1;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 70%, transparent 100%);
}

/* 💎 Premium Liquid Glass Sidebar */
.p-sidebar {
  position: fixed;
  inset-y: 0;
  left: 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  z-index: 70;
  background: rgba(8, 12, 20, 0.6) !important;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-right: 1px solid var(--border-glass);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);
  transition: width 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth);
  overflow: hidden;
}

.p-sidebar.collapsed {
  width: 76px;
}

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

.p-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--p-indigo), var(--p-cyan)) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.p-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.3s, max-width 0.35s var(--ease-smooth);
}

.p-sidebar.collapsed .p-brand-name {
  max-width: 0;
  opacity: 0;
}

.p-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide default Firefox scrollbar */
  mask-image: linear-gradient(to bottom, transparent, black 12px, black calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12px, black calc(100% - 12px), transparent);
}

.p-nav:hover {
  scrollbar-width: thin; /* Show thin Firefox scrollbar on hover */
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Webkit Scrollbar Customizations */
.p-nav::-webkit-scrollbar {
  width: 5px;
}

.p-nav::-webkit-scrollbar-track {
  background: transparent;
}

.p-nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 99px;
  transition: background-color 0.3s ease;
}

.p-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.p-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

.p-nav-section {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0 10px;
  margin-bottom: 8px;
  margin-top: 20px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.3s;
}

.p-sidebar.collapsed .p-nav-section {
  opacity: 0;
}

.p-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.25s var(--ease-smooth);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid transparent;
}

.p-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.03);
}

.p-nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.p-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--p-indigo);
  box-shadow: 0 0 10px var(--p-indigo);
}

.p-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.25s var(--ease-smooth);
  color: #64748b;
}

.p-nav-item:hover .p-nav-icon {
  color: #ffffff;
  transform: scale(1.05);
}

.p-nav-item.active .p-nav-icon {
  color: var(--p-indigo);
  background: rgba(255, 255, 255, 0.02);
}

.p-nav-label {
  transition: opacity 0.3s, max-width 0.35s var(--ease-smooth);
  max-width: 200px;
}

.p-sidebar.collapsed .p-nav-label {
  max-width: 0;
  opacity: 0;
}

/* 🏛️ Topbar */
.p-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(8, 12, 20, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

/* 🔮 iOS Liquid Glass Cards */
.glass-card, .p-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  border: 1px solid var(--border-glass) !important;
  box-shadow: var(--shadow-premium) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), border-color 0.3s;
}

.glass-card::before, .p-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.glass-card:hover, .p-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: var(--shadow-elevated) !important;
}

.p-stat {
  padding: 24px;
}

.p-stat-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.p-stat-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: #ffffff;
}

.p-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
}

.p-stat-badge.up {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.p-stat-badge.down {
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.15);
}

.p-action-card {
  padding: 24px;
  text-decoration: none;
  display: block;
}

.p-action-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
  transition: transform 0.35s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.p-card:hover .p-action-icon-wrap {
  transform: scale(1.05);
}

.p-action-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.p-action-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 4px;
}

.icon-indigo  { background: rgba(59, 130, 246, 0.1); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.15); }
.icon-emerald { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.15); }
.icon-violet  { background: rgba(99, 102, 241, 0.1); color: #c4b5fd; border: 1px solid rgba(99, 102, 241, 0.15); }
.icon-cyan    { background: rgba(0, 242, 254, 0.1); color: #67e8f9; border: 1px solid rgba(0, 242, 254, 0.15); }
.icon-pink    { background: rgba(244, 63, 94, 0.1); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.15); }
.icon-amber   { background: rgba(245, 158, 11, 0.1); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.15); }

/* Buttons Overhaul */
.p-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--p-indigo) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: all 0.25s var(--ease-smooth);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.p-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.p-btn-primary:active {
  transform: scale(0.98);
}

.p-btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-glass) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: all 0.25s var(--ease-smooth);
  cursor: pointer;
}

.p-btn-glass:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff;
}

.p-page-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #ffffff;
}

.p-page-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 4px;
}

.p-main {
  position: relative;
  z-index: 1;
  height: 100dvh;
  min-height: 0;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: margin-left 0.35s var(--ease-smooth);
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.p-main::-webkit-scrollbar {
  width: 6px;
}
.p-main::-webkit-scrollbar-track {
  background: transparent;
}
.p-main::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}
.p-main::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

.p-main.sidebar-collapsed {
  margin-left: 76px;
}

.p-content {
  flex: 1;
  padding: 32px 36px 40px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* 🎛️ Form Controls */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
  background: rgba(8, 12, 20, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  transition: all 0.2s var(--ease-smooth) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--p-indigo) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
}

/* 📋 Dashboard List & Item Styles */
.p-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  transition: all 0.2s var(--ease-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.p-list-row:last-child {
  border-bottom: none;
}

.p-list-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.p-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
  .p-sidebar {
    transform: translateX(-100%);
  }
  .p-sidebar.mobile-open {
    transform: translateX(0);
  }
  .p-main {
    margin-left: 0 !important;
  }
  .p-content {
    padding: 24px 20px 32px;
  }
}
