@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --epjs-ink: #17130f;
  --epjs-charcoal: #24201b;
  --epjs-espresso: #342820;
  --epjs-ivory: #fbf8f1;
  --epjs-paper: #fffdf8;
  --epjs-champagne: #eadfca;
  --epjs-line: #dfd2bd;
  --epjs-line-strong: #cbb894;
  --epjs-gold: #8b611f;
  --epjs-gold-soft: #d8b269;
  --epjs-ruby: #7c2f3a;
  --epjs-jade: #2f695d;
  --epjs-blue: #273c55;
  --epjs-muted: #74685b;
  --epjs-shadow: 0 18px 46px rgba(31, 25, 18, 0.08);
  --epjs-radius: 8px;
}

html,
body,
#root {
  min-height: 100%;
  background: var(--epjs-ivory) !important;
  color: var(--epjs-ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body {
  font-feature-settings: "cv02", "cv03", "cv04", "tnum";
}

* {
  letter-spacing: 0 !important;
}

h1,
h2,
h3,
[class*="text-4xl"],
[class*="text-5xl"] {
  font-family: "Playfair Display", Georgia, serif !important;
  color: var(--epjs-ink) !important;
  font-weight: 700 !important;
}

p,
span,
label,
small {
  text-wrap: pretty;
}

/* App Surfaces */
[class*="bg-slate-50"],
[class*="bg-slate-100"],
[class*="bg-gray-50"],
[class*="bg-gray-100"] {
  background-color: var(--epjs-ivory) !important;
}

[class*="bg-white"] {
  background-color: var(--epjs-paper) !important;
}

[class*="border-slate-100"],
[class*="border-slate-200"],
[class*="border-gray-100"],
[class*="border-gray-200"],
[class*="divide-slate-100"],
[class*="divide-slate-200"] {
  border-color: var(--epjs-line) !important;
}

[class*="text-slate-900"],
[class*="text-gray-900"] {
  color: var(--epjs-ink) !important;
}

[class*="text-slate-700"],
[class*="text-slate-600"],
[class*="text-gray-700"],
[class*="text-gray-600"] {
  color: var(--epjs-charcoal) !important;
}

[class*="text-slate-500"],
[class*="text-slate-400"],
[class*="text-gray-500"],
[class*="text-gray-400"] {
  color: var(--epjs-muted) !important;
}

[class*="rounded-xl"],
[class*="rounded-2xl"],
[class*="rounded-3xl"],
[class*="rounded-lg"] {
  border-radius: var(--epjs-radius) !important;
}

[class*="shadow"],
[class*="shadow-md"],
[class*="shadow-lg"],
[class*="shadow-xl"] {
  box-shadow: var(--epjs-shadow) !important;
}

/* Navigation */
[class*="md:w-64"],
[class*="w-64"][class*="fixed"],
aside[class*="fixed"],
nav[class*="fixed"] {
  background:
    linear-gradient(180deg, rgba(52, 40, 32, 0.96), rgba(23, 19, 15, 0.98)),
    var(--epjs-ink) !important;
  border-color: rgba(216, 178, 105, 0.18) !important;
  color: #fff8ed !important;
}

[class*="md:w-64"] *,
[class*="w-64"][class*="fixed"] *,
aside[class*="fixed"] *,
nav[class*="fixed"] * {
  color: inherit;
}

[class*="md:w-64"] a,
[class*="md:w-64"] button,
[class*="w-64"][class*="fixed"] a,
[class*="w-64"][class*="fixed"] button,
aside[class*="fixed"] a,
aside[class*="fixed"] button,
nav[class*="fixed"] a,
nav[class*="fixed"] button {
  border-radius: var(--epjs-radius) !important;
  color: rgba(255, 248, 237, 0.76) !important;
}

[class*="md:w-64"] a:hover,
[class*="md:w-64"] button:hover,
[class*="w-64"][class*="fixed"] a:hover,
[class*="w-64"][class*="fixed"] button:hover,
aside[class*="fixed"] a:hover,
aside[class*="fixed"] button:hover,
nav[class*="fixed"] a:hover,
nav[class*="fixed"] button:hover {
  background: rgba(216, 178, 105, 0.14) !important;
  color: #fff8ed !important;
}

[class*="md:w-64"] [class*="bg-slate"],
[class*="md:w-64"] [class*="bg-indigo"],
[class*="md:w-64"] [class*="bg-blue"],
[class*="w-64"][class*="fixed"] [class*="bg-slate"],
[class*="w-64"][class*="fixed"] [class*="bg-indigo"],
[class*="w-64"][class*="fixed"] [class*="bg-blue"],
aside[class*="fixed"] [class*="bg-slate"],
aside[class*="fixed"] [class*="bg-indigo"],
aside[class*="fixed"] [class*="bg-blue"] {
  background: rgba(216, 178, 105, 0.16) !important;
  border-color: rgba(216, 178, 105, 0.28) !important;
}

/* Headers and Cards */
[class*="border-b"] {
  border-color: var(--epjs-line) !important;
}

[class*="p-6"][class*="space-y"],
[class*="p-4"][class*="space-y"],
[class*="overflow-hidden"][class*="border"],
[class*="rounded"][class*="border"] {
  background-color: var(--epjs-paper) !important;
  border-color: var(--epjs-line) !important;
}

[class*="bg-gradient"] {
  background-image: linear-gradient(135deg, #fffdf8, #f4eadc) !important;
}

/* Controls */
input,
select,
textarea,
[role="combobox"] {
  border-color: var(--epjs-line) !important;
  background-color: #fffdf8 !important;
  color: var(--epjs-ink) !important;
  border-radius: var(--epjs-radius) !important;
}

input:focus,
select:focus,
textarea:focus,
[role="combobox"]:focus {
  border-color: var(--epjs-gold) !important;
  box-shadow: 0 0 0 3px rgba(169, 121, 43, 0.18) !important;
  outline: none !important;
}

button,
a[class*="inline-flex"],
[role="button"] {
  border-radius: var(--epjs-radius) !important;
}

button[class*="bg-slate-900"],
button[class*="bg-indigo"],
button[class*="bg-blue"],
button[class*="bg-emerald"],
a[class*="bg-slate-900"],
a[class*="bg-indigo"],
a[class*="bg-blue"],
a[class*="bg-emerald"],
[class*="bg-slate-900"][role="button"],
[class*="bg-indigo"][role="button"],
[class*="bg-blue"][role="button"],
[class*="bg-emerald"][role="button"] {
  background: var(--epjs-ink) !important;
  color: #fff8ed !important;
  border-color: var(--epjs-ink) !important;
  box-shadow: 0 10px 24px rgba(23, 19, 15, 0.14) !important;
}

button[class*="bg-amber"],
[class*="bg-amber"][role="button"],
[class*="bg-yellow"][role="button"] {
  background: var(--epjs-gold) !important;
  color: #fff8ed !important;
  border-color: var(--epjs-gold) !important;
}

button[class*="outline"],
button[class*="border"],
a[class*="border"] {
  border-color: var(--epjs-line) !important;
}

button:hover,
a[class*="inline-flex"]:hover,
[role="button"]:hover {
  filter: saturate(1.02) brightness(0.99);
}

/* Site-wide contrast guardrails */
#root button:disabled,
#root [aria-disabled="true"] {
  background: #e9dfd0 !important;
  border-color: #cbb894 !important;
  color: #6f6355 !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

#root button:disabled *,
#root [aria-disabled="true"] * {
  color: inherit !important;
}

#root button[class*="bg-transparent"][class*="text-amber"],
#root button[class*="bg-transparent"][class*="text-yellow"],
#root a[class*="bg-transparent"][class*="text-amber"],
#root a[class*="bg-transparent"][class*="text-yellow"],
#root [role="button"][class*="bg-transparent"][class*="text-amber"],
#root [role="button"][class*="bg-transparent"][class*="text-yellow"] {
  background: rgba(216, 178, 105, 0.12) !important;
  border-color: #c9a15a !important;
  color: #7c571f !important;
}

