
/* =============================================================================
   XNK Personal Training — design system (panel PT + portal klien, Index.html)
   Hitam-putih murni. Terang/gelap otomatis (ikut perangkat) + pilihan manual
   (data-theme="light" | "dark" di <html>). Landing TIDAK memakai file ini.
   ============================================================================= */

:root {
  --logo-mask: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACXCAYAAACSsFA4AAAReUlEQVR42u1dabBUxRU+PfMANcRdFJcggmgEBdy3WChQwQU0LmDELSYo0aDESFxwjQsGNbiiGEsxakRKEcVA3HApxSUmURDFuOCCRg2aICLw3pv58uN283rGmecs57sz973uqldXrXJu37P1+c45fY6RsOp2ATAiYkSkQUQeEZFeIpIVkZTia5pFpLOInGOMmQogbYzJBOqHJQAa7PM2cNdDADoASFmhDysI3xrhG2eFpAlAVvGvyf7uKwA6eRY3rCB8a4RvaJ7waa2M/b3PAWxt35UKlA9LAKTtcwcAy6ywZBSFLwug2f4N8N8ZVhC+FAADYH0Ai6zANCv7e+7oPcW3tmEF4TPe0TsnT1i0he+6IHxhFfP7/kASPmdJH3XCHkBHWPnCN4osfP8CsIEVwAA6wsoBHftZwWsmIN4MgK8A9AmgI6wc0GGf3QB86gmMJuJ11nRY8PvCygcdaQBr22AwE/GeHYQvrGKI914y4r0zCF9YxUDHhWTQ8QKAjtbSBsQbVo7wHUVMswHAxwC28H3NsILwOcTbD8AKYpptNYA9A+INKwfxWt9vEwDvERCvf5QfH/y+sAoh3jSAuWTEe2UQvrCK+X03kxHvTPe+pIAOY30E5mbBKvG2znWqnvcOoMEY0wxgjIhcL1EJvKZ1yohIWkReF5G9RWSF3Tc0LLf97eT7P+1x757lG+xlJRiFpV8C2DaJoKMBwFEisrHVJE1L6C7PLDDGzNO87AIgZYzJAthXRPqKSKOyJYSlxSfGmFnufeUiXmv5eorINPufU4o0hqVxWkSONsa87aythuUzxgBAZxH5qd2z9ikZyQeAYeQLLysB9NfUTg9R9rbhDOYaXq5Tb/eXAvB9AAvIoON0TdCRl6V5kEzbe91LR3jC0qT4t9r+7mIAm2gex14if2cAX9t3NSruvdEKzTcAdi5VgfIYOJMMOm7RRrze3ifYd6xSlomVPmASAB3s8wpyWuhpi87U0kIesUaS9u7idO8D6FKKAhVgIIuec73QjjY9jyfT8y177cAUM7ksjZ1C0FinQJfHoECtMjxGBr5nA9pG8URxWZo97WnCqktcBqB3zoniPgRAZwDzyT7LWF9wlH2WB8gKdGsxBfIYuBeZgSsA9NP2qe1zC5tDZtYlDi1IQ28TPQB8Yf8nxiayAH5McJxTAL4H4FWSAjUWUyCPdpvHwMAjCbRL26qZF8i0G9fq3j0tHmQJyNDiLID/AuhFAiXbAFhKVqAhfsYhBgY64TufCDr+RD497ihp796GfkX2qRYCWFezH4mnQANjVKCOMTHwHqLwnUvm9fOIes+UBpg8x34ymagPa+cuPaL+MgYFWt++6zzyu14GsBYJ8R5Grkv8CEDXsk4771hJAXiCRFznF0wkIuMbyAp0L4DDPWFhMPDfALZSdlfcSbEjgOXEusRVAHavCDB52YaNALxLrl87kRHNt9/wGDkk4gieJTCw0aYbGVmkjQC8TfBZfcB0bFV89TRlJ5ttyBAJvQ+J0BuSCM0QvHzFPImomI+TEe/lKnv3fIXDyb7CJwC2JB01fbyjhiEwDOGbSAQdbNfkAVXf3vOpxpOd7ZcAdFJGxo7oh5IUiMHAWURwdiqZh6/ZeKxet9W8bMPdZO25m6j555D2zgpPaZ8E7PDUUgA9KDWgHjJey1oqpv8wniiEd9ahEPqFpb1IaTZmgL7Z/uZAbb4V+5itbHiAmXI6nJhymkdSoGoYmJNhUQRiLkX5GtlonEYVvgLmfB+01MxpI+OMBQ07kazB5gCWkEJLlTLwDGJh6Qyy23RjLMJX4Dj7GTnG9q6NV7HKjlYRFKgSBjILS9llak9YKxtv+w8PGU8kf+CT2h/oMee4GvqD7vueAq+w9FiygXhH20BUauIfJpv4m4gW4ooaCKFj4GLwCkv3IFl4motUjZO7rg0fJMbJjclHao2BK0C4rGWfXREVATBB4k9i9ftK+OheiMqUmDB/EAkldiaixGIMPIqI8p8nG4Pz6kL4ChxnQ4jpOkqg0zuyepDiZIUYeAHRpZhKdofuqivhK0CAsWRQMt9arCQVsvr0+DMxzXZ2TKnS+mx46SHjKWQtnJGwXKlj4N9sJomR6x5GPH0AQrEICxm7kMLTJCF0x9gVxGPsRsW9x1FY2hvRGAZmudzeNUW8FdThdUF0oZuRbdApeCyuQFr1cnEUlm6AaAANA3RQCobjEEKnmf0RtbZgaeYqAHuQGLuRDbRWw1h2YalBNHqLedJMTJTwFTjOhpOj8UtQ7qWX0hWomjsTjoFXEVwF52tfT/a11S+N1UoILyKjs3lQHkeA6m6NuX09QgRLo8k0XYiou1cKSR7x4BFsGllbpxJBSTmFrI6Bb4B373l/JKxxQK2RcQrckVTuuPstUQhLuXjuM3A7UpqtO4D/IEGtU+oCGdtnNwCfEYkHKA/lQ+mtN/w9HEjYgyss/SdZic/w/cw2sxDvWNLeJOvTWveoOLp/3U92Y6a0KcvXynHGGszshEJ9MDNa758XR//DS8mg4zv7H7Y1IZxEJuij3vHJLGRtYjHQe98xZIV9H8otlOsdlDjCziYfKdcRQckEz/dbjBJb+FZgcXdD1FeZEczP2ESBal1iIkCJFcT1ASwiO9WnMLIQ9p9nWUb2I/mcm8VQWDpcW0mTBkp2QNQ3mJWuawYwQFsI7bOLVySbVhTwNKJ+es+RlfOiNol4KzjODiEXsn4OoDvrmNH0mzya3E52T6YlOs1GIPhZZFDyDwDrKGcmjKZAe4h3HJkWr9jEQAphknqsWj+9Xv2dmE4D2ERAt3aBeOvM73FC+Lt6E8IC/jDrYlcTgP3aFeKtEPl9SC5kPbpehDAvIvAW+btHtUvEW0Xsi3Wp+hsAu9baEviBcgBzyIWlk4LwVR79Z/hCHwDYtJa+kAc6riX7vrMD4q1MCC8jo8FnoTxAsYJvPJmcZltkj3cTQEdl2QZ2BchtcR9NnqsxwAuWM1yNZQB+GEBH5c45e/6bE8Iz4xJCD2xtbQPkzNrIQ4Lw6ViKbchVwABwEFsIvcLSdWxgnKlUZ/l+ZljVC+EBXmqNka77H4DtWRbD98EATCf7trcHxMtx2E/1fCYG494EsB4jReWFWy4mg45noHxDMKzckMXT5KPrL77AKPt9O3qxuSxBABs9Kx6sHyk2yCjOzBfCa7SZaK1qA4DryBbwIe1K8OADRs9drfAB3KbiTjB+rimEVijc36MkK97MUqB2G4qxz01t5oKRJ20tcf8jTVCCwg2FWHnfXwQhrN5ipO2x9SzJYnzXcfYpgB/4yqBo0fugpaVaqHypY7/vNpLPVE7xJmta+aHkfPenofavOgadmVfREfdaMxnd7QvJa6vrqp8DKCmTMQeRrEOlQnghARmzByjSFKitg47tbWaC2bG+knTdkQRkXErfmbpUoLYIOlI2E/FmTIi3HJ+KPVyGNUCRNpukrQmfO44eiRnxluvYvwfeeC3WAEXadKZqV70go7QxphnA1SJysIg0iUi9hQ5SIpIRke4iMt3+u9HwqYwxGQANxpgXRWSU/faM4t6NiEBE1hGRGYj6wGQDMs51xE+qUbilUp+KOWJ1AhkZP4X20AmrDILvC87wa4A79eh0AihxNHmQjIzVFSipiHcrRENcGKCDBWL8draHEITQDVBcQEbGp7dLIfSI3AnAyyQiO+G7C8DXhEJW93vLod+R1YGSngC+QDz9oNPt8ei9h3zMuMGAo8g+FaMjq6PRYC+/y6gE/xLAtu1GCD3Cjiel2ZxQvGgtrCtknUR6nxNqZkfWMWRavY6WmSCp9iB8R5CT8P5kx7R3pM0hW1zXkbUDgWaTyXt/qE2n6zwh6Gt9stgmOyLe/iujSem6FIAnyaDk920SlCB3AOC7ZAE4sRARPdTtd2Rl1OFlAOyvna6z9Ns4Bvqd0KaEME+DnyBr8MTWjkDvOBtKdAGyiO4wd/cFP0EnyGokZTZwmT7MTWQfpqTJjvh2R1aWY/8qoq4OjOnobB/6YwBbaCpQrYXvNDKzF6JlMGCqjH2xO7Ler+3Ye3s/P6YoQjLTdR6hBiG+yY7pMt2CODqyXkpExuw46l2J9Ac9h78HgKXg9nQZUgmRwJ/F4TPyGBIyXouYSXJ7PzdRQojcyY7zycQZWw1xPMd+d2IdXrP97d20kTE5l+4r+WGJEMK8ao4Z5OPhVg2iePsdmXe0azv2HwHoSkLGrGoid3ItB7Bj3SNjj5mXk9Nez0Cxs6m37ws8f5Xh2D8P5cZB4NdTur2/A2BD1Gun1QKWhBUieB+8wYD9bRyMUcblBGMyEZRcRVb8x9HS48bUk/DF4Uu57va7kHypONp/OEaeSgAl+XdqWK7PDdoKpMXArjGgyREkNBlX+w8/XTeQlK5bF8AbZPCnqkAaDOxg/RvmR1+s/dGe1fgjyWq0Fr9cCmAbZVfCGYPtbHyUNXEpA+CAmoMSj4F3kM3+dGJGoRbtPwql67QLWQ8k57vVFajSDx1HTgkxplyymVSOcj1AVK5fJy3fXe4HxjHnd2sS4t0OtW//4YTwsgS6FzQFKpWB7Lo6f9K55jRyg6j9B8tRr5SRI4kA6xmyf35ZLMgYuZXFi8iI95QYQhX10P4jjnRdFxs/ZfJrpLYVb42BSb5bcXUNQEepQfYPiem6XWwclVHImmEoUDEGTiIL31+dsCcoXaXp2D9nw1qMdN0IcpbqIwCbqSNj7wNGkVEV434tO2HPUEL1SUceDy8h81BXgbyN72cJxEqzfQWgT8JKlphCeBbRB76PfIrpKJDHwG4APiMw0K85G0YgeArcok1GCKfQtEttmqyN+IYlNmhs9hXyZs8mHjmssvVskX/WFOxlAHYgnQpuXCzTqFSuQB4Dp5HN9VSi8LEv7sxGy8RzVg3hW1CeeA7+wOxMVQrkMfBCMgPngVegyb66+IGH+Nh1eHMcEwl0OplkYBydFpWlQN7GhpMZuATA5qSYV19wL2+vBLCrfVdH+5xFPikmEWOj15IVaDZKadyE3MrgFeDevt+TVA+3MaJG4syo/zF+/tO+O446vFGkdJ2x8Vfm3ltXII+BmwBYTGbgcSRCpgDMjSnv2RBjgQNt/hsKN26KV4E8BqYRNbBmbmICEXTcTD4GZxSr/PD2cDDZdfkMyvPfPAXqjZYCk2xsCuQR7xYyA2cSa9/YTRznI+rbXLR4FC3NMH9DoqPby99teIxRIzk0VgXyXnwGmYELoNyFE/G1sf0CQM9SrA7i6ztzH1GZ4ygyXnsNLQHsb1+2yj6blP7cFceSGVhBQLUnoj7HLL8rC2BwqX4XCt+TWa1I0yZEVS0AMF67+gTfvmaxSnnvbur9ne6F+4CfnB+s7DjHOcpgTLk+K3JvCi4h03a0E3plQNfRUyDWusUgKvzcVkQaRXd0V1ZEGkTkZWPM/QDSxpiMBoGkZbTXTBE5VESa7bu0lvu9KcaY0QA6GGOaynXs7Qiu/iIywtJDm75GRFaKyEQRWW2MgdbpYozJIqpNHGPfI96z6lfYp+Y4su+2CMpHxJXk4OlcVDnOCglu9h3X3p3pZr4MGpbPCZ+1fCeIyFSC5ctINChwsYjsISJLRcQYY7JVKl8qCfQtdtpIWDmxqr2tU8+qS/waQF9t5z6sZAufc+q3RDQDhJmlOUI7UB5WsoXPobJOAF4iI97xQfjCKgY62P2Q7w7CF1Yx4TufnNpKdkf4sKjCF2ZihFUzxNvPq0tkpNlWA9grIN6wchCvV5fILiw9Pvh9YRVCvImsSwyr7fh9U8iI90H3vgA6wsoXvrFkxOsXlgbhCytH+IYQEa9rK9sjgI6wCiHeOBprDwzCF1YhxLse2stogbDqCvHGPVwlCF9Y3/L7riGDjsdKupUfVrv0+07yqpqzSn++8L2Neh6wF1Zt/D77HES+DPUlgN4BdNT3aohZ+Ez0QFcRmSwiy0X3sg7s74mInGyMWejK+AOr63P9H6b5VcwhP3CvAAAAAElFTkSuQmCC");

  /* Warna (terang) */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #ecebe9;
  --border: #e7e5e4;
  --border-strong: #cfcfcb;
  --fg: #0b0b0b;
  --fg-2: #3b3b39;
  --fg-muted: #676764;
  --ink: #0b0b0b;
  --ink-2: #1d1d1c;
  --ink-3: #2c2c2a;
  --on-ink: #ffffff;
  --on-ink-muted: #a7a7a4;
  --overlay: rgba(12, 12, 12, 0.42);
  /* Panduan klien baru: layar gelap di tema terang dan gelap */
  --guide-scrim: rgba(0, 0, 0, 0.85);
  --guide-ring: rgba(255, 255, 255, 0.92);
  --focus: #0b0b0b;
  /* Satu-satunya warna: merah kecil untuk bahaya (Habis, PR telat, perlu perhatian) */
  --danger: #c4261b;
  --danger-soft: #fdecea;
  --heat-0: #ececea;
  --heat-1: #c9c9c5;
  --heat-2: #8f8f8b;
  --heat-3: #4a4a47;
  --heat-4: #0b0b0b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 3px 10px -3px rgba(0, 0, 0, 0.07);
  --band: #0b0b0b;
  --band-card: #1a1a19;
  --on-band: #ffffff;
  --on-band-muted: #a7a7a4;
  --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, 0.18);
  --shadow-3: 0 30px 80px -24px rgba(0, 0, 0, 0.38);
  color-scheme: light;

  /* Bentuk & ritme */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 999px;
  --gap: 16px;
  --sidebar-w: 248px;
  --detail-w: 420px;
  --topbar-h: calc(2.5rem + 24px);
  --tabbar-h: calc(3rem + 20px);
  --page-pad: 16px;
  /* Zona aman iPhone (poni, home bar) dan tinggi keyboard. Di dalam iframe iOS
     melaporkan env() = 0, jadi halaman pembungkus mengirim nilainya (hostBridge). */
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --kb: 0px;
  --tabbar-space: calc(var(--tabbar-h) + 14px + var(--sa-b));

  /* Tipografi */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-2xs: .6875rem;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .875rem;
  --fs-lg: 1rem;
  --fs-xl: 1.125rem;
  --fs-2xl: 1.375rem;
  --fs-3xl: 1.75rem;
  --fs-4xl: 2.25rem;
  --fs-hero: 3.25rem;

  /* Gerak */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 420ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-2: #1a1a1a;
    --surface-3: #242424;
    --border: #272727;
    --border-strong: #3a3a3a;
    --fg: #f4f4f2;
    --fg-2: #cfcfcc;
    --fg-muted: #9b9b97;
    --ink: #f4f4f2;
    --ink-2: #e4e4e1;
    --ink-3: #d2d2ce;
    --on-ink: #0b0b0b;
    --on-ink-muted: #5c5c59;
    --overlay: rgba(0, 0, 0, 0.62);
    --focus: #f4f4f2;
    --danger: #ff6b5e;
    --danger-soft: #2a1412;
    --band: #161616;
    --band-card: #2a2a2a;
    --on-band: #ffffff;
    --on-band-muted: #a7a7a4;
    --heat-0: #242424;
    --heat-1: #4a4a47;
    --heat-2: #8a8a86;
    --heat-3: #c7c7c3;
    --heat-4: #f4f4f2;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --surface-3: #242424;
  --border: #272727;
  --border-strong: #3a3a3a;
  --fg: #f4f4f2;
  --fg-2: #cfcfcc;
  --fg-muted: #9b9b97;
  --ink: #f4f4f2;
  --ink-2: #e4e4e1;
  --ink-3: #d2d2ce;
  --on-ink: #0b0b0b;
  --on-ink-muted: #5c5c59;
  --overlay: rgba(0, 0, 0, 0.62);
  --focus: #f4f4f2;
  --danger: #ff6b5e;
  --danger-soft: #2a1412;
    --band: #161616;
    --band-card: #2a2a2a;
    --on-band: #ffffff;
    --on-band-muted: #a7a7a4;
  --heat-0: #242424;
  --heat-1: #4a4a47;
  --heat-2: #8a8a86;
  --heat-3: #c7c7c3;
  --heat-4: #f4f4f2;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

/* ── Dasar ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--fg-muted); }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--on-ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.logo-mark {
  display: inline-block;
  width: 28px;
  height: 27px;
  background: currentColor;
  -webkit-mask: var(--logo-mask) center / contain no-repeat;
  mask: var(--logo-mask) center / contain no-repeat;
}

/* ── Kerangka aplikasi ────────────────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overflow: clip; /* hidden still scrolls on focus/scrollIntoView and shifted the whole app sideways (S3) */
}
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 4px max(var(--page-pad), var(--sa-r)) calc(var(--tabbar-space) + 16px) max(var(--page-pad), var(--sa-l));
}
.page { max-width: 1240px; margin: 0 auto; width: 100%; }

/* Sidebar (desktop/tablet) */
.sidebar {
  display: none;
  flex-direction: column;
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  padding: 20px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand-name { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub { font-size: var(--fs-2xs); color: var(--fg-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--fg-muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
@media (hover: hover) { .nav-item:hover { background: var(--surface-2); color: var(--fg); } }
.nav-item:active { transform: scale(0.98); }
.nav-item.active { background: var(--ink); color: var(--on-ink); }
.nav-item .nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--fg);
  color: var(--bg);
  font-size: var(--fs-2xs);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item.active .nav-badge { background: var(--on-ink); color: var(--ink); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Topbar */
.topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--page-pad);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  position: relative;
  z-index: 20;
}
.topbar-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Gradasi tipis di atas bar tab (HP): konten memudar, tidak terpotong tajam */
.main-col::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-space) + 22px);
  background: linear-gradient(to bottom, transparent, var(--bg) 70%);
  pointer-events: none; z-index: 39;
}
@media (min-width: 768px) { .main-col::after { display: none; } }
html.kb-open .main-col::after { display: none; }

/* Bar bawah melayang (mobile) */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--sa-b));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  padding: 0 8px;
  border-radius: 24px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-3);
  z-index: 40;
  animation: tabbarIn var(--t-slow) var(--ease-out) both;
}
.tab {
  height: 100%;
  min-height: 56px;
  min-width: 44px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  color: var(--on-ink-muted);
  font-size: .625rem;
  font-weight: 700;
  position: relative;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tab svg.lucide { width: 22px; min-height: 22px; pointer-events: none; }
.tab span { pointer-events: none; }
.tab:active { transform: scale(0.92); }
.tab.active { color: var(--on-ink); }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: pop var(--t-base) var(--spring);
}
.tab .tab-dot { position: absolute; top: 9px; right: calc(50% - 16px); width: 8px; min-height: 8px; border-radius: 50%; background: var(--on-ink); box-shadow: 0 0 0 2px var(--ink); }
.tab-fab {
  justify-self: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--on-ink);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  transition: transform var(--t-base) var(--spring);
}
.tab-fab svg.lucide { width: 24px; min-height: 24px; stroke-width: 2.5; }
@media (hover: hover) { .tab-fab:hover { transform: rotate(90deg); } }
.tab-fab:active { transform: scale(0.9) rotate(90deg); }

/* Panel detail */
.detail {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--ease-out), visibility 0s linear var(--t-slow);
  display: flex;
  flex-direction: column;
}
.detail.open { transform: translateX(0); visibility: visible; transition: transform var(--t-slow) var(--ease-out), visibility 0s; }
.detail-head { flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: var(--topbar-h); padding: 0 12px; }
.detail-head .detail-title { font-weight: 800; font-size: var(--fs-lg); }
.detail-body { flex: 1; overflow-y: auto; padding: 4px 16px 40px; }
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 44;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
.detail-backdrop.open { opacity: 1; pointer-events: auto; }

/* Tablet */
@media (min-width: 768px) {
  :root { --page-pad: 28px; }
  .sidebar { display: flex; width: 84px; padding: 20px 12px; align-items: stretch; }
  .sidebar .brand { justify-content: center; padding: 6px 0 18px; }
  .sidebar .brand-text, .sidebar .nav-label { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 13px; }
  .sidebar .nav-item .nav-badge { position: absolute; top: 4px; right: 4px; margin: 0; min-width: 18px; height: 18px; }
  .tabbar { display: none; }
  .main { padding-bottom: 48px; }
  .topbar { min-height: 76px; }
  .topbar-brand { display: none; }
  .detail { left: auto; width: min(460px, 92vw); box-shadow: var(--shadow-3); border-left: 1px solid var(--border); background: var(--surface); }
}
/* Desktop: 3 kolom */
@media (min-width: 1200px) {
  .sidebar { width: var(--sidebar-w); padding: 20px 14px; }
  .sidebar .brand { justify-content: flex-start; padding: 6px 10px 18px; }
  .sidebar .brand-text, .sidebar .nav-label { display: initial; }
  .sidebar .nav-item { justify-content: flex-start; padding: 11px 12px; }
  .sidebar .nav-item .nav-badge { position: static; margin-left: auto; }
  .detail {
    position: relative;
    inset: auto;
    width: 0;
    height: 100%;
    transform: none;
    visibility: visible;
    box-shadow: none;
    border-left: 0;
    overflow: hidden;
    transition: width var(--t-slow) var(--ease-out);
    background: var(--surface);
    z-index: 1;
  }
  .detail.open { width: var(--detail-w); border-left: 1px solid var(--border); }
  .detail > * { width: var(--detail-w); }
  .detail.open .detail-body > * { animation: fadeUp var(--t-slow) var(--ease-out) both; }
  .detail-backdrop { display: none; }
  .only-mobile-detail { display: none !important; }
}
@media (max-width: 767px) { .only-desktop { display: none !important; } }
@media (min-width: 768px) { .only-mobile { display: none !important; } }

