/* PLAYTIKA X K3 Arena · Komponen UI
   Muat setelah tokens.css. Mobile-first: gaya dasar untuk HP 360px, lalu diperluas di layar lebar.
   Penamaan: kelas pendek berawalan komponen (btn, field, card, badge, ...).
   !important hanya untuk [hidden] dan mode cetak. */

/* ================= Dasar ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--text-md); line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: var(--leading-tight); letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--text-3xl); } h2 { font-size: var(--text-2xl); } h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-weight: 700; }
p { margin: 0; }
a { color: var(--data); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-3); top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: var(--space-3); }

/* Tata letak */
.container { width: 100%; max-width: var(--w-content); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: grid; gap: var(--space-4); }
.stack-sm { display: grid; gap: var(--space-2); }
.stack-lg { display: grid; gap: var(--space-6); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; }
.grid-auto { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.court-bg {
  background-color: var(--bg);
  background-image: linear-gradient(var(--court-line) 1px, transparent 1px), linear-gradient(90deg, var(--court-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ================= Tombol ================= */
.btn {
  --btn-bg: var(--surface-2); --btn-ink: var(--ink); --btn-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap-min); padding: 0 var(--space-4);
  border: var(--border-width) solid var(--btn-line); border-radius: var(--radius-md);
  background: var(--btn-bg); color: var(--btn-ink);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.2;
  text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --btn-bg: var(--primary); --btn-ink: var(--on-primary); --btn-line: var(--primary); }
.btn-primary:hover { --btn-bg: var(--primary-hover); --btn-line: var(--primary-hover); }
.btn-data { --btn-bg: var(--data); --btn-ink: var(--ink-inverse); --btn-line: var(--data); }
.btn-ghost { --btn-bg: transparent; --btn-line: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); }
.btn-danger { --btn-bg: var(--danger-soft); --btn-ink: var(--danger); --btn-line: transparent; }
.btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg { min-height: var(--tap-big); padding: 0 var(--space-5); font-size: var(--text-md); border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { width: var(--tap-min); padding: 0; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--btn-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Formulir ================= */
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--ink); }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-hint { font-size: var(--text-xs); color: var(--ink-muted); }
.field-error { font-size: var(--text-xs); color: var(--danger); font-weight: var(--weight-medium); display: flex; gap: 6px; align-items: flex-start; }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap-min); padding: 10px var(--space-3);
  border: var(--border-width) solid var(--input-border); border-radius: var(--radius-md);
  background: var(--bg-elevated); color: var(--ink);
  font: inherit; font-size: var(--text-md);   /* 16px: mencegah zoom otomatis di iPhone */
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6A7C' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); opacity: .8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--data); box-shadow: var(--focus-ring); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea,
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .addon { display: grid; place-items: center; padding: 0 var(--space-3); border: var(--border-width) solid var(--input-border); border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-2); color: var(--ink-muted); font-size: var(--text-sm); }
.form-grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: 1 / -1; } }

/* Kotak centang & radio sebagai baris yang mudah diketuk */
.check { display: flex; gap: var(--space-3); align-items: flex-start; min-height: var(--tap-min); padding: var(--space-2) 0; cursor: pointer; font-size: var(--text-sm); line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--primary); }
.check-card { border: var(--border-width) solid var(--line); border-radius: var(--radius-md); padding: var(--space-3); background: var(--surface); }
.check-card:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }

