/* Khao sat noi bo (/khao-sat, /khao-sat/lam, /khao-sat/quan-ly, /khao-sat/soan).
 * MOI selector nam duoi #ec-svy va dung tien to svy- : class chung chung (.row, .btn, .card,
 * .nav) dung Bootstrap ma Frappe nap toan site (do 16/09 tren live). Doi file nay -> chay
 * `python -m ecentric_workspace.surveys.pages.assets --stamp` de doi ?v= trong 4 trang. */

/* ---- vo trang: an header/footer ERPNext, luoi 248px | noi dung ---- */
body > header, body > footer, body > nav.navbar, header.navbar, .navbar.navbar-light,
.web-page-header, #navbarSupportedContent, .navbar-collapse, .web-footer, footer.web-footer { display:none !important; }
body { padding:0 !important; margin:0 !important; background:#f5f6fa !important; }
body main { padding-top:0 !important; }
body .main-section, body main.container, body main.fluid, body .page_content, body .page-content {
  margin:0 !important; padding:0 !important; max-width:none !important; }
#ec-svy { display:grid; grid-template-columns:248px minmax(0,1fr); min-height:100vh; width:100%; }
#ec-svy > .ec-shell-mount { position:sticky; top:0; height:100vh; overflow:auto; }
#ec-svy > main.svy-main { min-width:0; background:var(--ground); }
@media (max-width:900px) {
  #ec-svy { grid-template-columns:minmax(0,1fr); }
  #ec-svy > .ec-shell-mount { display:none; }
}

#ec-svy {
  --ground:#f5f6fa; --surface:#fff; --ink:#111827; --ink2:#374151; --ink3:#6b7280; --ink4:#9ca3af;
  --line:#e5e7eb; --line2:#f1f2f6; --navy:#2C3DA6; --navy-d:#1f2c80; --wash:#eef0fb; --navy-line:#c9d0f0;
  --gold:#f5b800; --gold-ink:#3a2c00; --ok:#17683a; --ok-bg:#e7f6ec; --warn:#8a5a08; --warn-bg:#fdf3e2;
  --bad:#b42318; --bad-bg:#fdecea; --run:#1d4ed8; --run-bg:#e6efff; --accent:#2C3DA6;
  --r:12px; --shadow:0 1px 2px rgba(17,24,39,.05);
  font-family:'Inter',-apple-system,"Segoe UI",Roboto,sans-serif; font-size:14px; line-height:1.5; color:var(--ink);
}
#ec-svy *, #ec-svy *::before, #ec-svy *::after { box-sizing:border-box; }
/* :where() = do dac hieu 0 cho phan reset, de .svy-b.pri { color:#fff } van thang (do 01/10: #ec-svy a
   lam chu nut chinh mau xanh tren nen xanh - mat chu). */
