:root {
  --accent: #d7604e;
  --accent-dark: #c24a3a;
  --accent-hover: #b54e3e;
  --dark: #1e293b;
  --tenary: #ecf7f8;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-body: #334155;
  --text-muted: #475569;
  --border: #e2e8f0;
  --bg-page: #f9fafb;
  --success: #10b981;
}

* {
  font-family: "Manrope", sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s ease;
}

body.dark-mode {
  background: #0f0f1e;
}

/* Animated gradient background */
body::before {
  content: "";
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: 0;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(147, 51, 234, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(59, 130, 246, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 10%,
      rgba(234, 88, 12, 0.06) 0%,
      transparent 50%
    );
  animation: gradientShift 20s ease infinite;
  transition: opacity 0.3s ease;
}

body.dark-mode::before {
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(147, 51, 234, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 10%,
      rgba(234, 88, 12, 0.1) 0%,
      transparent 50%
    );
}

@keyframes gradientShift {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Glassmorphism cards */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.08);
}

body.dark-mode .glass-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(147, 51, 234, 0.2),
    transparent
  );
}

body.dark-mode .glass-card::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
}

/* Navigation */
.nav-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

body.dark-mode .nav-glass {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

body.dark-mode .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(215, 96, 78, 0.05);
}

body.dark-mode .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-active {
  color: var(--accent) !important;
  background: rgba(215, 96, 78, 0.1);
}

body.dark-mode .nav-active {
  color: var(--accent) !important;
  background: rgba(215, 96, 78, 0.15);
}

.nav-active::after {
  width: 80% !important;
}

/* Avatar Dropdown */
.avatar-button {
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(215, 96, 78, 0.3);
}

.avatar-button:hover .avatar-circle {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(215, 96, 78, 0.4);
}

.avatar-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 200px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1000;
}

body.dark-mode .avatar-menu {
  background: rgba(31, 41, 55, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--dark);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
}

body.dark-mode .avatar-menu-item {
  color: #fff;
}

.avatar-menu-item:hover {
  background: rgba(215, 96, 78, 0.1);
  color: var(--accent);
}

body.dark-mode .avatar-menu-item:hover {
  background: rgba(215, 96, 78, 0.15);
}

.avatar-menu-item svg {
  flex-shrink: 0;
}

/* Logo text */
.logo-text {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* Text colors */
.text-themed {
  color: var(--dark);
  transition: color 0.3s ease;
}

body.dark-mode .text-themed {
  color: #fff;
}

.text-themed-secondary {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

body.dark-mode .text-themed-secondary {
  color: rgba(255, 255, 255, 0.6);
}

.text-themed-primary {
  color: var(--accent);
}

body.dark-mode .text-themed-primary {
  color: var(--accent);
}

/* Theme toggle button */
.theme-toggle {
  width: 64px;
  height: 32px;
  background: rgba(215, 96, 78, 0.2);
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(215, 96, 78, 0.3);
}

body.dark-mode .theme-toggle {
  background: rgba(215, 96, 78, 0.3);
  border-color: rgba(215, 96, 78, 0.5);
}

.theme-toggle-slider {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 12px;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(215, 96, 78, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .theme-toggle-slider {
  left: 34px;
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  color: white;
}

/* Accent button */
.accent-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 24px rgba(215, 96, 78, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.accent-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.accent-button:hover::before {
  left: 100%;
}

.accent-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(215, 96, 78, 0.6);
}

/* Gradient icons */
.gradient-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Gradient icons */
.gradient-icon svg {
  max-width: 30px;
}

.gradient-purple {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

.gradient-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

/* Glow effect */
.glow-text {
  text-shadow: 0 2px 20px rgba(147, 51, 234, 0.15);
}

/* Alert banners */
.alert-warning {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.15),
    rgba(245, 158, 11, 0.15)
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.1);
}

body.dark-mode .alert-warning {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.2),
    rgba(245, 158, 11, 0.2)
  );
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.alert-success {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15),
    rgba(6, 182, 212, 0.15)
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

body.dark-mode .alert-success {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(6, 182, 212, 0.2)
  );
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.alert-text {
  color: var(--dark);
}

body.dark-mode .alert-text {
  color: #ffffff;
}

.alert-text-secondary {
  color: var(--text-muted);
}

body.dark-mode .alert-text-secondary {
  color: rgba(255, 255, 255, 0.85);
}

/* Stat numbers glow */
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--dark) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 767px) {
  .stat-number-sm {
    font-size: 2rem;
  }
  .stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .stat-card-svg {
    width: 20px;
    height: 20px;
  }
  .stat-card:hover {
    transform: none;
  }
}

