/* =========================================================================
   ANIMA AUCTORIS — Master Design System ("Frosted Editorial Ops")
   Plain CSS3. No build step, no Tailwind, no Node. PHP 7.3 friendly.

   1. Semantic app tokens (--background, --card, --primary ...) flip between
      light and dark for the authenticated modules (Admin / Author / Agent).
   2. Fixed public brand tokens are locked on .storefront surfaces so the
      public storefront, cart, checkout and membership pages never flip.
   ========================================================================= */

:root {
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);

  /* Local/system font stack only — no external font CDN. IBM Plex is used when installed locally. */
  --font-sans: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, Menlo, "DejaVu Sans Mono", monospace;


  --background: oklch(0.9789 0.0029 264.54);
  --foreground: oklch(0.2155 0.0182 255.72);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.2155 0.0182 255.72);
  --popover: oklch(1 0 0);
  --primary: oklch(0.6742 0.1443 51.5);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.9515 0.006 258);
  --muted: oklch(0.9515 0.006 258);
  --muted-foreground: oklch(0.5072 0.0269 258.37);
  --accent: oklch(0.9515 0.006 258);
  --destructive: oklch(0.5758 0.1712 28.5);
  --border: oklch(0.9266 0.0092 258.34);
  --input: oklch(0.9266 0.0092 258.34);
  --ring: oklch(0.6742 0.1443 51.5);

  --good: oklch(0.5867 0.1288 155.2);
  --warn: oklch(0.6642 0.1226 68);
  --bad: oklch(0.5758 0.1712 28.5);
  --info: oklch(0.5566 0.1329 251);
  --neutral: oklch(0.5072 0.0269 258.37);

  --chart-1: oklch(0.6742 0.1443 51.5);
  --chart-2: oklch(0.5867 0.1288 155.2);
  --chart-3: oklch(0.5566 0.1329 251);
  --chart-4: oklch(0.6642 0.1226 68);
  --chart-5: oklch(0.5072 0.0269 258.37);

  --surface-blur: saturate(140%) blur(12px);
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 12px 32px -16px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] {
  --background: oklch(0.1631 0.0162 261.49);
  --foreground: oklch(0.9413 0.0109 256.7);
  --card: oklch(0.1989 0.0179 259.71);
  --card-foreground: oklch(0.9413 0.0109 256.7);
  --popover: oklch(0.2252 0.0216 260.53);
  --primary: oklch(0.7846 0.1287 63.94);
  --primary-foreground: oklch(0.19 0.0181 259.7);
  --secondary: oklch(0.2252 0.0216 260.53);
  --muted: oklch(0.2252 0.0216 260.53);
  --muted-foreground: oklch(0.6645 0.0291 262.29);
  --accent: oklch(0.2664 0.0253 258.34);
  --destructive: oklch(0.676 0.1415 34.1);
  --border: oklch(0.2664 0.0253 258.34);
  --input: oklch(0.2664 0.0253 258.34);
  --ring: oklch(0.7846 0.1287 63.94);

  --good: oklch(0.7565 0.1349 155.2);
  --warn: oklch(0.8 0.1231 79.15);
  --bad: oklch(0.676 0.1415 34.1);
  --info: oklch(0.7163 0.1135 250.76);
  --neutral: oklch(0.6645 0.0291 262.29);

  --chart-1: oklch(0.7846 0.1287 63.94);
  --chart-2: oklch(0.7565 0.1349 155.2);
  --chart-3: oklch(0.7163 0.1135 250.76);
  --chart-4: oklch(0.8 0.1231 79.15);
  --chart-5: oklch(0.6645 0.0291 262.29);

  --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 16px 40px -20px rgba(0, 0, 0, 0.8);
}

/* Fixed public brand surface — never follows the theme toggle. */
.storefront,
html[data-theme="dark"] .storefront {
  --background: oklch(0.9585 0.0098 87.47);
  --foreground: oklch(0.2178 0.0059 91.62);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.2178 0.0059 91.62);
  --popover: oklch(1 0 0);
  --primary: oklch(0.19 0.0181 259.7);
  --primary-foreground: oklch(0.9585 0.0098 87.47);
  --secondary: oklch(0.9114 0.0162 82.79);
  --muted: oklch(0.9114 0.0162 82.79);
  --muted-foreground: oklch(0.4331 0.011 78.21);
  --accent: oklch(0.7846 0.1287 63.94);
  --border: oklch(0.8895 0.0187 86.15);
  --input: oklch(0.8895 0.0187 86.15);
  --ring: oklch(0.19 0.0181 259.7);
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.06);
  --surface-blur: none;
  background: var(--background);
  color: var(--foreground);
}

