/* view_dash.css — the customer page as a one-screen dashboard (Luis, 2026-09-30).
   After his reference layout, in the house dress: the SF Mono house font,
   white cards on the pale canvas, plum (#6b3744) for spend, green (#3f7a68) for
   done, charcoal (#1d1d1f) for the dark pills and the repair-ticket panel.
   The purchases table inside keeps its own styles from view.css. */

/* 2040px (Luis, 2026-10-08). It was 1880px, which left an empty band each side on his 2326px screen; full width then "feels too wide, make it one size less" — so a step between the two. */
.cv-container { max-width: 2040px !important; font-family: var(--ap-font, var(--font-ui, inherit)); }
.cvd-back { display: inline-flex; margin-bottom: 10px; }

/* Soft plum and green light behind the board, like the reference's warm glow.
   Kept inside the page's own width, and each glow sized closest-side so it is
   fully faded before any edge of its box (Luis, 2026-10-08): the box used to
   stick out 20px on the right with the plum still showing at its edge, a hard
   line 40px past the cards that made the top look wider than the board. */
.cv-container { position: relative; }
.cv-container::before {
  content: ""; position: absolute; top: -40px; right: 0; width: 70%; height: 560px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 78% 40%, rgba(107, 55, 68, 0.10), transparent),
    radial-gradient(closest-side at 45% 35%, rgba(63, 122, 104, 0.07), transparent);
}

/* ── Head ──────────────────────────────────────────────────────────────── */
.cvd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin: 4px 0 22px; }
/* The customer's name at the head of the page (Luis, 2026-10-09): the size and
   weight the big Orders / Repairs / Points numbers had, popping in on arrival
   on the house curve; the member number small after it. */
.cvd-title { margin: 0; font-size: clamp(40px, 4vw, 60px); font-weight: 400; letter-spacing: -.03em; line-height: 1; color: #1d1d1f;
  animation: cvdNamePop .52s var(--ease-liquid, cubic-bezier(.22, 1.12, .36, 1)) both; transform-origin: 0 100%; }