/* Pilihan bersegmen (tab kecil / filter) */
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: var(--radius-md); max-width: 100%; overflow-x: auto; }
.segmented button { min-height: 38px; padding: 0 var(--space-3); border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; cursor: pointer; }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Pemilih skala besar (RPE 1–10, rubrik 1–5) untuk input cepat di lapangan */
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.scale button { min-height: var(--tap-big); border: var(--border-width) solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; cursor: pointer; }
.scale button[aria-checked="true"] { background: var(--scale-c, var(--primary)); border-color: var(--scale-c, var(--primary)); color: var(--on-primary); }
.scale button[data-zone="ringan"] { --scale-c: #3FB97F; }
.scale button[data-zone="sedang"] { --scale-c: var(--orange-400); }
.scale button[data-zone="berat"]  { --scale-c: #E2475A; }
.scale-legend { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--ink-muted); }

/* ================= Kartu & permukaan ================= */
.card { background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: var(--space-3); min-width: 0; }
@media (min-width: 640px) { .card { padding: var(--space-5); } }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.card-title { font-size: var(--text-xl); }
.card-sub { font-size: var(--text-sm); color: var(--ink-muted); }
.card-flat { background: var(--surface-2); border-color: transparent; }
.card-link { text-decoration: none; color: inherit; transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.card-link:hover { border-color: var(--line-strong); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* KPI / angka ringkasan (dashboard manajemen) */
.kpis { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: 2px; min-width: 0; }
.kpi-label { font-size: var(--text-xs); color: var(--ink-muted); font-weight: var(--weight-semibold); }
.kpi-value { font-family: var(--font-display); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: var(--text-xs); font-weight: var(--weight-semibold); display: inline-flex; gap: 4px; align-items: center; }
.kpi-delta.up { color: var(--success); } .kpi-delta.down { color: var(--danger); } .kpi-delta.flat { color: var(--ink-muted); }

/* Bilah kemajuan / kapasitas */
.meter { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; width: var(--val, 0%); background: var(--meter-c, var(--data)); border-radius: inherit; transition: width var(--dur) var(--ease); }
.meter.is-full > span { --meter-c: var(--primary); }

/* ================= Lencana status ================= */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; background: var(--surface-3); color: var(--ink-muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-info    { background: var(--info-soft);    color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }

/* ================= Peringatan ================= */
.alert { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--info-soft); color: var(--ink); font-size: var(--text-sm); border-left: 4px solid var(--info); }
.alert svg { width: 20px; height: 20px; color: var(--info); margin-top: 1px; }
.alert b { display: block; }
.alert-success { background: var(--success-soft); border-color: var(--success); } .alert-success svg { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: var(--warning); } .alert-warning svg { color: var(--warning); }
.alert-danger  { background: var(--danger-soft);  border-color: var(--danger); }  .alert-danger svg  { color: var(--danger); }

/* ================= Tabel ================= */
.table-wrap { position: relative; overflow-x: auto; border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); background: var(--surface); -webkit-overflow-scrolling: touch;
  /* bayangan tepi menandakan tabel bisa digeser */
  background-image: linear-gradient(to right, var(--surface), var(--surface)), linear-gradient(to right, var(--surface), var(--surface)),
    linear-gradient(to right, rgba(7,16,28,.12), transparent), linear-gradient(to left, rgba(7,16,28,.12), transparent);
  background-position: left center, right center, left center, right center; background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%; background-attachment: local, local, scroll, scroll; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.table th, .table td { padding: 12px var(--space-3); text-align: left; border-bottom: var(--border-width) solid var(--line); white-space: nowrap; }
.table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--ink-muted); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table .sticky-col { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.table thead .sticky-col { z-index: 3; background: var(--surface-2); }
/* Di HP: tabel bertanda .table-cards berubah menjadi kartu (label dari data-label) */
@media (max-width: 639px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: var(--space-3) var(--space-4); border-bottom: var(--border-width) solid var(--line); }
  .table-cards td { display: flex; justify-content: space-between; gap: var(--space-3); padding: 4px 0; border: 0; white-space: normal; }
  .table-cards td::before { content: attr(data-label); color: var(--ink-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
  .table-cards td.primary { font-weight: var(--weight-bold); font-size: var(--text-md); }
  .table-cards .sticky-col { position: static; box-shadow: none; background: transparent; }
  .table-cards td.primary::before { display: none; }
}

/* ================= Kondisi kosong, memuat, error ================= */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-6) var(--space-4); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--ink-muted); }
.empty img { width: min(220px, 70%); }
.empty h3 { color: var(--ink); }
.empty p { max-width: 44ch; font-size: var(--text-sm); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--radius-sm); min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.3s infinite; }
:root[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after, .btn.is-loading::after { animation: none; } }

/* ================= Avatar inisial (tanpa foto kecuali ada izin) ================= */
.avatar { --av: var(--data); flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--av) 18%, var(--surface)); color: var(--av); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; letter-spacing: .02em; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-2xl); }