/* ---------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "cv05", "ss01";
  font-size: 15px;
  line-height: 1.55;
}
h1,
h2,
h3,
h4 {
  letter-spacing: -0.015em;
  margin: 0;
  font-weight: 600;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------- primitives */
.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--card) 78%, transparent);
  -webkit-backdrop-filter: var(--surface-blur);
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-panel);
}
.panel-solid {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-panel);
}
.panel-pad {
  padding: 18px 20px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-size: 15px;
  font-weight: 600;
}
.panel-body {
  padding: 18px 20px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
}
.mono,
.mono-xs {
  font-family: var(--font-mono);
}
.mono-xs {
  font-size: 11px;
  line-height: 1.4;
}
.muted {
  color: var(--muted-foreground);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.strong {
  font-weight: 600;
}
.center {
  text-align: center;
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.rise-in {
  animation: rise 500ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rise-in {
    animation: none;
  }
}

/* layout helpers */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wrap {
  flex-wrap: wrap;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack > * + * {
  margin-top: 18px;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-7-5 {
  grid-template-columns: 7fr 5fr;
}
.grid-8-4 {
  grid-template-columns: 8fr 4fr;
}
.gap-sm {
  gap: 12px;
}
.mt-0 {
  margin-top: 0;
}
.spacer {
  flex: 1 1 auto;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font: 500 14px/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  background: color-mix(in oklab, var(--primary) 88%, black);
  border-color: color-mix(in oklab, var(--primary) 88%, black);
}
.btn-ghost {
  border-color: transparent;
}
.btn-danger {
  border-color: color-mix(in oklab, var(--bad) 45%, transparent);
  color: var(--bad);
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  position: relative;
}
.icon-btn:hover {
  background: var(--accent);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* -------------------------------------------------------------- badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid;
  font: 500 11.5px/1.7 var(--font-sans);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}
.badge-good {
  color: var(--good);
  border-color: color-mix(in oklab, var(--good) 35%, transparent);
  background: color-mix(in oklab, var(--good) 12%, transparent);
}
.badge-warn {
  color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 35%, transparent);
  background: color-mix(in oklab, var(--warn) 12%, transparent);
}
.badge-bad {
  color: var(--bad);
  border-color: color-mix(in oklab, var(--bad) 35%, transparent);
  background: color-mix(in oklab, var(--bad) 12%, transparent);
}
.badge-info {
  color: var(--info);
  border-color: color-mix(in oklab, var(--info) 35%, transparent);
  background: color-mix(in oklab, var(--info) 12%, transparent);
}
.badge-neutral {
  color: var(--muted-foreground);
  border-color: var(--border);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}

/* --------------------------------------------------------------- forms */
label.field {
  display: block;
}
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.input,
.select,
.textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--input);
  background: var(--card);
  color: var(--foreground);
  font: 400 14px/1.4 var(--font-sans);
}
.textarea {
  min-height: 96px;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 80%, transparent);
}
.help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.error-text {
  color: var(--bad);
  font-size: 12.5px;
  margin-top: 6px;
}
.notice {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 55%, transparent);
  padding: 12px 14px;
  font-size: 13px;
}
.notice-good {
  border-color: color-mix(in oklab, var(--good) 35%, transparent);
  background: color-mix(in oklab, var(--good) 10%, transparent);
}
.notice-bad {
  border-color: color-mix(in oklab, var(--bad) 35%, transparent);
  background: color-mix(in oklab, var(--bad) 10%, transparent);
}

/* ------------------------------------------------------------ KPI card */
.kpi {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.kpi-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.delta {
  font-family: var(--font-mono);
  font-size: 11px;
}
.delta-up {
  color: var(--good);
}
.delta-down {
  color: var(--bad);
}
.spark {
  width: 92px;
  height: 34px;
}

/* --------------------------------------------------------- app shell */
.shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 244px;
  flex: 0 0 244px;
  border-right: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  -webkit-backdrop-filter: var(--surface-blur);
  backdrop-filter: var(--surface-blur);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: grid;
  place-items: center;
  font: 700 14px/1 var(--font-mono);
}
.brand-name {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav {
  padding: 6px 10px 18px;
  overflow-y: auto;
  flex: 1;
}
.nav-group {
  margin: 14px 8px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin-bottom: 2px;
}
.nav-link:hover {
  background: var(--accent);
  color: var(--foreground);
}
.nav-link.active {
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--foreground);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 82%, transparent);
  -webkit-backdrop-filter: var(--surface-blur);
  backdrop-filter: var(--surface-blur);
}
.crumbs {
  font-size: 13px;
  color: var(--muted-foreground);
}
.crumbs b {
  color: var(--foreground);
  font-weight: 500;
}
.topsearch {
  position: relative;
  max-width: 260px;
  width: 100%;
}
.topsearch .input {
  height: 36px;
  padding-left: 32px;
}
.topsearch svg {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 15px;
  height: 15px;
  color: var(--muted-foreground);
}
.page {
  padding: 24px 22px 56px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 22px;
}
.dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
}
.menu-toggle {
  display: none;
}
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}
body.nav-open .backdrop {
  display: block;
}