.cvd-title-id { margin-left: 14px; font-size: 14px; font-weight: 700; letter-spacing: .06em; color: #8a8f97; vertical-align: .55em; }
@keyframes cvdNamePop { from { opacity: 0; transform: translateY(10px) scale(.94); } }
/* The Apple look sets every h1 to 600 with !important; the name keeps the big numbers' 400. */
body.apple-mode .cvd-head h1.cvd-title, body .cvd-head h1.cvd-title { font-weight: 400 !important; letter-spacing: -.03em !important; }
@media (prefers-reduced-motion: reduce) { .cvd-title { animation: none; } }
.cvd-pills { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.cvd-pill-grp { display: flex; flex-direction: column; gap: 6px; }
.cvd-pill-lbl { font-size: 12px; color: #6e6e73; }
/* Call and Text at the head of the pill row (2026-10-08): two round buttons, the pills' 36px height. */
.cvd-contact { display: flex; gap: 8px; }
/* As app icons (Luis, 2026-10-08, after his reference): glossy rounded squares,
   green for the phone and blue for messages, a glass sheen across the top half,
   solid white glyphs. The pills' 36px, so the row stays level. */
.cvd-app {
  position: relative; width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0; margin: 0; font: inherit; cursor: pointer; -webkit-appearance: none; appearance: none;   /* Edit is a <button> */
  transition: transform .15s ease, box-shadow .15s ease;
}
/* Edit profile, leading the row (2026-10-08): amber, the third of the set. */
.cvd-app-edit {
  background: linear-gradient(160deg, #ffd27a 0%, #ffaa33 50%, #f08a12 100%);
  box-shadow: 0 5px 12px rgba(240, 138, 18, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 4px rgba(140, 70, 0, 0.18);
}
.cvd-app-call {
  background: linear-gradient(160deg, #7fe6b2 0%, #3cc983 50%, #22a967 100%);
  box-shadow: 0 5px 12px rgba(34, 169, 103, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 4px rgba(10, 90, 50, 0.18);
}
.cvd-app-text {
  background: linear-gradient(160deg, #8ccaff 0%, #4a95f5 50%, #5b6cf2 100%);
  box-shadow: 0 5px 12px rgba(74, 120, 245, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 4px rgba(30, 50, 140, 0.18);
}
.cvd-app::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 48%; border-radius: 9px 9px 14px 14px / 9px 9px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)); pointer-events: none;
}
.cvd-app svg { position: relative; width: 20px; height: 20px; fill: rgba(255, 255, 255, 0.96); stroke: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18)); }
.cvd-app:hover { transform: translateY(-1px); }
.cvd-pill {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; box-sizing: border-box;
}
.cvd-pill-dark { background: #1d1d1f; color: #ffffff; }
.cvd-pill-plum { background: linear-gradient(135deg, #8a4a5a, #6b3744); color: #ffffff; }
.cvd-pill-line { background: transparent; color: #1d1d1f; border: 1.5px solid rgba(29, 29, 31, 0.35); }
.cvd-pill-track {
  position: relative; width: 100%; overflow: hidden; color: #1d1d1f;
  background: repeating-linear-gradient(-45deg, rgba(29, 29, 31, 0.10) 0 2px, transparent 2px 9px), rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(29, 29, 31, 0.10);
}
.cvd-pill-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #b07a89, #6b3744); }
.cvd-pill-track b { position: relative; padding-left: 2px; color: #ffffff; mix-blend-mode: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

.cvd-head-r { display: flex; align-items: flex-end; }   /* the Contact tiles since 2026-10-09; the big Orders / Repairs / Points numbers were removed */

/* ── Board ─────────────────────────────────────────────────────────────── */
.cvd-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.15fr) minmax(280px, 1.15fr) minmax(270px, 0.9fr);
  grid-template-areas:
    "profile spend   wallet  rewards"
    "details buy     buy     rewards";
  align-items: stretch;
}
.cvd-profile  { grid-area: profile; }
.cvd-spend    { grid-area: spend; }
.cvd-wallet   { grid-area: wallet; }    /* the points wallet (2026-10-09) */
.cvd-rewards  { grid-area: rewards; }   /* the tall right column, where Repairs was (2026-10-09) */
.cvd-details  { grid-area: details; }
.cvd-purchases{ grid-area: buy; min-width: 0; }

.cvd-card {
  position: relative; background: #ffffff; border-radius: 26px; padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(30, 50, 90, 0.07), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.cvd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cvd-card-head h3 { margin: 0; font-size: 18px; font-weight: 500; color: #1d1d1f; letter-spacing: -.01em; }
.cvd-chip { font-size: 11.5px; font-weight: 600; color: #6e6e73; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.1); }

.cvd-round {
  width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.10); background: #ffffff; color: #1d1d1f; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, background .15s ease; padding: 0;
}
.cvd-round:hover { transform: translateY(-1px); background: #f4f4f6; }
.cvd-round svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cvd-round-dark { background: #1d1d1f !important; color: #ffffff !important; border-color: #1d1d1f !important; }

/* Profile (Luis, 2026-10-08): after his second reference — a pale glass card
   that runs from white into a soft aqua at the foot, a round avatar, the name
   large over a grey line, outline chips, three figures split by hairlines, and
   a wide pill beside a white round button. Replaces the plum monogram card. */
.cvd-profile {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 300px; padding: 22px 22px 20px; overflow: hidden;
  /* The foot takes the customer's tier colour (2026-10-08): view.php sets the
     three variables on the card from the tier's first colour. The aqua is only
     the fallback. */
  background:
    radial-gradient(120% 55% at 50% 108%, var(--tier-glow, rgba(150, 222, 232, 0.75)) 0%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f6f8f9 45%, var(--tier-wash, #e4f3f5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(30, 60, 80, 0.10), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  color: #1d1d1f;
}
/* The corner (2026-10-09): Call and Text tiles, then the tier badge, in one row. */
.cvd-pf-corner { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; gap: 6px; }
/* Call and Text in the corner (Luis, 2026-10-09, after his glass-button
   reference): round frosted-glass discs, the 30px the tiles were — a white
   face lit from the top left, a bright rim, a soft shadow under — with dark
   navy line icons carrying a faint offset shadow for depth. */
.cvd-glass {
  position: relative; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, 0.98) 0%, rgba(241, 244, 249, 0.82) 55%, rgba(222, 228, 237, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(30, 42, 68, 0.13), 0 1px 2px rgba(30, 42, 68, 0.08), inset 0 1px 0 #ffffff, inset 0 -2px 4px rgba(30, 42, 68, 0.07);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .30s var(--ease-liquid, cubic-bezier(.22, 1.12, .36, 1)), box-shadow .30s ease;
}
.cvd-glass svg { width: 15px; height: 15px; fill: none; stroke: #1f2a44; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(1.2px 1.5px 0 rgba(31, 42, 68, 0.16)); }
.cvd-glass:hover { transform: translateY(-1px); box-shadow: 0 7px 14px rgba(30, 42, 68, 0.17), 0 1px 2px rgba(30, 42, 68, 0.08), inset 0 1px 0 #ffffff, inset 0 -2px 4px rgba(30, 42, 68, 0.07); }
/* Their name bubbles open BELOW them, inside the card (Luis, 2026-10-09: "tooltips
   are getting covered"): the house bubble sits above its button, which from the
   card's top corner is past the card's edge — and the card clips, for its glow.
   Only the starting offset changes; the shown state is the house one. */
.cvd-pf-corner .pos-pop { bottom: auto; top: calc(100% + 8px); transform: translateX(-50%) translateY(-10px) scale(.72); transform-origin: 50% -20%; z-index: 60; }
body.apple-dark .cvd-glass { background: radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%); border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
body.apple-dark .cvd-glass svg { stroke: #fffdfb; filter: drop-shadow(1.2px 1.5px 0 rgba(0, 0, 0, 0.4)); }
/* The generic customer (Luis, 2026-10-09, after his 3D glass-figure reference,
   in greys): a solid grey head and shoulders, and a frosted-glass one with a
   smile set just in front of it — a few pixels down and to the right (Luis,
   the same day: "so it looks like the glass is in front") — the glass
   blurs the grey behind it, which is what gives the figure its depth. */
.cvd-avatar { position: relative; width: 80px; height: 68px; flex: 0 0 auto; margin-bottom: 10px; zoom: 1.45; }   /* 1.45× since the name left the card (2026-10-09) — zoom scales the whole figure and the room it takes */
.cvd-avatar span { position: absolute; display: block; }
.av-bk-head { left: 16px; top: 0; width: 33px; height: 33px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b3b6bd 0%, #8b8e96 55%, #63666e 100%); }
.av-bk-body { left: 6px; top: 35px; width: 56px; height: 27px; border-radius: 14px; background: linear-gradient(160deg, #a7aab1 0%, #7b7e86 55%, #5a5d65 100%); }
.av-head, .av-body {
  background: linear-gradient(225deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 247, 249, 0.86) 40%, rgba(206, 208, 214, 0.55) 100%);   /* lit from the right (2026-10-09) */
  -webkit-backdrop-filter: blur(5px) saturate(120%); backdrop-filter: blur(5px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 6px 14px rgba(50, 55, 70, 0.14);
}
.av-head { left: 23px; top: 5px; width: 33px; height: 33px; border-radius: 50%; }   /* the glass sits just in front of the grey: a few pixels down and right (2026-10-09) */
.av-body { left: 13px; top: 40px; width: 56px; height: 27px; border-radius: 14px; }
/* The smile: the lower curve of a small ring, white with a soft grey edge. */
.av-head i { position: absolute; left: 6px; top: 16px; width: 19px; height: 7px; border: 3px solid #ffffff; border-top: 0; border-radius: 0 0 12px 12px / 0 0 7px 7px; box-sizing: border-box; filter: drop-shadow(0 1px 1px rgba(60, 64, 74, 0.35)); }
.cvd-profile-name { font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; text-transform: capitalize; color: #1d1d1f; }
.cvd-profile-sub { font-size: 13px; color: #8a8f97; margin-top: 3px; }
.cvd-pf-stats { display: flex; width: 100%; margin: 18px 0 18px; }
.cvd-pf-stats > div { flex: 1 1 0; min-width: 0; text-align: center; padding: 0 6px; }
.cvd-pf-stats > div + div { border-left: 1px solid rgba(29, 29, 31, 0.08); }
.cvd-pf-stats b { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 600; color: #1d1d1f; white-space: nowrap; }
.cvd-pf-stats b svg { width: 14px; height: 14px; fill: #1d1d1f; stroke: none; }
.cvd-pf-stats span { display: block; margin-top: 3px; font-size: 11.5px; color: #8a8f97; }
/* The tier chip in the first box (2026-10-09), moved from the corner: a touch
   larger than it was there, as the box's value; "since <month>" under it. */
.cvd-pf-stats .cvd-pf-chip { display: inline-block; padding: 4px 12px; font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
/* The tier bar at the foot (2026-10-08), where the Text / Call buttons were:
   the head's striped track, full width, its label over it. The label and the
   36px track take about the 50px the buttons did, so the card keeps its size. */
.cvd-pf-level { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: auto; }
.cvd-pf-level .cvd-pill-track { display: flex; width: 100%; background: repeating-linear-gradient(-45deg, rgba(29, 29, 31, 0.10) 0 2px, transparent 2px 9px), rgba(255, 255, 255, 0.7); }
/* Always moving (Luis, 2026-10-09): the stripes on the empty track drift
   along like a loading bar, a soft shine sweeps across the fill every few
   seconds, and on arrival the fill grows from nothing to the customer's
   share. The drift moves exactly one stripe period (9px across a 45° stripe
   is 9 × √2 along the bar), so the loop has no seam. Still for anyone who
   has asked for less motion. */
.cvd-pf-level .cvd-pill-track { animation: cvdStripes 1.6s linear infinite; }
.cvd-pf-level .cvd-pill-track i { overflow: hidden; animation: cvdGrow .9s var(--ease-liquid, cubic-bezier(.22, 1.12, .36, 1)) .15s both; }
.cvd-pf-level .cvd-pill-track i::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-110%);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 80%);
  animation: cvdShine 2.8s ease-in-out 1s infinite;
}
@keyframes cvdStripes { from { background-position: 0 0, 0 0; } to { background-position: calc(9px * 1.41421356) 0, 0 0; } }
@keyframes cvdGrow { from { width: 0; } }
@keyframes cvdShine { 0% { transform: translateX(-110%); } 55%, 100% { transform: translateX(110%); } }
@media (prefers-reduced-motion: reduce) {
  .cvd-pf-level .cvd-pill-track, .cvd-pf-level .cvd-pill-track i, .cvd-pf-level .cvd-pill-track i::after { animation: none; }
  .cvd-pf-level .cvd-pill-track i::after { display: none; }
}

/* Spending (Luis, 2026-10-09, after his "engagement" chart reference): this
   year's spend as white chips — Repairs, Accessories, Phones, the amounts in
   green — then the last seven months as pale green bars rising from the
   card's floor, the lit month a glowing lime-to-green bar with a few sparks,
   a dashed line at the seven-month average with a dot where it meets the lit
   bar, and the month names under them. This month is lit; hovering another
   month lights that one instead. */
.cvd-spend { display: flex; flex-direction: column;
  background: radial-gradient(120% 70% at 50% 108%, rgba(170, 225, 140, 0.22), rgba(170, 225, 140, 0) 70%), #ffffff; }
.cvd-spend .cvd-card-head { margin-bottom: 12px; }
.cvd-spend .cvd-card-head h3 small { margin-left: 6px; font-size: 12px; font-weight: 400; color: #8a8f97; }
.cvd-kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.cvd-kind {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; color: #1d1d1f; background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.04); box-shadow: 0 4px 14px rgba(30, 60, 40, 0.08);
}
.cvd-kind i { width: 1px; height: 14px; background: rgba(29, 29, 31, 0.15); }
.cvd-kind b { font-weight: 700; color: #2f9e44; }
.cvd-plot { position: relative; flex: 1 1 auto; min-height: 120px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; }
.cvd-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cvd-col-bar {
  position: relative; width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, rgba(110, 185, 100, 0.20) 0%, rgba(110, 185, 100, 0.10) 100%);
  transition: background .25s ease, box-shadow .25s ease;
}
.cvd-col-bar em {
  position: absolute; left: 50%; top: -8px; transform: translate(-50%, -100%); opacity: 0; transition: opacity .2s ease;
  font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; padding: 3px 9px; border-radius: 999px;
  color: #1f7a35; background: #ffffff; box-shadow: 0 3px 10px rgba(30, 90, 40, 0.15);
}
/* Lit: this month, or the one under the pointer (and then this month dims).
   The lit bar fills with liquid (Luis, 2026-10-09): two layers clipped to a
   wavy top that keeps rolling — a lighter one behind running one way, the
   green in front running the other — with bubbles rising through it. The
   bar itself stays the pale glass column and only takes the glow. Always
   moving on this month's bar; on any other while it is hovered. */
.cvd-col.is-hi .cvd-col-bar, .cvd-col:hover .cvd-col-bar { box-shadow: 0 0 22px rgba(130, 210, 80, 0.5); }
.cvd-col-bar { overflow: visible; }
.cvd-liq {
  position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .3s ease; pointer-events: none;
  background:
    radial-gradient(circle at 28% 50%, rgba(255, 255, 255, 0.9) 0 1.2px, transparent 1.9px) 0 0 / 100% 46px repeat-y,
    radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.6px) 0 14px / 100% 64px repeat-y,
    radial-gradient(circle at 46% 50%, rgba(255, 255, 255, 0.65) 0 1.4px, transparent 2.1px) 0 26px / 100% 38px repeat-y,
    linear-gradient(180deg, #c6ee6b 0%, #86d244 38%, #34a44a 72%, #16793a 100%) 0 0 / 100% 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6Q10 0 20 6T40 6V12H0Z'/%3E%3C/svg%3E") 0 0 / 40px 12px repeat-x,
                linear-gradient(#000, #000) 0 11px / 100% calc(100% - 11px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6Q10 0 20 6T40 6V12H0Z'/%3E%3C/svg%3E") 0 0 / 40px 12px repeat-x,
                linear-gradient(#000, #000) 0 11px / 100% calc(100% - 11px) no-repeat;
}
.cvd-liq-back { top: -3px; background: linear-gradient(180deg, rgba(214, 248, 160, 0.9), rgba(150, 220, 110, 0.75)); }
.cvd-col.is-hi .cvd-liq, .cvd-col:hover .cvd-liq { opacity: 1; animation: cvdWave 1.8s linear infinite, cvdBubbles 3.2s linear infinite; }
.cvd-col.is-hi .cvd-liq-back, .cvd-col:hover .cvd-liq-back { animation: cvdWaveBack 2.6s linear infinite; }
@keyframes cvdWave {
  from { -webkit-mask-position: 0 0, 0 11px; mask-position: 0 0, 0 11px; }
  to   { -webkit-mask-position: 40px 0, 0 11px; mask-position: 40px 0, 0 11px; }
}
@keyframes cvdWaveBack {
  from { -webkit-mask-position: 20px 0, 0 11px; mask-position: 20px 0, 0 11px; }
  to   { -webkit-mask-position: -20px 0, 0 11px; mask-position: -20px 0, 0 11px; }
}
@keyframes cvdBubbles {
  from { background-position: 0 0, 0 14px, 0 26px, 0 0; }
  to   { background-position: 0 -46px, 0 -50px, 0 -12px, 0 0; }
}
@media (prefers-reduced-motion: reduce) { .cvd-liq { animation: none !important; } }
.cvd-col.is-hi em, .cvd-col:hover em { opacity: 1; }
.cvd-plot:hover .cvd-col.is-hi:not(:hover) .cvd-col-bar { box-shadow: none; }
.cvd-plot:hover .cvd-col.is-hi:not(:hover) .cvd-liq { opacity: 0; }
.cvd-plot:hover .cvd-col.is-hi:not(:hover) em, .cvd-plot:hover .cvd-col.is-hi:not(:hover) .cvd-col-dot { opacity: 0; }
/* The average: a dashed green line across, its label at the left, and a dot on the lit bar. */
.cvd-avg { position: absolute; left: 0; right: 0; bottom: var(--avg); z-index: 1; border-top: 2px dashed rgba(47, 140, 70, 0.55); pointer-events: none; }
.cvd-avg span { position: absolute; left: 0; bottom: 4px; font-size: 11px; color: #2f8c46; white-space: nowrap; }
.cvd-avg b { font-weight: 700; }
.cvd-col-dot {
  position: absolute; left: 50%; bottom: var(--avg); z-index: 2; width: 12px; height: 12px; margin: 0 0 -7px -6px; border-radius: 50%; opacity: 0;
  background: #ffffff; box-shadow: 0 0 0 3px rgba(134, 210, 68, 0.55), 0 2px 6px rgba(20, 80, 30, 0.35); transition: opacity .2s ease;
}
.cvd-col.is-hi .cvd-col-dot, .cvd-col:hover .cvd-col-dot { opacity: 1; }
.cvd-months { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 8px; text-align: center; }
.cvd-months span { font-size: 11px; color: #8a8f97; }
.cvd-months span.is-hi { color: #1f7a35; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .cvd-col-bar, .cvd-col-bar em, .cvd-col-dot { transition: none; } }
/* Rewards: the reference's time-tracker ring. */
.cvd-tier { padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #ffffff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
/* The points ring left the Rewards card on 2026-10-09: it lists the customer's rewards now (cust_rewards.css). */
.cvd-actions { display: flex; align-items: center; gap: 8px; }
.cvd-grow { flex: 1 1 auto; }

/* The Repairs panel (status counts + dark ticket list) was removed on 2026-10-09; Rewards has its place. */

/* Details: plain sections, always open (Luis, 2026-10-08) — they were the
   reference's accordion. */
.cvd-details { padding: 10px 20px; }
.cvd-sec { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.cvd-sec:last-child { border-bottom: 0; }
.cvd-sec-h { margin: 0; padding: 14px 0; font-size: 14px; font-weight: 600; color: #1d1d1f; }
.cvd-kv { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 10px; font-size: 12.5px; }
.cvd-kv span { color: #8a8f97; }
.cvd-kv b { color: #1d1d1f; font-weight: 600; text-align: right; word-break: break-word; }
.cvd-kv em { font-style: normal; font-size: 11px; margin-left: 4px; }
.cvd-kv em.up { color: #3f7a68; } .cvd-kv em.dn { color: #b52020; }
.cvd-muted { color: #8a8f97; }
.cvd-plum { color: #6b3744 !important; }
.cvd-device { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; }
.cvd-device-ico { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f3e8eb; color: #6b3744; }
.cvd-device-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* The device's own photo (2026-10-08): the cut-outs sit whole on a white tile. */
.cvd-device-ico.has-img { background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.06); overflow: hidden; }
.cvd-device-ico.has-img svg { display: none; }
.cvd-device-ico img { width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; }
.cvd-device-ico:not(.has-img) img { display: none; }
.cvd-device b { display: block; font-size: 12.5px; color: #1d1d1f; }
.cvd-device span { display: block; font-size: 10.5px; color: #8a8f97; margin-top: 2px; }

/* Purchases: the existing table, sitting in the wide middle card. */
.cvd-purchases .cvh-tablewrap { margin: 0; box-shadow: none; border: 0; background: transparent; }
.cvd-purchases .cv-no-data { padding: 30px 0; text-align: center; color: #8a8f97; }
/* The date and time sit on two lines, never four. */
.cvd-purchases .cvh-table td:nth-child(3) { white-space: nowrap; }

/* The old header/tile styles are no longer used on this page. */
.cv-profile-header, .cv-tiles { display: none !important; }

/* ── Narrower screens ─────────────────────────────────────────────────── */
@media (max-width: 1400px) {
  .cvd-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "profile spend   wallet"
      "rewards details details"
      "buy     buy     buy";
  }
}
@media (max-width: 900px) {
  .cvd-grid { grid-template-columns: 1fr; grid-template-areas: "profile" "spend" "wallet" "rewards" "details" "buy"; }

}

/* ── Wallet (Luis, 2026-10-09, after his wallet reference) ────────────────
   The reward points as a wallet: a dark back with "Wallet" on it, three cards
   tucked in at angles — the shop's logo, its name, and the customer's tier in
   its own colours (no card brands) — and a frosted front pocket over their
   lower halves with the points and their dollar value. Hovering fans the cards
   up on the house curve; they drop back quickly. The money is in the heavy
   system sans, like the reward tickets. */
.cvd-wallet { display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.cw { position: relative; width: min(360px, 100%); height: 252px; }
.cw-back {
  position: absolute; inset: 0; border-radius: 28px;
  background: linear-gradient(180deg, #8a4a5a 0%, #6b3744 50%, #44202a 100%);   /* house plum, not black (Luis, 2026-10-09) */
  box-shadow: 0 18px 36px rgba(20, 20, 30, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cw-back span { position: absolute; top: 11px; left: 0; right: 0; text-align: center; font-size: 15px; font-weight: 500; letter-spacing: .02em; color: rgba(255, 255, 255, 0.55); }
.cw-card {
  position: absolute; left: 9%; right: 9%; height: 128px; box-sizing: border-box; padding: 8px 14px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform .18s cubic-bezier(.4, 0, 1, 1);
}
.cw-c1 { top: 34px; transform: rotate(-4deg); display: flex; align-items: flex-start; gap: 8px; background: linear-gradient(120deg, #eef2ff 0%, #c9d6ff 45%, #f3c4dc 100%); }
.cw-c1 img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px #ffffff; }
.cw-c1 span { margin-top: 3px; font-size: 12px; font-weight: 700; color: #3b3f73; }
.cw-c2 { top: 68px; transform: rotate(2.5deg); background: linear-gradient(120deg, #ffffff 0%, #f1f4ff 40%, #ffd1dc 75%, #ffb199 100%); }
.cw-c2 b { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 900; font-style: italic; letter-spacing: .02em; text-transform: uppercase; color: #1a2a6c; }
.cw-c3 { top: 102px; transform: rotate(-1.5deg); display: flex; justify-content: space-between; align-items: flex-start; color: #ffffff; }
.cw-c3 b { font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.cw-c3 span { font-size: 11px; opacity: .85; }
.cw-front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 112px; border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, rgba(160, 98, 114, 0.5) 0%, rgba(74, 34, 45, 0.86) 100%);   /* plum-tinted glass to match */
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 -6px 18px rgba(0, 0, 0, 0.18);
}
.cw-lbl { font-size: 11.5px; letter-spacing: .02em; color: rgba(255, 255, 255, 0.72); }
.cw-pts { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.cw-pts small { margin-left: 5px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.cw-val { font-size: 15px; font-weight: 700; }
.cw-val i { font-style: normal; color: rgba(255, 255, 255, 0.55); }
.cw-val em { margin-left: 3px; font-style: normal; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, 0.6); }
/* Engraved labels (Luis, 2026-10-09): every word on the wallet looks pressed
   into what it is printed on — a dark edge along the top of each letter where
   the cut catches shadow, a light edge along the bottom where it catches light.
   On the pale cards the ink sinks toward the card's own colour; on the tier
   card and the frosted pocket the words stay readable and only gain the cut. */
.cw-c1 span, .cw-c2 b {
  color: rgba(34, 42, 104, 0.58);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 -1px 0 rgba(16, 22, 60, 0.38);
}
.cw-c3 b, .cw-c3 span {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.28);
}
.cw-back span { color: rgba(255, 255, 255, 0.42); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.1); }
.cw-lbl, .cw-pts, .cw-val { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.14); }
.cw-pts { color: rgba(255, 255, 255, 0.94); }
.cw-pts small, .cw-val i, .cw-val em { text-shadow: inherit; }
.cw-c1 img { box-shadow: 0 0 0 1.5px #ffffff, inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.cw:hover .cw-card { transition: transform .42s var(--ease-liquid, cubic-bezier(.22, 1.12, .36, 1)); }
.cw:hover .cw-c1 { transform: translateY(-14px) rotate(-7deg); }
.cw:hover .cw-c2 { transform: translateY(-9px) rotate(5deg); }
.cw:hover .cw-c3 { transform: translateY(-5px) rotate(-2.5deg); }
@media (prefers-reduced-motion: reduce) {
  .cw-card, .cw:hover .cw-card { transition: none; }
  .cw:hover .cw-c1 { transform: rotate(-4deg); }
  .cw:hover .cw-c2 { transform: rotate(2.5deg); }
  .cw:hover .cw-c3 { transform: rotate(-1.5deg); }
}

/* ── Liquid chrome: the top tier (Luis, 2026-10-09, after his chrome photo) ──
   Platinum is not two flat colours but polished metal: silver bands, light and
   dark, like a bent sheet catching a room, with a thin rainbow (pink, blue,
   gold) where the light breaks at the edges. The rainbow drifts slowly across
   so the metal looks liquid. Text on it turns dark. View.php puts .is-chrome on
   the badge, the bar fill (also when a Gold customer's bar heads for Platinum)
   and the wallet's tier card, and .is-chrome-card on the profile card for a
   holographic sheen in its glow. Still for anyone who has asked for less
   motion. */
.is-chrome, .cvd-pill-track i.is-chrome {   /* the bar fill names its element: .cvd-pill-track i sets the plum fill at (0,1,1) */
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0) 30%, rgba(255, 105, 180, 0.34) 37%, rgba(120, 175, 255, 0.36) 42%, rgba(255, 222, 130, 0.32) 47%, rgba(255, 255, 255, 0) 54%,
                            rgba(255, 255, 255, 0) 72%, rgba(130, 205, 255, 0.28) 78%, rgba(255, 140, 205, 0.24) 83%, rgba(255, 255, 255, 0) 89%),
    linear-gradient(118deg, #fbfbfd 0%, #d8d9de 12%, #8c8d97 26%, #f2f2f5 39%, #b6b7bf 51%, #ffffff 62%, #9b9ca6 76%, #e5e5ea 89%, #c3c4cb 100%);
  background-size: 240% 100%, 100% 100%;
  animation: chromeFlow 8s ease-in-out infinite alternate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 2px rgba(40, 40, 50, 0.22);
}
@keyframes chromeFlow { from { background-position: 0% 0, 0 0; } to { background-position: 100% 0, 0 0; } }
.cvd-tier.is-chrome { color: #2a2a33; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 2px rgba(40, 40, 50, 0.22), 0 2px 6px rgba(40, 40, 60, 0.18); }
.cvd-pf-level .cvd-pill-track i.is-chrome { animation: cvdGrow .9s var(--ease-liquid, cubic-bezier(.22, 1.12, .36, 1)) .15s both, chromeFlow 8s ease-in-out infinite alternate; }
.cvd-pill-track.has-chrome b { color: #2a2a33; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75); }
.cw-c3.is-chrome b, .cw-c3.is-chrome span { color: rgba(40, 40, 50, 0.64); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 -1px 0 rgba(0, 0, 0, 0.22); }
/* The profile card's glow: a holographic band low in the card, behind the words. */
.cvd-profile.is-chrome-card { isolation: isolate; }
.cvd-profile.is-chrome-card::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -24px; height: 58%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 8%, rgba(255, 110, 190, 0.20) 28%, rgba(120, 180, 255, 0.24) 44%, rgba(255, 220, 140, 0.20) 60%, rgba(255, 255, 255, 0) 82%);
  filter: blur(16px);
}
@media (prefers-reduced-motion: reduce) {
  .is-chrome, .cvd-pf-level .cvd-pill-track i.is-chrome { animation: none; }
}
/* The top tier reached (Luis, 2026-10-09: "keep bar solid, no animation when
   Platinum has been reached"): the full bar sits still — no chrome drift, no
   shine, no stripes, no grow-in. Bars still climbing keep theirs. */
.cvd-pf-level .cvd-pill-track.is-maxed, .cvd-pf-level .cvd-pill-track.is-maxed i, .cvd-pf-level .cvd-pill-track.is-maxed i.is-chrome { animation: none; }
.cvd-pf-level .cvd-pill-track.is-maxed i::after { display: none; }
/* ...and reads as a calm finish rather than metal: off-white into light grey
   (Luis, 2026-10-09), lit along the top like the rest of the card. */
.cvd-pf-level .cvd-pill-track.is-maxed i, .cvd-pf-level .cvd-pill-track.is-maxed i.is-chrome {
  background: linear-gradient(90deg, #fbfaf6 0%, #eeeef0 50%, #d6d7dc 100%);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 2px rgba(40, 40, 50, 0.12);
}
.cvd-pf-level .cvd-pill-track.is-maxed b { color: #2a2a33; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85); }

/* ── Polished copper: the first tier (Luis, 2026-10-09, after his copper photo) ──
   Bronze is polished copper: a warm metal gradient with a soft highlight from
   the top left. (It carried the photo's hexagon tiles for a moment; Luis asked
   for them off.) Light text with a dark edge. View.php puts .is-copper on the
   chip and the wallet's tier card, and tints the profile card's glow rose-copper. */
.is-copper {
  background:
    linear-gradient(118deg, rgba(255, 240, 228, 0) 28%, rgba(255, 240, 228, 0.5) 40%, rgba(255, 196, 160, 0.3) 47%, rgba(255, 240, 228, 0) 57%,
                            rgba(255, 240, 228, 0) 72%, rgba(255, 226, 205, 0.3) 80%, rgba(255, 240, 228, 0) 88%),
    radial-gradient(120% 90% at 18% 8%, rgba(255, 228, 210, 0.55), rgba(255, 228, 210, 0) 55%),
    linear-gradient(135deg, #f0b48f 0%, #d98c66 28%, #b8694a 52%, #e2a07c 74%, #a45a3c 100%);
  /* The light moves (Luis, 2026-10-09, "animate it like the Platinum"): a warm
     sheen band drifts slowly back and forth across the metal, as the chrome's
     rainbow does. */
  background-size: 240% 100%, 100% 100%, 100% 100%;
  animation: copperFlow 7s ease-in-out infinite alternate;
  color: #fff6ef;
  box-shadow: inset 0 1px 0 rgba(255, 230, 214, 0.75), inset 0 -1px 2px rgba(70, 25, 10, 0.35);
}
@keyframes copperFlow { from { background-position: 0% 0, 0 0, 0 0; } to { background-position: 100% 0, 0 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .is-copper { animation: none; } }
.cvd-tier.is-copper {
  text-shadow: 0 1px 1px rgba(70, 25, 10, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 230, 214, 0.75), inset 0 -1px 2px rgba(70, 25, 10, 0.35), 0 2px 6px rgba(120, 50, 20, 0.22);
}
.cw-c3.is-copper b, .cw-c3.is-copper span { color: rgba(255, 238, 226, 0.92); text-shadow: 0 -1px 0 rgba(70, 25, 10, 0.6), 0 1px 0 rgba(255, 215, 195, 0.35); }

/* ── Dark ─────────────────────────────────────────────────────────────── */
body.apple-dark .cvd-title, body.apple-dark .cvd-card-head h3,
body.apple-dark .cvd-kind,
body.apple-dark .cvd-sec-h, body.apple-dark .cvd-kv b, body.apple-dark .cvd-device b { color: #fffdfb; }
body.apple-dark .cvd-card { background: #111111; border-color: rgba(255, 255, 255, 0.06); box-shadow: none; }
/* The profile card at night: the same glass, dark, with the aqua kept low. */
body.apple-dark .cvd-profile {
  background: radial-gradient(120% 55% at 50% 108%, var(--tier-glow-dark, rgba(70, 150, 165, 0.45)) 0%, transparent 70%), linear-gradient(180deg, #161616 0%, #131313 55%, #111111 100%);
  border-color: rgba(255, 255, 255, 0.06); box-shadow: none;
}
body.apple-dark .cvd-profile-name, body.apple-dark .cvd-pf-stats b { color: #fffdfb; }
body.apple-dark .cvd-pf-stats b svg { fill: #fffdfb; }
body.apple-dark .cvd-pf-stats > div + div { border-left-color: rgba(255, 255, 255, 0.08); }
body.apple-dark .av-head, body.apple-dark .av-body { background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.10)); border-color: rgba(255, 255, 255, 0.22); }
body.apple-dark .cvd-round { background: #1a1a1a; color: #fffdfb; border-color: rgba(255, 255, 255, 0.1); }
body.apple-dark .cvd-round-dark { background: #fffdfb !important; color: #080808 !important; }
body.apple-dark .cvd-spend { background: radial-gradient(120% 70% at 50% 108%, rgba(90, 160, 80, 0.18), rgba(90, 160, 80, 0) 70%), #111111; }
body.apple-dark .cvd-kind { background: #1a1a1a; border-color: rgba(255, 255, 255, 0.08); box-shadow: none; }
body.apple-dark .cvd-kind b { color: #7fd36a; }
body.apple-dark .cvd-pill-dark { background: #fffdfb; color: #080808; }
body.apple-dark .cvd-pill-line { color: #fffdfb; border-color: rgba(255, 253, 251, 0.4); }
body.apple-dark .cvd-sec { border-color: rgba(255, 255, 255, 0.07); }
body.apple-dark .cvd-device-ico.has-img { background: #1f1f1f; border-color: rgba(255, 255, 255, 0.08); }

/* Head sits left, like the reference; the pills share one line. */
.cvd-head, .cvd-head-l, .cvd-card { text-align: left; }
.cvd-pills { flex-wrap: nowrap; }
@media (max-width: 1100px) { .cvd-pills { flex-wrap: wrap; } }
/* Two columns on one bottom line (2026-10-09): the "Customer profile #id"
   label at the left, the Edit tile at the right. (It had three, with the
   Repairs / Purchases / Points value chips centred; those were removed.) */
.cvd-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.cvd-head-l { min-width: 0; }
.cvd-head-r { justify-self: end; }
.cvd-title { text-transform: capitalize; }