/* ================= Kartu pemain (beranda pelatih) ================= */
.player-card { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: inherit; min-height: 76px; }
.player-card:hover { border-color: var(--line-strong); }
.player-card .pc-name { font-weight: var(--weight-bold); font-size: var(--text-md); line-height: 1.25; }
.player-card .pc-meta { font-size: var(--text-xs); color: var(--ink-muted); display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: 2px; }
.player-card .pc-trend { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); text-align: right; line-height: 1; }
.player-card .pc-trend small { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--ink-muted); }
.trend-up { color: var(--success); } .trend-down { color: var(--danger); } .trend-flat { color: var(--ink-muted); }
.player-card.has-alert { border-left: 4px solid var(--warning); }

/* ================= Alur langkah (stepper) ================= */
.steps { display: grid; gap: var(--space-3); grid-template-columns: 1fr; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.step { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-3); align-items: center; padding: var(--space-3); background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); }
@media (min-width: 720px) { .step { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: var(--space-4) var(--space-3); } }
.step img { width: 72px; height: 72px; }
@media (min-width: 720px) { .step img { width: 112px; height: 112px; } }
.step-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; }
.step-title::before { counter-increment: step; content: counter(step) ". "; color: var(--primary-text); }
.step p { font-size: var(--text-sm); color: var(--ink-muted); }

/* ================= Navigasi ================= */
/* Bilah atas aplikasi */
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: 0 var(--gutter); padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: var(--border-width) solid var(--line); }
.appbar-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menu bawah (pelatih, HP) */
.bottomnav { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(var(--items, 4), minmax(0, 1fr));
  padding: 6px max(6px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: var(--border-width) solid var(--line); }
.bottomnav a { display: grid; justify-items: center; gap: 3px; min-height: var(--tap-big); padding: 6px 2px; border-radius: var(--radius-md); color: var(--ink-muted); text-decoration: none; font-size: 11.5px; font-weight: var(--weight-semibold); }
.bottomnav svg { width: 24px; height: 24px; }
.bottomnav a[aria-current="page"] { color: var(--primary-text); background: var(--primary-soft); }
.has-bottomnav { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

/* Menu samping (manajemen, PC); di HP jadi baris tab yang bisa digeser */
.sidenav { display: flex; gap: var(--space-1); overflow-x: auto; padding: var(--space-2) var(--gutter); border-bottom: var(--border-width) solid var(--line); background: var(--bg-elevated); }
.sidenav a { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; }
.sidenav a svg { width: 20px; height: 20px; flex: none; }
.sidenav a:hover { background: var(--surface-2); color: var(--ink); }
.sidenav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); }
.sidenav .count { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-xs); background: var(--surface-3); color: var(--ink); border-radius: var(--radius-pill); padding: 1px 8px; }
@media (min-width: 1024px) {
  .layout-side { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .sidenav { position: sticky; top: 0; height: 100vh; flex-direction: column; gap: 2px; overflow-y: auto; padding: var(--space-4) var(--space-3); border-bottom: 0; border-right: var(--border-width) solid var(--line); }
}

/* Tab konten */
.tabs { display: flex; gap: var(--space-1); border-bottom: var(--border-width) solid var(--line); overflow-x: auto; }
.tabs button, .tabs a { min-height: var(--tap-min); padding: 0 var(--space-4); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-muted); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); }

/* ================= Dialog & lembar bawah ================= */
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: grid; place-items: end center; padding: 0; }
.dialog { width: 100%; max-height: 92vh; overflow: auto; background: var(--bg-elevated); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-5) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--space-4); box-shadow: var(--shadow-lg); }
.dialog::before { content: ""; justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin-top: calc(var(--space-2) * -1); }
@media (min-width: 640px) {
  .dialog-backdrop { place-items: center; padding: var(--space-5); }
  .dialog { width: min(560px, 100%); border-radius: var(--radius-xl); padding: var(--space-6); }
  .dialog::before { display: none; }
}
.dialog-actions { display: flex; gap: var(--space-3); justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 639px) { .dialog-actions { display: grid; } .dialog-actions .btn-primary { order: -1; } }

