/*
 * Jekaplay Design System v3
 * A bold, energetic hospitality system layered over the legacy component map.
 * Business-flow selectors remain intact; this file owns presentation only.
 */

:root {
  --jp-forest-950: #06130e;
  --jp-forest-900: #0a2118;
  --jp-forest-800: #103729;
  --jp-forest-700: #075f40;
  --jp-forest-600: #087a50;
  --jp-green-500: #13a86a;
  --jp-green-300: #77d9a7;
  --jp-cream-50: #fffdf8;
  --jp-cream-100: #fbf6ea;
  --jp-cream-200: #f2e8d5;
  --jp-ink: #17221b;
  --jp-muted: #677169;
  --jp-fillup-red: #ff0000;
  --jp-fillup-red-600: #e00000;
  --jp-fillup-red-700: #b80000;
  --jp-fillup-red-soft: #ffe3e3;
  --jp-coral: #ef6d50;
  --jp-blue: #4f79de;
  --jp-danger: #d94d58;
  --jp-font-body: "Avenir Next", Avenir, "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --jp-font-display: ui-rounded, "Arial Rounded MT Bold", "Avenir Next", system-ui, sans-serif;
  --jp-radius-xs: 10px;
  --jp-radius-sm: 14px;
  --jp-radius-md: 20px;
  --jp-radius-lg: 28px;
  --jp-shadow-sm: 0 7px 22px rgba(28, 45, 35, .07);
  --jp-shadow-md: 0 18px 48px rgba(28, 45, 35, .10);
  --jp-shadow-lg: 0 28px 80px rgba(14, 33, 23, .16);
  --radius: var(--jp-radius-lg);
  --radius-sm: var(--jp-radius-sm);
  --primary: var(--jp-forest-600);
  --primary-2: var(--jp-green-500);
  --danger: var(--jp-danger);
}

body[data-theme="light"] {
  --bg: var(--jp-cream-100);
  --bg-soft: var(--jp-cream-50);
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --line: rgba(28, 48, 37, .11);
  --line-strong: rgba(22, 54, 37, .20);
  --text: var(--jp-ink);
  --muted: var(--jp-muted);
  --shadow: var(--jp-shadow-md);
}

body[data-theme="dark"] {
  --bg: var(--jp-forest-950);
  --bg-soft: #0b1b14;
  --panel: #10231a;
  --panel-strong: #13291f;
  --line: rgba(234, 255, 242, .10);
  --line-strong: rgba(234, 255, 242, .18);
  --text: #fffaf0;
  --muted: #a9bbaf;
  --shadow: 0 22px 64px rgba(0, 0, 0, .30);
}

html {
  background: var(--bg);
  color-scheme: light;
  scrollbar-color: color-mix(in srgb, var(--primary) 55%, transparent) transparent;
}

html:has(body[data-theme="dark"]) { color-scheme: dark; }

body.jekaplay-design-v3 {
  font-family: var(--jp-font-body);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.008em;
  background:
    radial-gradient(circle at 3% 3%, color-mix(in srgb, var(--jp-fillup-red) 12%, transparent), transparent 24rem),
    radial-gradient(circle at 96% 9%, color-mix(in srgb, var(--jp-green-300) 18%, transparent), transparent 27rem),
    linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 94%, var(--jp-cream-200)) 100%);
  background-attachment: fixed;
}

