/* =====================================================
   BO CONG CU KHAM DOANH NGHIEP AHAYTA - STYLE DUNG CHUNG
   Dung cho: /khachcu /cac /hoavon /ai /bo-cong-cu
   Trang /lvc va / (bai kham 40 cau) van giu style rieng trong file cua no.
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f2a4a; --navy-mid: #1a3f6f; --blue: #1e5faa; --blue-lt: #2e7dd1;
  --accent: #e85d2f; --green: #16a34a; --green-dk: #0f4a1e; --yellow: #ca8a04;
  --orange: #ea580c; --red: #dc2626;
  --bg: #f8fafc; --card: #ffffff; --border: #e2e8f0;
  --text: #1e293b; --text-mid: #475569; --text-lt: #94a3b8;
  --radius: 12px; --shadow: 0 2px 12px rgba(15,42,74,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue); }

/* TOP BAR */
.top-bar {
  background: var(--navy); color: #fff; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.logo-mark {
  width: 36px; height: 36px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff; flex-shrink: 0; letter-spacing: -0.5px;
}
.top-bar-name { font-size: 17px; font-weight: 700; }
.top-bar-sub { font-size: 14px; color: rgba(255,255,255,0.65); }

/* HERO */
.hero { padding: 40px 0 26px; }
.hero-badge {
  display: inline-block; background: #e0f0ff; color: var(--blue);
  font-size: 15px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(25px, 5.4vw, 36px); font-weight: 800; color: var(--navy); line-height: 1.25; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: 19px; color: var(--text-mid); margin-bottom: 18px; line-height: 1.7; }
.hero-note {
  background: #f0f7ff; border-left: 3px solid var(--blue); padding: 12px 16px;
  border-radius: 0 8px 8px 0; font-size: 17px; color: var(--text-mid); line-height: 1.65;
}
.hero-note b { color: var(--navy); }

/* CARD */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; margin-bottom: 22px; }
.section-heading { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.section-sub { font-size: 16px; color: var(--text-mid); margin-bottom: 16px; line-height: 1.6; }

/* CHIPS */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  border: 2px solid var(--border); background: #fff; color: var(--text-mid);
  padding: 8px 14px; border-radius: 20px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.chip.active { border-color: var(--blue); color: var(--blue); background: #e0f0ff; }

/* INPUT */
label.lbl { display: block; font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.hint { font-size: 14px; color: var(--text-lt); margin-top: 4px; line-height: 1.5; }
.input-field {
  width: 100%; padding: 12px 14px; font-size: 18px; border: 2px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text); font-family: inherit;
}
.input-field:focus { outline: none; border-color: var(--blue); }
.field { margin-bottom: 18px; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-wrap { position: relative; }
.money-wrap .unit {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--text-lt); font-weight: 700; pointer-events: none;
}
.money-wrap .input-field { padding-right: 58px; }

/* THANH TRUOT */
.range-row { margin-bottom: 16px; }
.range-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.range-meta .k { font-size: 16px; font-weight: 700; color: var(--text); }
.range-meta .v { font-size: 18px; font-weight: 800; color: var(--accent); }
input[type=range] {
  width: 100%; height: 30px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: #dbe4ef; }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: #dbe4ef; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15,42,74,0.3); margin-top: -9px;
}
input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15,42,74,0.3);
}