#root button[class*="bg-transparent"][class*="text-blue"],
#root button[class*="bg-transparent"][class*="text-indigo"],
#root a[class*="bg-transparent"][class*="text-blue"],
#root a[class*="bg-transparent"][class*="text-indigo"],
#root [role="button"][class*="bg-transparent"][class*="text-blue"],
#root [role="button"][class*="bg-transparent"][class*="text-indigo"] {
  background: rgba(39, 60, 85, 0.08) !important;
  border-color: #9dafc2 !important;
  color: var(--epjs-blue) !important;
}

#root button[class*="bg-transparent"][class*="text-red"],
#root button[class*="bg-transparent"][class*="text-rose"],
#root a[class*="bg-transparent"][class*="text-red"],
#root a[class*="bg-transparent"][class*="text-rose"],
#root [role="button"][class*="bg-transparent"][class*="text-red"],
#root [role="button"][class*="bg-transparent"][class*="text-rose"] {
  background: rgba(124, 47, 58, 0.08) !important;
  border-color: #d5a4ac !important;
  color: var(--epjs-ruby) !important;
}

#root button[class*="bg-transparent"][class*="text-emerald"],
#root button[class*="bg-transparent"][class*="text-green"],
#root a[class*="bg-transparent"][class*="text-emerald"],
#root a[class*="bg-transparent"][class*="text-green"],
#root [role="button"][class*="bg-transparent"][class*="text-emerald"],
#root [role="button"][class*="bg-transparent"][class*="text-green"] {
  background: rgba(47, 105, 93, 0.08) !important;
  border-color: #9fc6b7 !important;
  color: var(--epjs-jade) !important;
}