/* ── Tipografi halaman ───────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 20px; flex-wrap: wrap; }
.page-title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-sub { color: var(--fg-muted); font-size: var(--fs-md); margin-top: 4px; }
.eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.section-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
@media (min-width: 768px) { .page-title { font-size: var(--fs-4xl); } }

/* ── Tombol ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: var(--fs-md);
  line-height: 1.2;
  text-align: center;
  padding-block: 8px;
  border: 1.5px solid transparent;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
@media (hover: hover) { .btn-primary:hover:not(:disabled) { background: var(--ink-3); box-shadow: var(--shadow-2); } }
.btn-secondary { background: var(--surface-3); color: var(--fg); }
@media (hover: hover) { .btn-secondary:hover:not(:disabled) { background: var(--border-strong); } }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border-strong); }
@media (hover: hover) { .btn-outline:hover:not(:disabled) { border-color: var(--fg); } }
.btn-ghost { background: transparent; color: var(--fg-2); }
@media (hover: hover) { .btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--fg); } }
.btn-danger { background: transparent; color: var(--fg); border-color: var(--fg); }
@media (hover: hover) { .btn-danger:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); } }
.btn-on-ink { background: var(--on-ink); color: var(--ink); }
@media (hover: hover) { .btn-on-ink:hover:not(:disabled) { opacity: 0.9; } }
.btn-on-ink-ghost { background: color-mix(in srgb, var(--on-ink) 12%, transparent); color: var(--on-ink); }
@media (hover: hover) { .btn-on-ink-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--on-ink) 20%, transparent); } }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: var(--fs-lg); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  flex-shrink: 0;
}
@media (hover: hover) { .icon-btn:hover { border-color: var(--border-strong); } }
.icon-btn:active { transform: scale(0.92); }
.card-ink .icon-btn { color: var(--on-ink); background: color-mix(in srgb, var(--on-ink) 12%, transparent); border-color: color-mix(in srgb, var(--on-ink) 28%, transparent); }
@media (hover: hover) { .card-ink .icon-btn:hover { background: color-mix(in srgb, var(--on-ink) 20%, transparent); border-color: color-mix(in srgb, var(--on-ink) 45%, transparent); } }
.icon-btn.plain { width: 48px; height: 48px; border-radius: 16px; background: transparent; border-color: transparent; }
@media (hover: hover) { .icon-btn.plain:hover { background: var(--surface-2); } }
.icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--fg);
  color: var(--bg);
  font-size: .625rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(40%, -40%);
  box-shadow: 0 0 0 2px var(--bg);
  animation: pop var(--t-base) var(--spring);
}
.link-btn { font-weight: 700; font-size: var(--fs-sm); color: var(--fg); display: inline-flex; align-items: center; gap: 4px; }
@media (hover: hover) { .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* ── Kartu ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.card-flat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; }
.card-ink {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.card-ink .muted, .card-ink .eyebrow { color: var(--on-ink-muted); }
.card-ink::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--on-ink) 12%, transparent);
  box-shadow: 0 0 0 28px color-mix(in srgb, var(--on-ink) 4%, transparent), 0 0 0 56px color-mix(in srgb, var(--on-ink) 3%, transparent);
  pointer-events: none;
}
.card-ink > * { position: relative; }
.card.interactive, .interactive { cursor: pointer; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
@media (hover: hover) { .card.interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); } }
.card.interactive:active { transform: scale(0.99); }
.card.selected { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg), var(--shadow-2); }

/* ── Halaman coach untuk klien (premium) ─────────────────────────────────── */
.coach-hero { text-align: center; padding: 28px 20px 22px; }
.coach-hero .avatar { margin: 0 auto 14px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--on-ink) 14%, transparent); }
.coach-hero .profile-name { font-size: var(--fs-3xl); letter-spacing: -0.03em; }
.coach-hero .pill-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.coach-hero .btn-row { margin-top: 20px; }
.coach-hero .btn-inverse { background: var(--on-ink); color: var(--ink); }
@media (hover: hover) { .coach-hero .btn-inverse:hover:not(:disabled) { opacity: .92; } }
.coach-hero .btn-ghost-ink { background: transparent; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 40%, transparent); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: livePulse 2s var(--ease) infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.coach-kpis { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coach-kpis .kpi { min-height: 96px; padding: 14px 12px; align-items: center; text-align: center; }
.coach-kpis .kpi .kpi-value { font-size: var(--fs-2xl); }
.coach-slots { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coach-slots .slot { min-height: 44px; padding: 0 10px; width: 100%; font-size: var(--fs-sm); }
.coach-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; }
.coach-row + .coach-row { border-top: 1px solid var(--border); }
.coach-row .ico { width: 34px; height: 34px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quote-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0; padding-left: 0; padding-right: 0; scrollbar-width: none; }
.quote-row::-webkit-scrollbar { display: none; }
.quote-card { flex: 0 0 min(86%, 320px); scroll-snap-align: start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.quote-card .stars { letter-spacing: 2px; font-size: var(--fs-sm); }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── Halaman klien (panel) & beranda klien (portal): gaya dashboard ─────────── */
.client-hero .profile-name { font-size: var(--fs-2xl); letter-spacing: -0.03em; }
.client-hero .btn-inverse, .portal-hero .btn-inverse { background: var(--on-ink); color: var(--ink); }
.client-hero .btn-ghost-ink, .portal-hero .btn-ghost-ink { background: transparent; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 40%, transparent); }
.chips.cp-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; padding: 0; margin: 0; }
.chips.cp-tabs .chip { min-height: 56px; width: 100%; min-width: 0; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: var(--fs-2xs); line-height: 1.1; border-radius: 14px; }
.chips.cp-tabs .chip svg { width: 16px; height: 16px; }
.cp-pane.hide { display: none; }
.client-ring { width: 118px; height: 118px; }
.client-ring-row { gap: 18px; margin-top: 18px; }
.client-hero-actions { margin-top: 18px; }
.chips.cp-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.detail-body { padding-bottom: calc(var(--tabbar-space) + 26px); }
@media (max-width: 767px) {
  .client-hero { padding: 16px; }
  .client-ring { width: 88px; height: 88px; }
  .client-ring .num { font-size: var(--fs-xl) !important; }
  .client-ring .eyebrow { font-size: .5625rem; }
  .client-ring-row { gap: 14px; margin-top: 12px; }
  .client-hero-actions { margin-top: 12px; }
  .client-hero .profile-name { font-size: var(--fs-xl); }
  /* S9: hero lebih pendek di HP — cincin sisa sesi dan dua tombol satu baris; tab lebih rendah */
  .client-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 14px; }
  .client-hero > .client-hero-id { grid-column: 1 / -1; }
  .client-hero > .client-ring-row { margin-top: 12px; gap: 0; }
  .client-hero > .client-ring-row > .grow { display: none; }
  .client-hero .client-ring { width: 64px; height: 64px; }
  .client-hero .client-ring .num { font-size: var(--fs-lg) !important; }
  .client-hero > .client-hero-actions { margin-top: 12px; align-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .client-hero > .client-hero-actions .btn { width: 100%; min-width: 0; padding-inline: 8px; gap: 6px; white-space: nowrap; }
  .chips.cp-tabs .chip { min-height: 44px; flex-direction: row; gap: 6px; }
}
.portal-hero .avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-ink) 16%, transparent); }
.portal-kpis { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-kpis .kpi { min-height: 92px; padding: 12px 10px; align-items: center; text-align: center; }
.portal-kpis .kpi .kpi-value { font-size: var(--fs-2xl); }
.portal-actions { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-actions .btn { min-height: 52px; flex-direction: column; gap: 4px; font-size: var(--fs-xs); padding: 6px; }
.client-kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
@media (min-width: 768px) { .client-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.client-kpis .kpi { min-height: 88px; padding: 12px; text-align: left; cursor: pointer; }
.client-kpis .kpi.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
@media (max-width: 767.98px) {
  .client-kpis { gap: 8px; }
  .client-kpis .kpi { min-height: 0; padding: 10px 12px; }
  .client-kpis .kpi .kpi-icon { display: none; }
}

.coach-card { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.coach-card-top { position: relative; display: flex; justify-content: center; padding: 6px 0 2px; }
.coach-card-top .avatar { width: 104px; height: 104px; box-shadow: 0 0 0 4px var(--surface-2); }
.coach-card-badge { position: absolute; top: 0; right: 0; }
.my-coach-card .section-head svg.lucide:last-child { color: var(--fg-muted); }

/* ── Grid dashboard ──────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.cards-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .dash-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: span 12; }
  .cards-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .detail-open .cards-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── KPI ─────────────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 118px;
  box-shadow: var(--shadow-1);
}
.kpi .kpi-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.kpi .kpi-label { font-size: var(--fs-xs); font-weight: 600; color: var(--fg-muted); }
.kpi .kpi-value { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi .kpi-note { font-size: var(--fs-2xs); color: var(--fg-muted); font-weight: 600; }
.kpi.wide { grid-column: span 2; }
.kpi.ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.kpi.ink .kpi-label, .kpi.ink .kpi-note { color: var(--on-ink-muted); }
.kpi.ink .kpi-icon { background: color-mix(in srgb, var(--on-ink) 10%, transparent); border-color: transparent; }

/* ── Chip, pill, status ─────────────────────────────────────────────────── */
/* ── Mode latihan (Fase M): layar penuh, kartu gerakan, baris set, timer istirahat ── */
.wl { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); opacity: 0; transform: translateY(16px); transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease-out); }
.wl.open { opacity: 1; transform: none; }
html.wl-on, html.wl-on body { overflow: hidden; }
.wl-top { flex: none; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px; padding-top: calc(8px + var(--sa-t)); background: var(--surface); border-bottom: 1px solid var(--border); }
.wl-head { flex: 1; min-width: 0; }
.wl-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.wl-sub { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.wl-top .btn { min-height: 44px; }
.wl-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px calc(120px + var(--sa-b)); display: flex; flex-direction: column; gap: 10px; }
.wl-pad-x { padding: 8px 0; display: flex; flex-direction: column; gap: 12px; }
.drag-grip { flex: none; width: 32px; min-height: 44px; display: grid; place-items: center; color: var(--fg-muted); cursor: grab; touch-action: none; }
.drag-grip svg { width: 18px; height: 18px; }
.dragging { position: relative; z-index: 3; box-shadow: var(--shadow-2); transition: none !important; }
.wl-note { margin: 0; font-size: var(--fs-sm); color: var(--fg-2); display: flex; gap: 6px; align-items: flex-start; }
.wl-video { align-self: flex-start; min-height: 44px; }
/* Statistik + peta otot (Fase O) */
.wl-stats { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 72px; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.wl-stats:empty { display: none; }
.wl-st { display: flex; flex-direction: column; min-width: 0; }
.wl-st span { font-size: var(--fs-xs); color: var(--fg-muted); }
.wl-st b { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-st-dur { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wl-mm { width: 72px; height: 68px; }
.wl-mm .mm { fill: color-mix(in srgb, var(--fg) 16%, transparent); stroke: none; transition: fill var(--t-base) var(--ease); }
.wl-mm .mm.on { fill: var(--fg); stroke: var(--fg); }
.mm-fig .mmf-body { fill: color-mix(in srgb, var(--fg) 6%, transparent); stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 3; }
.mm-fig .mmf-base { fill: color-mix(in srgb, var(--fg) 10%, transparent); }
.mm-fig .mmf { fill: color-mix(in srgb, var(--fg) 16%, transparent); transition: fill var(--t-base) var(--ease); }
.mm-fig .mmf.half { fill: color-mix(in srgb, var(--fg) 45%, transparent); }
.mm-fig .mmf.on { fill: var(--fg); animation: mmf-pulse 2.4s ease-in-out infinite; }
@keyframes mmf-pulse { 50% { opacity: .78; } }
/* Kartu gerakan + tabel set ala Hevy (Fase O) */
.wl-list { display: flex; flex-direction: column; gap: 10px; }
.wl-ex { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 2px 10px 10px 2px; display: flex; flex-direction: column; gap: 6px; scroll-margin: 12px 0 120px; transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.wl-ex.cur { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.wl-ex.done:not(.cur) { background: var(--surface-2); }
.wl-ex.skipped { opacity: .6; }
.wl-ex-head { display: flex; align-items: center; gap: 0; min-height: 52px; }
.wl-ex-name { flex: 1; min-width: 0; min-height: 52px; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; background: none; border: 0; color: var(--fg); text-align: left; cursor: pointer; }
.wl-ex-name .truncate { min-width: 0; }
.wl-ex-name .pill { flex: none; }
.wl-thumb { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 1px solid var(--border); }
.wl-thumb.ph, .ex-th.ph { display: grid; place-items: center; background: var(--surface-3); color: var(--fg-muted); }
.wl-thumb.ph svg { width: 20px; height: 20px; }
/* Fase U (T-1611): animasi gerakan sendiri (figure/rig.min.json). Monokrom, hanya transform yang bergerak. */
.rig-th { display: block; overflow: hidden; background: var(--surface-3); }
.rig-th .rig { display: block; width: 100%; height: 100%; transform: scale(1.35); transform-origin: 55% 60%; }
.mm-fig.rig .mmf-body { stroke-width: 1.4; fill: color-mix(in srgb, var(--fg) 7%, var(--surface)); stroke: color-mix(in srgb, var(--fg) 38%, transparent); }
.mm-fig.rig .mmf { fill: transparent; }
.mm-fig.rig .mmf.half { fill: color-mix(in srgb, var(--fg) 42%, transparent); }
.mm-fig.rig .mmf.on { fill: var(--fg); animation: none; }
.rig g { transform-box: view-box; transform-origin: 0 0; }
.rig .rg-eq { fill: color-mix(in srgb, var(--fg) 20%, transparent); }
.rig .rg-eq.soft { fill: none; }
.rig .rg-eq-l { fill: none; stroke: color-mix(in srgb, var(--fg) 28%, transparent); stroke-width: 2.5; }
.rig .rg-cab { stroke: color-mix(in srgb, var(--fg) 40%, transparent); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.rig .rg-cab.thick { stroke-width: 5; }
.rig-big { display: grid; place-items: center; margin: 0 0 12px; border-radius: var(--r-lg, 16px); background: var(--surface-2); border: 1px solid var(--border); }
.rig-big .rig { width: min(100%, 280px); height: auto; aspect-ratio: 1; }
/* GIF pustaka (milik Gym visual, ditautkan): bingkai seragam, denyut halus saat memuat, GIF besar di lembar contoh gerakan. */
.ex-gif.ex-load, .ex-big img.ex-load { animation: exLoad 0.9s ease-in-out infinite alternate; }
@keyframes exLoad { from { opacity: .35; } to { opacity: .8; } }
.ex-big { overflow: hidden; background: var(--surface-3); }
.ex-big img { display: block; width: min(100%, 300px); height: auto; aspect-ratio: 1; object-fit: contain; border-radius: inherit; }
.ex-th-btn { flex: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.ex-th-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.ex-kv { margin: 0 0 12px; }
.ex-kv .label { display: block; margin-bottom: 2px; }
.ex-mm-wrap { display: grid; place-items: center; margin: 0 0 8px; }
.ex-mm-wrap .ex-mm { width: min(100%, 220px); height: auto; }
.ex-credit { text-align: center; }
@media (prefers-reduced-motion: reduce) { .ex-gif.ex-load, .ex-big img.ex-load { animation: none; } }
@media (prefers-reduced-motion: reduce) { .rig.anim g { animation: none !important; } }
.wl-ex-sub { margin: 0 0 0 10px; font-size: var(--fs-sm); color: var(--fg-muted); }
.wl-ex-sub b { color: var(--fg); }
.wl-ex-note { margin: 0 0 0 10px; display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-sm); color: var(--fg-2); }
.wl-ex-note svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.wl-rest-link { align-self: flex-start; min-height: 44px; margin-left: 4px; padding: 0 6px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--fg); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.wl-rest-link svg { width: 16px; height: 16px; }
.wl-plate { font-variant-numeric: tabular-nums; }
.wl-tbl { display: flex; flex-direction: column; margin-left: 8px; }
.wl-tr { display: grid; grid-template-columns: 40px minmax(0, 1fr) 68px 56px 48px; gap: 6px; align-items: center; min-height: 52px; padding: 4px; border-radius: 10px; }
.wl-tbl.c1 .wl-tr { grid-template-columns: 40px minmax(0, 1fr) 96px 48px; }
.wl-tbl.c3 .wl-tr { grid-template-columns: 34px minmax(0, 1fr) 60px 48px 44px 48px; }
.wl-tbl.k-waktu .wl-tr { grid-template-columns: 40px minmax(0, 1fr) 124px 48px; }
.wl-tbl.k-waktu.c2 .wl-tr { grid-template-columns: 36px minmax(0, 1fr) 118px 44px 48px; }
.wl-th { min-height: 28px; font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .04em; color: var(--fg-muted); text-align: center; }
.wl-th span:nth-child(2) { text-align: left; }
.wl-th svg { width: 14px; height: 14px; }
.wl-tr:nth-child(odd):not(.wl-th):not(.done) { background: var(--surface-2); }
.wl-tr.done { background: color-mix(in srgb, var(--fg) 12%, transparent); }
.wl-setno { min-height: 44px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-weight: 800; font-size: 1rem; cursor: pointer; }
.wl-setno.k { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.wl-tr.warm .wl-setno { font-style: italic; }
.wl-prev { min-height: 44px; min-width: 0; padding: 0 4px; border: 0; background: none; color: var(--fg-muted); font-size: var(--fs-sm); font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wl-prev:disabled { cursor: default; }
.wl-td { position: relative; display: flex; justify-content: center; min-width: 0; }
.wl-in { width: 100%; min-width: 0; min-height: 44px; padding: 0 4px; border: 1.5px solid transparent; border-radius: 10px; background: var(--surface-3); color: var(--fg); font: inherit; font-size: 1rem; font-weight: 800; text-align: center; }
.wl-in::placeholder { color: var(--fg-muted); font-weight: 700; opacity: .8; }
.wl-in:focus { outline: none; border-color: var(--fg); background: var(--surface); }
.wl-tr.done .wl-in { background: transparent; }
.wl-ck { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--fg-muted); display: grid; place-items: center; cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--spring); }
.wl-ck svg { width: 20px; height: 20px; stroke-width: 3; }
.wl-ck:active { transform: scale(.92); }
.wl-ck[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.wl-trophy { position: absolute; top: -6px; right: -2px; font-size: .8125rem; line-height: 1; pointer-events: none; }
.wl-dur { display: flex; gap: 4px; width: 100%; }
.wl-play { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.wl-play svg, .wl-watch svg { width: 16px; height: 16px; }
.wl-watch { width: 100%; min-height: 44px; border-radius: 10px; border: 0; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1rem; cursor: pointer; }
.wl-watch.run { animation: wlRun 1.2s var(--ease) infinite; }
@keyframes wlRun { 50% { opacity: .75; } }
.wl-addset { margin-left: 8px; width: calc(100% - 8px); min-height: 44px; }
.wl-start { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 0 8px; max-width: 560px; width: 100%; margin: 0 auto; }
.wl-start h3 { margin: 4px 0 0; font-size: var(--fs-xl, 22px); font-weight: 800; }
.wl-start p { margin: 0 0 14px; }
.wl-start-ic { color: var(--fg-muted); }
.wl-start-ic svg { width: 56px; height: 56px; stroke-width: 1.5; }
.wl-end { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.wl-foot-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.wl-foot-btns .btn { min-height: 48px; }
.wl-set-list { display: flex; flex-direction: column; }
.wl-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.wl-set-row:last-child { border-bottom: 0; }
.wl-set-row p { margin: 0; }
.wl-set-row .select { width: auto; max-width: 52%; min-height: 44px; font-size: 1rem; }
.wl-rest-chips { flex-wrap: wrap; }
.wl-rest-chips .chip { min-height: 44px; min-width: 72px; }
/* Kartu gerakan (lama, tetap dipakai) */
.wl-add { margin-top: 2px; }
.wl-menu-info { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.wl-menu-info p { margin: 0; }
.wl-empty { padding: 8px 0; }
.wl-hist { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.wl-hist-row { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.wl-hist-row .btn { min-height: 44px; flex: none; }
.wl-rest { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--sa-b)); max-width: 560px; margin: 0 auto; border-radius: 20px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); overflow: hidden; animation: fadeUp var(--t-base) var(--ease-out) both; }
.wl-rest-track { height: 6px; background: color-mix(in srgb, var(--on-ink) 18%, transparent); }
.wl-rest-fill { display: block; height: 100%; background: var(--on-ink); transform-origin: left center; transition: transform 250ms linear; }
.wl-rest-row { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; }
.wl-rest-lbl { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--on-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-rest-t { font-size: 1.5rem; font-weight: 800; min-width: 64px; text-align: right; margin-right: 4px; }
.wl-rest .btn { min-height: 44px; }
.wl-rest .btn-secondary { background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); border-color: transparent; }
.wl-rest .btn-primary { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.wl-menu-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; }
.wl-menu-btn > span { display: flex; flex-direction: column; min-width: 0; }
.wl-menu-btn small { color: var(--fg-muted); font-size: var(--fs-xs); }
.wl-menu-btn.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.wl-menu-btn.danger { color: var(--fg); border-style: dashed; }
.wl-menu-btn svg { width: 18px; height: 18px; flex: none; }
.wl-menu-rest { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: 12px; }
.wl-menu-rest > span { flex: 1; display: flex; align-items: center; gap: 12px; }
.wl-menu-rest svg { width: 18px; height: 18px; }
.wl-menu-rest .btn { min-height: 44px; min-width: 52px; }
.wl-faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wl-face { min-height: 64px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--fg); }
.wl-face span { font-size: 1.5rem; line-height: 1; }
.wl-face small { font-size: var(--fs-2xs); color: var(--fg-muted); text-align: center; line-height: 1.1; }
.wl-face.on { border-color: var(--fg); box-shadow: 0 0 0 1.5px var(--fg); background: var(--surface-2); }
.wl-sum-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.wl-up, .wl-down { flex: none; font-weight: 800; font-size: var(--fs-sm); }
.wl-down { color: var(--fg-muted); }
.wl-prs { margin: 0; font-weight: 700; }
/* Lembar cari gerakan */
#ex-search { height: min(92dvh, 820px); }
.exs-head { flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr) 88px; align-items: center; padding: 0 8px 8px; }
.exs-head .sheet-title { text-align: center; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exs-head .exs-hbtn { min-height: 44px; padding: 0 8px; font-size: 1rem; font-weight: 600; color: var(--fg); text-decoration: none; }
.exs-head .exs-hbtn:last-child { justify-self: end; font-weight: 800; }
.exs-head .exs-hbtn:first-child { justify-self: start; }
.exs-top { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0 20px 10px; border-bottom: 1px solid var(--border); }
.exs-top .input, .exs-top .select { font-size: 1rem; min-height: 44px; }
.exs-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exs-lbl { margin: 14px 0 4px; }
.ex-li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); }
.ex-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 8px 4px; background: none; border: 0; color: var(--fg); text-align: left; cursor: pointer; }
.ex-li.on .ex-pick { box-shadow: inset 4px 0 0 var(--fg); padding-left: 12px; }
.ex-th { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 1px solid var(--border); }
.ex-th.ph svg { width: 22px; height: 22px; }
.ex-pick .ex-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-pick .ex-t b { font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-pick .ex-t span { font-size: var(--fs-sm); color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-on { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.ex-on svg { width: 16px; height: 16px; stroke-width: 3; }
.ex-hbtn { flex: none; }
.ex-hist-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 4px 14px; border-bottom: 1px solid var(--border); }
.exs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.exs-credit { flex: none; margin: 0; padding: 6px 20px calc(10px + var(--sa-b)); }
#exs-foot { padding-bottom: 4px; }
/* Halaman Latihan (Fase O): rutinitas ala Hevy */
.rt-empty-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--fg); font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.rt-empty-btn svg { width: 24px; height: 24px; }
.rt-sec { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.rt-sec .section-title { flex: 1; margin: 0; }
.rt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rt-act { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--fg); font-weight: 700; font-size: .9375rem; cursor: pointer; text-align: left; }
.rt-act svg { flex: none; width: 22px; height: 22px; }
.rt-group { display: flex; flex-direction: column; gap: 10px; }
.rt-gbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--fg-muted); font-size: 1rem; font-weight: 600; cursor: pointer; }
.rt-gbtn svg { width: 18px; height: 18px; }
.rt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-lg, 18px); border: 1px solid var(--border); background: var(--surface); }
.rt-head { display: flex; align-items: flex-start; gap: 4px; }
.rt-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; border: 0; color: var(--fg); text-align: left; cursor: pointer; }
.rt-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rt-name b { font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.01em; min-width: 0; }
.rt-name .pill { flex: none; }
.rt-sub { color: var(--fg-muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rt-head .icon-btn { margin: -8px -8px 0 0; }
.rt-go { min-height: 48px; font-size: 1rem; }
.rt-chart { display: flex; flex-direction: column; gap: 8px; }
.rt-big { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.rt-big b { font-size: 1.375rem; font-weight: 800; }
.rt-big span { color: var(--fg-muted); font-weight: 700; }
.rt-nochart { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); margin: 0; }
.rt-nochart svg { width: 18px; height: 18px; flex: none; }
.rt-ex { display: flex; flex-direction: column; gap: 6px; }
.rt-ex p { margin: 0; }
.rt-ex-head { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.rt-ex-head b { font-size: 1.0625rem; font-weight: 800; }
.rt-rest { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); }
.rt-rest svg { width: 16px; height: 16px; }
.rt-tbl { display: flex; flex-direction: column; }
.rt-tr { display: grid; grid-template-columns: 56px 1fr; align-items: center; min-height: 40px; padding: 0 8px; border-radius: 8px; }
.rt-tbl.kg .rt-tr { grid-template-columns: 56px 1fr 1fr; }
.rt-tr:nth-child(odd):not(.rt-th) { background: var(--surface-2); }
.rt-th { min-height: 28px; font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .04em; color: var(--fg-muted); }
.rt-tr span:first-child { font-weight: 800; }
.rt-xlist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--fg-2); }
/* Bar latihan berjalan / belum terkirim */
.wl-resume { position: fixed; left: 14px; right: 14px; max-width: 460px; margin: 0 auto; bottom: calc(var(--tabbar-space) + 14px); z-index: 44; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 6px 6px 8px; border-radius: 18px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); animation: fadeUp var(--t-base) var(--ease-out) both; }
.wl-res-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.wl-res-ico svg { width: 20px; height: 20px; }
.wl-res-ico.live svg { animation: wlPulseIco 1.6s var(--ease) infinite; }
@keyframes wlPulseIco { 50% { transform: scale(1.12); } }
.wl-res-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-res-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-res-t small { color: var(--on-ink-muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-resume .btn { min-height: 44px; background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
html.wl-res-on .save-bar { bottom: calc(var(--tabbar-space) + 86px); }
html.wl-res-on #main-scroll-area .page { padding-bottom: 96px; }
/* Editor program berbentuk form */
.pf-day { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.pf-day-head { display: flex; align-items: center; gap: 2px; }
.pf-day-head .pf-hari { flex: 1; min-width: 0; font-weight: 800; font-size: 1rem; }
.pf-list { display: flex; flex-direction: column; gap: 6px; }
.pf-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: transform var(--t-fast) var(--ease); }
.pf-item.open { border-color: var(--fg); }
.pf-item.joined { margin-top: -2px; border-left: 3px solid var(--fg); }
.pf-row { display: flex; align-items: center; gap: 2px; min-height: 56px; padding-right: 2px; }
.pf-gif { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.pf-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 52px; justify-content: center; padding: 4px 6px; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }
.pf-sum b { font-weight: 700; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-sum > span { font-size: var(--fs-sm); color: var(--fg-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-row .icon-btn[disabled] { opacity: .3; }
.pf-edit { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.pf-edit .label { display: block; margin-bottom: 4px; }
.pf-edit .input { font-size: 1rem; }
.pf-edit .chip, .exs-chips .chip { min-height: 44px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-line { display: flex; align-items: center; gap: 6px; }
.pf-line .pf-kind { flex: 1; min-width: 0; font-size: 1rem; }
.rmd-acc { border-top: 1px solid var(--border); }
.rmd-acc > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--fg-2); list-style: none; }
.rmd-acc > summary::-webkit-details-marker { display: none; }
.rmd-acc > summary svg { width: 18px; height: 18px; transition: transform .2s; }
.rmd-acc[open] > summary svg { transform: rotate(180deg); }
.rmd-acc-hint { margin-left: auto; font-weight: 500; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.rmd-acc-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px; }
.pf-more { border-top: 1px solid var(--border); padding-top: 4px; }
.pf-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--fg-2); }
.pf-more-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; }
.pf-sk-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pf-sk-foot .pf-num { width: 110px; }
.pf-num { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--fg-muted); }
.pf-num .input { text-align: center; min-height: 44px; padding: 0 6px; }
.pf-skema { display: flex; flex-direction: column; gap: 6px; }
.pf-sk-head, .pf-sk-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 64px 44px; gap: 6px; align-items: center; }
.pf-sk-row.nokg, .pf-skema:has(.nokg) .pf-sk-head { grid-template-columns: 28px minmax(0, 1fr) 64px 44px; }
.pf-sk-head { font-size: var(--fs-xs); color: var(--fg-muted); text-align: center; }
.pf-sk-row .input { text-align: center; min-height: 44px; padding: 0 6px; }
.pf-sk-row .num { text-align: center; color: var(--fg-muted); font-weight: 700; }
.pf-w { display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; cursor: pointer; }
.pf-w input, .pf-check input { width: 20px; height: 20px; accent-color: var(--fg); }
.pf-check { gap: 10px; min-height: 44px; align-items: center; cursor: pointer; }
.pf-del { align-self: flex-start; min-height: 44px; }
@media (min-width: 768px) {
  .wl-body { padding: 16px 24px 120px; }
  .wl-top { padding-left: 20px; padding-right: 20px; }
  .wl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; align-items: start; max-width: 1180px; width: 100%; margin: 0 auto; }
  .wl-add, .wl-body > .wl-empty { max-width: 1180px; width: 100%; margin-left: auto; margin-right: auto; }
  .pf-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .exs-top { grid-template-columns: minmax(0, 1fr) 360px; padding: 0 24px 10px; }
  .rt-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .wl-stats { padding: 10px 24px; grid-template-columns: repeat(3, 160px) 72px; justify-content: start; }
  .wl-rest { left: auto; right: 24px; bottom: 24px; width: 460px; }
  .wl-resume { left: auto; right: 24px; bottom: 24px; width: 420px; }
  html.wl-res-on .save-bar { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { .wl, .wl-ck, .wl-rest-fill, .wl-mm .mm, .mm-fig .mmf { transition: none; } .mm-fig .mmf.on { animation: none; } .wl-watch.run, .wl-res-ico.live svg { animation: none; } }
.wk-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.wk-sum > div { display: flex; flex-direction: column; }
.wk-big { font-size: var(--fs-xl, 22px); font-weight: 800; letter-spacing: -0.02em; }
.wk-block { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.wk-bar { fill: var(--border-strong); }
.wk-bar.cur { fill: var(--fg); }
.wk-part { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wk-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.wk-fill { display: block; height: 100%; border-radius: 99px; background: var(--fg); }
.ex-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 4px 8px 4px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.ex-row:active { transform: scale(0.98); }
.ex-row img, .ex-row .ex-ph { width: 48px; height: 48px; flex: none; border-radius: 8px; background: var(--surface-2, var(--border)); object-fit: cover; }
.ex-row .ex-t { min-width: 0; flex: 1; }
.ex-row .ex-t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-row .ex-t span { font-size: var(--fs-xs, 12px); color: var(--ink-3, var(--ink)); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
@media (hover: hover) { .chip:hover { border-color: var(--border-strong); } }
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .chip-count { font-size: var(--fs-2xs); opacity: 0.7; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--fg);
  color: var(--fg);
  white-space: nowrap;
}
.pill svg.lucide { width: 12px; min-height: 12px; stroke-width: 2.5; }
.pill.solid { background: var(--fg); color: var(--bg); }
.pill.dashed { border-style: dashed; }
.pill.soft { border-color: var(--border-strong); color: var(--fg-muted); }
.card-ink .pill { border-color: var(--on-ink); color: var(--on-ink); }
.card-ink .pill.solid { background: var(--on-ink); color: var(--ink); }
/* Konten (admin) dan Info & Tips (klien): satu kolom di HP, grid kartu dari 768 px */
.cn-wrap { display: flex; flex-direction: column; gap: var(--gap); width: 100%; max-width: 1100px; }
.cn-tools { display: flex; flex-direction: column; gap: 10px; }
.cn-search { position: relative; }
.cn-search .input { width: 100%; padding-left: 40px; font-size: 1rem; }
.cn-search svg.lucide { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--fg-muted); pointer-events: none; }
.cn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cn-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.cn-stat b { display: block; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.cn-stat span { font-size: var(--fs-xs); color: var(--fg-muted); }
.cn-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.cn-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; text-align: left; font: inherit; color: inherit; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; }
button.cn-card { cursor: pointer; min-height: 44px; transition: border-color .15s, transform .15s; }
@media (hover: hover) { button.cn-card:hover { border-color: var(--border-strong); } }
button.cn-card:active { transform: scale(0.99); }
button.cn-card:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.cn-card.is-off { opacity: .6; }
.cn-card.is-ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.cn-card.is-ink .pill { border-color: var(--on-ink); color: var(--on-ink); }
.cn-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cn-head .cn-end { margin-left: auto; }
.cn-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: anywhere; }
.cn-body { color: var(--fg-muted); white-space: pre-line; overflow-wrap: anywhere; }
.cn-card.is-ink .cn-body { color: inherit; opacity: .85; }
.cn-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cn-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--fg-muted); }
.cn-meta svg.lucide { width: 14px; height: 14px; }
.cn-video { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border-radius: var(--r-sm, 10px); background: var(--surface-2); border: 1px solid var(--border); }
.cn-video svg.lucide { width: 36px; height: 36px; }
.cn-card .btn { align-self: flex-start; min-height: 44px; }
@media (min-width: 768px) {
  .cn-tools { flex-direction: row; align-items: center; justify-content: space-between; }
  .cn-search { flex: 0 1 320px; }
  .cn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cn-card { padding: 16px; }
}
@media (min-width: 1200px) { .cn-grid.cn-grid-admin { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex-shrink: 0; }
.dot.ring { background: transparent; box-shadow: inset 0 0 0 2px var(--fg); }
.dot.pulse { animation: pulse 1.8s var(--ease) infinite; }

/* ── Avatar ──────────────────────────────────────────────────────────────── */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: var(--fs-xs); }
.avatar.lg { width: 72px; height: 72px; font-size: var(--fs-2xl); }
.avatar.xl { width: 96px; height: 96px; font-size: var(--fs-3xl); }
.avatar.ink { background: var(--ink); color: var(--on-ink); }
.card-ink .avatar { background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); }

/* ── Daftar ──────────────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  text-align: left;
  width: 100%;
}
@media (hover: hover) { .list-item.interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); } }
.list-item.interactive:active { transform: scale(0.99); }
.list-item.selected { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.list-item.muted-item { background: var(--surface-2); border-style: dashed; }
.li-title { font-weight: 700; font-size: var(--fs-md); }
.li-sub { font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 500; }
.li-trail { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.group-label { display: flex; align-items: center; gap: 12px; margin: 18px 2px 8px; }
.group-label span { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }
.group-label::after { content: ''; height: 1px; flex: 1; background: var(--border); }

/* Meter sisa sesi */
.meter { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: var(--r-full); background: var(--fg); width: 0; transition: width 900ms var(--ease-out); }
.meter.hatch > i { background: repeating-linear-gradient(135deg, var(--fg) 0 4px, transparent 4px 7px); }
.card-ink .meter { background: color-mix(in srgb, var(--on-ink) 16%, transparent); }
.card-ink .meter > i { background: var(--on-ink); }

/* ── Form ────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-xs); font-weight: 700; color: var(--fg-2); }
.hint { font-size: var(--fs-2xs); color: var(--fg-muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 88px; resize: vertical; }
.select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--fg-muted); opacity: 0.8; }
@media (hover: hover) { .input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); } }
.input:focus, .select:focus, .textarea:focus { border-color: var(--fg); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fg) 8%, transparent); }
.input-affix { display: flex; align-items: stretch; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--surface-2); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.input-affix:focus-within { border-color: var(--fg); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fg) 8%, transparent); }
.input-affix .affix { display: flex; align-items: center; padding: 0 4px 0 14px; font-weight: 700; color: var(--fg-muted); }
.input-affix .input { border: 0; background: transparent; box-shadow: none; }
.input-search { position: relative; }
.input-search svg.lucide { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--fg-muted); pointer-events: none; }
.input-search .input { padding-left: 42px; background: var(--surface); }
.input-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
kbd { font-family: var(--font); font-size: .6875rem; font-weight: 700; color: var(--fg-muted); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }
.form-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.form-grid .two { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-error { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; padding: 10px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--fg); background: var(--surface); }
.form-error::before { content: '!'; width: 18px; height: 18px; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: .75rem; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toggle { position: relative; width: 46px; height: 28px; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; inset: -8px -4px; margin: 0; cursor: pointer; z-index: 1; }   /* area sentuh 54 × 44 px, tampilan tetap 46 × 28 */
.toggle span { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--surface-3); border: 1.5px solid var(--border-strong); transition: background var(--t-base) var(--ease); }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--t-base) var(--spring); }
.toggle input:checked + span { background: var(--ink); border-color: var(--ink); }
.toggle input:checked + span::after { transform: translateX(18px); background: var(--on-ink); }
.toggle input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.recurring-day-btn { min-height: 40px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 800; font-size: var(--fs-xs); transition: all var(--t-fast) var(--ease); }
.recurring-day-btn.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); transform: translateY(-1px); }

