/* =========================================================
   Tiền sân Pick — giao diện
   Màu: xanh mặt sân #0e4d64, vàng bóng #e4f24a, nền trắng
   ========================================================= */
:root {
  --court: #0e4d64;
  --court-700: #0a3a4c;
  --court-600: #0c4459;
  --court-50: #eaf3f6;
  --court-100: #d6e7ed;
  --ball: #e4f24a;
  --ball-600: #c9d72e;
  --ball-50: #f7fbd2;
  --ink: #0f2a33;
  --muted: #5e737a;
  --faint: #8aa0a7;
  --line: #e2eaed;
  --bg: #f4f7f8;
  --card: #ffffff;
  --ok: #1d8a4c;
  --ok-50: #e6f5ec;
  --danger: #c0352b;
  --danger-50: #fdecea;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 42, 51, 0.04), 0 6px 20px rgba(15, 42, 51, 0.06);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--court); }
h1, h2, h3, h4 { letter-spacing: -0.01em; }

.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Đầu trang ----- */
.top {
  background: linear-gradient(160deg, #11607c 0%, var(--court) 55%, var(--court-700) 100%);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 0 44px;
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand b { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; }
.brand small { display: block; font-size: 12.5px; opacity: 0.75; }
.ball {
  width: 34px; height: 34px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 35% 30%, #f6fd9e, var(--ball) 55%, #bccb22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.ball::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 40%, rgba(0,0,0,.18) 0 2px, transparent 2.5px),
              radial-gradient(circle at 62% 30%, rgba(0,0,0,.18) 0 2px, transparent 2.5px),
              radial-gradient(circle at 50% 66%, rgba(0,0,0,.18) 0 2px, transparent 2.5px),
              radial-gradient(circle at 75% 60%, rgba(0,0,0,.14) 0 1.6px, transparent 2px);
}
.who-chip {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, 0.12); padding: 4px 12px 4px 4px; border-radius: 999px;
  font-weight: 600; font-size: 14px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

#view { margin-top: -30px; position: relative; }

/* ----- Ảnh đại diện chữ cái ----- */
.avatar {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--court-50); color: var(--court); font-weight: 800; font-size: 12.5px; letter-spacing: 0.02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; background: var(--ball); color: var(--court-700); }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; background: var(--ball); color: var(--court-700); }

/* ----- Thẻ "Bạn cần trả" ----- */
.wallet {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 14px; overflow: hidden;
}
.wallet-head { display: flex; align-items: center; gap: 12px; }
.wallet-head small { display: block; font-size: 13px; color: var(--muted); }
.wallet-head b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.wallet-head .chip-btn { margin-left: auto; }
.chip-btn {
  border: 0; background: var(--court-50); color: var(--court); font-weight: 600; font-size: 13.5px;
  padding: 8px 12px; border-radius: 999px;
}
.wallet-label { margin-top: 16px; font-size: 13.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.wallet-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; color: var(--court-700); }
.wallet-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.wallet-lines li {
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--line); font-size: 14.5px;
}
.wallet-lines em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.wallet-lines li.ok { color: var(--ok); font-weight: 600; }
.wallet-lines li.paid { color: var(--muted); }
.wallet-lines li.paid b { color: var(--ok); }
.wallet-foot {
  margin: 10px -18px -14px; padding: 12px 18px; background: var(--court-50);
  color: var(--court); font-size: 14px;
}

/* ----- Ô chọn tên ----- */
.picker { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; }
.picker h2 { margin: 0 0 4px; font-size: 22px; }
.picker p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.name-btn {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 16px; background: #fff; font-weight: 600; font-size: 16px; text-align: left;
  transition: border-color .15s, transform .08s;
}
.name-btn:active { transform: scale(0.97); border-color: var(--court); }