body.dark-mode .stat-number {
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gift card hover effect */
.gift-card-container {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gift-card-container:hover {
  transform: scale(1.05) translateY(-8px);
}

/* Action cards */
.action-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.1);
}

body.dark-mode .action-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-card:hover {
  border-color: rgba(215, 96, 78, 0.4);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(215, 96, 78, 0.2);
}

body.dark-mode .action-card:hover {
  border-color: rgba(215, 96, 78, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(215, 96, 78, 0.3);
}

/* Glass card hover - enhanced for dashboard */
.glass-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(215, 96, 78, 0.3);
  box-shadow:
    0 20px 60px rgba(215, 96, 78, 0.15),
    0 0 40px rgba(215, 96, 78, 0.1);
}

body.dark-mode .glass-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(215, 96, 78, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(215, 96, 78, 0.3);
}

/* Form inputs */
.form-input,
.form-select,
.form-textarea {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.5);
  color: var(--dark);
  transition: all 0.3s ease;
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(215, 96, 78, 0.1);
}

/* Secondary button */
.secondary-button {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.5);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

body.dark-mode .secondary-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(215, 96, 78, 0.3);
  color: var(--accent);
}

body.dark-mode .secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Alert error */
.alert-error {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.15),
    rgba(220, 38, 38, 0.15)
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  color: #991b1b;
}

body.dark-mode .alert-error {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.2),
    rgba(220, 38, 38, 0.2)
  );
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-info {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(37, 99, 235, 0.15)
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: #1e3a8a;
}

body.dark-mode .alert-info {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(37, 99, 235, 0.2)
  );
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Upload area (Settings page) */
.upload-area {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(203, 213, 225, 0.6);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

body.dark-mode .upload-area {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
}

.upload-area:hover {
  border-color: var(--accent);
  background: rgba(215, 96, 78, 0.05);
}

body.dark-mode .upload-area:hover {
  background: rgba(215, 96, 78, 0.1);
  border-color: var(--accent);
}

/* Table container (Orders page) */
.table-container {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.08);
}
body.dark-mode .table-container {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Status badge select chevron */
select.badge {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23374151%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e');
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 14px 14px;
}

body.dark-mode select.badge {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23e5e7eb%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e');
}

/* Status badges */
.badge-completed {
  background-color: rgba(16, 185, 129, 0.15);
  color: #065f46;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

body.dark-mode .badge-completed {
  background-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.badge-pending {
  background-color: rgba(251, 191, 36, 0.15);
  color: #92400e;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

body.dark-mode .badge-pending {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.badge-cancelled,
.badge-refunded {
  background-color: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

body.dark-mode .badge-cancelled,
body.dark-mode .badge-refunded {
  background-color: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: rgba(107, 114, 128, 0.4);
}

body.dark-mode .empty-icon {
  color: rgba(255, 255, 255, 0.2);
}

/* Image preview (Settings page) */
.img-preview {
  background: rgba(249, 250, 251, 0.8);
  border: 2px solid rgba(203, 213, 225, 0.5);
}

body.dark-mode .img-preview {
  background: rgba(31, 41, 55, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.img-preview-dark {
  background: rgba(31, 41, 55, 0.9);
}

body.dark-mode .img-preview-dark {
  background: rgba(17, 24, 39, 0.9);
}
