/* Base styles */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 5% 35%;  /* 2026-03-24 — bumped for light mode contrast */
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
}

.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
  overflow: hidden;
  min-height: 3.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: bold;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-cont {
  flex-shrink: 0;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: hsl(var(--accent));
}

.light-icon {
  display: none;
}

.dark-icon {
  display: block;
}

.dark .light-icon {
  display: block;
}

.dark .dark-icon {
  display: none;
}

.sidebar-separator {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 0.5rem 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  margin-bottom: 0.25rem;
}

.sidebar-menu-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.sidebar-menu-button:hover {
  background-color: hsl(var(--accent));
}

.sidebar-menu-button.active {
  background-color: hsl(var(--accent));
  font-weight: 500;
}

.sidebar-menu-button i,
.sidebar-menu-button svg {
  margin-right: 0.75rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.logout-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.logout-button:hover {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.content {
  flex: 1;
  min-width: 0; /* 2026-03-27 — prevent flex overflow when sidebar + content exceed viewport */
  margin-left: 250px;
  padding: 1.5rem;
  transition: margin-left 0.3s ease;
}

.content.expanded {
  margin-left: 0;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background-color: hsl(var(--accent));
}

.sidebar-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.expanded {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }
}

/* Storage Units View */
.page-header {
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted {
  color: hsl(var(--muted-foreground));
}

.search-container {
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.search-input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.storage-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 0 320px;
}

.storage-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 100%, hsla(189, 99%, 26%, 0.2) 0px, transparent 50%);
  pointer-events: none;
}

.storage-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(to bottom right, transparent 50%, rgba(0, 200, 255, 0.1) 100%);
  border-radius: inherit;
  pointer-events: none;
}

.unit-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.unit-description {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.unit-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.separator {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 1rem 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  margin-right: 0.5rem;
}

.feature-icon i {
  font-size: 0.625rem;
  color: #3b82f6;
}

.glow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  color: white;
  border: none;
  border-radius: 9999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.glow-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: rotate(30deg);
  transition: transform 0.5s;
  pointer-events: none;
}

