/* Owner app ("Gym & Academy Manager") design system. Loaded only by index.html and scoped to
   body.owner, so the member app and the admin page keep their own look. It re-points the shared
   tokens of styles.css (teal / navy / slate) and polishes the shared components; screens keep
   their markup. */
body.owner {
  --brand: #14b8a6;          /* teal-green: fills, highlights, charts */
  --brand-dark: #0f766e;     /* dark teal: text on light, buttons */
  --brand-grad: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-ink: #ffffff;
  --primary-soft: #e6f7f5;
  --green: #15803d;
  --green-soft: #dcfce7;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .10);
  --radius: 14px;
  font-family: 'Poppins', Inter, "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  letter-spacing: -.005em;
  background: var(--bg);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  body.owner {
    --brand: #2dd4bf;
    --brand-dark: #14b8a6;
    --brand-grad: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    --bg: #0b1220;
    --surface: #111a2b;
    --surface-2: #172235;
    --border: #23324a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --primary: #2dd4bf;
    --primary-ink: #042f2e;
    --primary-soft: #0f2e2c;
    --green: #4ade80;
    --green-soft: #12301f;
    --amber: #fbbf24;
    --amber-soft: #33270c;
    --red: #f87171;
    --red-soft: #3a1717;
    --blue: #60a5fa;
    --blue-soft: #15243d;
    --shadow: none;
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .4);
  }
}

/* ---------- type ---------- */
body.owner h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
body.owner h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
body.owner .page-head { margin-bottom: 1.25rem; }
body.owner .page-head small { color: var(--muted); font-size: .88rem; }

/* ---------- shell: side nav (desktop) + bottom nav (phone) ---------- */
body.owner .sidenav { width: 236px; padding: 1.1rem .8rem; background: var(--surface); border-right: 1px solid var(--border); gap: .15rem; overflow-y: auto; }
body.owner .brand { font-size: 1.05rem; letter-spacing: -.01em; padding: .25rem .5rem 1.1rem; }
body.owner .brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad); color: #fff; box-shadow: 0 4px 12px rgba(15, 118, 110, .3); }
body.owner .navlink { padding: .55rem .75rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .93rem; transition: background .15s, color .15s; }
body.owner .navlink svg { width: 19px; height: 19px; }
body.owner .navlink:hover { background: var(--surface-2); color: var(--text); }
body.owner .navlink.active { background: var(--primary-soft); color: var(--primary); }
body.owner .role-tag { background: var(--primary-soft); color: var(--primary); }
body.owner main { padding: calc(1.5rem + env(safe-area-inset-top)) 1.75rem 2.5rem; max-width: 1180px; }
@media (max-width: 760px) {
  /* phone app: start below the status bar (time, battery) */
  body.owner main { padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(var(--nav-h) + 1.75rem + env(safe-area-inset-bottom)); }
  body.owner .bottomnav { background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(15, 23, 42, .06); }
  body.owner .bottomnav a { color: var(--muted); font-weight: 600; }
  body.owner .bottomnav a.active { color: var(--primary); }
  body.owner .bottomnav a.scan-btn svg { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(15, 118, 110, .4); }
}

/* ---------- cards, stats, lists ---------- */
body.owner .card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow); padding: 1.1rem 1.15rem; }
body.owner .card-head h2 { font-size: 1rem; }
body.owner a.card { transition: border-color .15s, box-shadow .15s; }
body.owner a.card:hover { box-shadow: var(--shadow-lg); }
body.owner .stats { gap: .85rem; }
body.owner .stat { border-radius: var(--radius); padding: 1rem 1.05rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
body.owner a.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
body.owner .stat .label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: none; }
body.owner .stat .value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
body.owner .stat.accent .value { color: var(--primary); }
body.owner .list-item { padding: .75rem .35rem; }
body.owner a.list-item { border-radius: 10px; }
body.owner .avatar { background: var(--primary-soft); color: var(--primary); }
body.owner .empty { padding: 1.5rem .5rem; }