#root button[class*="bg-transparent"] *,
#root a[class*="bg-transparent"] *,
#root [role="button"][class*="bg-transparent"] * {
  color: inherit !important;
}

#root [class*="bg-white/10"] {
  background-color: rgba(255, 253, 248, 0.12) !important;
}

#root [class*="bg-white/20"] {
  background-color: rgba(255, 253, 248, 0.22) !important;
}

#root [class*="bg-white/60"] {
  background-color: rgba(255, 253, 248, 0.68) !important;
}

#root [class*="bg-white/80"] {
  background-color: rgba(255, 253, 248, 0.86) !important;
}

#root [class*="bg-white/90"] {
  background-color: rgba(255, 253, 248, 0.94) !important;
}

#root [class*="bg-black/10"] {
  background-color: rgba(23, 19, 15, 0.1) !important;
}

#root [class*="bg-black/20"] {
  background-color: rgba(23, 19, 15, 0.2) !important;
}

#root [class*="bg-black/60"] {
  background-color: rgba(23, 19, 15, 0.68) !important;
}

#root [class*="text-white/70"] {
  color: rgba(255, 248, 237, 0.76) !important;
}

#root [class*="text-white/80"],
#root [class*="text-white/90"] {
  color: rgba(255, 248, 237, 0.86) !important;
}

#root [class*="bg-slate-900"][class*="text-white"],
#root [class*="bg-slate-800"][class*="text-white"],
#root [class*="bg-indigo-500"][class*="text-white"],
#root [class*="bg-indigo-600"][class*="text-white"],
#root [class*="bg-blue-500"][class*="text-white"],
#root [class*="bg-blue-600"][class*="text-white"] {
  background: var(--epjs-blue) !important;
  border-color: var(--epjs-blue) !important;
  color: #fff8ed !important;
}

#root [class*="bg-emerald-500"][class*="text-white"],
#root [class*="bg-emerald-600"][class*="text-white"],
#root [class*="bg-green-500"][class*="text-white"],
#root [class*="bg-green-600"][class*="text-white"] {
  background: var(--epjs-jade) !important;
  border-color: var(--epjs-jade) !important;
  color: #fff8ed !important;
}

