/* ── TanFashion Premium Design System ── */

* {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

*::-webkit-scrollbar {
  width: 6px;
}

*::-webkit-scrollbar-track {
  background: #0f172a;
}

*::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* ── Sidebar scrollbar (burgundy theme to match the sidebar gradient) ──
   The scrolling element is the <nav class="flex-1 overflow-y-auto"> inside
   the aside (and #saSidebar itself, which scrolls directly). */
.sidebar nav::-webkit-scrollbar,
#saSidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar nav::-webkit-scrollbar-track,
#saSidebar::-webkit-scrollbar-track {
  background: rgba(61, 12, 20, 0.6); /* deep burgundy, blends with gradient */
}

.sidebar nav::-webkit-scrollbar-thumb,
#saSidebar::-webkit-scrollbar-thumb {
  background: rgba(240, 168, 184, 0.35); /* soft rose — readable on burgundy */
  border-radius: 3px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover,
#saSidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 168, 184, 0.55);
}

/* Firefox */
.sidebar nav,
#saSidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 168, 184, 0.35) rgba(61, 12, 20, 0.6);
}

/* ── Base & Typography ── */
body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: #0f172a;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(123, 26, 44, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(123, 26, 44, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(123, 26, 44, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

input,
select,
textarea,
button {
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

::selection {
  background: rgba(123, 26, 44, 0.2);
  color: #fff;
}

/* ── Sidebar ── */
.sidebar {
  background: linear-gradient(180deg, #7B1A2C 0%, #5C131F 55%, #3D0C14 100%);
  border-right-color: rgba(240, 168, 184, 0.18);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(240, 168, 184, 0.12) 0%, rgba(123, 26, 44, 0.16) 50%, transparent 100%);
  pointer-events: none;
}

.sidebar-group-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.4);
  padding: 1.25rem 0.75rem 0.375rem;
  user-select: none;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin: 0.125rem 0;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-link:hover {
  background: rgba(148, 163, 184, 0.06);
  color: #e2e8f0;
}

.sidebar-link.active {
  background: rgba(123, 26, 44, 0.1);
  color: #C45A6A;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #C45A6A, #7B1A2C);
}

.sidebar-link svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link:hover svg {
  opacity: 1;
}

.sidebar-link.active svg {
  opacity: 1;
  color: #C45A6A;
}

.sidebar .text-slate-200,
.sidebar .text-slate-300 {
  color: #fff;
}

.sidebar .text-slate-500 {
  color: #f0a8b8;
}

.sidebar .sidebar-brand {
  background: linear-gradient(135deg, #fff, #f0a8b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(123, 26, 44, 0.08);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(123, 26, 44, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(123, 26, 44, 0.04);
  transform: translateY(-2px);
}

/* ── KPI Card ── */
.kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(123, 26, 44, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.2), rgba(196, 90, 106, 0.08), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.kpi-card:hover {
  border-color: rgba(123, 26, 44, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.kpi-card .kpi-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(123, 26, 44, 0.05), transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.kpi-card:hover .kpi-glow {
  opacity: 0.6;
}

/* ── Icon Wrappers ── */
.icon-gold {
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.15), rgba(123, 26, 44, 0.05));
  color: #C45A6A;
}

.icon-burgundy {
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.15), rgba(123, 26, 44, 0.05));
  color: #9B1B30;
}

.icon-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: #10b981;
}

.icon-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: #f59e0b;
}

.icon-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  color: #ef4444;
}

.icon-ocean {
  background: linear-gradient(135deg, rgba(10, 74, 122, 0.15), rgba(10, 74, 122, 0.05));
  color: #0A4A7A;
}

.icon-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  color: #8b5cf6;
}

.icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, #9B1B30, #7B1A2C);
  color: #ffffff;
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(123, 26, 44, 0.2);
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(123, 26, 44, 0.3);
}

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

.btn-secondary {
  background: rgba(51, 65, 85, 0.5);
  color: #e2e8f0;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(123, 26, 44, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(123, 26, 44, 0.15);
}

/* ── Quick Action Button ── */
.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(123, 26, 44, 0.08);
  border-radius: 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.quick-action:hover {
  border-color: rgba(123, 26, 44, 0.2);
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ── Subscription tabs ── */
.subscription-tab {
  color: #94a3b8;
  background: transparent;
}

.subscription-tab:hover {
  color: #f9d6de;
  background: rgba(123, 26, 44, 0.2);
}

.subscription-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #9B1B30, #7B1A2C);
  box-shadow: 0 4px 14px rgba(123, 26, 44, 0.24);
}

