/* ==========================================================================
   Spoilr — creator dashboard (§9) + platform plans (§8)
   App shell: fixed sidebar + sticky topbar, metric cards, charts, link
   tracking, whale callout, employees, co-pilot, playbook, payout.
   ========================================================================== */

/* ==========================================================================
   CAL-AI restyle — the full de-Apple design system lives in app/cal.css
   (loaded after ios.css). Below: only the plans-page specific components.
   ========================================================================== */

/* clean top: back arrow + title + brand mark (mirrors the onboarding wizard) */
.cal-top { display: flex; align-items: center; gap: 14px; max-width: 480px; margin: 0 auto; padding: 16px 24px 8px; }
.cal-arrow { width: 40px; height: 40px; flex: none; border-radius: 50%; border: none; background: var(--surface-1); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg-1); transition: background .14s; }
.cal-arrow:hover { background: var(--surface-2); }
.cal-arrow svg { width: 18px; height: 18px; }
.cal-top-title { flex: 1; font: 700 17px/1 var(--font-sans); color: var(--fg-1); }
.cal-brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.cal-brand .mark svg { width: 17px; height: 17px; color: #fff; }

/* ---- Cal-AI plans page ---- */
.cal-plans { max-width: 480px; margin: 0 auto; padding: 8px 24px 48px; background: #fff; }
.cal-plans-hero { margin-top: 14px; }
.cal-plans-hero h1 { font: 800 clamp(28px, 6.5vw, 36px)/1.08 var(--font-sans); letter-spacing: -0.03em; margin: 0; color: var(--fg-1); text-wrap: balance; }
.cal-plans-hero p { font: 400 15.5px/1.5 var(--font-sans); color: var(--fg-2); margin: 12px 0 0; text-wrap: pretty; }
.cal-billing { display: flex; gap: 4px; padding: 4px; background: var(--surface-1); border-radius: var(--r-pill); margin: 22px 0 8px; }
.cal-billing button { flex: 1; height: 42px; border: none; background: none; cursor: pointer; border-radius: var(--r-pill); font: 600 14.5px/1 var(--font-sans); color: var(--fg-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .16s, color .16s; }
.cal-billing button.on { background: #fff; color: var(--fg-1); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.cal-billing .save { font: 700 10.5px/1 var(--font-sans); color: #fff; background: #F39827; padding: 4px 7px; border-radius: var(--r-pill); }
.cal-plan-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.cal-plan { border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 20px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.cal-plan.rec { border-color: #F39827; box-shadow: 0 0 0 1px #F39827, 0 10px 30px rgba(243,152,39,.1); }
.cal-plan.current { border-color: var(--ink); background: #fcfcfd; }
.cal-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cal-plan-name { font: 800 19px/1.1 var(--font-sans); letter-spacing: -0.01em; color: var(--fg-1); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cal-plan-badge { font: 700 10px/1 var(--font-sans); text-transform: uppercase; letter-spacing: .05em; color: #fff; background: #F39827; padding: 5px 8px; border-radius: var(--r-pill); }
.cal-plan-price { font: 800 26px/1 var(--font-num); letter-spacing: -0.02em; color: var(--fg-1); white-space: nowrap; text-align: right; }
.cal-plan-price .per { font: 600 12px/1 var(--font-sans); color: var(--fg-3); letter-spacing: 0; }
.cal-plan-price .old { display: block; font: 600 13px/1 var(--font-num); color: var(--fg-3); text-decoration: line-through; margin-bottom: 3px; }
.cal-plan-tagline { font: 400 13.5px/1.45 var(--font-sans); color: var(--fg-2); margin: 8px 0 0; }
.cal-plan-feats { list-style: none; padding: 0; margin: 16px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.cal-plan-feats li { display: flex; align-items: flex-start; gap: 10px; font: 500 14px/1.4 var(--font-sans); color: var(--fg-1); }
.cal-plan-feats li svg { width: 17px; height: 17px; color: var(--success); flex: none; margin-top: 1px; }
.cal-plan-feats li.muted { color: var(--fg-3); }
.cal-plan-feats li.muted svg { color: var(--fg-3); }
.cal-plan-btn { width: 100%; height: 52px; border-radius: var(--r-pill); border: none; cursor: pointer; font: 700 15.5px/1 var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .2s, opacity .15s, background .15s; }
.cal-plan-btn .ar { width: 18px; height: 18px; }
.cal-plan-btn.primary { background: var(--tint); color: #fff; }
.cal-plan-btn.primary:hover { transform: translateY(-1px); }
.cal-plan.rec .cal-plan-btn.primary { background: #F39827; }
.cal-plan-btn.ghost { background: var(--surface-1); color: var(--fg-1); }
.cal-plan-btn.ghost:hover { background: var(--surface-2); }
.cal-plan-current { display: flex; align-items: center; justify-content: center; gap: 7px; font: 700 14px/1 var(--font-sans); color: var(--fg-2); padding: 14px 0 2px; }
.cal-plan-current svg { width: 16px; height: 16px; color: var(--success); }
.cal-spin { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; margin-top: 22px; height: 50px; border: 1.5px solid var(--border-strong); border-radius: var(--r-pill); background: #fff; cursor: pointer; font: 600 15px/1 var(--font-sans); color: var(--fg-1); transition: background .14s; }
.cal-spin:hover { background: var(--surface-1); }
.cal-spin svg { width: 18px; height: 18px; }

.dash { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.dside { position: fixed; top: 0; left: 0; bottom: 0; width: 256px; background: var(--white); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 60; }
.dside-brand { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px; flex: none; border-bottom: 1px solid var(--border); cursor: pointer; }
.dnav { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.dnav-label { font: 700 11px/1 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding: 8px 12px 4px; }
.dnav-label:first-child { padding-top: 2px; }
.dnav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-md); font: 500 15px/1 var(--font-sans); color: var(--fg-2); cursor: pointer; transition: background .14s, color .14s; }
.dnav a svg { width: 20px; height: 20px; flex: none; }
.dnav a:hover { background: var(--surface-1); color: var(--fg-1); }
.dnav a.active { background: var(--ink); color: var(--white); font-weight: 600; }
.dnav a .pro-tag { margin-left: auto; font: 800 9.5px/1 var(--font-sans); letter-spacing: 0.06em; color: #B27A1E; background: var(--flame-bg); padding: 4px 7px; border-radius: var(--r-pill); }
.dnav a.active .pro-tag { background: rgba(255,255,255,0.18); color: #fff; }
.dnav a .ncount { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font-num); border-radius: var(--r-pill); background: var(--surface-2); color: var(--fg-2); }
.dnav a.active .ncount { background: rgba(255,255,255,0.2); color: #fff; }
.dside-foot { flex: none; padding: 14px; border-top: 1px solid var(--border); }
.duser { display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: var(--r-md); cursor: pointer; transition: background .14s; }
.duser:hover { background: var(--surface-1); }
.duser .av { width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 15px/1 var(--font-num); overflow: hidden; }
.duser .uid { min-width: 0; flex: 1; }
.duser .uname { font: 700 14px/1.2 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duser .uplan { font: 600 12px/1.2 var(--font-sans); color: var(--fg-3); margin-top: 2px; }

.dmain { grid-column: 2; min-width: 0; display: flex; flex-direction: column; background: var(--surface-1); }
.dtop { position: sticky; top: 0; z-index: 50; height: 64px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: rgba(245,246,248,0.82); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border); }
.dtop .crumb { font: 700 19px/1.1 var(--font-sans); letter-spacing: -0.02em; }
.dtop-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dmenu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.dmenu-btn svg { width: 19px; height: 19px; }

.dcontent { padding: 30px 32px; max-width: 1180px; width: 100%; }
.dgreet { margin-bottom: 24px; }
.dgreet h1 { font: 800 clamp(26px, 3vw, 34px)/1.1 var(--font-sans); letter-spacing: -0.03em; margin: 0; }
.dgreet p { font: 400 16px/1.5 var(--font-sans); color: var(--fg-2); margin: 10px 0 0; max-width: 620px; }

.dsection { margin-top: 34px; }
.dsection-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dsection-head h2 { font: 700 20px/1.2 var(--font-sans); letter-spacing: -0.01em; margin: 0; }
.dsection-head .sub { font: var(--footnote); color: var(--fg-2); margin-top: 4px; }

/* live earnings banner */
.earn-banner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; }
.earn-cell { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px; position: relative; overflow: hidden; transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .28s; }
.earn-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.earn-cell .l { font: 600 13px/1.2 var(--font-sans); color: var(--fg-2); }
.earn-cell .v { font: 800 28px/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 14px; display: flex; align-items: baseline; gap: 6px; }
.earn-cell.live .v { color: #128A3A; }
.earn-cell .live-dot { position: absolute; top: 20px; right: 20px; }

/* metric cards */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px; position: relative; overflow: hidden; transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .28s; }
.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.metric-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-right: 90px; }
.metric-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; }
.metric-ic svg { width: 18px; height: 18px; }
.metric-ic:hover .denti-preview-popup { display: block !important; }
.metric-lab { font: 600 13px/1.2 var(--font-sans); color: var(--fg-2); }
.metric-val { font: 800 28px/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.metric-val .u { font: 600 12px/1 var(--font-sans); color: var(--fg-3); }
.metric-foot { position: absolute; top: 20px; right: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font: 700 12px/1 var(--font-sans); padding: 4px 8px; border-radius: var(--r-pill); }
.trend svg { width: 11px; height: 11px; }
.trend.up { color: #128A3A; background: var(--verified-bg); }
.trend.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--white)); }

/* locked metric (Free) */
.locked-metric { position: relative; }
.locked-metric .lm-blur { filter: blur(7px); user-select: none; pointer-events: none; }
.locked-metric .lm-gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(255,255,255,0.4); }
.locked-metric .lm-gate .pad { width: 34px; height: 34px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--fg-1); }
.locked-metric .lm-gate .pad svg { width: 16px; height: 16px; }
.locked-metric .lm-gate b { font: 700 12px/1.3 var(--font-sans); color: var(--fg-1); }
.locked-metric .lm-gate .up { font: 700 11px/1 var(--font-sans); color: #B27A1E; background: var(--flame-bg); padding: 5px 10px; border-radius: var(--r-pill); cursor: pointer; }

/* chart card */
.chart-card { padding: 20px 20px 16px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
.chart-head h2 { font: 700 19px/1.2 var(--font-sans); margin: 0; }
.chart-now { font: 800 24px/1 var(--font-num); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-1); border-radius: var(--r-pill); }
.seg button { height: 30px; padding: 0 14px; border: none; background: none; cursor: pointer; border-radius: var(--r-pill); font: 500 13px/1 var(--font-sans); color: var(--fg-2); transition: all .16s; }
.seg button.on { background: var(--white); color: var(--fg-1); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.chart-plot { position: relative; margin-top: 16px; }
.chart-plot svg { width: 100%; display: block; overflow: visible; }
.chart-x { display: flex; justify-content: space-between; margin-top: 10px; font: var(--caption); color: var(--fg-3); }

/* two-col layout */
.dgrid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }

/* link tracking table */
.track-table { width: 100%; border-collapse: collapse; }
.track-table th { text-align: left; font: 700 11px/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-3); padding: 0 14px 12px; }
.track-table th.r, .track-table td.r { text-align: right; }
.track-table td { padding: 14px; border-top: 1px solid var(--border); font: 600 14px/1.3 var(--font-num); font-variant-numeric: tabular-nums; }
.track-table td.lbl { font: 700 14.5px/1.3 var(--font-sans); }
.track-table tr:hover td { background: var(--surface-1); }
.ctr-pill { display: inline-flex; font: 700 12px/1 var(--font-num); padding: 4px 8px; border-radius: var(--r-pill); background: var(--surface-1); color: var(--fg-2); }
.ctr-pill.hot { background: var(--verified-bg); color: #128A3A; }

/* whale callout */
.whale-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.whale-top { display: flex; align-items: center; gap: 14px; }
.whale-av { width: 52px; height: 52px; border-radius: 15px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 20px/1 var(--font-num); flex: none; }
.whale-id b { font: 800 18px/1.2 var(--font-sans); display: flex; align-items: center; gap: 7px; }
.whale-id b .crown { color: var(--flame); display: inline-flex; } .whale-id b .crown svg { width: 16px; height: 16px; }
.whale-id span { font: var(--footnote); color: var(--fg-3); margin-top: 4px; display: block; }
.whale-share { background: var(--surface-1); border-radius: var(--r-md); padding: 14px 16px; }
.whale-share .ws-top { display: flex; align-items: center; justify-content: space-between; font: 600 13px/1 var(--font-sans); color: var(--fg-2); margin-bottom: 10px; }
.whale-share .ws-top b { font: 800 15px/1 var(--font-num); color: var(--fg-1); }
.whale-share .ws-bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.whale-share .ws-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--gold); }

/* employees */
.emp-row { display: grid; grid-template-columns: 44px 1.4fr repeat(3, 1fr) auto; align-items: center; gap: 14px; padding: 14px 8px; border-top: 1px solid var(--border); cursor: pointer; border-radius: var(--r-md); transition: background 0.15s ease, padding 0.15s ease; }
.emp-row:hover { background: var(--surface-1); }
.earn-emp-row:hover { background: var(--surface-1); }
.emp-row:first-of-type { border-top: none; }
.emp-av { width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--fat) 14%, #fff); color: var(--fat); display: flex; align-items: center; justify-content: center; font: 800 16px/1 var(--font-num); flex: none; }
.emp-id b { font: 700 15px/1.2 var(--font-sans); }
.emp-id span { font: var(--caption); color: var(--fg-3); display: block; margin-top: 3px; }
.emp-stat .l { font: var(--caption); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.04em; }
.emp-stat .v { font: 800 16px/1 var(--font-num); font-variant-numeric: tabular-nums; margin-top: 5px; }
.emp-level { font: 700 11px/1 var(--font-sans); padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-1); color: var(--fg-2); }

/* co-pilot */
.copilot { padding: 22px; }
.copilot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.copilot-head .ci { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--flame); display: flex; align-items: center; justify-content: center; flex: none; }
.copilot-head .ci svg { width: 21px; height: 21px; }
.copilot-head h2 { font: 700 18px/1.2 var(--font-sans); margin: 0; }
.copilot-head span { font: var(--caption); color: var(--fg-3); }
.tip-row { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; border-top: 1px solid var(--border); }
.tip-row:first-of-type { border-top: none; }
.tip-row .tri { width: 30px; height: 30px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; }
.tip-row .tri svg { width: 16px; height: 16px; }
.tip-row .trb { flex: 1; }
.tip-row .trb b { font: 700 14.5px/1.35 var(--font-sans); display: block; }
.tip-row .trb p { font: 400 13.5px/1.45 var(--font-sans); color: var(--fg-2); margin: 4px 0 0; }
.tip-row .trb .act { font: 700 12.5px/1 var(--font-sans); color: var(--fg-1); margin-top: 8px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.tip-row .trb .act svg { width: 13px; height: 13px; }

/* playbook */
.playbook { padding: 22px; }
.pb-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pb-prog .bar { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.pb-prog .bar i { display: block; height: 100%; background: var(--success); border-radius: var(--r-pill); }
.pb-prog .pct { font: 800 14px/1 var(--font-num); }
.pb-item { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--border); cursor: pointer; }
.pb-item:first-of-type { border-top: none; }
.pb-item .cbx { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-strong); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; transition: all .15s; }
.pb-item.done .cbx { background: var(--success); border-color: var(--success); }
.pb-item .cbx svg { width: 14px; height: 14px; opacity: 0; }
.pb-item.done .cbx svg { opacity: 1; }
.pb-item .pl { flex: 1; }
.pb-item .pl b { font: 700 14.5px/1.3 var(--font-sans); }
.pb-item.done .pl b { color: var(--fg-3); text-decoration: line-through; }
.pb-item .pl span { font: var(--caption); color: var(--fg-3); display: block; margin-top: 2px; }
.pb-item .reward { font: 700 12px/1 var(--font-num); color: #128A3A; }

/* payout */
.payout-balance { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.pb-card { padding: 22px; }
.pb-card.primary { background: var(--panel-dark); color: #fff; }
.pb-card .l { font: 600 12.5px/1 var(--font-sans); color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.04em; }
.pb-card.primary .l { color: rgba(255,255,255,0.6); }
.pb-card .v { font: 800 32px/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 12px; }
.pb-card .m { font: var(--footnote); color: var(--fg-3); margin-top: 8px; }
.pb-card.primary .m { color: rgba(255,255,255,0.5); }
.pb-card.primary .btn { margin-top: 16px; background: #fff; color: var(--ink); }

/* ============================ PLATFORM PLANS (§8) ===================== */
.plans-page { max-width: 1120px; margin: 0 auto; padding: 40px 24px 80px; }
.plans-hero { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.plans-hero h1 { font: 800 clamp(30px, 4vw, 44px)/1.06 var(--font-sans); letter-spacing: -0.03em; margin: 0; }
.plans-hero p { font: 400 18px/1.5 var(--font-sans); color: var(--fg-2); margin: 14px 0 0; }
.billing-toggle { display: inline-flex; align-items: center; gap: 12px; padding: 5px; background: var(--surface-1); border-radius: var(--r-pill); margin: 26px auto 0; }
.billing-toggle button { height: 38px; padding: 0 20px; border: none; background: none; cursor: pointer; border-radius: var(--r-pill); font: 600 14px/1 var(--font-sans); color: var(--fg-2); transition: all .16s; }
.billing-toggle button.on { background: var(--white); color: var(--fg-1); box-shadow: var(--shadow-sm); }
.billing-toggle .save { font: 700 11px/1 var(--font-sans); color: #128A3A; background: var(--verified-bg); padding: 4px 8px; border-radius: var(--r-pill); }

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; align-items: stretch; }
.plan-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px 22px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; }
.plan-card.feat { border-color: var(--ink); border-width: 1.5px; box-shadow: var(--shadow-lg); }
.plan-card.empire { background: #fffdf7; border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font: 700 11px/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 7px 14px; border-radius: var(--r-pill); white-space: nowrap; }
.plan-name { font: 800 19px/1 var(--font-sans); letter-spacing: -0.01em; }
.plan-tagline { font: var(--footnote); color: var(--fg-2); margin-top: 6px; min-height: 34px; }
.plan-price { font: 800 38px/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 12px 0 2px; }
.plan-price .per { font: 600 14px/1 var(--font-sans); color: var(--fg-3); letter-spacing: 0; }
.plan-price .old { font: 600 18px/1 var(--font-num); color: var(--fg-3); text-decoration: line-through; margin-right: 8px; }
.plan-feats { list-style: none; padding: 0; margin: 20px 0 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan-feats li { display: flex; align-items: flex-start; gap: 9px; font: 500 13.5px/1.4 var(--font-sans); color: var(--fg-1); }
.plan-feats li svg { width: 16px; height: 16px; color: var(--verified); flex: none; margin-top: 1px; }
.plan-feats li.muted { color: var(--fg-3); }
.plan-feats li.muted svg { color: var(--fg-3); }
.plan-card .btn { width: 100%; }
.plan-current { text-align: center; font: 700 13px/1 var(--font-sans); color: var(--fg-3); padding: 14px 0; }

/* ============================ RESPONSIVE ============================== */
@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dgrid-2 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .payout-balance { grid-template-columns: 1fr; }
  .emp-row { grid-template-columns: 44px 1fr 1fr; }
  .emp-row .emp-stat:nth-child(n+4) { display: none; }
}
@media (max-width: 960px) {
  .dside { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .dside.open { transform: none; }
  .dash { grid-template-columns: 1fr; }
  .dmain { grid-column: 1; }
  .dmenu-btn { display: inline-flex; }
  .earn-banner { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .dcontent { padding: 20px 16px; }
  .dtop { padding: 0 16px; }
  .metrics { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}
.dscrim { position: fixed; inset: 0; background: rgba(28,27,31,0.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
.dscrim.show { opacity: 1; pointer-events: auto; }

/* ============================ ANALYTICS METRICS (clean) =============== */
/* Replaced the old fragile nth-of-type "FOCUS" overrides with clean,
   class-based, iOS-friendly rules. The performance metrics simply stack. */
.metrics-perf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
@media (max-width: 640px) {
  .metrics-perf { grid-template-columns: 1fr; }
}

/* ==========================================================================
   iOS 26 polish — scoped to body.ios (the dashboard route). Visual reskin on
   top of the legacy-token remap from ios.css. Structure/responsive behavior
   is preserved (sidebar on desktop, glass bottom-nav on mobile).
   ========================================================================== */
body.ios .dmain { background: var(--ios-bg-grouped); }
body.ios .dcontent { padding: 4px 16px 40px; }
@media (max-width: 640px) { body.ios .dcontent { padding: 2px 16px 40px; } }

/* iOS large-title navigation: the bar is transparent at the top (the big title
   lives in the content); on scroll it gains the translucent blur and the
   centered inline title fades in — exactly like iOS Settings. */
body.ios .dtop {
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
  height: 50px;
}
body.ios .dtop .crumb {
  position: absolute; left: 50%; transform: translateX(-50%);
  font: 600 17px/1.1 var(--font-sans); letter-spacing: -0.01em;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
  max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.ios .dtop.scrolled {
  background: rgba(242,241,246,0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--ios-separator-line);
}
body.ios .dtop.scrolled .crumb { opacity: 1; }
/* the hamburger is redundant on phone (the glass tab bar handles navigation) */
body.ios.has-bnav .dmenu-btn { display: none; }
/* On phone the sticky bar is broken by an overflow ancestor, so pin it fixed
   at the very top (transparent) and pad the content to clear it. */
body.ios.has-bnav .dtop { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 50px; }
body.ios.has-bnav .dcontent { padding-top: 42px; }

/* large title */
body.ios .dgreet { margin-bottom: 12px; }
body.ios .dgreet h1 { font-weight: 700; letter-spacing: -0.022em; }
body.ios .dgreet p { color: var(--ios-label-2); font-size: 15px; }
body.ios .dsection { margin-top: 18px; }
body.ios .dsection-head h2 { font: 700 20px/1.2 var(--font-sans); letter-spacing: -0.015em; }

/* metric cards → flat iOS cards */
body.ios .metric {
  border: none;
  border-radius: var(--ios-r-card);
  box-shadow: var(--ios-shadow-card);
}
body.ios .metric:hover { transform: none; box-shadow: var(--ios-shadow-card); }
body.ios .metric-ic { border-radius: 9px; }
body.ios .metric-lab { color: var(--ios-label-2); }
body.ios .trend.up { color: #1F8F3C; background: rgba(52,199,89,0.14); }
body.ios .trend.down { color: var(--ios-red); background: rgba(255,59,48,0.12); }

/* live earnings banner → separated tiles */
body.ios .earn-banner {
  grid-template-columns: 1fr; gap: 16px;
  background: transparent; border-radius: 0; box-shadow: none; overflow: visible;
}
body.ios .earn-cell {
  border-radius: var(--ios-r-card);
  box-shadow: var(--ios-shadow-card);
}
@media (min-width: 560px) { body.ios .earn-banner { grid-template-columns: repeat(3,1fr); } }

/* generic cards already flattened in ios.css; ensure chart cards match */
body.ios .chart-card { border-radius: var(--ios-r-card); }
body.ios .seg { background: var(--ios-fill); }

/* tables / rows / lists → iOS hairlines */
body.ios .track-table td { border-top-color: var(--ios-separator); }
body.ios .emp-row, body.ios .earn-emp-row, body.ios .pb-item, body.ios .tip-row,
body.ios .feed-row { border-top-color: var(--ios-separator); }
body.ios .ctr-pill { background: var(--ios-fill); color: var(--ios-label-2); }
body.ios .ctr-pill.hot { background: rgba(52,199,89,0.14); color: #1F8F3C; }

/* payout hero stays dark (iOS elevated dark card) */
body.ios .pb-card.primary { background: #1C1C1E; border-radius: var(--ios-r-card); }
body.ios .pb-card { border-radius: var(--ios-r-card); }

/* progress / whale bars use tint via remap; round them */
body.ios .pb-prog .bar, body.ios .whale-share .ws-bar, body.ios .goal-bar { border-radius: var(--r-pill); }

/* duser / sidebar (desktop) light reskin */
body.ios .dnav a.active { background: var(--tint); color: #fff; }
body.ios .dnav a.active .ncount { background: rgba(255,255,255,0.25); }

/* ---- Plans (§8) iOS polish ---- */
body.ios .plans-hero h1 { letter-spacing: -0.025em; }
body.ios .plans-hero p { color: var(--ios-label-2); }
body.ios .plan-card {
  border: 1px solid var(--ios-separator);
  border-radius: var(--ios-r-card);
  box-shadow: var(--ios-shadow-card);
}
body.ios .plan-card.feat { border-color: var(--tint); border-width: 1.5px; box-shadow: 0 8px 28px rgba(0,122,255,0.14); }
body.ios .plan-badge { background: var(--tint); }
body.ios .plan-card.empire { background: #FFFDF7; border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
body.ios .plan-price .per { color: var(--ios-label-2); }
body.ios .plan-feats li svg { color: var(--ios-green); }
body.ios .billing-toggle { background: var(--ios-fill); padding: 2px; }
body.ios .billing-toggle button { color: var(--ios-label); }
body.ios .billing-toggle button.on { background: var(--ios-bg); color: var(--ios-label); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
body.ios .billing-toggle .save { background: rgba(52,199,89,0.16); color: #1F8F3C; }
body.ios .plan-card { animation: iosReveal .5s cubic-bezier(.22,1,.36,1) both; transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .2s; }
body.ios .plan-grid .plan-card:nth-child(2) { animation-delay: .05s; }
body.ios .plan-grid .plan-card:nth-child(3) { animation-delay: .10s; }
body.ios .plan-grid .plan-card:nth-child(4) { animation-delay: .15s; }
body.ios .plan-card .btn:active { transform: scale(.97); }

/* ---- Calendar iOS structure polish ---- */
body.ios .cal-stats-card { animation: iosReveal .5s cubic-bezier(.22,1,.36,1) both; border-radius: var(--ios-r-card); }
body.ios .cal-bento-grid .cal-stats-card:nth-child(2) { animation-delay: .05s; }
body.ios .cal-bento-grid .cal-stats-card:nth-child(3) { animation-delay: .10s; }
body.ios .cal-stats-card.primary-theme { background: var(--ios-label); }
body.ios .cal-grid-card, body.ios .cal-detail-card { border-radius: var(--ios-r-card) !important; box-shadow: var(--ios-shadow-card) !important; }
body.ios .cal-day-cell { transition: transform .14s cubic-bezier(.2,.8,.3,1), box-shadow .18s, border-color .18s; }
body.ios .cal-day-cell:active:not(.empty) { transform: scale(.92); }
body.ios .cal-swapper-btn:active { transform: scale(.92); }

/* ---- Earnings overview: performance hero card ---- */
body.ios .perf-card { padding: 8px 16px 18px; border-radius: var(--ios-r-card); }
body.ios .seg-period { width: 100%; margin: 10px 0 2px; }
body.ios .seg-period button { flex: 1; }
body.ios .perf-hero { text-align: center; padding: 18px 0 16px; }
body.ios .perf-hero .ph-val { font: 800 44px/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ios-label); transform-origin: center; display: inline-block; }
body.ios .perf-hero .ph-lab { font: 400 14px/1.2 var(--font-sans); color: var(--ios-label-2); margin-top: 6px; }
body.ios .perf-mini { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 16px 0; margin-top: 2px; border-top: 1px solid var(--ios-separator); }
body.ios .perf-mini-cell { text-align: center; min-width: 0; }
body.ios .perf-mini-cell .pm-val { font: 700 20px/1 var(--font-num); color: var(--ios-label); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; justify-content: center; gap: 3px; }
body.ios .perf-mini-cell .pm-val span:first-child { display: inline-block; transform-origin: center; }
body.ios .perf-mini-cell .pm-trend { font: 600 12px/1 var(--font-sans); color: #1F8F3C; }
body.ios .perf-mini-cell .pm-lab { font: 400 12px/1.2 var(--font-sans); color: var(--ios-label-2); margin-top: 6px; }
body.ios .perf-actions { display: flex; gap: 10px; }
body.ios .perf-actions .btn { flex: 1; height: 46px; font-size: 15px; gap: 6px; min-width: 0; }
body.ios .perf-actions .btn img { width: 26px; height: 26px; object-fit: contain; flex: none; }

/* ==========================================================================
   Earnings home (dashboard/overview) — redesigned screen.
   Scoped to .earn-redesign so other dashboard tabs are untouched. The
   transparent bottom nav (#bnav) is intentionally left alone.
   ========================================================================== */
body.ios .earn-redesign {
  margin: -42px -16px 0;            /* cancel the has-bnav top pad + dcontent side pad */
  padding: 20px 18px 28px;
  background: #FFF;              /* pure white page as requested */
  min-height: 100vh;
}
@media (max-width: 640px) { body.ios.has-bnav .earn-redesign { margin-top: -42px; } }

/* header ------------------------------------------------------------------ */
body.ios .earn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 2px 16px; }
body.ios .earn-head-tx h1 { font: 800 40px/1.0 var(--font-sans); letter-spacing: -0.035em; color: var(--ios-label); margin: 0; }
body.ios .earn-head-tx p { font: 500 15px/1.4 var(--font-sans); color: var(--ios-label-2); margin: 9px 0 0; }
body.ios .earn-bell {
  flex: none; width: 52px; height: 52px; margin-top: 4px; border: 1px solid #E5E5EA; cursor: pointer;
  border-radius: 50%; background: #fff; color: var(--ios-label); position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
  transition: transform .12s ease;
}
body.ios .earn-bell:active { transform: scale(0.94); }
body.ios .earn-bell svg { width: 23px; height: 23px; }
body.ios .earn-bell-badge {
  position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px; background: #FF3B5C; color: #fff;
  font: 700 12px/22px var(--font-num); text-align: center; box-sizing: border-box;
  border: 2.5px solid #F4F4F8;
}

/* period selector --------------------------------------------------------- */
body.ios .earn-seg {
  background: #fff; padding: 6px; gap: 4px; border-radius: 18px;
  border: 1px solid #E5E5EA;
  box-shadow: none;
  margin: 2px 0 18px;
}
body.ios .earn-seg button {
  flex: 1; height: 44px; border-radius: 13px; padding: 0;
  font: 600 14.5px/1 var(--font-sans); color: var(--ios-label-2);
  transition: color .15s ease, box-shadow .2s ease;
}
body.ios .earn-redesign .earn-seg button.on {
  background: linear-gradient(135deg, #2DDF86 0%, #14B866 100%); color: #fff;
  box-shadow: none;
}

/* hero card --------------------------------------------------------------- */
body.ios .earn-hero {
  position: relative; overflow: hidden; min-height: 206px;
  background: #fff; border-radius: 28px; padding: 24px 24px 22px;
  border: 1px solid #E5E5EA;
  box-shadow: none;
  margin-bottom: 16px;
}
body.ios .earn-chart-wrap { position: absolute; inset: 0; z-index: 0; }
body.ios .earn-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
body.ios .earn-chart-dot {
  position: absolute; left: 100%; top: 15.3%; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  border: 3px solid #14B866; box-shadow: 0 2px 7px rgba(20,184,102,0.45);
}
body.ios .earn-hero-content { position: relative; z-index: 1; }
body.ios .earn-hero-top { display: flex; align-items: flex-start; gap: 5px; }
body.ios .earn-hero-label { font: 600 17px/1.2 var(--font-sans); color: #43435A; }
body.ios .earn-hero-spark { display: inline-flex; color: #14B866; transform: translateY(-2px); }
body.ios .earn-hero-val {
  font: 800 60px/1 var(--font-num); letter-spacing: -0.045em; color: #181A2E;
  margin: 14px 0 0; font-variant-numeric: tabular-nums;
}
body.ios .earn-hero-sub { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
body.ios .earn-trend {
  display: inline-flex; align-items: center; gap: 3px;
  background: #ECEAFB; color: #6C5CE7; border-radius: 999px; padding: 5px 11px;
  font: 700 14px/1 var(--font-sans);
}
body.ios .earn-trend-note { font: 500 14.5px/1 var(--font-sans); color: #8A8A9A; }

/* primary actions --------------------------------------------------------- */
body.ios .earn-actions { display: flex; gap: 12px; }
body.ios .earn-actions .btn {
  flex: 1; height: 58px; min-width: 0; border-radius: 18px;
  font: 700 16px/1 var(--font-sans); gap: 9px;
}
body.ios .earn-btn-primary {
  background: linear-gradient(135deg, #2DDF86 0%, #14B866 100%); color: #fff;
  box-shadow: none;
}
body.ios .earn-btn-primary svg { width: 21px; height: 21px; }
body.ios .earn-btn-ghost {
  background: #fff; color: var(--ios-label);
  border: 1px solid #E5E5EA;
  box-shadow: none;
}
body.ios .earn-btn-ghost svg { width: 20px; height: 20px; }

/* breakdown list ---------------------------------------------------------- */
body.ios .earn-list {
  margin-top: 16px; background: #fff; border-radius: 22px; overflow: hidden;
  border: 1px solid #E5E5EA;
  box-shadow: none;
}
body.ios .earn-row {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; text-decoration: none; cursor: pointer;
  transition: background .15s ease;
}
body.ios .earn-row.static {
  cursor: default;
  transition: none;
}
body.ios .earn-row:not(.static):active { background: var(--ios-fill-3); }
body.ios .earn-row.static:active { background: transparent; }
body.ios .earn-row + .earn-row::before {
  content: ''; position: absolute; top: 0; left: 74px; right: 0; height: 1px; background: var(--ios-separator-line);
}
body.ios .earn-ic {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
body.ios .earn-ic svg { width: 22px; height: 22px; }
body.ios .earn-ic-violet { background: #F3E8FF; color: #8B5CF6; }
body.ios .earn-ic-green  { background: #E5F7EE; color: #14B866; }
body.ios .earn-ic-red    { background: #FDEAE8; color: #F0654E; }
body.ios .earn-ic-pink   { background: #FFF0F3; color: #FF2D8C; }
body.ios .earn-ic-blue   { background: #E6F0FA; color: #2D8CFF; }
body.ios .earn-row-tx { flex: 1; min-width: 0; }
body.ios .earn-row-tx b { display: block; font: 700 16.5px/1.25 var(--font-sans); color: var(--ios-label); }
body.ios .earn-row-tx span { display: block; font: 500 13.5px/1.3 var(--font-sans); color: var(--ios-label-2); margin-top: 2px; }
body.ios .earn-row-val { font: 700 17px/1 var(--font-num); white-space: nowrap; font-variant-numeric: tabular-nums; }
body.ios .earn-val-violet { color: #8B5CF6; }
body.ios .earn-val-green  { color: #14B866; }
body.ios .earn-val-red    { color: #F0654E; }
body.ios .earn-val-pink   { color: #FF2D8C; }
body.ios .earn-val-blue   { color: #2D8CFF; }
body.ios .earn-row-chev { flex: none; display: inline-flex; color: #C7C7CC; margin-left: 2px; }
body.ios .earn-row-chev svg { width: 18px; height: 18px; }

/* ==========================================================================
   Dashboard sub-views → authentic iOS grouped lists / cards (structural)
   ========================================================================== */
/* Supporters leaderboard → grouped inset list */
body.ios .board {
  background: var(--ios-bg-secondary-grouped);
  border-radius: var(--ios-r-group);
  overflow: hidden;
  box-shadow: var(--ios-shadow-card);
}
body.ios .brow {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; position: relative; border: none;
  transition: background-color .14s ease, transform .16s cubic-bezier(.2,.8,.3,1);
}
body.ios .brow:active { background: var(--ios-fill-2); transform: scale(.99); }
body.ios .brow + .brow::before { content: ""; position: absolute; left: 60px; right: 0; top: 0; height: 1px; background: var(--ios-separator); transform: scaleY(.5); }
body.ios .brow .rk { font: 600 13px/1 var(--font-num); color: var(--ios-label-3); min-width: 22px; }
body.ios .brow .bav { border-radius: 50%; }
body.ios .brow .bv { font: 600 17px/1 var(--font-num); color: var(--ios-label); font-variant-numeric: tabular-nums; }

/* Recent-payments feed → grouped rows */
body.ios .feed-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; position: relative; }
body.ios .feed-ic { border-radius: 8px; }

/* Co-pilot suggestions → iOS cards stack */
body.ios .copilot { padding: 6px 16px 10px; }
body.ios .tip-row { padding: 16px 0; transition: transform .16s cubic-bezier(.2,.8,.3,1); }
body.ios .tip-row:active { transform: scale(.99); }
body.ios .tip-row .tri { border-radius: 9px; width: 34px; height: 34px; }
body.ios .tip-row .trb .act { color: var(--tint); }

/* Playbook checklist → grouped list */
body.ios .playbook { padding: 16px; }
body.ios .pb-item { padding: 14px 2px; transition: transform .16s cubic-bezier(.2,.8,.3,1); }
body.ios .pb-item:active { transform: scale(.99); }
body.ios .pb-item .cbx { border-radius: 50%; }
body.ios .pb-item.done .cbx { background: var(--ios-green); border-color: var(--ios-green); }

/* Employees / Denti rows */
body.ios .emp-row, body.ios .earn-emp-row { transition: background-color .14s ease, transform .16s cubic-bezier(.2,.8,.3,1); }
body.ios .emp-row:active, body.ios .earn-emp-row:active { transform: scale(.99); }
body.ios .emp-av { border-radius: 11px; }

/* Whale / top supporter card */
body.ios .whale-av { border-radius: 14px; }
body.ios .whale-share { background: var(--ios-fill-2); border-radius: var(--ios-r-field); }

/* Links tracking table → card-contained, iOS hairlines (kept tabular) */
body.ios .track-table td { border-top-color: var(--ios-separator); }

/* statCell tiles inside earn-banner */
body.ios .earn-cell .l { color: var(--ios-label-2); }
body.ios .earn-cell .v { color: var(--ios-label); }

/* payout method / schedule rows use .metric-ic tiles → iOS rounded */
body.ios .metric-ic { border-radius: 9px; }
body.ios .sc-ic { border-radius: 8px; color: var(--ios-label); }


/* ---- Chart metric pill buttons — vivid active states ---- */
[data-metricseg] button { transition: all .18s cubic-bezier(.2,.8,.3,1); }
[data-metricseg] button:hover:not(.on) { background: var(--surface-1) !important; color: var(--fg-1) !important; }


/* ---- Range/Style dropdown buttons — Apple capsule style ---- */
#range-select-btn, #style-icon-btn {
  transition: background .15s, border-color .15s, box-shadow .15s;
}
#range-select-btn:hover, #style-icon-btn:hover {
  background: #F9FAFB !important;
  border-color: #D1D5DB !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}

/* ---- Hover dots sul chart SVG — glow effect ---- */
#hover-dot-visitors circle:nth-child(2),
#hover-dot-clicks circle:nth-child(2),
#hover-dot-payments circle:nth-child(2) { filter: brightness(1.08); }
/* ====================================================================== */
/* Card insights — fullscreen support-mirror modal                        */
/* ====================================================================== */
.modal-card.card-insights-fs {
  max-width: 460px; width: 100%; padding: 0; text-align: left;
  border-radius: 22px; overflow: hidden; align-self: flex-start;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
}
.card-insights-fs .ci-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); background: var(--white);
  position: sticky; top: 0; z-index: 5; flex: none;
}
.card-insights-fs .ci-title { flex: 1; text-align: center; font: 700 16.5px/1 var(--font-sans); color: var(--fg-1); }
.card-insights-fs .ci-iconbtn,
.card-insights-fs .ci-iconbtn-spacer { width: 36px; height: 36px; flex: none; }
.card-insights-fs .ci-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--fg-1);
  border-radius: 50%; cursor: pointer; transition: background .15s ease;
}
.card-insights-fs .ci-iconbtn:hover { background: var(--surface-2); }
.card-insights-fs .ci-iconbtn svg { width: 18px; height: 18px; }
.card-insights-fs .ci-body { padding: 18px 16px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.card-insights-fs .ci-sec { margin-bottom: 26px; }
.card-insights-fs .ci-sec:last-child { margin-bottom: 4px; }
.card-insights-fs .ci-sec-h { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.card-insights-fs .ci-sec-ic { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.card-insights-fs .ci-sec-ic svg { width: 20px; height: 20px; }
.card-insights-fs .ci-sec-tx { flex: 1; min-width: 0; }
.card-insights-fs .ci-sec-tx b { display: block; font: 700 16px/1.2 var(--font-sans); color: var(--fg-1); }
.card-insights-fs .ci-sec-tx span { display: block; font: 500 12.5px/1.2 var(--font-sans); color: var(--fg-3); margin-top: 2px; }

.card-insights-fs .ci-tipbox {
  display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 20px;
  border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface-1); margin-bottom: 12px;
}
.card-insights-fs .ci-tipcur { font: 800 26px/1 var(--font-num); }
.card-insights-fs .ci-tipval { font: 800 26px/1 var(--font-num); color: var(--fg-1); letter-spacing: -0.02em; }

.card-insights-fs .ci-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm);
}
.card-insights-fs .ci-card-tx { flex: 1; min-width: 0; }
.card-insights-fs .ci-card-tx b { display: block; font: 700 14.5px/1.25 var(--font-sans); color: var(--fg-1); }
.card-insights-fs .ci-card-tx span { display: block; font: 500 12.5px/1.2 var(--font-sans); color: var(--fg-3); margin-top: 3px; }

.card-insights-fs .ci-databtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; color: #fff; cursor: pointer;
  font: 700 14px/1 var(--font-sans); width: 100%; height: 46px; background: var(--ink);
  transition: transform .12s ease, filter .15s ease;
}
.card-insights-fs .ci-databtn.sm { width: auto; height: 38px; padding: 0 16px; font-size: 13px; flex: none; }
.card-insights-fs .ci-databtn:active { transform: scale(0.97); }
.card-insights-fs .ci-databtn:hover { filter: brightness(1.05); }
.card-insights-fs .ci-databtn svg { width: 16px; height: 16px; }
.card-insights-fs .ci-card .ci-databtn.sm { background: var(--surface-2); color: var(--fg-1); }
.card-insights-fs .ci-card .ci-databtn.sm:hover { background: var(--border); }

.card-insights-fs .ci-bigbtn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 4px; height: 52px; border-radius: 14px; cursor: pointer;
  border: 1.5px dashed var(--border); background: var(--surface-1); color: var(--fg-1);
  font: 700 14.5px/1 var(--font-sans); transition: background .15s ease, border-color .15s ease;
}
.card-insights-fs .ci-bigbtn:hover { background: var(--surface-2); border-color: var(--fg-3); }
.card-insights-fs .ci-bigbtn svg { width: 18px; height: 18px; }

.card-insights-fs .ci-sortbtn {
  border: none; background: none; cursor: pointer; flex: none;
  font: 700 13px/1 var(--font-sans); color: var(--fg-2); padding: 6px 2px;
}
.card-insights-fs .ci-sortbtn:hover { color: var(--fg-1); }

.card-insights-fs .ci-banner { margin-bottom: 12px; }
.card-insights-fs .ci-banner2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.card-insights-fs .ci-blklabel { font: 600 12.5px/1 var(--font-sans); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.04em; margin: 6px 0 10px; }
.card-insights-fs .ci-block { border: 1px solid var(--border); border-radius: 14px; background: var(--white); padding: 4px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card-insights-fs .ci-empty { text-align: center; color: var(--fg-3); font: 500 13.5px/1.4 var(--font-sans); padding: 22px 0; }

.card-insights-fs .ci-feed-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.card-insights-fs .ci-feed-row:first-child { border-top: none; }
.card-insights-fs .ci-feed-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-1); color: var(--fg-1); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.card-insights-fs .ci-feed-ic svg { width: 16px; height: 16px; }
.card-insights-fs .ci-feed-b { flex: 1; min-width: 0; }
.card-insights-fs .ci-feed-b b { display: block; font: 700 14px/1.2 var(--font-sans); color: var(--fg-1); }
.card-insights-fs .ci-feed-b span { display: block; font: 500 12.5px/1.2 var(--font-sans); color: var(--fg-3); margin-top: 2px; }
.card-insights-fs .ci-feed-amt { font: 800 15px/1 var(--font-num); color: var(--fg-1); font-variant-numeric: tabular-nums; }

.card-insights-fs .ci-detail-h { margin-bottom: 16px; }
.card-insights-fs .ci-detail-h b { display: block; font: 800 22px/1.1 var(--font-sans); letter-spacing: -0.02em; color: var(--fg-1); }
.card-insights-fs .ci-detail-h span { display: block; font: 500 13.5px/1.2 var(--font-sans); color: var(--fg-3); margin-top: 4px; }

.card-insights-fs .ci-progress { padding: 16px; }
.card-insights-fs .ci-progress-top { display: flex; justify-content: space-between; font: 600 13px/1 var(--font-sans); color: var(--fg-2); margin-bottom: 9px; }
.card-insights-fs .ci-progress-bar { width: 100%; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.card-insights-fs .ci-progress-bar > div { height: 100%; border-radius: 4px; transition: width .3s ease; }

/* ======================================================================
   Gifts received — editorial table (mirrors the reference mock, themed
   with the profile accent via --gr-accent)
   ====================================================================== */
.gifts-received { --gr-bg:#EFEAF2; position:relative; margin:-42px -16px -140px; min-height:100vh; padding:18px 18px 150px; border-radius:0;
  background-color:#F1ECF6;
  background-image:
    radial-gradient(135% 95% at 2% -8%,  color-mix(in srgb, var(--gr-accent) 32%, transparent) 0%, transparent 58%),
    radial-gradient(130% 95% at 104% 12%, color-mix(in srgb, #A98BE8 30%, transparent) 0%, transparent 60%),
    radial-gradient(150% 110% at 55% 114%, color-mix(in srgb, #FFB58A 22%, transparent) 0%, transparent 62%),
    linear-gradient(152deg,
      color-mix(in srgb, var(--gr-accent) 16%, #F7EFF6) 0%,
      color-mix(in srgb, var(--gr-accent) 6%,  #F4EFF6) 34%,
      color-mix(in srgb, #A98BE8 7%,    #F1ECF7) 66%,
      color-mix(in srgb, #A98BE8 18%,   #EFEAF8) 100%);
  background-repeat:no-repeat; }
.gifts-received .gr-topbar { display:flex; justify-content:flex-end; padding-top:6px; }
.gifts-received .gr-toolbar { gap:8px; }
.gifts-received .gr-title { text-align:center; font-weight:700; font-size:40px; line-height:1.1; letter-spacing:-0.01em; color:var(--fg-1); margin:2px 0 6px; }
.gifts-received .gr-toolbar { display:flex; justify-content:space-between; margin:0 0 10px; }
.gifts-received .gr-head { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; align-items:center; gap:10px; padding:4px 16px 10px; }
.gifts-received .gr-h { font:600 13.5px/1 var(--font-sans); color:var(--gr-accent); }
.gifts-received .gr-h.gr-from { text-align:center; }
.gifts-received .gr-list { display:flex; flex-direction:column; gap:12px; }
/* Liquid Glass card */
.gifts-received .gr-row { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; align-items:center; gap:10px;
  border-radius:20px; padding:11px 14px;
  background:linear-gradient(135deg, rgba(255,255,255,0.62), rgba(255,255,255,0.30));
  backdrop-filter:blur(16px) saturate(160%); -webkit-backdrop-filter:blur(16px) saturate(160%);
  border:1px solid rgba(255,255,255,0.55);
  box-shadow:0 8px 24px rgba(80,60,110,0.10), inset 0 1px 0 rgba(255,255,255,0.75); }
.gifts-received .gr-gift { display:flex; align-items:center; gap:12px; min-width:0; }
.gifts-received .gr-thumb { width:52px; height:52px; flex:none; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.7); box-shadow:0 2px 6px rgba(0,0,0,0.06); }
.gifts-received .gr-thumb-img { background-size:cover; background-position:center; }
.gifts-received .gr-thumb svg { width:24px; height:24px; }
.gifts-received .gr-name { font:600 16px/1.25 var(--font-sans); color:var(--fg-1); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gifts-received .gr-pill { display:inline-flex; align-items:center; gap:4px; background:#CFE9D4; color:#1F6E55;
  font:600 13px/1 var(--font-sans); padding:7px 11px; border-radius:9999px; }
.gifts-received .gr-pill svg { stroke-width:2.4; }
.gifts-received .gr-row .gr-amount { font:800 19px/1 var(--font-num); color:var(--fg-1); font-variant-numeric:tabular-nums; }
.gifts-received .gr-row .gr-from { display:flex; justify-content:center; }
.gifts-received .gr-av { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:#fff; font:700 16px/1 var(--font-sans); }
.gifts-received .gr-total { margin:22px 4px 2px; text-align:right; }
.gifts-received .gr-total-label { font:700 16px/1 var(--font-sans); color:var(--fg-1); }
.gifts-received .gr-total-val { font-weight:700; font-size:42px; line-height:1.05; margin-top:4px; }
@media (max-width:430px){
  .gifts-received .gr-head, .gifts-received .gr-row { grid-template-columns:minmax(0,1fr) auto 40px; gap:8px; }
  .gifts-received .gr-title { font-size:32px; }
  .gifts-received .gr-name { font-size:15px; }
  .gifts-received .gr-row .gr-amount { font-size:16px; }
  .gifts-received .gr-thumb { width:46px; height:46px; }
}

/* ======================================================================
   Earnings detail pages — transparent X close, leaderboard, sub tiers,
   wishlist share bars, and the supporter / subscribers modals
   ====================================================================== */
.earn-x-row { display:flex; justify-content:flex-end; margin:0 -4px 2px 0; }

/* ---- Tips: top-10 leaderboard ---- */
.lb-card { padding-top:2px !important; }
.lb-row { display:flex; align-items:center; gap:10px; padding:11px 0; border-top:1px solid var(--border); }
.lb-row:first-child { border-top:none; }
.lb-av { position:relative; flex:none; width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font:700 15px/1 var(--font-sans); }
.lb-av .lb-rank { position:absolute; top:-5px; left:-5px; min-width:18px; height:18px; padding:0 3px; box-sizing:border-box;
  border-radius:9px; background:#fff; color:var(--fg-2); font:800 10px/18px var(--font-num); text-align:center; font-style:normal;
  box-shadow:0 1px 3px rgba(0,0,0,0.22); }
.lb-rank.gold { background:#E6A700; color:#fff; } .lb-rank.silver { background:#9AA3AF; color:#fff; } .lb-rank.bronze { background:#C07A3E; color:#fff; }
.lb-tx { flex:1; min-width:0; }
.lb-tx b { display:block; font:700 14px/1.2 var(--font-sans); color:var(--fg-1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lb-tx span { display:block; font:500 12px/1.2 var(--font-sans); color:var(--fg-3); margin-top:2px; }
.lb-amt { flex:none; font:800 15px/1 var(--font-num); color:var(--fg-1); font-variant-numeric:tabular-nums; }
.lb-view { flex:none; width:28px; height:28px; border-radius:50%; border:none; background:var(--surface-1); color:var(--fg-2);
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s, transform .1s; }
.lb-view:hover { background:var(--surface-2); color:var(--fg-1); }
.lb-view:active { transform:scale(.92); }

/* ---- Subscriptions: per-tier card + see-subscribers ---- */
.sub-tiers { display:flex; flex-direction:column; gap:14px; }
.sub-tier { background:var(--white); border:1px solid var(--border); border-radius:18px; padding:14px 16px; box-shadow:var(--shadow-sm); }
.sub-tier-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sub-tier-id { min-width:0; }
.sub-tier-id b { display:block; font:700 15.5px/1.25 var(--font-sans); color:var(--fg-1); }
.sub-tier-id span { display:block; font:500 12.5px/1.2 var(--font-sans); color:var(--fg-3); margin-top:3px; }
.sub-tier-earn { font:800 19px/1 var(--font-num); color:var(--fg-1); font-variant-numeric:tabular-nums; flex:none; }
.sub-see { width:100%; margin-top:13px; display:flex; align-items:center; justify-content:center; gap:8px;
  height:42px; border-radius:12px; border:1px solid color-mix(in srgb, var(--acc) 35%, transparent);
  background:color-mix(in srgb, var(--acc) 8%, transparent); color:var(--acc);
  font:700 13.5px/1 var(--font-sans); cursor:pointer; transition:background .15s, transform .1s; }
.sub-see:hover { background:color-mix(in srgb, var(--acc) 14%, transparent); }
.sub-see:active { transform:scale(.99); }
.sub-see svg { width:16px; height:16px; }

/* ---- Wishlist: share-of-section bars ---- */
.wl-card { padding-top:4px !important; }
.wl-item { padding:14px 0; border-top:1px solid var(--border); }
.wl-item:first-child { border-top:none; }
.wl-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wl-id { display:flex; align-items:center; gap:12px; min-width:0; }
.wl-thumb { width:42px; height:42px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background-size:cover; background-position:center; }
.wl-id-tx { min-width:0; }
.wl-id-tx b { display:block; font:700 14.5px/1.25 var(--font-sans); color:var(--fg-1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wl-id-tx span { display:block; font:500 12.5px/1.2 var(--font-sans); color:var(--fg-3); margin-top:2px; }
.wl-amt { font:800 16px/1 var(--font-num); font-variant-numeric:tabular-nums; flex:none; }
.wl-bar { width:100%; height:8px; background:var(--surface-2); border-radius:5px; overflow:hidden; margin-top:11px; }
.wl-bar > div { height:100%; border-radius:5px; transition:width .35s ease; }
.wl-share { font:600 11.5px/1 var(--font-sans); color:var(--fg-3); margin-top:7px; }

/* ---- Supporter profile modal ---- */
.modal-card.sup-fs { max-width:340px; width:100%; padding:0; border-radius:24px; overflow:hidden; }
.sup-modal { padding:0 24px 26px; text-align:center; }
.sup-modal-head { display:flex; justify-content:flex-end; padding:8px 0 0; }
.sup-av { width:84px; height:84px; border-radius:50%; margin:2px auto 14px; display:flex; align-items:center; justify-content:center;
  color:#fff; font:800 36px/1 var(--font-sans); }
.sup-name { font:800 22px/1.1 var(--font-sans); color:var(--fg-1); letter-spacing:-0.02em; }
.sup-badge { display:inline-flex; align-items:center; gap:5px; font:700 12.5px/1 var(--font-sans); margin-top:7px; }
.sup-badge svg { width:14px; height:14px; }
.sup-stats { margin-top:20px; }

/* ---- Tier subscribers modal ---- */
.modal-card.subm-fs { max-width:420px; width:100%; padding:0; border-radius:22px; overflow:hidden;
  max-height:calc(100vh - 60px); display:flex; flex-direction:column; }
.subm-modal { display:flex; flex-direction:column; min-height:0; }
.subm-head { display:flex; align-items:center; gap:8px; padding:12px 14px 6px; }
.subm-title { flex:1; text-align:center; font:700 16.5px/1 var(--font-sans); color:var(--fg-1); }
.subm-sub { text-align:center; font:500 13px/1.3 var(--font-sans); color:var(--fg-3); padding:0 16px 14px; border-bottom:1px solid var(--border); }
.subm-list { padding:6px 16px 22px; overflow-y:auto; }
.subm-row { display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--border); }
.subm-row:first-child { border-top:none; }
.subm-av { width:40px; height:40px; flex:none; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font:700 16px/1 var(--font-sans); }
.subm-tx { flex:1; min-width:0; }
.subm-tx b { display:block; font:700 14.5px/1.2 var(--font-sans); color:var(--fg-1); }
.subm-tx span { display:block; font:500 12.5px/1.2 var(--font-sans); color:var(--fg-3); margin-top:2px; }
.subm-amt { font:800 15px/1 var(--font-num); color:var(--fg-1); font-variant-numeric:tabular-nums; }

/* ======================================================================
   spoil.me-style soft mesh gradient — applied to Earnings + Stats only
   (profile pages and Card insights are intentionally excluded)
   ====================================================================== */
.dmain-grad, body.ios .dmain-grad {
  background-color:#F1ECF6;
  /* painterly wash: a full-canvas diagonal that melts pink → cream → lilac,
     with large soft glows on top so no hue ever meets a hard white edge */
  background-image:
    radial-gradient(135% 105% at 2% -8%,  color-mix(in srgb, var(--acc) 32%, transparent) 0%, transparent 58%),
    radial-gradient(130% 100% at 104% 14%, color-mix(in srgb, #A98BE8 30%, transparent) 0%, transparent 60%),
    radial-gradient(150% 120% at 55% 116%, color-mix(in srgb, #FFB58A 22%, transparent) 0%, transparent 62%),
    linear-gradient(152deg,
      color-mix(in srgb, var(--acc) 16%, #F7EFF6) 0%,
      color-mix(in srgb, var(--acc) 6%,  #F4EFF6) 34%,
      color-mix(in srgb, #A98BE8 7%,    #F1ECF7) 66%,
      color-mix(in srgb, #A98BE8 18%,   #EFEAF8) 100%);
  background-attachment:fixed; background-repeat:no-repeat;
}
.dmain-grad .dcontent { background:transparent; }
body.ios .dmain-grad .earn-redesign { background:transparent; }

/* ---- Liquid-glass cards on the gradient (Earnings + Stats only) ---- */
.dmain-grad .card,
body.ios .dmain-grad .earn-hero,
body.ios .dmain-grad .earn-list,
.dmain-grad .sub-tier,
body.ios .dmain-grad .earn-btn-ghost,
.dmain-grad #earn-period-dropdown-btn,
.dmain-grad #earndetail-period-btn {
  background:linear-gradient(140deg, rgba(255,255,255,0.60), rgba(255,255,255,0.34)) !important;
  -webkit-backdrop-filter:blur(20px) saturate(155%); backdrop-filter:blur(20px) saturate(155%);
  border:1px solid rgba(255,255,255,0.62) !important;
  box-shadow:0 10px 30px rgba(80,60,110,0.10), inset 0 1px 0 rgba(255,255,255,0.72) !important;
}
.dmain-grad .earn-row { background:transparent; }
.dmain-grad .earn-row:not(.static):hover { background:rgba(255,255,255,0.28); }
.dmain-grad .earn-row.static:hover { background: transparent !important; }
/* keep the spark-line dot readable on glass */
body.ios .dmain-grad .earn-chart-dot { background:rgba(255,255,255,0.9); }

/* Red liquid-glass X close button (matches the profile close, glassified) */
.earn-x { width:40px; height:40px; flex:none; border-radius:50%; padding:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center; color:#FF3B30;
  background:linear-gradient(135deg, rgba(255,255,255,0.60), rgba(255,255,255,0.28));
  backdrop-filter:blur(14px) saturate(170%); -webkit-backdrop-filter:blur(14px) saturate(170%);
  border:1px solid rgba(255,255,255,0.6);
  box-shadow:0 4px 14px rgba(80,60,110,0.14), inset 0 1px 0 rgba(255,255,255,0.75);
  transition:transform .12s ease, box-shadow .15s ease; }
.earn-x:hover { box-shadow:0 6px 18px rgba(80,60,110,0.20), inset 0 1px 0 rgba(255,255,255,0.85); }
.earn-x:active { transform:scale(0.92); }
.earn-x svg { width:22px; height:22px; }

/* Earnings home → separate "Top supporters" card */
.earn-leadcard { display:flex; align-items:center; gap:13px; margin-top:16px; padding:15px 16px; border-radius:18px; text-decoration:none; }
.earn-leadcard .earn-ic { width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex:none; }
.earn-leadcard-tx { flex:1; min-width:0; }
.earn-leadcard-tx b { display:block; font:700 15px/1.25 var(--font-sans); color:var(--fg-1); }
.earn-leadcard-tx small { display:block; font:500 12.5px/1.2 var(--font-sans); color:var(--fg-3); margin-top:2px; }
.earn-leadcard .earn-row-chev { color:var(--fg-3); display:flex; align-items:center; }

/* leaderboard rank avatar (reuses .lb-av styling inside the glass table) */
.gifts-received .gr-rankav { width:44px; height:44px; font-size:16px; }

/* ─── Flip Card Credit Card Redesign ─── */
.flip-card {
  background-color: transparent;
  width: 560px;
  height: 352px;
  perspective: 2200px;
  color: white;
  margin: 40px auto;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.85s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-front, .flip-card-back {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
}

/* ─── Front face ─── */
.flip-card-front {
  background:
    linear-gradient(135deg,
      #2c2c2c 0%,
      #1e1e1e 40%,
      #141414 70%,
      #0e0e0e 100%
    );
  box-shadow:
    0 2px 4px rgba(0,0,0,0.6),
    0 8px 16px rgba(0,0,0,0.55),
    0 28px 48px rgba(0,0,0,0.45),
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset;
}

/* subtle sheen overlay */
.flip-card-front::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(
    130deg,
    rgba(255,255,255,0.055) 0%,
    transparent 45%,
    transparent 55%,
    rgba(255,255,255,0.02) 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* ─── Back face ─── */
.flip-card-back {
  background:
    linear-gradient(135deg,
      #282828 0%,
      #1a1a1a 50%,
      #111111 100%
    );
  box-shadow:
    0 2px 4px rgba(0,0,0,0.6),
    0 8px 16px rgba(0,0,0,0.55),
    0 28px 48px rgba(0,0,0,0.45),
    0 1px 0 rgba(255,255,255,0.07) inset;
  transform: rotateY(180deg);
}

/* ─── Front elements ─── */

.flip-card .heading_8264 {
  position: absolute;
  letter-spacing: .28em;
  font-size: 1.15em;
  font-weight: 700;
  top: 1.45em;
  right: 1.6em;
  margin: 0;
  color: #ebebeb;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
}

.flip-card .logo {
  position: absolute;
  top: 1.4em;
  left: 1.55em;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.flip-card .card-chip,
.flip-card .chip {
  position: absolute;
  bottom: 2.2em;
  right: 1.8em;
  border-radius: 5px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.55));
  background: transparent !important;
  height: auto !important;
  width: auto !important;
  padding: 0 !important;
  display: block !important;
}

.flip-card .contactless {
  position: absolute;
  top: 1.5em;
  left: 5.8em;
  opacity: 0.9;
}

.flip-card .number {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.32em;
  letter-spacing: .19em;
  bottom: 5.6em;
  left: 1.55em;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  color: #f0f0f0;
}

.flip-card .valid_thru {
  position: absolute;
  font-weight: 500;
  font-size: .48em;
  letter-spacing: .12em;
  bottom: 4.55em;
  left: 1.6em;
  margin: 0;
  color: #8a8a8a;
  text-transform: uppercase;
  font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
}

.flip-card .date_8264 {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: .08em;
  bottom: 3.2em;
  left: 1.55em;
  margin: 0;
  color: #e8e8e8;
}

.flip-card .name {
  position: absolute;
  font-weight: 600;
  font-size: 1.05em;
  letter-spacing: .12em;
  bottom: 1.5em;
  left: 1.55em;
  margin: 0;
  text-transform: uppercase;
  color: #d8d8d8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
}

/* ─── Back elements ─── */

.flip-card .strip {
  position: absolute;
  width: 100%;
  height: 56px;
  top: 36px;
  left: 0;
  background:
    repeating-linear-gradient(
      90deg,
      #1a1a1a,
      #1a1a1a 2px,
      #111 2px,
      #111 4px
    ),
    linear-gradient(180deg, #222 0%, #0d0d0d 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.6) inset;
}

.flip-card .mstrip {
  position: absolute;
  width: 68%;
  height: 44px;
  top: 122px;
  left: 24px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    #e8e8e8 0%,
    #f2f2f2 50%,
    #e0e0e0 100%
  );
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 5px,
      rgba(0,0,0,0.03) 5px,
      rgba(0,0,0,0.03) 6px
    );
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.flip-card .sstrip {
  position: absolute;
  width: 100px;
  height: 44px;
  top: 122px;
  right: 24px;
  border-radius: 4px;
  background: #f5f5f5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card .code {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.15em;
  letter-spacing: .22em;
  color: #2a2a2a;
  margin: 0;
}

/* back label */
.flip-card .back-label {
  position: absolute;
  bottom: 22px;
  left: 24px;
  font-size: .68em;
  color: #555;
  letter-spacing: .06em;
  font-family: 'Space Grotesk', sans-serif;
}

/* responsive card container */
.flip-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  width: 100%;
}

@media (max-width: 600px) {
  .flip-card {
    width: 320px;
    height: 201px;
    margin: 20px auto;
  }
  .flip-card .heading_8264 {
    font-size: 0.7em;
  }
  .flip-card .logo {
    width: 40px;
    height: 40px;
  }
  .flip-card .chip {
    width: 38px;
    height: 38px;
    bottom: 1.2em;
  }
  .flip-card .contactless {
    width: 24px;
    height: 24px;
    left: 4.2em;
  }
  .flip-card .number {
    font-size: 0.8em;
    bottom: 4.8em;
  }
  .flip-card .valid_thru {
    font-size: 0.35em;
    bottom: 3.8em;
  }
  .flip-card .date_8264 {
    font-size: 0.65em;
    bottom: 2.4em;
  }
  .flip-card .name {
    font-size: 0.65em;
    bottom: 1em;
  }
  .flip-card .strip {
    height: 36px;
    top: 20px;
  }
  .flip-card .mstrip {
    height: 28px;
    top: 76px;
  }
  .flip-card .sstrip {
    width: 60px;
    height: 28px;
    top: 76px;
  }
  .flip-card .code {
    font-size: 0.75em;
  }
}

/* Glass Credit Card styling overrides */
.flip-card-front.glass-nav,
.flip-card-back.glass-nav {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 12px 36px rgba(28, 27, 31, 0.15),
    0 2px 8px rgba(28, 27, 31, 0.08) !important;
}

/* ─── Glass Holographic Background layers ─── */
.bg-holographic.holographic {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  filter: url(#bump);
  opacity: 0.94;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(20, 20, 35, 0.08) 100%),
    conic-gradient(
      at 50% 50%,
      #ff75c3 0%,
      #ffa647 14%,
      #ffe83f 28%,
      #9fff5b 42%,
      #70e2ff 56%,
      #cd93ff 72%,
      #00f9f8 86%,
      #ff75c3 100%
    );
}

.bg-holographic.holographic::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(0, 249, 248, 0.45), transparent 55%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 117, 195, 0.2) 0px,
      rgba(255, 232, 63, 0.18) 40px,
      rgba(112, 226, 255, 0.2) 80px,
      rgba(205, 147, 255, 0.18) 120px,
      rgba(255, 117, 195, 0.2) 160px
    );
  mix-blend-mode: overlay;
  background-size: 300% 300%;
  animation: holoShift 8s linear infinite;
}

.bg-holographic.holographic::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 40%, rgba(255,255,255,0) 80%);
  mix-blend-mode: color-dodge;
  animation: bg-pos 4s ease-in-out infinite alternate;
  background-size: 200% 200%;
}

@keyframes holoShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes bg-pos {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

/* ─── Card Light Sweep Shimmer ─── */
.card-shine-sweep {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 25%,
    rgba(255, 255, 255, 0.08) 28%,
    rgba(255, 255, 255, 0.7) 42%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.7) 58%,
    rgba(255, 255, 255, 0.08) 72%,
    rgba(255, 255, 255, 0) 75%,
    transparent 100%
  );
  background-size: 250% 100%;
  background-position: 150% 0%;
  mix-blend-mode: color-dodge;
  animation: shineSweep 5.5s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes shineSweep {
  0% {
    background-position: 150% 0%;
  }
  40% {
    background-position: -50% 0%;
  }
  100% {
    background-position: -50% 0%;
  }
}

/* ─── Sparkling Glare Points ─── */
.card-glare-point {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: color-dodge;
  box-shadow: 
    0 0 10px 5px rgba(255, 255, 255, 0.95),
    0 0 22px 10px rgba(0, 249, 248, 0.8),
    0 0 35px 15px rgba(255, 107, 254, 0.6),
    0 0 60px 22px rgba(255, 232, 63, 0.4);
  animation: sparkleTwinkle 3.5s ease-in-out infinite;
}

.card-glare-point::before,
.card-glare-point::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 80%);
  border-radius: 50%;
  pointer-events: none;
}

/* Vertical flare ray */
.card-glare-point::before {
  width: 2px;
  height: 38px;
}

/* Horizontal flare ray */
.card-glare-point::after {
  width: 38px;
  height: 2px;
}

@keyframes sparkleTwinkle {
  0%, 100% {
    transform: scale(0.5) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1) rotate(90deg);
    opacity: 1;
  }
}

/* Card typography legibility on light holographic glass background */
.flip-card-front.glass-nav .heading_8264,
.flip-card-front.glass-nav .number,
.flip-card-front.glass-nav .date_8264,
.flip-card-front.glass-nav .name,
.flip-card-back.glass-nav .back-label {
  color: #1a1a1a !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.flip-card-front.glass-nav .logo,
.flip-card-front.glass-nav .card-chip,
.flip-card-front.glass-nav .chip {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)) !important;
}

/* Back elements adjusted for glass transparency */
.flip-card-back.glass-nav .strip {
  background: rgba(0, 0, 0, 0.65) !important;
  box-shadow: none !important;
}

.flip-card-back.glass-nav .sstrip {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.flip-card-back.glass-nav .code {
  color: #1a1a1a !important;
}

/* Ensure all text and graphics are layered on top of the holographic background */
.flip-card-front > *:not(.bg-holographic),
.flip-card-back > *:not(.bg-holographic) {
  position: absolute;
  z-index: 2;
}

/* Trigger 180 flip transition on hover - disabled */
.flip-card:hover .flip-card-inner {
  transform: none;
}

/* Floating animation with dynamic 3D tilting */
.flip-card {
  animation: floatCard 3.8s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0) rotateX(2.5deg) rotateY(-3.5deg) scale(1);
  }
  50% {
    transform: translateY(-10px) rotateX(-2.5deg) rotateY(3.5deg) scale(1.025);
  }
}

/* ─── Sober Masculine Card Theme ─── */
/* Matte royal navy / sapphire blue solid premium background with subtle gold sheen */
.flip-card-front.sober-card,
.flip-card-back.sober-card {
  background: linear-gradient(135deg, #0f244a 0%, #061024 100%) !important;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.65),
    0 16px 32px rgba(0,0,0,0.55),
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset !important;
}

.flip-card-front.sober-card .bg-holographic.holographic,
.flip-card-back.sober-card .bg-holographic.holographic {
  background: linear-gradient(135deg, #0f244a 0%, #061024 100%) !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Hide colorful rainbow holographic overlays */
.flip-card-front.sober-card .bg-holographic.holographic::before,
.flip-card-back.sober-card .bg-holographic.holographic::before {
  display: none !important;
}

/* Elegant gold-plated plate reflections */
.flip-card-front.sober-card .bg-holographic.holographic::after,
.flip-card-back.sober-card .bg-holographic.holographic::after {
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(223, 192, 127, 0.12) 50%, rgba(255,255,255,0) 65%) !important;
  mix-blend-mode: color-dodge !important;
  animation: bg-pos 6s ease-in-out infinite alternate !important;
  background-size: 200% 200% !important;
}

/* Precise golden typography for the masculine card */
.flip-card-front.sober-card .heading_8264,
.flip-card-front.sober-card .number,
.flip-card-front.sober-card .date_8264,
.flip-card-front.sober-card .name,
.flip-card-back.sober-card .back-label {
  color: #dfc07f !important;
  font-weight: 600 !important;
  letter-spacing: 0.11em !important;
  text-shadow: 
    0 -1px 0px rgba(0, 0, 0, 0.9),
    0 1px 1px rgba(255, 255, 255, 0.12) !important;
}

.flip-card-front.sober-card .valid_thru {
  color: #dfc07f !important;
  opacity: 0.75 !important;
}

.flip-card-front.sober-card .name {
  color: #ebd299 !important;
  letter-spacing: 0.14em !important;
}

/* Hide glare points completely in male sober card mode */
.flip-card-front.sober-card .card-glare-point,
.flip-card-back.sober-card .card-glare-point {
  display: none !important;
}

/* Slower and lighter sweep for supreme classiness */
.flip-card-front.sober-card .card-shine-sweep,
.flip-card-back.sober-card .card-shine-sweep {
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.01) 32%,
    rgba(223, 192, 127, 0.22) 50%,
    rgba(255, 255, 255, 0.01) 68%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  ) !important;
  animation: shineSweep 7.5s cubic-bezier(0.25, 1, 0.5, 1) infinite !important;
}

/* ─── Apple Glassmorphism Dropdown Menu ─── */
.apple-glass-select {
  height: 38px !important;
  min-width: 170px !important;
  padding: 0 36px 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(1.02) !important;
  backdrop-filter: blur(20px) saturate(190%) brightness(1.02) !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: var(--fg-1) !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.03), 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.9) !important;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2523555555%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%2F%3E%3C%2Fsvg%3E') !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px auto !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.apple-glass-select:hover {
  background: rgba(255, 255, 255, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.05), 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-1px);
}

.apple-glass-select:focus,
.apple-glass-select:active {
  background: rgba(255, 255, 255, 0.65) !important;
  border-color: rgba(0, 122, 255, 0.3) !important;
  box-shadow: 
    0 0 0 3px rgba(0, 122, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.95) !important;
}

.apple-glass-select option {
  background-color: var(--white) !important;
  color: var(--fg-1) !important;
  font-weight: 500 !important;
}

/* ─── Apple Glassmorphism Button ─── */
.btn-glass {
  background: rgba(255, 255, 255, 0.24) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.05) !important;
  backdrop-filter: blur(14px) saturate(1.8) brightness(1.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  color: var(--fg-1) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 14px 6px rgba(255, 255, 255, 0.30),
    0 8px 30px rgba(28, 27, 31, 0.08),
    0 2px 8px  rgba(28, 27, 31, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 0 16px 8px rgba(255, 255, 255, 0.35),
    0 12px 35px rgba(28, 27, 31, 0.12),
    0 4px 12px  rgba(28, 27, 31, 0.08) !important;
  transform: translateY(-1.5px);
}

.btn-glass:active {
  background: rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 0 10px 4px rgba(255, 255, 255, 0.2) !important;
  transform: translateY(0.5px);
}