/* KHOI KET QUA CHU DAO */
.big-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; margin-bottom: 18px;
}
.big-label { font-size: 16px; color: rgba(255,255,255,0.75); margin-bottom: 4px; }
.big-num { font-size: clamp(32px, 8.5vw, 46px); font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; }
.big-num small { font-size: 0.48em; font-weight: 700; }
.big-sub { font-size: 17px; margin-top: 12px; line-height: 1.6; color: rgba(255,255,255,0.9); }
.big-sub b { color: #ffd28a; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: #f3f7fc; border-radius: 10px; padding: 12px 14px; }
.stat .k { font-size: 14px; color: var(--text-mid); font-weight: 700; }
.stat .v { font-size: 21px; font-weight: 800; color: var(--navy); line-height: 1.3; }
.stat .n { font-size: 13px; color: var(--text-lt); margin-top: 2px; line-height: 1.4; }
.stat.wide { grid-column: 1 / -1; }
.stat.good .v { color: var(--green-dk); }
.stat.bad .v { color: var(--red); }

.formula {
  background: #fff8e6; border-left: 4px solid #f0a020; padding: 12px 16px;
  border-radius: 0 8px 8px 0; font-size: 16px; line-height: 1.7; margin-bottom: 18px;
}
.formula b { color: var(--navy); }

/* COT NGANG */
.bars { margin-bottom: 18px; }
.bar-row { margin-bottom: 12px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 3px; gap: 8px; }
.bar-meta b { color: var(--navy); }
.bar-track { height: 14px; background: #eef2f7; border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-lt)); border-radius: 7px; min-width: 3px; transition: width 0.25s; }
.bar-fill.warm { background: linear-gradient(90deg, #e85d2f, #f59e5b); }
.bar-fill.grey { background: linear-gradient(90deg, #94a3b8, #b8c2cf); }
.bar-fill.green { background: linear-gradient(90deg, #16a34a, #4ade80); }

/* KHOI NHAN XET */
.insight { border: 2px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.insight.green { border-color: #bfe6c8; background: #eafaef; }
.insight.orange { border-color: #ffd7c7; background: #fff4ef; }
.insight.blue { border-color: #c7ddf5; background: #f0f7ff; }
.insight-tag {
  font-size: 13px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 6px;
}
.insight p { font-size: 17px; line-height: 1.65; }
.insight p + p { margin-top: 8px; }
.insight b { color: var(--navy); }
.insight .big { font-size: 22px; font-weight: 800; color: var(--green-dk); }
.insight .big-red { font-size: 22px; font-weight: 800; color: var(--red); }

.todo { counter-reset: todo; }
.todo-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.todo-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 3px;
}
.todo-body { font-size: 17px; line-height: 1.6; color: var(--text-mid); }
.todo-body b { color: var(--navy); }

.warn {
  background: #fff4ef; border: 2px solid #ffd7c7; border-radius: 10px; padding: 14px;
  font-size: 16px; color: var(--text-mid); display: none; margin-bottom: 14px;
}
.warn.show { display: block; }

/* BIEU DO SVG */
.chart-wrap { overflow-x: auto; margin-bottom: 18px; }
.chart-wrap svg { display: block; width: 100%; height: auto; min-width: 300px; }

/* NUT */
.btn {
  display: block; width: 100%; padding: 16px 20px; border: none; border-radius: 10px;
  font-size: 18px; font-weight: 700; cursor: pointer; text-align: center;
  font-family: inherit; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(232,93,47,0.32); }
.btn-primary:hover { background: #d14d1e; }
.btn-secondary { background: #fff; color: var(--text-mid); border: 2px solid var(--border); font-size: 16px; padding: 11px 16px; }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-zalo { display: block; background: #0068ff; color: #fff; padding: 16px 20px; border-radius: 10px; font-size: 18px; font-weight: 700; text-align: center; text-decoration: none; }
.btn-zalo:hover { background: #0057d6; }

/* CTA THU LEAD */
.cta-block { background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 24px 18px; margin-bottom: 22px; }
.cta-block h2 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.cta-block p { font-size: 17px; color: var(--text-mid); margin-bottom: 14px; line-height: 1.65; }
.cta-block ul { margin: 0 0 18px 20px; font-size: 17px; color: var(--text); line-height: 1.7; }

.zalo-block { background: #eef5ff; border-radius: var(--radius); padding: 24px 18px; margin-bottom: 22px; }
.zalo-tag { display: inline-block; background: var(--green); color: #fff; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 12px; letter-spacing: 0.8px; margin-bottom: 10px; }
.zalo-block h2 { font-size: 21px; font-weight: 800; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.zalo-block p { font-size: 17px; color: var(--text-mid); margin-bottom: 12px; line-height: 1.65; }
.zalo-note { font-size: 14px; color: var(--text-lt); text-align: center; margin-top: 10px; }

.gift-box { background: #fff; border: 2px dashed var(--accent); border-radius: 10px; padding: 16px; margin: 4px 0 16px; }
.gift-title { font-size: 18px; font-weight: 800; color: var(--accent); line-height: 1.3; margin-bottom: 8px; }
.gift-box p { font-size: 16px; color: var(--text-mid); margin-bottom: 8px; line-height: 1.6; }
.gift-box p:last-child { margin-bottom: 0; }
.gift-how { color: var(--text); }
.gift-how b { color: var(--navy); }

/* DIEU HUONG CHEO GIUA CAC CONG CU */
.tools { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 22px; }
.tools h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.tools .tools-sub { font-size: 16px; color: var(--text-mid); margin-bottom: 14px; line-height: 1.6; }
.tool-list { display: grid; gap: 10px; }
.tool-item {
  display: flex; gap: 12px; align-items: flex-start; text-decoration: none;
  border: 2px solid var(--border); border-radius: 10px; padding: 13px 14px; background: #fff;
}
.tool-item:hover { border-color: var(--blue); background: #f7fbff; }
.tool-ico { font-size: 22px; line-height: 1.2; flex-shrink: 0; }
.tool-tx .t { font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.35; }
.tool-tx .d { font-size: 15px; color: var(--text-mid); line-height: 1.5; margin-top: 2px; }
.tool-item.here { border-color: var(--accent); background: #fff4ef; }
.tool-item.here .t::after { content: ' (bạn đang ở đây)'; color: var(--accent); font-weight: 700; }

.footer { text-align: center; font-size: 14px; color: var(--text-lt); padding: 20px 0 40px; line-height: 1.6; }

/* THANH CTA DINH */
#sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px;
  background: rgba(248,250,252,0.96); border-top: 1px solid var(--border); z-index: 90; display: none;
}
#sticky-cta.show { display: block; }
#sticky-cta .btn { max-width: 720px; margin: 0 auto; padding: 14px; font-size: 17px; }
body.has-sticky { padding-bottom: 80px; }

/* MODAL THU LEAD */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,42,74,0.55);
  z-index: 200; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--card); border-radius: var(--radius); padding: 28px 24px 24px;
  width: 100%; max-width: 440px; box-shadow: 0 16px 48px rgba(15,42,74,0.22);
  position: relative; max-height: 95vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none; cursor: pointer;
  font-size: 24px; color: var(--text-lt); line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-title { font-size: 21px; font-weight: 800; color: var(--navy); margin-bottom: 6px; padding-right: 24px; line-height: 1.3; }
.modal-sub { font-size: 16px; color: var(--text-mid); margin-bottom: 18px; line-height: 1.6; }
.modal-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.modal-field label { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-field .opt { font-weight: 400; color: var(--text-lt); }
.input-error { font-size: 15px; color: var(--red); display: none; margin-top: 3px; }
.input-error.show { display: block; }
input.has-error { border-color: var(--red) !important; }
.modal-submit {
  width: 100%; padding: 15px; background: var(--accent); color: #fff; border: none; border-radius: 10px;
  font-size: 18px; font-weight: 700; cursor: pointer; margin-top: 6px;
  box-shadow: 0 4px 14px rgba(232,93,47,0.32); font-family: inherit;
}
.modal-submit:hover { background: #d14d1e; }
.modal-submit:disabled { background: var(--text-lt); box-shadow: none; cursor: not-allowed; }
.modal-note { font-size: 14px; color: var(--text-lt); text-align: center; margin-top: 12px; line-height: 1.5; }
#modal-done { display: none; }
#modal-done.show { display: block; }
#modal-form.hide { display: none; }
.done-title { font-size: 22px; font-weight: 800; color: var(--green-dk); margin-bottom: 8px; }
.done-desc { font-size: 17px; color: var(--text-mid); line-height: 1.65; margin-bottom: 16px; }

@media (max-width: 420px) {
  .field-2 { grid-template-columns: 1fr; }
}