body[data-theme="dark"].jekaplay-design-v3 {
  background:
    radial-gradient(circle at 3% 3%, rgba(255, 0, 0, .07), transparent 24rem),
    radial-gradient(circle at 96% 9%, rgba(19, 168, 106, .14), transparent 27rem),
    linear-gradient(180deg, var(--bg), #040c09);
}

body.jekaplay-design-v3 h1,
body.jekaplay-design-v3 h2,
body.jekaplay-design-v3 h3,
body.jekaplay-design-v3 h4,
body.jekaplay-design-v3 h5,
body.jekaplay-design-v3 h6 {
  font-family: var(--jp-font-display);
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: balance;
}

body.jekaplay-design-v3 p { text-wrap: pretty; }

body[data-theme="light"] .main-wrap {
  background: transparent !important;
}

.bg-grid {
  opacity: .38;
  background-image:
    linear-gradient(rgba(19, 71, 46, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 71, 46, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

body[data-theme="dark"] .bg-grid { opacity: .18; }

.blob {
  filter: blur(70px);
  opacity: .12;
  animation-duration: 22s;
}

.blob-a { background: var(--jp-fillup-red); }
.blob-b { background: var(--jp-coral); opacity: .07; }
.blob-c { background: var(--jp-green-500); }

.container,
.content-container {
  width: min(1340px, calc(100% - 48px));
}

.main-wrap {
  position: relative;
  z-index: 1;
  padding: 28px 0 72px;
}

/* Navigation shell */
.app-shell-auth {
  grid-template-columns: 282px minmax(0, 1fr);
  background: transparent;
}

.app-sidebar,
body[data-theme="light"] .app-sidebar {
  --text: #fffaf0;
  --muted: #a8c0b2;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);
  padding: 16px 0;
  color: #fffaf0;
  background:
    radial-gradient(circle at 8% 2%, rgba(255, 0, 0, .12), transparent 16rem),
    radial-gradient(circle at 90% 76%, rgba(19, 168, 106, .20), transparent 22rem),
    linear-gradient(180deg, #0c2b1f, #06130e 80%) !important;
  border-right: 0;
  box-shadow: 18px 0 50px rgba(6, 19, 14, .14) !important;
}

.sidebar-inner { padding: 0 14px; }

.sidebar-brand-row {
  min-height: 72px;
  padding: 5px 9px 17px;
  border-bottom-color: rgba(255, 255, 255, .10);
}

.sidebar-brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sidebar-brand-mark img { object-fit: contain; filter: brightness(0) invert(1); }
.sidebar-brand-mark img:first-child { width: 132px; height: 43px; }
.sidebar-brand-mark img:last-child { width: 74px; height: 40px; filter: none; }

.sidebar-user-card {
  margin: 15px 2px 19px;
  padding: 14px;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .065) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}

.sidebar-user-avatar {
  width: 42px;
  min-width: 42px;
  height: 42px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--jp-fillup-red-700), var(--jp-fillup-red-600)) !important;
  box-shadow: 0 8px 20px rgba(255, 0, 0, .20);
}

.app-sidebar .sidebar-user-meta strong,
.app-sidebar .sidebar-link strong { color: #fffaf0 !important; }

.app-sidebar .sidebar-user-meta span,
.app-sidebar .sidebar-link small,
.app-sidebar .nav-section-title { color: #9fb8aa !important; }

.nav-section-title {
  padding: 0 12px;
  color: #9fb8aa;
  font-size: .68rem;
  letter-spacing: .14em;
}

.nav-section-items { gap: 5px; }

.sidebar-link {
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 15px;
}

.sidebar-link::before {
  width: 37px;
  min-width: 37px;
  height: 37px;
  border-radius: 12px;
  color: #b6c9bd;
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .09);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .09);
}

.sidebar-link.is-active {
  color: #fff;
  background: linear-gradient(100deg, rgba(255, 0, 0, .22), rgba(255, 0, 0, .06));
  border-color: rgba(255, 0, 0, .26);
  box-shadow: inset 3px 0 0 var(--jp-fillup-red);
}

.sidebar-link.is-active::before {
  color: #fff;
  background: linear-gradient(135deg, var(--jp-fillup-red-700), var(--jp-fillup-red-600));
  box-shadow: 0 8px 20px rgba(255, 0, 0, .22);
}

.sidebar-link-copy strong { font-size: .91rem; }
.sidebar-link-copy small { font-size: .71rem; line-height: 1.3; }

.sidebar-footer .site-copyright {
  color: rgba(225, 239, 230, .55);
  font-size: .66rem;
  line-height: 1.45;
}

.app-topbar {
  min-height: 84px;
  padding: 14px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent) !important;
  box-shadow: 0 8px 34px rgba(27, 45, 34, .035);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.topbar-kicker {
  color: var(--primary) !important;
  font-size: .68rem;
  letter-spacing: .14em;
}

.topbar-copy h1 {
  margin-top: .08rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.topbar-status {
  color: color-mix(in srgb, var(--primary) 82%, var(--text));
  border-color: color-mix(in srgb, var(--primary) 20%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
}

.topbar-status > span { background: var(--jp-green-500); }

.topbar-bell,
.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--jp-shadow-sm);
}

.sidebar-toggle { display: none; }

/* Public navigation and footer */
.site-header-public {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 94%, transparent), transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header-public .nav-wrap {
  min-height: 76px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--jp-shadow-sm);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark img:first-child { width: 150px; height: 46px; object-fit: contain; }
.brand-mark img:last-child { width: 76px; height: 39px; object-fit: contain; }

.nav-actions { gap: 7px; }

.public-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 750;
}

.public-nav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  padding: 64px 0 28px;
  color: #edf8f1;
  background:
    radial-gradient(circle at 9% 0, rgba(255, 0, 0, .14), transparent 24rem),
    radial-gradient(circle at 92% 100%, rgba(19, 168, 106, .18), transparent 25rem),
    var(--jp-forest-950);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.public-footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, .65fr));
  gap: 34px 72px;
}

