/* ============================================================
   Healot Biomekaniks — shared design system
   Used by the client app (body.client) and admin (body.admin).
   Class contract matches what app.js / admin.js emit.
   ============================================================ */
:root {
  --navy: #123a2f;
  --navy2: #175242;
  --leaf1: #5fcb9a;
  --leaf2: #1f8f63;
  --leaf3: #0b6e4f;
  --brand: #0b6e4f;
  --brand-dark: #084a35;
  --near-black: #0c1210;
  --near-black-2: #142720;
  --ink: #16231e;
  --muted: #667a70;
  --line: #e2ece6;
  --chip: #eef5f0;
  --bg: #f6faf7;
  --card: #ffffff;
  --gold: #e7a12d;
  --ok: #12a870;
  --warn: #b45309;
  --danger: #e0555b;
  --g1: #2bb8a0;
  --g2: #1f8f63;
  --accent: #0b6e4f;
  --coral: #ff6b6b;
  --mint: #e9f7f0;
  --mint-deep: #d8f2e4;
  --grad: linear-gradient(135deg, #0b6e4f 0%, #1f8f63 100%);
  --grad-dark: linear-gradient(155deg, #0b6e4f 0%, #0c1210 130%);
  --grad-warm: linear-gradient(135deg, #ff8a5b 0%, #ff5b7f 100%);
  --radius: 18px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow: 0 18px 40px rgba(16, 60, 45, 0.10), 0 4px 12px rgba(16, 60, 45, 0.05);
  --shadow-sm: 0 8px 20px rgba(16, 60, 45, 0.07);
  --shadow-lg: 0 30px 64px rgba(9, 40, 30, 0.22), 0 10px 26px rgba(9, 40, 30, 0.10);
  /* glass / Liquid Glass surfaces */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-strong: rgba(255, 255, 255, 0.80);
  --glass-bg-dark: rgba(9, 32, 24, 0.55);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-blur: saturate(1.25) blur(10px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfdfc 0%, var(--bg) 44%, #eef7f1 100%);
}
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
html, body { overscroll-behavior-y: none; }
body { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; min-height: 100vh; min-height: 100dvh; }
@media (max-width: 360px) {
  .card { padding: 15px; }
  .greet .acts { gap: 8px; }
  .icon-btn { width: 42px; height: 42px; min-width: 42px; }
}
input, textarea, select { -webkit-user-select: auto; user-select: auto; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
section[id^="tab-"]:not(.hidden) { animation: viewIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { section[id^="tab-"]:not(.hidden) { animation: none; } }

a { color: var(--leaf3); text-decoration: none; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: 0; line-height: 1.12; font-weight: 900; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: 0; line-height: 1.2; font-weight: 900; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top));
  background: transparent; position: sticky; top: 0; z-index: 20;
}
body.admin .topbar { background: var(--card); border-bottom: 1px solid var(--line); gap: 10px; flex-wrap: nowrap; }
body.admin .brand { white-space: nowrap; }
@media (max-width: 640px) {
  body.admin .brand { font-size: 15px; }
  body.admin .brand .muted { display: none; }
  body.admin #userName { display: none; }
  body.admin .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  body.admin .tab { white-space: nowrap; }
}
body.client .topbar { background: rgba(246, 250, 247, 0.85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
body.client #userName { display: none; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 9px; font-size: 17px; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(11, 110, 79, 0.28); overflow: hidden; flex: 0 0 auto; background: #fff;
}
.brand .logo svg { width: 100%; height: 100%; display: block; }
.brand .logo img, .auth-logo img, .splash-logo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; }
.brand .wordmark { height: 15px; width: auto; display: block; }

/* ---------- brand motif: joint & connector dots (echoes the logo's ball-joint rig) ---------- */
svg[aria-hidden="true"] { vertical-align: -3px; }
.joint-tex {
  position: absolute; pointer-events: none;
  background-image:
    radial-gradient(circle at 9px 9px, currentColor 2.4px, transparent 2.6px),
    radial-gradient(circle at 26px 26px, currentColor 2.4px, transparent 2.6px),
    linear-gradient(135deg, transparent calc(50% - 0.6px), currentColor calc(50% - 0.6px), currentColor calc(50% + 0.6px), transparent calc(50% + 0.6px));
  background-size: 34px 34px, 34px 34px, 34px 34px;
}

/* ---------- layout ---------- */
.container { max-width: 1040px; margin: 0 auto; padding: 16px 18px 40px; }
body.client .container {
  width: 100%; max-width: 500px; padding-top: 14px;
  padding-left: max(clamp(14px, 4.2vw, 20px), env(safe-area-inset-left));
  padding-right: max(clamp(14px, 4.2vw, 20px), env(safe-area-inset-right));
  padding-bottom: calc(138px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) {
  body.client .container { max-width: 980px; padding: 18px 28px 48px; }
}

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card + .card { margin-top: 14px; }
/* ...except inside horizontal row/grid layouts, where the vertical-stack rhythm margin above
   would unevenly eat into one flex item's stretched height (or unbalance a grid row) — those
   containers already space their cards via `gap`. */
.scoreboard-row .card, .block-cta-row .card, .grid .card, .row > .card { margin-top: 0; }
/* client-side cards get a light glass translucency over the app's soft gradient backdrop */
body.client .card:not(.hero-card):not(.mission-card):not(.stat-tile) {
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 14px; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(37, 168, 120, 0.3); border-color: var(--leaf2); }
textarea { min-height: 80px; resize: vertical; }
input[type="search"] { border-radius: 999px; padding-left: 18px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.checkbox-row input[type="checkbox"] { width: auto; margin-top: 3px; }
.checkbox-row label { margin: 0; font-weight: 500; font-size: 13.5px; }

/* ---------- buttons (capsule) ---------- */
button {
  font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  border-radius: 999px; padding: 13px 20px; color: #fff;
  background: var(--grad); background-size: 140% 140%;
  box-shadow: 0 12px 26px rgba(20, 130, 100, 0.28);
  transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.04); }
button:active { transform: translateY(1px) scale(0.996); }
button.secondary { background: var(--chip); color: var(--ink); box-shadow: none; }
button.ghost { background: #fff; color: var(--brand); border-color: var(--line); box-shadow: none; }
button.danger { background: var(--grad-warm); box-shadow: 0 12px 26px rgba(255, 91, 127, 0.30); }
button.small { padding: 8px 14px; font-size: 13px; box-shadow: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
button.block { width: 100%; }

.icon-btn {
  width: 46px; height: 46px; min-width: 46px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

.avatar {
  border-radius: 999px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(140deg, var(--leaf1), var(--leaf3)); flex: 0 0 auto;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.greet .avatar { width: 48px; height: 48px; font-size: 16px; }
.greet .who b { font-size: 17px; }
.greet .who div { color: var(--muted); font-size: 13px; }
.greet .acts { margin-left: auto; display: flex; gap: 10px; }
.notif-wrap { position: relative; }
.notif-wrap .pill-dot { position: absolute; top: 9px; right: 10px; margin: 0; }

.stat { text-align: center; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .k { color: var(--muted); font-size: 12px; }

.tag-concern {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--mint); color: var(--brand-dark);
}
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.pending { background: #fef3d6; color: #a15c07; }
.badge.waitlisted { background: #e6ecfd; color: #3452c4; }
.badge.confirmed { background: #e3f6ec; color: var(--ok); }
.badge.completed { background: #eceff3; color: #475467; }
.badge.cancelled { background: #fbe9e7; color: var(--danger); }
.badge.approved { background: #e3f6ec; color: var(--ok); }
.badge.rejected { background: #fbe9e7; color: var(--danger); }
.badge.processed { background: #e3f6ec; color: var(--ok); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: none; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* On narrow screens, data tables collapse into a stack of labeled-row cards
   instead of forcing horizontal scroll — the standard responsive-table pattern.
   Cells without a data-label (e.g. action buttons) keep no visible label. */
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap th, .table-wrap td, .table-wrap tr { display: block; }
  .table-wrap thead { position: absolute; left: -9999px; top: -9999px; }
  .table-wrap tr {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 12px;
  }
  .table-wrap td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 9px 0; text-align: right; }
  .table-wrap td:last-child { border-bottom: none; }
  .table-wrap td[data-label]:before {
    content: attr(data-label); text-align: left; color: var(--muted); font-weight: 700; font-size: 12px;
    flex: 0 0 auto; padding-top: 1px;
  }
  .table-wrap td[data-label=""]:before { content: none; }
  .table-wrap td[data-label=""] { justify-content: flex-end; }
  .table-wrap td.table-actions { justify-content: flex-end; }
}

.slot-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.slot { padding: 12px 16px; text-align: center; border: 1px solid transparent; border-radius: 999px; background: #f2f7f4; font-weight: 700; font-size: 13px; cursor: pointer; }
.slot.taken { opacity: 0.4; cursor: not-allowed; }
.slot.sel { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(20,130,100,.30); }

.days {
  display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10px, black calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, transparent, black 10px, black calc(100% - 10px), transparent);
}
.day { flex: 0 0 auto; width: 56px; text-align: center; padding: 12px 0; border-radius: 18px; background: #f2f7f4; cursor: pointer; border: 1px solid transparent; }
.day span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.day b { display: block; font-size: 17px; margin-top: 3px; }
.day.sel { background: var(--grad); color: #fff; }
.day.sel span { color: rgba(255, 255, 255, 0.8); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 10px 18px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: #5b6b78; font-weight: 700; border-radius: 999px; box-shadow: none; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }

/* Admin tab strip: on narrow screens (or many tabs), .tabs itself scrolls (see
   `body.admin .tabs` rule above). This wrapper adds edge fades so the cut-off
   is visibly "more content this way" rather than an abrupt clip, plus click
   arrows for scrolling without a trackpad/touch gesture. Arrows are toggled
   hidden/visible by JS based on actual scroll position. */
.tabs-scroller { position: relative; margin-bottom: 16px; }
.tabs-scroller .tabs { margin-bottom: 0; padding: 0 26px; }
body.admin .tabs-scroller .tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent, black 18px, black calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, black 18px, black calc(100% - 18px), transparent);
}
.tabs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 30px; height: 30px; min-width: 30px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 18px; line-height: 1; font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.tabs-arrow.left { left: -2px; }
.tabs-arrow.right { right: -2px; }

.bottomnav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 999px; padding: 9px 12px; display: flex; gap: 6px; margin: 0;
  box-shadow: var(--shadow-lg); border: 1px solid var(--glass-border); flex-wrap: nowrap;
  will-change: transform;
}
.bottomnav { max-width: min(440px, calc(100vw - 24px)); }
.bottomnav .tab { width: clamp(46px, 13.5vw, 54px); height: clamp(46px, 13.5vw, 54px); padding: 0; border: none; background: none; color: #93a1ae; display: grid; place-items: center; border-radius: 999px; }
.bottomnav .tab .label { display: none; }
.bottomnav .tab.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(20,130,100,.35); }
.bottomnav .tab svg { width: clamp(19px, 5.6vw, 22px); height: clamp(19px, 5.6vw, 22px); }
@media (min-width: 760px) {
  .bottomnav { position: sticky; left: auto; bottom: auto; top: 76px; transform: none; max-width: none; justify-content: center; border-radius: 999px; padding: 8px; margin: 0 0 18px; will-change: auto; }
  .bottomnav .tab { width: auto; min-width: 110px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; }
  .bottomnav .tab .label { display: inline; font-size: 13px; font-weight: 800; }
}

body.client #authView {
  max-width: none; padding: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 70% at 80% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(180deg, var(--leaf1) 0%, var(--leaf2) 50%, var(--leaf3) 100%);
}
.auth-wrap { width: 100%; max-width: 400px; margin: 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.auth-brand .auth-logo { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 10px 22px rgba(20,130,100,.3); background: #fff; }
.auth-brand .auth-logo svg { width: 100%; height: 100%; display: block; }
.tab:active, .concern-chip:active, .slot:active, .day:active, .seg-btn:active, .icon-btn:active { transform: scale(0.95); }
.dcard, .card { transition: transform 0.12s ease; }
body.client .auth-wrap .card {
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 26px 24px; background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
body.client #authView h1 { font-size: 26px; }

.pill-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); vertical-align: middle; box-shadow: 0 0 0 2px #fff; }
.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transition: opacity 0.2s; z-index: 100; font-weight: 600; max-width: 90vw; text-align: center; }
@media (min-width: 760px) { .toast { bottom: 28px; } }
.toast.show { opacity: 1; }
.toast.err { background: var(--coral); }

/* ---------- splash / launch cover — full-bleed real photo + brand graphic language ---------- */
#splash { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; cursor: pointer; overflow: hidden; background: var(--brand-dark);
  transition: opacity 0.5s ease, visibility 0.5s; }
#splash.gone { opacity: 0; visibility: hidden; }
.splash-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  z-index: 0; animation: splashPhotoIn 1.8s ease-out both;
}
.splash-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(9,40,30,0.55) 0%, rgba(9,40,30,0.35) 30%, rgba(6,30,22,0.88) 68%, var(--brand-dark) 100%);
}
.splash-joints { position: absolute; inset: 0; z-index: 2; color: #fff; opacity: 0.1; }
.splash-inner { position: relative; z-index: 3; text-align: center; color: #fff; padding: 0 28px 44px; width: 100%; box-sizing: border-box; }
.splash-logo { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 26px; background: rgba(255,255,255,0.95); display: grid; place-items: center; overflow: hidden; box-shadow: 0 24px 60px rgba(9,40,34,0.45); animation: splashPop 0.5s cubic-bezier(0.2,0.8,0.2,1) both; }
.splash-logo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; }
.splash-eyebrow { background: rgba(255,255,255,0.18); margin-bottom: 14px; }
.splash-name { font-size: 36px; font-weight: 900; letter-spacing: 0; line-height: 1.04; text-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.splash-tag { font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 10px; letter-spacing: 0.01em; }
.splash-bar { width: 140px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.28); margin: 24px auto 0; overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: 999px; background: #fff; animation: splashBar 1.1s ease-in-out infinite; }
.splash-skip {
  display: block; margin: 18px auto 0; background: rgba(255,255,255,0.14); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 9px 18px; box-shadow: none; border: 1px solid rgba(255,255,255,0.32);
}
.splash-skip:active { transform: scale(0.96); }
@keyframes splashPhotoIn { from { transform: scale(1.08); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(10, 35, 25, 0.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity 0.22s; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-backdrop.show { opacity: 1; }
.modal {
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  width: 100%; max-width: 460px; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 48px rgba(10, 35, 25, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.5); border-bottom: none;
  transform: translateY(24px); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 86vh; overflow-y: auto;
}
.modal-backdrop.show .modal { transform: none; }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; }
@media (min-width: 620px) { .modal-backdrop { align-items: center; } .modal { border-radius: var(--radius-xl); border-bottom: 1px solid rgba(255, 255, 255, 0.5); margin: 20px; } }

.seg {
  display: flex; gap: 6px; background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 5px; border-radius: 999px; margin: 4px 0 8px; border: 1px solid var(--glass-border);
}
.seg-btn { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; padding: 11px 10px; border-radius: 999px; box-shadow: none; cursor: pointer; }
.seg-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.concern-chip { font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 9px 13px; border-radius: 999px; color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: none; transition: transform .06s ease; }
.concern-chip:hover { border-color: var(--g2); filter: none; }
.concern-chip.sel { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(20,130,100,.30); }
.concern-desc { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--mint); color: #0d5c46; font-size: 13.5px; line-height: 1.5; border: 1px solid #cdeadb; }

.disclaimer { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff7e6; color: #7a5304; font-size: 12.5px; line-height: 1.55; border: 1px solid #f2dfa8; margin-top: 10px; }
.disclaimer.danger { background: #fdeceb; color: #8a2c2f; border-color: #f3c3c1; }
.disclaimer .disclaimer-body { flex: 1 1 auto; min-width: 0; }
.disclaimer .disclaimer-icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; color: #a15c07; }
.disclaimer.danger .disclaimer-icon { color: #b5383c; }
.disclaimer .disclaimer-icon svg { width: 100%; height: 100%; }

.branch-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.branch-strip { position: relative; height: 58px; background: var(--grad); overflow: hidden; }
.branch-strip.caravan { background: var(--grad-dark); }
.branch-strip .joint-tex { inset: 0; color: #fff; opacity: 0.16; }
.branch-strip .branch-strip-icon {
  position: absolute; left: 14px; bottom: -16px; width: 34px; height: 34px; border-radius: 11px;
  background: #fff; color: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.branch-strip .branch-strip-icon svg { width: 18px; height: 18px; }
/* real-photo branch strip (currently only the Pampanga/Apalit branch has an interior photo on file) */
.branch-strip.has-photo { height: 128px; }
.branch-strip.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.branch-strip.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6, 24, 18, 0.62) 0%, rgba(6, 24, 18, 0.05) 55%, transparent 80%);
}
.branch-strip.has-photo .branch-strip-icon { z-index: 2; }
.branch-strip .photo-tag {
  position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(6, 24, 18, 0.55); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.branch-card .branch-body { padding: 22px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.branch-card .name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.branch-card .addr { color: var(--muted); font-size: 13.5px; display: flex; align-items: flex-start; gap: 6px; }
.branch-card .addr svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--leaf2); }
.branch-card .contacts { display: flex; flex-direction: column; gap: 3px; font-size: 13px; margin-top: 4px; }
.link-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.link-row a, .link-row button { font-size: 12.5px; }
.link-row a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--chip); color: var(--ink); font-weight: 700; }
.link-row a svg, .icon-inline svg { width: 14px; height: 14px; }

.info-panel:empty { display: none; }
.info-panel { margin: 10px 0 4px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #f2fbf7, #eef7f0); border: 1px solid #dcefe1; }
.info-head { font-weight: 800; font-size: 14px; margin-bottom: 2px; }

.practitioner-card { display: flex; gap: 12px; align-items: flex-start; }

.avatar-badge {
  display: grid; place-items: center; font-weight: 800; color: #fff; flex: 0 0 auto;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 0 3px #fff, 0 0 0 4.5px rgba(11, 110, 79, 0.22);
  letter-spacing: 0.02em; position: relative;
}
.avatar-badge.circle { border-radius: 999px; }
.avatar-badge.square { border-radius: 30%; }
/* real-photo avatar (CEO / featured staff) — same joint-ring treatment as initials badges */
.avatar-photo {
  flex: 0 0 auto; border-radius: 999px; overflow: hidden; display: block;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 0 3px #fff, 0 0 0 4.5px rgba(11, 110, 79, 0.22);
}
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.article-card, .testimonial-card { display: flex; flex-direction: column; gap: 6px; }
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }

.notif-item { display: flex; gap: 10px; align-items: flex-start; }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf2); margin-top: 6px; flex: 0 0 auto; }
.notif-item.read .dot { background: var(--line); }

/* ---------- concern / service icons ---------- */
.concern-chip { display: inline-flex; align-items: center; gap: 7px; }
.concern-chip svg, .service-icon svg { width: 16px; height: 16px; }
.service-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--mint); color: var(--brand);
}
.service-row { display: flex; gap: 12px; align-items: flex-start; }

/* ---------- hero card (home) ---------- */
.hero-card {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: #fff;
  background: var(--grad-dark); padding: 24px 20px 28px; margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}
.hero-card .joint-tex {
  top: -14px; right: -14px; width: 130px; height: 130px; color: #fff; opacity: 0.14;
  border-radius: 24px; transform: rotate(10deg);
}
/* real-photography hero: photo background + green gradient wash for legible text */
.hero-card.has-photo {
  padding-bottom: 150px;
  background-image:
    linear-gradient(185deg, rgba(9, 42, 30, 0.55) 0%, rgba(8, 34, 25, 0.72) 45%, rgba(6, 24, 18, 0.94) 100%),
    var(--hero-photo);
  background-size: cover, cover;
  background-position: center, center 22%;
  background-repeat: no-repeat, no-repeat;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.16);
  padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-card h1 { color: #fff; font-size: 30px; line-height: 1.14; margin: 12px 0 6px; max-width: 78%; font-weight: 900; letter-spacing: 0; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28); }
.hero-card .hero-sub { color: rgba(255, 255, 255, 0.86); font-size: 13.5px; max-width: 270px; margin: 0 0 18px; line-height: 1.5; }
.hero-card .hero-cta { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); }
.hero-illustration { position: absolute; right: 6px; bottom: 6px; width: 128px; height: 128px; opacity: 0.95; }
@media (min-width: 760px) { .hero-card h1 { font-size: 34px; } .hero-card:not(.has-photo) { padding-bottom: 130px; } .hero-illustration { width: 160px; height: 160px; } }

/* ---------- real-photography components ---------- */
.mission-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: none; position: relative; }
.mission-card .mission-photo { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 18%; }
.mission-card .mission-body { padding: 18px 20px 20px; position: relative; }
.mission-card .mission-body::before { content: ""; position: absolute; left: 20px; top: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--gold); }
.mission-card .mission-body p { margin: 14px 0 8px; line-height: 1.65; font-size: 15.5px; font-weight: 700; letter-spacing: 0; }
.mission-card .mission-attrib { font-size: 12.5px; color: var(--muted); font-weight: 700; }

.photo-card { position: relative; overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow); margin-bottom: 14px; }
.photo-card img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card .photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 14px; color: #fff;
  background: linear-gradient(0deg, rgba(6, 24, 18, 0.82) 0%, rgba(6, 24, 18, 0.35) 60%, transparent 100%);
}
.photo-card .photo-caption b { display: block; font-size: 14px; }
.photo-card .photo-caption span { font-size: 12px; color: rgba(255, 255, 255, 0.82); }

.quote-card-img { width: 100%; display: block; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); margin-bottom: 14px; }

/* ---------- bold flat color-block CTA tiles (no gradient, no blur — mockup-style block CTAs) ---------- */
.block-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.block-cta {
  position: relative; overflow: hidden; border-radius: 20px; padding: 18px 14px 16px; min-height: 108px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left;
  color: #fff; border: none; box-shadow: 0 12px 24px rgba(4, 40, 28, 0.24); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.block-cta.tone-brand { background: var(--brand); }
.block-cta.tone-forest { background: var(--brand-dark); }
.block-cta .block-cta-icon {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.20); display: grid; place-items: center; color: #fff;
}
.block-cta b { font-size: 14.5px; font-weight: 900; letter-spacing: 0; line-height: 1.2; text-transform: uppercase; }
.block-cta span { font-size: 11.5px; color: rgba(255, 255, 255, 0.82); margin-top: 4px; font-weight: 600; text-transform: none; }

/* ---------- home quick-link tiles ---------- */
.home-link { display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.home-link .home-link-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--mint); color: var(--brand);
}
.home-link .home-link-icon svg { width: 19px; height: 19px; }
.home-link b { font-size: 13.5px; }

/* ---------- profile icon-grid rows (Profile screen) ---------- */
.profile-row-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.profile-row, .profile-row.danger {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border-bottom: 1px solid var(--line); background: #fff; border-radius: 0; box-shadow: none; color: inherit;
  width: 100%; text-align: left; font: inherit;
}
.profile-row:last-child { border-bottom: none; }
.profile-row:hover, .profile-row.danger:hover { filter: none; background: var(--chip); }
.profile-row:active, .profile-row.danger:active { transform: none; background: var(--chip); }
.profile-row .profile-row-icon {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: 0 0 auto;
}
.profile-row .profile-row-icon svg { width: 18px; height: 18px; }
.profile-row .profile-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-row .profile-row-label { font-weight: 700; font-size: 14px; color: var(--ink); }
.profile-row .profile-row-sub { font-size: 12px; color: var(--muted); }
.profile-row .profile-row-chevron { color: var(--muted); flex: 0 0 auto; display: grid; place-items: center; }
.profile-row.danger .profile-row-label { color: var(--danger); }
.profile-row-icon.tone-1 { background: var(--brand); }
.profile-row-icon.tone-2 { background: var(--leaf2); }
.profile-row-icon.tone-3 { background: var(--brand-dark); }
.profile-row-icon.tone-4 { background: #2bb8a0; }
.profile-row-icon.tone-5 { background: #146b45; }
.profile-row-icon.tone-6 { background: #0d5c46; }
.profile-row-icon.tone-danger { background: var(--danger); }
.profile-header-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-header-card b { font-size: 16px; }

/* ---------- empty states ---------- */
.empty-state { text-align: center; padding: 40px 16px 24px; }
.empty-state svg { width: 104px; height: 104px; display: block; margin: 0 auto 14px; }
.empty-state b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty-state p { font-size: 13px; max-width: 260px; margin: 0 auto; color: var(--muted); }

/* ---------- admin stat tiles ---------- */
.stat-tile { border-radius: var(--radius-lg); padding: 18px 16px; text-align: left; position: relative; overflow: hidden; }
.stat-tile .stat-tile-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--mint); color: var(--brand);
}
.stat-tile .stat-tile-icon svg { width: 18px; height: 18px; }
.stat-tile .n { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-tile .k { color: var(--muted); font-size: 12px; margin-top: 5px; font-weight: 700; }
.stat-tile.solid { background: var(--grad); color: #fff; box-shadow: 0 14px 30px rgba(11, 110, 79, 0.30); }
.stat-tile.solid .k { color: rgba(255, 255, 255, 0.82); }
.stat-tile.solid .stat-tile-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.stat-tile.dark { background: var(--grad-dark); color: #fff; box-shadow: 0 14px 30px rgba(6, 30, 22, 0.34); }
.stat-tile.dark .k { color: rgba(255, 255, 255, 0.78); }
.stat-tile.dark .stat-tile-icon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.stat-tile .joint-tex { top: -10px; right: -10px; width: 70px; height: 70px; color: #fff; opacity: 0.12; border-radius: 16px; }

/* ---------- scoreboard tiles: flat, hard-edged data-emphasis tiles (deliberate contrast to the soft glass cards) ---------- */
.scoreboard-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; margin: 4px 0 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10px, black calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, transparent, black 10px, black calc(100% - 10px), transparent);
}
.scoreboard-row .stat-tile { flex: 1 1 0; min-width: 88px; padding: 14px 12px; }
.scoreboard-row .stat-tile .n { font-size: 23px; }
.stat-tile.flat { border: none; box-shadow: 0 10px 22px rgba(4, 34, 24, 0.20); backdrop-filter: none; -webkit-backdrop-filter: none; }
.stat-tile.flat .n { font-weight: 900; letter-spacing: 0; }
.stat-tile.flat .k { color: rgba(255, 255, 255, 0.85); }
.stat-tile.flat .stat-tile-icon { background: rgba(255, 255, 255, 0.20); color: #fff; }
.stat-tile.flat.tone-1 { background: var(--brand); }
.stat-tile.flat.tone-2 { background: var(--brand-dark); }
.stat-tile.flat.tone-3 { background: var(--leaf2); }
.stat-tile.flat.tone-4 { background: var(--navy); }
.stat-tile.flat.tone-5 { background: #0d5c46; }
.stat-tile.flat.tone-6 { background: #2bb8a0; }

/* ---------- admin branch strip (reuse client branch-card look) ---------- */
body.admin .branch-card .link-row button { font-size: 12.5px; }

/* ---------- admin: capsule/glass consistency pass ---------- */
body.admin .topbar {
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}
body.admin #authView .card {
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.admin-login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 8px; text-align: center; }
.admin-login-brand .logo { width: 56px; height: 56px; border-radius: 18px; background: #fff; box-shadow: 0 12px 26px rgba(11, 110, 79, 0.25); overflow: hidden; }
.admin-login-brand .logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; display: block; }
.admin-login-brand .wordmark { height: 20px; width: auto; }

/* admin tab bar: capsule row on a soft glass rail */
#tabs.tabs {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px; gap: 4px;
}
#tabs.tabs .tab { border: none; box-shadow: none; }
#tabs.tabs .tab.active { box-shadow: 0 8px 18px rgba(20, 130, 100, 0.30); }

/* filter bars (status/date filters above admin tables) */
body.admin .row:has(#statusFilter, #dateFilter) {
  background: var(--glass-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 12px; gap: 10px;
}
body.admin .row:has(#statusFilter, #dateFilter) select,
body.admin .row:has(#statusFilter, #dateFilter) input { width: auto; flex: 1 1 160px; }