#root [class*="bg-red-500"][class*="text-white"],
#root [class*="bg-red-600"][class*="text-white"],
#root [class*="bg-rose-500"][class*="text-white"],
#root [class*="bg-rose-600"][class*="text-white"] {
  background: var(--epjs-ruby) !important;
  border-color: var(--epjs-ruby) !important;
  color: #fff8ed !important;
}

#root [class*="bg-amber-500"][class*="text-white"],
#root [class*="bg-amber-600"][class*="text-white"],
#root [class*="bg-yellow-500"][class*="text-white"],
#root [class*="bg-yellow-600"][class*="text-white"] {
  background: #8b611f !important;
  border-color: #8b611f !important;
  color: #fff8ed !important;
}

#root [class*="bg-slate-900"][class*="text-white"] *,
#root [class*="bg-slate-800"][class*="text-white"] *,
#root [class*="bg-indigo-500"][class*="text-white"] *,
#root [class*="bg-indigo-600"][class*="text-white"] *,
#root [class*="bg-blue-500"][class*="text-white"] *,
#root [class*="bg-blue-600"][class*="text-white"] *,
#root [class*="bg-emerald-500"][class*="text-white"] *,
#root [class*="bg-emerald-600"][class*="text-white"] *,
#root [class*="bg-green-500"][class*="text-white"] *,
#root [class*="bg-green-600"][class*="text-white"] *,
#root [class*="bg-red-500"][class*="text-white"] *,
#root [class*="bg-red-600"][class*="text-white"] *,
#root [class*="bg-rose-500"][class*="text-white"] *,
#root [class*="bg-rose-600"][class*="text-white"] *,
#root [class*="bg-amber-500"][class*="text-white"] *,
#root [class*="bg-amber-600"][class*="text-white"] *,
#root [class*="bg-yellow-500"][class*="text-white"] *,
#root [class*="bg-yellow-600"][class*="text-white"] * {
  color: inherit !important;
}

/* Status and semantic colors */
[class*="text-blue"],
[class*="text-indigo"],
[class*="text-purple"] {
  color: var(--epjs-blue) !important;
}

[class*="text-amber"],
[class*="text-yellow"] {
  color: var(--epjs-gold) !important;
}

[class*="text-emerald"],
[class*="text-green"] {
  color: var(--epjs-jade) !important;
}

[class*="text-red"],
[class*="text-rose"] {
  color: var(--epjs-ruby) !important;
}

[class*="bg-blue-50"],
[class*="bg-indigo-50"],
[class*="bg-purple-50"] {
  background-color: rgba(39, 60, 85, 0.08) !important;
}

[class*="bg-amber-50"],
[class*="bg-yellow-50"] {
  background-color: rgba(216, 178, 105, 0.16) !important;
}

[class*="bg-emerald-50"],
[class*="bg-green-50"] {
  background-color: rgba(47, 105, 93, 0.10) !important;
}

[class*="bg-red-50"],
[class*="bg-rose-50"] {
  background-color: rgba(124, 47, 58, 0.10) !important;
}

[class*="bg-blue-500"],
[class*="bg-blue-600"],
[class*="bg-indigo-500"],
[class*="bg-indigo-600"],
[class*="bg-purple-500"],
[class*="bg-purple-600"] {
  background-color: var(--epjs-blue) !important;
}

[class*="bg-emerald-500"],
[class*="bg-emerald-600"],
[class*="bg-green-500"],
[class*="bg-green-600"] {
  background-color: var(--epjs-jade) !important;
}

[class*="bg-red-500"],
[class*="bg-red-600"],
[class*="bg-rose-500"],
[class*="bg-rose-600"] {
  background-color: var(--epjs-ruby) !important;
}

/* Sidebar contrast */
[class*="md:w-64"],
[class*="w-64"][class*="fixed"],
aside[class*="fixed"],
nav[class*="fixed"] {
  background:
    linear-gradient(180deg, rgba(52, 40, 32, 0.97), rgba(23, 19, 15, 0.99)),
    var(--epjs-ink) !important;
  border-color: rgba(216, 178, 105, 0.24) !important;
}