.public-footer-brand { display: grid; justify-items: start; gap: 16px; }
.footer-brand-mark img { width: 190px; filter: brightness(0) invert(1); }
.public-footer-brand p { max-width: 48ch; margin: 0; color: #a9bdb1; }
.public-footer-links { display: grid; align-content: start; gap: 10px; }
.public-footer-links strong { margin-bottom: 3px; color: #ff8a8a; font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; }
.public-footer-links a { width: max-content; max-width: 100%; color: #d5e3da; }
.public-footer-links a:hover { color: #fff; }
.public-footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #80998a;
  font-size: .76rem;
}
.public-footer-bottom p { margin: 0; }

/* Controls */
.btn,
button.btn,
a.btn {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 14px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: var(--jp-font-body);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: -.01em;
  box-shadow: 0 5px 14px rgba(22, 45, 31, .045);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: 0 12px 28px rgba(18, 60, 38, .11);
}

.btn-primary,
body[data-theme="light"] .btn-primary {
  color: #fff !important;
  border-color: var(--jp-fillup-red-700) !important;
  background: linear-gradient(135deg, var(--jp-fillup-red-700), var(--jp-fillup-red-600)) !important;
  box-shadow: 0 12px 26px rgba(224, 0, 0, .22) !important;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #a90000, #d90000) !important;
  box-shadow: 0 16px 34px rgba(224, 0, 0, .30) !important;
}

.btn-soft,
.btn-ghost,
body[data-theme="light"] .btn-soft,
body[data-theme="light"] .btn-ghost {
  color: var(--text) !important;
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--panel) 88%, var(--primary) 4%) !important;
}

.btn-danger,
body[data-theme="light"] .btn-danger {
  color: #fff !important;
  border-color: #ca404d !important;
  background: linear-gradient(135deg, #d74855, #ef6d62) !important;
  box-shadow: 0 12px 26px rgba(202, 64, 77, .20) !important;
}

.btn-sm { min-height: 38px; padding: 0 13px; border-radius: 11px; font-size: .8rem; }

.theme-switch {
  width: auto;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.theme-switch-track { grid-template-columns: 24px; gap: 0; padding: 0; background: transparent; }
.theme-switch-icon { display: none; width: 24px; height: 24px; }
body[data-theme="light"] .theme-switch-icon:last-child,
body[data-theme="dark"] .theme-switch-icon:first-child { display: inline-flex; }
.theme-switch-icon:empty { display: none !important; }
.theme-switch-thumb,
.theme-switch-label { display: none !important; }
.app-sidebar .theme-switch { color: #fff; border-color: rgba(255, 255, 255, .11); background: rgba(255, 255, 255, .06); }

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea,
.input,
.customer-input,
.searchable-select-control,
.searchable-select-search,
.searchable-multiselect-trigger,
.searchable-multiselect-search {
  min-height: 50px;
  padding-inline: 15px;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 1px rgba(20, 44, 29, .02) !important;
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea { min-height: 118px; padding-block: 13px; resize: vertical; }

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus,
.searchable-select-control:focus,
.searchable-select-search:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, transparent) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent) !important;
}

.field label,
.field-group label,
.polished-field label {
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .025em;
}

.form-hint,
.field small { font-size: .78rem; }

.searchable-select-menu,
.searchable-multiselect-panel,
body[data-theme="light"] .searchable-select-menu,
body[data-theme="light"] .searchable-multiselect-panel {
  padding: 9px;
  border-radius: 16px;
  background: var(--panel-strong) !important;
  box-shadow: var(--jp-shadow-lg) !important;
}

.searchable-select-option,
.searchable-multiselect-option { border-radius: 10px; }

.searchable-select-option:hover,
.searchable-select-option.is-selected,
.searchable-multiselect-option:hover {
  color: var(--text) !important;
  background: color-mix(in srgb, var(--primary) 10%, var(--panel)) !important;
}

/* Surfaces and hierarchy */
.card,
.panel,
.metric-card,
.section-card,
.row-card,
.chip-card,
.note-card,
.screen-card,
body[data-theme="light"] .card,
body[data-theme="light"] .panel,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .section-card {
  border: 1px solid var(--line);
  border-radius: var(--jp-radius-md);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: var(--jp-shadow-sm);
  backdrop-filter: none;
}

.panel,
.section-card { padding: clamp(20px, 2.4vw, 30px); }

.panel-head,
.section-head,
.section-card-head {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3,
.section-head h2,
.section-head h3 { color: var(--text); }

.page-stack,
.console-page,
.dashboard-page { gap: clamp(18px, 2.4vw, 28px); }

.page-title { letter-spacing: -.05em; }
.page-subtitle,
.section-copy,
.lede,
.muted { color: var(--muted) !important; }

.eyebrow,
body[data-theme="light"] .eyebrow {
  min-height: 29px;
  padding: 6px 10px;
  color: #9f0000 !important;
  border: 1px solid rgba(224, 0, 0, .20) !important;
  border-radius: 9px;
  background: var(--jp-fillup-red-soft) !important;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

body[data-theme="dark"] .eyebrow {
  color: #ff9d9d !important;
  border-color: rgba(255, 0, 0, .24) !important;
  background: rgba(255, 0, 0, .10) !important;
}

.eyebrow-subtle,
body[data-theme="light"] .eyebrow-subtle {
  color: color-mix(in srgb, var(--primary) 86%, var(--text)) !important;
  border-color: color-mix(in srgb, var(--primary) 16%, transparent) !important;
  background: color-mix(in srgb, var(--primary) 7%, var(--panel)) !important;
}

.pill,
.status-pill,
.price-pill {
  min-height: 29px;
  padding: 5px 10px;
  border-radius: 9px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 86%, var(--bg));
  font-size: .73rem;
  font-weight: 850;
}

.pill-soft,
body[data-theme="light"] .pill-soft { color: var(--muted); background: color-mix(in srgb, var(--panel) 82%, var(--bg)); }
.pill-success { color: #08603f !important; border-color: rgba(19, 168, 106, .20); background: rgba(19, 168, 106, .10); }
.pill-warning { color: #7a5200 !important; border-color: rgba(220, 151, 0, .23); background: rgba(247, 190, 61, .16); }
.pill-danger { color: #ad3240 !important; border-color: rgba(217, 77, 88, .20); background: rgba(217, 77, 88, .10); }
body[data-theme="dark"] .pill-success { color: #8de6b6 !important; }
body[data-theme="dark"] .pill-warning { color: #ffdd7c !important; }
body[data-theme="dark"] .pill-danger { color: #ffadb4 !important; }

body[data-theme="light"] .status-pending_payment,
body[data-theme="light"] .status-pending {
  color: #765000 !important;
  border-color: rgba(196, 131, 0, .24) !important;
  background: #fff0bd !important;
}
body[data-theme="light"] .status-paid,
body[data-theme="light"] .status-successful,
body[data-theme="light"] .status-ready,
body[data-theme="light"] .status-completed {
  color: #08603f !important;
  border-color: rgba(19, 168, 106, .22) !important;
  background: #dff4e9 !important;
}
body[data-theme="light"] .status-out_for_delivery {
  color: #31579d !important;
  border-color: rgba(79, 121, 222, .22) !important;
  background: #e8eeff !important;
}
body[data-theme="light"] .status-failed,
body[data-theme="light"] .status-cancelled {
  color: #a53340 !important;
  border-color: rgba(217, 77, 88, .22) !important;
  background: #ffe5e8 !important;
}
body[data-theme="light"] .status-refunded {
  color: #6c4196 !important;
  border-color: rgba(132, 85, 183, .22) !important;
  background: #f1e7fb !important;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 112px;
  padding: 22px;
  border: 1px dashed color-mix(in srgb, var(--primary) 25%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 4%, var(--panel));
}
.empty-state p { margin: 0; }
.empty-state.compact { min-height: 0; padding: 16px; }

/* Signature hero system */
.customer-hero,
.staff-hero,
.console-hero,
.customer-order-hero,
.customer-page-hero,
.wallet-hero,
.order-status-hero,
body[data-theme="light"] .customer-hero,
body[data-theme="light"] .staff-hero,
body[data-theme="light"] .console-hero,
body[data-theme="light"] .customer-order-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: var(--jp-radius-lg);
  background:
    linear-gradient(105deg, rgba(6, 19, 14, .10), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 0, 0, .24), transparent 22rem),
    radial-gradient(circle at 80% 100%, rgba(239, 109, 80, .12), transparent 20rem),
    linear-gradient(135deg, #0d3a29, #071812 72%) !important;
  box-shadow: var(--jp-shadow-lg);
}

.customer-hero::before,
.staff-hero::before,
.console-hero::before,
.customer-page-hero::before,
.wallet-hero::before,
.order-status-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 240px;
  height: 240px;
  right: -44px;
  top: -78px;
  border: 46px solid rgba(255, 255, 255, .035);
  border-radius: 50%;
}

.customer-hero h1,
.customer-hero h2,
.staff-hero h1,
.console-hero h1,
.customer-order-hero h1,
.customer-order-hero h2,
.customer-page-hero h2,
.wallet-hero h2,
.order-status-hero h2,
.customer-hero strong,
.staff-hero strong,
.console-hero strong,
.wallet-hero strong,
.order-status-hero strong,
body[data-theme="light"] .customer-hero h1,
body[data-theme="light"] .customer-hero h2,
body[data-theme="light"] .staff-hero h1,
body[data-theme="light"] .console-hero h1,
body[data-theme="light"] .customer-order-hero h1,
body[data-theme="light"] .customer-order-hero h2,
body[data-theme="light"] .customer-page-hero h1,
body[data-theme="light"] .customer-page-hero h2,
body[data-theme="light"] .wallet-hero h1,
body[data-theme="light"] .wallet-hero h2,
body[data-theme="light"] .order-status-hero h1,
body[data-theme="light"] .order-status-hero h2,
body[data-theme="light"] .customer-hero strong,
body[data-theme="light"] .staff-hero strong,
body[data-theme="light"] .console-hero strong,
body[data-theme="light"] .customer-order-hero strong,
body[data-theme="light"] .customer-page-hero strong,
body[data-theme="light"] .wallet-hero strong,
body[data-theme="light"] .order-status-hero strong {
  color: #fffaf0 !important;
}

.customer-hero .lede,
.staff-hero .page-subtitle,
.console-hero .page-subtitle,
.customer-page-hero p,
.wallet-hero p,
.order-status-hero p {
  color: #b9cdc1 !important;
}

body[data-theme="light"] .customer-hero .lede,
body[data-theme="light"] .staff-hero .page-subtitle,
body[data-theme="light"] .console-hero .page-subtitle,
body[data-theme="light"] .customer-order-hero .lede,
body[data-theme="light"] .customer-page-hero p,
body[data-theme="light"] .wallet-hero p,
body[data-theme="light"] .order-status-hero p {
  color: #c6d8cc !important;
}

.customer-hero-title,
.staff-hero h1,
.console-hero h1,
.customer-page-hero-copy h2,
.wallet-hero-copy h2,
.order-status-hero-copy h2 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 4.5vw, 4.8rem);
  line-height: .96;
  letter-spacing: -.06em;
}

.hero-stat-card,
.staff-stat-card,
.console-stat-card,
.customer-page-hero-stat,
.wallet-balance-card,
.order-status-total,
body[data-theme="light"] .hero-stat-card,
body[data-theme="light"] .staff-stat-card,
body[data-theme="light"] .console-stat-card,
body[data-theme="light"] .customer-page-hero-stat,
body[data-theme="light"] .wallet-balance-card {
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 17px;
  background: rgba(255, 255, 255, .075) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.hero-stat-card-accent,
.staff-stat-card-accent,
.console-stat-card-accent,
body[data-theme="light"] .hero-stat-card-accent,
body[data-theme="light"] .staff-stat-card-accent,
body[data-theme="light"] .console-stat-card-accent {
  color: #fff;
  border-color: rgba(255, 0, 0, .48) !important;
  background: linear-gradient(135deg, var(--jp-fillup-red-700), var(--jp-fillup-red-600)) !important;
}

.hero-stat-card-accent span,
.staff-stat-card-accent span,
.console-stat-card-accent span,
.hero-stat-card-accent strong,
.staff-stat-card-accent strong,
.console-stat-card-accent strong,
body[data-theme="light"] .hero-stat-card-accent span,
body[data-theme="light"] .staff-stat-card-accent span,
body[data-theme="light"] .console-stat-card-accent span,
body[data-theme="light"] .hero-stat-card-accent strong,
body[data-theme="light"] .staff-stat-card-accent strong,
body[data-theme="light"] .console-stat-card-accent strong {
  color: #fff !important;
}

.hero-stat-card span,
.staff-stat-card span,
.console-stat-card span,
.customer-page-hero-stat span,
.wallet-balance-card span,
.order-status-total span,
body[data-theme="light"] .hero-stat-card span,
body[data-theme="light"] .staff-stat-card span,
body[data-theme="light"] .console-stat-card span {
  color: #b9cdc1 !important;
  font-size: .68rem;
  letter-spacing: .08em;
}

body[data-theme="light"] .hero-stat-card-accent span,
body[data-theme="light"] .staff-stat-card-accent span,
body[data-theme="light"] .console-stat-card-accent span {
  color: #fff !important;
}

/* Dashboard and record cards */
.customer-action-grid,
.staff-module-grid { gap: 14px; }

.customer-action-card,
.staff-module-card,
.admin-module-card,
.report-launch-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--jp-shadow-sm);
}

.customer-action-card:hover,
.staff-module-card:hover,
.admin-module-card:hover,
.report-launch-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 27%, var(--line));
  box-shadow: var(--jp-shadow-md);
}

.customer-action-card::before,
.staff-module-card::before {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #a50000;
  background: var(--jp-fillup-red-soft);
  box-shadow: inset 0 0 0 1px rgba(224, 0, 0, .14);
}

.customer-action-card::after,
.staff-module-card::after { color: var(--jp-coral); }

.customer-action-tag,
.staff-module-tag,
.admin-module-tag {
  width: max-content;
  padding: 5px 8px;
  color: color-mix(in srgb, var(--primary) 85%, var(--text));
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body[data-theme="light"] .customer-action-tag { color: var(--jp-forest-700); }

.customer-panel,
.customer-feature-panel,
.staff-panel-rich { box-shadow: var(--jp-shadow-sm); }

.timeline-row,
.feature-chip-card,
.staff-branch-card,
.staff-summary-row,
.customer-record-card,
.order-record-card,
.payment-record-card,
.loyalty-transaction-card,
.notification-record-card,
.support-ticket-card,
.report-row-card,
.account-console-card,
.branch-activity-card,
.branch-mini-card,
body[data-theme="light"] .timeline-row,
body[data-theme="light"] .feature-chip-card,
body[data-theme="light"] .customer-record-card,
body[data-theme="light"] .payment-record-card,
body[data-theme="light"] .support-ticket-card,
body[data-theme="light"] .report-row-card,
body[data-theme="light"] .account-console-card {
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--panel) 95%, var(--bg)) !important;
  box-shadow: none !important;
}

.timeline-row:hover,
.customer-record-card:hover,
.order-record-card:hover,
.payment-record-card:hover,
.support-ticket-card:hover,
.report-row-card:hover,
.account-console-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line)) !important;
  background: color-mix(in srgb, var(--primary) 5%, var(--panel)) !important;
  box-shadow: var(--jp-shadow-sm) !important;
}