/* Pemilih paket (dropdown dengan pencarian) */
.pkg-wrap { position: relative; }
.pkg-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.pkg-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-3); overflow: hidden; animation: scaleIn var(--t-base) var(--ease-out); transform-origin: top; }
.pkg-panel .pkg-search { padding: 10px; border-bottom: 1px solid var(--border); }
.pkg-list { max-height: 240px; overflow-y: auto; }
.pkg-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; text-align: left; transition: background var(--t-fast) var(--ease); }
.pkg-option:focus-visible { background: var(--surface-2); }
@media (hover: hover) { .pkg-option:hover { background: var(--surface-2); } }

/* ── Segmented control ──────────────────────────────────────────────────── */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--surface-3); isolation: isolate; }
.seg button { position: relative; z-index: 1; min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: var(--fs-sm); color: var(--fg-muted); transition: color var(--t-base) var(--ease); }
.seg button.active { color: var(--fg); }
.seg .seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--t-base) var(--ease-out), width var(--t-base) var(--ease-out); }
.seg.ink { background: var(--ink); }
.seg.ink button { color: var(--on-ink-muted); }
.seg.ink button.active { color: var(--ink); }
.seg.ink .seg-thumb { background: var(--on-ink); }

/* ── Kalender bulan (kartu hitam) ───────────────────────────────────────── */
.month-cal { background: var(--ink); color: var(--on-ink); border-radius: var(--r-xl); padding: 18px 16px 16px; box-shadow: var(--shadow-2); user-select: none; }
.month-cal .mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-cal .mc-title { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.01em; }
.month-cal .mc-nav { width: 44px; height: 44px; border-radius: 12px; color: var(--on-ink); display: inline-flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
@media (hover: hover) { .month-cal .mc-nav:hover { background: color-mix(in srgb, var(--on-ink) 12%, transparent); } }
.month-cal .mc-nav:active { transform: scale(0.9); }
.month-cal .mc-today { font-size: var(--fs-2xs); font-weight: 800; padding: 6px 10px; border-radius: var(--r-full); border: 1px solid color-mix(in srgb, var(--on-ink) 30%, transparent); color: var(--on-ink); }
.month-cal .mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.month-cal .mc-dow { text-align: center; font-size: .625rem; font-weight: 800; letter-spacing: 0.08em; color: var(--on-ink-muted); padding: 4px 0 8px; }
.month-cal .mc-day {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--on-ink);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-base) var(--spring);
}
@media (hover: hover) { .month-cal .mc-day:hover { background: color-mix(in srgb, var(--on-ink) 10%, transparent); } }
.month-cal .mc-day.out { color: color-mix(in srgb, var(--on-ink) 28%, transparent); }
.month-cal .mc-day.past { color: color-mix(in srgb, var(--on-ink) 55%, transparent); }
.month-cal .mc-day.today::before { content: ''; position: absolute; bottom: 6px; width: 14px; height: 2px; border-radius: 2px; background: var(--on-ink); }
.month-cal .mc-day.selected { background: var(--on-ink); color: var(--ink); transform: scale(1.06); }
.month-cal .mc-day.selected::before { background: var(--ink); }
.month-cal .mc-day .mc-dots { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.month-cal .mc-day .mc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--on-ink); }
.month-cal .mc-day .mc-dots i.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--on-ink); }
.month-cal .mc-day.selected .mc-dots i { background: var(--ink); }
.month-cal .mc-day.selected .mc-dots i.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.month-cal .mc-legend { display: flex; gap: 14px; margin-top: 12px; font-size: var(--fs-2xs); color: var(--on-ink-muted); font-weight: 600; }
.month-cal .mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.month-cal .mc-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-ink); }
.month-cal .mc-legend i.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--on-ink); }
.mc-grid.anim-next { animation: slideInR var(--t-base) var(--ease-out); }
.mc-grid.anim-prev { animation: slideInL var(--t-base) var(--ease-out); }

/* Strip tanggal (HP) */
.date-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-snap-type: x mandatory; }
.date-strip::-webkit-scrollbar { display: none; }
.ds-day { scroll-snap-align: center; flex-shrink: 0; width: 52px; min-height: 72px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); font-weight: 800; transition: all var(--t-base) var(--ease-out); }
.ds-day small { font-size: .625rem; font-weight: 700; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ds-day.selected { background: var(--ink); color: var(--on-ink); border-color: var(--ink); transform: translateY(-2px); }
.ds-day.selected small { color: var(--on-ink-muted); }

/* ── Timeline sesi ──────────────────────────────────────────────────────── */
.timeline { position: relative; display: flex; flex-direction: column; gap: 10px; }
.tl-item { position: relative; display: grid; grid-template-columns: 54px 18px minmax(0, 1fr); align-items: stretch; gap: 8px; }
.tl-time { font-weight: 800; font-size: var(--fs-sm); padding-top: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.tl-time small { display: block; font-size: var(--fs-2xs); font-weight: 600; color: var(--fg-muted); }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 0; bottom: -10px; width: 2px; background: var(--border); }
.tl-item:last-child .tl-rail::before { bottom: 50%; }
.tl-rail .tl-node { position: relative; margin-top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--fg); }
.tl-item.now .tl-node, .tl-item.new .tl-node { background: var(--fg); }
.tl-item.done .tl-node { background: var(--fg-muted); box-shadow: 0 0 0 2px var(--fg-muted); }
.tl-card { border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
@media (hover: hover) { .tl-card.interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); } }
.tl-item.now .tl-card, .tl-card.ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tl-item.now .tl-card .li-sub, .tl-card.ink .li-sub { color: var(--on-ink-muted); }
.tl-item.now .tl-card .pill { border-color: var(--on-ink); color: var(--on-ink); }
.tl-item.done .tl-card { background: var(--surface-2); color: var(--fg-muted); }
.tl-item.hold .tl-card { border-style: dashed; border-width: 1.5px; border-color: var(--fg-muted); }
.tl-item.available .tl-card { border-style: dashed; background: transparent; }
.sess-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sess-actions .btn { min-height: 44px; padding: 0 12px; font-size: var(--fs-xs); border-radius: 10px; }
.sess-actions .btn-primary { order: -1; }
@media (min-width: 768px) { .sess-actions { justify-content: flex-end; } }
.tl-item.now .btn-secondary { background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); }
.tl-item.now .btn-outline { border-color: color-mix(in srgb, var(--on-ink) 40%, transparent); color: var(--on-ink); }

/* Slot waktu (portal) */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
/* Warna jam ditulis langsung (bukan warisan induk), jadi jam kosong tetap terbaca di terang dan gelap. */
.slot { min-height: 46px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--fg) 28%, transparent); background: var(--surface); color: var(--fg); font-weight: 800; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-fast) var(--ease); }
@media (hover: hover) { .slot:hover:not(:disabled) { border-style: solid; border-color: var(--fg); transform: translateY(-1px); } }
.slot:active:not(:disabled) { transform: scale(0.96); }
.slot.taken { border-style: dashed; border-color: var(--border-strong); background: transparent; color: color-mix(in srgb, var(--fg) 50%, transparent); cursor: not-allowed; text-decoration: line-through; }
.slot.mine { background: var(--ink); color: var(--on-ink); border: 1.5px solid var(--ink); cursor: default; }
.slot.past { border-color: transparent; background: transparent; color: color-mix(in srgb, var(--fg) 45%, transparent); cursor: not-allowed; }
.slot.swatch { min-height: 0; width: 22px; height: 16px; border-radius: 6px; flex: none; }
.slot.active { border-style: solid; border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
/* Bentrok booking di sheet (portal): notice + saran jam + tombol, semua ≥ 44 px dan boleh turun baris */
.conflict-panel { flex-direction: column; align-items: stretch; gap: 12px; }
.conflict-panel .slot { height: auto; min-height: 44px; padding: 6px 8px; line-height: 1.2; text-align: center; }
.conflict-panel .btn { white-space: normal; line-height: 1.25; text-align: center; padding-top: 10px; padding-bottom: 10px; }

/* ── Grafik (monokrom) ──────────────────────────────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; position: relative; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.bar { width: 100%; max-width: 24px; height: 0; border-radius: 6px 6px 2px 2px; background: var(--fg); transition: height 900ms var(--ease-out); position: relative; }
.bar.soft { background: var(--border-strong); }
.bar-val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: var(--fs-2xs); font-weight: 800; white-space: nowrap; opacity: 0; transition: opacity var(--t-base) var(--ease) 500ms; }
.bars.ready .bar-val { opacity: 1; }
.bar-lbl { font-size: var(--fs-2xs); font-weight: 700; color: var(--fg-muted); text-transform: uppercase; }
.bar-col.today .bar-lbl { color: var(--fg); }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar .hbar-track { grid-column: 1 / -1; height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.hbar .hbar-track i { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; background: var(--fg); transition: width 900ms var(--ease-out); }
.ring-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .ring-track { stroke: var(--surface-3); }
.ring-wrap .ring-fill { stroke: var(--fg); transition: stroke-dashoffset 1200ms var(--ease-out); }
.ring-wrap .ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card-ink .ring-wrap .ring-track { stroke: color-mix(in srgb, var(--on-ink) 16%, transparent); }
.card-ink .ring-wrap .ring-fill { stroke: var(--on-ink); }
.heat { display: grid; gap: 3px; }
.heat-cell { aspect-ratio: 1 / 1; border-radius: 4px; background: var(--heat-0); transition: transform var(--t-fast) var(--ease); }
@media (hover: hover) { .heat-cell:hover { transform: scale(1.25); position: relative; z-index: 1; } }
.heat-cell.l1 { background: var(--heat-1); }
.heat-cell.l2 { background: var(--heat-2); }
.heat-cell.l3 { background: var(--heat-3); }
.heat-cell.l4 { background: var(--heat-4); }
.heat-cell.none { background: transparent; }
.heat-lbl { font-size: .625rem; font-weight: 700; color: var(--fg-muted); display: flex; align-items: center; }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); color: var(--fg-muted); font-weight: 600; }
.heat-legend .heat-cell { width: 12px; height: 12px; }
.tooltip { position: fixed; z-index: 200; pointer-events: none; background: var(--ink); color: var(--on-ink); font-size: var(--fs-xs); font-weight: 700; padding: 6px 10px; border-radius: 10px; box-shadow: var(--shadow-2); opacity: 0; transform: translate(-50%, calc(-100% - 10px)) scale(0.96); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); white-space: nowrap; }
.tooltip.show { opacity: 1; transform: translate(-50%, calc(-100% - 10px)) scale(1); }
.collapse-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.collapse-head svg.lucide { transition: transform var(--t-base) var(--ease); }
.collapse.closed .collapse-head svg.lucide.chev { transform: rotate(-90deg); }
.collapse-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t-slow) var(--ease-out), opacity var(--t-base) var(--ease); }
.collapse-body > div { overflow: hidden; min-height: 0; }
.collapse.closed .collapse-body { grid-template-rows: 0fr; opacity: 0; }


.care-group > summary { list-style: none; cursor: pointer; }
.care-group > summary::-webkit-details-marker { display: none; }
.care-group[open] > summary svg.lucide { transform: rotate(180deg); }
.care-group[open] { padding-bottom: 6px; }

.kpi .fin-val { white-space: nowrap; font-size: clamp(1.25rem, 6.2vw, var(--fs-3xl)); }
/* ── Lapisan: sheet / modal, konfirmasi, toast ─────────────────────────── */
.layer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.layer.open { pointer-events: auto; }
.layer.hide { display: none; }
.layer .backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity var(--t-base) var(--ease); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.layer.open .backdrop { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-3);
  transform: translateY(100%);
  transition: transform var(--t-slow) var(--ease-out);
  padding-bottom: var(--sa-b);
}
.layer.open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-handle { flex-shrink: 0; height: 26px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.sheet-handle::before { content: ''; width: 40px; height: 5px; border-radius: 5px; background: var(--border-strong); }
.sheet-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 12px; }
.sheet-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
.sheet-foot { flex-shrink: 0; display: flex; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 768px) {
  .layer { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: var(--r-xl); max-height: calc(100dvh - 48px); transform: translateY(16px) scale(0.97); opacity: 0; transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease); }
  .sheet.sm { width: min(440px, 100%); }
  .layer.open .sheet { transform: none; opacity: 1; }
  .sheet-handle { height: 14px; }
  .sheet-handle::before { display: none; }
  .sheet-head { padding: 10px 24px 14px; }
  .sheet-body { padding: 4px 24px 24px; }
  .sheet-foot { padding: 14px 24px 22px; }
}
.confirm-layer { z-index: 90; }
.confirm-icon { width: 52px; height: 52px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); margin-bottom: 14px; }
.confirm-icon.danger { background: var(--ink); color: var(--on-ink); }
.confirm-icon svg.lucide { width: 24px; height: 24px; }