/* ── OTP Input ── */
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(123, 26, 44, 0.1);
  color: #fff;
}

.otp-input:focus {
  border-color: #C45A6A;
  box-shadow: 0 0 0 3px rgba(123, 26, 44, 0.15);
}

/* ── Card Hover ── */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ── Gradient Text ── */
.text-gradient {
  background: linear-gradient(135deg, #C45A6A, #F0A0AA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(123, 26, 44, 0.15);
  border-top-color: #C45A6A;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  max-width: 360px;
  animation: slideUp 0.3s ease;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap thead th {
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  border-bottom: 1px solid rgba(123, 26, 44, 0.06);
  white-space: nowrap;
  font-weight: 600;
}

.table-wrap tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
  font-size: 14px;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.table-wrap tbody tr {
  transition: all 0.15s ease;
}

.table-wrap tbody tr:hover td {
  background: rgba(123, 26, 44, 0.02);
}

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

/* ── Status Badges ── */
.badge-low-stock {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-out-stock {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-in-stock {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-inactive {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* ── Pulse Dot ── */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-dot.gold {
  background: #C45A6A;
}

.pulse-dot.gold::after {
  background: rgba(123, 26, 44, 0.4);
}

.pulse-dot.green {
  background: #10b981;
}

.pulse-dot.green::after {
  background: rgba(16, 185, 129, 0.4);
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Page Header ── */
.page-header {
  position: relative;
  padding-bottom: 0.5rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f1f5f9, #C45A6A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Page title and action bands ── */
#mainContent>main> :first-child:has(> h1, > div > h1),
#mainContent>main>.space-y-8> :first-child:has(h1),
#mainContent>main>.space-y-6> :first-child:has(h1) {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(196, 90, 106, 0.28);
  border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.97), rgba(92, 19, 31, 0.94));
  box-shadow: 0 10px 28px rgba(61, 12, 20, 0.2);
}

#mainContent>main> :first-child:has(> h1, > div > h1)::after,
#mainContent>main>.space-y-8> :first-child:has(h1)::after,
#mainContent>main>.space-y-6> :first-child:has(h1)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(240, 168, 184, 0.18), transparent 45%);
}

#mainContent>main> :first-child:has(> h1, > div > h1)>*,
#mainContent>main>.space-y-8> :first-child:has(h1)>*,
#mainContent>main>.space-y-6> :first-child:has(h1)>* {
  position: relative;
  z-index: 1;
}

#mainContent>main> :first-child:has(> h1, > div > h1) h1,
#mainContent>main>.space-y-8> :first-child:has(h1) h1,
#mainContent>main>.space-y-6> :first-child:has(h1) h1 {
  color: #fff;
  background: none;
  -webkit-text-fill-color: currentColor;
}

#mainContent>main> :first-child:has(> h1, > div > h1) :where(.text-slate-300, .text-slate-400, .text-slate-500),
#mainContent>main>.space-y-8> :first-child:has(h1) :where(.text-slate-300, .text-slate-400, .text-slate-500),
#mainContent>main>.space-y-6> :first-child:has(h1) :where(.text-slate-300, .text-slate-400, .text-slate-500) {
  color: #f9d6de;
}

#mainContent>main> :first-child:has(> h1, > div > h1) a,
#mainContent>main>.space-y-8> :first-child:has(h1) a,
#mainContent>main>.space-y-6> :first-child:has(h1) a {
  color: #fff;
}

#mainContent>main> :first-child:has(> h1, > div > h1) svg,
#mainContent>main>.space-y-8> :first-child:has(h1) svg,
#mainContent>main>.space-y-6> :first-child:has(h1) svg {
  color: #f0a8b8;
}

