/* Giao diện kiểu TeeInBlue: sidebar trắng, topbar, nền xám nhạt, xanh dương chủ đạo, badge dạng pill nhạt */
:root {
  --bg: #eef2f8;
  --card: #fff;
  --line: #e4e7ec;
  --line2: #eef0f4;
  --text: #1d2939;
  --muted: #667085;
  --navy: #102a8c;          /* header + nút chính giống TeeInBlue */
  --primary: #1b3aa6;
  --primary-hover: #142e88;
  --primary-soft: #e9eefc;
  --link: #2563eb;
  --side: #fff;
  --side-text: #475467;
  --danger: #d92d20;
  --ok: #12a150;
  --sel: #ff7a1a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --topbar: 60px;
  --side-w: 236px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; font-weight: 600; }
.card > h3:first-child, .ed-sec > h3:first-child { margin-top: 0; }
p { margin: 6px 0; }
code, kbd { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: #eef1f6; border-radius: 4px; padding: 1px 5px; }
.code { background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; font: 12px ui-monospace, Menlo, monospace; margin: 6px 0; }
.hint { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--danger); }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.pad { padding: 10px 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; border-bottom: 1px solid var(--line2); }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date], textarea, select {
  font: inherit; color: var(--text); padding: 8px 11px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; width: 100%; min-width: 0; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 107, 255, .15); }
input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
input[type=range] { width: 100%; }
select.sm { width: auto; padding: 4px 8px; font-size: 13px; }
.mono { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field .lbl, .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 2px 12px 6px 0; }
.chk input { margin: 0; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; cursor: pointer; }