/* ----- Tiêu đề mục ----- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 2px 12px; }
.section-head.first { margin-top: 0; padding: 16px 18px 0; background: var(--card); border-radius: var(--radius) var(--radius) 0 0; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.section-head span { font-size: 13px; color: var(--muted); }

/* ----- Thẻ buổi đánh ----- */
.s-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; border: 2px solid transparent; transition: border-color .2s;
}
.s-card.going { border-color: var(--ball-600); }
.s-card.cancelled { opacity: 0.85; }
.s-top { display: flex; align-items: center; gap: 12px; }
.s-date {
  flex: none; width: 58px; height: 58px; border-radius: 16px; background: var(--court-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.s-date small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.s-date b { font-size: 18px; font-weight: 800; color: var(--court-700); }
.s-date.soon { background: var(--court); }
.s-date.soon small { color: var(--ball); }
.s-date.soon b { color: #fff; }
.s-info { flex: 1; min-width: 0; }
.s-time { font-size: 22px; font-weight: 800; line-height: 1.15; }
.s-meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.s-card.hero .s-time { font-size: 26px; }

.tag {
  flex: none; align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: var(--bg); color: var(--muted); white-space: nowrap;
}
.tag.open { background: var(--ball-50); color: #5b6300; }
.tag.bad { background: var(--danger-50); color: var(--danger); }

.s-stats { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.s-count { display: flex; align-items: baseline; gap: 6px; }
.s-count b { font-size: 34px; font-weight: 800; line-height: 1; color: var(--court-700); }
.s-count span { font-size: 14px; color: var(--muted); }
.s-money { text-align: right; }
.s-money span { display: block; font-size: 12px; color: var(--muted); }
.s-money b { font-size: 18px; font-weight: 800; }

.meter { height: 8px; border-radius: 999px; background: #e9eff1; margin-top: 10px; overflow: hidden; }
.meter div { height: 100%; border-radius: 999px; background: var(--court); transition: width .35s ease; }
.meter.full div { background: var(--ok); }
.meter-label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.meter-label b { color: var(--danger); }

.vote-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; min-height: 62px; margin-top: 14px; border: 0; border-radius: 16px;
  background: var(--ball); color: var(--court-700); box-shadow: 0 3px 0 var(--ball-600);
  transition: transform .08s, box-shadow .08s;
}
.vote-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ball-600); }
.vote-main { font-size: 18px; font-weight: 800; }
.vote-sub { font-size: 12.5px; font-weight: 500; opacity: 0.75; }
.vote-btn.going { background: var(--court); color: #fff; box-shadow: 0 3px 0 var(--court-700); }
.vote-btn.going .vote-main { color: var(--ball); }
.vote-btn.busy { opacity: 0.65; pointer-events: none; }

.notice { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 14.5px; font-weight: 600; }
.notice.ok { background: var(--ok-50); color: var(--ok); }
.notice.bad { background: var(--danger-50); color: var(--danger); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill { font-size: 13.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--bg); color: var(--ink); }
.pill.me { background: var(--ball); color: var(--court-700); }
.pill.guest { background: #fff; border: 1.5px dashed var(--court-100); color: var(--muted); }
.pill i { font-style: normal; font-size: 11px; opacity: 0.8; }
.who-list { margin-top: 10px; }
.who-list summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--court); padding: 4px 0; list-style: none; }
.who-list summary::-webkit-details-marker { display: none; }
.who-list summary::after { content: ' ▾'; font-size: 12px; }
.who-list[open] summary::after { content: ' ▴'; }
.who-list .pills { margin-top: 6px; }
.s-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.s-cutoff { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

.admin-hint { font-size: 13.5px; color: var(--muted); text-align: center; margin: 4px 8px 10px; }

/* ----- Trạng thái trống, đang tải ----- */
.empty-state { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 22px; text-align: center; }
.empty-state.small { padding: 22px; }
.empty-state h2 { margin: 10px 0 6px; font-size: 20px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); }
.empty-state.small p { margin: 0; }
.empty-ball { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6fd9e, var(--ball) 55%, #bccb22); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.skeleton {
  height: 150px; border-radius: var(--radius); margin-bottom: 14px;
  background: linear-gradient(90deg, #fff 0%, #eef3f5 50%, #fff 100%); background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear; box-shadow: var(--shadow);
}
.skeleton.short { height: 220px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ----- Thanh mục dưới cùng ----- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; justify-content: center; gap: 4px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.bottom-nav a {
  flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 52px; border-radius: 14px; text-decoration: none; color: var(--faint); font-size: 12px; font-weight: 600;
}
.bottom-nav a[hidden] { display: none; }
.bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.on { color: var(--court); }
.bottom-nav a.on svg { stroke-width: 2.2; }
.bottom-nav a.on span { position: relative; }
.bottom-nav a.on span::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--ball-600); }

/* ----- Hộp nổi từ dưới lên ----- */
.modal {
  position: fixed; inset: 0; background: rgba(8, 28, 36, 0.5); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease-out;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: #fff; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  border-radius: 24px 24px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0.5; } }
@media (min-width: 600px) { .modal { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { margin: 0 0 2px; font-size: 22px; }
.sheet > p { margin: 0 0 14px; }
.code-who { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.code-who small { display: block; font-size: 13px; color: var(--muted); }
.code-who b { font-size: 20px; font-weight: 800; }
.code-label { display: block; font-weight: 700; margin-bottom: 8px; }
.code-input {
  width: 100%; font-size: 34px; letter-spacing: 0.6em; text-align: center; font-weight: 800;
  padding: 12px 0 12px 0.6em; border: 2px solid var(--line); border-radius: 16px; outline: none; background: var(--bg);
}
.code-input:focus { border-color: var(--court); background: #fff; }
.error { color: var(--danger); font-weight: 600; margin: 10px 0 0; font-size: 14.5px; }
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--court); flex: none; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ----- Nút chung ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  min-height: 52px; padding: 0 18px; border-radius: 14px; border: 0; font-weight: 700; font-size: 16px; flex: 1;
}
.btn.primary { background: var(--court); color: #fff; }
.btn.ghost { background: var(--court-50); color: var(--court); }
.btn.danger { background: var(--danger-50); color: var(--danger); }
.btn:disabled { opacity: 0.6; }
.btn.small { min-height: 42px; font-size: 14.5px; border-radius: 12px; flex: none; padding: 0 14px; }
.btn.grow { flex: 1; }
.btn.full { width: 100%; margin-top: 10px; }
.btn.icon { flex: none; width: 48px; padding: 0; font-size: 22px; }
.empty-state .btn { flex: none; }
.link { background: none; border: 0; color: var(--court); text-decoration: underline; font-size: 14.5px; padding: 6px 0; }

/* ----- Tin nhắn có nút sao chép ----- */
.copybox { border: 1.5px dashed var(--court-100); border-radius: 16px; background: #fbfdfd; overflow: hidden; margin-top: 12px; }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1.5px dashed var(--court-100); font-size: 14.5px; }
.btn-copy { border: 0; background: var(--court); color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.copybox pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14.5px; line-height: 1.5; -webkit-user-select: text; user-select: text; }

/* ----- Ô nhập ----- */
select, .input {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
select:focus, .input:focus { outline: none; border-color: var(--court); box-shadow: 0 0 0 3px rgba(14, 77, 100, 0.12); }
textarea.input { resize: vertical; min-height: 80px; }

/* ----- Trang Tiền sân ----- */
.month-top { margin-bottom: 0; }
.month-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.month-title h2 { margin: 0; font-size: 22px; font-weight: 800; }
.month-title span { font-size: 13px; color: var(--muted); }
.month-top select { font-weight: 700; font-size: 17px; background: var(--court-50); border-color: transparent; }
.month-top p { margin: 10px 0 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 20px; font-weight: 800; }
.stat b.ok { color: var(--ok); }
.stat b.bad { color: var(--danger); }
.progress { position: relative; height: 30px; border-radius: 999px; background: #e3eaed; margin: 14px 0 16px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--ok), #2fb066); border-radius: 999px; transition: width .4s; }
.progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--ink); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 12px 10px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: var(--ball-50); }
.table .num { text-align: right; white-space: nowrap; }
.table .paid { text-align: center; width: 76px; }
.table tfoot td { font-weight: 800; border-top: 1px solid var(--line); border-bottom: 0; background: var(--court-50); }
.you { font-size: 11px; font-weight: 700; background: var(--ball); color: var(--court-700); padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.yes { color: var(--ok); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.no { color: var(--faint); font-size: 13.5px; }
.paybox { display: inline-block; position: relative; width: 34px; height: 34px; }
.paybox input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.paybox span { position: absolute; inset: 0; border: 2px solid var(--line); border-radius: 10px; background: #fff; pointer-events: none; }
.paybox input:checked + span {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  border-color: var(--ok);
}
.paybox input:focus-visible + span { box-shadow: 0 0 0 3px rgba(14, 77, 100, 0.3); }
.section-title { font-size: 18px; margin: 26px 2px 10px; }
.sess-list { list-style: none; margin: 0 0 20px; padding: 4px 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.sess { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sess:last-child { border-bottom: 0; }
.sess-top { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 15px; }
.sess-money { margin-left: auto; font-weight: 700; color: var(--court); font-size: 14.5px; }
.sess-names { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.sess.off { color: var(--muted); font-size: 14.5px; }
.sess.off span { color: var(--danger); }
.leader-link { text-align: center; font-size: 13.5px; margin: 20px 0; }
.leader-link a { color: var(--faint); }

/* ----- Quản trị ----- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 0 0 14px; }
.panel h2 { margin: 0 0 6px; font-size: 22px; }
.panel h3 { margin: 2px 0 10px; font-size: 18px; }
.panel h4 { margin: 16px 0 8px; font-size: 15px; }
.panel .input { margin-top: 6px; }
.panel label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.panel label.check { display: flex; color: var(--ink); font-weight: 500; font-size: 15px; }
.panel summary { cursor: pointer; font-weight: 700; color: var(--court); padding: 4px 0; }
.panel .error { margin-top: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > label { margin-top: 10px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; }
.badge { background: var(--ball); color: var(--court-700); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.badge.small { font-size: 11px; padding: 2px 8px; vertical-align: middle; }
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: 999px; padding: 9px 15px; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.subtabs button.on { background: var(--court); color: #fff; }
.day-pick { display: flex; gap: 8px; margin-bottom: 14px; }
.day-pick .input { text-align: center; font-weight: 700; background: var(--card); }
.day-pick .btn.icon { background: var(--card); box-shadow: var(--shadow); }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.editor-head h3 { margin: 0; }
.chip { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.chip.ok { background: var(--ball-50); color: #5b6300; }
.chip.bad { background: var(--danger-50); color: var(--danger); }
.money-line { margin: 8px 0 0; font-weight: 700; color: var(--court); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 600; min-height: 42px; }
.pchip.on { background: var(--ball); border-color: var(--ball-600); color: var(--court-700); }
.pchip.guest { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; }
.pchip.guest button { border: 0; background: rgba(0, 0, 0, 0.08); border-radius: 50%; width: 28px; height: 28px; font-size: 13px; }
.inline { display: flex; gap: 8px; margin-top: 10px; }
.inline .input { margin: 0; }
.inline .btn { flex: none; min-height: 48px; }
details.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.member-row.inactive { opacity: 0.65; }
.member-row .row2 > label { margin-top: 0; }
.input.code { letter-spacing: 0.3em; font-weight: 800; }
.member-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.member-actions .check { margin: 0 auto 0 0 !important; }
.add-member { border: 2px solid var(--ball-600); }
.price-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 0 8px; align-items: end; padding: 4px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.price-row label { margin-top: 6px !important; font-size: 13px !important; }
.price-row .input { margin-top: 4px; min-height: 44px; padding: 8px 10px; }
.price-row .btn.icon { grid-row: 1 / span 2; grid-column: 3; align-self: center; width: 44px; min-height: 44px; font-size: 16px; }
.price-row label:nth-of-type(3) { grid-column: 1; }
.price-row label:nth-of-type(4) { grid-column: 2; }

/* ----- Thông báo nhỏ ----- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 600; z-index: 50;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: up .2s ease-out;
}
.toast.bad { background: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