/* ── Form Inputs ── */
.input-glass {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(123, 26, 44, 0.08);
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.input-glass:focus {
  border-color: #C45A6A;
  box-shadow: 0 0 0 3px rgba(123, 26, 44, 0.12);
  background: rgba(15, 23, 42, 0.8);
}

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

/* ── Select Glass ── */
select.input-glass {
  cursor: pointer;
  height: 42px;
  padding-block: 0;
}

/* A button borrowing the glass input style must size to its content,
   not stretch to 100% like a form control (e.g. the quick-add customer
   button next to the Customer select in the New Sale modal). */
button.input-glass {
  width: auto;
}

select.input-glass option {
  background: #1e293b;
  color: #e2e8f0;
}

/* ── Modal ── */
.modal-overlay {
  animation: fadeIn 0.2s ease;
}

.modal-overlay>div {
  animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Shimmer Loading ── */
.shimmer {
  background: linear-gradient(90deg, rgba(123, 26, 44, 0.06) 25%, rgba(123, 26, 44, 0.1) 50%, rgba(123, 26, 44, 0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Stat Value ── */
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ── Divider with gradient ── */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 26, 44, 0.2), transparent);
}

/* ── Chart Container ── */
.chart-container {
  position: relative;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 1rem;
  border: 1px solid rgba(123, 26, 44, 0.06);
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.chart-container:hover {
  border-color: rgba(123, 26, 44, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ── Table Card ── */
.table-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(123, 26, 44, 0.06);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.table-card:hover {
  border-color: rgba(123, 26, 44, 0.1);
}

/* ── Section Title ── */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

/* ── Sidebar brand ── */
.sidebar-brand {
  background: linear-gradient(135deg, #C45A6A, #F0A0AA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Accent link ── */
.gold-link {
  color: #C45A6A;
  transition: color 0.2s ease;
}

.gold-link:hover {
  color: #F0A0AA;
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {

  .table-wrap td,
  .table-wrap th {
    padding: 10px 12px;
    font-size: 13px;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }

  .toast {
    left: 16px;
    right: 16px;
    max-width: none;
    bottom: 16px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* ── ── ── ── ── ── ── ──
   LIGHT THEME OVERRIDES
   ── ── ── ── ── ── ── ── */

html.light body {
  background: #f8fafc;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(123, 26, 44, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(123, 26, 44, 0.02) 0%, transparent 50%);
}

html.light .sidebar {
  border-right-color: #e2e8f0;
}

html.light .sidebar {
  background: linear-gradient(180deg, #7B1A2C 0%, #5C131F 55%, #3D0C14 100%);
  border-right-color: rgba(240, 168, 184, 0.25);
}

html.light .sidebar::before {
  background: linear-gradient(180deg, rgba(240, 168, 184, 0.14) 0%, rgba(123, 26, 44, 0.12) 50%, transparent 100%);
}

html.light .sidebar::before {
  background: linear-gradient(180deg, rgba(240, 168, 184, 0.14) 0%, rgba(123, 26, 44, 0.12) 100%);
}

html.light .sidebar-link {
  color: #f9d6de;
}

html.light .sidebar-link:hover {
  background: rgba(240, 168, 184, 0.14);
  color: #fff;
}

html.light .sidebar-link.active {
  background: rgba(240, 168, 184, 0.2);
  color: #fff;
}

html.light .sidebar-link.active svg {
  color: #fff;
}

html.light .sidebar-group-header {
  color: rgba(249, 214, 222, 0.7);
}

/* Light mode: dark slate backgrounds → light */
html.light .bg-slate-800 {
  background-color: #f1f5f9;
}

html.light :where([class*=" bg-slate-800/95"],
  [class^="bg-slate-800/95"]) {
  background-color: rgba(255, 255, 255, 0.95);
}

html.light :where([class*=" bg-slate-800/60"],
  [class^="bg-slate-800/60"]) {
  background-color: rgba(255, 255, 255, 0.60);
}

html.light :where([class*=" bg-slate-800/40"],
  [class^="bg-slate-800/40"]) {
  background-color: rgba(255, 255, 255, 0.40);
}

html.light :where([class*=" bg-slate-900/80"],
  [class^="bg-slate-900/80"]) {
  background-color: rgba(255, 255, 255, 0.85);
}

/* Light mode: button/icon backgrounds */
html.light .bg-slate-700 {
  background-color: #e2e8f0;
}

html.light .bg-slate-700\/30 {
  background-color: #f1f5f9;
}

html.light .bg-slate-700\/50 {
  background-color: #e2e8f0;
}

html.light select option {
  background: #ffffff;
  color: #1e293b;
}

/* Light mode accent text */
html.light .text-gold-400 {
  color: #9B1B30;
}

html.light .text-gold-300 {
  color: #C45A6A;
}

html.light .text-emerald-400 {
  color: #059669;
}

html.light .text-amber-400 {
  color: #d97706;
}

html.light .text-red-400 {
  color: #dc2626;
}

html.light .glass-card,
html.light .gradient-border,
html.light .kpi-card,
html.light .table-card,
html.light .chart-container,
html.light .quick-action {
  background: rgba(255, 255, 255, 0.8);
  border-color: #e2e8f0;
}
html.light .quick-action {
  color: #334155;
}
html.light .quick-action:hover {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(123, 26, 44, 0.25);
}
html.light .subscription-tab {
  color: #64748b;
}
html.light .subscription-tab:hover {
  color: #7B1A2C;
  background: rgba(123, 26, 44, 0.08);
}
html.light .subscription-tab.active {
  color: #fff;
}

html.light .kpi-card::before {
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.15), rgba(123, 26, 44, 0.05), transparent 60%);
}

html.light .section-title {
  color: #0f172a;
}

html.light .text-slate-200 {
  color: #334155;
}

html.light .text-slate-300 {
  color: #475569;
}

html.light .text-slate-400 {
  color: #64748b;
}

html.light .text-slate-500 {
  color: #64748b;
}

html.light .text-slate-600 {
  color: #94a3b8;
}

html.light .text-white {
  color: #0f172a;
}

/* Keep white text on gradient/colored backgrounds in light mode */
html.light .btn-primary,
html.light [class*="from-gold-"],
html.light [class*="from-burgundy-"],
html.light [class*="from-emerald-"],
html.light [class*="from-amber-"],
html.light [class*="from-red-"] {
  color: #ffffff;
}

html.light :where([class*=" bg-gold-"]):where(.text-white),
html.light :where([class*=" bg-burgundy-"]):where(.text-white) {
  color: #ffffff;
}

html.light .toast .text-white {
  color: #ffffff;
}

html.light .border-slate-700\/50,
html.light .border-slate-700\/30,
html.light .border-slate-700\/40,
html.light .border-slate-800\/60,
html.light .border-slate-600\/50 {
  border-color: #e2e8f0;
}

html.light input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
html.light select,
html.light textarea {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}

html.light .input-glass {
  background: rgba(248, 250, 252, 0.8);
  color: #1e293b;
  border-color: #cbd5e1;
}

html.light .input-glass:focus {
  border-color: #9B1B30;
  box-shadow: 0 0 0 3px rgba(123, 26, 44, 0.1);
  background: #fff;
}

html.light .table-wrap th,
html.light .table-wrap td {
  border-bottom-color: #e2e8f0;
}

html.light .hover\:bg-slate-700\/50:hover {
  background-color: #e2e8f0 !important;
}

html.light .hover\:bg-slate-700\/30:hover {
  background-color: #e2e8f0 !important;
}

html.light .hover\:bg-slate-600:hover {
  background-color: #cbd5e1 !important;
}

html.light .hover\:bg-slate-700:hover {
  background-color: #cbd5e1 !important;
}

html.light .hover\:text-white:hover {
  color: #0f172a !important;
}

html.light .card-hover:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}

html.light .kpi-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

html.light .page-header h1 {
  background: linear-gradient(135deg, #0f172a, #9B1B30);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.light .icon-gold {
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.1), rgba(123, 26, 44, 0.03));
}

html.light .icon-burgundy {
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.1), rgba(123, 26, 44, 0.03));
}

html.light .icon-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
}

html.light .icon-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.03));
}

html.light .icon-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.03));
}