.action-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); font-weight: 800; font-size: var(--fs-sm); text-align: left; transition: transform var(--t-base) var(--spring), background var(--t-fast) var(--ease); }
.action-tile .at-icon { width: 40px; height: 40px; border-radius: 14px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; }
@media (hover: hover) { .action-tile:hover { background: var(--surface-3); } }
.action-tile:active { transform: scale(0.95); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-space) + 16px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-3);
  transform: translate(-50%, 20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-base) var(--spring), opacity var(--t-base) var(--ease);
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
@media (min-width: 768px) { .toast { bottom: 28px; left: auto; right: 28px; transform: translateY(20px) scale(0.96); } .toast.show { transform: none; } }

/* ── Loader, skeleton, kosong ───────────────────────────────────────────── */
/* Layar awal: selalu gelap (sama dengan layar muat di index.html) supaya
   peralihannya mulus; keluar dengan isi aplikasi naik pelan-pelan. */
.splash { --splash-bg: #0b0b0b; --splash-fg: #ffffff; --splash-muted: #a7a7a4; position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--splash-bg); color: var(--splash-fg); transition: opacity 520ms var(--ease), visibility 0s linear 520ms; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash .logo-mark { width: 64px; height: 61px; animation: breathe 1.8s var(--ease) infinite; transition: transform 520ms var(--ease-out); }
.splash.gone .logo-mark { transform: scale(1.12); animation: none; }
.splash .splash-bar { width: 120px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--splash-fg) 16%, transparent); overflow: hidden; }
.splash .splash-bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--splash-fg); animation: indeterminate 1.1s var(--ease) infinite; }
.splash.done .splash-bar::after { animation: none; width: 100%; transition: width 260ms var(--ease-out); }
.splash p { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--splash-muted); transition: opacity 260ms var(--ease); }
.splash.gone p { opacity: 0; }
.app.reveal { animation: appIn 560ms var(--ease-out) both; }
@keyframes appIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app.reveal { animation: none; } .splash.gone .logo-mark { transform: none; } }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: shimmer 1.3s infinite; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 30px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--fg-muted); }
.empty .empty-icon { width: 52px; height: 52px; border-radius: 18px; background: var(--surface-3); color: var(--fg); display: flex; align-items: center; justify-content: center; }
.empty .empty-icon svg.lucide { width: 24px; height: 24px; }
.empty b { color: var(--fg); font-size: var(--fs-md); }
.card-ink .empty { border-color: color-mix(in srgb, var(--on-ink) 25%, transparent); color: var(--on-ink-muted); }
.card-ink .empty b { color: var(--on-ink); }
.card-ink .empty .empty-icon { background: color-mix(in srgb, var(--on-ink) 12%, transparent); color: var(--on-ink); }

/* ── Login terbelah (PIN admin & nomor WA klien) ───────────────────────── */
.auth { position: fixed; inset: 0; z-index: 110; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); overflow-y: auto; }
.auth.embedded { position: static; min-height: calc(100dvh - var(--topbar-h) - 40px); z-index: auto; background: transparent; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 32px 24px 48px; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-form .auth-logo { width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 28px; box-shadow: var(--shadow-2); animation: popIn var(--t-slow) var(--spring) both; }
.auth-form .auth-logo .logo-mark { width: 28px; height: 27px; }
.auth-title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.auth-sub { color: var(--fg-muted); margin: 8px 0 28px; }
.pin-input { font-size: 28px !important; letter-spacing: 0.5em; text-align: center; font-weight: 800; padding-left: 0.5em !important; }
.auth-art { display: none; position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); border-radius: 32px; margin: 16px; }
.auth-art .art-grid { position: absolute; inset: 0; background-image: linear-gradient(color-mix(in srgb, var(--on-ink) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--on-ink) 6%, transparent) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%); }
.auth-art .art-orb { position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent); left: 50%; top: 45%; transform: translate(-50%, -50%); }
.auth-art .art-orb.o1 { width: 220px; height: 220px; animation: orbit 14s linear infinite; }
.auth-art .art-orb.o2 { width: 360px; height: 360px; animation: orbit 24s linear infinite reverse; border-style: dashed; }
.auth-art .art-orb.o3 { width: 520px; height: 520px; opacity: 0.6; }
.auth-art .art-orb::after { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--on-ink); box-shadow: 0 0 18px color-mix(in srgb, var(--on-ink) 60%, transparent); }
.auth-art .art-orb.o3::after { display: none; }
.auth-art .art-logo { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 96px; height: 92px; animation: breathe 3.6s var(--ease) infinite; }
.auth-art .art-caption { position: absolute; left: 0; right: 0; bottom: 40px; text-align: center; }
.auth-art .art-caption b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.01em; }
.auth-art .art-caption span { font-size: var(--fs-sm); color: var(--on-ink-muted); }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .auth-art { display: block; }
  .auth-form { padding: 48px 56px; }
}

/* ── Profil & detail ────────────────────────────────────────────────────── */
.profile-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-name { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kv > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; min-width: 0; }
.kv .k { font-size: var(--fs-2xs); color: var(--fg-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.kv .v { font-size: var(--fs-md); font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.pkg-card { display: flex; flex-direction: column; gap: 14px; }
.pkg-price { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; }
.benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--fg-2); }
.benefits li svg.lucide { width: 16px; height: 16px; margin-top: 1px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--fg); background: var(--surface); }
.notice svg.lucide { margin-top: 1px; }

/* ── FullCalendar (tab Minggu) ─────────────────────────────────────────── */
.fc { --fc-border-color: var(--border); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-today-bg-color: color-mix(in srgb, var(--fg) 4%, transparent); --fc-now-indicator-color: var(--fg); --fc-event-text-color: var(--on-ink); font-family: var(--font); font-size: var(--fs-sm); }
.fc .fc-toolbar-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.fc .fc-button { background: var(--surface-3); color: var(--fg); border: 0; border-radius: 10px; font-weight: 700; text-transform: capitalize; box-shadow: none !important; padding: 6px 12px; }
@media (hover: hover) { .fc .fc-button:hover { background: var(--border-strong); color: var(--fg); } }
.fc .fc-button:disabled { opacity: 0.45; background: var(--surface-3); color: var(--fg); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--ink); color: var(--on-ink); }
.fc .fc-col-header-cell-cushion, .fc .fc-timegrid-slot-label-cushion, .fc .fc-daygrid-day-number { color: var(--fg-muted); font-weight: 700; text-decoration: none; }
.fc .fc-timegrid-event, .fc .fc-daygrid-event { border-radius: 10px; border: 0; padding: 2px 4px; box-shadow: var(--shadow-1); }
.fc .fc-event.ev-confirmed { background: var(--ink); color: var(--on-ink); }
.fc .fc-event.ev-new { background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--fg); }
.fc .fc-event.ev-hold { background: var(--surface); color: var(--fg); border: 1.5px dashed var(--fg); }
.fc .fc-event.ev-done { background: var(--surface-3); color: var(--fg-muted); }
.fc .fc-event.ev-available { background: transparent; color: var(--fg); border: 1.5px dashed var(--border-strong); }
.fc .fc-event .fc-event-main { color: inherit; }
.fc .fc-scrollgrid { border-radius: var(--r-md); overflow: hidden; }
.week-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-1); }

/* Crop */
.crop-box { width: 100%; height: min(60vh, 420px); background: var(--surface-2); border-radius: var(--r-md); overflow: hidden; }
.crop-box img { max-width: 100%; }


/* ── Tata letak halaman ─────────────────────────────────────────────────── */
.sched-layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.portal-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) {
  .sched-layout { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 28px; }
  .sched-layout > :first-child { position: sticky; top: 8px; }
  .portal-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; }
}
.topbar-title { opacity: 0; transform: translateY(6px); transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.topbar.scrolled .topbar-title { opacity: 1; transform: none; }
.topbar.scrolled { box-shadow: 0 1px 0 var(--border); }
.only-desktop-detail { display: none; }
@media (min-width: 1200px) { .only-desktop-detail { display: inline-flex; } .only-mobile-detail { display: none !important; } }
.view.static, .view.static .stagger > *, .detail.static .detail-body > *, .detail.static .stagger > * { animation: none !important; }
.list-item[disabled] { cursor: default; }
button.list-item { font: inherit; color: inherit; }
button.avatar { border: 0; cursor: pointer; }

/* ── Animasi ─────────────────────────────────────────────────────────────── */
.view { animation: viewIn var(--t-slow) var(--ease-out) both; }
.stagger > * { animation: fadeUp var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pop-in { animation: popIn var(--t-slow) var(--spring) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes slideInR { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes tabbarIn { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tarik ke bawah untuk muat ulang (HP): isi halaman ikut jari, indikator
   menggambar lingkaran sesuai tarikan, berputar saat memuat, lalu centang. */
.main { overscroll-behavior-y: contain; }
.ptr { position: fixed; left: 50%; top: 0; z-index: 40; width: 36px; height: 36px; margin-left: -18px; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.ptr-dot { position: relative; width: 36px; height: 36px; border-radius: var(--r-full); background: var(--surface); color: var(--fg); border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: center; }
.ptr-ring { position: absolute; inset: -1px; width: 36px; height: 36px; transform: rotate(-90deg); }
.ptr-ring circle { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: var(--off, 88); transition: stroke-dasharray 260ms var(--ease-out), stroke-dashoffset 260ms var(--ease-out); }
.ptr-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity 160ms var(--ease), transform 240ms var(--ease-out); }
.ptr-ico svg { width: 16px; height: 16px; stroke-width: 2.2; }
.ptr-check { opacity: 0; transform: scale(0.5); }
.ptr.armed .ptr-arrow { transform: rotate(180deg); }
.ptr.spinning .ptr-arrow, .ptr.ok .ptr-arrow { opacity: 0; }
.ptr.spinning .ptr-ring { animation: spin 0.9s linear infinite; }
.ptr.spinning .ptr-ring circle { stroke-dasharray: 26 62; stroke-dashoffset: 0; }
.ptr.ok .ptr-ring circle { stroke-dasharray: 88; stroke-dashoffset: 0; }
.ptr.ok .ptr-check { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .ptr.spinning .ptr-ring { animation-duration: 2.4s; } .ptr-ico, .ptr-ring circle { transition: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fg) 40%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.94); opacity: 0.85; } }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.shake { animation: shake 360ms var(--ease); }
.auth-art .art-logo { animation-name: breatheCenter; }
@keyframes breatheCenter { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(0.94); } }

/* ── Pengaturan: halaman penuh (panel PT) ────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 8px; }
.settings-nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-align: left; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
@media (hover: hover) { .settings-nav-item:hover { border-color: var(--border-strong); } }
.settings-nav-item:active { transform: scale(0.99); }
.settings-nav-item.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.sn-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; flex-shrink: 0; }
.sn-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sn-txt b { font-weight: 700; font-size: var(--fs-md); }
.sn-txt small { color: var(--fg-muted); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-chev { color: var(--fg-muted); flex-shrink: 0; }
.settings-pane { min-width: 0; }
.settings-pane.has-bar { padding-bottom: 88px; }
.pane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 44px; }
.pane-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.settings-layout[data-open="0"] .settings-pane { display: none; }
.settings-layout[data-open="1"] .settings-nav { display: none; }
/* bar simpan: melayang di atas bar bawah HP dan area aman */
.save-bar { position: fixed; left: 14px; right: 14px; max-width: 420px; margin: 0 auto; bottom: calc(var(--tabbar-space) + 14px); min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--fg); box-shadow: var(--shadow-3); z-index: 45; animation: fadeUp var(--t-base) var(--ease-out) both; }
.save-bar .sb-msg { font-weight: 700; font-size: var(--fs-sm); }
.save-bar .sb-actions { display: flex; gap: 6px; }
.settings-pane .btn-sm, .save-bar .btn-sm { min-height: 44px; }
.settings-pane .seg button { height: 44px; }
.hours-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 16px minmax(0, 1fr); align-items: center; gap: 8px; }
.hours-row .err-msg { grid-column: 1 / -1; }
.hours-day { font-weight: 700; font-size: var(--fs-sm); }
.hours-sep { text-align: center; color: var(--fg-muted); }
.hours-row .input { text-align: center; padding-left: 8px; padding-right: 8px; }
.field .hint:empty { display: none; }
.err-msg { display: none; font-weight: 700; color: var(--fg); }
.has-error .err-msg { display: block; }
.err-msg::before { content: '\26A0\FE0E '; }
.err-msg:empty::before { content: none; }
.has-error .input, .has-error .textarea, .has-error .input-affix { border-color: var(--fg); border-width: 2px; }
.link-btn { min-height: 44px; padding: 0 12px; font-weight: 700; font-size: var(--fs-xs); color: var(--fg-muted); text-decoration: underline; text-underline-offset: 3px; flex-shrink: 0; }
@media (hover: hover) { .link-btn:hover { color: var(--fg); } }
.reset-link { display: none; }
.field:has(input:not(:placeholder-shown)) .reset-link { display: inline-flex; align-items: center; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; background: var(--fg-muted); vertical-align: baseline; }
.status-dot.ok { background: var(--fg); }
.status-dot.warn { background: transparent; border: 2px solid var(--fg); }
@media (min-width: 768px) {
  .settings-layout { grid-template-columns: 280px minmax(0, 640px); gap: 24px; }
  .settings-layout[data-open="0"] .settings-pane { display: block; }
  .settings-layout[data-open="1"] .settings-nav { display: flex; }
  .settings-pane.has-bar { padding-bottom: 0; }
  .save-bar { left: 112px; right: 28px; max-width: 560px; margin: 0 auto; bottom: 20px; animation: none; }
}
@media (min-width: 1200px) { .save-bar { left: calc(var(--sidebar-w) + 28px); } }

/* ── Paket & Harga ───────────────────────────────────────────────────────── */
.pkg-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pkg-row { align-items: center; gap: 8px; padding-right: 8px; }
.pkg-main { flex: 1; min-width: 0; min-height: 44px; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pkg-main[disabled] { cursor: default; }
.pkg-inactive .pkg-main { opacity: 0.65; }
.pkg-row .li-trail { gap: 4px; }
.settings-pane .chip { height: 44px; }
.chips { scroll-snap-type: x proximity; }
.chips .chip { scroll-snap-align: start; }
.pkg-benefit-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pkg-benefits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pkg-benefits .chip { height: 44px; padding-right: 0; }
.chip-x { width: 44px; min-height: 44px; display: inline-grid; place-items: center; color: var(--fg-muted); }
.pkg-flex { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-size: var(--fs-sm); }
.pkg-flex input { width: 24px; height: 24px; accent-color: var(--ink); }
.pkg-flex input:disabled + span { opacity: 0.5; }
@media (max-width: 767px) { .sheet.tall { height: calc(100dvh - 24px); } }

/* ── Pratinjau pesan WhatsApp ────────────────────────────────────────────── */
.wa-preview { background: var(--surface-3); border-radius: var(--r-md); padding: 14px; display: flex; }
.wa-bubble { max-width: 320px; width: 100%; background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 10px 12px; font-size: var(--fs-md); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow-1); }
.wa-bubble.wa-error { border: 2px solid var(--fg); font-weight: 700; }