.customer-record-icon,
.payment-method-icon {
  color: #a50000 !important;
  border: 0;
  border-radius: 13px;
  background: var(--jp-fillup-red-soft) !important;
}

.customer-menu-card,
.customer-pack-instance,
.arrangement-card,
.reference-row,
.blocked-simple-card,
.receipt-line-card,
.order-line-card,
body[data-theme="light"] .customer-menu-card {
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  background: var(--panel) !important;
  box-shadow: var(--jp-shadow-sm) !important;
}

.arrangement-empty {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line)) !important;
  background: color-mix(in srgb, var(--primary) 4%, var(--panel));
}

.arrangement-unit-total { border-top-color: var(--line) !important; }

.customer-cart-card {
  border: 1px solid color-mix(in srgb, var(--primary) 23%, var(--line));
  background: var(--panel) !important;
  box-shadow: var(--jp-shadow-md) !important;
}

.qty-stepper { gap: 7px; }
.step-btn,
body[data-theme="light"] .step-btn {
  border-radius: 11px;
  background: color-mix(in srgb, var(--primary) 7%, var(--panel)) !important;
  box-shadow: none !important;
}
.step-delete,
body[data-theme="light"] .step-delete { color: var(--jp-danger) !important; background: rgba(217, 77, 88, .08) !important; }

