/* NekiAI, hướng Sáng gọn chủ tịch chốt 02/11/2026: nền trắng ngà, một màu cam san hô cho nút chính và trạng thái đang chọn. */
:root {
  --bg: #fffcfa; --surface: #ffffff; --fg: #0f1222; --muted: #6c7080; --line: #ececee; --soft: #f1f1f3;
  --accent: #ff6647; --accent-strong: #e8492a; --accent-soft: #ffeee9; --accent-line: #ffb3a3;
  --danger: #c9301c; --danger-soft: #fff1ee; --ok: #1a7f4b;
  --r: 16px; --r-sm: 12px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--font); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
.hidden { display: none !important; }

/* Nút */
.btn { appearance: none; border: 0; border-radius: var(--r-sm); background: var(--soft); color: var(--fg); font: 500 15px/1.2 var(--font); padding: 12px 16px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn:hover { background: #e8e8eb; }
.btn:focus-visible, .tab:focus-visible, .pill:focus-visible, .choice:focus-within { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: #fff; font-weight: 600; font-size: 17px; min-height: 54px; padding: 14px 20px; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.block { width: 100%; }
.btn.small-btn { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.logo { font-weight: 700; font-size: 28px; letter-spacing: -0.02em; text-decoration: none; color: var(--fg); }

/* Khung trang */
.topbar { display: none; }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bal { display: inline-flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 15px; text-decoration: none; }
.bal .plus { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 17px; line-height: 1; }
.page { padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 1400px; margin: 0 auto; }
.page.with-dock { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 112px); }
.bnav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 10; }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12.5px; }
.bnav a.on { color: var(--accent-strong); font-weight: 600; }
.bnav svg { width: 24px; height: 24px; }
.dock { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; z-index: 9; display: grid; gap: 6px; }
.dock.split { grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.dock .price { font-weight: 700; font-size: 18px; line-height: 1.2; }
.dock .after { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.dock .btn.primary { min-height: 48px; font-size: 16px; padding: 10px 18px; }
.dock .form-error { grid-column: 1 / -1; }
.no-nav .dock { bottom: 0; padding-bottom: calc(10px + var(--safe-b)); }
.no-nav .page { padding-bottom: calc(var(--safe-b) + 24px); }

/* Thẻ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.form-error { color: var(--danger); font-size: 14px; line-height: 1.4; }
.form-note { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 0; }
.rows .big { font-size: 24px; font-weight: 700; }
.rows.small-rows > div { flex-wrap: wrap; font-size: 14.5px; padding: 10px 0; }
.tile .link { justify-self: center; font-size: 13.5px; min-height: 28px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }

/* Thanh bước */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 520px; margin: 4px auto 12px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); background: none; border: 0; font-family: inherit; padding: 0; }
.step[data-go] { cursor: pointer; }
.step::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #d6d6da; display: grid; place-items: center; color: #fff; }
.step.done .dot, .step.now .dot { background: var(--accent); }
.step.done::before, .step.now::before { background: var(--accent); }
.step.now { color: var(--fg); font-weight: 700; }
.step .dot svg { width: 16px; height: 16px; }

/* Lựa chọn */
.choice { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; background: #fff; cursor: pointer; }
.choice.on { border-color: var(--accent-line); background: var(--accent-soft); }
.choice input { appearance: none; width: 22px; height: 22px; border: 2px solid #b7b7bd; border-radius: 50%; margin: 0; flex: none; display: grid; place-items: center; background: #fff; }
.choice input:checked { border-color: var(--accent); }
.choice input:checked::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
label.field { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
input[type=text], input[type=search], input[type=number], input[type=url], textarea, select { width: 100%; border: 1px solid #dcdce0; border-radius: var(--r-sm); padding: 11px 14px; font: 400 16px/1.4 var(--font); background: #fff; color: var(--fg); min-height: 46px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

/* Bộ lọc */
.tabs { display: inline-flex; background: var(--soft); border-radius: var(--r-sm); padding: 0; }
.tab { border: 0; background: none; font: 500 15px var(--font); padding: 10px 18px; border-radius: var(--r-sm); cursor: pointer; color: var(--fg); min-height: 44px; }
.tab.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); font: 500 14.5px var(--font); padding: 9px 16px; cursor: pointer; color: var(--fg); min-height: 42px; }
.pill.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* Lưới ảnh */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.tile .pic { position: relative; aspect-ratio: 3/4; border-radius: var(--r-sm); background: var(--soft); overflow: hidden; }
.tile .pic.square { aspect-ratio: 1/1.05; }
.tile .pic img, .tile .pic video { width: 100%; height: 100%; object-fit: cover; }
.tile .pic.contain img { object-fit: contain; }
.tile .name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.center .name { text-align: center; font-weight: 400; }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tile-btn { all: unset; display: block; cursor: pointer; width: 100%; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: rgba(255,255,255,.72); font-size: 13.5px; text-align: center; padding: 8px; }
.tag { position: absolute; left: 8px; top: 8px; background: rgba(15,18,34,.62); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 8px; }
.tag.br { left: auto; right: 8px; top: auto; bottom: 8px; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(15,18,34,.55); color: #fff; display: grid; place-items: center; border: 0; cursor: pointer; }
.play svg { width: 24px; height: 24px; }
.tick { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.tick svg { width: 14px; height: 14px; }

/* Đăng nhập */
.login { max-width: 460px; margin: 0 auto; padding: 16px 16px calc(24px + var(--safe-b)); display: grid; gap: 14px; }
.login .hero { width: 100%; border-radius: var(--r); aspect-ratio: 952/400; object-fit: cover; }
.login h1 { font-size: clamp(21px, 6.3vw, 27px); }
.login .btn { min-height: 52px; position: relative; }
.login .btn .mark { position: absolute; left: 18px; font-weight: 700; font-size: 20px; line-height: 1; }
.inapp { background: var(--accent-soft); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }

/* Chọn đồ */
.pick-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pick-row .text { flex: 1; min-width: 0; }
.pick-row .thumbs { display: flex; gap: 6px; }
.pick-row .thumbs img { width: 52px; height: 62px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--soft); flex: none; }

/* Hộp thoại */
dialog.sheet { border: 0; padding: 0; width: 100%; max-width: 100%; max-height: 90dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; background: #fff; color: var(--fg); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(15,18,34,.5); }
.sheet-in { display: flex; flex-direction: column; max-height: 90dvh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-body { padding: 14px 16px; overflow-y: auto; display: grid; gap: 12px; flex: 1; min-height: 0; }
.sheet-foot { padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); display: grid; gap: 6px; }
dialog.player { border: 0; padding: 0; background: #000; max-width: min(100vw, 480px); border-radius: 12px; }
dialog.player::backdrop { background: rgba(0,0,0,.85); }
dialog.player video { max-height: 86dvh; }

/* Tải ảnh */
.drop { border: 1.5px dashed #cfcfd4; border-radius: var(--r); padding: 18px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.drop svg { width: 44px; height: 44px; color: var(--muted); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* Nạp token */
.pack { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 11px 16px; position: relative; width: 100%; }
.pack:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.pack.on { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.pack .tk, .pack .pr { font-weight: 700; font-size: 18px; line-height: 1.3; }
.pack .right { min-width: 128px; }
.pack .tick { position: static; flex: none; }
.pack-row { display: grid; gap: 8px; }

/* Chuyển khoản */
.qr { width: min(62vw, 230px); aspect-ratio: 1; margin: 0 auto; object-fit: contain; border-radius: 12px; background: #fff; }
.kv > div { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv > div:last-child { border-bottom: 0; }
.kv .v { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.kv .memo { background: var(--accent-soft); border-radius: 0 0 var(--r) var(--r); }
.warn { border: 1px solid var(--accent-line); background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14.5px; }

/* Quản trị */
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.admin .scroll { overflow-x: auto; }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 84px); transform: translateX(-50%); background: var(--fg); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 14.5px; z-index: 50; max-width: min(92vw, 460px); text-align: center; }

/* Tạo video */
.create-head { display: grid; gap: 4px; margin-bottom: 8px; }
.create-head h1 { order: 2; margin: 4px 0 8px; }
.create-head.no-phone-title h1 { display: none; }
.pick-list { display: grid; gap: 10px; }
.media { position: relative; border-radius: 14px; overflow: hidden; background: var(--soft); aspect-ratio: 5/6; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.empty { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; }
.look-img { width: 100%; border-radius: 16px; }
.look-grid { display: grid; gap: 12px; max-width: 640px; }
.job-thumb { width: 60px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.small-on-phone { min-height: 42px; padding: 8px 6px; font-size: 13.5px; }
.create-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "look ref" "more more"; }
.area-look { grid-area: look; align-content: start; gap: 8px; min-width: 0; }
.area-ref { grid-area: ref; align-content: start; gap: 8px; min-width: 0; }
.area-more { grid-area: more; min-width: 0; }
.area-price { grid-area: price; }
.area-look h2, .area-ref h2 { font-size: 18px; }

/* Máy tính */
.side-grid { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pack-row.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .mhead, .bnav { display: none; }
  .dock { position: static; border: 0; padding: 0; background: none; }
  .dock.split { grid-template-columns: 1fr; }
  .dock .btn.primary { min-height: 54px; font-size: 17px; }
  .no-nav .dock { padding-bottom: 0; }
  .page, .page.with-dock { padding: 16px 48px 48px; }
  #toast { bottom: 32px; }
  .topbar { display: flex; align-items: center; gap: 32px; height: 76px; padding: 0 48px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .topbar nav { display: flex; gap: 8px; }
  .topbar nav a { padding: 10px 20px; border-radius: 14px; text-decoration: none; font-size: 15.5px; }
  .topbar nav a.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
  .topbar .right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
  .side-grid { grid-template-columns: minmax(0, 1fr) 460px; align-items: start; gap: 32px; }
  .create-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 420px; grid-template-areas: "look ref price" "look more price"; align-items: start; gap: 16px 24px; }
  .area-look h2, .area-ref h2 { font-size: 22px; }
  .small-on-phone { min-height: 44px; padding: 12px 16px; font-size: 15px; }
  .media { aspect-ratio: auto; height: calc(100dvh - 370px); min-height: 300px; }
  .media img { object-fit: contain; }
  .media.look { background: none; }
  .create-head { grid-template-columns: 1fr minmax(0, 520px) 1fr; align-items: center; margin-bottom: 12px; }
  .create-head h1, .create-head.no-phone-title h1 { display: block; order: 0; margin: 0; font-size: 34px; }
  .create-head .steps { margin: 0; }
  .pick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1040px; }
  .pick-list .wide-row { grid-column: 1 / -1; }
  .narrow-dock { max-width: 1040px; margin-top: 12px; }
  .look-grid { max-width: none; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 28px; }
  .look-img { max-height: calc(100dvh - 190px); width: auto; max-width: 100%; }
  textarea { min-height: 72px; }
  .grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  dialog.sheet { max-width: 720px; margin: auto; border-radius: 20px; max-height: 84dvh; }
  .sheet-in { max-height: 84dvh; }
  .pack { flex-direction: column; align-items: flex-start; padding: 18px; gap: 0; }
  .pack .right { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; }
  .pack.on .right { border-color: var(--accent-line); }
  .pack .tick { position: absolute; right: 10px; top: 10px; }
  .pay-card { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 959px) {
  .desk-only { display: none !important; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; gap: 10px; }
}
@media (max-width: 359px) {
  h1 { font-size: 25px; }
  .kv > div { grid-template-columns: 92px 1fr auto; padding: 8px 10px; font-size: 14px; }
  .pack { padding: 9px 12px; }
  .pack .tk, .pack .pr { font-size: 16px; }
  .pack .right { min-width: 104px; }
}
@media (min-width: 960px) { .mobile-only { display: none !important; } }
@media (max-width: 959px) { .dock.mobile-only { display: grid; } }