/* ── Progres klien ───────────────────────────────────────────────────────── */
.pg-block { display: flex; flex-direction: column; gap: 4px; }
.pg-now { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; }
.pg-now small { font-size: var(--fs-sm); font-weight: 700; color: var(--fg-muted); }
.pg-chart { width: 100%; height: auto; display: block; margin-top: 4px; overflow: visible; }
.pg-line { stroke: var(--fg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pg-axis { stroke: var(--border-strong); stroke-width: 1; }
.pg-lbl { fill: var(--fg-muted); font-size: .625rem; font-weight: 600; }
.pg-dot { fill: var(--surface); stroke: var(--fg); stroke-width: 2.5; cursor: pointer; }
.pg-dot:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.pg-big { font-size: 1.375rem; font-weight: 800; min-height: 56px; }
#sheet-progress-photos .chip { height: 44px; }
.pg-photo { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--r-md); background: var(--surface-3); }

/* ── Streak, badge, perayaan ─────────────────────────────────────────────── */
.pg-streak { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pg-flame { width: 52px; height: 52px; border-radius: 18px; background: var(--surface-3); color: var(--fg-muted); display: grid; place-items: center; flex-shrink: 0; }
.pg-flame.on { background: var(--ink); color: var(--on-ink); }
.pg-flame svg.lucide { width: 26px; height: 26px; }
.pg-badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pg-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); text-align: center; min-height: 76px; }
.pg-badge-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.pg-badge-ic svg.lucide { width: 18px; height: 18px; }
.pg-badge-txt { font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; }
.pg-badge.locked { opacity: 0.38; border-style: dashed; }
.pg-badge.locked .pg-badge-ic { background: var(--surface-3); color: var(--fg-muted); }
.pg-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-more { border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 12px; }
.pg-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.pg-more[open] { padding-bottom: 12px; }
.pg-more[open] > summary { margin-bottom: 8px; }
.tm-card { position: sticky; top: 0; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.tm-card.done { border-color: var(--ink); }
.tm-time { font-size: 56px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tm-card .btn-row { justify-content: center; }
.tm-start { min-height: 44px; }
/* Tab Lainnya (portal klien): baris menu besar + titik "baru" */
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-row { display: flex; align-items: center; gap: 14px; min-height: 60px; width: 100%; padding: 10px 14px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg); cursor: pointer; }
.more-row:active { background: var(--surface-2); }
.more-row .more-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.more-row .more-txt { flex: 1; min-width: 0; }
.more-row .more-txt b { display: block; font-weight: 700; }
.new-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fg); display: inline-block; flex-shrink: 0; }
.tab .tab-dot-new { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; min-height: 9px; border-radius: 50%; background: var(--on-ink); border: 2px solid var(--ink); }
.teaser-row { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; padding: 8px 4px; background: transparent; border: 0; text-align: left; color: var(--fg); cursor: pointer; }
.challenge-bar { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; }
.challenge-bar > div { height: 100%; background: var(--ink); border-radius: 99px; transition: width .4s; }
.chip-lg { min-height: 44px; }
.skel-wrap { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.skel { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 10px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--surface-2), transparent); animation: skelMove 1.2s ease-in-out infinite; }
.skel-line { height: 14px; }
.skel-block { height: 96px; border-radius: 14px; }
@keyframes skelMove { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.stars { display: flex; gap: 2px; }
.star { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--fg-muted); border-radius: 50%; cursor: pointer; }
.star svg { width: 28px; height: 28px; }
.star.on { color: var(--fg); }
.star.on svg { fill: currentColor; }
.pg-trophy { width: 72px; height: 72px; border-radius: 24px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; animation: popIn var(--t-slow) var(--spring) both; }
.pg-trophy svg.lucide { width: 36px; height: 36px; }
.pg-badge-list { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pg-badge-list li { padding: 8px 16px; border-radius: var(--r-full); background: var(--surface-3); font-weight: 800; }
#sheet-badge { overflow: hidden; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.confetti i { position: absolute; top: -12px; left: calc(var(--n) * 6.2%); width: 8px; height: 14px; border-radius: 2px; background: var(--fg); opacity: 0; animation: confettiFall 1.9s var(--ease-out) both; animation-delay: calc(var(--n) * 55ms); }
.confetti i:nth-child(3n) { background: var(--fg-muted); width: 10px; height: 10px; border-radius: 50%; }
.confetti i:nth-child(3n+1) { background: var(--border-strong); }
.confetti i:nth-child(1) { --n: 0; } .confetti i:nth-child(2) { --n: 1; } .confetti i:nth-child(3) { --n: 2; } .confetti i:nth-child(4) { --n: 3; }
.confetti i:nth-child(5) { --n: 4; } .confetti i:nth-child(6) { --n: 5; } .confetti i:nth-child(7) { --n: 6; } .confetti i:nth-child(8) { --n: 7; }
.confetti i:nth-child(9) { --n: 8; } .confetti i:nth-child(10) { --n: 9; } .confetti i:nth-child(11) { --n: 10; } .confetti i:nth-child(12) { --n: 11; }
.confetti i:nth-child(13) { --n: 12; } .confetti i:nth-child(14) { --n: 13; } .confetti i:nth-child(15) { --n: 14; } .confetti i:nth-child(16) { --n: 15; }
@keyframes confettiFall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(340px) rotate(420deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .pg-trophy { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
/* ── PR (Task) di profil klien (panel PT) ─────────────────────────────────── */
.task-item { align-items: flex-start; }
.task-item.done .li-title { text-decoration: line-through; color: var(--fg-muted); }
.task-item.late { border-color: var(--fg); }
.task-check { flex-shrink: 0; width: 28px; height: 28px; margin-top: 2px; border-radius: 8px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--on-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.task-check:active { transform: scale(0.9); }
.task-check.on { background: var(--ink); border-color: var(--ink); }
.task-check svg { width: 16px; height: 16px; }
.task-check[disabled] { opacity: 0.5; cursor: default; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.task-note { margin-top: 6px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-xs); color: var(--fg-2); overflow-wrap: anywhere; }
.task-acts { display: flex; gap: 2px; flex-shrink: 0; margin: -4px -6px -4px 0; }
.task-acts .icon-btn { width: 44px; height: 44px; border-radius: 10px; }
/* Keuangan (Fase H): sasaran sentuh 44 px di HP */
@media (max-width: 767px) {
  #view-finance .chip, #view-finance .btn-sm, .sheet[id^="sheet-fin"] .chip, #settings-body .chip { min-height: 44px; height: auto; }
  #settings-body .chip-x { min-width: 44px; min-height: 44px; }
}
/* ── Sambutan klien baru (Fase X): lapisan layar penuh; isi di 05-portal-x ─── */
.guide-layer { position: fixed; inset: 0; z-index: 100; }

/* ── Klien di PC (2026-10): satu DOM, ditata ulang oleh CSS ───────────────────
   HP (< 768 px) sama persis seperti sebelumnya. >= 768: daftar jadi grid kartu.
   >= 1200 di halaman Klien dengan panel terbuka (#app.detail-wide): panel lebar, daftar jadi nama ringkas,
   isi profil dua kolom. */
.client-card .cc-meter { margin-top: 8px; max-width: 220px; }
.cc-meta { display: none; }
.cp-col, .prg-days { display: contents; }
.gym-tools { display: flex; gap: 8px; align-items: center; }
.gym-tools .input { flex: 1; min-width: 0; }
.gym-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); }
.gym-row:first-child { border-top: 0; }
.gym-row .list-item { gap: 10px; }
.pg-wk { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pg-wk > span { display: block; height: 100%; background: var(--fg); border-radius: 3px; }
.pg-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pg-steps span { height: 4px; border-radius: 2px; background: var(--surface-3); }
.pg-steps span.on { background: var(--fg); }
.pg-foot { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 calc(10px + var(--sa-b, 0px)); }
.prg-card .prg-day { padding-top: 10px; border-top: 1px solid var(--border); }
.prg-card .prg-day:first-child { border-top: 0; padding-top: 0; }
.prg-ex { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.prg-ex-n { display: flex; flex-direction: column; min-width: 0; }
.prg-ex-n b { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.prg-th { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 1px solid var(--border); overflow: hidden; }
.prg-th.ph { display: grid; place-items: center; color: var(--fg-muted); }
.prg-th.ph svg { width: 16px; height: 16px; }
.cc-line { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--fg-muted); }
.cc-line svg { width: 14px; height: 14px; flex-shrink: 0; }
.cc-line.cc-next { color: var(--fg); font-weight: 700; }
.cc-renew { align-self: flex-start; }

@media (min-width: 768px) {
  /* Panel detail (tablet & PC): 5 tab satu baris, latar tab = latar panel, tanpa ruang tab bar di bawah */
  .chips.cp-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--surface); }
  .chips.cp-tabs .chip { padding: 6px 0; }
  .detail-body { padding-bottom: 40px; }

  /* Daftar klien → grid kartu */
  #client-list > .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: stretch; }
  #client-list > .list > .group-label { grid-column: 1 / -1; margin: 14px 2px 0; }
  #client-list > .list > .group-label:first-child { margin-top: 2px; }
  #client-list .client-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas: "av title" "av sub" "pills pills" "trail trail" "meter meter" "extra extra" "meta meta";
    column-gap: 12px; row-gap: 0;
    align-items: center; align-content: start;
    padding: 16px; border-radius: var(--r-lg);
  }
  #client-list .client-card > .grow { display: contents; }
  #client-list .client-card > .avatar { grid-area: av; }
  #client-list .client-card .li-title { grid-area: title; min-width: 0; align-self: end; }
  #client-list .client-card .grow > .li-sub { grid-area: sub; min-width: 0; align-self: start; margin-top: 2px; }
  #client-list .client-card .cc-pills { grid-area: pills; margin-top: 10px !important; }
  #client-list .client-card > .li-trail { grid-area: trail; margin: 14px 0 0; justify-content: space-between; min-width: 0; }
  #client-list .client-card .cc-count { display: flex; align-items: baseline; gap: 6px; }
  #client-list .client-card .cc-meter { grid-area: meter; max-width: none; margin-top: 8px; }
  #client-list .client-card .cc-extra { grid-area: extra; }
  .cc-next-m { display: none; }
  #client-list > .list.cl-view-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #client-list .cl-view-list .client-card .cc-meta { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
  #client-list .client-card .cc-meta { grid-area: meta; display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); min-width: 0; }
  /* translate (bukan transform): animasi masuk .stagger menahan transform */
  @media (hover: hover) { #client-list .client-card.interactive:hover { translate: 0 -2px; box-shadow: var(--shadow-2); } }
  #client-list .client-card.muted-item { grid-template-areas: "av title" "av sub" "trail trail"; }
  #client-list .client-card.muted-item > .li-trail { justify-content: flex-start; }
}

@media (min-width: 1200px) {
  .detail-head { min-height: 76px; }   /* sejajar dengan topbar */

  #app.detail-wide { --detail-w: clamp(420px, min((100vw - var(--sidebar-w)) * 0.62, 100vw - var(--sidebar-w) - 420px), 1080px); }

  /* Daftar → nama ringkas (foto, nama, sisa sesi) */
  #app.detail-wide #view-clients .client-kpis, #app.detail-wide #view-clients .client-top { display: none; }
  #app.detail-wide #client-list > .list { display: flex; flex-direction: column; gap: 6px; }
  #app.detail-wide #client-list > .list > .group-label { margin: 12px 2px 2px; }
  #app.detail-wide #client-list .client-card { display: flex; gap: 10px; padding: 8px 12px; min-height: 52px; border-radius: var(--r-md); }
  @media (hover: hover) { #app.detail-wide #client-list .client-card.interactive:hover { translate: none; } }
  #app.detail-wide #client-list .client-card > .grow { display: block; }
  #app.detail-wide #client-list .client-card > .li-trail { margin: 0 0 0 auto; }
  #app.detail-wide #client-list .client-card > .avatar { width: 36px; height: 36px; font-size: var(--fs-xs); }
  #app.detail-wide #client-list .client-card .grow > :not(.li-title),
  #app.detail-wide #client-list .client-card .cc-state,
  #app.detail-wide #client-list .client-card .cc-count > .li-sub { display: none; }
  #app.detail-wide #client-list .client-card.selected { background: var(--surface-2); }

  /* Panel lebar. Tata letak dua kolom mengikuti lebar panel yang sebenarnya (container query), jadi layar
     1200–1365 px yang panelnya lebih sempit tetap satu kolom yang rapi. */
  #app.detail-wide .detail-body { padding-left: 28px; padding-right: 28px; container-type: inline-size; }
  #app.detail-wide .detail:not([data-kind="client"]) .detail-body > * { max-width: 640px; margin-left: auto; margin-right: auto; }
  #app.detail-wide .detail-body .btn-row .btn { flex: 0 0 auto; }
  #app.detail-wide .detail-body .pg-chart { max-width: 420px; }
  #app.detail-wide .prg-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; margin: 6px 0; }
  @container (min-width: 540px) {
    #app.detail-wide .chips.cp-tabs { gap: 8px; padding: 10px 0; }
    #app.detail-wide .chips.cp-tabs .chip { flex-direction: row; min-height: 44px; gap: 6px; padding: 0 6px; font-size: var(--fs-sm); border-radius: var(--r-full); }
    #app.detail-wide .pg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px !important; align-items: start; }
    #app.detail-wide .pg-grid > .pg-more { grid-column: 1 / -1; }
    #app.detail-wide .pg-grid > .pg-more > .stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 28px !important; }
  }
  @container (min-width: 600px) {
    #app.detail-wide #profile-care-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px !important; align-items: start; }
    #app.detail-wide #profile-care-wrap > .cp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
    #app.detail-wide #profile-nut-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 20px !important; align-items: start; }
    #app.detail-wide #profile-nut-wrap > .cp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  }
  @container (min-width: 620px) {
    #app.detail-wide .client-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id ring" "acts ring"; column-gap: 32px; row-gap: 18px; align-items: center; }
    #app.detail-wide .client-hero > .client-hero-id { grid-area: id; }
    #app.detail-wide .client-hero > .client-ring-row { grid-area: ring; margin-top: 0; }
    #app.detail-wide .client-hero > .client-hero-actions { grid-area: acts; margin-top: 0; }
    #app.detail-wide .client-hero .ring-wrap.client-ring { width: 112px; height: 112px; }
    #app.detail-wide .cp-pane[data-cppane="ringkasan"] { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 28px !important; align-items: start; }
    #app.detail-wide .cp-pane[data-cppane="ringkasan"] > .cp-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  }
  @container (min-width: 760px) {
    #app.detail-wide .pg-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
/* Area ketuk: tombol kecil punya zona sentuh tak terlihat sampai 44 px */
.icon-btn::before, .task-check::before, .star::before, .mc-nav::before { content: ''; position: absolute; inset: -6px; }
.task-check, .star, .mc-nav { position: relative; }
button, .btn, .chip { touch-action: manipulation; }
/* Ikon tidak boleh jadi target sentuh: lucide mengganti <i> dengan <svg>, dan target yang hilang saat jari menekan membatalkan klik */
button svg, button i, button img, [role="button"] svg, [role="button"] i, a.btn svg, label.btn svg { pointer-events: none; }
/* Sentuh (HP): umpan balik tekan tanpa mengecilkan tombol, supaya jari yang lepas di tepi tetap terhitung klik */
@media (hover: none), (pointer: coarse) {
  .nav-item:active, .tab:active, .btn:active:not(:disabled), .icon-btn:active, .card.interactive:active, .chip:active,
  .list-item.interactive:active, .month-cal .mc-nav:active, .slot:active:not(:disabled), .action-tile:active,
  .settings-nav-item:active, .task-check:active { transform: none; opacity: 0.7; }
  .tab-fab:hover, .tab-fab:active { transform: none; }
  .tab-fab:active { opacity: 0.8; }
  .btn, .icon-btn, .tab, .tab-fab, .chip, .nav-item { transition-duration: 0.01s; }
}
/* ── iPhone / Safari (Fase N) ───────────────────────────────────────────────
   --sa-* dan --kb datang dari halaman pembungkus (hostBridge di App.html);
   html.ios / .standalone / .kb-open dipasang dari pesan yang sama. Tanpa
   pembungkus (Android, desktop) semua bernilai 0 dan tampilan tetap seperti dulu. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
.topbar { height: calc(var(--topbar-h) + var(--sa-t)); padding-top: var(--sa-t); padding-left: max(var(--page-pad), var(--sa-l)); padding-right: max(var(--page-pad), var(--sa-r)); }
.detail-head { height: calc(var(--topbar-h) + var(--sa-t)); padding-top: var(--sa-t); }
.auth { padding-top: var(--sa-t); }
@media (min-width: 768px) { .topbar { height: calc(76px + var(--sa-t)); } }
@media (min-width: 1200px) { .detail-head { height: calc(76px + var(--sa-t)); } }

/* Keyboard: sheet naik di atas keyboard; bar bawah disembunyikan selama mengetik */
.layer { padding-bottom: var(--kb); transition: padding-bottom var(--t-base) var(--ease-out); }
.sheet { max-height: calc(100dvh - 24px - var(--sa-t) - var(--kb)); }
@media (max-width: 767px) { .sheet.tall { height: calc(100dvh - 24px - var(--sa-t) - var(--kb)); } }
@media (min-width: 768px) { .layer { padding-bottom: calc(24px + var(--kb)); } .sheet { max-height: calc(100dvh - 48px - var(--kb)); } }
.wl { padding-bottom: var(--kb); }
@media (max-width: 767px) {
  html.kb-open .tabbar, html.kb-open .save-bar, html.kb-open .wl-resume, html.kb-open .a2hs { display: none; }
}

/* Tab bar menempel di bawah (iPhone): satu bar, bukan bar melayang di atas home bar */
@media (max-width: 767px) {
  html.ios { --tabbar-space: calc(var(--tabbar-h) + var(--sa-b)); }
  html.ios .tabbar {
    left: 0; right: 0; bottom: 0; width: 100%; transform: none;
    height: calc(var(--tabbar-h) + var(--sa-b));
    padding: 0 max(8px, var(--sa-r)) var(--sa-b) max(8px, var(--sa-l));
    border-radius: 22px 22px 0 0;
    animation-name: tabbarUp;
  }
  html.ios .tab { min-height: 0; height: var(--tabbar-h); }
}
@keyframes tabbarUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Kolom tanggal/jam iOS: rata kiri, tidak melebar */
.input[type="date"], .input[type="time"] { display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 22px; }
.input::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 22px; }
.input::-webkit-datetime-edit { padding: 0; }

/* Tekan lama di tombol: tanpa menu salin/bagikan dan tanpa seleksi teks */
.btn, .icon-btn, .tab, .tab-fab, .chip, .slot, .nav-item, .wl-ck, .wl-setno, .action-tile, .sheet-handle, .settings-nav-item, .link-btn {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}

/* Gulir: tidak menyeret halaman di belakang sheet/panel */
.sheet-body, .detail-body, .pkg-list { overscroll-behavior: contain; }
.layer .backdrop, .detail-backdrop { touch-action: none; }

/* Ajakan pasang ke Layar Utama (iPhone, Safari biasa) */
.a2hs { position: fixed; left: 14px; right: 14px; max-width: 460px; margin: 0 auto; bottom: calc(var(--tabbar-space) + 14px); z-index: 46; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px 16px; border-radius: 18px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); animation: fadeUp var(--t-base) var(--ease-out) both; }
.a2hs.hide { display: none; }
.a2hs-row { display: flex; align-items: flex-start; gap: 12px; }
.a2hs-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.a2hs p { margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--on-ink); }
.a2hs p b { font-weight: 800; }
.a2hs .share-ico { width: 15px; height: 15px; vertical-align: -2px; }
.a2hs-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Latihan | Makan (Phase P) */
.lat-seg-wrap { position: sticky; top: 0; z-index: 4; padding: 8px 0; background: var(--bg); }
.lat-seg-wrap .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.nut-warn { background: var(--surface-3); border: 1.5px solid var(--fg); font-weight: 600; }
#pub-makan-pane .kv .k .icon-btn { width: 28px; height: 28px; vertical-align: middle; }
@media (min-width: 900px) {
  /* PC: kartu Makan mengalir dalam dua kolom (target + tubuh di kiri, menu dan catatan di kanan) */
  #pub-makan-pane > .stack { display: block; column-count: 2; column-gap: var(--gap); }
  #pub-makan-pane > .stack > * { break-inside: avoid; margin-bottom: var(--gap); }
  #pub-makan-pane > .stack > .makan-hero { column-span: all; }
}

/* ── Fase Q: kartu insight, status, ringkasan ─────────────────────────────── */
.insight-hero { display: grid; gap: 14px; }
.insight-hero .ih-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.insight-hero .ih-eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-muted); }
.ih-range { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-full); background: color-mix(in srgb, var(--on-ink) 10%, transparent); }
.ih-range button { position: relative; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--on-ink-muted); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.ih-range button.on { background: var(--on-ink); color: var(--ink); }
.ih-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 10px; }
.ih-stat b { display: block; font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; }
.ih-stat span { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--on-ink-muted); }
.ih-text { font-size: var(--fs-md); line-height: 1.45; color: var(--on-ink); margin: 0; }
.ih-spark { width: 100%; height: 44px; color: var(--on-ink); }
.ih-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-empty { font-size: var(--fs-md); color: var(--on-ink-muted); margin: 0; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; border: 1px solid var(--border-strong); color: var(--fg-2); background: transparent; }
.state-pill.hampir { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.state-pill.habis { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.state-pill.habis::before, .flag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.flag { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--fs-2xs); font-weight: 700; color: var(--danger); background: var(--danger-soft); }
.card-ink .state-pill { border-color: color-mix(in srgb, var(--on-ink) 40%, transparent); color: var(--on-ink); }
.card-ink .state-pill.hampir { background: var(--on-ink); color: var(--ink); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.stat-strip > * { min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-align: left; font: inherit; color: var(--fg); }
.stat-strip b { display: block; font-size: var(--fs-xl); font-weight: 800; line-height: 1.1; }
.stat-strip span { font-size: var(--fs-xs); color: var(--fg-muted); }
details.fold { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
details.fold > summary { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold .fold-t { font-weight: 700; flex: 1; min-width: 0; }
details.fold .fold-m { font-size: var(--fs-xs); color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
details.fold .fold-chev { display: inline-flex; color: var(--fg-muted); transition: transform var(--t-fast) var(--ease); }
details.fold .fold-chev svg { width: 18px; height: 18px; }
details.fold[open] .fold-chev { transform: rotate(180deg); }
details.fold > .fold-body { padding: 0 14px 14px; }
@media (hover: hover) { details.fold > summary:hover { background: var(--surface-2); border-radius: var(--r-md); } }
@media (prefers-reduced-motion: reduce) { details.fold .fold-chev { transition: none; } }
.icon-chip { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--fg); flex: none; }
.meter.low > i { background-image: repeating-linear-gradient(135deg, var(--ink) 0 4px, transparent 4px 8px); }
.meter.empty > i { background: var(--danger); }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 3px; width: max-content; }
.heat-grid i { width: 13px; height: 13px; border-radius: 3px; background: var(--heat-0); }
.heat-grid i[data-l="1"] { background: var(--heat-1); } .heat-grid i[data-l="2"] { background: var(--heat-2); }
.heat-grid i[data-l="3"] { background: var(--heat-3); } .heat-grid i[data-l="4"] { background: var(--heat-4); }

#ph-makan { margin-bottom: var(--gap); }
.next-card { display: grid; gap: 10px; }
.next-card .ih-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-card .ih-eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-muted); }
.next-card .next-when { font-size: var(--fs-md); font-weight: 700; margin: 0; }
.next-card .li-sub, .next-card .empty, .next-card .empty b { color: var(--on-ink); }
.next-card .empty span { color: var(--on-ink-muted); }
.next-card .empty-icon { background: color-mix(in srgb, var(--on-ink) 12%, transparent); color: var(--on-ink); }
.next-card .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-hero.compact .ring-wrap { width: 84px; height: 84px; }
.portal-hero.compact .ring-center .num { font-size: var(--fs-2xl) !important; }
.portal-hero.compact .profile-name { font-size: var(--fs-xl); }
@media (max-width: 767.98px) { .page-intro { display: none; } }
.ins-list { display: grid; }
.ins-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--border); align-items: baseline; }
.ins-row:first-child { border-top: 0; padding-top: 0; }
.ins-l { color: var(--fg-2); }
.ins-v { font-size: var(--fs-lg); font-weight: 800; text-align: right; }
.ins-n { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--fg-muted); }
.ins-n.warn { color: var(--danger); }
.ins-notes { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--fg-2); }
.ins-ex-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ins-ex-b { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ins-spark { width: 72px; height: 24px; flex: none; color: var(--fg); }
.ins-bar { display: grid; grid-template-columns: 56px 1fr 40px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.ins-bar b { text-align: right; }
.ins-chal { margin-top: 12px; display: grid; gap: 6px; }
.ins-chal .meter { height: 8px; }

.client-top { display: grid; gap: 12px; margin-bottom: 14px; }
.client-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-tile { cursor: pointer; min-width: 0; }
.stat-tile span { display: block; overflow-wrap: anywhere; }
.stat-tile.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
@media (max-width: 420px) { .client-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cl-tools { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.cl-tools .input-search { flex: 1 1 0; min-width: 0; }
.cl-tools .select { width: auto; min-height: 44px; flex: 0 1 auto; max-width: 42%; }
.cl-tools .seg { flex: none; }
/* S7: ringkasan klien satu baris di HP (angka di kalimat + tombol "Lihat siapa"); angka lengkap tetap di desktop. */
@media (max-width: 767px) {
  .client-top { margin-bottom: 12px; }
  #client-hero .insight-hero.slim { flex-wrap: nowrap; gap: 12px; padding: 12px 12px 12px 16px; }
  #client-hero .insight-hero.slim .ih-eyebrow, #client-hero .insight-hero.slim .ih-stats { display: none; }
  #client-hero .insight-hero.slim .ih-main { flex: 1 1 auto; }
  #client-hero .insight-hero.slim .ih-actions { flex: none; }
  #client-hero .insight-hero.slim .ih-actions .btn { width: auto; }
}
.cc-extra { display: grid; gap: 6px; margin-top: 8px; }
.cc-extra:empty { display: none; }
.cc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-trend { display: flex; align-items: center; gap: 10px; }
.cc-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.cc-bars i { width: 6px; height: 100%; background: var(--fg); border-radius: 2px; }
.cc-bars i.z { background: var(--surface-3); }
.cc-wd { font-size: var(--fs-xs); font-weight: 700; color: var(--fg-2); }

details.fold > summary > span:first-child { font-weight: 700; }
details.fold[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; border-radius: var(--r-md) var(--r-md) 0 0; }

.ih-range button::before { content: ''; position: absolute; inset: -6px -3px; }
#view-clients .chips .chip { min-height: 44px; }
/* Teks besar (Fase R1): bungkus, jangan potong */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.save-bar, .wl-rest-row, .wl-resume, .sheet-foot { flex-wrap: wrap; }
.tab .tab-label, .tab span { overflow-wrap: anywhere; }
.pkg-list { max-height: 40dvh; }
html.big-text .tab span { display: none; }
@media (max-width: 300px) { .tab span { display: none; } }
@media (max-width: 359px) { :root { --page-pad: 12px; } .kv, .grid-2, .form-grid .two { grid-template-columns: minmax(0, 1fr); } }
.portal-kpis, .coach-kpis, .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.ih-stats { grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); }
.stat-strip { grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr)); }
html.big-text .wl-tr .wl-prev { display: none; }
html.big-text .wl-tr { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 48px; }
html.big-text .wl-tbl.c1 .wl-tr { grid-template-columns: 40px minmax(0, 1fr) 48px; }
html.big-text .wl-tbl.c3 .wl-tr { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 48px; }
html.big-text .wl-tbl.k-waktu .wl-tr { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 48px; }

/* ── Fase R2: band hitam, aksen hitam, sheet berkepala hitam ─────────────── */
.page-head { position: relative; isolation: isolate; color: var(--on-band); margin: -4px calc(var(--page-pad) * -1) 20px; padding: 18px var(--page-pad) 24px; align-items: flex-end; }
.page-head::before { content: ''; position: absolute; inset: 0 -100vmax; z-index: -1; background: var(--band); }
.page-head .page-sub { color: var(--on-band-muted); }
.page-head .btn-primary { background: var(--on-band); color: var(--band); }
.page-head .btn-outline, .page-head .btn-secondary, .page-head .btn-ghost { color: var(--on-band); border-color: color-mix(in srgb, var(--on-band) 35%, transparent); background: transparent; }
.page-head .icon-btn { color: var(--on-band); background: color-mix(in srgb, var(--on-band) 12%, transparent); border-color: transparent; }
.topbar { background: var(--band); color: var(--on-band); backdrop-filter: none; -webkit-backdrop-filter: none; }
.detail-head { background: var(--band); color: var(--on-band); }
.detail-head .icon-btn { color: var(--on-band); background: color-mix(in srgb, var(--on-band) 12%, transparent); border-color: transparent; }
.topbar .icon-btn { color: var(--on-band); background: color-mix(in srgb, var(--on-band) 12%, transparent); border-color: transparent; }
.card-ink, .insight-hero, .kpi.ink { --ink: var(--band-card); --on-ink: var(--on-band); --on-ink-muted: var(--on-band-muted); background: var(--band-card); color: var(--on-band); border: 1px solid color-mix(in srgb, var(--on-band) 10%, transparent); }
.page-head + .insight-hero, .page-head + .card-ink { margin-top: -40px; position: relative; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 1.1em; border-radius: 2px; background: var(--ink); flex: none; }
.group-label span { color: var(--fg); }
.seg { background: var(--ink); }
.seg button { color: var(--on-ink-muted); }
.seg button.active { color: var(--ink); }
.seg .seg-thumb { background: var(--on-ink); }
.kpi .kpi-icon, .icon-chip { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.sheet-head { background: var(--band); color: var(--on-band); border-radius: 0; }
.sheet-head .icon-btn, .sheet-head .icon-btn.plain { color: var(--on-band); background: color-mix(in srgb, var(--on-band) 14%, transparent); }
.sheet-handle { background: color-mix(in srgb, var(--on-band) 35%, transparent); }
.sheet-foot { border-top: 1px solid var(--border); }
.toast { background: var(--ink); color: var(--on-ink); border-radius: var(--r-full); }

/* ── Fase R3: data kiri-kanan, bukan satu baris per data ─────────────────── */
*:has(> .cr) { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0 16px; }
.cr { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.cr.w { grid-column: 1 / -1; }
.cr-v { font-weight: 700; overflow-wrap: anywhere; }
.kv.three { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
.kv.flat { gap: 0 16px; }
.kv.flat > div { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 10px 0; }
.kv .wide { grid-column: 1 / -1; }
.kv { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.ins-list { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0 16px; }
.ins-row { align-content: start; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 12px; }
.sheet-handle { background: var(--band); border-radius: 0; }
.sheet-handle::before { background: color-mix(in srgb, var(--on-band) 35%, transparent); }

/* ── Fase R4: tab klien hitam, hero menggantung, Pengaturan daftar berkelompok ─ */
.chips.cp-tabs { background: var(--ink); border-radius: var(--r-md); padding: 4px; gap: 4px; }
.chips.cp-tabs .chip { background: transparent; border-color: transparent; color: var(--on-ink-muted); }
.chips.cp-tabs .chip.active { background: var(--on-ink); color: var(--ink); }
html.big-text .chips.cp-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-head { margin-bottom: 36px; }
.page-head + .stack .card-ink:first-child, .page-head + .portal-grid .card-ink:first-child { margin-top: -56px; position: relative; }
@media (max-width: 767px) {
  .settings-nav { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
  .settings-nav-item { border: 0; border-radius: 0; border-top: 1px solid var(--border); background: none; min-height: 60px; }
  .settings-nav-item:first-child { border-top: 0; }
  .sn-ic { background: var(--ink); color: var(--on-ink); }
}

*:has(> .cr) > :not(.cr) { grid-column: 1 / -1; }

@media (max-width: 767px) { .client-card .cc-phone, .client-card .cc-trend { display: none; } .client-card .cc-extra { margin-top: 4px; } }

.fin-bill { flex-direction: column; align-items: stretch; gap: 4px; }
.fin-bill-top, .fin-bill-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.fin-bill-top .li-title { flex: 1 1 8rem; min-width: 0; }
.fin-bill-amt { font-size: var(--fs-lg); white-space: nowrap; }
@media (min-width: 768px) {
  .topbar { height: 0; min-height: 0; padding: 0; background: none; backdrop-filter: none; overflow: visible; }
  .topbar > .topbar-title, .topbar > .topbar-brand { display: none; }
  .topbar-actions { position: absolute; top: 26px; right: max(var(--page-pad), var(--sa-r)); }
  .detail-head { height: auto; min-height: calc(6rem + var(--sa-t)); }
  .page-head { margin-top: -4px; padding: 16px calc(var(--page-pad) + 60px) 16px var(--page-pad); min-height: 6rem; align-items: center; }
}
.sheet { overflow: hidden; }
.form-grid .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.big-text .form-grid .two { grid-template-columns: minmax(0, 1fr); }
.seg:not(:has(.seg-thumb)) button.active { background: var(--on-ink); }
.chips.cp-tabs { border-radius: 16px; }
.chips.cp-tabs .chip { border-radius: 12px; }
#fin-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
#fin-head .kpi { min-height: 0; gap: 6px; padding: 12px 14px; }
#fin-head .card-flat { padding: 12px 14px; }
#fin-head .bars { height: 5.5rem; }
.chips.cp-tabs, .chips.cp-tabs .chip, .chips.cp-tabs .chip.active { border-radius: 14px; }
.chips.cp-tabs .chip { border-radius: 11px; }

.fin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.fin-bar .chip { min-height: 38px; padding: 0 12px; }
.fin-bar #fin-filters .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.page-head { margin-bottom: 16px; }
.page-head:has(+ .stack .card-ink:first-child), .page-head:has(+ .portal-grid .card-ink:first-child), .page-head:has(+ .insight-hero), .page-head:has(+ .card-ink) { margin-bottom: 36px; }
.chips.cp-tabs .chip, .chips.cp-tabs .chip.active, .chips.cp-tabs button.chip.active { border-radius: 11px !important; }
.chips.cp-tabs { border-radius: 15px !important; }
/* Tanpa scrollbar yang terlihat (merusak band di HP); scroll tetap jalan */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar, ::-webkit-scrollbar { display: none; width: 0; height: 0; background: transparent; }
.cp-pane { min-height: 55dvh; }
.detail-body { scrollbar-gutter: auto; }

/* Kartu hitam ramping: satu baris untuk halaman yang isinya sedikit */
.insight-hero.slim { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 16px 20px; border-radius: var(--r-lg); }
.insight-hero.slim::before { display: none; }
.insight-hero.slim .ih-main { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.insight-hero.slim .ih-text { font-weight: 700; font-size: var(--fs-md); }
.insight-hero.slim .ih-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; flex: 0 1 auto; }
.insight-hero.slim .ih-stat b { font-size: var(--fs-xl); }
.insight-hero.slim .ih-actions { flex: 0 0 auto; }
@media (max-width: 520px) { .insight-hero.slim .ih-actions { flex: 1 1 100%; } .insight-hero.slim .ih-actions .btn { width: 100%; } }
.card-ink .state-pill.habis { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
/* Tile angka */
.mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.mtile { display: grid; gap: 2px; align-content: start; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.card .mtile, .card-flat .mtile { background: var(--surface-2); }
.mtile .k { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.mtile .v { font-size: var(--fs-xl); font-weight: 800; line-height: 1.2; }
.mtile .n { font-size: var(--fs-xs); color: var(--fg-muted); }
.mtile .n.warn { color: var(--danger); }
.ic-inline { width: 15px; height: 15px; vertical-align: -2px; }
.nut-flag { white-space: normal; }
/* Kalender aktivitas ringkas */
.act-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.act-side { flex: 1 1 180px; display: grid; gap: 10px; min-width: 0; }
/* Batang kalori 7 hari */
.kbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; }
.kbar { display: grid; gap: 4px; justify-items: center; min-width: 0; }
.kbar-v { font-size: var(--fs-2xs); color: var(--fg-muted); font-weight: 700; }
.kbar-col { position: relative; width: 100%; max-width: 36px; height: 96px; border-radius: 6px; background: var(--surface-2); display: flex; align-items: flex-end; overflow: hidden; }
.kbar-col i { display: block; width: 100%; background: var(--fg); border-radius: 6px 6px 0 0; }
.kbar.over .kbar-col i { background: repeating-linear-gradient(135deg, var(--fg) 0 4px, var(--fg-muted) 4px 7px); }
.kgoal { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--fg-muted); z-index: 1; }
.kbar-d { font-size: var(--fs-2xs); color: var(--fg-muted); }
/* Ringkasan klien: tombol ubah/hapus, PR di dalam lipatan tanpa judul ganda */
.cp-edit-row { margin-top: -4px; }
details.fold #profile-tasks-wrap > .section-head .section-title { display: none; }
details.fold #profile-tasks-wrap > .section-head { justify-content: flex-end; margin-bottom: 8px; }

/* Kartu hitam kosong: ringkas */
.insight-hero.is-empty { padding: 18px 22px; gap: 8px; }
.insight-hero.is-empty::before { display: none; }
/* Progres: segmen bagian */
.pg-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--gap) 0; max-width: 560px; }
.pg-seg button { min-height: 44px; }
.pg-pane.hide { display: none; }
/* Makan */
.makan-hero { display: grid; gap: 18px; }
.makan-top { display: flex; align-items: center; gap: 18px; }
.makan-ring { width: 112px; height: 112px; flex: none; }
.makan-num { font-size: var(--fs-2xl); font-weight: 800; line-height: 1; }
.makan-sum { display: grid; gap: 4px; min-width: 0; }
.makan-left { font-size: var(--fs-2xl); font-weight: 800; margin: 0; }
.makan-meta { font-size: var(--fs-sm); color: var(--on-ink-muted); margin: 0; }
.makan-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.makan-macros .li-title { font-size: var(--fs-sm); }
.makan-macros .num { font-size: var(--fs-xs); }
.makan-hero .row-between { gap: 6px; flex-wrap: wrap; }
.makan-hero .icon-btn { color: var(--on-ink); background: transparent; border-color: transparent; }
@media (max-width: 420px) { .makan-macros { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.meal-blk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding-top: 10px; border-top: 1px solid var(--border); }
.meal-blk:first-of-type { border-top: 0; padding-top: 0; }
.meal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; }
.meal-head b { min-width: 0; }
.meal-head .li-sub { white-space: normal; }
.meal-pack { flex-wrap: wrap; padding: 2px 0 6px; }
.meal-pack p { line-height: 1.35; }
.meal-pack .btn { min-height: 44px; }
.meal-item { min-width: 0; }
.meal-head .icon-chip { width: 32px; height: 32px; }
.meal-head .icon-chip svg { width: 16px; height: 16px; }
/* Coach: kartu hitam ringkas */
.coach-hero.compact { text-align: left; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.coach-hero.compact::before { display: none; }
.coach-hero.compact .ch-id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.coach-hero.compact .avatar { margin: 0; flex: none; }
.coach-hero.compact .ch-txt { min-width: 0; display: grid; gap: 4px; }
.coach-hero.compact .profile-name { font-size: var(--fs-2xl); }
.coach-hero.compact .pill-row { justify-content: flex-start; margin-top: 6px; }
.coach-hero.compact .btn-row { margin-top: 0; }
.coach-hero.compact .ch-stats { display: flex; gap: 24px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .coach-hero.compact { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 28px; }
  .coach-hero.compact .ch-acts { flex-wrap: nowrap; }
}

.ih-stat b { white-space: nowrap; }
@media (max-width: 420px) { .insight-hero:not(.slim) .ih-stat b { font-size: var(--fs-xl); } }

/* ── Editor kartu bagikan (Phase T2): selalu gelap. Pratinjau = area terbesar; pengaturan ringkas di bilah alat. ── */
.sheet.share-sheet {
  --bg: #0a0a0a; --surface: #111111; --surface-2: #1c1c1c; --surface-3: #2a2a2a; --border: #262626; --border-strong: #3a3a3a;
  --fg: #f4f4f2; --fg-2: #cfcfcc; --fg-muted: #9b9b97; --ink: #f4f4f2; --on-ink: #0b0b0b; --focus: #f4f4f2; color-scheme: dark;
  background: var(--bg); color: var(--fg); padding-bottom: 0;
  height: calc(100dvh - var(--kb)); max-height: none; border-radius: 0; overflow: hidden;
}
.share-sheet .sh-top { flex: none; display: flex; align-items: center; gap: 4px; min-height: 48px; padding: calc(2px + var(--sa-t)) 4px 2px; }
.share-sheet .sh-title { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-md); font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-sheet .sh-reset { min-height: 44px; }
.share-sheet .sh-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Pratinjau mengisi semua ruang sisa; tinggi kartu mengikuti ruang, lebar mengikuti rasio. */
.share-sheet .sh-stage { flex: 1 1 auto; min-height: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 4px 12px 6px; }
.share-preview { position: relative; flex: none; width: 200px; height: 356px; border-radius: 12px; overflow: hidden; touch-action: pan-y; cursor: zoom-in; user-select: none; -webkit-user-select: none;
  background: repeating-conic-gradient(#2b2b2b 0% 25%, #1c1c1c 0% 50%) 0 0 / 16px 16px; outline: 1px solid var(--border); }
.share-preview.ink-dark { background: repeating-conic-gradient(#e9e9e7 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px; }
.share-preview.solid { background: #050505; }
.share-preview img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.share-preview .sh-anim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.share-sheet .sh-play { gap: 6px; }
.share-preview:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sh-busy { position: absolute; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; }
.sh-busy::after { content: ''; height: 4px; width: var(--p, 30%); background: #fff; transition: width .2s linear; animation: sh-pulse 1.2s ease-in-out infinite; }
@keyframes sh-pulse { 50% { opacity: .4; } }
.sh-dots { flex: none; display: flex; gap: 5px; justify-content: center; height: 6px; }
.sh-dots i { width: 5px; height: 5px; border-radius: 5px; background: var(--fg-muted); opacity: .45; transition: width var(--t-base) var(--ease), opacity var(--t-base); }
.sh-dots i.on { width: 16px; opacity: 1; background: var(--fg); }
.share-sheet .sh-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 44px; border-radius: 50%; background: rgba(28,28,28,.8); display: none; }
.share-sheet .sh-arrow.prev { left: 8px; } .share-sheet .sh-arrow.next { right: 8px; }
/* Bilah alat (HP): satu baris ikon, bisa digeser; panel alat terbuka di atasnya hanya saat dipilih. */
.share-sheet .sh-side { flex: none; display: flex; flex-direction: column-reverse; border-top: 1px solid var(--border); background: var(--bg); }
.sh-tools { flex: none; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 4px 6px; }
.sh-tools::-webkit-scrollbar { display: none; }
.sh-tool { flex: 1 0 auto; min-width: 58px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 6px; border-radius: 12px; color: var(--fg-muted); font-size: var(--fs-2xs); font-weight: 700; background: transparent; }
.sh-tool svg { width: 20px; height: 20px; }
.sh-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sh-more .sh-tool { min-width: 0; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.sh-tool.active { color: var(--fg); background: var(--surface-2); }
.sh-body { max-height: 34dvh; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px; }
.share-sheet.tool-open .sh-body { padding: 10px 12px 6px; border-bottom: 1px solid var(--border); }
.sh-pane { display: flex; flex-direction: column; gap: 8px; }
.sh-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sh-lbl { flex: 0 0 4.6rem; font-size: var(--fs-xs); font-weight: 700; color: var(--fg-muted); }
.sh-row .sh-chips, .sh-row .sh-input, .sh-row input[type=range], .sh-row .sh-seg { flex: 1; min-width: 0; }
.sh-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
.sh-chips::-webkit-scrollbar { display: none; }
.share-sheet .chip { flex: none; min-height: 40px; padding: 0 12px; font-size: var(--fs-sm); background: var(--surface-2); border-color: var(--border); color: var(--fg); }
.share-sheet .chip svg { width: 16px; height: 16px; }
.share-sheet .chip.active { background: var(--fg); border-color: var(--fg); color: var(--on-ink); }
.share-sheet .input { font-size: 16px; min-height: 40px; background: var(--surface-2); color: var(--fg); border-color: var(--border); }
.sh-date { position: relative; gap: 4px; }
.sh-date input { min-height: 36px; font-size: 16px; background: transparent; color: inherit; border: 0; color-scheme: dark; max-width: 140px; }
.sh-kinds { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
.sh-kinds::-webkit-scrollbar { display: none; }
.sh-kind { flex: none; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.sh-kind svg { width: 16px; height: 16px; }
.sh-kind.active { background: var(--fg); color: var(--on-ink); border-color: var(--fg); }
.sh-toggles { display: flex; flex-direction: column; border-radius: 12px; background: var(--surface-2); padding: 0 12px; }
.sh-toggle { min-height: 44px; gap: 12px; font-size: var(--fs-sm); font-weight: 600; }
.sh-toggle + .sh-toggle { border-top: 1px solid var(--border); }
.sh-stats { display: flex; flex-direction: column; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.sh-stat { display: flex; align-items: center; gap: 0; padding: 0 2px 0 10px; min-height: 44px; }
.sh-stat + .sh-stat { border-top: 1px solid var(--border); }
.sh-stat-on { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sh-stat-n { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-stat-v { margin-left: auto; color: var(--fg-muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38%; }
.sh-stat .icon-btn { width: 40px; height: 44px; }
.sh-stat .icon-btn[disabled] { opacity: .25; }
.sh-photo-pick { display: flex; flex-direction: column; gap: 4px; }
.sh-note { margin: 0; font-size: var(--fs-xs); color: var(--fg-muted); }
.share-sheet input[type=range] { min-height: 40px; accent-color: var(--fg); }
.sh-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); padding: 3px; border-radius: 12px; }
.sh-seg button { min-height: 40px; border-radius: 9px; font-weight: 700; font-size: var(--fs-sm); color: var(--fg-muted); }
.sh-seg button.active { background: var(--surface-3); color: var(--fg); }
.share-sheet .sh-foot { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 10px calc(6px + var(--sa-b)); border-top: 1px solid var(--border); background: var(--bg); }
.sh-tray { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 4px; }
.sh-thumb { position: relative; flex: none; width: 34px; height: 52px; border-radius: 6px; overflow: visible; background: #222; }
.sh-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.sh-thumb .icon-btn { position: absolute; top: -6px; right: -8px; width: 24px; height: 24px; min-height: 0; background: rgba(0,0,0,.8); border-radius: 50%; }
.sh-thumb .icon-btn svg { width: 12px; height: 12px; }
.sh-btns { display: flex; gap: 6px; }
.sh-btns .btn { min-height: 44px; padding: 0 12px; }
.sh-btns #share-go { flex: 1; }
.share-sheet .btn-outline { border-color: var(--border-strong); color: var(--fg); background: transparent; }
.share-sheet .btn-primary { background: var(--fg); color: var(--on-ink); border-color: var(--fg); }
.share-sheet .btn-ghost { color: var(--fg); }
@media (max-width: 420px) { .sh-btns .sh-ic span { display: none; } .sh-btns .sh-ic { width: 44px; padding: 0; justify-content: center; } }
/* Layar penuh: hanya pratinjau (ketuk lagi untuk kembali) */
.share-sheet.full .sh-side, .share-sheet.full .sh-foot, .share-sheet.full .sh-top, .share-sheet.full .sh-dots { display: none; }
.share-sheet.full .sh-stage { padding: calc(8px + var(--sa-t)) 8px calc(8px + var(--sa-b)); cursor: zoom-out; }
.layer:has(.share-sheet:not(.hide)) { padding: 0; align-items: stretch; }
@media (min-width: 768px) {
  .sheet.share-sheet { width: min(1180px, calc(100vw - 48px)); height: calc(100dvh - 48px); max-height: 960px; border-radius: var(--r-xl); }
  .layer:has(.share-sheet:not(.hide)) { padding: 24px; align-items: center; }
  .share-sheet .sh-top { padding: 4px 8px; border-bottom: 1px solid var(--border); }
  .share-sheet .sh-main { flex-direction: row; }
  .share-sheet .sh-stage { padding: 16px 64px 10px; background: #050505; }
  .share-sheet .sh-arrow { display: inline-flex; align-items: center; justify-content: center; }
  /* Kolom kanan ramping: kisi alat 4×2 lalu panel alat aktif */
  .share-sheet .sh-side { flex: 0 0 340px; flex-direction: column; border-top: 0; border-left: 1px solid var(--border); }
  .sh-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px; overflow: visible; border-bottom: 1px solid var(--border); }
  .sh-tool { min-width: 0; min-height: 56px; }
  .sh-body, .share-sheet.tool-open .sh-body { flex: 1; max-height: none; padding: 12px; border-bottom: 0; }
  .sh-chips, .sh-kinds { flex-wrap: wrap; overflow: visible; }
  .sh-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .sh-row .sh-chips, .sh-row .sh-input, .sh-row .sh-seg { width: 100%; }
  .sh-lbl { flex: none; }
  .sh-pane { gap: 14px; }
  .share-sheet .sh-foot { flex-direction: row; align-items: center; padding: 8px 12px; }
  .sh-tray { flex: 1; padding-top: 0; }
  .sh-btns { margin-left: auto; } .sh-btns #share-go { flex: none; min-width: 9rem; }
}
@media (hover: hover) { .sh-tool:hover:not(.active), .sh-kind:hover:not(.active), .share-sheet .chip:hover:not(.active) { color: var(--fg); border-color: var(--fg-muted); } }
html.big-text .sh-tool span { display: none; }
/* Galeri "Kartu saya" */
.sh-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 12px; }
.sh-gal-item { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 0; background: none; border: 0; color: var(--fg); }
.sh-gal-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0b0b0b; }
.sh-gal-img img { width: 100%; height: 100%; object-fit: contain; }
.sh-gal-ph { color: #9b9b97; } .sh-gal-ph svg { width: 32px; height: 32px; }
.sh-gal-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); }
.sh-gal-name svg { width: 16px; height: 16px; flex: none; }
@media (hover: hover) { .sh-gal-item:hover .sh-gal-img { outline: 2px solid var(--fg); outline-offset: 2px; } }
/* Ajakan bagikan sesudah momen */
.share-nudge { position: fixed; left: 50%; bottom: calc(var(--tabbar-space) + 12px); z-index: 58; display: flex; align-items: center; gap: 10px; width: min(440px, calc(100vw - 32px)); padding: 8px 8px 8px 16px; border-radius: 18px;
  background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); transform: translate(-50%, 20px); opacity: 0; transition: transform var(--t-base) var(--ease-out), opacity var(--t-base); }
.share-nudge.show { transform: translate(-50%, 0); opacity: 1; }
.share-nudge.hide { display: none; }
.share-nudge p { flex: 1; margin: 0; font-weight: 600; font-size: var(--fs-sm); }
.share-nudge .btn { min-height: 44px; background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.share-nudge .icon-btn { color: var(--on-ink); }
@media (min-width: 768px) { .share-nudge { bottom: 24px; } }
/* App Android / iOS: kembali lewat back sistem, bukan panah di layar */
html.app-shell .nav-back { display: none; }

.fin-pays { display: flex; flex-direction: column; gap: 10px; }
.fin-pay { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.fin-pay-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.fin-pay-top b { font-size: var(--fs-lg); white-space: nowrap; }
.fin-pay .btn-row { margin-top: 4px; }

/* ── Fase X: portal klien baru (lima tab, kartu atlet, warna aksen, grafis) ── */
/* Warna aksen pilihan klien. Bawaan = hitam (sama dengan --ink), jadi tanpa data-accent tidak ada yang berubah.
   --accent dipakai di atas permukaan terang/gelap halaman, --accent-on-ink di atas band dan kartu hitam. */
:root { --accent: var(--ink); --on-accent: var(--on-ink); --accent-on-ink: var(--on-band); }
html[data-accent="biru"] { --accent: #1d4ed8; --on-accent: #ffffff; --accent-on-ink: #60a5fa; }
html[data-accent="hijau"] { --accent: #15803d; --on-accent: #ffffff; --accent-on-ink: #4ade80; }
html[data-accent="toska"] { --accent: #0f766e; --on-accent: #ffffff; --accent-on-ink: #2dd4bf; }
html[data-accent="ungu"] { --accent: #6d28d9; --on-accent: #ffffff; --accent-on-ink: #a78bfa; }
html[data-accent="pink"] { --accent: #be185d; --on-accent: #ffffff; --accent-on-ink: #f472b6; }
html[data-accent="oranye"] { --accent: #c2410c; --on-accent: #ffffff; --accent-on-ink: #fb923c; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"])[data-accent="biru"] { --accent: #60a5fa; --on-accent: #0b0b0b; }
  html:not([data-theme="light"])[data-accent="hijau"] { --accent: #4ade80; --on-accent: #0b0b0b; }
  html:not([data-theme="light"])[data-accent="toska"] { --accent: #2dd4bf; --on-accent: #0b0b0b; }
  html:not([data-theme="light"])[data-accent="ungu"] { --accent: #a78bfa; --on-accent: #0b0b0b; }
  html:not([data-theme="light"])[data-accent="pink"] { --accent: #f472b6; --on-accent: #0b0b0b; }
  html:not([data-theme="light"])[data-accent="oranye"] { --accent: #fb923c; --on-accent: #0b0b0b; }
}
html[data-theme="dark"][data-accent="biru"] { --accent: #60a5fa; --on-accent: #0b0b0b; }
html[data-theme="dark"][data-accent="hijau"] { --accent: #4ade80; --on-accent: #0b0b0b; }
html[data-theme="dark"][data-accent="toska"] { --accent: #2dd4bf; --on-accent: #0b0b0b; }
html[data-theme="dark"][data-accent="ungu"] { --accent: #a78bfa; --on-accent: #0b0b0b; }
html[data-theme="dark"][data-accent="pink"] { --accent: #f472b6; --on-accent: #0b0b0b; }
html[data-theme="dark"][data-accent="oranye"] { --accent: #fb923c; --on-accent: #0b0b0b; }

html[data-accent] .btn-primary { background: var(--accent); color: var(--on-accent); }
html[data-accent] .page-head .btn-primary, html[data-accent] .card-ink .btn-primary, html[data-accent] .wl-rest .btn-primary, html[data-accent] .px-band .btn-primary { background: var(--on-band); color: var(--band); }
html[data-accent] .meter > i, html[data-accent] .px-bar > i { background: var(--accent); }
html[data-accent] .ring-wrap .ring-fill { stroke: var(--accent); }
html[data-accent] .card-ink .meter > i, html[data-accent] .card-ink .px-bar > i { background: var(--accent-on-ink); }
html[data-accent] .card-ink .ring-wrap .ring-fill { stroke: var(--accent-on-ink); }
html[data-accent] .tab.active { color: var(--accent-on-ink); }
html[data-accent] .chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Tombol kembali halaman kedua (di top bar HP) dan lonceng */
.topbar .tb-back { color: var(--on-band); margin-left: -10px; }
.topbar.has-back .topbar-brand { display: none; }
.topbar .icon-btn.on-band { background: var(--band-card); border-color: color-mix(in srgb, var(--on-band) 18%, transparent); color: var(--on-band); }
.topbar .icon-btn.on-band .badge-dot { background: var(--on-band); color: var(--band); box-shadow: 0 0 0 2px var(--band); }

/* Band hitam di atas halaman portal: menyambung top bar, kartu pertama menggantung di tepinya */
.px-band { position: relative; margin: -4px calc(-1 * var(--page-pad)) 0; padding: 0 var(--page-pad) 60px; background-color: var(--band); color: var(--on-band); overflow: hidden; }
.px-band .px-date { color: var(--on-band-muted); font-size: var(--fs-sm); }
.px-hang { position: relative; margin-top: -52px; }
.px-stack { display: flex; flex-direction: column; gap: var(--gap); }
.px-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.px-sec h3 { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.px-sec span { color: var(--fg-muted); font-size: var(--fs-sm); font-weight: 700; }
.px-eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.px-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.px-bar > i { display: block; height: 100%; border-radius: var(--r-full); background: var(--fg); }
.card-ink .px-bar { background: color-mix(in srgb, var(--on-ink) 18%, transparent); }
.card-ink .px-bar > i { background: var(--on-ink); }
/* Layar lebar: lihat bagian "Tablet, laptop, PC" di akhir berkas ini. */

/* Grafis. B kontur: garis lengkung tipis di band dan kartu tenang. A geometri: lingkaran konsentris di kartu aksi.
   C tipografi raksasa: angka/kata besar dari data-tipo. Semua di belakang isi dan hanya di permukaan hitam. */
.gfx-kontur { background-repeat: no-repeat; background-position: right top; background-size: auto 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 130' fill='none' stroke='white' stroke-width='1.2'%3E%3Cpath d='M160 -10C220 30 300 -20 400 30' stroke-opacity='.22'/%3E%3Cpath d='M150 10C220 52 300 0 400 54' stroke-opacity='.18'/%3E%3Cpath d='M140 32C220 76 300 22 400 80' stroke-opacity='.14'/%3E%3Cpath d='M130 56C220 102 300 46 400 108' stroke-opacity='.1'/%3E%3Cpath d='M120 82C220 130 300 72 400 138' stroke-opacity='.07'/%3E%3C/svg%3E"); }
.card-ink.gfx-kontur { background-size: auto 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 358 220' fill='none' stroke='white' stroke-width='1.3'%3E%3Cellipse cx='310' cy='40' rx='30' ry='20' stroke-opacity='.28' transform='rotate(-18 310 40)'/%3E%3Cellipse cx='308' cy='42' rx='58' ry='40' stroke-opacity='.2' transform='rotate(-16 308 42)'/%3E%3Cellipse cx='304' cy='46' rx='90' ry='62' stroke-opacity='.14' transform='rotate(-14 304 46)'/%3E%3Cellipse cx='298' cy='50' rx='126' ry='86' stroke-opacity='.09' transform='rotate(-12 298 50)'/%3E%3Cellipse cx='290' cy='56' rx='166' ry='112' stroke-opacity='.06' transform='rotate(-10 290 56)'/%3E%3C/svg%3E"); }
.card-ink.gfx-kontur::before, .card-ink.gfx-tipo::before { display: none; }
.card-ink.gfx-geo::before { right: -70px; top: -30px; width: 250px; height: 250px; border: 0; border-radius: 50%; box-shadow: none;
  background: repeating-radial-gradient(circle at center, transparent 0 27px, color-mix(in srgb, var(--on-ink) 15%, transparent) 27px 28.5px);
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 72%); mask-image: radial-gradient(circle at center, #000 30%, transparent 72%); }
.card-ink.gfx-geo::after { content: ''; position: absolute; right: 37px; top: 77px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-on-ink); pointer-events: none; }
.gfx-tipo { position: relative; overflow: hidden; }
.gfx-tipo::after { content: attr(data-tipo); position: absolute; right: -8px; bottom: -0.16em; font-size: 9.5rem; font-weight: 800; letter-spacing: -0.08em; line-height: 1; white-space: nowrap;
  color: color-mix(in srgb, var(--on-ink) 8%, transparent); pointer-events: none; }
.gfx-tipo > * { position: relative; z-index: 1; }

/* Kartu sesi berikutnya (Hari ini) */
.card-ink .ih-eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-muted); }
.px-hero-t { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-top: 8px; max-width: calc(100% - 72px); overflow-wrap: anywhere; }
.next-x .nx-when { font-size: var(--fs-lg); font-weight: 700; margin-top: 12px; }
.next-x .nx-count { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; max-width: calc(100% - 96px); }
.nx-actions { display: flex; gap: 8px; margin-top: 18px; }
.next-x .nx-actions .btn, .athlete .nx-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
.next-x .nx-actions .btn.nx-ico { flex: 0 0 44px; padding: 0; }

/* Daftar "Tugas hari ini" */
.todo { padding: 4px 16px; }
.todo-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--border); width: 100%; text-align: left; color: inherit; }
.todo-row:last-child { border-bottom: 0; }
.todo-check { flex: none; width: 26px; min-height: 26px; border-radius: 50%; border: 2px solid var(--fg); display: flex; align-items: center; justify-content: center; }
.todo-check svg.lucide { width: 15px; min-height: 15px; stroke-width: 3; }
.todo-row.danger .todo-check { border-color: var(--danger); }
.todo-row.danger .todo-sub { color: var(--danger); font-weight: 700; }
.todo-row.done { color: var(--fg-muted); min-height: 52px; }
.todo-row.done .todo-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.todo-row.done .todo-title { text-decoration: line-through; font-weight: 600; }
.todo-txt { flex: 1; min-width: 0; }
.todo-title { display: block; font-size: var(--fs-md); font-weight: 700; }
.todo-sub { display: block; font-size: var(--fs-xs); color: var(--fg-muted); }
.todo-act { flex: none; min-height: 36px; padding: 6px 12px; border-radius: 10px; background: var(--surface-3); font-size: var(--fs-sm); font-weight: 800; display: inline-flex; align-items: center; }
.todo-row:first-child .todo-act { background: var(--accent); color: var(--on-accent); }
.todo-row > svg.lucide { flex: none; width: 18px; min-height: 18px; color: var(--fg-muted); }

/* Strip minggu ini */
.week-x { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: var(--fs-2xs); font-weight: 700; color: var(--fg-muted); }
.week-x i { display: block; height: 36px; border-radius: 10px; background: var(--surface-3); margin-bottom: 4px; }
.week-x .l1 i { background: var(--heat-2); }
.week-x .l2 i { background: var(--accent); }
.week-x .now { color: var(--fg); }
.week-x .now i { box-shadow: inset 0 0 0 2px var(--fg); }

/* Kisi kartu ikon (tab Saya, sheet ＋) */
.px-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.px-tile { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-height: 6.5rem; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); text-align: left; color: var(--fg); box-shadow: var(--shadow-1); }
.px-tile svg.lucide { width: 26px; min-height: 26px; }
.px-tile b { font-size: var(--fs-md); }
.px-tile span { font-size: var(--fs-xs); color: var(--fg-muted); }
.px-tile span.warn { color: var(--danger); font-weight: 700; }
.px-tile .new-dot { position: absolute; top: 14px; right: 14px; }
.px-tile.ink { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.px-tile.ink span { color: inherit; opacity: .75; }
.px-tile:active { transform: scale(0.97); }
@media (hover: hover) { .px-tile:hover { border-color: var(--border-strong); } }

/* Kartu atlet (tab Saya) */
.athlete { display: flex; flex-direction: column; gap: 16px; }
.athlete.st-aksen { --ink: var(--accent); background: var(--accent); color: var(--on-accent); --on-ink: var(--on-accent); --on-ink-muted: color-mix(in srgb, var(--on-accent) 75%, transparent); --accent-on-ink: var(--on-accent); }
.athlete.st-garis { background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--on-ink) 6%, transparent) 14px 28px); }
.ath-head { display: flex; align-items: center; gap: 14px; }
.ath-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; background: var(--on-ink); color: var(--ink); font-size: var(--fs-3xl); font-weight: 800; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-ink) 18%, transparent); }
.ath-photo img { width: 100%; height: 100%; object-fit: cover; }
.ath-name { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.ath-motto { font-size: var(--fs-sm); color: var(--on-ink-muted); margin-top: 4px; overflow-wrap: anywhere; }
.ath-lvl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--fs-md); font-weight: 800; }
.ath-lvl span { font-size: var(--fs-xs); font-weight: 600; color: var(--on-ink-muted); }
.ath-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); gap: 8px; text-align: center; }
.ath-stats > div { background: color-mix(in srgb, var(--on-ink) 9%, transparent); border-radius: var(--r-md); padding: 12px 4px; min-width: 0; }
.ath-stats b { display: block; font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.ath-stats span { display: block; font-size: var(--fs-2xs); color: var(--on-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ath-badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ath-ribbon { position: absolute; right: -52px; top: 26px; width: 190px; min-height: 28px; display: flex; align-items: center; justify-content: center; transform: rotate(35deg); background: var(--accent-on-ink); color: var(--band); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.athlete.st-aksen .ath-ribbon { background: var(--on-accent); color: var(--accent); }

/* Lencana perisai (badge) */
.shield { flex: none; width: 52px; height: 56px; }
.shield path { fill: none; stroke: currentColor; stroke-width: 2.5; }
.shield.on path { fill: currentColor; stroke: none; }
.shield text { font-family: var(--font); font-weight: 800; font-size: 15px; fill: currentColor; }
.shield.on text { fill: var(--band); }
.athlete.st-aksen .shield.on text { fill: var(--accent); }

/* Lonceng */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); width: 100%; text-align: left; color: var(--fg); }
.notif-row.fresh { border: 1.5px solid var(--fg); }
.notif-row .nf-dot { flex: none; width: 10px; min-height: 10px; border-radius: 50%; background: var(--accent); }
.notif-row .nf-txt { flex: 1; min-width: 0; }
.notif-row .nf-kind { display: block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.notif-row b { display: block; font-size: var(--fs-md); margin-top: 2px; }
.notif-row .nf-sub { font-size: var(--fs-sm); color: var(--fg-muted); }
.notif-row .nf-act { flex: none; min-height: 36px; padding: 6px 12px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm); font-weight: 800; display: inline-flex; align-items: center; }
/* Sambutan klien baru: tiga kartu layar penuh (gaya C, angka besar di latar) */
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; background: var(--band); color: var(--on-band); --on-ink: var(--on-band); --on-ink-muted: var(--on-band-muted); --ink: var(--band);
  padding: calc(12px + var(--sa-t)) max(20px, var(--sa-r)) calc(24px + var(--sa-b)) max(20px, var(--sa-l)); }
.welcome.gfx-tipo::after { bottom: auto; top: 12%; font-size: 16rem; }
.welcome .wc-top { display: flex; justify-content: flex-end; }
.welcome .wc-skip { color: var(--on-band-muted); }
.welcome .wc-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 30rem; width: 100%; margin: 0 auto; }
.welcome h2 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.welcome .wc-text { font-size: var(--fs-lg); line-height: 1.5; color: color-mix(in srgb, var(--on-band) 82%, transparent); }
.welcome .wc-points { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--r-lg); background: var(--band-card); border: 1px solid color-mix(in srgb, var(--on-band) 14%, transparent); }
.welcome .wc-points li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-md); font-weight: 600; }
.welcome .wc-points svg.lucide { flex: none; width: 24px; min-height: 24px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--on-band); color: var(--band); stroke-width: 3; }
.welcome .wc-foot { display: flex; flex-direction: column; gap: 18px; max-width: 30rem; width: 100%; margin: 0 auto; }
.welcome .wc-dots { display: flex; gap: 6px; justify-content: center; }
.welcome .wc-dots i { width: 6px; height: 6px; border-radius: var(--r-full); background: color-mix(in srgb, var(--on-band) 35%, transparent); }
.welcome .wc-dots i.on { width: 24px; background: var(--on-band); }
/* Booking tiga langkah: layar penuh di bawah lapisan sheet */
.bk { position: fixed; inset: 0; z-index: 54; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); opacity: 0; transform: translateY(16px); transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); padding-bottom: var(--kb); }
.bk.open { opacity: 1; transform: none; }
.bk-head { flex: none; background: var(--band); color: var(--on-band); padding: calc(10px + var(--sa-t)) max(16px, var(--sa-r)) 16px max(16px, var(--sa-l)); }
.bk-head h2 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.bk-head .icon-btn { color: var(--on-band); margin-left: -10px; }
.bk-head .bk-count { font-size: var(--fs-sm); font-weight: 700; color: var(--on-band-muted); }
.step-bar { display: grid; gap: 6px; margin-top: 10px; }
.step-bar i { height: 4px; border-radius: var(--r-full); background: color-mix(in srgb, var(--on-band) 22%, transparent); }
.step-bar i.on { background: var(--accent-on-ink); }
.bk-body { flex: 1; overflow-y: auto; padding: 20px max(16px, var(--sa-r)) 20px max(16px, var(--sa-l)); display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 560px; margin: 0 auto; box-sizing: border-box; }
.bk-foot { flex: none; padding: 12px max(16px, var(--sa-r)) calc(16px + var(--sa-b)) max(16px, var(--sa-l)); border-top: 1px solid var(--border); background: var(--bg); }
.bk-foot .btn { max-width: 528px; margin: 0 auto; display: flex; }
html.kb-open .bk-foot { display: none; }
.bk-q { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; }
.bk-cal b { font-size: var(--fs-lg); }
.bk-dow, .bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.bk-dow { font-size: var(--fs-2xs); font-weight: 700; color: var(--fg-muted); margin: 8px 0 6px; }
.bk-day { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; aspect-ratio: 1; margin: 0 auto; width: min(100%, 44px); font-size: var(--fs-md); font-weight: 700; color: var(--fg); border: 1.5px solid var(--border-strong); background: var(--surface); }
/* Hari/jam penuh atau lewat: pudar tapi tetap terbaca di terang dan gelap (dulu --border-strong: abu gelap di atas hitam). */
.bk-day.off { border-color: transparent; background: transparent; color: color-mix(in srgb, var(--fg) 50%, transparent); font-weight: 500; }
.bk-day.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg-muted); }
.bk-day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; }
.bk-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bk-slot { min-height: 52px; border-radius: var(--r-md); border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--fg); font-size: var(--fs-lg); font-weight: 700; }
.bk-slot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; }
.bk-slot.off { border-style: dashed; border-color: var(--border-strong); background: transparent; color: color-mix(in srgb, var(--fg) 50%, transparent); font-weight: 600; text-decoration: line-through; }
.bk-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-radius: var(--r-lg); border: 2px solid var(--border); background: var(--surface); color: var(--fg); text-align: left; width: 100%; }
.bk-opt.on { border-color: var(--accent); }
.bk-big { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; max-width: calc(100% - 70px); }
.bk-big + .bk-big { margin-top: 2px; }
#bk-summary .bk-big:first-of-type { margin-top: 10px; }
.bk-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.bk-kv:last-child { border-bottom: 0; }
.bk-kv span { color: var(--fg-muted); }
.bk-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); font-size: var(--fs-md); font-weight: 600; }
.bk-check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.topbar .tb-back { background: transparent; border-color: transparent; }
/* Makan: buku harian per waktu makan, pilih banyak di layar tambah */
#nut-add-body > * { flex-shrink: 0; }   /* isi layar tambah tidak boleh menciut saat daftarnya panjang */
.meal-day { padding: 12px 16px; }
.meal-day .meal-row { border-top: 1px solid var(--border); }
.nut-sel { flex: none; width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid var(--border-strong); background: var(--surface); color: transparent; display: flex; align-items: center; justify-content: center; align-self: center; }
.nut-sel svg.lucide { width: 18px; min-height: 18px; stroke-width: 3; }
.nut-sel.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nut-sel-bar { position: sticky; bottom: 0; z-index: 2; padding: 14px 0 6px; margin-bottom: -6px; background: linear-gradient(to bottom, transparent, var(--surface) 35%); }
/* Ubah profil: contoh warna, gaya kartu, daftar statistik dan badge */
.sw-row { display: grid; grid-template-columns: repeat(7, minmax(0, 44px)); gap: 8px; justify-content: space-between; }
.sw { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--border-strong); background: var(--ink); }
.sw.on { box-shadow: 0 0 0 2.5px var(--fg); }
.sw-biru { background: #1d4ed8; } .sw-hijau { background: #15803d; } .sw-toska { background: #0f766e; } .sw-ungu { background: #6d28d9; } .sw-pink { background: #be185d; } .sw-oranye { background: #c2410c; }
.pc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 8px; }
.pc-opt { min-height: 48px; padding: 6px 8px; border-radius: var(--r-md); border: 1.5px solid var(--border); background: var(--surface); color: var(--fg-2); font-size: var(--fs-md); font-weight: 700; }
.pc-opt.on { border-color: var(--fg); color: var(--fg); font-weight: 800; }
.pc-list { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 0 14px; }
.pc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--border); text-align: left; color: var(--fg); font-size: var(--fs-md); font-weight: 600; }
.pc-row:last-child { border-bottom: 0; }
.pc-ord { flex: none; width: 26px; min-height: 26px; border-radius: 8px; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 800; }
.pc-row.on .pc-ord { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pc-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 8px; }
.pc-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 7rem; padding: 10px 6px; border-radius: var(--r-lg); border: 2px solid var(--border); background: var(--surface); color: var(--fg); font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; }
.pc-badge.on { border-color: var(--fg); }
.pc-badge .shield.on text { fill: var(--surface); }
/* Progres: linimasa Momen, isi berat dengan tombol −/＋ */
.mom { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mom li { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 14px; position: relative; }
.mom li:last-child { padding-bottom: 0; }
.mom li:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--border); }
.mom-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.mom-ic svg { width: 18px; height: 18px; }
.mom b { display: block; font-size: var(--fs-md); line-height: 1.3; }
.pg-step { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; align-items: stretch; }
.pg-step .icon-btn { width: 100%; height: auto; min-height: 56px; border-radius: var(--r-md); }
.pg-step .input { text-align: center; }
/* Keadaan kosong di portal: ikon di tengah cincin geometri (warna dari token, ikut aksen) */
html.portal .empty .empty-icon { position: relative; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface-3)); color: var(--accent); }
html.portal .empty .empty-icon::before, html.portal .empty .empty-icon::after { content: ''; position: absolute; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 28%, transparent); pointer-events: none; }
html.portal .empty .empty-icon::before { inset: -10px; }
html.portal .empty .empty-icon::after { inset: -20px; border-style: dashed; border-color: color-mix(in srgb, var(--fg) 14%, transparent); }
html.portal .empty { padding-top: 40px; }
html.portal .card-ink .empty .empty-icon { background: color-mix(in srgb, var(--on-ink) 12%, transparent); color: var(--on-ink); }
/* Layar masuk di HP: kontur di belakang formulir (gambar besar hanya di desktop) */
.auth-form.gfx-kontur { background-image: none; position: relative; }
.auth-form.gfx-kontur::before { content: ''; position: absolute; right: 0; top: 0; width: min(100%, 390px); aspect-ratio: 3; background: var(--fg); opacity: .45; pointer-events: none; z-index: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 130' fill='none' stroke='white' stroke-width='1.2'%3E%3Cpath d='M160 -10C220 30 300 -20 400 30' stroke-opacity='.22'/%3E%3Cpath d='M150 10C220 52 300 0 400 54' stroke-opacity='.18'/%3E%3Cpath d='M140 32C220 76 300 22 400 80' stroke-opacity='.14'/%3E%3Cpath d='M130 56C220 102 300 46 400 108' stroke-opacity='.1'/%3E%3Cpath d='M120 82C220 130 300 72 400 138' stroke-opacity='.07'/%3E%3C/svg%3E") no-repeat right top / 100% auto; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 130' fill='none' stroke='white' stroke-width='1.2'%3E%3Cpath d='M160 -10C220 30 300 -20 400 30' stroke-opacity='.22'/%3E%3Cpath d='M150 10C220 52 300 0 400 54' stroke-opacity='.18'/%3E%3Cpath d='M140 32C220 76 300 22 400 80' stroke-opacity='.14'/%3E%3Cpath d='M130 56C220 102 300 46 400 108' stroke-opacity='.1'/%3E%3Cpath d='M120 82C220 130 300 72 400 138' stroke-opacity='.07'/%3E%3C/svg%3E") no-repeat right top / 100% auto; }
.auth-form.gfx-kontur > * { position: relative; z-index: 1; }
.rt-card.card-ink .li-sub, .rt-card.card-ink .rt-xlist { color: var(--on-ink-muted); }
.rt-card.card-ink { position: relative; overflow: hidden; }
/* ── Tablet, laptop, PC (berbagai rasio) ──────────────────────────────────────
   HP (< 768 px) tidak berubah: .px-col = display:contents, judul ada di top bar.
   ≥ 768 px: band HP disembunyikan, tiap halaman punya judul (.px-dhead, band hitam Phase R).
   Lebar kolom diatur dari lebar isi halaman (container query pada .view), bukan lebar layar,
   jadi sidebar ramping (tablet) atau lebar (laptop) dan rasio apa pun ikut benar:
   isi < 860 px → satu kolom (maks. 760 px, di tengah); ≥ 860 px → dua kolom (maks. 1240 px). */
.px-col, .pc-ctrl { display: contents; }
.px-dhead { display: none; }
@media (min-width: 768px) {
  html.portal .view[id^="view-public-"] { container-type: inline-size; }
  .px-band { display: none; }
  .px-hang { margin-top: 0; }
  .px-dhead { display: flex; }
  .px-wrap { max-width: 760px; margin-inline: auto; }
  .px-wrap > .px-dhead { margin-bottom: 4px; }
  html.portal .view[id^="view-public-"] > :not(.page-head):not(.px-wrap) { max-width: 1240px; margin-inline: auto; }
}
@container (min-width: 860px) {
  .px-wrap.px-2col { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap) 24px; align-items: start; }
  .px-2col > .px-dhead { grid-column: 1 / -1; }
  .px-2col > .px-col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
  .px-wrap.px-saya { grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.15fr); }
}
@container (min-width: 1100px) { .px-saya .px-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Kartu atlet ikut terlihat saat kisi digulir, hanya bila layar cukup tinggi */
@media (min-width: 768px) and (min-height: 760px) { .px-2col > .px-sticky { position: sticky; top: 16px; } }
/* Laptop pendek (1280×720, 1366×768) dan tablet rebah: judul dan kartu hitam lebih ringkas */
@media (min-width: 768px) and (max-height: 820px) {
  .px-dhead { padding-top: 10px; padding-bottom: 14px; }
  .px-dhead .page-title { font-size: var(--fs-2xl); }
  .px-hero-t { font-size: var(--fs-xl); }
  .next-x .nx-count { font-size: var(--fs-3xl); }
}
/* Ubah profil di layar lebar: pratinjau tetap di kiri, pilihan di kanan */
@media (min-width: 1024px) {
  #sheet-profile-edit { width: min(980px, calc(100vw - 48px)); }
  #pc-body { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
  #pc-preview { position: sticky; top: 0; }
  #pc-body .pc-ctrl { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
}

/* Profil saya: isi sheet adalah kolom flex yang menggulir; kartu tidak boleh diperas (kartu hitam .card-ink overflow:hidden terpotong). */
#my-profile-body > * { flex-shrink: 0; }
/* ═══ Fase Y (docs/desk): portal klien ala aplikasi Mac di tablet, laptop, PC ═══
   Semua aturan di bawah html.desk (portal + layar ≥ 768 px, dipasang oleh parts/app/17-desk.part). HP tidak terpengaruh. */
.topbar-sub, .nav-group, .nav-rule, .side-me { display: none; }
html.desk { font-size: 93.75%; --page-pad: 24px; }
html.desk .input, html.desk .select, html.desk textarea, html.desk input[type="text"], html.desk input[type="tel"], html.desk input[type="number"], html.desk input[type="search"] { font-size: 16px; }

/* Sidebar terang tembus pandang */
html.desk .sidebar { display: flex; width: 232px; padding: 12px 10px 10px; gap: 1px; background: color-mix(in srgb, var(--surface-2) 90%, transparent); backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); border-right: 1px solid var(--border); }
html.desk .sidebar .brand { padding: 4px 8px 14px; gap: 10px; justify-content: flex-start; }
html.desk .sidebar .brand .avatar { width: 28px !important; height: 28px !important; border-radius: 8px !important; }
html.desk .sidebar .brand .logo-mark { width: 14px !important; height: 13px !important; }
html.desk .sidebar .brand-text { display: initial; }
html.desk .brand-name { font-size: 0.95rem; }
html.desk .brand-sub { font-size: 0.75rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
html.desk .nav-list { gap: 1px; }
html.desk .sidebar .nav-item { min-height: 32px; padding: 0 10px; gap: 10px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; color: var(--fg); justify-content: flex-start; }
html.desk .sidebar .nav-item svg { width: 17px; height: 17px; color: var(--fg-muted); }
html.desk .sidebar .nav-label { display: initial; }
html.desk .sidebar .nav-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); font-weight: 650; }
html.desk .sidebar .nav-item.active svg { color: var(--accent); }
html:not([data-accent]).desk .sidebar .nav-item.active svg { color: var(--fg); }
@media (hover: hover) { html.desk .sidebar .nav-item:not(.active):hover { background: color-mix(in srgb, var(--fg) 6%, transparent); } }
html.desk .nav-group { display: block; margin: 14px 10px 4px; font-size: 0.75rem; font-weight: 600; color: var(--fg-muted); }
html.desk .sidebar-foot { border-top: 1px solid var(--border); padding-top: 8px; gap: 2px; }
html.desk .side-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px; text-align: left; color: var(--fg); }
html.desk .side-me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
html.desk .side-me-text b { font-size: 0.875rem; font-weight: 600; }
html.desk .side-me-text span { font-size: 0.75rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { html.desk .side-me:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); } }
@media (pointer: coarse) { html.desk .sidebar .nav-item, html.desk .side-me { min-height: 44px; } }
/* Tablet tegak / jendela sempit: rel ikon */
@media (max-width: 1023px) {
  html.desk .sidebar { width: 72px; align-items: stretch; }
  html.desk .sidebar .brand { justify-content: center; padding: 4px 0 14px; }
  html.desk .sidebar .brand-text, html.desk .sidebar .nav-label, html.desk .nav-group, html.desk .side-me-text { display: none; }
  html.desk .nav-rule { display: block; height: 1px; background: var(--border); margin: 10px 8px; }
  html.desk .sidebar .nav-item, html.desk .side-me { justify-content: center; padding: 0; }
}