/* Tables, filters and pagination */
.accounts-toolbar,
.table-filter-bar,
.filter-grid { box-shadow: var(--jp-shadow-sm); }

.inventory-table-shell,
.catalog-table-shell,
.table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
}

table,
table.dataTable,
body[data-theme="light"] table.dataTable { color: var(--text) !important; background: transparent !important; }

table thead th,
table.dataTable thead th,
body[data-theme="light"] .inventory-console-page table.dataTable thead th,
body[data-theme="light"] .catalog-console-page table.dataTable thead th {
  padding-block: 13px !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--primary) 5%, var(--panel)) !important;
  font-size: .69rem !important;
  font-weight: 900 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

table tbody td,
table.dataTable tbody td {
  padding-block: 13px !important;
  border-color: var(--line) !important;
}

table.dataTable tbody tr,
body[data-theme="light"] .inventory-console-page table.dataTable tbody tr,
body[data-theme="light"] .catalog-console-page table.dataTable tbody tr { background: var(--panel) !important; }

table.dataTable tbody tr:hover,
body[data-theme="light"] .inventory-console-page table.dataTable tbody tr:hover,
body[data-theme="light"] .catalog-console-page table.dataTable tbody tr:hover { background: color-mix(in srgb, var(--primary) 5%, var(--panel)) !important; }