[class*="md:w-64"] h1,
[class*="w-64"][class*="fixed"] h1,
aside[class*="fixed"] h1,
nav[class*="fixed"] h1 {
  color: #fff8ed !important;
}

[class*="md:w-64"] p,
[class*="md:w-64"] span,
[class*="md:w-64"] label,
[class*="w-64"][class*="fixed"] p,
[class*="w-64"][class*="fixed"] span,
[class*="w-64"][class*="fixed"] label,
aside[class*="fixed"] p,
aside[class*="fixed"] span,
aside[class*="fixed"] label,
nav[class*="fixed"] p,
nav[class*="fixed"] span,
nav[class*="fixed"] label {
  color: rgba(255, 248, 237, 0.72) !important;
}

[class*="md:w-64"] [class*="uppercase"],
[class*="w-64"][class*="fixed"] [class*="uppercase"],
aside[class*="fixed"] [class*="uppercase"],
nav[class*="fixed"] [class*="uppercase"] {
  color: rgba(255, 248, 237, 0.58) !important;
}

[class*="md:w-64"] a span,
[class*="md:w-64"] button span,
[class*="w-64"][class*="fixed"] a span,
[class*="w-64"][class*="fixed"] button span,
aside[class*="fixed"] a span,
aside[class*="fixed"] button span,
nav[class*="fixed"] a span,
nav[class*="fixed"] button span {
  color: inherit !important;
}

[class*="md:w-64"] a[class*="bg"],
[class*="md:w-64"] button[class*="bg"],
[class*="w-64"][class*="fixed"] a[class*="bg"],
[class*="w-64"][class*="fixed"] button[class*="bg"],
aside[class*="fixed"] a[class*="bg"],
aside[class*="fixed"] button[class*="bg"],
nav[class*="fixed"] a[class*="bg"],
nav[class*="fixed"] button[class*="bg"] {
  color: #fff8ed !important;
}

/* Dashboard stat cards */
body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)) !important;
  align-items: stretch;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) > div {
  min-width: 0;
  overflow: hidden;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) > div * {
  min-width: 0;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) > div > div[class*="flex"][class*="justify-between"] > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 8px;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) [class*="items-baseline"][class*="gap-1"] {
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 1px;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) [class*="items-baseline"][class*="gap-1"] span {
  flex: 0 0 auto;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) [class*="text-2xl"],
body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) [class*="text-xl"] {
  font-size: clamp(1.05rem, 1.35vw, 1.42rem) !important;
  line-height: 1.08 !important;
}

body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) p,
body.epjs-route-dashboard main > div > div[class*="grid"][class*="gap-4"]:has(> div:nth-child(6)) span {
  overflow-wrap: anywhere;
}