/* ---------- buttons, chips, tabs, forms ---------- */
body.owner .btn { border-radius: 10px; font-weight: 650; min-height: 40px; transition: background .15s, box-shadow .15s, filter .15s; }
body.owner .btn.primary { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(15, 118, 110, .25); }
body.owner .btn.primary:hover { filter: brightness(1.05); }
body.owner .btn.small { border-radius: 8px; }
body.owner .btn.wa { color: #15803d; }
body.owner .chip { border-color: var(--border); font-weight: 600; }
body.owner .chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
body.owner .tab.active { color: var(--primary); border-bottom-color: var(--brand); }
body.owner input, body.owner select, body.owner textarea { border-radius: 10px; border-color: var(--border); background: var(--surface); }
body.owner input:focus, body.owner select:focus, body.owner textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
body.owner label.field { color: var(--muted); font-weight: 600; }
body.owner .cat-pick input:checked + span, body.owner .kind-pick input:checked + span { background: var(--primary-soft); border-color: var(--brand); color: var(--primary); }
body.owner .goal-picker label:has(input:checked), body.owner .mode-pick input:checked + span { border-color: var(--brand); background: var(--primary-soft); color: var(--primary); }
body.owner .progress-bar > div, body.owner .live-qr .lq-bar > div { background: var(--brand); }
body.owner th { background: var(--surface-2); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
body.owner th:first-child { border-top-left-radius: 8px; }
body.owner th:last-child { border-top-right-radius: 8px; }
body.owner .modal { border-radius: 18px; box-shadow: var(--shadow-lg); }
body.owner .modal-backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
body.owner .toast { border-radius: 12px; }
body.owner .qr-card .gym { color: #0f766e; }
body.owner .heatmap div.on { background: var(--brand); }
body.owner .heatmap div.today { outline-color: var(--primary); }
body.owner .demo-bar { border: 1px solid var(--amber-soft); }
body.owner .plat-ann { border-left-color: var(--brand); }

/* money hero (dashboard / payments): red when fees are pending, teal when all collected */
body.owner .dues-hero { border-radius: 18px; background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); box-shadow: 0 10px 26px rgba(220, 38, 38, .22); }
body.owner .dues-hero.ok { background: var(--brand-grad); box-shadow: 0 10px 26px rgba(15, 118, 110, .25); }

/* ---------- dashboard ---------- */
.od-hello h1 { margin: 0; }
.od-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .65rem; margin-bottom: 1.1rem; }
.od-action {
  display: flex; align-items: center; gap: .65rem; padding: .75rem .85rem; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); font-weight: 700; font-size: .92rem;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.od-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.od-action .ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.od-action .ic svg { width: 20px; height: 20px; }
.od-action.main { background: var(--brand-grad); color: #fff; border-color: transparent; }
.od-action.main .ic { background: rgba(255, 255, 255, .2); color: #fff; }
.od-action small { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); }
.od-action.main small { color: rgba(255, 255, 255, .85); }

.od-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .85rem; margin-bottom: 1.1rem; }
.od-kpi {
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.05rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); position: relative; transition: transform .15s, box-shadow .15s;
}
a.od-kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.od-kpi .top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.od-kpi .label { color: var(--muted); font-size: .8rem; font-weight: 650; }
.od-kpi .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.od-kpi .ic svg { width: 18px; height: 18px; }
.od-kpi .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: .25rem; }
.od-kpi .sub { color: var(--muted); font-size: .8rem; }
.od-kpi .sub b { color: var(--text); font-weight: 700; }
.od-kpi.good .ic { background: var(--green-soft); color: var(--green); }
.od-kpi.warn .ic { background: var(--amber-soft); color: var(--amber); }
.od-kpi.warn .value { color: var(--amber); }
.od-kpi.bad .ic { background: var(--red-soft); color: var(--red); }
.od-kpi.bad .value { color: var(--red); }
.od-kpi.blue .ic { background: var(--blue-soft); color: var(--blue); }
.od-trend { display: inline-block; font-size: .72rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; margin-left: .25rem; }
.od-trend.up { background: var(--green-soft); color: var(--green); }
.od-trend.down { background: var(--red-soft); color: var(--red); }
.od-section { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 1.25rem 0 .6rem; }
.od-alerts > .card, .od-alerts > a.card { margin-bottom: .75rem !important; }
/* cards placed in a grid line up (the "card + card" gap is for stacked cards only) */
body.owner .grid > .card + .card { margin-top: 0; }
@media (max-width: 560px) {
  /* phone: quick actions become one swipeable row of compact tiles */
  .od-actions { display: flex; overflow-x: auto; gap: .55rem; margin: 0 -1rem 1rem; padding: .15rem 1rem .4rem; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 1rem; }
  .od-actions::-webkit-scrollbar { display: none; }
  .od-action { flex: 0 0 auto; width: 104px; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .75rem .7rem; font-size: .84rem; line-height: 1.2; scroll-snap-align: start; }
  .od-action small { display: none; }
  .od-kpis { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .od-kpi { padding: .85rem .85rem; }
  .od-kpi .value { font-size: 1.4rem; }
  .od-kpi .ic { width: 30px; height: 30px; }
}

/* ---------- ShoroFit plan: pill, lock / paywall, plan page ---------- */
.plan-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .75rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .82rem; border: 1px solid transparent; }
.plan-pill.bad { background: var(--red-soft); color: var(--red); }
.pro-tag { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border-radius: 6px; font-size: .65rem; font-weight: 800; letter-spacing: .05em; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; vertical-align: middle; }
.lock-card { text-align: center; max-width: 520px; margin: 1rem auto; padding: 1.75rem 1.25rem; }
.lock-card .lock-ic { font-size: 2.4rem; margin-bottom: .25rem; }
.lock-card p { margin: .25rem 0 1rem; }
.sub-status .sub-big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: .1rem 0 .4rem; }
.sub-status .sub-big small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.sub-pending { display: grid; gap: .4rem; margin-top: .9rem; padding: .75rem .85rem; border-radius: 12px; background: var(--amber-soft); color: var(--text); }
.sub-pending.bad { background: var(--red-soft); }
.sub-pending small { color: var(--muted); }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: .35rem; }
.card + .card.plan-card, body.owner .plan-cards > .card + .card { margin-top: 0; }
.plan-card h3 { font-size: 1.15rem; margin: 0; }
.plan-card.pro { border: 2px solid var(--brand); }
.plan-card.current { box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.plan-flag { position: absolute; top: -11px; right: 14px; padding: .15rem .6rem; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: .72rem; font-weight: 800; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.plan-price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.plan-feat { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .4rem; font-size: .9rem; flex: 1; }
.plan-feat li { padding-left: .1rem; }
.plan-feat li.off { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.plan-policy { margin-top: .75rem; }
.pay-sum { grid-template-columns: 1fr auto; }
.pay-sum dd { text-align: right; font-variant-numeric: tabular-nums; }

/* accessibility: links inside sentences are underlined (not colour alone); grey badges dark enough to read */
body.owner p a:not(.btn), body.owner small a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
body.owner .badge.none, body.owner .badge.archived { color: #475569; }
@media (prefers-color-scheme: dark) { body.owner .badge.none, body.owner .badge.archived { color: var(--muted); } }

/* library: seats page */
body.owner .seat-shifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin-bottom: .75rem; }
body.owner .seat-shift { display: grid; gap: .1rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
body.owner .seat-shift small { color: var(--muted); }
body.owner .seat-shift span { font-weight: 700; color: var(--green); font-size: .88rem; }
body.owner .seat-shift.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--primary-soft); }
body.owner .seat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
body.owner .seat-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 4px; margin-right: -.55rem; vertical-align: -1px; border: 1.5px solid; }
body.owner .seat-dot.free { border-color: var(--green); }
body.owner .seat-dot.taken { background: var(--primary); border-color: var(--primary); }
body.owner .seat-dot.due { background: var(--amber-soft); border-color: var(--amber); }
body.owner .seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
body.owner .seat { display: grid; gap: .05rem; min-height: 72px; padding: .45rem .5rem; border-radius: 12px; text-decoration: none; text-align: center; align-content: center; }
body.owner .seat b { font-size: 1.05rem; }
body.owner .seat small { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.owner .seat i { font-style: normal; font-size: .68rem; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.owner .seat.free { border: 1.5px dashed var(--green); color: var(--green); background: var(--surface); }
body.owner .seat.taken { background: var(--primary); color: var(--primary-ink); }
body.owner .seat.taken.due { background: var(--amber-soft); color: var(--amber); border: 1.5px solid var(--amber); }
body.owner .seat.taken:not(.due) small, body.owner .seat.taken:not(.due) i { color: var(--primary-ink); opacity: .92; }
body.owner .free-seats { margin-top: .5rem; display: grid; gap: .35rem; }
body.owner .free-seats .chips { display: flex; flex-wrap: wrap; gap: .35rem; }
body.owner .shift-rows { display: grid; gap: .5rem; margin-top: .75rem; }
body.owner .shift-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .4rem; align-items: center; }

/* ===== Dashboard (Home) – header, collection card, KPIs, quick actions, expiries, check-ins ===== */
body.owner .dh-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
body.owner .dh-brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; }
body.owner .dh-logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(15, 118, 110, .25); }
body.owner .dh-logo svg { width: 26px; height: 26px; stroke-width: 2.6; }
body.owner .dh-brand b { display: block; font-size: 1.15rem; line-height: 1.1; }
body.owner .dh-brand small { color: var(--muted); font-size: .8rem; }
body.owner .dh-bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--text); }
body.owner .dh-bell svg { width: 24px; height: 24px; }
body.owner .dh-bell i { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
body.owner .dh-gym { display: flex; align-items: center; gap: .45rem; min-width: 0; max-width: 46%; padding: .25rem .7rem .25rem .25rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
body.owner .dh-gym span { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; }
body.owner .dh-gym b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.owner .dh-hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
body.owner .dh-hello h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
body.owner .dh-hello p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
body.owner .dh-date { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: .82rem; font-weight: 600; white-space: nowrap; }
body.owner .dh-date svg { width: 16px; height: 16px; }
body.owner .plan-pill { margin-bottom: .75rem; }

body.owner .dh-rev { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon txt" "bars bars"; align-items: center; gap: .75rem 1rem; padding: 1rem 1.1rem; margin-bottom: .9rem; border-radius: 18px;
  background: linear-gradient(135deg, #f0fdfa 0%, #e6f7f5 100%); border: 1px solid #99f6e4; color: var(--text); text-decoration: none; position: relative; }
body.owner .dh-rupee { grid-area: icon; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #0d9b84; color: #fff; font-size: 1.9rem; font-weight: 700; }
body.owner .dh-rev-txt { grid-area: txt; display: grid; }
body.owner .dh-rev-txt small:first-child { color: var(--muted); font-weight: 600; }
body.owner .dh-rev-txt b { font-size: 1.85rem; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
body.owner .dh-bars { grid-area: bars; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; align-items: end; height: 92px; padding-right: 1.4rem; }
body.owner .dh-bars div { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: .25rem; text-align: center; }
body.owner .dh-bars span { align-self: end; display: block; border-radius: 5px 5px 2px 2px; background: #7dd8c6; }
body.owner .dh-bars span.now { background: var(--brand-dark); }
body.owner .dh-bars small { font-size: .7rem; color: var(--muted); }
body.owner .dh-rev > .dh-chev { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 370px) {
  body.owner .dh-rev { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "icon txt bars"; gap: .65rem; padding: .9rem 1.9rem .9rem .8rem; }
  body.owner .dh-bars { padding-right: 0; }
  body.owner .dh-bars small { font-size: .6rem; }
  body.owner .dh-rupee { width: 50px; height: 50px; font-size: 1.6rem; }
  body.owner .dh-rev-txt b { font-size: 1.45rem; }
  body.owner .dh-bars { gap: .3rem; height: 84px; }
}
@media (min-width: 560px) {
  body.owner .dh-rev { gap: 1rem; padding: 1rem 1.1rem; }
  body.owner .dh-rupee { width: 60px; height: 60px; font-size: 1.9rem; }
  body.owner .dh-rev-txt b { font-size: 1.85rem; }
  body.owner .dh-bars { gap: .55rem; height: 96px; }
  body.owner .dh-bars small { font-size: .7rem; }
}
body.owner .dh-trend { font-weight: 700; font-size: .85rem; margin-right: .3rem; }
body.owner .dh-trend.up { color: var(--green); }
body.owner .dh-trend.down { color: var(--red); }
body.owner .dh-vs { color: var(--muted); font-size: .78rem; }

body.owner .dh-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
@media (min-width: 760px) { body.owner .dh-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.owner .dh-kpi { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem .8rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-width: 0; }
body.owner .dh-kpi > div { display: grid; min-width: 0; }
body.owner .dh-kpi small:first-child { color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.2; }
body.owner .dh-kpi b { font-size: 1.4rem; margin: .2rem 0 .1rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.owner .dh-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; }
body.owner .dh-ic svg { width: 20px; height: 20px; }
body.owner .dh-ic.teal { background: #14b8a6; }
body.owner .dh-ic.orange { background: #f97316; }
body.owner .dh-ic.blue { background: #2563eb; }
body.owner .dh-ic.violet { background: #7c3aed; }

body.owner .dh-sec { display: flex; align-items: baseline; justify-content: space-between; margin: .4rem 0 .55rem; }
body.owner .dh-sec h2 { margin: 0; font-size: 1.15rem; }
body.owner .dh-sec a { color: var(--brand-dark); font-weight: 600; font-size: .9rem; text-decoration: none; }
body.owner .dh-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: .45rem; margin-bottom: 1rem; }
body.owner .dh-actions::-webkit-scrollbar { display: none; }
body.owner .dh-act { display: grid; justify-items: center; align-content: center; gap: .4rem; min-height: 96px; padding: .6rem .25rem; border-radius: 16px; text-align: center; font-size: .76rem; line-height: 1.2; font-weight: 600; color: var(--text); text-decoration: none; }
body.owner .dh-act svg { width: 26px; height: 26px; }
/* a label never spills into the next tile: the tile clips, long words break inside it */
body.owner .dh-act { min-width: 0; overflow: hidden; }
body.owner .dh-act span { max-width: 100%; overflow-wrap: anywhere; }
@media (min-width: 560px) { body.owner .dh-act { font-size: .88rem; min-height: 110px; } body.owner .dh-act svg { width: 30px; height: 30px; } }
body.owner .dh-act.main { background: var(--brand-dark); color: #fff; }
body.owner .dh-act.teal { background: #e6f7f5; } body.owner .dh-act.teal svg { color: #0f766e; }
body.owner .dh-act.blue { background: #eaf2ff; } body.owner .dh-act.blue svg { color: #2563eb; }
body.owner .dh-act.amber { background: #fff1e6; } body.owner .dh-act.amber svg { color: #7c2d12; }
body.owner .dh-act.violet { background: #f3edff; } body.owner .dh-act.violet svg { color: #5b21b6; }

body.owner .dh-list { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: .2rem .9rem; margin-bottom: 1.1rem; }
body.owner .dh-list .empty { padding: 1rem 0; }
body.owner .dh-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; color: var(--text); text-decoration: none; }
body.owner .dh-row + .dh-row { border-top: 1px solid var(--border); }
body.owner .dh-who { flex: 1; min-width: 0; display: grid; }
body.owner .dh-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.owner .dh-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.owner .dh-exp { font-weight: 600; font-size: .85rem; white-space: nowrap; }
body.owner .dh-exp.red { color: var(--red); }
body.owner .dh-exp.orange { color: #c2410c; }
body.owner .dh-chev { display: grid; color: var(--muted); }
body.owner .dh-chev svg { width: 18px; height: 18px; }
body.owner .dh-time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
body.owner .dh-pill { padding: .3rem .75rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 700; }
body.owner .dh-pill.in { background: var(--green-soft); color: var(--green); }
body.owner .dh-out { border: 0; font-family: inherit; cursor: pointer; }

@media (prefers-color-scheme: dark) {
  body.owner .dh-rev { background: linear-gradient(135deg, #0f2e2c 0%, #111a2b 100%); border-color: #134e4a; }
  body.owner .dh-bars span { background: #2a7f71; }
  body.owner .dh-bars span.now { background: #2dd4bf; }
  body.owner .dh-act.teal, body.owner .dh-act.blue, body.owner .dh-act.amber, body.owner .dh-act.violet { background: var(--surface-2); }
  body.owner .dh-act svg { color: var(--brand) !important; }
}
@media (max-width: 379px) {
  body.owner .dh-kpi { flex-direction: column; gap: .45rem; }
  body.owner .dh-kpi b { font-size: 1.25rem; }
  body.owner .dh-ic { width: 34px; height: 34px; }
}
@media (max-width: 379px) { body.owner .dh-act { font-size: .68rem; overflow-wrap: anywhere; } }
body.owner .badge.expired { color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  body.owner .badge.expired { color: #fca5a5; }
  body.owner .dh-act.main { background: #0f766e; color: #fff; }
  body.owner .dh-act.main svg { color: #fff !important; }
  body.owner .dh-exp.orange { color: #fb923c; }
  body.owner .dh-exp.red { color: #f87171; }
}
@media (prefers-color-scheme: dark) { body.owner .btn.wa { color: #4ade80; border-color: #166534; } }
/* phone app: login page and pop-ups also stay clear of the status bar */
body.owner .auth { padding-top: calc(1rem + env(safe-area-inset-top)); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
body.owner .modal-backdrop { padding-top: calc(1rem + env(safe-area-inset-top)); }

/* More page: each group (Daily, Business, Library tools…) is a shutter that opens on tap; the yellow PRO circle */
body.owner .more-group { padding: 0; margin-bottom: .75rem; overflow: hidden; }
body.owner .more-sum { display: flex; align-items: center; gap: .6rem; min-height: 56px; padding: .6rem 1rem; cursor: pointer; list-style: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body.owner .more-sum::-webkit-details-marker { display: none; }
body.owner .more-sum:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius); }
body.owner .more-t { flex: 1; font-size: 1rem; font-weight: 800; color: var(--text); }
body.owner .more-n { flex: none; min-width: 26px; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; text-align: center; }
body.owner .more-chev { flex: none; width: 10px; height: 10px; margin: 0 .2rem 0 .1rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; }
body.owner .more-group[open] > .more-sum { border-bottom: 1px solid var(--border); }
body.owner .more-group[open] .more-chev { transform: rotate(-135deg) translate(-3px, 0); }
body.owner .more-group > .list { padding: .25rem .75rem; animation: more-open .2s ease; }
@keyframes more-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.owner .more-chev { transition: none; } body.owner .more-group > .list { animation: none; } }
body.owner .more-h { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .25rem .25rem .45rem; }
body.owner .more-h .pro-dot { width: 28px; height: 28px; font-size: .58rem; }
body.owner .pro-dot { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #facc15; color: #713f12; font-size: .66rem; font-weight: 900; letter-spacing: .02em; box-shadow: 0 2px 6px rgba(202, 138, 4, .35); }
body.owner .more-sum .pro-dot { width: 28px; height: 28px; font-size: .58rem; }
body.owner .block-box { display: grid; gap: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
body.owner .block-box .switch { align-items: flex-start; }

/* library: students' seat / leave requests */
.req-card h2 { display: flex; align-items: center; gap: .5rem; margin-top: 0; font-size: 1.05rem; }
.req-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.req-ico { font-size: 1.4rem; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.req-t { flex: 1; min-width: 180px; display: grid; gap: .1rem; }
.req-t a { color: inherit; }
.req-t small { color: var(--muted); }
.req-btns { display: flex; gap: .4rem; }
.req-banner { display: flex; align-items: center; gap: .6rem; color: inherit; margin-bottom: .9rem; border-color: var(--amber, #d97706); }
.req-banner small { color: var(--muted); flex: 1; }

/* owner tools: profit, occupancy, reminder ticks */
.pf-hero { background: var(--brand-grad, var(--primary)); color: #fff; border: none; }
.pf-hero.loss { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.pf-hero > small { opacity: .9; font-weight: 700; }
.pf-eq { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.pf-eq span { display: grid; }
.pf-eq small, .pf-hero > small { color: #fff; font-size: .74rem; opacity: .9; }
.pf-eq b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pf-eq i { font-style: normal; font-size: 1.3rem; opacity: .8; }
.pf-eq .pf-res b { font-size: 1.6rem; }
.pf-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; align-items: end; }
.pf-m { display: grid; justify-items: center; gap: .15rem; color: inherit; text-decoration: none; padding: .3rem .1rem; border-radius: 10px; min-width: 0; }
.pf-m.on { background: var(--surface-2); }
.pf-pair { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.pf-pair i { width: 12px; border-radius: 4px 4px 0 0; min-height: 2px; }
.pf-pair i.in, .seat-dot.pf-in { background: var(--brand, var(--primary)); }
.pf-pair i.out, .seat-dot.pf-out { background: #f59e0b; }
.pf-m b { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pf-m b.neg { color: var(--red); }
.pf-m small { color: var(--muted); font-size: .7rem; }
.occ-row { display: grid; grid-template-columns: 5.5rem 1fr 2.6rem 3rem; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .9rem; }
.occ-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.occ-bar i { display: block; height: 100%; background: var(--brand, var(--primary)); border-radius: inherit; }
.occ-row small { color: var(--muted); text-align: right; }
.reminded { color: var(--green); font-size: .74rem; font-weight: 700; align-self: center; }

/* live seat map, seat booking, enquiries */
body.owner .seat-shift.live span { color: var(--brand, var(--primary)); }
.live-sum { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: baseline; margin: 0 0 .7rem; font-size: .92rem; }
.live-sum b { font-size: 1.25rem; }
body.owner .seat.taken.in { background: #15803d; color: #fff; }
body.owner .seat.taken.away { background: var(--primary); color: var(--primary-ink); opacity: .85; }
body.owner .seat.taken.adv { background: #ede9fe; color: #5b21b6; border: 1.5px solid #8b5cf6; }
body.owner .seat.taken.adv small, body.owner .seat.taken.adv i { color: #5b21b6; }
body.owner .seat.taken.in small, body.owner .seat.taken.in i { color: #fff; }
body.owner .seat-dot.in { background: #15803d; border-color: #15803d; }
body.owner .seat-dot.adv { background: #ede9fe; border-color: #8b5cf6; }
body.owner button.seat { font: inherit; cursor: pointer; }
.seat-book { display: grid; gap: .6rem; }
.or-line { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .82rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.crm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .8rem; }
.crm-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .6rem .5rem; text-align: center; display: grid; }
.crm-stats b { font-size: 1.3rem; }
.crm-stats small { color: var(--muted); font-size: .72rem; }
.due-txt { color: var(--red) !important; font-weight: 700; }
@media (max-width: 480px) { .crm-stats { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-color-scheme: dark) { body.owner .seat.taken.adv { background: #2e1065; color: #ddd6fe; } body.owner .seat.taken.adv small, body.owner .seat.taken.adv i { color: #ddd6fe; } }

/* forecast, data safety */
.fc-card table td small { font-size: .7rem; }
.pos-txt { color: var(--green); font-weight: 700; }
.neg-txt { color: var(--red); font-weight: 700; }
.ds-card.bad { border-color: var(--red); }
.ds-row { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--border); }
.ds-row:first-of-type { border-top: none; }
.ds-row > span { font-size: 1.2rem; line-height: 1.3; }
.ds-row div { display: grid; gap: .1rem; }
.ds-row small { color: var(--muted); }
/* sidebar: "Pro features" group with yellow PRO marks */
body.owner .sidenav .nav-group { display: flex; align-items: center; gap: .45rem; margin: .9rem .75rem .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
body.owner .navlink { display: flex; align-items: center; gap: .6rem; }
body.owner .navlink .nl-text { flex: 1; min-width: 0; }
body.owner .pro-dot.sm { width: 26px; height: 26px; font-size: .55rem; }
/* Plus plan (gyms): teal instead of the Pro yellow; a bit wider for the longer word */
body.owner .pro-dot.plus { background: #ccfbf1; color: #115e59; width: 38px; border-radius: 17px; }
body.owner .pro-dot.plus.sm { width: 32px; border-radius: 13px; }
body.owner .more-h .pro-dot.plus, body.owner .more-sum .pro-dot.plus { width: 34px; border-radius: 14px; }

/* ShoroFit Partner logo on the owner dashboard */
body.owner .dh-mark { display: flex; flex-direction: column; gap: .25rem; }
body.owner .dh-logo-img { width: 128px; }
body.owner .dh-mark .sf-side { font-size: .58rem; }

/* ---------- Business Health Score card (dashboard) ---------- */
.hs-card { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 1rem; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); animation: hs-in .5s ease both; }
.hs-card.hs-setup { text-decoration: none; color: inherit; }
.hs-gauge-wrap { position: relative; width: 108px; height: 108px; flex: none; }
.hs-gauge { width: 108px; height: 108px; transform: rotate(-90deg); }
.hs-track { fill: none; stroke: var(--surface-2); stroke-width: 11; }
.hs-fill { fill: none; stroke-width: 11; stroke-linecap: round; }
.hs-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hs-num b { font-size: 1.95rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.hs-num small { font-size: .7rem; font-weight: 800; letter-spacing: .01em; }
.hs-empty-ring { width: 108px; height: 108px; border-radius: 50%; border: 6px dashed var(--border); display: grid; place-items: center; font-size: 2rem; }
.hs-body { flex: 1; min-width: 0; }
.hs-h { display: flex; align-items: center; gap: 8px; }
.hs-h h2 { font-size: 1.05rem; margin: 0; font-weight: 800; }
.hs-badge { font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.hs-parts { display: grid; gap: 6px; margin: 10px 0; }
.hs-part { display: grid; grid-template-columns: 76px 1fr 30px; align-items: center; gap: 8px; }
.hs-part small { color: var(--muted); font-size: .78rem; }
.hs-bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hs-bar i { display: block; height: 100%; border-radius: 99px; }
.hs-part em { font-style: normal; font-size: .78rem; font-weight: 700; text-align: right; color: var(--muted); }
.hs-tips { margin: 6px 0 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.hs-tips li { font-size: .82rem; color: var(--text); }
.hs-good { margin: 6px 0 0; font-size: .85rem; color: var(--green); font-weight: 600; }
.hs-tip-lead { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
@keyframes hs-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .hs-card { flex-direction: column; text-align: center; } .hs-h { justify-content: center; } .hs-tips { text-align: left; } }
@media (prefers-reduced-motion: reduce) { .hs-card { animation: none; } .hs-fill { transition: none !important; } }

/* ---------- Glass look (owner's pick, 26 Oct 2026, "Glassy Dashboard" reference) ----------
   Every screen after login (app.js adds body.dh-glass-on in route(), removes it on the login page): a blurred photo
   behind (img/glass-bg.jpg = img/library-shelf.jpg, already blurred) and frosted panels. The cards themselves carry
   no backdrop blur – the photo is pre-blurred, and per-card blur makes long lists stutter on cheaper phones; only
   the fixed bars and pop-ups blur what scrolls under them. The dashboard's charts draw themselves (dashAnimate). */
body.owner.dh-glass-on {
  --surface: rgba(255, 252, 247, .62);
  --surface-2: rgba(255, 255, 255, .5);
  --border: rgba(255, 255, 255, .72);
  --muted: #4b5563;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 18px 34px -26px rgba(60, 40, 20, .5);
  background: #d8c7b1;
}
body.owner.dh-glass-on::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 248, 238, .55), rgba(255, 248, 238, .32)), url(/img/glass-bg.jpg) center / cover no-repeat; }
body.owner.dh-glass-on :is(.sidenav, .bottomnav) { background: rgba(255, 252, 247, .78); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
body.owner.dh-glass-on .modal { background: rgba(255, 252, 247, .94); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); border: 1px solid var(--border); }
body.owner.dh-glass-on .modal-backdrop { background: rgba(30, 22, 14, .38); }
body.owner.dh-glass-on :is(input, select, textarea) { background: rgba(255, 255, 255, .78); }
body.owner.dh-glass-on .card, body.owner.dh-glass-on .list-item { box-shadow: var(--shadow); }
body.owner.dh-glass-on .dh-rev { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
body.owner.dh-glass-on .hs-card, body.owner.dh-glass-on .dh-date, body.owner.dh-glass-on .dh-gym { background: var(--surface); border-color: var(--border); }
body.owner.dh-glass-on .dh-act.teal { background: rgba(230, 247, 245, .66); }
body.owner.dh-glass-on .dh-act.blue { background: rgba(234, 242, 255, .66); }
body.owner.dh-glass-on .dh-act.amber { background: rgba(255, 241, 230, .7); }
body.owner.dh-glass-on .dh-act.violet { background: rgba(243, 237, 255, .7); }
body.owner.dh-glass-on .dh-act { border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  body.owner.dh-glass-on {
    --surface: rgba(17, 26, 43, .62);
    --surface-2: rgba(23, 34, 53, .55);
    --border: rgba(255, 255, 255, .12);
    --muted: #aab7c9;
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 34px -24px rgba(0, 0, 0, .7);
    background: #0b1220;
  }
  body.owner.dh-glass-on::before { background: linear-gradient(rgba(2, 6, 23, .66), rgba(2, 6, 23, .76)), url(/img/glass-bg.jpg) center / cover no-repeat; }
  body.owner.dh-glass-on .dh-act.teal, body.owner.dh-glass-on .dh-act.blue, body.owner.dh-glass-on .dh-act.amber, body.owner.dh-glass-on .dh-act.violet { background: rgba(23, 34, 53, .6); }
  body.owner.dh-glass-on :is(.sidenav, .bottomnav) { background: rgba(11, 18, 32, .78); }
  body.owner.dh-glass-on .modal { background: rgba(17, 26, 43, .95); }
  body.owner.dh-glass-on .modal-backdrop { background: rgba(0, 0, 0, .5); }
  body.owner.dh-glass-on :is(input, select, textarea) { background: rgba(17, 26, 43, .8); }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.owner.dh-glass-on { --surface: rgba(255, 252, 247, .94); }
}

/* the three charts */
body.owner .dh-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; margin-bottom: 1.1rem; }
@media (min-width: 760px) { body.owner .dh-charts { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } body.owner .dh-cc-wide { grid-column: 1 / -1; } }
body.owner .dh-cc { position: relative; padding: .95rem 1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
body.owner .dh-cc-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
body.owner .dh-cc-head b { font-size: 1rem; }
body.owner .dh-cc-head small { color: var(--muted); font-size: .8rem; }
body.owner .dh-cc-head a { color: var(--brand-dark); font-weight: 600; font-size: .85rem; text-decoration: none; }
body.owner .dh-legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--muted); }
body.owner .dh-chart { position: relative; }
body.owner .dh-chart svg { width: 100%; height: auto; overflow: visible; display: block; }
body.owner .dh-chart .g { stroke: rgba(100, 116, 139, .22); stroke-dasharray: 3 5; }
body.owner .dh-chart .ax { fill: var(--muted); font-size: 12px; font-family: inherit; }
body.owner .dh-chart .ln { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
body.owner .dh-chart .ln-c { stroke: var(--brand); }
body.owner .dh-chart .ln-e { stroke: #f97316; }
body.owner .dh-chart .st-c { stop-color: var(--brand); }
body.owner .dh-chart .st-e { stop-color: #f97316; }
body.owner .dh-chart .area { opacity: 0; transition: opacity 1.2s .5s cubic-bezier(.16, 1, .3, 1); }
body.owner .dh-chart.drawn .area { opacity: 1; }
body.owner .dh-chart.wait .ln, body.owner .dh-chart.wait .seg, body.owner .dh-chart.wait rect.bar { opacity: 0; }
body.owner .dh-chart .vl { stroke: var(--muted); stroke-dasharray: 4 4; opacity: 0; transition: opacity .2s; }
body.owner .dh-chart .vl.on { opacity: .7; }
body.owner .dh-chart .hit { fill: transparent; cursor: pointer; }
body.owner .dh-chart rect.bar { fill: rgba(20, 184, 166, .42); transform-box: fill-box; transform-origin: bottom; cursor: pointer; }
body.owner .dh-chart rect.bar.now { fill: var(--brand); }
body.owner .dh-chart .trk { fill: none; stroke: rgba(100, 116, 139, .16); stroke-width: 22; }
body.owner .dh-chart .seg { fill: none; stroke-width: 22; stroke-linecap: round; cursor: pointer; }
body.owner .dh-chart .dc { font-size: 24px; font-weight: 800; fill: var(--text); letter-spacing: -.02em; }
body.owner .dh-chart .dcs { font-size: 12px; fill: var(--muted); }
body.owner #dh-donut { display: grid; justify-items: center; gap: .7rem; }
body.owner #dh-donut svg { width: min(100%, 180px); }
body.owner .dh-dleg { width: 100%; display: grid; gap: .4rem; font-size: .85rem; }
body.owner .dh-dleg div { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; }
body.owner .sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
body.owner .sw.c, body.owner .seg.s0 { background: var(--brand); stroke: var(--brand); }
body.owner .sw.e { background: #f97316; }
body.owner .sw.s0 { background: var(--brand); }
body.owner .sw.s1, body.owner .seg.s1 { background: #f97316; stroke: #f97316; }
body.owner .sw.s2, body.owner .seg.s2 { background: #7c3aed; stroke: #7c3aed; }
body.owner .sw.s3, body.owner .seg.s3 { background: #2563eb; stroke: #2563eb; }
body.owner .sw.s4, body.owner .seg.s4 { background: #64748b; stroke: #64748b; }
body.owner .dh-tip { position: absolute; z-index: 3; pointer-events: none; padding: .4rem .65rem; border-radius: 10px; background: rgba(15, 23, 42, .92); color: #fff; font-size: .78rem; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity .2s; font-variant-numeric: tabular-nums; }
body.owner .dh-tip.on { opacity: 1; }
body.owner .dh-bars span { transform-origin: bottom; }
@media (prefers-reduced-motion: reduce) { body.owner .dh-chart .area { transition: none; } }

/* bottom bar: a floating frosted pill like the member app (owner, 26 Oct 2026: "ye bar owner wali app me laga do"),
   teal active tab, Scan raised in the middle (app.js puts it there) */
@media (max-width: 760px) {
  body.owner main { padding-bottom: calc(72px + 10px + 1.75rem + env(safe-area-inset-bottom)); }
  body.owner .bottomnav, body.owner.dh-glass-on .bottomnav {
    left: 50%; right: auto; bottom: calc(10px + env(safe-area-inset-bottom)); width: min(calc(100% - 20px), 560px); height: 72px; padding: 0 6px;
    transform: translateX(-50%); align-items: center; gap: 2px; border: 1px solid rgba(255, 255, 255, .85); border-radius: 38px;
    background: rgba(255, 252, 247, .8); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 10px 30px rgba(60, 40, 20, .18);
  }
  body.owner .bottomnav a { flex: 1 1 0; min-width: 0; height: 58px; border-radius: 30px; gap: 4px; color: #34333a; font-size: .7rem; font-weight: 600; transition: background-color .2s ease, color .2s ease; }
  body.owner .bottomnav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  body.owner .bottomnav a.active { background: var(--brand-dark); color: #fff; }
  body.owner .bottomnav a.nb-scan, body.owner .bottomnav a.nb-scan.active { height: auto; background: none; }
  body.owner .bottomnav .nb-ring { width: 62px; height: 62px; margin-top: -34px; display: grid; place-items: center; border-radius: 50%; border: 5px solid #fff; color: #fff;
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); box-shadow: 0 10px 22px rgba(15, 118, 110, .35); transition: transform .15s ease; }
  body.owner .bottomnav .nb-ring svg { width: 26px; height: 26px; }
  body.owner .bottomnav a.nb-scan:active .nb-ring { transform: scale(.94); }
  body.owner #toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  body.owner .bottomnav, body.owner.dh-glass-on .bottomnav { background: rgba(11, 18, 32, .82); border-color: rgba(255, 255, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
  body.owner .bottomnav a { color: #cbd5e1; }
  body.owner .bottomnav a.active { background: #14b8a6; color: #04201d; }
  body.owner .bottomnav .nb-ring { border-color: #0b1220; }
}
@media (prefers-reduced-motion: reduce) { body.owner .bottomnav a, body.owner .bottomnav .nb-ring { transition: none; } }