.pagination-link,
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  border-color: var(--jp-fillup-red-700) !important;
  background: var(--jp-fillup-red-600) !important;
}

/* Authentication and legal pages */
.auth-layout-split { gap: 22px; }

.auth-story-card {
  color: #fffaf0;
  border-radius: var(--jp-radius-lg);
  background:
    radial-gradient(circle at 77% 15%, rgba(255, 0, 0, .24), transparent 19rem),
    radial-gradient(circle at 8% 100%, rgba(239, 109, 80, .13), transparent 18rem),
    linear-gradient(145deg, #0d3a29, #06130e 72%);
  box-shadow: var(--jp-shadow-lg);
}

.auth-story-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -56px;
  top: -74px;
  border: 42px solid rgba(255, 255, 255, .035);
  border-radius: 50%;
}

.auth-story-card > h1 { font-family: var(--jp-font-display); }
body[data-theme="light"] .auth-story-card > h1,
body[data-theme="light"] .auth-story-card h2,
body[data-theme="light"] .auth-story-card h3,
body[data-theme="light"] .auth-story-card strong {
  color: #fffaf0 !important;
}
.auth-story-kicker { color: #ff9d9d; }
.auth-story-kicker > span { background: var(--jp-fillup-red); box-shadow: 0 0 0 6px rgba(255, 0, 0, .13); }
.auth-offer-card,
.auth-trust-grid > div,
.auth-story-checklist > div { border-radius: 15px; background: rgba(255, 255, 255, .06); }
.auth-offer-card span { color: #ff9d9d; }
.auth-form-shell { border-radius: var(--jp-radius-lg); }
.auth-form-heading { font-size: clamp(2rem, 3.3vw, 3.1rem); }
.password-toggle { color: var(--primary); border-radius: 9px; }

.legal-page,
.contact-page { max-width: 1080px; margin-inline: auto; }
.legal-card,
.contact-card { box-shadow: var(--jp-shadow-sm); }

/* Feedback and overlays */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  box-shadow: var(--jp-shadow-sm);
}
.flash::before { content: ""; width: 9px; min-width: 9px; height: 9px; border-radius: 50%; background: var(--jp-blue); }
.flash-success,
body[data-theme="light"] .flash-success { color: #fff !important; border-color: #087a50 !important; background: #087a50 !important; }
.flash-success::before { background: #b7ffd6; }
.flash-error,
body[data-theme="light"] .flash-error { color: #fff !important; border-color: var(--jp-danger) !important; background: var(--jp-danger) !important; }
.flash-error::before { background: #ffd7da; }

.tour-card {
  border-radius: 20px;
  border-color: rgba(255, 0, 0, .28);
  background: var(--panel-strong);
  box-shadow: var(--jp-shadow-lg);
}

/* Mobile system */
@media (max-width: 1100px) {
  .container,
  .content-container { width: min(100% - 32px, 1340px); }
}

@media (max-width: 900px) {
  .app-shell-auth { grid-template-columns: 1fr; }
  .app-sidebar { width: min(306px, 90vw); }
  .sidebar-toggle { display: inline-grid; }
  .app-shell-auth.sidebar-open { overflow: hidden; }
  .sidebar-close { color: #fff; }
  .container,
  .content-container { width: min(100% - 24px, 1340px); }
  .public-footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  .site-header-public { padding: 8px 0; }
  .site-header-public .nav-wrap { min-height: 64px; padding: 8px 9px 8px 12px; border-radius: 16px; }
  .brand-mark { gap: 5px; }
  .brand-mark img:first-child { width: 116px; height: 36px; }
  .brand-mark img:last-child { width: 54px; height: 31px; }
  .public-auth-secondary { display: none; }
  .public-auth-primary { min-height: 40px; padding-inline: 12px; }
  .nav-actions { gap: 5px; }
  .nav-actions .theme-switch { width: 40px; min-height: 40px; padding: 7px; }
  .public-footer-grid { grid-template-columns: 1fr 1fr; }
  .public-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container,
  .content-container { width: min(100% - 20px, 1340px); }
  .main-wrap { padding-top: 14px; padding-bottom: 54px; }
  .app-topbar { min-height: 70px; padding: 10px; }
  .sidebar-toggle { display: inline-grid; }
  .topbar-copy h1 { font-size: 1.08rem; }

  .card,
  .panel,
  .section-card,
  body[data-theme="light"] .card,
  body[data-theme="light"] .panel { border-radius: 17px; }

  .customer-hero,
  .staff-hero,
  .console-hero,
  .customer-order-hero,
  .customer-page-hero,
  .wallet-hero,
  .order-status-hero { border-radius: 20px; }

  .customer-hero-title,
  .staff-hero h1,
  .console-hero h1,
  .customer-page-hero-copy h2,
  .wallet-hero-copy h2,
  .order-status-hero-copy h2 { font-size: clamp(2.1rem, 11vw, 3rem); }

  .hero-panel-grid,
  .staff-hero-metrics,
  .console-hero-metrics { gap: 8px; }
  .hero-stat-card,
  .staff-stat-card,
  .console-stat-card { min-height: 92px; border-radius: 14px; }

  .customer-action-grid,
  .staff-module-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .customer-action-card,
  .staff-module-card { min-height: 136px; padding: 15px; border-radius: 16px; }
  .customer-action-card::before,
  .staff-module-card::before { width: 38px; height: 38px; border-radius: 11px; }
  .customer-action-card p,
  .staff-module-card p { display: none; }

  .mobile-taskbar {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 3px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    background: rgba(7, 24, 18, .94);
    box-shadow: 0 20px 50px rgba(5, 18, 12, .30);
  }

  .mobile-taskbar a { min-height: 52px; color: #9eb6a8; border-radius: 13px; }
  .mobile-taskbar a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--jp-fillup-red-700), var(--jp-fillup-red-600));
    box-shadow: 0 8px 20px rgba(255, 0, 0, .22);
  }

  .mobile-cart-dock {
    border-color: rgba(255, 0, 0, .24);
    border-radius: 16px;
    background: rgba(7, 24, 18, .95);
  }
  .mobile-cart-dock strong { color: #fff; }
  .mobile-cart-dock span:last-child { color: #ff8a8a; }
  body[data-theme="light"] .mobile-cart-dock span { color: #c6d8cc !important; }
  body[data-theme="light"] .mobile-cart-dock strong { color: #fffaf0 !important; }
  body[data-theme="light"] .mobile-cart-dock span:last-child { color: #ff8a8a !important; }

  .public-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .public-footer-brand { grid-column: auto; }
  .public-footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