/* Bilah judul terang */
html.desk .topbar { height: 52px; min-height: 52px; padding: 0 16px 0 24px; gap: 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); border-bottom: 1px solid var(--border); color: var(--fg); overflow: visible; box-shadow: none; }
html.desk .topbar > .topbar-brand { display: none; }
html.desk .topbar > .topbar-title { display: block; opacity: 1; transform: none; font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; color: var(--fg); white-space: nowrap; }
html.desk .topbar-sub { display: block; font-size: 0.85rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.desk .topbar.desk-noback .tb-back { display: none; }
html.desk .topbar .tb-back { color: var(--fg); margin-left: -8px; }
html.desk .topbar-actions { position: static; margin-left: auto; gap: 8px; flex: none; }
html.desk .topbar .icon-btn, html.desk .topbar .icon-btn.on-band { width: 32px; height: 32px; min-width: 32px; border-radius: 8px; color: var(--fg); background: var(--surface); border: 1px solid var(--border); }
html.desk .topbar .icon-btn svg { width: 16px; height: 16px; }
html.desk .topbar .icon-btn.on-band .badge-dot { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--bg); }
html.desk #nav-dashboard-btn { display: none; }
html.desk #side-auth-btn { display: none; }   /* Keluar ada di halaman Saya */
html.desk #view-calendar .page-head .btn-primary { display: none; }   /* Booking sudah ada di bilah judul */
html.desk .desk-tb { min-height: 32px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; gap: 6px; }
html.desk .desk-tb svg { width: 15px; height: 15px; }
html.desk .desk-tb.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--fg); }
@media (pointer: coarse) { html.desk .topbar { height: 60px; min-height: 60px; } html.desk .topbar .icon-btn, html.desk .topbar .icon-btn.on-band { width: 44px; height: 44px; min-width: 44px; } html.desk .desk-tb { height: 44px; min-height: 44px; } }
@media (max-width: 1023px) { html.desk .desk-tb span { display: none; } html.desk .desk-tb { padding: 0 10px; } html.desk .topbar-sub { display: none; } }