/* Notifikasi singkat */
/* Notifikasi hanya untuk dibaca: tidak menangkap ketukan, agar tidak menutupi tombol dialog/menu di bawahnya */
.toast-zone { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--space-2); width: min(420px, calc(100% - 32px)); pointer-events: none; }
body:has(.dialog-backdrop) .toast-zone { bottom: auto; top: calc(var(--space-4) + env(safe-area-inset-top, 0px)); }
.has-bottomnav .toast-zone { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.toast { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--ink); color: var(--bg); font-size: var(--text-sm); box-shadow: var(--shadow-lg); animation: toast-in var(--dur) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ================= Kanban (pipeline pendaftar) ================= */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x mandatory; }
.kanban-col { scroll-snap-align: start; display: grid; align-content: start; gap: var(--space-2); background: var(--surface-2); border-radius: var(--radius-lg); padding: var(--space-3); min-height: 200px; }
.kanban-col h4 { font-family: var(--font-body); font-size: var(--text-sm); display: flex; justify-content: space-between; align-items: center; padding: 0 var(--space-1) var(--space-1); }
.kanban-card { background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-md); padding: var(--space-3); display: grid; gap: 4px; font-size: var(--text-sm); }
.kanban-card b { font-size: var(--text-md); }

/* ================= Hero publik ================= */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #F4F7FA; background: var(--navy-950); min-height: min(92vh, 760px); display: grid; align-items: end; }
.hero picture, .hero > img { position: absolute; inset: 0; z-index: -2; }
.hero picture img, .hero > img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,11,18,.15) 0%, rgba(7,11,18,.35) 45%, rgba(7,11,18,.92) 100%); }
@media (min-width: 900px) { .hero { align-items: center; } .hero::after { background: linear-gradient(90deg, rgba(7,11,18,.92) 0%, rgba(7,11,18,.6) 45%, rgba(7,11,18,.1) 100%); } }
.hero-inner { padding-block: var(--space-8) var(--space-7); display: grid; gap: var(--space-4); max-width: 640px; }
.hero h1 { font-size: var(--text-4xl); letter-spacing: .02em; text-transform: uppercase; }
.hero h1 .accent { color: var(--orange-400); }
.hero p { font-size: var(--text-lg); color: #D5DEE7; max-width: 52ch; }
.hero .btn-ghost { --btn-ink: #F4F7FA; --btn-line: rgba(244,247,250,.35); }

/* Lockup brand "PLAYTIKA X K3 Arena" */
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: inherit; }
.brand img { height: 32px; width: auto; }
.brand-x { font-family: var(--font-display); font-weight: 800; font-size: var(--text-lg); color: var(--orange-400); }
/* Logo K3 Arena: lencana bundar berlatar putih (file asli dari pemilik) */
.brand img.brand-k3, .brand-k3 { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(7, 16, 28, .14); }
.on-dark .brand-k3 { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
/* Logo Playtika: versi putih untuk latar gelap, versi navy untuk latar terang */
.logo-putih { display: none; }
:root[data-theme="dark"] .logo-putih, .on-dark .logo-putih { display: block; }
:root[data-theme="dark"] .logo-navy, .on-dark .logo-navy { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo-putih { display: block; } :root:not([data-theme]) .logo-navy { display: none; } }

/* Layar masuk dengan panel gambar (pelatih / manajemen) */
.auth { min-height: 100vh; display: grid; }
.auth-art { position: relative; min-height: 180px; background: var(--navy-950) center / cover no-repeat; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,18,.1), rgba(7,11,18,.85)); }
.auth-art-text { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: var(--space-4); color: #F4F7FA; display: grid; gap: 4px; }
.auth-art-text b { font-family: var(--font-display); font-size: var(--text-2xl); text-transform: uppercase; letter-spacing: .03em; }
.auth-form { display: grid; align-content: center; padding: var(--space-6) var(--gutter); background: var(--bg-elevated); }
.auth-form > * { width: 100%; max-width: 400px; margin-inline: auto; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); }
  .auth-art { min-height: 100vh; }
  .auth-art-text { bottom: var(--space-7); left: var(--space-7); right: var(--space-7); }
  .auth-art-text b { font-size: var(--text-4xl); }
}

/* Cetak: sembunyikan navigasi */
@media print { .appbar, .bottomnav, .sidenav, .toast-zone, .skip-link { display: none !important; } body { background: #fff; } }