/* Inventory detail modal contrast */
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] {
  background: var(--epjs-paper) !important;
  border-color: var(--epjs-line-strong) !important;
  color: var(--epjs-ink) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-gradient"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-blue-50"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-sky-50"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-cyan-50"] {
  background: linear-gradient(180deg, #fffdf8, #f2e6d5) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] h2,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] h3,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] p,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] span,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] label {
  color: var(--epjs-charcoal) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="uppercase"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="tracking-widest"] {
  color: #695a49 !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="font-black"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="font-bold"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="font-mono"] {
  color: var(--epjs-ink) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-emerald"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-green"] {
  background: #dfeee7 !important;
  border-color: #9fc6b7 !important;
  color: #23574d !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-red"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] [class*="bg-rose"] {
  background: #f3e0e2 !important;
  border-color: #d5a4ac !important;
  color: #7c2f3a !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-slate-900"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-blue"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-indigo"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-emerald"] {
  background: var(--epjs-blue) !important;
  border-color: var(--epjs-blue) !important;
  color: #fff8ed !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-slate-900"] *,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-blue"] *,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-indigo"] *,
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button:not([disabled])[class*="bg-emerald"] * {
  color: #fff8ed !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[disabled] {
  background: #e9dfd0 !important;
  border-color: #cbb894 !important;
  color: #6f6355 !important;
  opacity: 1 !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[disabled] * {
  color: #6f6355 !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"][class*="text-amber"] {
  background: rgba(216, 178, 105, 0.12) !important;
  border-color: #c9a15a !important;
  color: #7c571f !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"][class*="text-blue"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"][class*="text-indigo"] {
  background: rgba(39, 60, 85, 0.08) !important;
  border-color: #9dafc2 !important;
  color: var(--epjs-blue) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"][class*="text-red"],
body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"][class*="text-rose"] {
  background: rgba(124, 47, 58, 0.08) !important;
  border-color: #d5a4ac !important;
  color: var(--epjs-ruby) !important;
}

body.epjs-route-inventory div[class*="fixed"][class*="inset-0"] > div[class*="rounded"][class*="border"] button[class*="bg-transparent"] * {
  color: inherit !important;
}

/* Tables */
table,
[class*="min-w-"][class*="table"],
[class*="overflow-x-auto"] > div {
  border-color: var(--epjs-line) !important;
}

thead,
[class*="bg-slate-100"][class*="uppercase"],
[class*="bg-slate-50"][class*="uppercase"] {
  background: #f0e6d6 !important;
  color: #6a5d4c !important;
}

th,
td {
  border-color: #eadfcc !important;
}

/* Badges and chips */
[class*="rounded-full"] {
  border-radius: 999px !important;
}

[class*="tracking-widest"],
[class*="uppercase"] {
  letter-spacing: 0.08em !important;
}

/* Storefront and imagery */
img {
  background-color: #efe4d3;
}

[class*="aspect-[4/5]"],
[class*="aspect-square"] {
  background-color: #efe4d3 !important;
  border: 1px solid var(--epjs-line);
}

/* Login surface */
body:has(input[type="password"]) {
  background:
    linear-gradient(90deg, rgba(23, 19, 15, 0.88), rgba(23, 19, 15, 0.40)),
    url("https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?auto=format&fit=crop&w=1800&q=80") center / cover fixed !important;
}

body:has(input[type="password"]) #root > div {
  background: transparent !important;
}

/* Photo Mode Plus alignment with the luxury system */
.epjs-plus-shell,
.epjs-storefront-plus {
  --epjs-plus-ink: var(--epjs-ink);
  background: var(--epjs-ivory) !important;
  color: var(--epjs-ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.epjs-plus-brand h1,
.epjs-plus-title h2,
.epjs-storefront-plus h1 {
  font-family: "Playfair Display", Georgia, serif !important;
}

.epjs-plus-sidebar,
.epjs-plus-topbar,
.epjs-plus-sidepanel,
.epjs-storefront-plus header {
  background: var(--epjs-paper) !important;
  border-color: var(--epjs-line) !important;
}

.epjs-plus-stage {
  background: var(--epjs-ink) !important;
}

.epjs-plus-camera-wrap {
  background:
    radial-gradient(circle at center, #3a3028 0, #17130f 62%, #0e0b09 100%) !important;
}

.epjs-plus-btn.primary,
.epjs-plus-btn.dark,
.epjs-plus-crop.is-selected,
.epjs-plus-tag.is-selected {
  background: var(--epjs-ink) !important;
  border-color: var(--epjs-ink) !important;
  color: #fff8ed !important;
}

.epjs-plus-filter.is-selected,
.epjs-plus-item.is-selected {
  border-color: var(--epjs-gold) !important;
  box-shadow: 0 0 0 3px rgba(169, 121, 43, 0.14) !important;
}

/* Mobile rhythm */
@media (max-width: 760px) {
  body,
  #root {
    background: var(--epjs-ivory) !important;
  }

  [class*="p-8"] {
    padding: 18px !important;
  }

  [class*="text-4xl"],
  [class*="text-5xl"] {
    font-size: 2rem !important;
    line-height: 1.05 !important;
  }

  button,
  input,
  select {
    min-height: 42px;
  }

  [class*="rounded-3xl"],
  [class*="rounded-2xl"] {
    border-radius: var(--epjs-radius) !important;
  }
}