/* Kepala halaman: judul sudah di bilah judul; band hitam dan judul ganda disembunyikan */
html.desk .px-dhead, html.desk .px-band { display: none !important; }
html.desk .page-head { color: var(--fg); margin: 0 0 14px; padding: 0; min-height: 0; }
html.desk .page-head::before { display: none; }
html.desk .page-head .page-title { display: none; }
html.desk .page-head .page-sub { color: var(--fg-muted); }
html.desk .page-head .btn-primary { background: var(--accent); color: var(--on-accent); }
html.desk .page-head .btn-outline, html.desk .page-head .btn-secondary, html.desk .page-head .btn-ghost { color: var(--fg); border-color: var(--border); }
html.desk .page-head .icon-btn { color: var(--fg); background: var(--surface); border: 1px solid var(--border); }
html.desk .page-head + .insight-hero, html.desk .page-head + .card-ink, html.desk .page-head + .stack .card-ink:first-child, html.desk .page-head + .portal-grid .card-ink:first-child { margin-top: 0; }
html.desk .px-hang { margin-top: 0; }
html.desk #main-scroll-area > .page { padding: 20px 24px 40px; max-width: 1320px; }
html.desk .px-wrap, html.desk .px-wrap.px-2col { max-width: none; }

/* Kartu rapat ala Mac */
html.desk .card { border-radius: 12px; box-shadow: none; border: 1px solid var(--border); }
html.desk .card-ink, html.desk .insight-hero { border-radius: 14px; }