/* notification drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 360px;
  max-width: 92vw;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  transform: translateX(102%);
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
body.drawer-open .drawer {
  transform: none;
}
body.drawer-open .backdrop {
  display: block;
}
.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-body {
  overflow-y: auto;
  padding: 8px 0;
}
.notif {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.notif.unread {
  background: color-mix(in oklab, var(--primary) 7%, transparent);
}
.notif-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--muted);
  color: var(--muted-foreground);
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}
.modal.open {
  display: flex;
}
.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
}
.modal-head,
.modal-foot {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head {
  border-bottom: 1px solid var(--border);
}
.modal-foot {
  border-top: 1px solid var(--border);
}
.modal-body {
  padding: 20px;
}
.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.step {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}
.step.active {
  border-color: var(--primary);
  color: var(--primary);
}

/* attention panel */
.attention-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.attention-item:last-child {
  border-bottom: 0;
}
.attention-rule {
  width: 3px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--warn);
  flex: 0 0 3px;
}
.attention-rule.bad {
  background: var(--bad);
}
.attention-rule.info {
  background: var(--info);
}

/* charts */
.chart-box {
  position: relative;
  width: 100%;
  height: 260px;
}
.chart-sm {
  height: 200px;
}
.chart-lg {
  height: 320px;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted-foreground);
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 6px;
}
.funnel-row {
  display: grid;
  grid-template-columns: 150px 1fr 74px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
}
.funnel-track {
  height: 12px;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

/* tables */
table.anima {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.anima th {
  text-align: left;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.anima td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.anima tbody tr:hover {
  background: color-mix(in oklab, var(--accent) 55%, transparent);
}
.table-wrap {
  overflow-x: auto;
}

/* DataTables skin */
.dataTables_wrapper {
  font-size: 13.5px;
  color: var(--foreground);
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--input);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-left: 6px;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  color: var(--muted-foreground);
  font-size: 12.5px;
  padding: 10px 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--foreground) !important;
  margin: 0 2px;
  padding: 4px 10px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
}
div.dt-buttons {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 4px;
}
button.dt-button {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--foreground) !important;
  font: 500 12.5px/1 var(--font-sans) !important;
  padding: 8px 12px !important;
  margin: 0 !important;
}
button.dt-button:hover {
  background: var(--accent) !important;
}
table.dataTable tbody tr {
  background: transparent !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
  background-color: var(--primary) !important;
  border: 0 !important;
  box-shadow: none !important;
}
table.dataTable > tbody > tr.child ul.dtr-details {
  width: 100%;
}
table.dataTable > tbody > tr.child span.dtr-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  min-width: 40%;
}

/* empty state */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted-foreground);
}
.empty h3 {
  color: var(--foreground);
  margin-bottom: 6px;
  font-size: 15px;
}
.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--muted) 80%, transparent),
    color-mix(in oklab, var(--muted) 40%, transparent),
    color-mix(in oklab, var(--muted) 80%, transparent)
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  height: 14px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ------------------------------------------------- public storefront */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
.pub-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.pub-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted-foreground);
}
.pub-nav a:hover {
  color: var(--foreground);
}
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}
.pub-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0;
}
.hero h1 {
  font-size: 46px;
  line-height: 1.06;
  margin: 14px 0 18px;
}
.hero p.lead {
  font-size: 17px;
  color: var(--muted-foreground);
  max-width: 46ch;
}
.stat-row {
  display: flex;
  gap: 44px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.stat-value {
  font-size: 24px;
  font-weight: 600;
}
.cover-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cover-duo img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
}
.cover-duo img:first-child {
  transform: translateY(22px);
}
.cover-duo img:last-child {
  transform: translateY(-8px);
}
.book-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.book-card img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}
.book-card .book-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.book-card .book-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price {
  font-size: 17px;
  font-weight: 600;
}
.portrait {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
}
.step-card {
  padding: 18px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-foreground);
}
.quote {
  font-size: 22px;
  line-height: 1.4;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-line img {
  width: 64px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.qty button:hover {
  background: var(--accent);
}
.qty span {
  min-width: 34px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
}
.summary-total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 17px;
  font-weight: 600;
}
.plan-card {
  padding: 22px;
}
.plan-price {
  font-size: 32px;
  font-weight: 600;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}
.check-list li::before {
  content: "✓";
  color: var(--good);
  margin-right: 9px;
  font-weight: 700;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tl-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
}
.tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card);
  margin-top: 5px;
}
.tl-dot.done {
  border-color: var(--good);
  background: var(--good);
}
.tl-dot.current {
  border-color: var(--primary);
  background: var(--primary);
}
.tl-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 4px 0;
}
.tl-body {
  padding-bottom: 20px;
}
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}

