/* PICKVN night theme (DEC-0012): dark navy canvas, bright blue for Online/primary actions, pink for Offline.
   Loaded after pickvn-theme.css and pickvn-public.css: it redefines the design tokens and overrides the few rules that
   hard-code light colours. Remove the <link> to this file to return to the light "Thể thao mạnh mẽ" theme (DEC-0007). */
:root{
 --pv-forest-900:#060f24;--pv-forest-800:#0b1834;--pv-forest-700:#1f7bff;--pv-forest-600:#4c9bff;
 --pv-lime-400:#3fb6ff;--pv-lime-500:#1f9bf0;--pv-lime-100:rgba(63,182,255,.12);
 --pv-canvas:#08132b;--pv-surface:#0f1f42;--pv-surface-2:#132752;--pv-text:#e9effc;--pv-muted:#9aabd0;
 --pv-line:rgba(130,165,235,.16);--pv-line-strong:rgba(130,165,235,.32);
 --pv-success:#3ddc97;--pv-success-bg:rgba(61,220,151,.14);--pv-info:#6cb4ff;--pv-info-bg:rgba(108,180,255,.14);
 --pv-warn:#ffc857;--pv-warn-bg:rgba(255,200,87,.14);--pv-danger:#ff6b81;--pv-danger-bg:rgba(255,107,129,.14);
 --pv-pink:#ff3fa4;--pv-pink-600:#e0288a;--pv-pink-bg:rgba(255,63,164,.14);
 --pv-blue-grad:linear-gradient(135deg,#1f7bff 0%,#36b5ff 100%);--pv-pink-grad:linear-gradient(135deg,#ff3fa4 0%,#ff6fc1 100%);
 --pv-shadow:0 8px 28px rgba(0,0,0,.35);
 color-scheme:dark;
}
html body{background:radial-gradient(1200px 600px at 80% -10%,rgba(31,123,255,.18),transparent 60%),var(--pv-canvas)!important}
html body ::selection{background:var(--pv-forest-700);color:#fff}
html body a{color:var(--pv-lime-400)}

/* ---------- shell ---------- */
html body #pickvnSidebar{background:linear-gradient(180deg,#071330 0%,#050d20 100%)!important;border-right:1px solid var(--pv-line)!important}
html body #roleBadge{background:var(--pv-lime-100)!important}
html body #roleTools button.active{background:var(--pv-blue-grad)!important}
html body #workspace{background:transparent!important}
html body .topbar,html body #workspaceHeader{background:rgba(6,15,36,.7)!important;border-bottom:1px solid var(--pv-line)!important;backdrop-filter:blur(8px)}
html body .panel,html body section>.panel{background:var(--pv-surface)!important;border:1px solid var(--pv-line)!important;box-shadow:var(--pv-shadow)!important}

/* ---------- controls ---------- */
html body button:hover:not(:disabled),html body label.button:hover{background:var(--pv-forest-600)!important;border-color:var(--pv-forest-600)!important}
html body button[type="submit"],html body #qGo,html body #authSubmit,html body .pv-primary,html body #pvMigRun,html body [data-take]{
 background:var(--pv-blue-grad)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 6px 18px rgba(31,123,255,.35)!important}
html body button[type="submit"]:hover:not(:disabled),html body #qGo:hover:not(:disabled),html body #authSubmit:hover:not(:disabled),html body [data-take]:hover:not(:disabled){background:var(--pv-forest-600)!important;border-color:transparent!important}
html body .logout,html body #logoutBtn,html body [data-href],html body .pv-owner-actions button,html body .pvactions button,html body [data-reset],html body [data-toggle],html body [data-revoke],html body #pvActiveBar button{
 background:transparent!important;color:var(--pv-text)!important;border:1px solid var(--pv-line-strong)!important}
