/* TTMKT Campaign Planner – dùng tokens --tt-* của theme khi có, có giá trị dự phòng */
.cp-planner {
  --cp-red: var(--tt-red, #e41f27);
  --cp-ink: var(--tt-ink, #1b1d22);
  --cp-muted: var(--tt-muted, #6b7280);
  --cp-line: var(--tt-line, #e5e7eb);
  --cp-soft: #fdecec;
  --cp-bg: var(--tt-bg, #f6f7f9);
  max-width: 980px; margin: 0 auto; color: var(--cp-ink); font-family: "Be Vietnam Pro", system-ui, sans-serif; line-height: 1.55;
}
.cp-planner * { box-sizing: border-box; }
/* Theme (Flatsome) viết hoa toàn bộ chữ trên <button>: trả lại đúng chữ đã soạn */
.cp-planner button, .cp-planner .cp-btn, .cp-planner .cp-btn-link { text-transform: none; letter-spacing: normal; }
.cp-planner h2 { margin: 0 0 4px; font-size: 26px; }
.cp-planner h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; }
.cp-planner h3 span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cp-red); color: #fff; font-size: 15px; flex: none; }
.cp-planner h4 { margin: 18px 0 8px; font-size: 16px; }
.cp-card { background: #fff; border: 1px solid var(--cp-line); border-radius: 14px; padding: 22px; margin: 0 0 16px; }
.cp-muted { color: var(--cp-muted); }
.cp-lead { font-size: 17px; }
.cp-error { color: #b42318; background: #fef3f2; border-radius: 8px; padding: 10px 12px; }
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--cp-red); color: #fff !important; border: 0; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.cp-btn:disabled { opacity: .6; cursor: wait; }
.cp-btn-ghost { background: #fff; color: var(--cp-red) !important; border: 1px solid var(--cp-red); }
.cp-link { color: var(--cp-red); font-size: 14px; }
.cp-tag { display: inline-block; background: var(--cp-soft); color: var(--cp-red); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cp-tag-muted { background: var(--cp-bg); color: var(--cp-muted); }
.cp-planner h3 em.cp-tag { font-style: normal; font-size: 12px; }
/* Lời mời dùng gói dịch vụ tổng thể (thay cho nút AI với khách hàng) */
.cp-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: center;
  background: linear-gradient(135deg, #1b1d22 0%, #2b1316 60%, #5c1014 100%); color: #fff; border-radius: 16px; padding: 22px 26px; margin: 22px 0 0; }
.cp-offer.is-ai { background: linear-gradient(135deg, #10131c 0%, #1b2440 60%, #24346a 100%); }
.cp-offer.is-ai .cp-offer-pts li::before { color: #8aa6ff; }
.cp-offer-err { margin: 10px 0 0; color: #ffb4b4; font-size: 14px; }
.cp-offer-kicker { display: inline-block; background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cp-offer-main strong { display: block; margin: 10px 0 6px; font-size: 21px; line-height: 1.25; }
.cp-offer-main p { margin: 0; color: #d9dadd; font-size: 15px; }
.cp-offer-pts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; }
.cp-offer-pts li { position: relative; padding-left: 24px; font-size: 14px; }
.cp-offer-pts li::before { content: "✓"; position: absolute; left: 0; color: #ff6b6b; font-weight: 800; }
.cp-offer-cta { display: grid; gap: 8px; justify-items: center; text-align: center; }
.cp-btn-lg { padding: 14px 24px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.cp-offer-note { font-size: 13px; color: #b9bbc0; max-width: 220px; }
@media (max-width: 760px) { .cp-offer { grid-template-columns: 1fr; } .cp-offer-cta { justify-items: stretch; } }

.cp-service { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 16px; padding: 16px 18px; border-radius: 14px; background: var(--cp-ink); color: #fff; }
.cp-service > div { flex: 1 1 280px; }
.cp-service p { margin: 4px 0 0; color: #d1d5db; }
.cp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.cp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* form */
.cp-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.cp-steps span { padding: 6px 12px; border-radius: 999px; background: var(--cp-bg); color: var(--cp-muted); font-size: 14px; }
.cp-steps .is-on { background: var(--cp-red); color: #fff; }
.cp-steps .is-done { background: var(--cp-soft); color: var(--cp-red); }
.cp-field { display: block; margin-bottom: 14px; }
.cp-field span { display: block; font-weight: 600; margin-bottom: 6px; }
.cp-field input, .cp-field select, .cp-field textarea { width: 100%; border: 1px solid var(--cp-line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
/* Theme (Flatsome) đặt chiều cao cố định cho input/select: trả lại kích thước tự nhiên để chữ không bị cắt */
.cp-planner .cp-field input, .cp-planner .cp-field select { height: auto; min-height: 46px; line-height: 1.4; margin: 0; box-shadow: none; }
.cp-planner .cp-field textarea { height: auto; min-height: 90px; margin: 0; box-shadow: none; }
.cp-field input:focus, .cp-field select:focus, .cp-field textarea:focus { outline: 2px solid var(--cp-soft); border-color: var(--cp-red); }
.cp-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }

/* kết quả */
.cp-progress { height: 6px; background: var(--cp-line); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.cp-progress i { display: block; height: 100%; background: var(--cp-red); transition: width .4s; }
.cp-banner { background: var(--cp-soft); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.cp-banner a { color: var(--cp-red); font-weight: 600; }
.cp-sec.is-wait { opacity: .65; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cp-mini { border: 1px solid var(--cp-line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.cp-grid .cp-mini { margin: 0; }
.cp-mini p { margin: 6px 0; }
.cp-mini em { display: block; color: var(--cp-muted); font-style: normal; font-size: 13px; margin-top: 8px; }
.cp-mini ul, .cp-mini ol { margin: 4px 0 0; padding-left: 18px; }
.cp-swot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-swot > div { background: var(--cp-bg); border-radius: 10px; padding: 12px; }
.cp-swot ul { margin: 6px 0 0; padding-left: 18px; }
.cp-table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.cp-table th, .cp-table td { border-bottom: 1px solid var(--cp-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.cp-table th { background: var(--cp-bg); white-space: nowrap; }
.cp-bars { display: grid; gap: 8px; }
.cp-bar { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 48px; align-items: center; gap: 10px; font-size: 14px; }
.cp-bar div { height: 10px; background: var(--cp-bg); border-radius: 99px; overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: var(--cp-red); }
.cp-ad { background: var(--cp-bg); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.cp-phase { border-left: 3px solid var(--cp-red); padding-left: 14px; margin-bottom: 18px; }
.cp-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; padding: 16px; border: 1px dashed var(--cp-red); border-radius: 12px; background: linear-gradient(180deg, #fff, var(--cp-soft)); }
.cp-lock > div { flex: 1 1 260px; }
.cp-lock p { margin: 4px 0 0; color: var(--cp-muted); }
.cp-lock .cp-note { font-size: 13px; }
.cp-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--cp-soft); border-top-color: var(--cp-red); border-radius: 50%; animation: cp-spin .8s linear infinite; vertical-align: -2px; }
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-list { display: grid; gap: 10px; }
.cp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; text-decoration: none; color: inherit; margin: 0; }
/* Ô lưới làm mất inline-block của nhãn, phải chỉ rõ vị trí để nhãn không kéo giãn hết dòng */
.cp-item > strong { grid-column: 1; grid-row: 1; }
.cp-item > .cp-muted { grid-column: 1; grid-row: 2; font-size: 14px; }
.cp-item > .cp-tag { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; }

/* ================= Đầu kế hoạch ================= */
.cp-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-plan-head h2 { margin: 0 0 6px; font-size: 26px; }
.cp-plan-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-tag-edit { background: #eef2fb; color: #1d3f8f; }
.cp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cp-fact { background: #fff; border: 1px solid var(--cp-line); border-radius: 10px; padding: 10px 14px; }
.cp-fact span { display: block; font-size: 12px; color: var(--cp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.cp-fact strong { display: block; margin-top: 2px; }

/* ================= Khối nội dung trực quan ================= */
.cp-quote { border-left: 4px solid var(--cp-red); background: var(--cp-soft); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 16px 0; }
.cp-quote span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cp-red); }
.cp-quote p { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.cp-meta { color: var(--cp-muted); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-chip { display: inline-block; background: var(--cp-bg); border: 1px solid var(--cp-line); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.cp-chip-sm { font-size: 12px; padding: 3px 9px; }
.cp-seg-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cp-ava { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.cp-mini em.cp-pain { color: #a3121a; font-weight: 600; }
.cp-mini em.cp-motive { color: #1d6b3a; font-weight: 600; }
.cp-gap { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--cp-line); }
.cp-gap em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--cp-red); text-transform: uppercase; }
.cp-gap p { margin: 2px 0 0; }
.cp-swot > div.is-s { background: #e7f5ec; } .cp-swot > div.is-s strong { color: #1d6b3a; }
.cp-swot > div.is-w { background: #fdecec; } .cp-swot > div.is-w strong { color: #a3121a; }
.cp-swot > div.is-o { background: #eef2fb; } .cp-swot > div.is-o strong { color: #1d3f8f; }
.cp-swot > div.is-t { background: #fdf3e1; } .cp-swot > div.is-t strong { color: #8a4b00; }

.cp-two-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cp-hl { background: var(--cp-ink); color: #fff; border-radius: 12px; padding: 16px 18px; }
.cp-hl.is-alt { background: var(--cp-red); }
.cp-hl span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.cp-hl p { margin: 6px 0 0; font-size: 16px; font-weight: 600; line-height: 1.45; }
.cp-obj { position: relative; padding-top: 18px; }
.cp-num { position: absolute; top: -12px; left: 14px; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; }
.cp-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: 14px; }
.cp-kv dt { color: var(--cp-muted); font-weight: 600; white-space: nowrap; }
.cp-kv dd { margin: 0; }

.cp-funnel { display: grid; gap: 14px; }
.cp-fn-row { display: grid; gap: 6px; }
.cp-fn-bar { border-radius: 10px; color: #fff; padding: 10px 16px; min-width: 180px; }
.cp-fn-bar b { display: block; font-size: 13px; letter-spacing: .04em; }
.cp-fn-bar span { font-size: 14px; }
.cp-fn-tactics { margin: 0; padding-left: 20px; font-size: 14px; }

.cp-donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cp-donut-legend, .cp-stack-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; flex: 1 1 240px; }
.cp-donut-legend li, .cp-stack-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cp-donut-legend i, .cp-stack-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cp-donut-legend span, .cp-stack-legend span { flex: 1; min-width: 0; }
.cp-donut-legend b, .cp-stack-legend b { font-variant-numeric: tabular-nums; }
.cp-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--cp-bg); }
.cp-stack i { display: block; height: 100%; }
.cp-chan-sum { margin-bottom: 18px; }

.cp-chan { border: 1px solid var(--cp-line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.cp-chan-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cp-chan-h strong { flex: 1; min-width: 0; font-size: 17px; }
.cp-rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; font-weight: 700; flex: none; }
.cp-pring { flex: none; }
.cp-sub { display: block; font-style: normal; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cp-muted); margin: 14px 0 6px; }
.cp-steps-num { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.cp-ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.cp-ad { background: var(--cp-bg); border-radius: 10px; padding: 12px 14px; }
.cp-ad p { margin: 4px 0 8px; font-size: 14px; }
.cp-cta { display: inline-block; background: var(--cp-red); color: #fff; border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 600; }

/* Mẫu quảng cáo demo: dựng giống giao diện thật của từng kênh */
.cp-mock { font-size: 14px; }
.cp-mock-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cp-muted); margin-bottom: 6px; }
.cp-mock .cp-ava { width: 34px; height: 34px; font-size: 15px; }
.cp-fb, .cp-sr, .cp-mp, .cp-ms, .cp-tk { border: 1px solid var(--cp-line); border-radius: 12px; background: #fff; overflow: hidden; }
.cp-fb-h, .cp-mp-h, .cp-ms-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.cp-fb-h small, .cp-mp-h small { display: block; color: var(--cp-muted); font-size: 12px; }
.cp-fb-txt { margin: 0; padding: 0 12px 10px; }
.cp-fb-img { height: 120px; background: repeating-linear-gradient(45deg, #eef0f4, #eef0f4 10px, #e6e9ef 10px, #e6e9ef 20px); display: grid; place-items: center; color: var(--cp-muted); font-size: 13px; }
.cp-fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--cp-bg); }
.cp-fb-foot strong { font-size: 14px; min-width: 0; }
.cp-sr { padding: 12px 14px; }
.cp-sr-top { font-size: 12px; color: #3c4043; }
.cp-sr-top b { color: #202124; }
.cp-sr-title { color: #1a0dab; font-size: 17px; line-height: 1.3; margin: 4px 0 2px; }
.cp-sr-desc { color: #4d5156; font-size: 13px; }
.cp-sr-link { margin-top: 6px; color: #1a0dab; font-size: 13px; font-weight: 600; }
.cp-mp, .cp-ms { padding-bottom: 12px; }
.cp-mp p, .cp-ms-b p { margin: 0 12px 10px; font-size: 14px; }
.cp-mp .cp-cta, .cp-ms .cp-cta { margin-left: 12px; }
.cp-ms-h { background: var(--cp-bg); }
.cp-ms-b { padding: 10px 0 0; }
.cp-ms-b > strong { display: block; padding: 0 12px 4px; }
.cp-tk { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px; align-items: center; }
.cp-tk-screen { position: relative; height: 170px; border-radius: 10px; background: linear-gradient(160deg, #22232a, #3a2b3f); display: grid; place-items: center; }
.cp-tk-play { color: #fff; font-size: 26px; opacity: .85; }
.cp-tk-cap { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-size: 12px; line-height: 1.35; }
.cp-tk-side p { margin: 0 0 10px; font-size: 14px; }

.cp-insights { display: grid; gap: 12px; }
.cp-ins { position: relative; border: 1px solid var(--cp-line); border-radius: 12px; padding: 14px 18px 14px 44px; }
.cp-ins-n { position: absolute; left: 14px; top: 6px; font-size: 34px; line-height: 1; font-weight: 800; }
.cp-ins strong { font-size: 16px; }

.cp-timeline { display: flex; gap: 4px; margin: 4px 0 6px; }
.cp-tl { border-radius: 8px; color: #fff; padding: 8px 12px; min-width: 0; overflow: hidden; }
.cp-tl b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tl span { font-size: 12px; opacity: .85; }

.cp-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cp-week h5 { margin: 0 0 8px; font-size: 14px; border-left: 3px solid var(--cp-red); padding-left: 8px; }
.cp-post { border: 1px solid var(--cp-line); border-radius: 10px; margin-bottom: 6px; background: #fff; }
.cp-post > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; font-size: 14px; }
.cp-post > summary::-webkit-details-marker { display: none; }
.cp-post-day { font-weight: 700; color: var(--cp-red); white-space: nowrap; font-size: 13px; }
.cp-post-topic { flex: 1; min-width: 0; }
.cp-post-b { padding: 0 10px 10px; font-size: 14px; }
.cp-caption { background: var(--cp-bg); border-radius: 8px; padding: 10px; white-space: pre-line; }

/* ================= Trình sửa nội dung ================= */
.cp-sec-tools { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.cp-btn-link { background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--cp-red); cursor: pointer; }
.cp-btn-link:hover { text-decoration: underline; }
.cp-editor { display: grid; gap: 14px; }
.cp-ed-help { margin: 0; padding: 10px 14px; background: #eef2fb; color: #1d3f8f; border-radius: 10px; font-size: 14px; }
.cp-ed-obj { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.cp-ed-obj > legend { font-weight: 700; font-size: 14px; padding: 0; }
.cp-ed-f { display: grid; gap: 4px; }
.cp-ed-f > span { font-size: 13px; font-weight: 600; color: var(--cp-muted); }
.cp-ed-f input, .cp-ed-f select, .cp-ed-f textarea { width: 100%; padding: 9px 11px; border: 1px solid #c9c9d0; border-radius: 6px; font: inherit; background: #fff; }
.cp-ed-f.is-num { max-width: 180px; }
.cp-ed-f input:focus-visible, .cp-ed-f textarea:focus-visible, .cp-ed-f select:focus-visible { outline: 2px solid var(--cp-red); outline-offset: 1px; }
.cp-ed-arr { border: 1px dashed var(--cp-line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.cp-ed-lab { font-size: 13px; font-weight: 700; }
.cp-ed-items { display: grid; gap: 10px; }
.cp-ed-item { position: relative; border: 1px solid var(--cp-line); border-radius: 8px; padding: 12px 40px 12px 12px; background: #fff; }
.cp-ed-item.is-simple { padding: 6px 40px 6px 6px; border-style: none; }
.cp-ed-del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 1px solid var(--cp-line); border-radius: 6px; background: #fff; color: var(--cp-muted); font-size: 17px; line-height: 1; cursor: pointer; }
.cp-ed-del:hover { border-color: var(--cp-red); color: var(--cp-red); }
.cp-ed-add { justify-self: start; background: #fff; border: 1px solid var(--cp-red); color: var(--cp-red); border-radius: 6px; padding: 6px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cp-ed-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cp-editor .cp-msg { color: #a3121a; margin: 0; font-size: 14px; }

/* Các phần kế hoạch dạng gấp/mở */
.cp-planner details.cp-sec { padding: 0; overflow: hidden; }
.cp-planner details.cp-sec > summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 600; }
.cp-planner details.cp-sec > summary::-webkit-details-marker { display: none; }
.cp-planner details.cp-sec > summary:hover .cp-sec-t { color: var(--cp-red); }
.cp-sec-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cp-red); color: #fff; font-size: 15px; flex: none; }
.cp-sec-t { flex: 1; min-width: 0; }
.cp-sec-x { width: 10px; height: 10px; flex: none; border-right: 2px solid var(--cp-muted); border-bottom: 2px solid var(--cp-muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.cp-planner details.cp-sec[open] > summary .cp-sec-x { transform: rotate(-135deg); }
.cp-sec-b { padding: 0 20px 20px; border-top: 1px solid var(--cp-line); padding-top: 16px; }

/* Chọn việc ưu tiên trong bảng "Kế hoạch triển khai" */
.cp-work-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--cp-soft); }
.cp-work-note > div { flex: 1 1 280px; }
.cp-work-note p { margin: 4px 0 0; font-size: 14px; color: #8a0f16; }
.cp-th-star, .cp-td-star { width: 34px; text-align: center !important; padding-left: 4px !important; padding-right: 4px !important; }
.cp-planner .cp-star { background: none; border: 0; padding: 0; width: 26px; height: 26px; font-size: 18px; line-height: 1; color: #d6d8dc; cursor: pointer; }
.cp-planner .cp-star.is-on { color: #e8a800; }
.cp-planner .cp-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--cp-bg); color: var(--cp-muted); }
.cp-planner .cp-pill.is-done { background: #e7f5ec; color: #1d6b3a; }
.cp-planner .cp-pill.is-review { background: #fdf3e1; color: #8a4b00; }
.cp-planner .cp-pill.is-doing { background: #eef2fb; color: #1d3f8f; }
.cp-planner .cp-pill.is-revision { background: var(--cp-soft); color: #a3121a; }

@media (max-width: 640px) {
  .cp-planner details.cp-sec > summary { padding: 14px 16px; font-size: 16px; }
  .cp-sec-b { padding: 14px 16px 16px; }
  .cp-card { padding: 16px; }
  .cp-swot { grid-template-columns: 1fr; }
  .cp-bar { grid-template-columns: 1fr 48px; }
  .cp-bar span { grid-column: 1 / -1; }
  .cp-planner h2 { font-size: 22px; }
}
@media print {
  .cp-btn, .cp-banner, .cp-lock, .cp-side, .cp-offer, .cp-service, .cp-sec-tools { display: none !important; }
  .cp-card { break-inside: avoid; border: 0; padding: 0; }
}

/* Link từ dòng kế hoạch sang thẻ việc tương ứng trên bảng công việc */
.cp-task-go { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--tt-red, #d2232a); text-decoration: none; }
.cp-task-go:hover { text-decoration: underline; }

/* ================= Soạn kế hoạch chi tiết không cần AI ================= */
.cp-build { border: 1px solid var(--cp-line); border-radius: 12px; padding: 16px 18px; margin-top: 18px; background: #fff; }
.cp-build-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-build-h strong { font-size: 18px; }
.cp-build-ways { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; }
.cp-build-ways b { font-weight: 700; }
.cp-build-ways small { display: block; margin-top: 4px; color: var(--cp-muted); font-size: 13px; }
.cp-build-copy { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.cp-build-copy select { flex: 1 1 260px; min-width: 0; padding: 8px 10px; border: 1px solid var(--cp-line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.cp-build-tpl { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cp-line); font-size: 14px; }
.cp-build-tpl label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cp-build-tpl small { display: block; margin-top: 4px; color: var(--cp-muted); font-size: 13px; }
.cp-build-ai { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--cp-bg); font-size: 13px; color: var(--cp-muted); }
.cp-offer-cta .cp-btn-lg { display: block; width: 100%; text-align: center; margin-bottom: 8px; line-height: 1.3; }
.cp-offer-cta .cp-btn-lg small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; opacity: .85; }
.cp-ai-paid { color: #c0121a; }
.cp-ai-free { color: #1d6b3a; }
.cp-build-danger { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cp-line); }
.cp-build-danger small { display: block; margin-top: 4px; color: var(--cp-muted); font-size: 13px; }
.cp-planner .cp-btn-link.is-del { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: #c0121a; cursor: pointer; text-decoration: underline; }

/* ================= Ngân sách & dự báo ================= */
.cp-tw { margin-top: 8px; }
.cp-nowrap { white-space: nowrap; }
.cp-sum-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.cp-sum { flex: 0 0 auto; padding: 12px 16px; border-radius: 12px; background: var(--cp-soft); }
.cp-sum span { display: block; font-size: 13px; color: var(--cp-muted); }
.cp-sum b { font-size: 24px; line-height: 1.2; }
.cp-sum-note { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--cp-muted); }
.cp-table-num td { font-variant-numeric: tabular-nums; }
.cp-mbar { display: block; height: 4px; border-radius: 99px; margin-bottom: 3px; min-width: 6px; }
.cp-assume { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--cp-muted); }

/* ================= Chốt sale & chăm sóc ================= */
.cp-deal { border: 1px solid var(--cp-line); border-left: 3px solid var(--cp-red); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; background: linear-gradient(180deg, #fff, var(--cp-soft)); }
.cp-deal-h span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cp-red); }
.cp-deal-h strong { font-size: 19px; }
.cp-deal p { margin: 6px 0 0; }
.cp-lp { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.cp-lp strong { display: block; }
.cp-lp em { font-size: 13px; color: var(--cp-muted); font-style: normal; }
.cp-lp p { margin: 4px 0 0; }
.cp-lp-cta { margin: 12px 0 0; }
.cp-scripts { display: grid; gap: 10px; }
.cp-script { background: var(--cp-bg); border-radius: 10px; padding: 12px 14px; }
.cp-script blockquote, .cp-after blockquote { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--cp-red); border-radius: 0 8px 8px 0; background: #fff; font-size: 14px; }
.cp-after { display: grid; gap: 12px; }
.cp-after-i { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.cp-after-d { display: inline-block; padding: 5px 10px; border-radius: 99px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ================= Đo lường & rủi ro ================= */
.cp-utm { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.cp-utm code { font-size: 13px; word-break: break-all; background: var(--cp-bg); padding: 2px 6px; border-radius: 6px; }
.cp-risk { border-left: 3px solid var(--cp-red); }

@media (max-width: 640px) {
  .cp-sum b { font-size: 20px; }
  .cp-after-i { grid-template-columns: 1fr; }
}