html.light .icon-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.03));
}

html.light * {
  scrollbar-color: #cbd5e1 #f1f5f9;
}

html.light *::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.light *::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

html.light .table-wrap tbody tr:hover td {
  background: rgba(123, 26, 44, 0.02);
}

html.light .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #9B1B30, #7B1A2C);
}

html.light .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(123, 26, 44, 0.2);
}

/* Keep sidebar identity text readable in every theme mode. */
.sidebar .text-slate-300,
.sidebar .text-slate-200 {
  color: #ffffff !important;
}

.sidebar .text-slate-500 {
  color: #f0a8b8 !important;
}

.sidebar .sidebar-brand {
  background: linear-gradient(135deg, #ffffff, #f0a8b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar scrollbar in LIGHT theme too — the sidebar keeps its burgundy
   gradient in both themes, so the scrollbar must match it in both.
   (html.light *::-webkit-scrollbar-* has higher specificity than the
   .sidebar nav rules above, so light-mode rules must be restated here.) */
html.light .sidebar nav::-webkit-scrollbar-track,
html.light #saSidebar::-webkit-scrollbar-track {
  background: rgba(61, 12, 20, 0.6);
}

html.light .sidebar nav::-webkit-scrollbar-thumb,
html.light #saSidebar::-webkit-scrollbar-thumb {
  background: rgba(240, 168, 184, 0.35);
}

html.light .sidebar nav::-webkit-scrollbar-thumb:hover,
html.light #saSidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 168, 184, 0.55);
}

html.light .sidebar nav,
html.light #saSidebar {
  scrollbar-color: rgba(240, 168, 184, 0.35) rgba(61, 12, 20, 0.6);
}