.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; color: #344054; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; box-shadow: var(--shadow); transition: background .15s, border-color .15s; }
.btn:hover { border-color: #b8c0cc; background: #f9fafb; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; }
.btn.toggle.on { background: var(--primary-soft); border-color: #b9ccff; color: var(--primary); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 3px 6px; border-radius: 6px; font-size: 14px; color: var(--muted); text-decoration: none !important; }
.icon-btn:hover { background: var(--line2); color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #475467; background: #f2f4f7; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.soft::before { display: none; }
.badge.blue { background: #eaf1ff; color: #1a5fe0; } .badge.green { background: #e6f7ee; color: #0e7a3e; } .badge.amber { background: #fff4e0; color: #a15c07; } .badge.red { background: #fdecea; color: #b42318; } .badge.violet { background: #f1ebff; color: #6230c9; } .badge.gray { background: #f2f4f7; color: #475467; }
.badge.soft { background: #eef1f6; color: #4b556a; }
.badge.soft.green { background: #e5f6ec; color: #11713f; } .badge.soft.amber { background: #fff3dc; color: #95600a; } .badge.soft.red { background: #fde8e6; color: #a8271e; }
.badge.soft.blue { background: #e7eeff; color: #1d4fd1; } .badge.soft.violet { background: #f0e9ff; color: #5b30b5; } .badge.soft.gray { background: #eef1f6; color: #4b556a; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.chip-btn.on, .chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--primary); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 1px var(--line); }
.alert { padding: 9px 12px; border-radius: 8px; font-size: 13px; margin: 8px 0; background: #eef1f6; }
.alert.red { background: #fde8e6; color: #8f2018; } .alert.amber { background: #fff3dc; color: #7c4f06; } .alert.green { background: #e7f6ee; color: #0f6236; } .alert.gray { background: #f0f2f6; color: #4b556a; }

/* ---------- đăng nhập */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 10% -10%, #dfe9ff 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e3f0ff 0%, transparent 55%), var(--bg); }
.login-card { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-lg); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: #344054; margin-bottom: 12px; }
.brand-lg { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.login-sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #1a6bff, #4f8dff); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0; flex: none; box-shadow: 0 4px 10px rgba(26, 107, 255, .3); }

/* ---------- khung kiểu TeeInBlue: header navy toàn chiều ngang, sidebar trắng có thẻ store */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; grid-template-areas: "top top" "side content"; min-height: 100vh; }
.topbar { grid-area: top; }
.side { grid-area: side; }
.content { grid-area: content; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -.02em; width: calc(var(--side-w) - 26px); flex: none; }
.brand .logo-mark { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; background: #fff; color: var(--navy); box-shadow: none; }
.side-profile { padding: 14px 12px 6px; }
.profile-card { display: grid; grid-template-columns: 36px 1fr; gap: 2px 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none !important; color: var(--text); }
.profile-card:hover { background: #f2f4f7; }
.profile-ava { grid-row: span 2; width: 36px; height: 36px; border-radius: 8px; background: #101828; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.profile-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.profile-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-txt span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-tag { grid-column: 2; justify-self: start; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #fff4e0; color: #a15c07; }
.profile-tag.live { background: #e6f7ee; color: #0e7a3e; }
#nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px 12px; flex: 1; overflow-y: auto; border-top: 1px solid var(--line2); margin-top: 8px; }
#nav a, .nav-link { color: var(--side-text); padding: 9px 12px; border-radius: 8px; display: flex; gap: 11px; align-items: center; text-decoration: none; font-weight: 500; font: inherit; font-weight: 500; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
#nav a:hover, .nav-link:hover { background: #f2f4f7; color: var(--text); }
#nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
#nav a.on .ico { color: var(--primary); }
.ico { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: none; color: #98a2b3; }
#nav a:hover .ico, .nav-link:hover .ico { color: inherit; }
.side-foot { padding: 10px 12px 14px; border-top: 1px solid var(--line2); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 20px 0 14px; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.crumb { font-weight: 500; color: rgba(255,255,255,.7); font-size: 13px; }
.me { display: flex; }
.me-link { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 99px; color: #fff; text-decoration: none !important; }
.me-link:hover { background: rgba(255,255,255,.1); }
.me-link .hint { color: rgba(255,255,255,.65); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #101828; color: #fff; font-weight: 700; font-size: 13px; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.me-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; white-space: nowrap; }
@media (max-width: 1100px) { .me-text, .store-dom { display: none; } }
.me-text .hint { font-size: 11px; }
.main { min-width: 0; flex: 1; }
.page { padding: 24px 28px 48px; max-width: 1500px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .hint { font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=date] { width: 150px; }
.toolbar select { width: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-ico { font-size: 34px; margin-bottom: 6px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line2); font-size: 13px; align-items: center; }
.kv > span:first-child { color: var(--muted); }

/* ---------- Orders */
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 9px 12px; cursor: pointer; font: inherit; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.count { background: #eef1f6; color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.tab.on .count { background: var(--primary-soft); color: var(--primary); }
.bulkbar { display: flex; gap: 8px; align-items: center; background: var(--primary-soft); border: 1px solid #c9d8ff; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 11px 14px; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #f8faff; }
.table tr.sel td { background: #eef4ff; }
.table .chk { width: 36px; }
.table.compact td { padding: 5px 8px; }
.order-cell { display: flex; align-items: center; gap: 10px; color: var(--text); }
.order-cell img, .noimg { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #eef1f6; border: 1px solid var(--line); flex: none; }
.noimg.big { width: 100%; height: 220px; display: grid; place-items: center; color: var(--muted); }
.detail-head h1 { display: flex; align-items: baseline; gap: 6px; }
.navarrows { display: flex; gap: 4px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.addr { line-height: 1.6; }
.note { background: #fffbe8; padding: 8px 10px; border-radius: 6px; }
.log { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow: auto; font-size: 13px; }
.log li { padding: 7px 0; border-bottom: 1px solid var(--line2); }
.item-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.item-head b { font-size: 15px; }
.item-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 12px; }
.item-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.design { display: flex; flex-direction: column; gap: 10px; }
.design-img img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: repeating-conic-gradient(#eef0f4 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: block; }
.btn-col { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cz h4 { margin: 0 0 6px; }
.cz-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line2); align-items: center; }
.cz-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #eef1f6; }
.item-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line2); }
.edit-block { padding: 10px 0; border-bottom: 1px solid var(--line2); }

/* ---------- modal + toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: 560px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal.sm { width: 420px; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.modal-head .x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(10px); background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px; opacity: 0; transition: .2s; pointer-events: none; z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: #a8271e; }

/* ---------- Artworks list */
.art-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.cat-card { padding: 10px; position: sticky; top: 16px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.cat-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.cat-row:hover { background: #f4f6fa; }
.cat-row.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-acts { display: none; }
.cat-row:hover .cat-acts { display: inline-flex; }
.cat-acts .icon-btn { padding: 1px 4px; font-size: 12px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.art-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; transition: box-shadow .15s, border-color .15s; }
.art-card:hover { border-color: #b9ccff; box-shadow: 0 6px 18px rgba(30, 94, 255, .08); }
.art-thumb { aspect-ratio: 1; background: repeating-conic-gradient(#eef0f4 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: grid; place-items: center; border-bottom: 1px solid var(--line2); }
.art-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.art-info { padding: 10px 12px; }
.art-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.art-thumb { position: relative; }
.art-status { position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: #98a2b3; color: #fff; }
.art-status.pub { background: #3ec13e; }
.art-ext { position: absolute; right: 6px; bottom: 6px; font-size: 11px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }
.art-name { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal !important; min-height: 2.9em; line-height: 1.45; }
.art-size { margin-top: 8px; font-size: 13px; }
.art-acts { display: flex; gap: 2px; padding: 4px 8px 8px; border-top: 1px solid var(--line2); }
.art-acts .icon-btn { font-size: 13px; padding: 4px 6px; }

/* ---------- Editor */
body.editor-mode .shell { grid-template-columns: 1fr; }
body.editor-mode .side { display: none; }
.ed { display: flex; flex-direction: column; height: 100vh; }
.ed-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ed-title { display: flex; align-items: baseline; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 6px; max-width: 360px; }
.ed-title:hover { background: #f4f6fa; }
.ed-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pencil { color: var(--muted); font-size: 12px; }
.sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 4px; z-index: 50; min-width: 220px; display: flex; flex-direction: column; }
.dd-menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; }
.dd-menu button:hover { background: #f2f5fb; }
.zoom { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.zoom-lbl { width: 46px; text-align: center; font-size: 12px; color: var(--muted); }
.ed-body { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; min-height: 0; }
.ed-left, .ed-right { background: #fff; overflow-y: auto; }
.ed-left { border-right: 1px solid var(--line); }
.ed-right { border-left: 1px solid var(--line); }
.ed-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: #fff; z-index: 2; }
.ed-panel-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-layers { padding: 6px; }
.ly { display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; font-size: 13px; }
.ly:hover { background: #f5f7fb; }
.ly.on { background: #fff4ea; border-color: #ffd3b0; }
.ly.off .ly-name, .ly.off .ly-ico { opacity: .45; }
.ly.dragging { opacity: .4; }
.ly.drop { border-top: 2px solid var(--primary); }
.ly-grip { color: #b4bccb; cursor: grab; font-size: 11px; letter-spacing: -2px; }
.ly-ico { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; background: #e9eefc; font-size: 12px; font-weight: 700; color: var(--primary); flex: none; }
.ly-ico.text { background: #f0e9ff; color: #6b3fd0; }
.ly-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-rename { padding: 2px 6px !important; flex: 1; }
.ly-p { font-size: 10px; font-weight: 700; color: #0f7a46; background: #e2f5ea; border-radius: 4px; padding: 0 4px; }
.ly-ai { font-size: 10px; font-weight: 700; color: #6b3fd0; background: #f0e9ff; border-radius: 4px; padding: 0 4px; }
.ly-btn { border: 0; background: none; cursor: pointer; padding: 2px 3px; font-size: 12px; opacity: .55; border-radius: 4px; }
.ly-btn:hover { opacity: 1; background: #e9edf4; }
.ed-viewport { overflow: auto; background: #e8ebf1; position: relative; }
.ed-pad { padding: 40px; display: inline-block; min-width: 100%; min-height: 100%; text-align: center; }
.ed-stage { position: relative; display: inline-block; vertical-align: top; text-align: left; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: repeating-conic-gradient(#e3e6ec 0% 25%, #fff 0% 50%) 50% / 20px 20px; }
.ed-stage.grid::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(30,94,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(30,94,255,.18) 1px, transparent 1px); background-size: inherit; }
.ed-stage canvas { display: block; width: 100%; height: 100%; }
.ed-handles, .ed-guides { position: absolute; inset: 0; }
.ed-guides { pointer-events: none; z-index: 3; }
.guide { position: absolute; background: #ff2d87; }
.guide.v { top: 0; bottom: 0; width: 1px; }
.guide.hz { left: 0; right: 0; height: 1px; }
.hb { position: absolute; transform-origin: 50% 50%; cursor: move; outline: 1px dashed transparent; }
.ed-handles:hover .hb { outline-color: rgba(30, 94, 255, .35); }
.hb.sel { outline: 2px solid var(--sel); outline-offset: 0; z-index: 2; }
.hb.locked { cursor: default; }
.hb-tag { position: absolute; left: -2px; top: -22px; background: var(--sel); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.rz { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--sel); border-radius: 2px; }
.rz.nw { left: -6px; top: -6px; cursor: nwse-resize; } .rz.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.rz.ne { right: -6px; top: -6px; cursor: nesw-resize; } .rz.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.rot { position: absolute; left: 50%; top: -34px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--sel); cursor: grab; }
.rot::after { content: ''; position: absolute; left: 50%; top: 12px; width: 2px; height: 20px; background: var(--sel); margin-left: -1px; }
.rot-tip { position: absolute; left: 50%; top: -60px; transform: translateX(-50%); background: #111827; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.seg { display: flex; gap: 2px; margin: 10px 14px 0; background: #f0f2f6; padding: 3px; border-radius: 8px; }
.seg button { flex: 1; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ed-sec { padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.ed-sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.ed-thumb { max-width: 100%; max-height: 140px; border-radius: 6px; border: 1px solid var(--line); background: repeating-conic-gradient(#eef0f4 0% 25%, #fff 0% 50%) 50% / 12px 12px; display: block; margin-bottom: 8px; }
.test-out img { max-width: 100%; border-radius: 6px; border: 1px solid var(--line); margin-top: 8px; }
.pick-list { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; display: flex; flex-direction: column; }
.color-row { display: grid; grid-template-columns: 1fr 48px 28px; gap: 6px; margin-bottom: 6px; align-items: center; }
.keys { display: grid; gap: 6px; font-size: 12px; }
.keys div { display: flex; justify-content: space-between; gap: 8px; }
.pv-form { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.pv-field { display: flex; flex-direction: column; gap: 6px; }
.pv-label { font-weight: 600; font-size: 13px; }
.req { color: var(--danger); margin-left: 2px; }
.reorder { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ro { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; margin-bottom: 4px; }
.ro[draggable=true] { cursor: grab; }

/* ---------- Editor kiểu TeeInBlue: panel layer tối, canvas tối, Edit | Live preview */
.ed-top { gap: 10px; padding: 8px 14px; min-height: 56px; }
.ed-title { align-items: center; max-width: 520px; }
.ed-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ed-mode { display: inline-flex; background: #eef1f6; border-radius: 9px; padding: 3px; gap: 2px; margin-left: 8px; }
.ed-mode button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.ed-mode button.on { background: var(--navy); color: #fff; }
.ed-body { grid-template-columns: 300px minmax(0, 1fr) 340px; }
.ed-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ed-tools { display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: #2f3136; border-bottom: 1px solid #222; flex-wrap: wrap; }
.tb-edit { display: inline-flex; gap: 4px; align-items: center; }
.tb-btn, .ed-tools .dd > .btn { border: 0; background: transparent; color: #e4e7ec; padding: 5px 9px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; box-shadow: none; }
.tb-btn:hover, .ed-tools .dd > .btn:hover { background: rgba(255,255,255,.1); }
.tb-btn.on { background: rgba(255,255,255,.16); color: #fff; }
.ed-tools .zoom-lbl { color: #cfd4dc; }
.ed-viewport { background: #26282c; flex: 1; }
.ed-stage { box-shadow: 0 4px 24px rgba(0,0,0,.5); }
/* panel trái tối */
.ed-left { background: #3a3c42; color: #e4e7ec; border-right: 1px solid #222; display: flex; flex-direction: column; }
.ed-left .ed-panel-title { background: #2f3136; border-bottom-color: #26282c; }
.ed-left .ed-panel-title b { color: #fff; }
.ed-left .ed-panel-title.back { justify-content: flex-start; }
.ed-left .ed-panel-title.back .ly-btn { font-size: 20px; line-height: 1; opacity: .9; color: #fff; }
.ed-left .hint, .ed-left .lbl, .ed-left .ed-sec-title { color: #b3b9c4; }
.ed-left .ed-sec { border-bottom-color: #4a4d55; }
.ed-left .chk, .ed-left .switch-title, .ed-left .fx-lbl b { color: #eef0f3; }
.ed-left .seg { background: #2f3136; }
.ed-left .seg button { color: #b3b9c4; }
.ed-left .seg button.on { background: #4b4e56; color: #fff; }
.ed-left .ed-layers { padding: 0; flex: 1; overflow-y: auto; }
.ed-left .ly { border-radius: 0; border: 0; border-bottom: 1px solid #45484f; padding: 6px 8px; color: #e4e7ec; }
.ed-left .ly:hover { background: #45484f; }
.ed-left .ly.on { background: #50535b; border-color: #45484f; box-shadow: inset 3px 0 0 #59a6ff; }
.ed-left .ly-btn { color: #d0d5dd; opacity: .7; }
.ed-left .ly-btn:hover { background: rgba(255,255,255,.1); opacity: 1; }
.ed-left .ly .ly-edit { opacity: 0; }
.ed-left .ly:hover .ly-edit, .ed-left .ly.on .ly-edit { opacity: .9; }
.ly-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; background: #fff; flex: none; }
.ed-left .ly-ico { background: transparent; color: #fff; font-size: 14px; }
.ed-left-foot { padding: 12px; display: flex; gap: 8px; justify-content: center; border-top: 1px solid #45484f; }
.ed-left-foot .dd-menu { top: auto; bottom: calc(100% + 4px); }
.ed-selbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #2f3136; font-size: 12px; }
.ed-left .ed-fields { padding-bottom: 30px; overflow-y: auto; }
.ed-left .alert { color: var(--text); }
.ed-left a { color: #8ec5ff; }
/* thẻ effect */
.fx-card { border: 1px dashed #6b6f78; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,.12); }
.fx-head { display: flex; align-items: center; gap: 6px; }
.fx-head select { flex: 1; font-weight: 600; }
.fx-lbl { font-size: 13px; }
.fx-card textarea { min-height: 160px; font-size: 12px; }
.fx-card .switch-row { margin-top: 0; }
.fx-card .switch-title { font-size: 13px; }
.fx-ref .ed-thumb { max-height: 70px; margin: 0; }
.fx-running { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--primary); font-weight: 500; }
.ed-left .fx-running { color: #8ec5ff; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pzspin .8s linear infinite; flex: none; }
@keyframes pzspin { to { transform: rotate(360deg); } }
/* panel phải: Form Mode */
.ed-right { background: #fff; }
.ed-right .ed-panel-title { justify-content: flex-start; gap: 10px; }
.seg.inline { margin: 0; flex: 1; }
.pv-note { font-style: italic; }
.pv-form { background: #f6f4ef; border-radius: 8px; padding: 14px; gap: 16px; }
.pv-label { font-weight: 700; }
.pv-photo { width: 150px; height: 150px; border: 1px solid #c9cdd4; border-radius: 4px; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; overflow: hidden; }
.pv-photo:hover { border-color: var(--primary); }
.pv-photo img { width: 100%; height: 100%; object-fit: cover; }
.pv-plus { font-size: 54px; font-weight: 200; color: #9aa0a9; line-height: 1; }
.pv-choose { align-self: flex-start; }
.pv-help { font-style: italic; }
.pv-fx { display: flex; align-items: center; gap: 8px; }
.pv-fx img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid #b38bff; }
.pv-inp { position: relative; }
.pv-inp input { padding-right: 52px; }
.pv-count { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); }
/* Live preview: ẩn panel layer + công cụ chỉnh sửa */
.ed.live .ed-body { grid-template-columns: minmax(0, 1fr) 380px; }
.ed.live .ed-left, .ed.live .tb-edit, .ed.live .ed-handles, .ed.live .ed-guides { display: none; }
@media (max-width: 1100px) { .ed-body { grid-template-columns: 250px minmax(0, 1fr) 300px; } }

/* ---------- popup "Select a layer type" (giống TeeInBlue) */
.lt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lt-head input { max-width: 260px; margin-left: auto; }
.lt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 28px; }
.lt-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.lt-gtitle { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 8px; }
.lt-gtitle::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--link); }
.lt-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 8px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--text); }
.lt-item:hover, .lt-item:focus-visible { background: var(--primary-soft); outline: none; }
.lt-item .ico { color: #344054; margin-top: 1px; }
.lt-item b { display: block; font-weight: 500; }
.lt-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.lt-empty { color: var(--muted); padding: 20px 8px; }
.ed-left-foot .btn { min-width: 110px; justify-content: center; }

/* ---------- Fonts / Stores / Users / Settings */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.font-card { margin: 0; }
.font-sample { font-size: 28px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-card .row input { flex: 1; }
.store-card h3 { margin: 0; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 17px; }
.store-card details { margin-top: 12px; }
.store-card summary { cursor: pointer; color: var(--primary); font-weight: 500; }
.steps li { margin: 8px 0; }
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.role { margin: 0; padding: 12px 14px; }
.meter { height: 10px; background: #edf0f5; border-radius: 99px; overflow: hidden; margin: 6px 0; }
.meter div { height: 100%; background: var(--ok); }
.meter.amber div { background: #d98a00; } .meter.red div { background: var(--danger); }

@media (max-width: 1100px) {
  .detail-grid, .item-body { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr 1fr; }
  .ed-body { grid-template-columns: 220px minmax(0, 1fr) 300px; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "top" "side" "content"; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { width: auto; }
  .side-profile, .crumb { display: none; }
  #nav { border-top: 0; margin-top: 0; }
  #nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  #nav a { width: auto; white-space: nowrap; }
  .nav-group, .side-foot { display: none; }
  .topbar { position: static; padding: 0 16px; height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px; padding-block: 8px; }
  .me-text, .store-dom { display: none; }
  .art-layout { grid-template-columns: 1fr; }
  .page { padding: 16px; }
}

/* ---------- Store switch (trên topbar) */
.store-switch { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; }
.store-switch:empty { display: none; }
.store-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.65); font-weight: 600; white-space: nowrap; }
.store-switch select { width: auto; max-width: 220px; border: 0; box-shadow: none; padding: 4px 6px; font-weight: 600; background: transparent; color: #fff; }
.store-switch select option { color: var(--text); }
.store-switch select:focus { box-shadow: none; }
.store-dom { font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; padding-right: 6px; }
.store-switch .store-name { color: #fff; }

/* ---------- Campaigns */
.modal.lg { width: 820px; }
.mt { margin-top: 10px; }
.m0 { margin: 0; }
.ok { color: var(--ok); }
.grid3 { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 8px 10px; }
.pick-products { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; margin: 10px 0; }
.pp-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 8px; }
.pp-row img, .pp-row .noimg { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.pp-row.used { opacity: .6; }
details.manual { margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 10px; }
details.manual summary { cursor: pointer; color: var(--primary); margin-bottom: 8px; }
details.manual .btn { margin-top: 8px; }
.camp-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.camp-right { position: sticky; top: 16px; }
.prod { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.prod img, .prod .noimg { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.camp-arts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ca-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.ca-row.on { border-color: var(--sel); background: #fff7f0; }
.ca-row img, .ca-row .noimg { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; background: #f2f4f8; flex: none; }
.mock-thumb { max-width: 100%; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 6px 0 8px; }
.pick-art { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; max-height: 460px; overflow-y: auto; }
.pa { border: 2px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.pa img, .pa .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f2f4f8; border-radius: 6px; }
.pa.on { border-color: var(--primary); background: var(--primary-soft); }
.pa.dis { opacity: .45; cursor: not-allowed; }
.pick-list.tall { max-height: 320px; }
.opt-quick { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.mock-stage { position: relative; margin: 10px auto; box-shadow: 0 1px 6px rgba(0,0,0,.12); border-radius: 6px; overflow: visible; }
.mock-stage canvas { display: block; width: 100%; height: 100%; border-radius: 6px; }
.art-only { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; }
.art-only figure { margin: 0; text-align: center; }
.art-only canvas { max-width: 320px; max-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: repeating-conic-gradient(#eef0f4 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.art-only figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.design-wrap { border-top: 1px solid var(--line2); padding-top: 12px; margin-top: 12px; }
.design-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
@media (max-width: 1100px) { .camp-grid { grid-template-columns: 1fr; } .camp-right { position: static; } }

/* ---------- Campaign kiểu TeeInBlue: Step 1 / Step 2 + thanh kiểm tra */
.camp-page { padding-bottom: 90px; }
.camp-bar { position: sticky; top: var(--topbar); z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(238, 242, 248, .96); backdrop-filter: blur(6px); padding: 10px 0 12px; margin: -10px 0 8px; }
.camp-pimg { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.camp-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.camp-title b { font-size: 17px; }
.camp-name { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; font-size: 12px; color: var(--muted); max-width: 360px; }
.camp-name:focus { color: var(--text); text-decoration: underline; }
.btn.danger-text { color: var(--danger); }
.camp-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 26px 0 0; position: relative; }
.step-label { position: absolute; top: -12px; left: 0; right: 0; text-align: center; }
.step-label span { background: #eef2f8; border: 1px solid var(--line); border-radius: 6px; padding: 3px 12px; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.step-body { padding: 22px 20px 20px; }
.step-body.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.step-body.wide-left { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.lbl-strong { font-weight: 700; margin-bottom: 6px; }
.camp-artbox { border: 1px solid var(--line); border-radius: 8px; }
.camp-artbox .camp-arts { margin: 0; gap: 0; }
.camp-artbox .ca-row { border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; padding: 10px; }
.camp-artbox .ca-row.on { background: #f3f6ff; box-shadow: inset 3px 0 0 var(--primary); }
.link-btn { border: 0; background: none; color: var(--link); font: inherit; padding: 12px 16px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.camp-prod { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.stage-head { display: flex; align-items: center; gap: 8px; background: #e7f3ec; color: #275a3b; font-size: 13px; padding: 6px 10px; border-radius: 6px 6px 0 0; }
.camp-stage-col .mock-stage { margin-top: 0; }
.mock-strip { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.mock-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-item { position: relative; width: 74px; height: 74px; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; background: #f2f4f8; }
.mt-item.on { border-color: var(--primary); }
.mt-item img { width: 100%; height: 100%; object-fit: cover; }
.mt-tag { position: absolute; left: 3px; bottom: 3px; font-size: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 0 4px; border-radius: 3px; }
.mt-x { position: absolute; top: 2px; right: 2px; border: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; cursor: pointer; display: none; }
.mt-item:hover .mt-x { display: block; }
.camp-ptitle { font-size: 20px; margin: 0 0 6px; }
.form-head { font-weight: 800; letter-spacing: .03em; margin: 18px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pv-part { font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.btn.outline-accent { border-color: #f28a1e; color: #e07a10; margin-top: 14px; background: #fff; }
.btn.outline-primary { border-color: var(--primary); color: var(--primary); margin-top: 8px; background: #fff; }
.pv-modal { position: relative; display: flex; justify-content: center; background: #f4f5f7; border-radius: 8px; padding: 10px; }
.pv-canvas { max-width: 100%; max-height: 70vh; display: block; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 22px; cursor: pointer; }
.pv-nav.l { left: 10px; } .pv-nav.r { right: 10px; }
.center { text-align: center; margin-top: 8px; }
.camp-check { position: fixed; left: calc(var(--side-w) + 28px); right: 28px; bottom: 14px; z-index: 25; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); background: #fff; border: 1px solid var(--line); }
.camp-check.ok { border-color: #a6e3bd; background: #ecfaf1; color: #116b38; }
.camp-check.warn { border-color: #fbd38d; background: #fff8e8; color: #8a5300; }
.camp-check.bad { border-color: #fdb4ad; background: #fff1ef; color: #a1271c; }
@media (max-width: 900px) { .step-body.two { grid-template-columns: 1fr; } .camp-check { left: 16px; right: 16px; } }

/* ---------- 4SCustom: đăng nhập bằng Shopify, nhóm menu, đặt mật khẩu */
.login-card form { display: flex; flex-direction: column; gap: 4px; }
.login-card input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--text); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 10px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.shopify { background: #008060; border-color: #008060; color: #fff; }
.btn.shopify:hover { background: #006e52; }
.login-choose { display: flex; flex-direction: column; gap: 6px; }
.login-choose .btn { justify-content: flex-start; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #98a2b3; font-weight: 600; padding: 16px 12px 6px; }
.store-name { color: var(--text); font-weight: 600; white-space: nowrap; }
body.setup-mode .side, body.setup-mode .topbar, body.editor-mode .topbar { display: none; }
body.setup-mode .shell, body.editor-mode .shell { grid-template-columns: 1fr; grid-template-rows: 1fr; grid-template-areas: "content"; }
.setup-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 10% -10%, #dfe9ff 0%, transparent 60%), var(--bg); }
.setup-card { width: 440px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.setup-card .ok-ico { font-size: 34px; }
.setup-steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.setup-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.setup-steps span.on { background: var(--ok); }
.conn { display: flex; align-items: center; gap: 8px; }
.conn .dot { width: 9px; height: 9px; border-radius: 50%; background: #aab2c3; }
.conn .dot.on { background: var(--ok); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
@media (max-width: 760px) { .store-grid { grid-template-columns: 1fr; } }
/* ---------- Dịch vụ AI (kiểu "3rd-party Services" của TeeInBlue) */
.page-sub { color: var(--muted); margin: -8px 0 18px; font-size: 13px; }
.svc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.svc-menu { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: sticky; top: calc(var(--topbar) + 16px); }
.svc-menu a { padding: 11px 16px; color: var(--primary); text-decoration: none !important; border-bottom: 1px solid var(--line2); font-weight: 500; }
.svc-menu a:last-child { border-bottom: 0; }
.svc-menu a:hover { background: var(--primary-soft); }
.svc-menu a.on { background: var(--navy); color: #fff; }
.svc-body { min-width: 0; }
.svc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 22px; margin-bottom: 16px; }
.svc-panel h2 { font-size: 16px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.svc-panel > .btn.primary { margin-top: 16px; }
.svc-q { font-weight: 600; margin: 16px 0 8px; }
.svc-panel h2 + .svc-q { margin-top: 0; }
.svc-meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.svc-meta b { color: var(--text); }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio-line { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.radio-line input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); flex: none; }
.radio-line.dis { opacity: .5; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.switch-title { font-weight: 500; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; margin-top: 1px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; background: #d0d5dd; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.svc-panel .row > input { flex: 1; min-width: 200px; }
@media (max-width: 900px) { .svc-layout { grid-template-columns: 1fr; } .svc-menu { position: static; } }

.code-wrap { position: relative; }
.code-wrap .btn { position: absolute; top: 6px; right: 6px; }
.code-wrap .code { padding-right: 70px; }