.glow-button:hover::before {
  transform: rotate(0deg);
}

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.button-outline:hover {
  background-color: hsl(var(--accent));
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.loading-spinner i {
  font-size: 2rem;
  color: hsl(var(--primary));
}

/* Authentication Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: hsl(var(--background));
}

.auth-card {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form label {
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-form input {
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.auth-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.auth-link a {
  color: #3b82f6;
  text-decoration: underline;
}

/* User Info Styles */
.user-info {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Profile View Styles */
.profile-view {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-card {
  margin-top: 1.5rem;
}

.profile-card-header {
  margin-bottom: 1.5rem;
}

.profile-card-header h2 {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
}

.profile-card-header h2 i {
  margin-right: 0.5rem;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar i {
  font-size: 2rem;
  color: #3b82f6;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-label {
  font-weight: 500;
  margin-right: 0.5rem;
}

.profile-form {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.profile-card-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* My Units View Styles */
.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.unit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.unit-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.status-active {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-expired {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.unit-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.access-code-container {
  background-color: hsl(var(--muted));
  padding: 1rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.access-code {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
}

.copy-button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.copy-button i {
  margin-left: 0.25rem;
}

/* Cart View Styles */
.cart-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) { /* 2026-03-27 — raised from 768px to account for 250px sidebar */
  .cart-container {
    grid-template-columns: 1fr minmax(280px, 1fr);
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  padding: 1rem;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.remove-item-button {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
}

.remove-item-button:hover {
  color: hsl(var(--destructive));
  background-color: rgba(239, 68, 68, 0.1);
}

.cart-summary {
  height: fit-content;
}

.cart-summary-header {
  margin-bottom: 1rem;
}

.cart-summary-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
}

.cart-total-row {
  font-weight: 700;
  padding-top: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  margin-top: 0.25rem;
}

.cart-summary-footer {
  margin-top: 1.5rem;
}

.checkout-button {
  width: 100%;
}

.checkout-button i {
  margin-right: 0.5rem;
}

.cart-terms {
  margin-top: 1rem;
  font-size: 0.825rem;
  color: #475569; /* 2026-03-24 — fixed light mode contrast (was 0.55 opacity) */
}

.dark .cart-terms {
  color: rgba(203, 213, 225, 0.65);
}

/* Empty State Styles */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon,
.empty-icon {
  font-size: 4rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Notification container with a muted green gradient */
.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #3a5240, #4a6c50); /* Muted greens */
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  box-shadow: 0 0 15px rgba(74, 108, 80, 0.6);
  width: 320px;
  overflow: hidden;
  animation: slideIn 0.5s forwards, fadeOut 0.5s 2s forwards;
}

/* Legacy animation names kept for compatibility */
@keyframes slideIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* Check mark style */
.check-mark {
  font-size: 28px;
  color: #a5d6a7; /* A softer, light green */
  margin-right: 16px;
}

/* Notification content container */
.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Notification text */
.notification-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #e0e0e0;
}

/* Loading bar that indicates remaining time */
.loading-bar {
  height: 4px;
  background-color: rgba(165, 214, 167, 0.8); /* Softer green to match the check mark */
  border-radius: 2px;
  animation: loadBar 2s linear forwards;
}

/* Loading bar animation */
@keyframes loadBar {
  from { width: 100%; }
  to { width: 0%; }
}

/* ── Reduce motion for users who prefer it ── */
@media (prefers-reduced-motion: reduce) {
  .cont-icon .sparkle { animation: none; }
  .sidebar { transition: none; }
  .content { transition: none; }
  .glow-button { transition: none; }
  .cart-notification { animation: none; opacity: 1; transform: none; }
  .loading-bar { animation: none; }
}

/* ── Theme Toggle (merged from theme-toggle.css) ── */
.toggle-cont {
  --primary: #54a8fc;
  --light: #d9d9d9;
  --dark: #121212;
  position: relative;
  z-index: 10;
  width: fit-content;
  height: 24px;
  border-radius: 9999px;
  margin: 0;
  padding: 0;
}

.toggle-cont .toggle-input {
  display: none;
}

.toggle-cont .toggle-label {
  --gap: 2px;
  --width: 24px;
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 0;
  width: var(--width);
  height: 100%;
  background-color: transparent;
  border: none;
  border-radius: 9999px;
  box-sizing: content-box;
  transition: all 0.3s ease-in-out;
}

.toggle-label::before,
.toggle-label::after {
  display: none;
}

.toggle-cont .toggle-label .cont-icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--width);
  height: 24px;
  background-image: none;
  background-color: transparent;
  border: none;
  border-radius: 9999px;
  box-shadow: none;
  transition: transform 0.3s ease-in-out;
}

.cont-icon {
  overflow: visible;
  position: relative;
}

.cont-icon .sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: calc(var(--width) * 0.4px);
  aspect-ratio: 1;
  background-color: var(--light);
  border-radius: 50%;
  transform-origin: 50% 50%;
  rotate: calc(1deg * var(--deg));
  transform: translate(-50%, -50%);
  animation: sparkle calc(100s / var(--duration)) linear calc(0s / var(--duration)) infinite;
}

@keyframes sparkle {
  to {
    width: calc(var(--width) * 0.2px);
    transform: translate(2000%, -50%);
  }
}

.cont-icon .icon {
  width: 0.9rem;
  fill: #f8c156;
  transition: fill 0.3s ease;
}

html.dark .toggle-cont .toggle-label .cont-icon {
  transform: rotate(-225deg);
}

html.dark .cont-icon .icon {
  fill: var(--primary);
}

html.dark .toggle-cont .toggle-label .cont-icon .sparkle {
  z-index: -1;
  width: calc(var(--width) * 0.6px);
  background-color: #acacac;
  animation: sparkle-dark calc(100s / var(--duration)) linear calc(10s / var(--duration)) infinite;
}

@keyframes sparkle-dark {
  to {
    width: calc(var(--width) * 0.3px);
    transform: translate(5000%, -50%);
  }
}

/* Cart error notification */
.cart-notification.error {
  background: linear-gradient(135deg, #5c1a1a, #8b2a2a);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* Cart icon bounce when orb arrives */
@keyframes cartIconBounce {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.45) rotate(-12deg); }
  50%  { transform: scale(0.85) rotate(8deg); }
  75%  { transform: scale(1.2) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.cart-icon-bounce {
  animation: cartIconBounce 0.55s ease-in-out;
  filter: drop-shadow(0 0 8px #3b82f6) drop-shadow(0 0 16px #06b6d4);
}

/* Cart loading skeleton */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.cart-skeleton {
  background: linear-gradient(90deg,
    hsl(var(--muted)) 25%,
    hsl(var(--accent)) 50%,
    hsl(var(--muted)) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  height: 140px;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD CARD ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardGlowPulse {
  0%, 100% { box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 0 0 rgba(59,130,246,0); }
  50%       { box-shadow: 0 8px 32px rgba(59,130,246,0.15), 0 0 0 1px rgba(6,182,212,0.1); }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Staggered entrance for storage cards */
.storage-card {
  animation: cardFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.storage-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.18),
              0 4px 16px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(6, 182, 212, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.storage-card:nth-child(1) { animation-delay: 0.05s; }
.storage-card:nth-child(2) { animation-delay: 0.10s; }
.storage-card:nth-child(3) { animation-delay: 0.15s; }
.storage-card:nth-child(4) { animation-delay: 0.20s; }
.storage-card:nth-child(5) { animation-delay: 0.25s; }
.storage-card:nth-child(6) { animation-delay: 0.30s; }
.storage-card:nth-child(7) { animation-delay: 0.35s; }
.storage-card:nth-child(8) { animation-delay: 0.40s; }

/* Animated gradient on card price */
.unit-price.gradient-text,
.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #818cf8, #3b82f6);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 4s ease infinite;
}

/* Page header entrance */
.page-header {
  animation: cardFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #818cf8 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s ease infinite;
}

/* Search input glow on focus */
#search-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 0 20px rgba(6, 182, 212, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Sidebar animated gradient logo */
.logo a {
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #818cf8, #3b82f6);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

/* Sidebar menu items hover animation */
.sidebar-menu-button {
  transition: background-color 0.2s, transform 0.2s, color 0.2s;
}

.sidebar-menu-button:hover {
  transform: translateX(4px);
}

/* Glow button pulse on hover */
.glow-button {
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #3b82f6);
  background-size: 200% 100%;
  transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.glow-button:hover {
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.glow-button:active {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* Dashboard background ambient glow */
.content {
  position: relative;
}

.content::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.content::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: 10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Feature icon animation */
.feature-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s;
}

.storage-card:hover .feature-icon {
  transform: scale(1.2);
  background-color: rgba(59, 130, 246, 0.2);
}

/* Unit title hover gradient */
.storage-card:hover .unit-title {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

/* ══════════════════════════════════════════════════════
   CART PAGE — IMPROVED CONTRAST & PAYPAL STYLING
══════════════════════════════════════════════════════ */
.cart-view .page-header h1 {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #818cf8 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s ease infinite;
}

/* Summary card improved contrast */
#cart-summary.storage-card {
  background: linear-gradient(135deg,
    hsl(var(--card)) 0%,
    rgba(59, 130, 246, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.2);
}

.cart-summary-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cart-summary-row span {
  color: hsl(var(--foreground));
  font-weight: 500;
}

.cart-total-row span {
  font-size: 1.1rem;
  font-weight: 800;
}

.cart-total-row .cart-total {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* PayPal button container — add label + dark wrapper */
#paypal-button-container {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
  padding: 2px;
}

.dark #paypal-button-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* PayPal section label */
.cart-summary-footer::before {
  content: 'Secure Checkout';
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--foreground) / 0.6);
  margin-bottom: 10px;
}

.dark .cart-summary-footer::before {
  color: rgba(203, 213, 225, 0.75);
}

/* PayPal container entrance animation */
#paypal-button-container iframe {
  transition: opacity 0.4s ease !important;
}

/* Cart item cards entrance */
.cart-item.storage-card {
  animation: cardFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Remove button styled better */
.remove-item-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  color: rgba(239, 68, 68, 0.6) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.remove-item-button:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Cart item title gradient */
.cart-item-title {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.cart-item-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: hsl(var(--foreground));
}

/* ══════════════════════════════════════════════════════
   REDESIGNED NOTIFICATIONS — sleek toast style
══════════════════════════════════════════════════════ */
.cart-notification {
  position: fixed;
  bottom: 28px;
  right: 24px;
  top: auto;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  width: 300px;
  overflow: hidden;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             toastOut 0.35s ease-in 2.3s forwards;
  border-left: 3px solid #10b981;
}

.cart-notification.error {
  background: rgba(30, 12, 12, 0.92);
  border-left-color: #ef4444;
  box-shadow: 0 8px 40px rgba(239, 68, 68, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.06);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(8px) scale(0.95); }
}

.cart-notification .notification-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
  line-height: 1.3;
}

.cart-notification .loading-bar {
  height: 2px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 2px;
  animation: loadBar 2.3s linear forwards;
}

.cart-notification.error .loading-bar {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

/* Notification icon dot */
.cart-notification > span:first-child {
  font-size: 18px !important;
  margin-right: 0 !important;
}

/* 2026-03-24 — Light mode toast overrides (Option B: tinted bg) */
:root:not(.dark) .cart-notification {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 3px solid #10b981;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:root:not(.dark) .cart-notification.error {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-left: 3px solid #ef4444;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
}

:root:not(.dark) .cart-notification .notification-text {
  color: #065f46;
}

:root:not(.dark) .cart-notification.error .notification-text {
  color: #7f1d1d;
}

@media (prefers-reduced-motion: reduce) {
  .construction-banner { animation: none; transform: translateX(-50%); }
  .storage-card        { animation: none; }
  .cart-notification   { animation: none; opacity: 1; transform: none; }
  .glow-button         { transition: none; }
}

/* 2026-03-24 — Notification bell dropdown styles (light + dark) */

/* Container positioning */
.desktop-notification-container,
.mobile-notification-container {
  position: relative;
}

/* Bell button */
.notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s;
  position: relative;
}

.notification-btn:hover {
  background-color: hsl(var(--accent));
}

.notification-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Badge */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9999px;
  min-width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  padding: 0 0.2rem;
  pointer-events: none;
}

/* Dropdown panel */
.notification-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 500;
  overflow: hidden;
}

.notification-dropdown.open {
  display: block;
}

/* Header row */
.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 600;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
}

/* Mark all read button */
.mark-all-read {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: #3b82f6;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.mark-all-read:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* Notification list */
.notification-list {
  list-style: none;
  margin: 0;
  padding: 0.375rem 0;
  max-height: 320px;
  overflow-y: auto;
}

/* Individual item */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background-color: hsl(var(--accent));
}

.notification-item.unread {
  border-left-color: #3b82f6;
  background-color: hsl(var(--accent) / 0.5);
}

.notification-item-body {
  flex: 1;
  min-width: 0;
}

.notification-item-text {
  font-size: 0.85rem;
  color: hsl(var(--foreground));
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.notification-item-time {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Empty state */
.notification-list:empty::after {
  content: 'No notifications';
  display: block;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

/* Dark mode — extra shadow depth */
.dark .notification-dropdown {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Light mode — stronger border for definition */
:root:not(.dark) .notification-dropdown {
  border-color: #e2e8f0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
}

:root:not(.dark) .notification-item.unread {
  background-color: rgba(59, 130, 246, 0.05);
}

/* 2026-03-22 — Merged from theme-toggle.css */
/* Theme Toggle Button Styles - Blended Version */
.toggle-cont {
    --primary: #54a8fc;
    --light: #d9d9d9;
    --dark: #121212;
  
    position: relative;
    z-index: 10;
    width: fit-content;
    height: 24px;
    border-radius: 9999px;
    margin: 0;
    padding: 0;
  }
  
  .toggle-cont .toggle-input {
    display: none;
  }
  
  .toggle-cont .toggle-label {
    --gap: 2px;
    --width: 24px;
  
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding: 0;
    width: var(--width);
    height: 100%;
    background-color: transparent;
    border: none;
    border-radius: 9999px;
    box-sizing: content-box;
    transition: all 0.3s ease-in-out;
  }
  
  .toggle-label::before,
  .toggle-label::after {
    display: none; /* Remove the extra backgrounds */
  }
  
  .toggle-cont .toggle-label .cont-icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--width);
    height: 24px;
    background-image: none;
    background-color: transparent;
    border: none;
    border-radius: 9999px;
    box-shadow: none;
    transition: transform 0.3s ease-in-out;
  }
  
  .cont-icon {
    overflow: visible;
    position: relative;
  }
  
  .cont-icon .sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: calc(var(--width) * 0.4px);
    aspect-ratio: 1;
    background-color: var(--light);
    border-radius: 50%;
    transform-origin: 50% 50%;
    rotate: calc(1deg * var(--deg));
    transform: translate(-50%, -50%);
    animation: sparkle calc(100s / var(--duration)) linear calc(0s / var(--duration)) infinite;
  }
  
  @keyframes sparkle {
    to {
      width: calc(var(--width) * 0.2px);
      transform: translate(2000%, -50%);
    }
  }
  
  .cont-icon .icon {
    width: 0.9rem;
    fill: #f8c156; /* Light gold color for light mode */
    transition: fill 0.3s ease;
  }
  
  /* Dark mode styles - applied when html has .dark class */
  html.dark .toggle-cont .toggle-label .cont-icon {
    transform: rotate(-225deg);
  }
  
  html.dark .cont-icon .icon {
    fill: var(--primary); /* Blue color for dark mode */
  }
  
  html.dark .toggle-cont .toggle-label .cont-icon .sparkle {
    z-index: -1;
    width: calc(var(--width) * 0.6px);
    background-color: #acacac;
    animation: sparkle-dark calc(100s / var(--duration)) linear calc(10s / var(--duration)) infinite;
  }
  
  @keyframes sparkle-dark {
    to {
      width: calc(var(--width) * 0.3px);
      transform: translate(5000%, -50%);
    }
  }
  
  /* Hide the original theme toggle button */
  .theme-toggle {
    display: none;
  }
  
  /* Adjust the sidebar header to accommodate the toggle */
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    overflow: hidden;
    min-height: 3.5rem;
  }
  