/* Jendela (sheet) dengan kepala terang */
html.desk .sheet { border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.28), 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }
html.desk .sheet .sheet-handle { display: none; }
html.desk .sheet .sheet-head { position: relative; justify-content: center; min-height: 46px; padding: 8px 48px; background: var(--surface-2); color: var(--fg); border-bottom: 1px solid var(--border); background-image: none; }
html.desk .sheet .sheet-title { font-size: 0.95rem; font-weight: 650; letter-spacing: 0; text-align: center; }
html.desk .sheet .sheet-head .icon-btn, html.desk .sheet .sheet-head .icon-btn.plain { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; min-width: 28px; border-radius: 6px; background: transparent; color: var(--fg-muted); }
@media (pointer: coarse) { html.desk .sheet .sheet-head .icon-btn, html.desk .sheet .sheet-head .icon-btn.plain { width: 44px; height: 44px; } }

/* Tombol ringkas di perangkat dengan mouse; layar sentuh tetap 44 px */
@media (pointer: fine) {
  html.desk .main .btn { min-height: 34px; border-radius: 8px; font-size: 0.9rem; }
  html.desk .main .btn-lg { min-height: 40px; }
  html.desk .main .btn-sm { min-height: 30px; font-size: 0.85rem; }
}

/* Menu ala Mac (klik kanan, ＋) dan popover (lonceng) */
.desk-menu, .desk-pop { position: fixed; z-index: 200; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.8) blur(24px); -webkit-backdrop-filter: saturate(1.8) blur(24px); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.22), 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); color: var(--fg); font-size: 0.875rem; animation: deskIn .12s var(--ease-out); }
@keyframes deskIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.desk-menu { min-width: 220px; max-width: 320px; padding: 5px; display: flex; flex-direction: column; }
.desk-mi { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 0 10px; border-radius: 6px; text-align: left; color: inherit; font: inherit; }
.desk-mi svg, .desk-mi-ic { width: 15px; height: 15px; flex: none; color: var(--fg-muted); }
.desk-mi small { color: var(--fg-muted); font-size: 0.75rem; }
.desk-mi:hover, .desk-mi:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.desk-mi:hover svg, .desk-mi:focus-visible svg, .desk-mi:hover small, .desk-mi:focus-visible small { color: inherit; }
.desk-mi.danger { color: var(--danger); }
.desk-mi.danger:hover, .desk-mi.danger:focus-visible { background: var(--danger); color: #fff; }
.desk-sep { height: 1px; background: var(--border); margin: 4px 6px; }
@media (pointer: coarse) { .desk-mi { min-height: 44px; } }
.desk-pop { width: min(380px, calc(100vw - 16px)); max-height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column; overflow: hidden; }
.desk-pop-head { padding: 12px 14px 6px; font-size: 0.9rem; }
.desk-pop-body { overflow: auto; padding: 0 8px 10px; }
.desk-pop .notif-row { border: 0; border-radius: 8px; padding: 8px 10px; min-height: 0; background: transparent; }
.desk-pop .notif-row + .notif-row { border-top: 1px solid var(--border); border-radius: 0; }
.desk-pop .nf-act { min-height: 28px; padding: 0 10px; font-size: 0.8rem; border-radius: 7px; }
.desk-pop .px-eyebrow { margin: 6px 10px 2px; }

/* Sorot saat kursor di atas baris (mouse) */
@media (hover: hover) {
  html.desk .todo-row:not(.done):hover, html.desk .list-item:hover, html.desk .meal-row:hover, html.desk .notif-row:hover, html.desk .pc-row:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
  html.desk .rt-card { transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
  html.desk .rt-card:hover { border-color: color-mix(in srgb, var(--fg) 30%, transparent); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
  html.desk .px-tile:hover { border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
}

/* Panel kanan (inspector) */
html.desk { --detail-w: 380px; }
html.desk .detail-head { height: 52px; min-height: 52px; padding: 0 8px 0 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--fg); border-bottom: 1px solid var(--border); }
html.desk .detail-head .detail-title { font-size: 0.95rem; font-weight: 650; }
html.desk .detail-head .icon-btn { width: 30px; height: 30px; min-width: 30px; border-radius: 7px; color: var(--fg-muted); background: transparent; border: 0; }
html.desk .detail { background: var(--surface); }
html.desk .detail-body { padding: 16px 18px 24px; }
html.desk .desk-sel { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
html.desk .rt-card.desk-sel { outline-offset: 0; }
.desk-big { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.desk-2btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.desk-box { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; }
.desk-box .px-eyebrow { margin: 8px 0 2px; }
.desk-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.875rem; }
.desk-kv + .desk-kv { border-top: 1px solid var(--border); }
.desk-kv span { color: var(--fg-muted); }
.desk-kv b { font-weight: 600; text-align: right; }
@media (hover: hover) { html.desk .list-item[data-ctx="sess"], html.desk .meal-row[data-ctx="food"], html.desk #pub-moments li[data-mom] { cursor: default; } }

/* ── Tata letak halaman di desktop ── */
@container (min-width: 860px) { html.desk .px-wrap.px-2col { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; } }
html.desk .px-stack { gap: 16px; }
html.desk .portal-grid { gap: 16px; }
@media (min-width: 1024px) { html.desk .portal-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
html.desk .rt-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Saya: kartu atlet melebar + tiga kolom */
.ds-saya { display: flex; flex-direction: column; gap: 16px; }
html.desk .athlete.ath-wide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "head lvl stats" "head badges acts"; align-items: center; gap: 14px 28px; padding: 20px 24px; }
html.desk .ath-wide > .ath-head { grid-area: head; }
html.desk .ath-wide > div:has(.ath-lvl) { grid-area: lvl; }
html.desk .ath-wide > .ath-stats { grid-area: stats; grid-template-columns: repeat(auto-fit, 96px); }
html.desk .ath-wide > .ath-badges { grid-area: badges; }
html.desk .ath-wide > .nx-actions { grid-area: acts; justify-self: end; }
html.desk .ath-wide > .nx-actions .btn { flex: 0 0 auto; min-width: 110px; }
.ds-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 1199px) { .ds-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; } html.desk .athlete.ath-wide { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head stats" "lvl lvl" "badges acts"; } }
.ds-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ds-gt { margin: 0 0 6px 4px; font-size: 0.8rem; font-weight: 600; color: var(--fg-muted); }
.ds-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ds-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; text-align: left; color: var(--fg); }
.ds-row + .ds-row { border-top: 1px solid var(--border); }
.ds-row b { display: block; font-size: 0.9rem; font-weight: 600; }
.ds-row .grow > span { display: block; font-size: 0.8rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row > svg { width: 16px; height: 16px; color: var(--fg-muted); flex: none; }
.ds-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: none; }
.ds-ic svg { width: 15px; height: 15px; }
.ds-static .seg { width: auto; min-width: 230px; }
.ds-static .sw-row { display: flex; gap: 8px; grid-template-columns: none; }
.ds-static .sw { width: 22px; height: 22px; aspect-ratio: auto; }
@media (hover: hover) { .ds-row:not(.ds-static):hover { background: color-mix(in srgb, var(--fg) 5%, transparent); } }
.ds-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.ds-grow { flex: 1 1 auto; }
.ds-badges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ds-badge { display: flex; justify-content: center; opacity: .35; }
.ds-badge.on { opacity: 1; }
.ds-badge .shield { width: 100%; max-width: 44px; height: auto; }
.ds-pt { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: 10px; font-size: 0.85rem; }
.ds-pt b { text-align: right; }
.ds-out { margin-top: auto; align-self: flex-start; color: var(--danger); }

/* Jadwal: kalender terang berkontras tinggi (komentar pemilik) */
html.desk .month-cal { background: var(--surface); color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 16%, transparent); box-shadow: none; border-radius: 14px; }
html.desk .month-cal .mc-nav { color: var(--fg); width: 32px; height: 32px; border-radius: 8px; }
@media (hover: hover) { html.desk .month-cal .mc-nav:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); } }
html.desk .month-cal .mc-today { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 25%, transparent); }
html.desk .month-cal .mc-dow { color: color-mix(in srgb, var(--fg) 80%, transparent); font-size: 0.7rem; }
html.desk .month-cal .mc-grid { gap: 4px; }
html.desk .month-cal .mc-day { color: var(--fg); background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--fg) 16%, transparent); border-radius: 9px; aspect-ratio: auto; min-height: 44px; font-weight: 700; }
html.desk .month-cal .mc-day.past { background: transparent; border-color: transparent; color: color-mix(in srgb, var(--fg) 42%, transparent); font-weight: 500; }
html.desk .month-cal .mc-day.out { background: transparent; border-color: transparent; color: color-mix(in srgb, var(--fg) 25%, transparent); font-weight: 500; }
html.desk .month-cal .mc-day.today::before { background: var(--accent); }
html.desk .month-cal .mc-day.selected { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: none; }
html.desk .month-cal .mc-day.selected::before { background: var(--on-accent); }
html.desk .month-cal .mc-day .mc-dots i { background: var(--fg); }
html.desk .month-cal .mc-day .mc-dots i.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg); }
html.desk .month-cal .mc-day.selected .mc-dots i { background: var(--on-accent); }
@media (hover: hover) { html.desk .month-cal .mc-day:not(.selected):not(.out):hover { background: color-mix(in srgb, var(--fg) 10%, transparent); } }
html.desk .slot { background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); color: var(--fg); border-radius: 9px; min-height: 40px; }
html.desk .slot.taken { background: transparent; border-color: transparent; color: color-mix(in srgb, var(--fg) 40%, transparent); }
html.desk .slot.past { background: transparent; border-color: transparent; opacity: 1; color: color-mix(in srgb, var(--fg) 32%, transparent); }
html.desk .slot.mine { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (hover: hover) { html.desk .slot:not(:disabled):hover { border-color: var(--accent); } }
@media (pointer: coarse) { html.desk .slot { min-height: 46px; } }

/* Kolom sama tinggi di Hari ini dan Paket saya: kartu terakhir tiap kolom mengisi sisa tinggi (tanpa ujung bergerigi) */
@container (min-width: 860px) {
  html.desk .px-wrap.px-2col { align-items: stretch; }
  html.desk .px-2col > .px-col > :last-child:not(.hide) { flex: 1 1 auto; }
  html.desk #pub-todo { display: flex; flex-direction: column; }
  html.desk #pub-todo > .card { flex: 1 1 auto; }
}
/* Segmented control terang ala Mac */
html.desk .seg { background: color-mix(in srgb, var(--fg) 8%, transparent); border-radius: 9px; padding: 3px; }
html.desk .seg button { color: var(--fg-muted); min-height: 30px; font-size: 0.85rem; font-weight: 600; border-radius: 7px; padding: 0 14px; }
html.desk .seg button.active { color: var(--fg); }
html.desk .seg .seg-thumb { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.16), 0 0 0 0.5px rgba(0,0,0,.06); top: 3px; bottom: 3px; border-radius: 7px; }
@media (pointer: coarse) { html.desk .seg button { min-height: 44px; } }
/* Saya: perbaikan */
.ds-static .seg { flex: none; width: 300px; min-width: 0; }
.ds-static > b { min-width: max-content; }
html.desk .ath-wide > .ath-stats { grid-template-columns: repeat(3, 96px); }
.ds-badge .shield.on text { fill: var(--surface); }
html.desk .ath-wide .ath-ribbon { display: none; }   /* level sudah tertulis di kartu */
.ds-static .seg button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; }
.ds-pt { grid-template-columns: 9rem minmax(0, 1fr) 2.5rem; }
/* Jadwal: kalender dulu; kartu ringkasan hitam tidak perlu di desktop (bilah judul punya Booking) */
html.desk #pub-sched-hero { display: none; }
html.desk .month-cal .mc-legend { color: var(--fg-muted); }
html.desk .month-cal .mc-legend i { background: var(--fg); }
html.desk .month-cal .mc-legend i.ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg); }
/* Makan: buku harian lebar di kiri, peringatan + saran menu + rencana di kanan */
html.desk #pub-makan-pane > .stack { display: grid; column-count: auto; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-auto-flow: row dense; align-items: start; gap: 16px; }
html.desk #pub-makan-pane > .stack > * { margin-bottom: 0; }
html.desk #pub-makan-pane > .stack > .makan-hero { grid-column: 1 / -1; }
html.desk #pub-makan-pane > .stack > #nut-log-card { grid-column: 1; grid-row: 2 / span 5; }
html.desk #pub-makan-pane > .stack > :not(.makan-hero):not(#nut-log-card) { grid-column: 2; }
@media (max-width: 1023px) { html.desk #pub-makan-pane > .stack { grid-template-columns: minmax(0, 1fr); } html.desk #pub-makan-pane > .stack > * { grid-column: 1 !important; grid-row: auto !important; } }
.dk-menu { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.dk-menu > .row-between { margin-bottom: 4px; }
.dk-meal { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.dk-meal b { display: block; font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
/* Jadwal: kalender menempel di kiri; jam kosong lalu daftar Mendatang/Selesai di kanan */
@media (min-width: 1024px) {
  html.desk #view-calendar:has(#pub-sched-lists) { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  html.desk #view-calendar:has(#pub-sched-lists) > * { grid-column: 1 / -1; }
  html.desk #view-calendar:has(#pub-sched-lists) > .sched-layout { display: contents; }
  html.desk #view-calendar:has(#pub-sched-lists) .sched-layout > :first-child { grid-column: 1; grid-row: span 2; position: sticky; top: 8px; }
  html.desk #view-calendar:has(#pub-sched-lists) .sched-layout > #day-panel { grid-column: 2; }
  html.desk #view-calendar:has(#pub-sched-lists) > #pub-sched-lists { grid-column: 2; }
}
/* Booking: jendela dua panel (kalender | jam) */
.bk.bk-desk { background: rgba(0,0,0,.32); align-items: center; justify-content: center; padding: 24px; }
.bk-win { width: min(860px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); color: var(--fg); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.3), 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }
.bk-whead { position: relative; flex: none; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.bk-whead h2 { font-size: 0.95rem; font-weight: 650; }
.bk-whead .icon-btn { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; min-width: 28px; color: var(--fg-muted); }
.bk-panes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); overflow: auto; }
.bk-pane { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bk-pane + .bk-pane { border-left: 1px solid var(--border); }
.bk-pane .bk-cal { border: 0; padding: 0; box-shadow: none; background: transparent; }
.bk-rt-head { display: flex; flex-direction: column; gap: 2px; }
.bk-coaches { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-wfoot { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.bk-wfoot b { display: block; font-size: 0.9rem; }
@media (max-width: 899px) { .bk-panes { grid-template-columns: minmax(0, 1fr); } .bk-pane + .bk-pane { border-left: 0; border-top: 1px solid var(--border); } }
/* Kalender dan jam booking berkontras tinggi (komentar pemilik) */
html.desk .bk-day { border-radius: 9px; aspect-ratio: auto; width: 100%; min-height: 40px; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent); color: var(--fg); font-weight: 700; font-size: 0.875rem; }
html.desk .bk-day.off { background: transparent; border-color: transparent; color: color-mix(in srgb, var(--fg) 38%, transparent); font-weight: 500; }
html.desk .bk-day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html.desk .bk-day.today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 60%, transparent); }
html.desk .bk-dow span { color: color-mix(in srgb, var(--fg) 80%, transparent); font-weight: 700; }
@media (hover: hover) { html.desk .bk-day:not(.off):not(.on):hover { border-color: var(--accent); } }
html.desk .bk-slots { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
html.desk .bk-slot { min-height: 38px; border-radius: 9px; font-size: 0.875rem; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent); }
html.desk .bk-slot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html.desk .bk-slot.off { background: transparent; border-color: transparent; color: color-mix(in srgb, var(--fg) 35%, transparent); }
@media (hover: hover) { html.desk .bk-slot:not(.off):not(.on):hover { border-color: var(--accent); } }
@media (pointer: coarse) { html.desk .bk-day, html.desk .bk-slot { min-height: 44px; } }
/* Pencatat latihan: kepala jadi bilah judul terang */
html.desk .wl-top { min-height: 52px; padding-top: 6px; padding-bottom: 6px; background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--fg); border-bottom: 1px solid var(--border); }
html.desk .wl-top .icon-btn { color: var(--fg); }
/* ── T-2008…T-2011: halaman tingkat dua di desktop (tanpa ruang kosong besar) ── */
.desk-x { display: none !important; }
html.desk .px-2col > .desk-x { display: flex !important; flex-direction: column; align-self: stretch; min-width: 0; }
html.desk .pk-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
html.desk .desk-x.dx-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
html.desk #view-public-pack .px-tiles { display: none; }
@container (min-width: 860px) {
  html.desk #view-public-pack .px-2col > :nth-child(3) { grid-column: 1; grid-row: 1; }
  html.desk #view-public-pack .px-2col > :nth-child(4) { grid-column: 1; grid-row: 3; }
  html.desk #view-public-pack .px-2col > :nth-child(5) { grid-column: 1; grid-row: 2; }
  html.desk #view-public-pack .px-2col > :nth-child(6) { grid-column: 2; grid-row: 1 / span 3; }
  html.desk #view-public-pack .px-2col { grid-template-rows: auto 1fr auto; align-items: stretch; }
}
html.desk .pk-mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
html.desk .pk-mini-price { font-weight: 750; margin: 4px 0 8px; }
html.desk .pk-mini .btn { margin-top: auto; }
html.desk #pack-hero { min-height: 0; }
html.desk .px-2col .px-tiles { align-content: stretch; }
/* Progres: cerita perjalanan jadi strip ringkas, segmented control rapat */
html.desk #pub-journey-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 24px; align-items: center; padding: 18px 22px; }
html.desk #pub-journey-card > * { grid-column: 1; }
html.desk #pub-journey-card > .ath-stats { grid-column: 2; grid-row: 1 / span 4; margin-top: 0 !important; align-self: center; }
html.desk #pub-journey-card .px-hero-t { font-size: var(--fs-2xl) !important; }
html.desk #pub-journey-card .nx-actions { margin-top: 12px; }
html.desk #pub-journey-card .ath-stats > div { padding: 10px 4px; }
html.desk .pg-seg { max-width: 520px; }
@container (max-width: 700px) { html.desk #pub-journey-card { grid-template-columns: minmax(0, 1fr); } html.desk #pub-journey-card > .ath-stats { grid-column: 1; grid-row: auto; margin-top: 14px !important; } }
/* Coach: profil dua kolom */
html.desk #coach-profile-page > .stack { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
html.desk #coach-profile-page > .stack > * { grid-column: auto; margin: 0; }
html.desk #coach-profile-page > .stack > .coach-hero, html.desk #coach-profile-page > .stack > .stack, html.desk #coach-profile-page > .stack > p, html.desk #coach-profile-page > .stack > a { grid-column: 1 / -1; }
html.desk #coach-profile-page .coach-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.desk #view-public-coaches .page-head { display: none; }
@container (max-width: 760px) { html.desk #coach-profile-page > .stack { grid-template-columns: minmax(0, 1fr); } }
/* Rencana makan: menu lebar kiri; target, angka tubuh, aturan kanan */
html.desk #pub-plan-pane > .stack { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
html.desk #pub-plan-pane > .stack > * { grid-column: 2; margin: 0; }
html.desk #pub-plan-pane > .stack > #plan-menu { grid-column: 1; grid-row: 1 / span 6; }
html.desk #plan-target .num { font-size: var(--fs-3xl) !important; }
html.desk #pub-plan-pane .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.desk #view-public-info .page-intro { display: none; }
@container (max-width: 860px) { html.desk #pub-plan-pane > .stack { grid-template-columns: minmax(0, 1fr); } html.desk #pub-plan-pane > .stack > * { grid-column: 1 !important; grid-row: auto !important; } }
/* Info & Tips: kisi tiga kolom bila lebar */
html.desk .cn-wrap { max-width: none; }
@container (min-width: 1000px) { html.desk .cn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