html body .logout:hover,html body #logoutBtn:hover,html body [data-href]:hover:not(:disabled),html body .pvactions button:hover:not(:disabled),html body .pv-owner-actions button:hover:not(:disabled){background:rgba(255,255,255,.06)!important}
html body input,html body select,html body textarea{background:#0a1838!important;color:var(--pv-text)!important;border-color:var(--pv-line-strong)!important}
html body input::placeholder,html body textarea::placeholder{color:#6f81a8}
html body select option{background:#0f1f42;color:var(--pv-text)}
html body .badge{border-color:var(--pv-line-strong)!important;color:var(--pv-lime-400)!important}
html body .danger-btn,html body .pv-delete-account,html body .q-delete-saved,html body [data-delete],html body [data-qdelete],
html body .danger-mini,html body button[data-delete-event],html body [data-remove-single],html body [data-remove-player],html body [data-unreg]{border-color:rgba(255,107,129,.4)!important}
html body .danger-btn:hover,html body .pv-delete-account:hover{background:rgba(255,107,129,.24)!important}

/* ---------- tables, chips, stats ---------- */
html body th{background:rgba(255,255,255,.04)!important}
html body tbody tr:hover td,html body table tr:hover td{background:rgba(255,255,255,.03)}
html body td,html body th{border-color:var(--pv-line)!important}
html body .pv-chip,html body .pv-owner-state,html body .pv-chip--ended,html body .pv-chip--approved,html body .pv-chip--done{background:rgba(255,255,255,.08);color:var(--pv-muted)}
html body #pvActiveBar{border-color:var(--pv-line-strong)!important;border-left-color:var(--pv-forest-700)!important;color:var(--pv-text)!important}
html body #seedDrawControls,html body #quick .q-status,html body .q-group-advisor,html body .score-mode-field,html body #pickvnRefAssignment .pvstats>div,html body .pv-owner-stat,
html body :is(#pvReferral,#pvVip,#pvCredits,#pvAthlete,#pvOffline) .pvstats>div{background:rgba(255,255,255,.04)!important}
html body :is(#pvReferral,#pvVip,#pvCredits,#pvAthlete,#pvOffline) .pvstats strong,html body #pickvnRefAssignment .pvstats>div strong{color:#fff!important}
html body .pvcard{background:var(--pv-surface-2)!important;border-color:var(--pv-line)!important}
html body .pv-finish-overlay{background:rgba(2,6,20,.72)!important}
html body .pv-stepnav button{background:transparent!important;color:var(--pv-text)!important}
html body .pv-stepnav button.active{background:var(--pv-blue-grad)!important;color:#fff!important;border-color:transparent!important}
html body .pv-ref-dl{color:var(--pv-text)!important;border-color:var(--pv-line-strong)}
/* Offline tournaments are pink everywhere (DEC-0012). */
html body .pv-kind--offline{background:var(--pv-pink-bg)!important;color:var(--pv-pink)!important}
html body .pv-kind--online{background:var(--pv-lime-100)!important;color:var(--pv-lime-400)!important}

/* ---------- referee scoring: high contrast for outdoor courts ---------- */
html body #referee>.panel,html body #referee .panel{background:#050c1e!important;border-color:var(--pv-line-strong)!important}
html body #referee .hc233-score-btn{font-size:22px!important}

/* ---------- public pages ---------- */
html body #pvPublic{background:transparent}
html body #pvPublic .pvp-proto{background:var(--pv-warn-bg);color:var(--pv-warn);border-bottom-color:rgba(255,200,87,.3)}
html body #pvPublic .pvp-top{background:rgba(6,15,36,.86);backdrop-filter:blur(10px);border-bottom:1px solid var(--pv-line)}
html body #pvPublic .pvp-hero::after,html body #pvPublic .pvp-detail-hero::after{background:linear-gradient(90deg,rgba(6,15,36,.95) 0%,rgba(6,15,36,.78) 45%,rgba(6,15,36,.25) 100%)}
html body #pvPublic .pvp-btn--lime{background:var(--pv-blue-grad)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 6px 18px rgba(31,123,255,.35)}
html body #pvPublic .pvp-btn--outline{background:transparent!important;color:var(--pv-text)!important;border-color:var(--pv-line-strong)!important}
html body #pvPublic .pvp-btn[disabled]{background:rgba(255,255,255,.1)!important;color:var(--pv-muted)!important}
html body #pvPublic .pvp-card,html body #pvPublic .pvp-panel,html body #pvPublic .pvp-section .pvp-panel{background:var(--pv-surface)!important;border-color:var(--pv-line)!important;color:var(--pv-text)}
html body #pvPublic .pvp-bar{background:rgba(255,255,255,.1)}
html body #pvPublic .pvp-share{border-color:var(--pv-line-strong)}
html body #pvPublic .pvp-share span,html body #pvPublic .pvp-stepper li span{color:var(--pv-muted)}
html body #pvPublic .pvp-stepper li span{background:rgba(255,255,255,.1)}
html body #pvPublic .pvp-stepper li.done span{background:var(--pv-forest-700);color:#fff}
html body #pvPublic .pvp-choice:has(input:checked){box-shadow:0 0 0 3px rgba(31,123,255,.45)}
html body #pvPublic .pvp-cta,html body #pvPublic .pvp-foot{background:#050d20;border-top:1px solid var(--pv-line)}
html body #pvPublic .pvp-tagline{display:block;font-size:10px;font-style:normal;font-weight:600;letter-spacing:.22em;color:var(--pv-lime-400)}

/* ---------- landing (image design): two modes + feature strip ---------- */
html body #pvPublic .pvp-land{position:relative;overflow:hidden;padding:48px 16px 40px;text-align:center;
 background:radial-gradient(900px 420px at 15% 30%,rgba(31,123,255,.28),transparent 60%),radial-gradient(800px 420px at 85% 40%,rgba(255,63,164,.22),transparent 60%),linear-gradient(180deg,#0a1a40 0%,#08132b 100%)}
html body #pvPublic .pvp-land-kicker{color:var(--pv-lime-400);font-weight:800;letter-spacing:.08em;font-size:20px}
html body #pvPublic .pvp-land h1{color:#fff!important;font-size:clamp(28px,5vw,48px);line-height:1.15;font-weight:900;text-transform:uppercase;margin:6px 0 10px}
html body #pvPublic .pvp-land-sub{color:#d6e0f7;font-size:18px}
html body #pvPublic .pvp-land-modes-note{color:var(--pv-muted);max-width:720px;margin:12px auto 0}
html body #pvPublic .pvp-land-modes-note b{color:#fff}
html body #pvPublic .pvp-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:980px;margin:28px auto 0;text-align:left}
html body #pvPublic .pvp-mode{position:relative;border-radius:20px;padding:24px;background:rgba(10,24,56,.72);backdrop-filter:blur(6px)}
html body #pvPublic .pvp-mode--online{border:1.5px solid rgba(63,182,255,.7);box-shadow:0 0 0 1px rgba(63,182,255,.15),0 0 40px rgba(31,123,255,.25)}
html body #pvPublic .pvp-mode--offline{border:1.5px solid rgba(255,63,164,.7);box-shadow:0 0 0 1px rgba(255,63,164,.15),0 0 40px rgba(255,63,164,.22)}
html body #pvPublic .pvp-mode-tag{display:inline-block;padding:4px 14px;border-radius:999px;font-weight:800;font-size:13px;letter-spacing:.06em;color:#fff}
html body #pvPublic .pvp-mode--online .pvp-mode-tag{background:var(--pv-blue-grad)}
html body #pvPublic .pvp-mode--offline .pvp-mode-tag{background:var(--pv-pink-grad)}
html body #pvPublic .pvp-mode h2{color:#fff!important;font-size:26px;margin:12px 0 6px}
html body #pvPublic .pvp-mode p{color:#c9d5f0}
html body #pvPublic .pvp-mode ul{list-style:none;padding:0;margin:14px 0 18px;display:grid;gap:8px}
html body #pvPublic .pvp-mode li{color:#e3eaf9;padding-left:26px;position:relative}
html body #pvPublic .pvp-mode li::before{content:"✓";position:absolute;left:0;top:0;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:900;color:#fff}
html body #pvPublic .pvp-mode--online li::before{background:var(--pv-forest-700)}
html body #pvPublic .pvp-mode--offline li::before{background:var(--pv-pink)}
html body #pvPublic .pvp-btn--pink{background:var(--pv-pink-grad)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 6px 18px rgba(255,63,164,.35)}
html body #pvPublic .pvp-lfeatures{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;max-width:1180px;margin:0 auto;padding:22px 16px;border-top:1px solid var(--pv-line);border-bottom:1px solid var(--pv-line);background:rgba(6,15,36,.6)}
html body #pvPublic .pvp-lfeature{display:flex;gap:12px;align-items:flex-start;padding:6px 16px;border-left:1px solid var(--pv-line)}
html body #pvPublic .pvp-lfeature:first-child{border-left:0}
html body #pvPublic .pvp-lfeature-ico{flex:0 0 40px;height:40px;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--pv-line-strong);font-size:18px}
html body #pvPublic .pvp-lfeature b{display:block;color:#fff;font-size:14px}
html body #pvPublic .pvp-lfeature small{color:var(--pv-muted)!important;font-size:12px;line-height:1.45}
html body #pvPublic .pvp-easy{display:grid;grid-template-columns:1.1fr 1fr;gap:32px;align-items:center;max-width:1148px;margin:48px auto;padding:0 16px}
html body #pvPublic .pvp-easy h2{color:#fff!important;font-size:30px}
html body #pvPublic .pvp-easy ul{list-style:none;padding:0;display:grid;gap:10px;margin:16px 0 20px}
html body #pvPublic .pvp-easy li{padding-left:28px;position:relative;color:#d6e0f7}
html body #pvPublic .pvp-easy li::before{content:"✓";position:absolute;left:0;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--pv-forest-700);color:#fff;font-size:11px;font-weight:900}
html body #pvPublic .pvp-mock{border-radius:18px;border:1px solid var(--pv-line-strong);background:linear-gradient(180deg,#0f1f42,#0a1530);padding:16px;box-shadow:var(--pv-shadow)}
html body #pvPublic .pvp-mock-row{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.04);margin-top:8px;color:#d6e0f7;font-size:14px}
html body #pvPublic .pvp-mock-row b{color:#fff}
html body #pvPublic .pvp-mock-live{color:var(--pv-success);font-weight:700;font-size:12px}
@media (max-width:900px){
 html body #pvPublic .pvp-modes,html body #pvPublic .pvp-easy{grid-template-columns:1fr}
 html body #pvPublic .pvp-lfeatures{grid-template-columns:1fr 1fr}
 html body #pvPublic .pvp-lfeature{border-left:0}
}
@media (max-width:520px){html body #pvPublic .pvp-lfeatures{grid-template-columns:1fr}}

/* ---------- login ---------- */
html body #loginScreen{background:
  radial-gradient(900px 500px at 85% 10%,rgba(31,123,255,.30),transparent 60%),
  radial-gradient(700px 420px at 10% 90%,rgba(255,63,164,.16),transparent 60%),
  linear-gradient(90deg,transparent 49.6%,rgba(255,255,255,.05) 49.6% 50.4%,transparent 50.4%),
  linear-gradient(135deg,#050c1e 0%,#0a1a40 55%,#0d2a66 100%)!important}
html body .loginCard{border:1px solid var(--pv-line)!important}
html body .loginCard h1{color:#fff!important}
html body .loginCard h1 span{color:var(--pv-lime-400)}
html body .loginCard .pv-tagline{color:var(--pv-lime-400)!important;letter-spacing:.18em;text-transform:uppercase;font-size:12px}
/* Tournament card art: same court drawing, recoloured from green to night blue. */
html body #pvPublic .pvp-card-link svg,html body #pvPublic .pvp-hero-art{filter:hue-rotate(75deg) saturate(1.1) brightness(.9)}
html body .pv-up{color:var(--pv-success);font-weight:700}
html body .pv-down{color:var(--pv-danger);font-weight:700}
html body .pv-stepnav button.active{color:#fff!important}

/* Sidebar stays visible while scrolling: overflow-x:hidden on <body> made it a non-scrolling scroll container, which
   disables position:sticky. "clip" still prevents horizontal scrolling without creating a scroll container. */
html body{overflow-x:clip!important;overflow-y:visible!important}
html body #pvPublic .pvp-legal h1{font-size:28px;margin-bottom:6px}
html body #pvPublic .pvp-legal h2{font-size:18px;margin:20px 0 6px}
html body #pvPublic .pvp-legal li{margin:4px 0;color:#d6e0f7}
html body #pvPublic .pvp-foot-links a{color:var(--pv-muted)}

/* Login: show-password toggle and "remember me" (feedback 24/10) */
html body .pv-pw{display:flex;gap:6px;align-items:center}
html body .pv-pw input{flex:1;min-width:0}
html body #authShowPw{width:auto;min-width:44px;padding:8px 10px;background:transparent;border:1px solid var(--pv-line,#2b3c66);color:inherit}
html body #authShowPw[aria-pressed="true"]{background:rgba(96,165,250,.18)}
html body .pv-remember{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;font-size:14px}
html body .pv-remember input{width:18px;height:18px}

/* Secretary 5-step workflow (pickvn-flow.js, feedback 24/10) */
html body #pvStepNav{display:flex;flex-direction:column;gap:10px}
html body #pvStepNav[hidden]{display:none}
html body .pv-flow-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
html body .pv-flow-step{padding:10px 8px;font-size:14px;line-height:1.25;white-space:normal}
html body .pv-flow-step.done{border-color:rgba(74,222,128,.55)}
html body .pv-flow-step.active{background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff}
html body .pv-flow-step.locked{opacity:.55;cursor:not-allowed}
html body .pv-flow-sub{display:flex;gap:8px;flex-wrap:wrap}
html body .pv-flow-subbtn.active{background:rgba(96,165,250,.25)}
html body .pv-flow-info{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
html body .pv-flow-info p{margin:0}
html body .pv-flow-ok{color:#86efac}
html body .pv-flow-todo,html body .pv-flow-lock{color:#fcd34d}
html body.pv-step-locked #hcWorkspace>section{display:none!important}
html body[data-flow-step="1"] #setup .pv-events-box{display:none!important}
html body[data-flow-step="2"] #setup>*:not(.pv-events-box){display:none!important}
html body .pv-flow-quick{margin-top:12px}
@media(max-width:700px){html body .pv-flow-steps{grid-template-columns:1fr 1fr}html body .pv-flow-step{font-size:13px}}

/* Group-count advice (step 4), roster CSV import (step 3), print buttons (feedback 24/10) */
html body .pv-group-advice{margin:10px 0;padding:10px 12px;border:1px dashed rgba(96,165,250,.55);border-radius:12px}
html body .pv-group-advice p{margin:4px 0}
html body #pvRosterImport summary{cursor:pointer;padding:4px 0}
html body #pvRosterImport table{font-size:13px}
html body .pv-print-tools{margin-bottom:10px}

/* ===== UI pass 24/10 (customer feedback): semantic button colours, contrast, spacing, admin list ===== */
:root{--pv-ok:#16a34a;--pv-ok-hover:#15803d;--pv-no:#dc2626;--pv-no-hover:#b91c1c}
/* Approve / accept / confirm = solid green; reject / delete / revoke = solid red. White text keeps contrast high. */
html body button:is(.pv-btn-ok,[data-ok="1"],[data-agree="1"],[data-pub-ok],[data-reg-ok],[data-g-ok],[data-approve],[data-confirm-order],[data-fee],[data-paid]){
 background:var(--pv-ok)!important;border:1px solid var(--pv-ok)!important;color:#fff!important;box-shadow:none!important}
html body button:is(.pv-btn-ok,[data-ok="1"],[data-agree="1"],[data-pub-ok],[data-reg-ok],[data-g-ok],[data-approve],[data-confirm-order],[data-fee],[data-paid]):hover:not(:disabled){background:var(--pv-ok-hover)!important;border-color:var(--pv-ok-hover)!important}
html body button:is(.danger-btn,.pv-delete-account,[data-ok="0"],[data-agree="0"],[data-pub-no],[data-reg-no],[data-g-no],[data-g-end],[data-revoke],[data-purge-t],[data-del-t],[data-delete],[data-remove],[data-remove-player],[data-remove-single],[data-unreg],[data-delete-event],[data-release],[data-qdelete],.q-delete-saved,.danger-mini){
 background:var(--pv-no)!important;border:1px solid var(--pv-no)!important;color:#fff!important;box-shadow:none!important}
html body button:is(.danger-btn,.pv-delete-account,[data-ok="0"],[data-agree="0"],[data-pub-no],[data-reg-no],[data-g-no],[data-g-end],[data-revoke],[data-purge-t],[data-del-t],[data-delete],[data-remove],[data-remove-player],[data-remove-single],[data-unreg],[data-delete-event],[data-release],[data-qdelete],.q-delete-saved,.danger-mini):hover:not(:disabled){background:var(--pv-no-hover)!important;border-color:var(--pv-no-hover)!important}
/* Cancel = red outline (softer than delete). Edit / restore = neutral outline. */
html body button:is([data-cancel],[data-cancel-order],[data-admin-cancel],[data-edit-cancel]){background:transparent!important;color:#fca5a5!important;border:1px solid rgba(248,113,113,.7)!important}
html body button:is(.pv-btn-edit,[data-restore-t]){background:rgba(255,255,255,.06)!important;color:var(--pv-text)!important;border:1px solid var(--pv-line-strong)!important}
html body button:is([data-cancel],[data-cancel-order],[data-admin-cancel],[data-edit-cancel],.pv-btn-edit,[data-restore-t]):hover:not(:disabled){background:rgba(255,255,255,.12)!important}
html body button:disabled{opacity:.5;cursor:not-allowed}
/* Contrast: muted text and chips a step lighter on the navy background. */
html body .muted,html body .small-note,html body small{color:#b4c2e0}
html body .pv-chip{color:#d7e1f5!important;background:rgba(255,255,255,.1)!important}

/* Spacing: consistent rhythm inside panels. */
html body .panel{padding:20px 22px!important;margin-bottom:16px!important}
html body .panel>h2,html body .panel>h3{margin:0 0 10px!important}
html body .panel>p.muted{margin:0 0 14px!important}
html body .panel label+button,html body .panel textarea+button,html body .panel input+button{margin-top:12px}
html body .panel h3{margin-top:20px}
html body .pvactions,html body .pv-owner-actions,html body .toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
html body .pvcard{padding:16px!important;margin:10px 0!important}

/* Checkboxes sit inline with their text (login "remember me", "Tôi kiêm Thư ký giải này", …). */
html body label:has(> input[type="checkbox"]){display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important}
html body label > input[type="checkbox"]{width:18px!important;min-width:18px;height:18px;flex:0 0 18px;margin:0!important}
html body .loginCard .pv-remember{margin:4px 0 14px!important}

/* Admin tournament list: info left, actions right, inline edit form. */
html body .pv-trash-tools{align-items:flex-end;justify-content:space-between}
html body .pv-trash-tools label{flex:1 1 260px;margin:0}
html body .pv-trow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;align-items:center;padding:12px 16px;margin:8px 0;border:1px solid var(--pv-line);border-radius:12px;background:var(--pv-surface-2)}
html body .pv-trow-info strong{display:block;font-size:15px;color:var(--pv-text)}
html body .pv-trow-info small{display:block;margin-top:4px;line-height:1.6}
html body .pv-trow-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
html body .pv-trow-actions button,html body .pv-trow-actions select{width:auto!important;min-height:38px;padding:8px 14px!important;margin:0!important}
html body .pv-trow-edit{grid-column:1/-1;display:grid;grid-template-columns:2fr 1.5fr 1fr 1fr auto;gap:10px;align-items:end;padding-top:10px;border-top:1px dashed var(--pv-line-strong)}
html body .pv-trow-edit[hidden]{display:none}
html body .pv-trow-edit label{margin:0!important}
html body .pv-trow-formbtns{display:flex;gap:8px}
html body .pv-trow-formbtns button{width:auto!important;margin:0!important}
@media(max-width:760px){html body .pv-trow{grid-template-columns:1fr}html body .pv-trow-actions{justify-content:flex-start}html body .pv-trow-edit{grid-template-columns:1fr}}

/* Account / secretary cards: same row layout as the admin list (info left, compact actions right). */
html body .pvaccountcard{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 16px!important}
html body .pvaccountcard>div:first-child{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}
html body .pvaccountcard>div:last-child:not(:first-child){display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;flex:0 1 auto}
html body .pvaccountcard button{width:auto!important;min-height:38px;padding:8px 14px!important;margin:0!important}


/* ===== UI/UX audit 24/10 ===== */
/* Buttons in the same group share one height, padding and type size; text never wraps inside a small action. */
html body :is(.pvactions,.pv-owner-actions,.toolbar,.pv-trow-actions,.pv-acc-actions,.pv-trow-formbtns,.pv-flow-info,#drawEventToolbar,.data-actions,.bulk-actions) button,
html body :is(.pvactions,.toolbar) label.button{min-height:40px!important;padding:8px 16px!important;font-size:14px!important;line-height:1.2!important;border-radius:10px!important;display:inline-flex!important;align-items:center;justify-content:center;gap:6px;white-space:nowrap;margin:0!important}
html body .pv-acc-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
html body .pv-acc-actions button{min-width:96px}
html body #pvAccountList{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
html body #pvAccountList .pvaccountcard{margin:0!important}
/* Draw toolbar (step 4): event picker and its three actions on one even row. */
html body #drawEventToolbar{display:grid!important;grid-template-columns:minmax(220px,1.4fr) repeat(3,minmax(0,1fr));gap:10px;align-items:end}
html body #drawEventToolbar button{width:100%!important;white-space:normal;min-height:44px!important}
html body #drawEventToolbar label{margin:0!important}
@media(max-width:900px){html body #drawEventToolbar{grid-template-columns:1fr 1fr}html body #drawEventToolbar label{grid-column:1/-1}}
/* Step bar: compact sub-tabs, "Tiếp tục" sized to its text on the right. */
html body .pv-flow-step{min-height:44px}
html body .pv-flow-sub{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:8px}
html body .pv-flow-subbtn{min-height:38px!important;padding:6px 14px!important;font-size:14px!important}
html body .pv-flow-info{justify-content:space-between}
html body .pv-flow-next{width:auto!important;flex:0 0 auto}
/* Tables: wrap whole words only (times, court numbers and headers no longer break per character). */
html body #hcWorkspace :is(td,th){overflow-wrap:normal!important;word-break:normal!important}
html body #hcWorkspace th{white-space:nowrap}
html body #hcWorkspace .scroll,html body #hcWorkspace .pvlist{overflow-x:auto}
/* Stats: numbers readable on the navy cards. */
html body .pv-owner-stat strong,html body .pvstats strong{color:#fff!important}
html body .pv-owner-stat span,html body .pvstats span{color:#b4c2e0!important}
/* Inputs: one control height across forms. */
html body #hcWorkspace :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select){min-height:42px}

/* Account lists (narrow multi-column cards): name on top, one row of equal buttons below. */
html body #pvAccountList .pvaccountcard{flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important}
html body #pvAccountList .pvaccountcard>div:first-child{flex:0 0 auto!important}
html body #pvAccountList .pv-acc-actions{justify-content:stretch;flex:0 0 auto!important}
html body #pvAccountList .pv-acc-actions button{flex:1 1 0!important;min-width:0!important;width:auto!important}
/* Step bar: status text takes the room, "Tiếp tục" keeps its own width on the right. */
html body #pvStepNav .pv-flow-info{display:flex!important;flex-wrap:wrap;align-items:center;gap:10px}
html body #pvStepNav .pv-flow-info p{flex:1 1 240px}
html body #pvStepNav .pv-flow-info .pv-flow-next{flex:0 0 auto!important;width:auto!important;max-width:100%}

/* Phones: the account line repeats the header (role and name), keep the screen for content. */
@media(max-width:700px){html body #welcomePanel{display:none!important}}

/* ===== Secretary screens review 24/10 ===== */
/* Step 2 event cards: inline rename form and one row of clear actions. */
html body .event-card .ev-edit{display:grid;grid-template-columns:1fr 1fr 2fr auto;gap:10px;align-items:end;margin:10px 0;padding:10px;border:1px dashed var(--pv-line-strong);border-radius:10px}
html body .event-card .ev-edit[hidden]{display:none}
html body .event-card .ev-edit label{margin:0!important}
html body .event-card .ev-actions{margin-top:12px}
html body .event-card label[hidden]{display:none!important}
@media(max-width:760px){html body .event-card .ev-edit{grid-template-columns:1fr}}
/* Step 3 order: athletes (add / import) first, then pairs and event registration. */
html body #players:not([hidden]){display:flex!important;flex-direction:column}
html body #players>#pvOffRoster{order:0}
html body #players>.panel:has(#addp){order:1}
html body #players>#pvRosterImport{order:2}
html body #players>.registration-panel-highlight{order:3}
html body #players>.panel:has(#activeEvent){order:4}
/* Duplicate rating editor (the Sửa dialog does the same) and test-only generators. */
html body #players .panel:has(> .row > #saveUs){display:none!important}
html:not(.pv-testing) body #seed{display:none!important}
/* Step 4: one way to draw — the toolbar on top; the old panel below only lists the matches. */
html body #draw #generate,html body #draw .panel:has(#generate)>p.muted{display:none!important}
/* Step 5: smart assignment first, then the per-match list. */
html body #assignment:not([hidden]){display:flex!important;flex-direction:column}
html body #assignment>.pv-print-tools{order:0}
html body #assignment>#pickvnRefAssignment{order:1}
html body #assignment>#pvDispatchRoot{order:2}
/* Quick content: the tournament keeps its name; the device archive panel is LOCAL-only. */
html body #quick label:has(#qTitle){display:none!important}
html.pv-online body #quick>.panel:not(:first-child){display:none!important}
/* Backup: demo reset is for the LOCAL demo only. */
html.pv-online body #backup #reset{display:none!important}

/* Confirmations: a button, no typed "OK" (engine overlay + pickvn-confirm.js dialog). */
html body #confirmOverlay label:has(#confirmText){display:none!important}
html body dialog.pv-confirm{max-width:min(460px,92vw);width:92vw;border:1px solid var(--pv-line-strong);border-radius:16px;background:var(--pv-surface);color:var(--pv-text);padding:22px 22px 18px;box-shadow:0 24px 64px rgba(0,0,0,.5)}
html body dialog.pv-confirm::backdrop{background:rgba(2,8,23,.65)}
html body dialog.pv-confirm h3{margin:0 0 8px;font-size:19px}
html body dialog.pv-confirm p{margin:0 0 18px;color:#c7d3ec;line-height:1.5}
html body .pv-confirm-actions,html body #confirmOverlay .confirm-actions{display:flex;gap:10px;justify-content:flex-end}
html body .pv-confirm-actions button,html body #confirmOverlay .confirm-actions button{min-width:120px;min-height:42px;width:auto!important}
html body #pvConfirmCancel,html body #confirmCancel{background:rgba(255,255,255,.08)!important;color:var(--pv-text)!important;border:1px solid var(--pv-line-strong)!important}

/* Alignment pass 24/10: fields in one row share a baseline (labels may wrap to two lines), buttons match input height. */
html body #hcWorkspace :is(.row,.event-grid,.pvgrid,.quick-grid,.pv-trow-edit){align-items:end!important}
html body #hcWorkspace :is(.row,.event-grid,.pvgrid,.quick-grid) > label:not(:has(> input[type="checkbox"])){display:flex;flex-direction:column;justify-content:flex-end;gap:6px;margin:0}
html body #hcWorkspace :is(.row,.event-grid,.pvgrid,.quick-grid) > button{min-height:42px;align-self:end}
html body #hcWorkspace .event-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px 14px}
html body #hcWorkspace .event-grid .ev-note{grid-column:span 2}
html body #hcWorkspace .score-mode-field{background:none!important;border:0!important;padding:0!important;margin:0!important}
html body #hcWorkspace .event-card{padding:16px!important}
html body #hcWorkspace .event-card>strong{font-size:16px;margin-right:8px}
@media(max-width:600px){html body #hcWorkspace .event-grid{grid-template-columns:1fr 1fr}html body #hcWorkspace .event-grid .ev-note{grid-column:1/-1}}

/* Start-up with a stored session: loading indicator instead of a flash of the login form. */
html.pv-booting body #loginScreen{display:none!important}
html.pv-booting body::after{content:"Đang tải…";position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding-top:72px;
 font:600 15px/1.4 Inter,system-ui,sans-serif;color:#b4c2e0;z-index:9999;pointer-events:none;
 background:radial-gradient(circle at 50% calc(50% - 18px),transparent 17px,var(--pv-canvas,#08132b) 18px) no-repeat,var(--pv-canvas,#08132b)}
html.pv-booting body::before{content:"";position:fixed;left:50%;top:50%;width:34px;height:34px;margin:-36px 0 0 -17px;border-radius:50%;z-index:10000;
 border:3px solid rgba(130,165,235,.25);border-top-color:#3fb6ff;animation:pvspin .8s linear infinite}
@keyframes pvspin{to{transform:rotate(360deg)}}

/* Step guides, finish / finished banners (24/10) */
html body .pv-flow-guide{padding:12px 14px;border-radius:12px;background:rgba(63,182,255,.08);border:1px solid rgba(63,182,255,.3);color:#d6e2f8;font-size:14px;line-height:1.55}
html body .pv-flow-guide ol{margin:6px 0 4px 20px;padding:0}
html body .pv-flow-guide li{margin:2px 0}
html body .pv-flow-status{list-style:none;margin:8px 0 0;padding:8px 0 0;border-top:1px dashed rgba(130,165,235,.3);display:flex;flex-wrap:wrap;gap:6px 18px}
html body .pv-flow-status li.ok{color:#86efac}html body .pv-flow-status li.todo{color:#fcd34d}
html body .pv-flow-finish{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:12px;background:rgba(22,163,74,.12);border:1px solid rgba(74,222,128,.45)}
html body .pv-flow-finish p{margin:0;color:#bbf7d0}
html body :is(.pv-flow-finished,.pv-finished-note){margin:0 0 8px;padding:12px 14px;border-radius:12px;background:rgba(148,163,184,.14);border:1px solid rgba(148,163,184,.4);color:#e2e8f0;font-weight:600}
/* Step 3: the separate "Nội dung đang thao tác" picker duplicates the registration panel's event select. */
html body #players>.panel:has(#activeEvent){display:none!important}
/* Finished tournament: every editing control is inert (the server refuses changes anyway); exports stay usable. */
html.pv-finished body #hcWorkspace>section:is(#setup,#players,#draw,#assignment,#approval,#quick,#backup,#pvOnlineRegs) :is(input,select,textarea,button,label.button,details>summary):not(:is(#drawEventSelection,#drawSelectedEventReport,#exportCurrentEvent,#printSchedule,#pvPrintSchedule,#pvPrintAssignment,#backupbtn,#qRosterToggle)){pointer-events:none!important;opacity:.45!important}
html.pv-finished body #hcWorkspace>section:is(#draw) #drawEventToolbar :is(#drawSelectedEventBuild,#drawAllEventsBuild){display:none!important}
html.pv-finished body #pvStepNav .pv-flow-step.locked{opacity:1}

/* Referee: inline manual score editor under the scoreboard (no pop-up) */
html body .pv-score-edit{flex:1 1 100%;margin-top:4px;padding:12px;border-radius:12px;background:rgba(8,20,40,.6);border:1px solid rgba(63,182,255,.35)}
html body .pv-score-edit-head{margin:0 0 8px;color:#cfe0fa;font-size:14px}
html body .pv-score-edit-grid{display:grid;grid-template-columns:auto 1fr 1fr;gap:8px 10px;align-items:center}
html body .pv-score-edit-grid b{font-size:14px;color:#e8f0ff;text-align:center;overflow-wrap:anywhere}
html body .pv-score-edit-grid span{color:#9fb3d1;font-weight:600;white-space:nowrap}
html body .pv-score-edit-grid input{width:100%;min-height:48px;font-size:22px;font-weight:700;text-align:center}
html body .pv-score-edit-err{min-height:1.2em;margin:8px 0 0;color:#fca5a5;font-weight:600}
html body .pv-score-edit-actions{display:flex;gap:8px;margin-top:8px}
html body .pv-score-edit-actions button{flex:1 1 0;min-height:48px}

/* VIP payment: QR + transfer details */
html body .pv-pay{display:flex;flex-wrap:wrap;gap:16px;align-items:center;margin:8px 0;padding:14px;border-radius:12px;background:rgba(236,72,153,.08);border:1px solid rgba(236,72,153,.35)}
html body .pv-pay img{width:240px;max-width:100%;height:auto;border-radius:12px;background:#fff}
html body .pv-pay>div{flex:1 1 240px}html body .pv-pay p{margin:4px 0}
html body .pv-pay-note{font-family:Consolas,monospace;font-size:16px;color:#fde68a;letter-spacing:.5px}
