/* Pegas Auto – thành phần riêng (dùng chung nền style.css của Pegas CRM). */

.brand .brand-mark { width: 34px; height: 34px; }
.brand .brand-word { height: 14px; display: block; }
.role-tag { margin: 14px 10px 0; font-size: 11px; color: #9fb6d1; }

/* Cảnh báo cấu hình chưa xong */
.setup-box { display: grid; gap: 6px; }
.setup-box a { font-weight: 600; }

/* Thanh tiến độ */
.prog { height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; min-width: 90px; }
.prog > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.prog.fail > i { background: var(--danger); }
.prog.wait > i { background: #f59e0b; }

/* Danh sách bước */
.steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steplist li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.steplist li.running { border-color: #93c5fd; background: #f5f9ff; }
.steplist li.failed { border-color: #fecaca; background: #fff7f7; }
.steplist li.waiting { border-color: #fde68a; background: #fffdf5; }
.steplist li.skipped { opacity: .6; }
.steplist .si { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.steplist li.done .si { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.steplist li.running .si { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; animation: pulse 1.4s infinite; }
.steplist li.failed .si { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.steplist li.waiting .si { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.steplist .st { font-weight: 600; }
.steplist .sn { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.steplist .se { font-size: 12px; color: var(--danger); margin-top: 4px; word-break: break-word; }
.steplist .sa { display: flex; gap: 4px; align-items: center; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgb(59 130 246 / 15%); } }

/* Nhật ký */
.console { background: #0b1220; color: #cbd5e1; border-radius: 10px; padding: 10px 12px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 460px; overflow: auto; }
.console div { white-space: pre-wrap; word-break: break-word; }
.console .t { color: #64748b; margin-right: 8px; }
.console .s { color: #7dd3fc; margin-right: 6px; }
.console .warn { color: #fcd34d; }
.console .error { color: #fca5a5; }
.console .ok { color: #86efac; }

/* Phiên bản theme */
.versions { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ver { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.ver.active { border-color: var(--accent); box-shadow: 0 0 0 2px #a7f3d0; }
.ver.preview { border-color: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.ver .shot { aspect-ratio: 9 / 14; max-height: 360px; background: var(--surface-2) center top / cover no-repeat; border-bottom: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.ver .vb { padding: 12px; display: grid; gap: 8px; flex: 1; align-content: start; }
.ver .vb > .row:last-child { align-self: end; }
.ver .vh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ver .vh b { font-size: 15px; }
.ver .vp { font-size: 12px; color: var(--muted); white-space: pre-wrap; max-height: 90px; overflow: auto; }
.ver .vs { font-size: 13px; white-space: pre-wrap; max-height: 140px; overflow: auto; }
.scores { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.score { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); }
.score.g { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.score.m { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.score.b { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Form tạo dự án */
.form-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.form-sec > h3 { margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.form-sec > h3 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; display: grid; place-items: center; }
textarea.code { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 160px; }
textarea.prompt { min-height: 120px; }
.logo-prev { max-height: 48px; max-width: 200px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; word-break: break-all; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; gap: 8px; font-size: 13px; }
.checklist li .d { color: var(--muted); }
.ns { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.proj-name { font-weight: 600; text-decoration: none; color: var(--text); }
.proj-name:hover { color: var(--brand-2); }
.test-res { font-size: 12px; margin-top: 4px; }
.kpi-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.empty .big { font-size: 34px; }
@media (max-width: 700px) { .steplist li { grid-template-columns: 26px 1fr; } .steplist .sa { grid-column: 2; } }

/* ==== Wizard thêm / sửa dự án ============================================================ */
.wz { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.wz-nav { position: sticky; top: 16px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 10px; }
.wz-nav ol { list-style: none; margin: 0; padding: 0; position: relative; }
.wz-nav li { position: relative; }
.wz-nav li:not(:last-child)::after { content: ''; position: absolute; left: 25px; top: 44px; bottom: -6px; width: 2px; background: var(--line); }
.wz-nav li.ok:not(:last-child)::after { background: #a7f3d0; }
.wz-nav button { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: none; padding: 9px 8px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); }
.wz-nav button:hover { background: var(--surface-2); }
.wz-nav li.cur button { background: #eef4ff; }
.wz-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-2); border: 2px solid var(--line); color: var(--muted); position: relative; z-index: 1; transition: all .2s; }
.wz-nav li.cur .wz-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px #dbe7fb; }
.wz-nav li.ok .wz-dot { background: #ecfdf5; border-color: #34d399; color: #047857; }
.wz-nav li.warn .wz-dot { background: #fffbeb; border-color: #fbbf24; color: #b45309; }
.wz-lbl b { display: block; font-size: 14px; }
.wz-lbl small { color: var(--muted); font-size: 12px; }
.wz-mprog { display: none; }
.wz-mini { margin: 12px 4px 0; padding: 10px; border-radius: 10px; background: var(--surface-2); display: flex; gap: 10px; align-items: center; border: 1px dashed var(--line); }
.wz-mini b { display: block; font-size: 13px; }
.wz-mini small { color: var(--muted); font-size: 12px; word-break: break-all; }
.wz-mini-dot { flex: none; width: 26px; height: 26px; border-radius: 8px; }

.wz-body { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 24px 0; min-width: 0; }
.wz-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.wz-ico { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #eef4ff, #dbe7fb); display: grid; place-items: center; font-size: 22px; }
.wz-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.wz-head h3 { font-size: 20px; }
#wz-panel { display: grid; gap: 18px; padding-bottom: 22px; animation: wzIn .25s ease; }
@keyframes wzIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wz-foot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 14px 0 16px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  background: linear-gradient(to top, var(--surface) 75%, rgb(255 255 255 / 0)); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; z-index: 5; }
.wz-foot .btn { padding: 10px 16px; }
.wz-next, .wz-go { min-width: 150px; justify-content: center; }
.wz-go { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; box-shadow: 0 6px 18px -6px rgb(11 74 158 / 60%); }

.wz-field { display: grid; gap: 6px; align-content: start; }
.wz-field > label { font-weight: 600; font-size: 13px; color: #334155; }
.wz-field > label small { font-weight: 400; color: var(--muted); }
.wz-field input[type=text], .wz-field input[type=email], .wz-field input[type=password], .wz-field input[type=search], .wz-field textarea, .wz-body textarea.code { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.wz-field input:focus, .wz-field textarea:focus, .wz-cat input:focus, .wz-filter:focus { outline: 0; border-color: var(--brand-2); box-shadow: 0 0 0 3px #dbe7fb; }
.wz-field.bad input, .wz-field.bad textarea { border-color: #f87171; box-shadow: 0 0 0 3px #fee2e2; }
.wz-err { color: var(--danger); font-size: 12px; font-weight: 500; }
.wz-hint { font-size: 12px; color: var(--muted); }
.wz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.wz-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.wz-grid4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; align-items: start; }
.wz-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.wz-domain .wz-url { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .15s; }
.wz-domain .wz-url:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px #dbe7fb; }
.wz-domain.bad .wz-url { border-color: #f87171; }
.wz-url > span:first-child { padding: 0 4px 0 14px; color: var(--muted); font-size: 17px; }
.wz-url input { flex: 1; border: 0 !important; box-shadow: none !important; font-size: 20px !important; font-weight: 600; padding: 12px 6px !important; outline: 0; min-width: 0; background: transparent; }
.wz-ok { margin-right: 12px; width: 26px; height: 26px; border-radius: 50%; background: #10b981; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.wz-cards { display: grid; gap: 12px; }
.wz-cards.c2 { grid-template-columns: repeat(2, 1fr); }
.wz-cards.c3 { grid-template-columns: repeat(3, 1fr); }
.wz-cards.c4 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.wz-cards.c5 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wz-card { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--text); transition: all .15s; }
.wz-card:hover:not(:disabled) { border-color: #93b4e8; transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgb(15 23 42 / 30%); }
.wz-card.on { border-color: var(--brand-2); background: #f5f9ff; box-shadow: 0 0 0 3px #dbe7fb; }
.wz-card.on::after { content: '✓'; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-2); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }
.wz-card:disabled { opacity: .55; cursor: not-allowed; }
.wz-card b { font-size: 14px; }
.wz-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.wz-card.big { padding: 18px; }
.wz-card.big b { font-size: 16px; }
.wz-emoji { font-size: 26px; line-height: 1; }
.wz-tag { position: absolute; top: -9px; left: 12px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.wz-card.prov { justify-items: start; }
.wz-logo { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.wz-logo.sm { width: 34px; height: 34px; font-size: 11px; flex: none; }

.wz-sub { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; margin-top: 4px; flex-wrap: wrap; }
.wz-sub .n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; }
.wz-filter { margin-left: auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; font-size: 13px; width: 200px; }
.wz-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow: auto; padding: 2px; }
.wz-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 13px; cursor: pointer; font-size: 13px; color: var(--text); }
.wz-chip:hover:not(:disabled) { border-color: #93b4e8; }
.wz-chip.on { background: var(--brand-2); border-color: var(--brand-2); color: #fff; font-weight: 600; }
.wz-chip:disabled { opacity: .45; cursor: not-allowed; }
.wz-tabs { display: inline-flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.wz-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: pointer; font-weight: 500; }
.wz-tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.wz-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 10px 2px 2px; }
.wz-size { position: relative; display: grid; gap: 2px; justify-items: start; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; cursor: pointer; color: var(--text); }
.wz-size:hover { border-color: #93b4e8; }
.wz-size.on { border-color: var(--brand-2); background: #f5f9ff; box-shadow: 0 0 0 3px #dbe7fb; }
.wz-size .ram { font-size: 20px; }
.wz-size .spec { font-size: 12px; color: var(--muted); }
.wz-size .price { font-weight: 700; color: var(--brand-2); margin-top: 4px; }
.wz-size .price small { font-weight: 400; color: var(--muted); }
.wz-size .nm { color: var(--muted); font-size: 11px; }
.wz-badge { position: absolute; top: -9px; right: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.wz-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; padding: 2px; }
.wz-srv { display: flex; gap: 10px; align-items: center; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; cursor: pointer; color: var(--text); }
.wz-srv b { display: block; font-size: 14px; }
.wz-srv small { color: var(--muted); font-size: 12px; }
.wz-srv em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--warn); font-weight: 600; }
.wz-srv.on { border-color: var(--brand-2); background: #f5f9ff; box-shadow: 0 0 0 3px #dbe7fb; }
.wz-srv.off { opacity: .55; cursor: not-allowed; }
.wz-loading { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; padding: 10px 2px; }
.wz-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand-2); animation: wzSpin .8s linear infinite; }
@keyframes wzSpin { to { transform: rotate(360deg); } }
.wz-note { border-radius: 10px; padding: 11px 14px; font-size: 13px; line-height: 1.55; }
.wz-note.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.wz-note.warn { background: var(--warn-bg); border: 1px solid #fde68a; color: #78350f; }
.wz-note.bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.wz-note.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.wz-more { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); }
.wz-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: #334155; }
.wz-more[open] summary { margin-bottom: 12px; }
.wz-more > * + * { margin-top: 10px; }

/* Theme */
.wz-art { height: 70px; border-radius: 8px; background: #f1f5f9; display: grid; gap: 4px; padding: 7px; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 12px 1fr; }
.wz-art i { border-radius: 4px; background: #cbd5e1; }
.wz-art i:first-child { grid-column: 1 / -1; background: #94a3b8; }
.wz-art.aB i:nth-child(2) { background: linear-gradient(135deg, #93c5fd, #c4b5fd); grid-column: span 2; }
.wz-art.aC { background: linear-gradient(135deg, #fde68a, #fbcfe8, #bfdbfe); }
.wz-art.aC i { background: rgb(255 255 255 / 70%); }
.wz-card.mode { padding-top: 16px; }
.wz-ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wz-idea { border: 1px dashed #93b4e8; background: #f8fbff; color: var(--brand-2); border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.wz-idea:hover { background: #eef4ff; border-style: solid; }
.wz-brand { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.wz-brand > div:first-child { display: grid; gap: 16px; }
.wz-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-sw { width: 34px; height: 34px; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; position: relative; display: grid; place-items: center; }
.wz-sw.on { box-shadow: 0 0 0 2px var(--text); }
.wz-sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); font-size: 14px; overflow: hidden; }
.wz-sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wz-drop { width: 100%; min-height: 84px; border: 2px dashed #c7d3e6; border-radius: 12px; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; gap: 2px; color: var(--muted); padding: 10px; }
.wz-drop:hover { border-color: var(--brand-2); color: var(--brand-2); }
.wz-drop img { max-height: 64px; max-width: 100%; }
.wz-drop span { font-weight: 600; }
.wz-toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.wz-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.wz-toggle > span { flex: none; width: 40px; height: 22px; border-radius: 99px; background: #cbd5e1; position: relative; transition: background .2s; margin-top: 1px; }
.wz-toggle > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); }
.wz-toggle input:checked + span { background: var(--accent); }
.wz-toggle input:checked + span::after { transform: translateX(18px); }
.wz-toggle input:focus-visible + span { box-shadow: 0 0 0 3px #dbe7fb; }
.wz-toggle b { display: block; font-size: 14px; }
.wz-toggle small { color: var(--muted); font-size: 12px; }
.wz-prev { border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 10px; display: grid; gap: 8px; box-shadow: 0 10px 30px -18px rgb(15 23 42 / 40%); }
.wz-prev-top { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--c); color: #fff; }
.wz-prev-top b { font-size: 12px; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-prev-top i { width: 22px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 60%); }
.wz-prev-logo { margin-right: auto; height: 20px; display: grid; place-items: center; background: #fff; border-radius: 4px; padding: 0 4px; }
.wz-prev-logo img { max-height: 16px; max-width: 90px; }
.wz-prev-hero { height: 80px; border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #000), color-mix(in srgb, var(--c) 50%, #fff)); display: grid; align-content: end; gap: 5px; padding: 10px; }
.wz-prev-hero span { height: 7px; border-radius: 3px; background: rgb(255 255 255 / 85%); width: 75%; }
.wz-prev-hero span + span { width: 45%; opacity: .7; }
.wz-prev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wz-prev-grid span { height: 44px; border-radius: 6px; background: #f1f5f9; border-top: 3px solid var(--c); }
.wz-prev small { text-align: center; color: var(--muted); font-size: 11px; }

/* Cấu trúc */
.wz-cats { display: grid; gap: 6px; }
.wz-cat { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.wz-cat.child { margin-left: 28px; background: var(--surface-2); }
.wz-cat input { flex: 1; min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 7px 9px; font-size: 14px; background: transparent; }
.wz-cat input:hover { border-color: var(--line); background: #fff; }
.wz-grip { color: var(--brand-2); width: 16px; text-align: center; font-size: 12px; }
.wz-slug { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-pages { display: flex; flex-wrap: wrap; gap: 6px; }

/* Xem lại */
.wz-review { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wz-rv { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wz-rv-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.wz-rv-b { padding: 12px; font-size: 13px; }
.wz-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.wz-kv span { color: var(--muted); }
.wz-kv b { font-weight: 600; word-break: break-word; }
.wz-clip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400 !important; }
.wz-dotc { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.wz-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-flow { border-radius: 12px; padding: 14px 16px; background: linear-gradient(135deg, #f0f6ff, #f5f3ff); border: 1px solid #dbe4f5; font-size: 13px; }
.wz-flow ol { margin: 8px 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.wz-flow li { margin-bottom: 4px; }
.wz-flow small { color: var(--muted); }

@media (max-width: 1000px) {
  .wz { grid-template-columns: minmax(0, 1fr); }
  .wz-nav { position: static; padding: 10px; }
  .wz-nav ol { display: flex; gap: 2px; overflow-x: auto; }
  .wz-nav li::after { display: none; }
  .wz-nav button { flex-direction: column; gap: 4px; padding: 6px; min-width: 64px; text-align: center; }
  .wz-lbl small { display: none; }
  .wz-lbl b { font-size: 11px; }
  .wz-dot { width: 28px; height: 28px; font-size: 12px; }
  .wz-mprog { display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 8px; overflow: hidden; }
  .wz-mprog i { display: block; height: 100%; background: var(--brand-2); transition: width .3s; }
  .wz-mini { display: none; }
  .wz-brand { grid-template-columns: 1fr; }
  .wz-review { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wz-body { padding: 16px 14px 0; }
  .wz-foot { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .wz-next, .wz-go { min-width: 0; }
  .wz-grid2, .wz-grid3, .wz-grid4, .wz-cards.c2, .wz-cards.c3 { grid-template-columns: 1fr; }
  .wz-cards.c4, .wz-cards.c5, .wz-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wz-card { padding: 12px; }
  .wz-card.prov small, .wz-card.big small { display: none; }
  .wz-chip { padding: 6px 10px; font-size: 12px; }
  .wz-filter { width: 100%; margin-left: 0; }
  .wz-flow ol { columns: 1; }
  .wz-url input { font-size: 17px !important; }
}

/* ==== Bàn giao: Content / Lưu trữ ======================================================== */
.nav .badge.muted-badge { background: rgb(255 255 255 / 18%); color: #dbe7f5; }
.handover-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff); border: 1px solid #a7f3d0; font-size: 13px; }
.handover-bar.big { padding: 16px 18px; }
.handover-bar.big b { font-size: 15px; }
.handover-bar.content { background: #eff6ff; border-color: #bfdbfe; }
.handover-bar.archive { background: var(--surface-2); border-color: var(--line); }
.stat-link { text-decoration: none; color: inherit; transition: transform .15s; }
.stat-link:hover { transform: translateY(-2px); }
.ready-list { display: grid; gap: 8px; }
.ready-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }

/* Hộp thoại chuyển mục */
.mv-opts { display: grid; gap: 10px; }
.mv-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.mv-opt:has(input:checked) { border-color: var(--brand-2); background: #f5f9ff; box-shadow: 0 0 0 3px #dbe7fb; }
.mv-opt input { margin: 0; }
.mv-ico { font-size: 26px; }
.mv-opt b { display: block; }
.mv-opt small { color: var(--muted); }

/* Thẻ website trong Content / Lưu trữ */
.page-head input.sc-search { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; width: 260px; flex: 0 1 260px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sc { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid transparent; transition: transform .15s, box-shadow .15s; }
.sc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgb(15 23 42 / 45%); }
.sc.archive { border-color: var(--line); }
.sc.archive .sc-shot { filter: grayscale(.55); }
.sc-shot { position: relative; display: block; height: 170px; background: center top / cover no-repeat; text-decoration: none;
  background-color: var(--c, #0b4a9e); background-image: linear-gradient(135deg, color-mix(in srgb, var(--c, #0b4a9e) 90%, #000), color-mix(in srgb, var(--c, #0b4a9e) 55%, #fff)); }
.sc-shot[style*="url("] { background-color: #e2e8f0; }
.sc-ph { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; padding: 12px; }
.sc-ph b { font-size: 20px; }
.sc-ph small { opacity: .85; }
.sc-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.sc-badges .score { background: #fff; }
.sc-body { padding: 14px; display: grid; gap: 10px; flex: 1; align-content: start; }
.sc-title { display: flex; gap: 10px; align-items: center; }
.sc-title .proj-name { font-size: 16px; display: block; }
.sc-dom { text-decoration: none; }
.sc-dot { flex: none; width: 12px; height: 34px; border-radius: 6px; }
.sc-tag { margin-top: -4px; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sc-stats span { background: var(--surface-2); border-radius: 8px; padding: 6px; text-align: center; font-size: 11px; color: var(--muted); }
.sc-stats b { display: block; font-size: 15px; color: var(--text); }
.sc-crm { font-size: 12px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.sc-crm.ok { background: #ecfdf5; color: #047857; }
.sc-note { margin-top: 4px; color: #334155; }
.sc-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.sc-act small { font-size: 10px; }
@media (max-width: 700px) { .sc-grid { grid-template-columns: 1fr; } .page-head input.sc-search { width: 100%; flex: 1 1 100%; } }
.wz-next-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.wz-next-steps span { background: #fff; border: 1px solid #dbe4f5; border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.handover-bar a { color: inherit; }

/* ==== Thương hiệu & E-E-A-T ============================================================== */
.br { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.br .card > h3 small { font-weight: 400; font-size: 12px; }
.br textarea, .br input[type=url], .br input[type=tel] { width: 100%; }
.br-sticky { position: sticky; top: 16px; display: grid; gap: 14px; }
.br-score { display: flex; gap: 14px; align-items: center; }
.br-ring { --c: #ef4444; width: 78px; height: 78px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #e5e7eb 0); }
.br-score.m .br-ring { --c: #f59e0b; } .br-score.g .br-ring { --c: #10b981; }
.br-ring b { font-size: 24px; line-height: 1; } .br-ring small { color: var(--muted); font-size: 11px; }
.br-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.br-checks li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; color: #475569; }
.br-checks li span { color: #94a3b8; font-weight: 700; }
.br-checks li.ok { color: var(--text); } .br-checks li.ok span { color: #10b981; }
.br-checks em { grid-column: 2; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: -3px; }
.br-actions { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.br-actions .btn { justify-content: center; }
.br-ai { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.br-ai label { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; display: grid; gap: 2px; }
.br-ai label.on { border-color: var(--brand-2); background: #f5f9ff; box-shadow: 0 0 0 3px #dbe7fb; }
.br-ai input { display: none; } .br-ai small { color: var(--muted); font-size: 12px; }
.br-author { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.br-ah { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.br-ah b { display: block; } .br-ah small { color: var(--muted); }
.br-av { width: 44px; height: 44px; border-radius: 50%; background: var(--brand) center / cover; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.br-prev .seg { flex-wrap: wrap; margin-bottom: 12px; }
.br-doc { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; background: #fff; font-size: 14px; line-height: 1.7; }
.br-doc h1 { font-size: 22px; margin-bottom: 10px; } .br-doc h2 { font-size: 17px; margin: 18px 0 6px; }
.sc-eeat { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; text-decoration: none; color: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.sc-eeat span { font-weight: 700; } .sc-eeat i { height: 6px; border-radius: 3px; background: #ef4444; max-width: 100%; }
.sc-eeat.m i { background: #f59e0b; } .sc-eeat.g i { background: #10b981; }
.sc-eeat em { grid-column: 1 / -1; font-style: normal; color: var(--brand-2); font-size: 11px; }
.mv-eeat { margin-top: 12px; display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.mv-opt.sm { padding: 9px 12px; } .mv-opt.sm small { font-size: 12px; }
.wz-eeat { border-radius: 10px; padding: 12px 14px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 13px; }
.wz-eeat ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
@media (max-width: 1000px) { .br { grid-template-columns: 1fr; } .br-sticky { position: static; } }
@media (max-width: 700px) { .br-ai { grid-template-columns: 1fr; } }
/* Ô URL dùng cùng kiểu với các ô nhập của Pegas CRM */
input[type=url] { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
.br input:focus, .br textarea:focus, .br select:focus { outline: 0; border-color: var(--brand-2); box-shadow: 0 0 0 3px #dbe7fb; }

/* ---- Mục Content: không gian nội dung (topic clusters) */
.cm-flow { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 14px; overflow-x: auto; padding-bottom: 2px; }
.cm-step { flex: 1; min-width: 120px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); font: inherit; color: var(--text); }
.cm-step:hover { border-color: var(--brand-2); }
.cm-step span { grid-row: 1 / 4; font-size: 22px; align-self: center; }
.cm-step b { font-size: 20px; line-height: 1.1; }
.cm-step em { font-style: normal; font-weight: 600; font-size: 13px; }
.cm-step small { color: var(--muted); font-size: 12px; }
.cm-arrow { align-self: center; color: var(--silver); font-size: 18px; }
.cm-guide { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.cm-guide li { line-height: 1.45; }
.cm-guide li.ok::marker { color: var(--ok); }
.cm-guide li.ok b::after { content: ' ✓'; color: var(--ok); }
.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cm-actions .sc-search { max-width: 240px; }
.cm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.cm-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: 75vh; }
.cm-col.none { border-style: dashed; }
.cm-col header { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; display: grid; gap: 2px; }
.cm-col-b { padding: 8px; display: grid; gap: 8px; overflow-y: auto; }
.cm-cl { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cm-cl.pillar { border-color: var(--brand-2); box-shadow: inset 3px 0 0 var(--brand-2); }
.cm-cl-h { display: flex; gap: 6px; align-items: center; }
.cm-cl-h b { font-size: 14px; }
.cm-cl-m { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; }
.cm-kws { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cm-kws span { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.cm-kws span.main { border-color: var(--ok); }
.cm-kws em { color: var(--muted); font-style: normal; }
.sm-select { font-size: 12px; padding: 3px 6px; max-width: 190px; }
.btn.sm.ghost { background: transparent; }
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kb-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: grid; gap: 8px; min-height: 120px; }
.kb-col header { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.kb-col header em { font-style: normal; color: var(--muted); }
.kb-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); text-decoration: none; }
.kb-card:hover { border-color: var(--brand-2); }
.kb-card.failed { border-color: #fecaca; }
.kb-card.needs_fix { border-color: #fde68a; background: var(--warn-bg); }
.kb-card.running, .kb-card.queued { border-color: var(--brand-2); }
.kb-card b { font-size: 13px; line-height: 1.35; display: block; }

/* ---- Trang soạn bài */
.ar-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -4px 0 12px; font-size: 14px; }
.ar-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
.ar-steps li { flex: 1; min-width: 92px; display: flex; }
.ar-steps button { width: 100%; height: 100%; justify-content: flex-start; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; font: inherit; font-size: 12px; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.ar-steps button:disabled { cursor: default; }
.ar-steps button span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; }
.ar-steps li.done button { color: var(--text); }
.ar-steps li.done button span { background: var(--ok); border-color: var(--ok); color: #fff; }
.ar-steps li.done button:not(:disabled):hover { border-color: var(--brand-2); }
.ar-steps li.cur button { color: var(--brand); font-weight: 600; border-color: var(--brand-2); }
.ar-steps li.cur button span { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.ar-steps li.cur.failed button { border-color: var(--danger); } .ar-steps li.cur.failed button span { background: var(--danger); border-color: var(--danger); }
.ar-steps li.cur.needs_fix button { border-color: var(--warn); } .ar-steps li.cur.needs_fix button span { background: var(--warn); border-color: var(--warn); }
.ar-auto { display: inline-flex; align-items: center; gap: 6px; }
.ar-serp { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; }
.ar-outline { display: grid; gap: 6px; }
.ar-orow { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: start; }
.ar-orow select { font-size: 12px; }
.ar-ocell { display: grid; gap: 4px; }
.ar-ocell textarea { font-size: 12px; color: var(--muted); resize: vertical; }
.ar-orow.t-h2 .ar-ocell input { font-weight: 600; }
.ar-orow.t-h3 { padding-left: 20px; } .ar-orow.t-h4 { padding-left: 40px; }
.ar-orow.t-title input, .ar-orow.t-h1 input { font-weight: 700; }
.ar-pre { white-space: pre-wrap; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 420px; overflow: auto; }
.ar-md { width: 100%; min-height: 60vh; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; resize: vertical; }
.ar-preview { max-width: 760px; margin: 8px 0 0; line-height: 1.7; font-size: 16px; }
.ar-preview h1 { font-size: 28px; line-height: 1.3; } .ar-preview h2 { margin-top: 1.6em; } .ar-preview img { max-width: 100%; }
.ar-preview table { border-collapse: collapse; width: 100%; } .ar-preview th, .ar-preview td { border: 1px solid var(--line); padding: 6px 8px; }
.ar-preview blockquote { margin: 1em 0; padding: 8px 14px; border-left: 3px solid var(--brand-2); background: var(--surface-2); }
.ar-verdict { border-radius: 8px; padding: 10px 12px; border: 1px solid var(--line); display: grid; gap: 4px; }
.ar-verdict.pass { background: #ecfdf5; border-color: #a7f3d0; }
.ar-verdict.fix { background: var(--warn-bg); border-color: #fde68a; }
.ar-verdict p { margin: 4px 0 0; }
.ar-issues { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ar-issues li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.ar-issues li.high { border-color: #fecaca; }
.ar-checks tr.fail td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.ar-checks tr.warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ar-checks tr.pass td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.ar-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ar-img { display: grid; grid-template-columns: 120px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.ar-thumb { aspect-ratio: 4 / 3; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px; display: grid; place-items: center; overflow: hidden; font-size: 12px; color: var(--muted); }
.ar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ar-imeta { display: grid; gap: 6px; min-width: 0; }
@media (max-width: 640px) {
  .ar-orow { grid-template-columns: 1fr auto; } .ar-orow select { grid-column: 1 / -1; }
  .ar-img { grid-template-columns: 1fr; }
  .cm-step { min-width: 140px; }
}

/* ---- Công cụ tạo ảnh (chuyển từ Pegas Tool) */
.tl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand-2); animation: tlSpin .8s linear infinite; flex: none; }
@keyframes tlSpin { to { transform: rotate(360deg); } }
.tl-progress { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); }
.tl-card textarea { width: 100%; resize: vertical; }

/* ---- Danh sách bộ ảnh */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tl-batch { position: relative; padding: 0; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.tl-batch:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgb(15 23 42 / 12%); }
.tl-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; font-size: 36px; color: var(--silver); border-bottom: 1px solid var(--line); }
.tl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-batch-body { padding: 10px 12px 12px; display: grid; gap: 3px; }
.tl-batch-del { position: absolute; top: 6px; right: 6px; background: rgb(255 255 255 / 85%); }

/* ---- Khu làm việc */
.tl-head { margin-bottom: 10px; }
.tl-title { flex: 1; min-width: 200px; font-size: 20px; font-weight: 700; color: var(--brand); border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: 8px; }
.tl-title:hover:not([readonly]), .tl-title:focus { border-color: var(--line); background: var(--surface); outline: none; }
.tl-bar { position: sticky; top: 0; z-index: 5; margin-bottom: 14px; }
.tl-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.tl-inline select { padding: 4px 8px; }
.tl-export { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-list { display: grid; gap: 16px; }
.tl-add-big { width: 100%; justify-content: center; margin-top: 14px; padding: 14px; border-style: dashed; color: var(--muted); }

.tl-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .12s, opacity .12s; }
.tl-card.dragging { opacity: .45; }
.tl-card.drop-before { border-top-color: var(--brand-2); }
.tl-card.drop-after { border-bottom-color: var(--brand-2); }
.tl-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tl-card-head .icon-btn:disabled { opacity: .3; cursor: default; }
.tl-handle { cursor: grab; color: var(--silver); font-size: 18px; padding: 0 2px; user-select: none; }
.tl-handle:active { cursor: grabbing; }
.tl-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 0 6px; }
.tl-card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; padding: 14px; }
.tl-in { display: grid; gap: 14px; align-content: start; }
.tl-sec { display: grid; gap: 8px; }
.tl-sec-h { font-weight: 600; font-size: 13px; color: var(--brand); }

.tl-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-refs.loading { opacity: .6; pointer-events: none; }
.tl-ref { position: relative; margin: 0; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.tl-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-ref figcaption { position: absolute; left: 4px; bottom: 4px; background: rgb(2 35 82 / 80%); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 4px; }
.tl-ref-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; cursor: pointer; font-size: 11px; line-height: 22px; padding: 0; }
.tl-ref-add { width: 88px; height: 88px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; align-content: center; text-align: center; cursor: pointer; color: var(--muted); background: var(--surface-2); }
.tl-ref-add span { font-size: 22px; line-height: 1; }
.tl-ref-add small { font-size: 10px; line-height: 1.25; }
.tl-ref-add:hover, .tl-ref-add.over { border-color: var(--brand-2); background: #eff6ff; color: var(--brand-2); }

.tl-out { display: grid; gap: 8px; align-content: start; }
.tl-empty { min-height: 220px; border: 2px dashed var(--line); border-radius: var(--radius); display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 20px; color: var(--muted); }
.tl-empty .tl-spin { width: 28px; height: 28px; border-width: 3px; }
.tl-preview { position: relative; border-radius: var(--radius); overflow: hidden; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 16px 16px; min-height: 120px; border: 1px solid var(--line); }
.tl-preview img { width: 100%; height: auto; display: block; }
.tl-preview-load { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(255 255 255 / 60%); }
.tl-preview.ready .tl-preview-load { display: none; }
.tl-summary { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.tl-out-actions { gap: 6px; }
.tl-revise { display: flex; gap: 6px; }
.tl-revise input { flex: 1; min-width: 0; }

.tl-seo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.tl-seo small[data-fname] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--brand-2); word-break: break-all; }

/* Lịch sử phiên bản */
.tl-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tl-hist-item { margin: 0; display: grid; gap: 6px; align-content: start; }
.tl-hist-img { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.tl-hist-img img { width: 100%; height: 100%; object-fit: contain; }

/* ---- Chỉnh sửa ảnh */
.modal.wide:has(.ed) { max-width: min(1200px, 96vw); }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.ed-stage { display: grid; place-items: center; background: repeating-conic-gradient(#e2e8f0 0 25%, #f8fafc 0 50%) 0 0 / 18px 18px; border-radius: var(--radius); padding: 4px; min-height: 260px; }
.ed-stage canvas { display: block; touch-action: none; cursor: crosshair; box-shadow: 0 2px 10px rgb(0 0 0 / 15%); }
.ed-side { display: grid; gap: 14px; align-content: start; }
.ed-group { display: grid; gap: 8px; }
.ed-group > b { font-size: 13px; color: var(--brand); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-chips .chip-btn { padding: 3px 10px; font-size: 12px; }
.ed-slider { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; font-size: 13px; }
.ed-slider input { width: 100%; }
.ed-slider output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.ed-side .actions { margin-top: 4px; }

@media (max-width: 900px) {
  .tl-card-body, .tl-seo { grid-template-columns: 1fr; }
  .ed { grid-template-columns: 1fr; }
  .tl-bar { position: static; }
}
/* Đọc bài viết từ link → danh sách ảnh */
.tl-src { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.tl-src-ico { font-size: 16px; }
.tl-src input { flex: 1; min-width: 0; }
.tl-plan { display: grid; gap: 8px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.tl-plan-item { display: grid; grid-template-columns: auto 160px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.tl-plan-item:has(input:checked) { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2) inset; }
.tl-plan-item > input { margin-top: 4px; }
.tl-plan-thumb { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; color: var(--silver); }
.tl-plan-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-plan-body { display: grid; gap: 4px; min-width: 0; }
.tl-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.tl-or::before, .tl-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .tl-plan-item { grid-template-columns: auto 1fr; } .tl-plan-thumb { grid-column: 2; }
  .tl-plan-body { grid-column: 1 / -1; }
  .tl-src { flex-wrap: wrap; } .tl-src input { flex-basis: 70%; }
}
.tl-reason { color: var(--brand-2); }

/* =====================================================================
   Tạo ảnh (AI) – thiết kế lại: trang danh sách + studio 3 cột (tiền tố ix-)
   ===================================================================== */
.tl-spin.big { width: 34px; height: 34px; border-width: 3px; }
.ix-link { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; font-size: 13px; cursor: pointer; }
.ix-link:hover { text-decoration: underline; }
.ix-link.danger { color: var(--danger); }
.ix-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2563eb; margin-right: 5px; vertical-align: middle; animation: ixPulse 1.2s ease-in-out infinite; }
@keyframes ixPulse { 50% { opacity: .3; transform: scale(.8); } }
.ix-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all .12s; }
.ix-chip:hover { border-color: var(--brand-2); color: var(--brand-2); }
.ix-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ix-chip.sm { padding: 3px 10px; font-size: 12px; }
.ix-chip.static { cursor: default; }
.ix-chip.static:hover { border-color: var(--line); color: inherit; }
.ix-chip.rule { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.ix-chip.ai { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ix-urlbox { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 5px 5px 5px 12px; transition: border-color .12s, box-shadow .12s; }
.ix-urlbox:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgb(11 74 158 / 12%); }
.ix-urlbox > span { font-size: 17px; }
.ix-urlbox input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 8px 4px; font-size: 15px; outline: none; }
.ix-field { display: grid; gap: 5px; }
.ix-field > span { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ix-field > span small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.ix-field textarea, .ix-field input[type=text], .ix-field input[type=number] { width: 100%; resize: vertical; }
.ix-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: max-content; }
.ix-stepper button { border: 0; background: var(--surface-2); width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
.ix-stepper input { width: 60px; text-align: center; border: 0 !important; border-radius: 0 !important; }

/* ---- Trang danh sách */
.ix-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px 22px; color: #fff; margin-bottom: 18px;
  background: radial-gradient(1200px 300px at 100% -40%, rgb(255 255 255 / 14%), transparent 60%), linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%); box-shadow: 0 10px 30px rgb(2 35 82 / 22%); }
.ix-hero h2 { color: #fff; font-size: 24px; margin: 0 0 6px; }
.ix-hero p { margin: 0; max-width: 760px; color: #dbe7f5; line-height: 1.55; }
.ix-hero-form { margin-top: 18px; max-width: 780px; }
.ix-hero .ix-urlbox { border: 0; box-shadow: 0 6px 24px rgb(0 0 0 / 18%); padding: 6px 6px 6px 14px; }
.ix-hero .ix-urlbox input { font-size: 16px; color: var(--text); }
.ix-hero .ix-urlbox .btn { padding: 10px 18px; font-size: 15px; }
.ix-hero-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: #c7d6ea; }
.ix-hero-sub .ix-link { color: #fff; text-decoration: underline; }
.ix-hero-warn { margin-top: 12px; background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 25%); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.ix-hero-warn a { color: #fff; }
.ix-stats { display: flex; gap: 26px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 18%); }
.ix-stats div { display: grid; }
.ix-stats b { font-size: 20px; }
.ix-stats span { font-size: 12px; color: #c7d6ea; }
.ix-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ix-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ix-search { width: 240px; max-width: 100%; border-radius: 999px !important; padding-left: 14px !important; }
.ix-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.ix-bcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ix-bcard:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgb(15 23 42 / 12%); border-color: transparent; }
.ix-bstrip { position: relative; display: grid; gap: 2px; aspect-ratio: 16 / 9; background: var(--surface-2); }
.ix-bstrip.n2 { grid-template-columns: 1fr 1fr; }
.ix-bstrip.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ix-bstrip.n3 img:first-child { grid-row: 1 / 3; }
.ix-bstrip.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ix-bstrip img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.ix-bempty { display: grid; place-items: center; align-content: center; gap: 4px; font-size: 34px; color: var(--silver); }
.ix-bempty small { font-size: 12px; color: var(--muted); }
.ix-bbadge { position: absolute; left: 10px; bottom: 10px; background: rgb(255 255 255 / 94%); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; box-shadow: 0 2px 6px rgb(0 0 0 / 15%); }
.ix-bbadge.err { color: var(--danger); }
.ix-bbody { padding: 12px 14px 14px; display: grid; gap: 6px; }
.ix-bsrc { font-size: 11.5px; color: var(--muted); }
.ix-btitle { font-size: 15px; line-height: 1.35; color: var(--brand); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ix-prog { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ix-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #34d399); border-radius: 99px; }
.ix-bmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.ix-bdel { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(15 23 42 / 55%); color: #fff; cursor: pointer; opacity: 0; transition: opacity .12s; }
.ix-bcard:hover .ix-bdel, .ix-bdel:focus-visible { opacity: 1; }
.ix-none { padding: 40px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: 14px; }

/* ---- Studio: thanh trên */
.ix-studio { --ix-head: 74px; }
.ix-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -20px -24px 14px; padding: 12px 24px; background: rgb(255 255 255 / 92%); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ix-back { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--brand); text-decoration: none; font-size: 18px; flex: none; }
.ix-back:hover { background: var(--surface-2); }
.ix-titlebox { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.ix-title { font-size: 18px; font-weight: 700; color: var(--brand); border: 1px solid transparent; background: transparent; padding: 2px 6px; margin-left: -6px; border-radius: 8px; width: 100%; }
.ix-title:hover:not([readonly]), .ix-title:focus { border-color: var(--line); background: var(--surface); outline: none; }
.ix-sub { display: flex; gap: 12px; align-items: center; font-size: 12.5px; flex-wrap: wrap; }
.ix-src { color: var(--muted); text-decoration: none; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-src:hover { color: var(--brand-2); }
.ix-progress { display: flex; align-items: center; gap: 8px; }
.ix-ring { width: 38px; height: 38px; transform: rotate(-90deg); }
.ix-ring circle { fill: none; stroke: var(--surface-2); stroke-width: 4; }
.ix-ring circle.v { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .4s; }
.ix-progress div { display: grid; line-height: 1.2; }
.ix-progress b { font-size: 15px; }
.ix-progress span { font-size: 11.5px; color: var(--muted); }
.ix-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.ix-seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.ix-seg button.on { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgb(15 23 42 / 12%); }
.ix-seg.full { display: flex; }
.ix-seg.full button { flex: 1; }
.ix-menuwrap { position: relative; }
.ix-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgb(15 23 42 / 18%); padding: 10px; display: grid; gap: 8px; z-index: 40; }
.ix-menu-h { font-weight: 700; font-size: 13px; color: var(--brand); }
.ix-menu label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.ix-menu > button { text-align: left; border: 0; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px; cursor: pointer; }
.ix-menu > button:hover { background: #eff6ff; color: var(--brand-2); }
.ix-cta { padding: 9px 18px; font-size: 14.5px; box-shadow: 0 6px 16px rgb(11 74 158 / 25%); }
.ix-head-warn { flex-basis: 100%; font-size: 12.5px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; }

/* ---- Studio: 3 cột */
.ix-body.focus { display: grid; grid-template-columns: 196px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ix-rail, .ix-insp { position: sticky; top: calc(var(--ix-head) + 4px); max-height: calc(100vh - var(--ix-head) - 20px); overflow-y: auto; }
.ix-rail { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.ix-rail-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.ix-rail-list { display: grid; gap: 8px; }
.ix-ti { display: grid; gap: 5px; text-align: left; border: 2px solid transparent; background: var(--surface-2); border-radius: 10px; padding: 5px; cursor: pointer; font: inherit; transition: border-color .12s, background .12s; }
.ix-ti:hover { border-color: var(--silver-2); }
.ix-ti.on { border-color: var(--brand-2); background: #eff6ff; }
.ix-ti.dragging, .ix-gc.dragging { opacity: .4; }
.ix-ti.drop-before { box-shadow: 0 -3px 0 var(--brand-2); }
.ix-ti.drop-after { box-shadow: 0 3px 0 var(--brand-2); }
.ix-ti-img { position: relative; display: grid; place-items: center; border-radius: 7px; overflow: hidden; background: #e2e8f0; max-height: 140px; }
.ix-ti-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ix-ti-img img.ref, .ix-gc-img img.ref { filter: grayscale(.5) opacity(.55); }
.ix-ph { font-size: 26px; opacity: .6; }
.ix-ti-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.ix-ti-meta b { min-width: 18px; height: 18px; border-radius: 6px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 11px; }
.ix-ti-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ix-sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--silver); flex: none; }
.ix-sdot.green { background: var(--ok); } .ix-sdot.blue { background: #2563eb; animation: ixPulse 1.2s infinite; } .ix-sdot.amber { background: #f59e0b; } .ix-sdot.red { background: var(--danger); }
.ix-shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 55%) 50%, transparent 80%); background-size: 200% 100%; animation: ixShimmer 1.4s linear infinite; }
@keyframes ixShimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.ix-add { border: 2px dashed var(--line); background: none; border-radius: 10px; padding: 10px; color: var(--muted); font: inherit; cursor: pointer; }
.ix-add:hover { border-color: var(--brand-2); color: var(--brand-2); background: #eff6ff; }

.ix-stage { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ix-stage-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ix-stage-h > b { font-size: 16px; }
.ix-fname { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brand-2) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.ix-frame { position: relative; width: 100%; max-height: calc(100vh - var(--ix-head) - 260px); min-height: 260px; margin: 0 auto; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: repeating-conic-gradient(#eef2f7 0 25%, #f8fafc 0 50%) 0 0 / 18px 18px; border: 1px solid var(--line); box-shadow: 0 8px 26px rgb(15 23 42 / 8%); }
.ix-pv { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.ix-pv-load { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(255 255 255 / 55%); }
.ix-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 24px; color: var(--muted); }
.ix-state b { color: var(--text); font-size: 15px; }
.ix-state-ico { font-size: 54px; opacity: .55; }
.ix-refpeek { display: flex; justify-content: center; margin-bottom: 4px; }
.ix-refpeek img { width: 92px; height: 66px; object-fit: cover; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 4px 12px rgb(15 23 42 / 18%); margin-left: -18px; transform: rotate(-4deg); }
.ix-refpeek img:nth-child(even) { transform: rotate(4deg) translateY(4px); }
.ix-refpeek img:first-child { margin-left: 0; }
.ix-drawbtn { padding: 11px 22px; font-size: 15px; margin-top: 6px; box-shadow: 0 6px 16px rgb(11 74 158 / 25%); }
.ix-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.ix-info { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ix-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ix-tools button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ix-tools button:hover:not(:disabled) { border-color: var(--brand-2); color: var(--brand-2); }
.ix-tools button:disabled { opacity: .45; cursor: default; }
.ix-summary { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.ix-revise { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.ix-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.ix-revise-row { display: flex; gap: 8px; }
.ix-revise-row input { flex: 1; min-width: 0; }
.ix-stage-foot { display: flex; gap: 16px; justify-content: flex-end; }

.ix-insp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 14px; }
.ix-sec { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.ix-sec:last-child { border-bottom: 0; }
.ix-sec h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ix-sec h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.ix-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ix-tile { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 9px; cursor: pointer; font: inherit; }
.ix-tile span { grid-row: 1 / 3; font-size: 20px; }
.ix-tile b { font-size: 13px; }
.ix-tile small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.ix-tile:hover:not(:disabled) { border-color: var(--brand-2); }
.ix-tile.on { border-color: var(--brand-2); background: #eff6ff; box-shadow: 0 0 0 1px var(--brand-2) inset; }
.ix-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ix-ratios { display: flex; flex-wrap: wrap; gap: 6px; }
.ix-ratio { display: grid; justify-items: center; gap: 4px; width: 56px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 4px 5px; cursor: pointer; font: inherit; font-size: 11.5px; }
.ix-ratio i { display: block; width: 28px; max-height: 32px; border: 2px solid var(--silver); border-radius: 3px; }
.ix-ratio.on { border-color: var(--brand-2); background: #eff6ff; color: var(--brand-2); font-weight: 600; }
.ix-ratio.on i { border-color: var(--brand-2); background: rgb(11 74 158 / 12%); }
.ix-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.ix-refs.loading { opacity: .5; pointer-events: none; }
.ix-ref { position: relative; margin: 0; width: 66px; height: 66px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.ix-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ix-ref figcaption { position: absolute; left: 3px; bottom: 3px; background: rgb(2 35 82 / 82%); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 4px; }
.ix-ref-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; font-size: 10px; cursor: pointer; padding: 0; opacity: 0; transition: opacity .12s; }
.ix-ref:hover .ix-ref-x, .ix-ref-x:focus-visible { opacity: 1; }
.ix-ref-add { width: 66px; height: 66px; border: 2px dashed var(--line); border-radius: 9px; display: grid; place-items: center; align-content: center; text-align: center; cursor: pointer; color: var(--muted); }
.ix-ref-add span { font-size: 20px; line-height: 1; }
.ix-ref-add small { font-size: 9.5px; line-height: 1.2; padding: 0 2px; }
.ix-ref-add:hover, .ix-ref-add.over { border-color: var(--brand-2); background: #eff6ff; color: var(--brand-2); }
.ix-file { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brand-2); word-break: break-all; }
.ix-meter { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 2px; }
.ix-meter i { display: block; height: 100%; background: var(--silver); transition: width .15s; }
.ix-meter.ok i { background: var(--ok); } .ix-meter.warn i { background: #f59e0b; } .ix-meter.bad i { background: var(--danger); }
.ix-meter-t { font-size: 11px; color: var(--muted); }
.ix-meter-t.ok { color: var(--ok); } .ix-meter-t.warn { color: var(--warn); } .ix-meter-t.bad { color: var(--danger); }

/* ---- Studio: chế độ Lưới */
.ix-gridview { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ix-gc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ix-gc.drop-before { box-shadow: -3px 0 0 var(--brand-2); }
.ix-gc.drop-after { box-shadow: 3px 0 0 var(--brand-2); }
.ix-gc-img { position: relative; display: grid; place-items: center; border: 0; padding: 0; background: #e2e8f0; cursor: pointer; overflow: hidden; max-height: 260px; }
.ix-gc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ix-gc-b { padding: 10px 12px; display: grid; gap: 6px; }
.ix-gc-t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-gc-f { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.ix-gc-add { border: 2px dashed var(--line); background: none; align-items: center; justify-content: center; min-height: 200px; color: var(--muted); font: inherit; cursor: pointer; gap: 4px; }
.ix-gc-add span { font-size: 30px; }
.ix-gc-add:hover { border-color: var(--brand-2); color: var(--brand-2); background: #eff6ff; }

/* ---- Bộ ảnh trống */
.ix-empty { max-width: 620px; margin: 30px auto; text-align: center; display: grid; gap: 12px; justify-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 34px 28px; }
.ix-empty-art { font-size: 46px; }
.ix-empty h3 { margin: 0; color: var(--brand); }
.ix-empty p { margin: 0; color: var(--muted); line-height: 1.55; }
.ix-empty .ix-urlbox { width: 100%; }

/* ---- Hộp đọc bài / danh sách ảnh */
.ix-reading { display: grid; justify-items: center; gap: 8px; padding: 20px; text-align: center; }
.ix-plan { display: grid; gap: 12px; }
.ix-plan-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ix-plan-bar { display: flex; justify-content: space-between; align-items: center; }
.ix-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; max-height: 58vh; overflow: auto; padding: 2px; }
.ix-pc { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; background: var(--surface); transition: border-color .12s, opacity .12s; }
.ix-pc > input { position: absolute; top: 14px; left: 14px; z-index: 2; width: 18px; height: 18px; accent-color: var(--brand-2); }
.ix-pc:has(input:checked) { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2) inset; }
.ix-pc:not(:has(input:checked)) { opacity: .55; }
.ix-pc-img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 30px; align-self: start; }
.ix-pc-img img { width: 100%; height: 100%; object-fit: cover; }
.ix-pc-n { position: absolute; right: 5px; top: 5px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.ix-pc-tag { position: absolute; left: 5px; bottom: 5px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 1px 6px; }
.ix-pc-b { display: grid; gap: 4px; align-content: start; font-size: 12.5px; min-width: 0; }
.ix-pc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ix-pc-pos { color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-pc-cap { color: var(--text); }
.ix-pc-desc { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ix-pc-seo { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }
.ix-pc-why { color: var(--brand-2); font-size: 11.5px; }
.ix-plan-opts { display: grid; gap: 6px; }

@media (max-width: 1280px) { .ix-body.focus { grid-template-columns: 170px minmax(0, 1fr) 300px; } .ix-tiles { grid-template-columns: 1fr; } .ix-tile:last-child:nth-child(odd) { grid-column: auto; } }
@media (max-width: 1050px) {
  .ix-body.focus { grid-template-columns: 1fr; }
  .ix-rail, .ix-insp { position: static; max-height: none; }
  .ix-rail { order: 0; } .ix-stage { order: 1; } .ix-insp { order: 2; }
  .ix-rail-list { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .ix-ti { flex: 0 0 120px; }
  .ix-rail-h .small { display: none; }
  .ix-frame { max-height: none; }
  .ix-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) { .ix-head { margin: -14px -16px 12px; padding: 10px 16px; } }
@media (max-width: 640px) {
  .ix-hero { padding: 20px 18px; border-radius: 14px; }
  .ix-hero h2 { font-size: 20px; }
  .ix-hero .ix-urlbox { flex-wrap: wrap; }
  .ix-hero .ix-urlbox .btn { width: 100%; justify-content: center; }
  .ix-stats { gap: 16px; }
  .ix-head { gap: 8px 10px; margin: -14px -14px 12px; padding: 10px 14px; }
  .ix-titlebox { order: 1; flex-basis: calc(100% - 50px); }
  .ix-progress { order: 2; } .ix-seg:not(.full) { order: 3; } .ix-menuwrap { order: 4; } .ix-cta { order: 5; flex: 1; justify-content: center; }
  .ix-seg:not(.full) button { padding: 6px 8px; }
  .ix-pc { grid-template-columns: 1fr; }
  .ix-plan-grid { grid-template-columns: 1fr; }
  .ix-tools button span { display: none; }
  .ix-tools button { padding: 8px 12px; font-size: 16px; }
}
/* chỉnh chi tiết sau khi xem ảnh chụp */
.ix-search { flex: 0 0 260px; }
.ix-stage-h .ix-fname { flex: 1; min-width: 0; max-width: none; }
.ix-stage-h .spacer { display: none; }
.ix-ratio em { font-style: normal; font-size: 9.5px; color: var(--muted); margin-top: -3px; }
@media (max-width: 1050px) { .ix-frame { min-height: 0; } }
@media (max-width: 640px) { .ix-search { flex: 1 1 100%; } .ix-stage-h .ix-fname { flex-basis: 100%; order: 9; } }
.ix-pv { position: absolute; inset: 0; }
/* Mẫu ảnh 0 token · chọn cách tạo ảnh · chất lượng cao */
.ix-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(640px, 100%); margin-top: 6px; }
@media (max-width: 720px) { .ix-choice { grid-template-columns: 1fr; } }
.ix-own { text-align: center; }
.ix-own:hover { border-color: var(--brand-2); }
.ix-ownurl { display: flex; align-items: center; gap: 8px; width: min(640px, 100%); padding: 4px 6px 4px 12px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; transition: border-color .12s, box-shadow .12s; }
.ix-ownurl:focus-within { border-style: solid; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgb(14 99 200 / 12%); }
.ix-ownurl input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 2px; font: inherit; font-size: 13.5px; color: var(--text); }
.ix-state.draft.loading { pointer-events: none; }
.ix-state.draft.loading .ix-ownurl, .ix-state.draft.loading .ix-own { opacity: .6; }
.ix-state.draft.loading .ix-ownurl::after { content: ''; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand-2); border-radius: 50%; animation: tlSpin .8s linear infinite; margin-right: 6px; }
.ix-opt { display: grid; justify-items: center; gap: 3px; padding: 14px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.ix-opt span { font-size: 24px; }
.ix-opt b { font-size: 14.5px; color: var(--text); }
.ix-opt small { font-size: 11.5px; color: var(--muted); }
.ix-opt:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(15 23 42 / 12%); border-color: var(--brand-2); }
.ix-opt.main { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.ix-opt.main b, .ix-opt.main small { color: #fff; }
.ix-opt.main small { opacity: .85; }
.ix-opt:disabled { opacity: .5; cursor: not-allowed; }
.ix-hq { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ix-hq.sm { margin-left: auto; }
.ix-cta2 { padding: 9px 14px; }
.ix-tplsec { background: linear-gradient(180deg, #f0fdf4, transparent); margin: 0 -14px; padding: 12px 14px !important; }
.ix-tplsec h4 { color: #047857; }
.ix-tplkinds { display: flex; flex-wrap: wrap; gap: 5px; }
.ix-tplsec textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; }
@media (max-width: 640px) { .ix-choice { grid-template-columns: 1fr; } .ix-cta2 { order: 5; } }
/* Ảnh chưa tạo: khung cao theo nội dung để không che các nút chọn cách tạo */
.ix-frame.choose { aspect-ratio: auto !important; max-height: none; min-height: 300px; padding: 18px 0; }
/* Thư viện mẫu · bảng màu · bố cục */
.ix-tplbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ix-tplcur { font-size: 12px; color: var(--muted); }
.ix-themes { display: flex; gap: 6px; flex-wrap: wrap; }
.ix-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; background: linear-gradient(135deg, var(--a) 0 55%, var(--b) 55% 100%); }
.ix-sw.on { box-shadow: 0 0 0 2px var(--brand-2); transform: scale(1.1); }
.ix-kinds summary { cursor: pointer; color: var(--muted); }
.ix-kinds .ix-tplkinds { margin-top: 6px; }
.modal.wide:has(.ix-gal) { max-width: min(1240px, 96vw); }
.ix-gal { display: grid; gap: 10px; }
.ix-gal-bar { display: flex; align-items: center; gap: 10px; }
.ix-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-height: 64vh; overflow: auto; padding: 2px; }
.ix-gcard { display: grid; gap: 6px; text-align: left; border: 2px solid transparent; background: var(--surface-2); border-radius: 12px; padding: 6px; cursor: pointer; font: inherit; transition: transform .12s, border-color .12s, box-shadow .12s; }
.ix-gcard:hover { transform: translateY(-2px); border-color: var(--brand-2); box-shadow: 0 8px 20px rgb(15 23 42 / 12%); }
.ix-gcard.on { border-color: var(--accent); }
.ix-gthumb { display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: #e2e8f0; max-height: 300px; }
.ix-gthumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.ix-gl { font-size: 12.5px; padding: 0 2px 2px; }
@media (max-width: 640px) { .ix-gal-grid { grid-template-columns: 1fr 1fr; } }
/* Phong cách chia nhóm · tông thị giác */
.ix-sgroup { display: grid; gap: 5px; }
.ix-sgroup > span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.ix-tone { display: grid; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ix-tone > span { font-size: 12.5px; font-weight: 700; }
.ix-tone .ix-link { justify-self: start; font-size: 12px; }
/* Tách nền */
.ix-ref.cut { background: repeating-conic-gradient(#e2e8f0 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.ix-ref.cut img { object-fit: contain; }
.ix-ref-cut { position: absolute; left: 3px; right: 3px; bottom: 3px; border: 0; border-radius: 6px; background: rgb(2 35 82 / 85%); color: #fff; font: inherit; font-size: 10px; padding: 3px 0; cursor: pointer; opacity: 0; transition: opacity .12s; }
.ix-ref:hover .ix-ref-cut, .ix-ref-cut:focus-visible, .ix-ref-cut:disabled { opacity: 1; }
.ix-ref:hover figcaption { opacity: 0; }
@media (hover: none) { .ix-ref-cut { opacity: 1; } }

/* Đăng nhập bằng Pegas CRM */
.crm-btn { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; padding: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; font-weight: 600; text-decoration: none; }
.crm-btn:hover { filter: brightness(1.08); color: #fff; }
.crm-btn img { border-radius: 4px; }

/* Hạn tự xoá bộ ảnh đã tải về */
.ix-bdl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; padding: 5px 8px; border-radius: 8px; font-size: 11.5px; background: var(--bg, #f1f5f9); color: var(--muted); }
.ix-bdl.soon { background: #fff7ed; color: #9a3412; }
.ix-bdl.keep { background: #eff6ff; color: #1d4ed8; }
.ix-bdl span { min-width: 0; }
.ix-bdl button { flex: none; white-space: nowrap; border: 0; background: #fff; border-radius: 6px; padding: 3px 8px; font: inherit; font-weight: 600; color: inherit; cursor: pointer; box-shadow: 0 1px 2px rgb(15 23 42 / 10%); }

/* Nhóm quyền */
.pq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pq-card { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.pq-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pq-perms { display: flex; flex-wrap: wrap; gap: 4px; }
.pq-p { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #94a3b8; }
.pq-p.view { background: #eff6ff; color: #1d4ed8; }
.pq-p.edit { background: #ecfdf5; color: #047857; font-weight: 600; }
.pq-table td.c { text-align: center; }
.pq-table input[type=radio] { width: 18px; height: 18px; cursor: pointer; }

/* Góp ý & báo lỗi: nút nổi góc màn hình */
.fb-fab { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; align-items: center; gap: 6px; padding: 10px 14px 10px 12px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 26px rgb(2 35 82 / 35%); transition: transform .15s, box-shadow .15s; }
.fb-fab span { font-size: 18px; line-height: 1; }
.fb-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgb(2 35 82 / 42%); }
.fb-fab.busy { opacity: .6; pointer-events: none; }
.fb-fab.busy span { animation: tlSpin 1s linear infinite; display: inline-block; }
@media (max-width: 900px) { .fb-fab { right: 12px; bottom: 12px; padding: 12px; } .fb-fab b { display: none; } }
.fb-modal .fb-tabs { margin-bottom: 12px; }
.fb-form { display: grid; gap: 10px; }
.fb-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fb-type { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.fb-type span { font-size: 18px; }
.fb-type.on { border-color: var(--brand-2); background: #eff6ff; color: var(--brand); }
@media (max-width: 600px) { .fb-types { grid-template-columns: 1fr; } }
.fb-shot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fb-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-tools.off, .fb-stage.off { opacity: .35; pointer-events: none; }
.fb-tool { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 16px; }
.fb-tool.on { border-color: var(--brand-2); background: #eff6ff; box-shadow: inset 0 0 0 1px var(--brand-2); }
.fb-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.fb-color.on { box-shadow: 0 0 0 2px var(--text); }
.fb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.fb-stage { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0f172a; max-height: 52vh; overflow-y: auto; }
.fb-canvas { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.fb-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb-mine li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 4px; }
.fb-reply { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 13px; white-space: pre-wrap; }
/* Trang quản trị góp ý */
.fb-list { display: grid; gap: 8px; }
.fb-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.fb-row:hover { border-color: var(--brand-2); }
.fb-row.unread { border-left: 4px solid #f59e0b; }
.fb-row img, .fb-noshot { width: 96px; height: 60px; object-fit: cover; object-position: top left; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; font-size: 24px; }
.fb-row-main { display: grid; gap: 2px; min-width: 0; }
.fb-row-page { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-detail { display: grid; gap: 10px; }
.fb-shot img { display: block; width: 100%; max-height: 55vh; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #0f172a; }
.fb-text { white-space: pre-wrap; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.topbar-mobile { gap: 8px; }