/* ------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-7-5,
  .grid-8-4,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    gap: 32px;
  }
}
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    z-index: 50;
    transform: translateX(-104%);
    transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
    background: var(--card);
  }
  body.nav-open .sidebar {
    transform: none;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 0;
  }
  .hero h1 {
    font-size: 34px;
  }
  .pub-nav {
    display: none;
  }
  .section {
    padding: 48px 0;
  }
}
@media (max-width: 700px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .page,
  .topbar,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .funnel-row {
    grid-template-columns: 108px 1fr 60px;
    font-size: 12px;
  }
  .topsearch {
    display: none;
  }
  .cart-line {
    grid-template-columns: 56px 1fr;
  }
}
@media print {
  .sidebar,
  .topbar,
  .drawer,
  .pub-header,
  .pub-footer,
  div.dt-buttons {
    display: none !important;
  }
}

/* ============================================================
   Checkout, cart, membership and order-tracking utilities
   ============================================================ */
.lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted-foreground);
  max-width: 62ch;
}
.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.cart-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 22px;
  align-items: start;
}
.cart-summary {
  position: sticky;
  top: 92px;
}
.cart-lines-compact {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.panel-accent {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.gcash-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--secondary);
}
.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover {
  border-color: var(--primary);
}
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
.ticks li svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--primary);
}

@media (max-width: 900px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    position: static;
  }
  .gcash-box,
  .choice-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Platform Admin — navigation groups, filters, pipeline, states
   ============================================================ */

.nav-tree { display: block; }
.nav-parent { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.nav-caret { margin-left: auto; display: inline-flex; transition: transform 0.18s ease; }
.nav-caret svg { width: 14px; height: 14px; }
.nav-tree.open .nav-caret { transform: rotate(180deg); }
.nav-children { margin: 2px 0 6px 0; padding-left: 26px; border-left: 1px solid var(--border); }
.nav-link.nav-child { padding: 7px 10px; font-size: 12.5px; }

.topsearch { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px; }
.topsearch svg { width: 15px; height: 15px; color: var(--muted-foreground); position: absolute; left: 10px; }
.topsearch .input { padding-left: 32px; }
@media (max-width: 820px) { .topsearch { display: none; } }

.chipbar { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { color: var(--foreground); border-color: var(--ring); }
.chip-on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.daterange { margin: 0 0 14px; }

.pipeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-col { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pipeline-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.pipeline-body { display: grid; gap: 8px; padding: 10px; }
.pipeline-card {
  display: block; text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--chart-1);
  border-radius: var(--radius-md); padding: 10px;
}
.pipeline-card:hover { border-color: var(--ring); }
.pipeline-card.is-overdue { border-left-color: var(--danger); }

.empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 10px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--muted);
}
.empty-icon svg { width: 18px; height: 18px; }
.empty .btn { margin-top: 12px; }
.empty-error .empty-icon { border-color: color-mix(in oklab, var(--danger) 45%, var(--border)); }
.loading-state { padding: 18px 4px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.facts p.small { color: var(--foreground); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--border); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before {
  content: ""; position: absolute; left: -23px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--border);
}
.timeline li.done::before { background: var(--success); border-color: var(--success); }

/* ---- Agent marketing links -------------------------------------------- */
.linkcard {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.linkcard-qr {
  flex: 0 0 auto; width: 92px; height: 92px; padding: 6px;
  background: #fff; border-radius: var(--radius-sm); display: grid; place-items: center;
}
.linkcard-qr svg { width: 100%; height: 100%; display: block; }
.linkcard-body { flex: 1 1 auto; min-width: 0; }
.linkcard-body .input { margin-top: 8px; }
.mono-input { font-family: var(--font-mono); font-size: 12px; }
.funnel-list { display: grid; gap: 10px; }
.funnel-row { display: grid; gap: 4px; }
.funnel-bar { height: 8px; border-radius: 99px; background: var(--chart-1); }
.funnel-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
@media (max-width: 560px) { .linkcard { flex-direction: column; } .linkcard-qr { width: 108px; height: 108px; } }
