/* Takar brand: espresso + latte foam. Derived from web-app-style tokens.css. */
/* Self-hosted fonts: Plus Jakarta Sans (display, 800) + Inter (body) */
@font-face{font-family:"Jakarta";src:url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Jakarta";src:url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Jakarta";src:url("fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");font-weight:800;font-display:swap}
@font-face{font-family:"Inter";src:url("fonts/inter-latin-400-normal.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Inter";src:url("fonts/inter-latin-500-normal.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Inter";src:url("fonts/inter-latin-600-normal.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Inter";src:url("fonts/inter-latin-700-normal.woff2") format("woff2");font-weight:700;font-display:swap}
:root{--font-display:"Jakarta",ui-sans-serif,system-ui,sans-serif;--font-body:"Inter",ui-sans-serif,system-ui,sans-serif}
body{font-family:var(--font-body)}
.font-display{font-family:var(--font-display)}
/* z-index scale (only these): */
:root{--z-header:30;--z-nav:40;--z-overlay:50;--z-sheet:60;--z-toast:70}

/* ═══════════════ Design tokens — "Brand Stage" (PLAYBOOK.md Bagian B) ═══════════════
   THE one place for colour, shadow, radius and motion values.
   Each colour is stored once as RGB channels (`--c-x-rgb`) so Tailwind can map it with opacity
   support (`bg-primary/10`), plus a ready colour (`--c-x`) for plain CSS / chart libraries.
   Pages use the semantic utilities only (bg-surface, text-muted, border-line …) — never hex,
   never the Tailwind palette.
   Example values = navy + cream. Replace the brand rows with your brand; derive lighter/darker
   shades from the brand itself, don't invent new blues/greys. */
:root {
  color-scheme: light;

  /* neutrals (staff apps: warm off-white) */
  --c-canvas-rgb: 246 243 238;        /* #f6f3ee app background (warm off-white) */
  --c-surface-rgb: 255 255 255;       /* #ffffff cards, tables, inputs */
  --c-surface-2-rgb: 240 234 226;     /* #f0eae2 table head, secondary button, skeleton, hover */
  --c-line-rgb: 231 223 213;          /* #e7dfd5 borders and dividers */
  --c-ink-rgb: 36 23 16;              /* #241710 text (espresso ink) */
  --c-muted-rgb: 117 101 91;          /* #75655b secondary text (~5.3:1 on white) */

  /* brand */
  --c-primary-rgb: 59 36 25;           /* #3b2419 brand: espresso */
  --c-primary-deep-rgb: 28 16 10;      /* #1c100a bottom of the stage */
  --c-primary-2-rgb: 128 78 48;        /* #804e30 crema glow / hover on primary */
  --c-primary-soft-rgb: 244 236 228;   /* #f4ece4 selected rows, quiet brand chips */
  --c-accent-rgb: 240 226 207;        /* #f0e2cf second colour: latte foam */
  --c-accent-soft-rgb: 248 241 232;   /* #f8f1e8 ::selection, very light fills */
  --c-accent-ink-rgb: 59 36 25;       /* text on accent = primary */
  --c-tint-rgb: 240 226 207;          /* icon bubble on white (= accent; customer theme = primary-soft) */

  /* status: soft background + strong text of the same tone */
  --c-ok-rgb: 21 128 61;              /* #15803d */
  --c-ok-soft-rgb: 220 252 231;       /* #dcfce7 */
  --c-warn-rgb: 180 83 9;             /* #b45309 */
  --c-warn-soft-rgb: 251 234 221;     /* #fbeadd terracotta soft (no yellow) */
  --c-danger-rgb: 220 38 38;          /* #dc2626 */
  --c-danger-soft-rgb: 254 226 226;   /* #fee2e2 */
  --c-info-rgb: 3 105 161;            /* #0369a1 */
  --c-info-soft-rgb: 224 242 254;     /* #e0f2fe */

  --c-canvas: rgb(var(--c-canvas-rgb));
  --c-surface: rgb(var(--c-surface-rgb));
  --c-surface-2: rgb(var(--c-surface-2-rgb));
  --c-line: rgb(var(--c-line-rgb));
  --c-ink: rgb(var(--c-ink-rgb));
  --c-muted: rgb(var(--c-muted-rgb));
  --c-primary: rgb(var(--c-primary-rgb));
  --c-primary-deep: rgb(var(--c-primary-deep-rgb));
  --c-primary-2: rgb(var(--c-primary-2-rgb));
  --c-primary-soft: rgb(var(--c-primary-soft-rgb));
  --c-accent: rgb(var(--c-accent-rgb));
  --c-accent-soft: rgb(var(--c-accent-soft-rgb));
  --c-accent-ink: rgb(var(--c-accent-ink-rgb));
  --c-tint: rgb(var(--c-tint-rgb));
  --c-ok: rgb(var(--c-ok-rgb)); --c-ok-soft: rgb(var(--c-ok-soft-rgb));
  --c-warn: rgb(var(--c-warn-rgb)); --c-warn-soft: rgb(var(--c-warn-soft-rgb));
  --c-danger: rgb(var(--c-danger-rgb)); --c-danger-soft: rgb(var(--c-danger-soft-rgb));
  --c-info: rgb(var(--c-info-rgb)); --c-info-soft: rgb(var(--c-info-soft-rgb));

  /* depth — one definition each */
  --shadow-lift: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(36, 23, 16, 0.04), 0 12px 32px -12px rgba(36, 23, 16, 0.14);
  --shadow-dark-lift: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 48px -20px rgba(28, 16, 10, 0.6);
  --shadow-bar: 0 -6px 24px rgba(36, 23, 16, 0.08);
  --shadow-pop: 0 24px 56px -16px rgba(28, 16, 10, 0.32);

  /* radius — three (+ full) */
  --radius-hero: 28px;
  --radius-card: 24px;
  --radius-field: 14px;

  /* motion: --spring overshoots ~16% (press release, pills), --spring-soft settles (sheets, page enter) */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
  --spring-soft: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1);
}

@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: cubic-bezier(0.2, 0.9, 0.3, 1.25);
    --spring-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

/* Customer-facing variant (website, member portal): brand + WHITE. Put the class on the app wrapper. */
.theme-customer,
:root:has(.theme-customer) {
  --c-canvas-rgb: 245 246 248;        /* #f5f6f8 */
  --c-surface-2-rgb: 238 240 244;     /* #eef0f4 */
  --c-line-rgb: 227 230 236;          /* #e3e6ec */
  --c-accent-rgb: 255 255 255;        /* numbers/text on the stage = white */
  --c-accent-soft-rgb: 241 244 248;   /* #f1f4f8 */
  --c-tint-rgb: 233 237 245;          /* #e9edf5 — never white on white */
  --c-canvas: rgb(var(--c-canvas-rgb));
  --c-surface-2: rgb(var(--c-surface-2-rgb));
  --c-line: rgb(var(--c-line-rgb));
  --c-accent: rgb(var(--c-accent-rgb));
  --c-accent-soft: rgb(var(--c-accent-soft-rgb));
  --c-tint: rgb(var(--c-tint-rgb));
}

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation; /* no double-tap zoom / 300ms delay, pinch-zoom kept */
}
/* iOS zooms into fields < 16px on focus */
@media (max-width: 1023px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
}
body {
  color: var(--c-ink);
  background: var(--c-canvas);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.font-display { font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }
::selection { background: var(--c-accent-soft); }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
/* no autoprefixer? iOS only reads the -webkit- form */
.select-none { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pt-safe { padding-top: env(safe-area-inset-top); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }
.pb-safe-4 { padding-bottom: calc(env(safe-area-inset-bottom) + 1rem); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ── Surfaces ── */
/* The stage: one per screen. Light glow top-right, a whisper of accent bottom-left, deep brand base. */
.mesh {
  color: #fff;
  background-color: var(--c-primary-deep);
  background-image:
    radial-gradient(60% 55% at 78% 18%, rgb(var(--c-primary-2-rgb) / 0.75) 0%, transparent 60%),
    radial-gradient(50% 45% at 12% 100%, rgb(var(--c-accent-rgb) / 0.1) 0%, transparent 60%),
    radial-gradient(80% 70% at 30% 0%, rgb(var(--c-primary-2-rgb) / 0.9) 0%, transparent 70%),
    linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-deep) 100%);
}
/* Small dark cards and the primary button. */
.mesh-soft {
  color: #fff;
  background-color: var(--c-primary-deep);
  background-image:
    radial-gradient(70% 90% at 100% 0%, rgb(var(--c-primary-2-rgb) / 0.6) 0%, transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgb(var(--c-accent-rgb) / 0.08) 0%, transparent 60%),
    linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-deep) 100%);
}
/* Reward / member card in the second colour. Text = primary. */
.accent-grad {
  color: var(--c-primary);
  background-image:
    radial-gradient(90% 120% at 100% 0%, #ffffff 0%, transparent 55%),
    linear-gradient(160deg, rgb(var(--c-accent-rgb)) 0%, rgb(var(--c-accent-rgb) / 0.75) 100%);
  background-color: var(--c-surface-2);
}
/* Pills / buttons / cards ON the dark stage. No backdrop blur (cheap Android). */
.glass {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Motion ── */
/* Press: anything with an `active:scale-*` class sinks fast and springs back. */
[class*="active:scale"][class] {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
  transition-duration: 150ms, 150ms, 150ms, 150ms, 150ms, 420ms;
  transition-timing-function: var(--ease-out), var(--ease-out), var(--ease-out), var(--ease-out), var(--ease-out), var(--spring);
}
[class*="active:scale"][class]:active { transition-duration: 150ms, 150ms, 150ms, 150ms, 150ms, 80ms; }

/* First paint of a card row: fade + rise 6px, max 6 children, 40ms stagger. */
.rise-in > :nth-child(-n + 6) { animation: rise 420ms var(--spring-soft) both; }
.rise-in > :nth-child(2) { animation-delay: 40ms; }
.rise-in > :nth-child(3) { animation-delay: 80ms; }
.rise-in > :nth-child(4) { animation-delay: 120ms; }
.rise-in > :nth-child(5) { animation-delay: 160ms; }
.rise-in > :nth-child(6) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html[data-lowend] .rise-in > * { animation: none; }

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