:where(#ec-svy) button, :where(#ec-svy) input, :where(#ec-svy) select, :where(#ec-svy) textarea { font:inherit; color:inherit; }
#ec-svy :focus-visible { outline:2px solid var(--navy); outline-offset:2px; }
:where(#ec-svy) a { color:var(--navy); }
:where(#ec-svy) :is(h1, h2, h3, h4) { margin:0; color:var(--ink); letter-spacing:-.01em; }
#ec-svy [hidden] { display:none !important; }

.svy-wrap { max-width:1180px; margin:0 auto; padding:20px 24px 80px; display:flex; flex-direction:column; gap:16px; }
.svy-wrap.svy-narrow { max-width:780px; }
@media (max-width:640px) { .svy-wrap { padding:14px 12px 96px; } }

/* ---- nut ---- */
.svy-b { appearance:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius:9px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink2); font-weight:600; font-size:13.5px;
  padding:8px 14px; cursor:pointer; text-decoration:none; white-space:nowrap; line-height:1.2; }
.svy-b:hover { border-color:var(--navy-line); color:var(--navy); text-decoration:none; }
.svy-b:disabled { opacity:.55; cursor:not-allowed; }
.svy-b.pri { background:var(--navy); border-color:var(--navy); color:#fff; }
.svy-b.pri:hover { background:var(--navy-d); color:#fff; }
.svy-b.gold { background:var(--gold); border-color:var(--gold); color:var(--gold-ink); }
.svy-b.ghost { border-color:transparent; background:transparent; }
.svy-b.ghost:hover { background:var(--line2); }
.svy-b.danger { color:var(--bad); }
.svy-b.danger:hover { border-color:#f4b5ae; background:var(--bad-bg); color:var(--bad); }
.svy-b.sm { padding:5px 10px; font-size:12.5px; border-radius:8px; }
.svy-b.icon { padding:6px; width:32px; height:32px; }
.svy-b svg, .svy-ico { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.svy-b.busy { position:relative; color:transparent !important; }
.svy-b.busy::after { content:""; position:absolute; width:14px; height:14px; border-radius:50%;
  border:2px solid rgba(127,127,127,.35); border-top-color:currentColor; animation:svy-spin .7s linear infinite; color:var(--ink2); }
.svy-b.pri.busy::after { border-top-color:#fff; }
@keyframes svy-spin { to { transform:rotate(360deg); } }

/* ---- the, nhan, chip ---- */
.svy-panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow); }
.svy-pad { padding:18px 20px; }
@media (max-width:640px) { .svy-pad { padding:14px; } }
.svy-pill { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border-radius:999px; font-size:11.5px; font-weight:600; white-space:nowrap; }
.svy-pill.ok { background:var(--ok-bg); color:var(--ok); } .svy-pill.warn { background:var(--warn-bg); color:var(--warn); }
.svy-pill.bad { background:var(--bad-bg); color:var(--bad); } .svy-pill.run { background:var(--run-bg); color:var(--run); }
.svy-pill.mute { background:var(--line2); color:var(--ink3); } .svy-pill.gold { background:#fff4cc; color:#6b4e00; }
.svy-eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--ink4); font-weight:600; }
.svy-muted { color:var(--ink3); } .svy-small { font-size:12.5px; }
.svy-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.svy-row.between { justify-content:space-between; }
.svy-grow { flex:1; min-width:0; }
.svy-empty { padding:36px 18px; text-align:center; color:var(--ink3); }
.svy-empty b { display:block; color:var(--ink); font-size:15px; margin-bottom:4px; }
.svy-skel { height:14px; border-radius:6px; margin:10px 0; background:linear-gradient(90deg,#f1f2f6,#e5e7eb,#f1f2f6);
  background-size:200% 100%; animation:svy-sh 1.2s linear infinite; }
@keyframes svy-sh { to { background-position:-200% 0; } }

/* ---- hero ---- */
.svy-hero { position:relative; overflow:hidden; border-radius:16px; background:var(--navy); color:#fff; padding:22px 24px;
  display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
.svy-hero > * { position:relative; }
.svy-hero > .b1, .svy-hero > .b2 { position:absolute; border-radius:50%; pointer-events:none; }
.svy-hero > .b1 { width:180px; height:180px; right:-40px; top:-70px; background:#EF7CAF; opacity:.9; }
.svy-hero > .b2 { width:90px; height:90px; right:150px; bottom:-50px; background:#FFC000; opacity:.95; }
#ec-svy .svy-hero h1 { color:#fff; font-size:22px; font-weight:700; }
.svy-hero p { margin:2px 0 0; color:rgba(255,255,255,.78); max-width:62ch; }
.svy-stats { display:flex; gap:8px; flex-wrap:wrap; }
.svy-stat { background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18); border-radius:10px; padding:8px 12px; min-width:92px; }
.svy-stat span { display:block; font-size:10.5px; letter-spacing:.07em; text-transform:uppercase; color:rgba(255,255,255,.72); font-weight:600; }
.svy-stat b { font-size:20px; font-variant-numeric:tabular-nums; }
.svy-stat.hl { border-color:var(--gold); } .svy-stat.hl b { color:var(--gold); }

/* ---- tab ---- */
.svy-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none; }
.svy-tab { appearance:none; border:0; background:none; padding:10px 14px; font-weight:600; color:var(--ink3); cursor:pointer;
  border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; display:inline-flex; gap:6px; align-items:center; }
.svy-tab:hover { color:var(--ink); }
.svy-tab.on { color:var(--navy); border-bottom-color:var(--navy); }
.svy-tab .n { min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--line2); font-size:11px; display:inline-grid; place-items:center; color:var(--ink3); }
.svy-tab.on .n { background:var(--navy); color:#fff; }
.svy-chips { display:flex; gap:6px; flex-wrap:wrap; }
.svy-chip { appearance:none; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:4px 12px; font-size:12.5px; font-weight:500; color:var(--ink2); cursor:pointer; }
.svy-chip.on { border-color:var(--navy); background:var(--wash); color:var(--navy); }

/* ---- the khao sat (hub / quan ly) ---- */
.svy-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:14px; }
.svy-card { position:relative; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:16px 16px 14px;
  display:flex; flex-direction:column; gap:8px; box-shadow:var(--shadow); overflow:hidden; }
.svy-card::before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--c, var(--navy)); }
.svy-card.a { padding:0; gap:0; border-radius:16px; }
.svy-card.a::before { display:none; }
.svy-chead { position:relative; overflow:hidden; background:var(--c, var(--navy)); color:var(--on-c, #fff); padding:14px 16px 16px; min-height:112px;
  display:flex; flex-direction:column; justify-content:space-between; gap:10px; }
#ec-svy .svy-chead h3 { position:relative; color:inherit; font-size:17px; font-weight:800; max-width:86%; }
.svy-chead > .sh1 { right:-18px; bottom:-26px; width:96px; height:96px; border-radius:28px; transform:rotate(18deg); opacity:.22; }
.svy-chead > .sh2 { right:42px; top:-20px; width:44px; height:44px; border-radius:50%; opacity:.16; }
.svy-chead .svy-pill { background:rgba(255,255,255,.92); }
.svy-cbody { padding:12px 16px 14px; display:flex; flex-direction:column; gap:10px; flex:1; }
.svy-card h3 { font-size:15.5px; font-weight:700; line-height:1.35; }
.svy-card .desc { color:var(--ink3); font-size:13px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.svy-meta { display:flex; flex-wrap:wrap; gap:4px 12px; color:var(--ink3); font-size:12.5px; }
.svy-meta b { color:var(--ink); font-variant-numeric:tabular-nums; font-weight:600; }
.svy-card .foot { margin-top:auto; padding-top:6px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.svy-ticket { display:inline-flex; align-items:center; gap:8px; background:#fff8e1; border:1px dashed #e6b800; color:#6b4e00; border-radius:8px; padding:3px 10px; font-weight:700; font-variant-numeric:tabular-nums; }
.svy-new { border-style:dashed; align-items:center; justify-content:center; text-align:center; cursor:pointer; color:var(--navy); font-weight:600; min-height:170px; background:transparent; box-shadow:none; }
.svy-new::before { display:none; }
.svy-new:hover { background:var(--wash); }

.svy-board { display:flex; flex-direction:column; }
.svy-board .it { display:flex; align-items:center; gap:12px; padding:12px 16px; border-top:1px solid var(--line2); }
.svy-board .it:first-child { border-top:0; }
.svy-board .it.me { background:#fffbea; }
.svy-av { width:34px; height:34px; border-radius:50%; background:var(--wash); color:var(--navy); display:grid; place-items:center; font-weight:700; font-size:12.5px; flex:none; }
.svy-medal { font-size:20px; }

/* ---- bang (quan ly) ---- */
.svy-table { width:100%; border-collapse:collapse; }
.svy-table th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink4); font-weight:600; padding:10px 12px; border-bottom:1px solid var(--line); }
.svy-table td { padding:12px; border-bottom:1px solid var(--line2); vertical-align:middle; }
.svy-table tr:last-child td { border-bottom:0; }
.svy-table .title a { font-weight:600; color:var(--ink); text-decoration:none; }
.svy-table .title a:hover { color:var(--navy); }
@media (max-width:760px) {
  .svy-table thead { display:none; }
  .svy-table tr { display:block; padding:10px 4px; border-bottom:1px solid var(--line2); }
  .svy-table td { display:flex; justify-content:space-between; gap:12px; padding:4px 10px; border:0; }
  .svy-table td::before { content:attr(data-l); color:var(--ink4); font-size:12px; }
  .svy-table td.title::before { content:none; }
}

/* ---- form tra loi ---- */
/* Phuong an A "The mau" (PO chot 01/10/2026): dau phieu la khoi mau dac cua khao sat, co hoa tiet. */
.svy-fhead { border-radius:16px; overflow:hidden; }
.svy-fhead .band { position:relative; overflow:hidden; background:var(--accent); color:var(--on-accent, #fff); padding:22px 24px; }
.svy-fhead .band > .sh1, .svy-fhead .band > .sh2, .svy-chead > .sh1, .svy-chead > .sh2 { position:absolute; background:currentColor; pointer-events:none; }
.svy-fhead .band > .sh1 { right:-30px; top:-40px; width:140px; height:140px; border-radius:40px; opacity:.16; transform:rotate(20deg); }
.svy-fhead .band > .sh2 { right:120px; bottom:-36px; width:70px; height:70px; border-radius:50%; opacity:.12; }
#ec-svy .svy-fhead h1 { position:relative; color:inherit; font-size:24px; font-weight:800; line-height:1.3; max-width:90%; }
.svy-fhead .desc { position:relative; margin-top:8px; opacity:.9; white-space:pre-line; }
.svy-fhead .svy-meta { padding:12px 24px 16px; }
.svy-q { border-left:3px solid transparent; transition:border-color .15s; }
.svy-q.err { border-left-color:var(--bad); }
.svy-q .qt { font-size:15px; font-weight:600; color:var(--ink); }
.svy-q .qt .req { color:var(--bad); margin-left:3px; }
.svy-q .qd { color:var(--ink3); font-size:13px; margin-top:2px; white-space:pre-line; }
.svy-q .qbody { margin-top:12px; }
.svy-q .qerr { margin-top:10px; color:var(--bad); font-size:12.5px; font-weight:500; display:flex; gap:6px; align-items:center; }
.svy-q .pts { float:right; font-size:12px; color:var(--ink4); font-weight:500; }
.svy-asec { border-radius:var(--r); padding:14px 18px; background:var(--accent); color:var(--on-accent, #fff); }
.svy-asec .eb { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; opacity:.75; }
#ec-svy .svy-asec h2 { color:inherit; font-size:17px; font-weight:800; }
.svy-asec .qd { margin-top:4px; opacity:.88; white-space:pre-line; }
.svy-sec { background:var(--accent); color:#fff; border-radius:var(--r) var(--r) 0 0; padding:8px 16px; font-size:12.5px; font-weight:600; }
.svy-sech { border-radius:0 0 var(--r) var(--r); }
.svy-sech h2 { font-size:17px; } .svy-sech .qd { margin-top:4px; color:var(--ink3); white-space:pre-line; }
.svy-note h2 { font-size:16px; } .svy-note .qd { margin-top:4px; color:var(--ink2); white-space:pre-line; }

.svy-in, .svy-ta, .svy-sel { width:100%; border:1px solid var(--line); border-radius:9px; padding:9px 12px; background:var(--surface); min-height:40px; }
.svy-in:focus, .svy-ta:focus, .svy-sel:focus { border-color:var(--navy); outline:none; box-shadow:0 0 0 3px rgba(44,61,166,.12); }
.svy-ta { min-height:88px; resize:vertical; }
.svy-in.line { border:0; border-bottom:1px solid var(--line); border-radius:0; padding-left:0; padding-right:0; box-shadow:none; }
.svy-in.line:focus { border-bottom:2px solid var(--navy); box-shadow:none; }
.svy-opts { display:flex; flex-direction:column; gap:4px; }
.svy-opt { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:9px; cursor:pointer; border:1px solid transparent; }
.svy-opt:hover { background:var(--line2); }
.svy-opt.on { background:var(--wash); border-color:var(--navy-line); }
.svy-opt input[type=radio], .svy-opt input[type=checkbox] { width:18px; height:18px; accent-color:var(--accent); margin:0; flex:none; }
.svy-opt .svy-in { min-height:34px; padding:6px 10px; }
.svy-scale { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
.svy-scale .lab { color:var(--ink3); font-size:12.5px; max-width:110px; }
.svy-scale .nums { display:flex; gap:6px; flex-wrap:wrap; }
.svy-num { appearance:none; width:42px; height:42px; border-radius:10px; border:1px solid var(--line); background:var(--surface); font-weight:600; cursor:pointer; font-variant-numeric:tabular-nums; }
.svy-num:hover { border-color:var(--accent); }
.svy-num.on { background:var(--accent); border-color:var(--accent); color:#fff; }
@media (max-width:640px) { .svy-num { width:36px; height:38px; } .svy-scale .lab { max-width:none; width:100%; } }
.svy-stars { display:flex; gap:4px; }
.svy-star { appearance:none; border:0; background:none; padding:2px; cursor:pointer; color:#d1d5db; }
.svy-star svg { width:32px; height:32px; fill:currentColor; stroke:none; }
.svy-star.on { color:#f5b800; }
.svy-grid { overflow-x:auto; }
.svy-grid table { border-collapse:collapse; min-width:100%; }
.svy-grid th { font-weight:500; font-size:12.5px; color:var(--ink3); padding:6px 8px; text-align:center; }
.svy-grid td { padding:8px; text-align:center; border-top:1px solid var(--line2); }
.svy-grid td.rl { text-align:left; font-weight:500; color:var(--ink2); min-width:140px; }
.svy-grid input { width:18px; height:18px; accent-color:var(--accent); }
.svy-rank { display:flex; flex-direction:column; gap:6px; }
.svy-rank .it { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:9px; padding:6px 8px 6px 12px; background:var(--surface); }
.svy-rank .pos { width:24px; height:24px; border-radius:50%; background:var(--wash); color:var(--navy); display:grid; place-items:center; font-size:12px; font-weight:700; flex:none; }
.svy-files { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.svy-file { display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:8px; padding:6px 10px; font-size:13px; }
.svy-progress { height:6px; border-radius:3px; background:var(--line); overflow:hidden; }
.svy-progress i { display:block; height:100%; background:var(--accent); }
.svy-nav { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.svy-banner { display:flex; gap:10px; align-items:flex-start; border-radius:10px; padding:10px 14px; font-size:13px; background:var(--wash); border:1px solid var(--navy-line); color:var(--ink2); }
.svy-banner.warn { background:var(--warn-bg); border-color:#f3d9a4; color:#6b4300; }
.svy-banner.bad { background:var(--bad-bg); border-color:#f4c2c2; color:var(--bad); }
.svy-banner.ok { background:var(--ok-bg); border-color:#b7e3c4; color:var(--ok); }

/* ---- sau khi nop + phan thuong ---- */
.svy-done { text-align:center; padding:28px 20px; }
.svy-done .tick { width:56px; height:56px; border-radius:50%; background:var(--ok-bg); color:var(--ok); display:grid; place-items:center; margin:0 auto 10px; }
.svy-done .tick svg { width:28px; height:28px; }
.svy-score { font-size:34px; font-weight:800; color:var(--accent); font-variant-numeric:tabular-nums; }
.svy-reward { display:flex; flex-direction:column; align-items:center; gap:14px; padding:22px 16px 26px; text-align:center;
  background:radial-gradient(120% 90% at 50% 0%, #fff8e1 0%, #fff 70%); }
.svy-wheelbox { position:relative; width:min(320px,82vw); aspect-ratio:1; }
.svy-wheelbox svg.wheel { width:100%; height:100%; transition:transform 5.2s cubic-bezier(.12,.68,.08,1); filter:drop-shadow(0 6px 14px rgba(17,24,39,.18)); }
.svy-wheelbox .pin { position:absolute; left:50%; top:-6px; transform:translateX(-50%); width:0; height:0;
  border-left:14px solid transparent; border-right:14px solid transparent; border-top:26px solid #b42318; filter:drop-shadow(0 2px 2px rgba(0,0,0,.25)); z-index:2; }
.svy-wheelbox .hub { position:absolute; left:50%; top:50%; width:22%; height:22%; transform:translate(-50%,-50%); border-radius:50%; background:#fff;
  border:4px solid var(--gold); display:grid; place-items:center; font-weight:800; color:var(--navy); font-size:12px; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.svy-big-ticket { display:inline-flex; flex-direction:column; align-items:center; gap:2px; padding:14px 28px; border-radius:14px; background:#fff;
  border:2px dashed #e6b800; box-shadow:0 4px 14px rgba(230,184,0,.18); }
.svy-big-ticket b { font-size:44px; letter-spacing:.08em; color:#6b4e00; font-variant-numeric:tabular-nums; line-height:1.1; }
.svy-confetti { position:fixed; inset:0; pointer-events:none; z-index:80; overflow:hidden; }
.svy-confetti i { position:absolute; top:-12px; width:8px; height:14px; border-radius:2px; animation:svy-fall 2.6s ease-in forwards; }
@keyframes svy-fall { to { transform:translateY(105vh) rotate(720deg); opacity:.9; } }

/* ---- tong hop ket qua ---- */
.svy-bars { display:flex; flex-direction:column; gap:8px; }
.svy-bar { display:grid; grid-template-columns:minmax(120px,38%) 1fr 64px; gap:10px; align-items:center; font-size:13px; }
.svy-bar .t { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink2); }
.svy-bar .track { height:22px; background:var(--line2); border-radius:6px; overflow:hidden; }
.svy-bar .track i { display:block; height:100%; background:var(--accent); border-radius:6px; min-width:2px; }
.svy-bar .v { text-align:right; font-variant-numeric:tabular-nums; color:var(--ink3); }
.svy-bar .v b { color:var(--ink); }
@media (max-width:640px) { .svy-bar { grid-template-columns:1fr 56px; } .svy-bar .t { grid-column:1 / -1; } }
.svy-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.svy-kpi { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.svy-kpi span { display:block; font-size:11.5px; color:var(--ink4); text-transform:uppercase; letter-spacing:.05em; font-weight:600; }
.svy-kpi b { font-size:22px; font-variant-numeric:tabular-nums; }
.svy-texts { display:flex; flex-direction:column; gap:6px; max-height:320px; overflow:auto; }
.svy-texts div { background:var(--ground); border-radius:8px; padding:8px 10px; font-size:13px; white-space:pre-line; }
.svy-avg { font-size:28px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--accent); }

/* ---- trinh soan ---- */
.svy-bhead { position:sticky; top:0; z-index:20; background:rgba(245,246,250,.92); backdrop-filter:blur(6px); border-bottom:1px solid var(--line); }
.svy-bhead .in { max-width:1180px; margin:0 auto; padding:10px 24px 0; display:flex; flex-direction:column; gap:8px; }
@media (max-width:640px) { .svy-bhead .in { padding:8px 12px 0; } }
.svy-bhead .ttl { font-weight:700; font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.svy-save { font-size:12px; color:var(--ink4); white-space:nowrap; }
.svy-save.err { color:var(--bad); }
.svy-items { display:flex; flex-direction:column; gap:12px; }
.svy-item { position:relative; cursor:pointer; border-left:4px solid transparent; }
.svy-item.on { cursor:default; border-left-color:var(--navy); box-shadow:0 4px 18px rgba(17,24,39,.08); }
.svy-item .prev .qt { font-weight:600; }
.svy-item .prev .opt { color:var(--ink3); font-size:13px; display:flex; align-items:center; gap:8px; padding:2px 0; }
.svy-item .prev .opt i { width:14px; height:14px; border:1.5px solid var(--ink4); border-radius:50%; flex:none; }
.svy-item .prev .opt i.sq { border-radius:3px; }
.svy-item .badge { position:absolute; top:10px; right:12px; }
.svy-item:not(.on) .prev { padding-right:150px; }
@media (max-width:640px) { .svy-item .badge { position:static; display:inline-flex; margin-bottom:6px; } .svy-item:not(.on) .prev { padding-right:0; } }
.svy-ed { display:flex; flex-direction:column; gap:12px; }
.svy-ed .top { display:grid; grid-template-columns:1fr 220px; gap:10px; }
@media (max-width:640px) { .svy-ed .top { grid-template-columns:1fr; } }
.svy-ed .ttl-in { font-size:15px; font-weight:600; background:var(--ground); border:0; border-bottom:2px solid var(--line); border-radius:8px 8px 0 0; padding:10px 12px; width:100%; }
.svy-ed .ttl-in:focus { outline:none; border-bottom-color:var(--navy); }
.svy-oe { display:flex; align-items:center; gap:8px; }
.svy-oe .mk { width:16px; height:16px; border:1.5px solid var(--ink4); border-radius:50%; flex:none; }
.svy-oe .mk.sq { border-radius:3px; }
.svy-oe .svy-in { min-height:34px; padding:6px 10px; }
.svy-oe .ok { color:var(--ok); border-color:var(--ok); background:var(--ok-bg); }
.svy-oe select.svy-sel { width:auto; min-height:34px; padding:4px 8px; max-width:200px; font-size:12.5px; }
.svy-edfoot { display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; border-top:1px solid var(--line2); padding-top:10px; margin-top:16px; }
.svy-switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; user-select:none; }
.svy-switch input { appearance:none; width:34px; height:20px; border-radius:10px; background:#d1d5db; position:relative; cursor:pointer; transition:background .15s; margin:0; flex:none; }
.svy-switch input::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.svy-switch input:checked { background:var(--navy); }
.svy-switch input:checked::after { left:16px; }
.svy-addbar { position:sticky; bottom:12px; z-index:15; display:flex; gap:6px; justify-content:center; flex-wrap:wrap; }
.svy-addbar .box { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:6px; display:flex; gap:4px; box-shadow:0 6px 20px rgba(17,24,39,.12); flex-wrap:wrap; justify-content:center; }
.svy-field { display:flex; flex-direction:column; gap:5px; }
.svy-field > label, .svy-lbl { font-size:12.5px; font-weight:600; color:var(--ink2); }
.svy-field .hint { font-size:12px; color:var(--ink4); }
.svy-form2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
@media (max-width:760px) { .svy-form2 { grid-template-columns:minmax(0,1fr); } }
.svy-setrow { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--line2); }
.svy-setrow:first-child { border-top:0; }
.svy-setrow .t b { display:block; font-weight:600; font-size:13.5px; } .svy-setrow .t span { color:var(--ink3); font-size:12.5px; }
.svy-swatches { display:flex; gap:8px; flex-wrap:wrap; }
.svy-sw { appearance:none; width:28px; height:28px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px var(--line); cursor:pointer; }
.svy-sw.on { box-shadow:0 0 0 2px var(--ink); }
.svy-modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
@media (max-width:760px) { .svy-modes { grid-template-columns:minmax(0,1fr); } }
.svy-mode { appearance:none; text-align:left; border:1.5px solid var(--line); background:var(--surface); border-radius:12px; padding:14px; cursor:pointer; display:flex; flex-direction:column; gap:4px; }
.svy-mode b { font-size:14px; } .svy-mode span { font-size:12.5px; color:var(--ink3); }
.svy-mode.on { border-color:var(--navy); background:var(--wash); }
.svy-tree { max-height:340px; overflow:auto; border:1px solid var(--line); border-radius:10px; padding:6px; }
.svy-tree label { display:flex; align-items:center; gap:8px; padding:5px 6px; border-radius:6px; cursor:pointer; font-size:13px; }
.svy-tree label:hover { background:var(--line2); }
.svy-tree input { width:16px; height:16px; accent-color:var(--navy); }
.svy-tags { display:flex; flex-wrap:wrap; gap:6px; }
.svy-tag { display:inline-flex; align-items:center; gap:4px; background:var(--wash); color:var(--navy); border-radius:999px; padding:3px 4px 3px 10px; font-size:12.5px; font-weight:500; }
.svy-tag.x { background:var(--bad-bg); color:var(--bad); }
.svy-tag button { appearance:none; border:0; background:none; width:20px; height:20px; border-radius:50%; cursor:pointer; color:inherit; display:grid; place-items:center; }
.svy-tag button:hover { background:rgba(0,0,0,.08); }
.svy-pick { position:relative; }
.svy-pick .list { position:absolute; left:0; right:0; top:calc(100% + 4px); background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 24px rgba(17,24,39,.14); max-height:260px; overflow:auto; z-index:30; }
.svy-pick .list button { appearance:none; display:flex; width:100%; gap:8px; align-items:center; text-align:left; border:0; background:none; padding:8px 12px; cursor:pointer; font-size:13px; }
.svy-pick .list button:hover, .svy-pick .list button.act { background:var(--wash); }
.svy-prize { display:grid; grid-template-columns:28px 1fr 96px 80px 36px; gap:8px; align-items:center; }
@media (max-width:640px) { .svy-prize { grid-template-columns:28px 1fr 70px 36px; } .svy-prize .aw { display:none; } }
.svy-prize input[type=color] { width:28px; height:28px; border:0; padding:0; background:none; cursor:pointer; }

/* ---- modal / toast ---- */
.svy-modal { position:fixed; inset:0; background:rgba(17,24,39,.5); display:grid; place-items:center; z-index:70; padding:16px; }
.svy-modal .box { background:var(--surface); border-radius:14px; width:100%; max-width:560px; max-height:90vh; overflow:auto; padding:20px; display:flex; flex-direction:column; gap:14px; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.svy-modal .box.wide { max-width:820px; }
.svy-modal h3 { font-size:17px; }
.svy-tpls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
@media (max-width:560px) { .svy-tpls { grid-template-columns:minmax(0,1fr); } }
.svy-tpl { appearance:none; text-align:left; border:1.5px solid var(--line); border-radius:12px; padding:14px; background:var(--surface); cursor:pointer; display:flex; flex-direction:column; gap:4px; }
.svy-tpl:hover { border-color:var(--navy); background:var(--wash); }
.svy-tpl b { font-size:14px; } .svy-tpl span { font-size:12.5px; color:var(--ink3); }
.svy-toast { position:fixed; left:50%; bottom:22px; transform:translate(-50%,16px); opacity:0; background:#111827; color:#fff; padding:11px 16px; border-radius:10px;
  font-size:13.5px; z-index:90; transition:.2s; pointer-events:none; max-width:min(92vw,560px); white-space:pre-line; }
.svy-toast.show { opacity:1; transform:translate(-50%,0); }
.svy-toast.err { background:#b42318; }
@media (prefers-reduced-motion:reduce) { .svy-wheelbox svg.wheel { transition-duration:.01s; } .svy-confetti { display:none; } }

/* ---- phan thuong v2 (01/10/2026): vong quay chia dot, chon so may man, dua ve dich ---- */
.svy-wave-h { font-size:20px; font-weight:800; }
.svy-waves { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
.svy-wave { border-radius:999px; padding:4px 12px; font-size:12px; font-weight:600; background:var(--line2); color:var(--ink3); }
.svy-wave.done { background:var(--ok-bg); color:var(--ok); }
.svy-wave.on { background:var(--wash); color:var(--navy); box-shadow:0 0 0 2px var(--navy) inset; }
.svy-npages { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
.svy-ngrid { display:grid; grid-template-columns:repeat(10, minmax(0,1fr)); gap:6px; width:100%; max-width:560px; }
.svy-num { appearance:none; border:1px solid var(--line); background:var(--surface); border-radius:8px; padding:7px 0; font-weight:700;
  font-size:13px; font-variant-numeric:tabular-nums; color:var(--ink2); cursor:pointer; }
.svy-num:hover:not(:disabled):not(.mine) { border-color:var(--navy); color:var(--navy); background:var(--wash); }
.svy-num.taken { background:var(--line2); color:var(--ink4); cursor:not-allowed; text-decoration:line-through; }
.svy-num.mine { background:#EF7CAF; border-color:#EF7CAF; color:#fff; cursor:default; }
.svy-num.busy { opacity:.6; }
.svy-holders { width:100%; max-width:560px; text-align:left; display:flex; flex-direction:column; gap:8px; }
.svy-hlist { display:flex; flex-wrap:wrap; gap:6px; }
.svy-holder { display:inline-flex; gap:6px; align-items:center; border:1px solid var(--line); border-radius:999px; padding:2px 10px 2px 4px; font-size:12.5px; background:var(--surface); }
.svy-holder b { background:var(--wash); color:var(--navy); border-radius:999px; padding:1px 7px; font-variant-numeric:tabular-nums; }
.svy-holder.me { border-color:#EF7CAF; } .svy-holder.me b { background:#EF7CAF; color:#fff; }
.svy-cart { font-size:56px; line-height:1; }
.svy-progress i { background:linear-gradient(90deg, var(--navy), #EF7CAF); }
.svy-timeline { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:10px; }
.svy-tl { border:1px solid var(--line); border-radius:12px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.svy-tl i { font-style:normal; width:22px; height:22px; border-radius:50%; background:var(--navy); color:#fff; display:grid; place-items:center; font-size:11px; font-weight:800; }
.svy-tl b { font-size:13.5px; }
.svy-mode-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px,1fr)); gap:10px; }
@media (max-width:640px) { .svy-ngrid { grid-template-columns:repeat(6, minmax(0,1fr)); } }

/* ---- Va CSS cua Frappe (do tren team.ecentric.vn 02/10/2026) ----
 * website.bundle.css co hai luat toan site de len trang khao sat:
 *   .icon { margin:0 auto; font-size:0; width:20px; height:20px }  -> nut .svy-b.icon bi day ra giua
 *      (nut Quay lai lech, 4 nut cuoi the cau hoi gian deu ca hang).
 *   input[type=checkbox] { appearance:none; width:var(--checkbox-size) !important; margin-right:...;
 *      border; :checked -> background-image dau tick }  -> cong tac .svy-switch co lai 14px, nut tron
 *      de len chu.
 * Ghi de bang #ec-svy + !important CHI cho thuoc tinh ma Frappe dat !important (quy tac frontend: chi
 * dung !important khi de thu vien ben thu ba). */
#ec-svy .svy-b.icon { margin:0; font-size:13.5px; background-size:auto; }
#ec-svy .svy-switch input[type=checkbox] { width:34px !important; min-width:34px; height:20px; margin:0 !important; padding:0;
  border:0; border-radius:10px; background:#d1d5db; background-image:none; box-shadow:none; }
#ec-svy .svy-switch input[type=checkbox]:checked { background:var(--navy); background-image:none; border:0; }
#ec-svy .svy-switch input[type=checkbox]:focus-visible { box-shadow:0 0 0 3px rgba(44,61,166,.25); }
#ec-svy .svy-opt input[type=checkbox], #ec-svy .svy-opt input[type=radio] { width:18px !important; height:18px; margin:0 !important; }

/* ---- hop qua goc the (PO 02/10): tro chuot / cham -> danh sach qua ---- */
.svy-gift { position:absolute; top:12px; right:12px; z-index:3; }
#ec-svy .svy-gbtn { position:relative; width:40px; height:40px; border-radius:12px; border:0; padding:0; cursor:pointer;
  display:grid; place-items:center; background:#ffd43b; color:#5c4100; box-shadow:0 4px 12px rgba(0,0,0,.18);
  transition:transform .18s ease; }
#ec-svy .svy-gbtn svg { width:20px; height:20px; }
#ec-svy .svy-gbtn:hover, .svy-gift.on .svy-gbtn { transform:translateY(-1px) rotate(-6deg); }
#ec-svy .svy-gbtn:focus-visible { outline:3px solid rgba(255,255,255,.85); outline-offset:2px; }
.svy-gbtn .cnt { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:#e8384f; color:#fff; font-size:11px; font-weight:700; line-height:18px; font-variant-numeric:tabular-nums; }
.svy-gpop { position:fixed; top:0; left:0; z-index:1060; width:264px; max-width:calc(100vw - 48px); max-height:236px; overflow:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 28px rgba(16,24,40,.18);
  padding:12px; display:flex; flex-direction:column; gap:8px; text-align:left;
  opacity:0; visibility:hidden; transform:translateY(-4px); transition:opacity .15s ease, transform .15s ease, visibility .15s; }
.svy-gift:hover .svy-gpop, .svy-gift:focus-within .svy-gpop, .svy-gift.on .svy-gpop { opacity:1; visibility:visible; transform:none; }
.svy-gpop .h { display:flex; align-items:center; gap:6px; font-weight:700; font-size:13px; color:#6b4e00; }
.svy-gpop .h svg { width:15px; height:15px; }
.svy-gpop .h span { margin-left:auto; color:var(--ink3); font-weight:500; font-size:12px; }
.svy-gpop ol { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.svy-gpop li { display:flex; align-items:center; gap:8px; font-size:13px; }
.svy-gpop li .n { flex:none; width:20px; height:20px; border-radius:6px; background:#fff4cc; color:#6b4e00; font-size:11px; font-weight:700;
  display:grid; place-items:center; }
.svy-gpop li .l { flex:1; min-width:0; }
.svy-gpop li b { flex:none; font-variant-numeric:tabular-nums; color:var(--ink2, var(--ink)); }
.svy-gpop .w, .svy-gpop .e { font-size:12px; color:var(--ink3); border-top:1px dashed var(--line); padding-top:8px; }
.svy-gpop .w + .w { border-top:0; padding-top:0; }
.svy-gpop .w b { color:var(--ink); }
#ec-svy .svy-chead h3 { max-width:calc(100% - 44px); }
@media (prefers-reduced-motion: reduce) { #ec-svy .svy-gbtn, .svy-gpop { transition:none; } }
/* hop qua tren dau form lam khao sat */
.svy-fhead { position:relative; }
.svy-fhead .svy-gift { top:16px; right:16px; }
#ec-svy .svy-fhead .svy-gbtn { width:46px; height:46px; border-radius:14px; }
#ec-svy .svy-fhead .svy-gbtn svg { width:23px; height:23px; }
#ec-svy .svy-fhead h1 { max-width:calc(100% - 56px); }
/* cau noi trong suot qua khe 8px giua nut va popover: re chuot tu nut sang danh sach khong bi tat */
.svy-gpop::before, .svy-gpop::after { content:""; position:absolute; left:0; right:0; height:10px; }
.svy-gpop::before { top:-10px; } .svy-gpop::after { bottom:-10px; }
/* bang so da chon trong Ket qua (nguoi quan ly) */
.svy-held { margin-top:10px; display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:6px 12px; max-height:340px; overflow:auto; }
.svy-held .it { display:flex; align-items:center; gap:8px; min-width:0; font-size:13px; }
.svy-held .it > span:last-child:not(.svy-ticket) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.svy-held .svy-ticket { padding:1px 8px; flex:none; }
/* da nop - chua chon so (Ket qua) */
.svy-unpick { margin-top:12px; padding:10px 12px; border:1px dashed #e6b800; background:#fffbea; border-radius:10px; display:flex; flex-direction:column; gap:8px; }
.svy-unpick-list { display:flex; flex-wrap:wrap; gap:6px; }
