/* ==========================================================================
   Flaz Shoe Care - Kumo Complements Stylesheet
   Loaded after assets/kumo/kumo-standalone.css and assets/css/utilities.css.
   Layout and component rules not covered by Kumo, built on Kumo design tokens
   (--color-kumo-*, --text-color-kumo-*) so light and dark mode both apply.
   ========================================================================== */

/* ─── Design Tokens ─────────────────────────────────────────────────────── */

/* Accent: Flaz orange replaces the Kumo brand blue */
:root,
[data-mode] {
  --color-kumo-brand: #FF6105;
  --color-kumo-brand-hover: #E05300;
  --text-color-kumo-brand: light-dark(#C24A00, #FFA069);
  --flaz-brand-tint: light-dark(#FFF3EC, color-mix(in oklab, #FF6105 14%, transparent));
  --flaz-brand-line: light-dark(#FFCCB0, color-mix(in oklab, #FF6105 38%, transparent));
  --flaz-brand-ink: light-dark(#C24A00, #FFA069);
  --flaz-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --flaz-overlay: light-dark(rgba(10, 10, 10, 0.5), rgba(0, 0, 0, 0.65));
}

/* Status palette (order lifecycle) */
:root,
[data-mode] {
  --st-pending-fg: light-dark(#B45309, #FCD34D);
  --st-pending-bg: light-dark(#FFFBEB, rgba(245, 158, 11, 0.14));
  --st-washing-fg: light-dark(#0369A1, #7DD3FC);
  --st-washing-bg: light-dark(#F0F9FF, rgba(14, 165, 233, 0.14));
  --st-drying-fg: light-dark(#6D28D9, #C4B5FD);
  --st-drying-bg: light-dark(#F5F3FF, rgba(139, 92, 246, 0.16));
  --st-qc-fg: light-dark(#0F766E, #5EEAD4);
  --st-qc-bg: light-dark(#F0FDFA, rgba(20, 184, 166, 0.14));
  --st-ready-fg: light-dark(#047857, #6EE7B7);
  --st-ready-bg: light-dark(#ECFDF5, rgba(16, 185, 129, 0.14));
  --st-completed-fg: light-dark(#15803D, #86EFAC);
  --st-completed-bg: light-dark(#DCFCE7, rgba(22, 163, 74, 0.18));
  --st-cancelled-fg: light-dark(#B91C1C, #FCA5A5);
  --st-cancelled-bg: light-dark(#FEF2F2, rgba(239, 68, 68, 0.14));
}

/* ─── Base ──────────────────────────────────────────────────────────────── */

@layer base {
  html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    min-height: 100vh;
    background: var(--color-kumo-canvas);
    color: var(--text-color-kumo-default);
    font-size: 14px;
  }

  a { color: inherit; }
  .font-mono, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .tabular { font-variant-numeric: tabular-nums; }

  :focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
  .skip-link {
    position: absolute; left: 16px; top: -64px; z-index: 100;
    display: inline-flex; align-items: center; height: 36px; padding: 0 12px;
    border-radius: 8px; background: var(--color-kumo-contrast); color: var(--text-color-kumo-inverse);
  }
  .skip-link:focus { top: 16px; }
}

/* Drop shadows are flattened; Kumo rings (1px box-shadow outlines) stay intact */
.shadow-xs,
.shadow-sm,
.shadow,
.shadow-md,
.shadow-lg {
  --tw-shadow: 0 0 #0000 !important;
}

/* Theme cross-fade fallback when View Transitions are unavailable */
.theme-transition, .theme-transition *, .theme-transition *::before, .theme-transition *::after {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease !important;
}

/* Theme toggle shows the icon of the mode it switches to */
[data-mode="light"] .theme-icon-sun { display: none; }
[data-mode="dark"] .theme-icon-moon { display: none; }

/* ─── Button Emphasis Variables ─────────────────────────────────────────── */
/* Kumo sets these inline from React; defined here so markup stays inline-style free.
   Deeper orange stops keep white labels at readable contrast. */

.kumo-btn-primary {
  --kumo-button-emphasis-ring: #A33F00;
  --kumo-button-emphasis-bg: #E05300;
  --kumo-button-emphasis-gradient-start: #DB5000;
  --kumo-button-emphasis-gradient-end: #BF4600;
}

.kumo-btn-destructive {
  --kumo-button-emphasis-ring: color-mix(in oklch, var(--color-kumo-danger), black 10%);
  --kumo-button-emphasis-bg: color-mix(in oklch, var(--color-kumo-danger), white 30%);
  --kumo-button-emphasis-gradient-start: color-mix(in oklch, var(--color-kumo-danger), white 15%);
  --kumo-button-emphasis-gradient-end: var(--color-kumo-danger);
}

/* Emphasis gradient overlay (Kumo renders it as a child span) */
.kumo-btn-primary,
.kumo-btn-destructive {
  isolation: isolate;
}

.kumo-btn-primary::before,
.kumo-btn-destructive::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: linear-gradient(to bottom, var(--kumo-button-emphasis-gradient-start), var(--kumo-button-emphasis-gradient-end));
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.22);
}

.kumo-btn-primary:not(:disabled):hover::before,
.kumo-btn-destructive:not(:disabled):hover::before {
  background-image: linear-gradient(to bottom, var(--kumo-button-emphasis-bg), var(--kumo-button-emphasis-gradient-end));
}

button[aria-busy="true"] { cursor: progress; }

/* ─── Component Layer ───────────────────────────────────────────────────── */
/* Wrapped in the Tailwind components layer so utilities (hidden, md:flex, ...)
   placed on the same element always win, as in a standard Tailwind build. */

@layer components {
  /* ─── Form Controls ─────────────────────────────────────────────────────── */

  .kumo-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23737373'%3E%3Cpath d='M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0Zm-96-84.68L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48a8 8 0 0 0 11.32 11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
  }

  .kumo-checkbox,
  input[type="checkbox"]:not(.switch input),
  input[type="radio"] {
    width: 1rem;
    height: 1rem;
    flex: none;
    accent-color: var(--color-kumo-brand);
    cursor: pointer;
  }

  input[type="file"] { font-size: 13px; color: var(--text-color-kumo-subtle); }
  input[type="file"]::file-selector-button {
    margin-right: 10px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; cursor: pointer;
    background: var(--color-kumo-base); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line); font: inherit; font-weight: 500;
  }
  input[type="file"]::file-selector-button:hover { background: var(--color-kumo-tint); }

  fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
  input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 0; }
  input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }
  [data-mode="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

  /* ─── Legacy Component Layer (Kumo skin) ────────────────────────────────── */
  /* Class names used by server markup and storefront JavaScript, restyled to
     Kumo geometry: 36px controls, 8px radius, 1px ring outlines. */

  /* Buttons */
  .btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
    font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
    cursor: pointer; text-decoration: none; user-select: none;
    background: var(--color-kumo-base); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line);
    transition: background-color 150ms var(--flaz-ease), color 150ms var(--flaz-ease), box-shadow 150ms var(--flaz-ease);
  }
  .btn:hover { background: var(--color-kumo-tint); }
  .btn:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
  .btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
  .btn-primary,
  a.btn-primary {
    isolation: isolate; overflow: hidden; color: #fff;
    background: #E05300; box-shadow: 0 0 0 1px #A33F00;
  }
  .btn-primary::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background-image: linear-gradient(to bottom, #DB5000, #BF4600);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.22);
  }
  .btn-primary:hover { background: #E05300; }
  .btn-primary:hover::before { background-image: linear-gradient(to bottom, #E05300, #BF4600); }
  .btn-dark,
  a.btn-dark { background: var(--color-kumo-contrast); color: var(--text-color-kumo-inverse); box-shadow: 0 0 0 1px var(--color-kumo-contrast); }
  .btn-dark:hover { background: var(--color-kumo-contrast); opacity: 0.88; }
  .btn-outline { background: transparent; }
  .btn-outline:hover { background: transparent; box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-kumo-focus) 25%, transparent); color: var(--text-color-kumo-strong); }
  .btn-outline-light { background: transparent; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3); }
  .btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); }
  .btn-ghost { background: transparent; box-shadow: none; }
  .btn-ghost:hover { background: var(--color-kumo-tint); }
  .btn-danger { background: var(--color-kumo-base); color: var(--text-color-kumo-danger); }
  .btn-danger:hover { background: var(--color-kumo-danger-tint); box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-kumo-danger) 30%, transparent); }
  .btn-sm { height: 26px; padding: 0 8px; gap: 4px; border-radius: 6px; font-size: 12px; }
  .btn-lg { height: 40px; padding: 0 16px; gap: 8px; }
  .btn-hero { height: 44px; padding: 0 18px; gap: 8px; font-size: 15px; }
  .btn-icon { width: 36px; padding: 0; }
  .btn-sm.btn-icon { width: 26px; }

  /* Inputs */
  .input, .select, .textarea {
    width: 100%; height: 36px; padding: 0 12px;
    border: 0; border-radius: 8px; outline: none;
    background: var(--color-kumo-control); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line);
    font: inherit; font-size: 14px;
    transition: box-shadow 150ms var(--flaz-ease);
  }
  .textarea { height: auto; min-height: 96px; padding: 8px 12px; resize: vertical; line-height: 1.5; }
  .select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23737373'%3E%3Cpath d='M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0Zm-96-84.68L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48a8 8 0 0 0 11.32 11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px; }
  .input::placeholder, .textarea::placeholder { color: var(--text-color-kumo-placeholder); }
  .input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--color-kumo-focus) 50%, transparent); }
  .input.is-invalid, .select.is-invalid, .textarea.is-invalid { box-shadow: 0 0 0 1px var(--color-kumo-danger); }
  .field-error { margin-top: 6px; font-size: 13px; color: var(--text-color-kumo-danger); }
  .label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text-color-kumo-default); }
  .hint { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--text-color-kumo-subtle); }

  /* Pills (filter chips / segmented choices) */
  .pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border: 0; border-radius: 9999px;
    background: var(--color-kumo-base); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line);
    font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
    transition: background-color 150ms var(--flaz-ease), color 150ms var(--flaz-ease);
  }
  .pill:hover { background: var(--color-kumo-tint); }
  .pill.is-active { background: var(--color-kumo-contrast); color: var(--text-color-kumo-inverse); box-shadow: 0 0 0 1px var(--color-kumo-contrast); }
  .pill:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }

  /* Chips and eyebrow labels */
  .chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 9999px; font-size: 12px; font-weight: 500;
    background: var(--color-kumo-fill); color: var(--text-color-kumo-badge-neutral-subtle);
  }
  .chip-brand { background: var(--flaz-brand-tint); color: var(--flaz-brand-ink); }
  .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-color-kumo-subtle); }

  /* Checkbox row */
  .check-row {
    display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px;
    border-radius: 8px; background: var(--color-kumo-base); cursor: pointer; font-size: 14px;
    box-shadow: 0 0 0 1px var(--color-kumo-line);
  }
  .check-row:hover { background: var(--color-kumo-tint); }
  .check-row:has(input:checked) { background: var(--flaz-brand-tint); box-shadow: 0 0 0 1px var(--flaz-brand-line); }
  .check-row:focus-within { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }

  /* ─── Status Badges ─────────────────────────────────────────────────────── */

  .badge {
    display: inline-flex; flex: none; align-items: center; gap: 6px; width: fit-content;
    padding: 2px 8px; border-radius: 9999px;
    font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap;
    background: var(--color-kumo-fill); color: var(--text-color-kumo-default);
  }
  .badge-dot { width: 7px; height: 7px; border-radius: 9999px; background: currentColor; flex: none; }
  .badge-pending   { color: var(--st-pending-fg);   background: var(--st-pending-bg); }
  .badge-washing   { color: var(--st-washing-fg);   background: var(--st-washing-bg); }
  .badge-drying, .badge-treatment { color: var(--st-drying-fg); background: var(--st-drying-bg); }
  .badge-qc        { color: var(--st-qc-fg);        background: var(--st-qc-bg); }
  .badge-ready     { color: var(--st-ready-fg);     background: var(--st-ready-bg); }
  .badge-completed { color: var(--st-completed-fg); background: var(--st-completed-bg); }
  .badge-cancelled { color: var(--st-cancelled-fg); background: var(--st-cancelled-bg); }
  .badge-select {
    appearance: none; -webkit-appearance: none;
    height: 28px; padding: 0 24px 0 10px;
    border: 0; border-radius: 9999px; outline: none;
    font: inherit; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 0 0 1px color-mix(in oklab, currentColor 22%, transparent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2352525b'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 11px;
    transition: box-shadow 150ms var(--flaz-ease), opacity 150ms var(--flaz-ease);
  }
  .badge-select:hover { box-shadow: 0 0 0 1.5px color-mix(in oklab, currentColor 45%, transparent); }
  .badge-select:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
  .badge-select:disabled { opacity: 0.6; cursor: wait; }

  /* ─── Surfaces ──────────────────────────────────────────────────────────── */

  .surface { background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .surface-paper { background: var(--color-kumo-elevated); box-shadow: 0 0 0 1px var(--color-kumo-hairline); }
  .glass {
    background: color-mix(in oklab, var(--color-kumo-base) 82%, transparent);
    box-shadow: 0 0 0 1px var(--color-kumo-line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .glass-strong { background: color-mix(in oklab, var(--color-kumo-base) 94%, transparent); }
  .hairline { box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .stat-card { border-radius: 8px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); padding: 16px; }
  .stat-value { font-size: 1.75rem; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--text-color-kumo-default); }
  .dropzone { border: 1px dashed var(--color-kumo-line); border-radius: 8px; background: var(--color-kumo-elevated); }
  .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Flash messages (legacy markup; new markup uses Ui::banner) */
  .flash { border-radius: 8px; padding: 12px 16px; font-size: 14px; }
  .flash-success { background: var(--color-kumo-success-tint); color: var(--text-color-kumo-success); }
  .flash-error { background: var(--color-kumo-danger-tint); color: var(--text-color-kumo-danger); }

  /* Kumo-style table (legacy class names) */
  .table-wrap { overflow-x: auto; border-radius: 8px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--text-color-kumo-default); }
  .table th {
    padding: 8px 12px; text-align: left; white-space: nowrap;
    font-size: 12px; font-weight: 600; color: var(--text-color-kumo-strong);
    background: var(--color-kumo-elevated); border-bottom: 1px solid var(--color-kumo-fill);
  }
  .table td { padding: 12px; border-bottom: 1px solid var(--color-kumo-hairline); vertical-align: middle; }
  .table tr:last-child td { border-bottom: 0; }
  .table tbody tr:hover td { background: var(--color-kumo-tint); }

  /* Switch (Kumo Switch geometry) */
  .switch { position: relative; display: inline-flex; width: 36px; height: 20px; flex: none; }
  .switch input { position: absolute; inset: -10px -4px; width: calc(100% + 8px); height: 40px; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
  .switch span { position: absolute; inset: 0; border-radius: 9999px; background: var(--color-kumo-fill); box-shadow: 0 0 0 1px var(--color-kumo-line); transition: background-color 150ms var(--flaz-ease); }
  .switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 9999px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform 150ms var(--flaz-ease); }
  .switch input:checked + span { background: var(--color-kumo-brand); box-shadow: 0 0 0 1px var(--color-kumo-brand); }
  .switch input:checked + span::after { transform: translateX(16px); }
  .switch input:focus-visible + span { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }

  /* ─── Application Shell (admin) ─────────────────────────────────────────── */

  .app-shell {
    --sidebar-width: 15.5rem;
    --sidebar-active-bg: var(--color-kumo-tint);
    --sidebar-bg: var(--color-kumo-base);
    display: flex;
    min-height: 100vh;
  }
  .app-sidebar { width: var(--sidebar-width); position: sticky; top: 0; height: 100vh; }
  .app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .app-content { width: 100%; max-width: none; padding: 1.75rem 1.5rem 4rem; }
  .sidebar-heading { padding: 12px 12px 4px; font-size: 12px; font-weight: 500; color: var(--text-color-kumo-subtle); }
  .sidebar-link[data-active] { background: var(--sidebar-active-bg); color: var(--text-color-kumo-strong); }
  .sidebar-link[data-active] .sidebar-icon { opacity: 1; color: var(--color-kumo-brand); }
  .sidebar-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 9999px; background: var(--color-kumo-brand); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
  .app-scrim { display: none; }

  @media (max-width: 1023px) {
    .app-sidebar {
      position: fixed; inset: 0 auto 0 0; z-index: 70;
      transform: translateX(-100%);
      transition: transform 200ms cubic-bezier(0.77, 0, 0.175, 1);
    }
    .app-sidebar[data-open="true"] { transform: translateX(0); }
    .app-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: var(--flaz-overlay); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
    .app-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
    .app-content { padding: 1.25rem 1rem 3rem; }
  }

  /* Page rhythm */
  .stack-8 > * + * { margin-top: 2rem; }
  .stack-6 > * + * { margin-top: 1.5rem; }
  .stack-4 > * + * { margin-top: 1rem; }
  .form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid > .span-2 { grid-column: 1 / -1; }
  @media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

  /* Guest pages (login, installer) */
  .guest-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 2rem 1rem; }
  .guest-card { width: 100%; max-width: 400px; }
  .guest-card-wide { width: 100%; max-width: 640px; }

  /* ─── Storefront Navigation ─────────────────────────────────────────────── */

  .nav-indicator {
    position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 8px;
    background: var(--color-kumo-tint);
    opacity: 0; pointer-events: none;
    transition: left 250ms var(--flaz-ease), width 250ms var(--flaz-ease), opacity 150ms var(--flaz-ease);
  }
  .nav-link { position: relative; z-index: 1; padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--text-color-kumo-subtle); border-radius: 8px; text-decoration: none; }
  .nav-link:hover, .nav-link.is-active { color: var(--text-color-kumo-default); }
  .cart-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px;
    background: var(--color-kumo-brand); color: #fff; font-size: 11px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .cart-count.pulse { animation: count-pulse 250ms var(--flaz-ease); }
  @keyframes count-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

  .marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 18s linear infinite; }
  @keyframes marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

  .mobile-bar { transition: transform 250ms var(--flaz-ease), opacity 250ms var(--flaz-ease); }
  .mobile-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }

  /* ─── Hero ──────────────────────────────────────────────────────────────── */

  .hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
      linear-gradient(to right, var(--color-kumo-hairline) 1px, transparent 1px),
      linear-gradient(to bottom, var(--color-kumo-hairline) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  }
  .hero-glow-a {
    position: absolute; width: 720px; height: 720px; right: -200px; top: -160px; border-radius: 9999px;
    background: radial-gradient(closest-side, color-mix(in oklab, #FF6105 22%, transparent), transparent);
    pointer-events: none;
  }
  .hero-glow-b { display: none; }

  /* ─── Before-After Slider ───────────────────────────────────────────────── */

  .ba-stage {
    --pos: 50%;
    overscroll-behavior-x: contain;
    position: relative; overflow: hidden; user-select: none; -webkit-user-select: none;
    touch-action: pan-y; cursor: ew-resize; border-radius: 8px;
    background: var(--color-kumo-elevated); box-shadow: 0 0 0 1px var(--color-kumo-line);
  }
  .ba-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
  .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
  .ba-divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
  .ba-handle {
    position: absolute; top: 50%; left: var(--pos); width: 40px; height: 40px; margin: -20px 0 0 -20px;
    border-radius: 9999px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    display: flex; align-items: center; justify-content: center; color: #0A0A0A; cursor: ew-resize;
  }
  .ba-handle:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 3px; }
  .ba-label {
    position: absolute; top: 12px; padding: 2px 8px; border-radius: 9999px; font-size: 12px; font-weight: 500;
    transition: opacity 150ms var(--flaz-ease);
  }
  .ba-label-before { left: 12px; background: rgba(10, 10, 10, 0.72); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .ba-label-after { right: 12px; background: var(--color-kumo-brand); color: #fff; }
  .ba-stage.is-broken::after {
    content: "Foto tidak dapat dimuat"; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    padding: 4px 10px; border-radius: 9999px; background: rgba(10, 10, 10, 0.75); color: #fff; font-size: 12px; font-weight: 500; pointer-events: none;
  }
  .ba-thumb {
    border: 0; border-radius: 8px; background: var(--color-kumo-base); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line);
    padding: 10px 12px; min-height: 40px; text-align: left; cursor: pointer; font: inherit;
  }
  .ba-thumb:hover { background: var(--color-kumo-tint); }
  .ba-thumb.is-active { background: var(--flaz-brand-tint); box-shadow: 0 0 0 1px var(--flaz-brand-line); }
  .ba-thumb:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }

  /* ─── Treatment Cards ───────────────────────────────────────────────────── */

  .t-card {
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 8px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line);
    transition: background-color 150ms var(--flaz-ease), box-shadow 150ms var(--flaz-ease);
  }
  .t-card:hover { box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-kumo-focus) 30%, transparent); }
  .t-card.is-selected { background: var(--flaz-brand-tint); box-shadow: 0 0 0 1px var(--flaz-brand-line); }
  .qty { display: inline-flex; align-items: center; height: 32px; border-radius: 8px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .qty button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; background: transparent; border: 0; color: inherit; }
  .qty button:hover { background: var(--color-kumo-tint); }
  .qty button:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
  .qty span { min-width: 24px; text-align: center; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

  /* ─── Drawer, Modal and Scrim ───────────────────────────────────────────── */

  .scrim { position: fixed; inset: 0; z-index: 60; background: var(--flaz-overlay); opacity: 0; pointer-events: none; transition: opacity 250ms var(--flaz-ease); }
  .scrim.is-open { opacity: 1; pointer-events: auto; }
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
    width: 100%; max-width: 420px; min-width: 0; overflow: hidden; visibility: hidden;
    display: flex; flex-direction: column;
    background: var(--color-kumo-base); box-shadow: -1px 0 0 0 var(--color-kumo-line);
    transform: translateX(104%);
    transition: transform 250ms var(--flaz-ease), visibility 0s linear 250ms;
  }
  .drawer.is-open { transform: translateX(0); visibility: visible; transition: transform 250ms var(--flaz-ease), visibility 0s; }
  .drawer form { overflow-x: hidden; }
  .modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
  .modal.is-open { display: flex; }
  .modal-panel {
    width: 100%; max-height: calc(100vh - 32px); overflow-y: auto;
    border-radius: 12px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line);
  }
  body.scroll-locked { overflow: hidden; }
  .drawer .grid > *, .modal .grid > * { min-width: 0; }
  .drawer input, .drawer select, .drawer textarea, .modal input, .modal select, .modal textarea { max-width: 100%; min-width: 0; }

  .grid-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 250ms var(--flaz-ease); }
  .grid-collapse.is-open { grid-template-rows: 1fr; }
  .grid-collapse > div { overflow: hidden; min-height: 0; }

  /* Accordion (FAQ) */
  .faq-item { border-radius: 8px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .faq-item.is-open { background: var(--color-kumo-elevated); }

  /* ─── Receipt Ticket ────────────────────────────────────────────────────── */

  .ticket { position: relative; border-radius: 12px; background: var(--color-kumo-base); box-shadow: 0 0 0 1px var(--color-kumo-line); }
  .ticket-rule { border-top: 1px dashed var(--color-kumo-line); margin: 16px -20px; position: relative; }
  .ticket-rule::before, .ticket-rule::after {
    content: ""; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 9999px;
    background: var(--color-kumo-canvas); box-shadow: 0 0 0 1px var(--color-kumo-line);
  }
  .ticket-rule::before { left: -9px; }
  .ticket-rule::after { right: -9px; }
  .qr-canvas { image-rendering: pixelated; width: 132px; height: 132px; background: #fff; border-radius: 6px; padding: 6px; }

  /* ─── Tracking Timeline ─────────────────────────────────────────────────── */

  .tl { display: grid; gap: 0; }
  .tl-step { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 20px; }
  .tl-step:last-child { padding-bottom: 0; }
  .tl-step::before {
    content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--color-kumo-hairline);
    transform-origin: top; transform: scaleY(1);
  }
  .tl-step:last-child::before { display: none; }
  .tl-step.is-done::before { background: var(--tl-color, var(--color-kumo-brand)); animation: tl-grow 400ms var(--flaz-ease) both; }
  .tl-node {
    width: 24px; height: 24px; border-radius: 9999px; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-kumo-base); box-shadow: 0 0 0 1.5px var(--color-kumo-line); color: var(--text-color-kumo-inactive);
  }
  .tl-step.is-done .tl-node { background: var(--tl-color, var(--color-kumo-brand)); box-shadow: 0 0 0 1.5px var(--tl-color, var(--color-kumo-brand)); color: #fff; }
  .tl-step.is-current .tl-node { box-shadow: 0 0 0 1.5px var(--tl-color, var(--color-kumo-brand)); color: var(--tl-color, var(--color-kumo-brand)); }
  .tl-step.is-current .tl-node::after {
    content: ""; position: absolute; inset: -6px; border-radius: 9999px; border: 2px solid var(--tl-color, var(--color-kumo-brand));
    animation: tl-ring 1.6s ease-out infinite;
  }
  .tl-step.is-upcoming { opacity: 0.55; }
  @keyframes tl-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes tl-ring { 0% { opacity: 0.7; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.4); } }
  .tl.is-cancelled .tl-step { opacity: 0.4; }

  @media (min-width: 768px) {
    .tl.tl-horizontal { grid-template-columns: repeat(6, 1fr); }
    .tl.tl-horizontal .tl-step { grid-template-columns: 1fr; grid-template-rows: 24px auto; padding-bottom: 0; padding-right: 8px; gap: 10px; }
    .tl.tl-horizontal .tl-step::before { left: 24px; right: -4px; top: 11px; bottom: auto; width: auto; height: 2px; transform-origin: left; }
    .tl.tl-horizontal .tl-step.is-done::before { animation-name: tl-grow-x; }
  }
  @keyframes tl-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* ─── Toasts and Spinner ────────────────────────────────────────────────── */

  .toast-stack { position: fixed; right: 24px; bottom: 24px; left: auto; transform: none; z-index: 90; display: grid; gap: 8px; width: min(calc(100vw - 32px), 360px); pointer-events: none; }
  @media (max-width: 639px) {
    .toast-stack { right: 16px; bottom: 16px; }
  }
  .toast {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px;
    background: var(--color-kumo-base); color: var(--text-color-kumo-default);
    box-shadow: 0 0 0 1px var(--color-kumo-line); font-size: 14px; pointer-events: auto;
    animation: toast-in 250ms var(--flaz-ease);
  }
  .toast::before { content: ""; width: 8px; height: 8px; border-radius: 9999px; flex: none; background: var(--text-color-kumo-subtle); }
  .toast-success::before { background: var(--color-kumo-success); }
  .toast-error::before { background: var(--color-kumo-danger); }
  @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .spinner { width: 14px; height: 14px; border-radius: 9999px; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; display: inline-block; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .sortable-item.is-dragging { opacity: 0.4; }
}

/* ─── Reduced Motion and Print ──────────────────────────────────────────── */

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

@media print {
  @page { size: 80mm auto; margin: 4mm; }
  :root { color-scheme: light !important; }
  body { background: #fff !important; color: #000 !important; }
  .no-print { display: none !important; }
  .print-receipt { width: 72mm; margin: 0 auto; box-shadow: none !important; }
}
