/* Giao dien cong PnL. Mot file dung chung cho ca 3 trang. */

:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #16202c;
  --ink-soft: #5b6b7c;
  --ink-faint: #8a99a8;
  --line: #e3e8ee;
  --brand: #12603f;
  --brand-soft: #e6f2ec;
  --accent: #0b7285;
  --ok: #1a7f4b;
  --ok-bg: #e8f5ee;
  --warn: #a86a00;
  --warn-bg: #fdf3e0;
  --bad: #b32626;
  --bad-bg: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 14px rgba(16, 32, 48, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent); }

/* ---- thanh tren cung ---- */
.topbar {
  background: var(--brand);
  color: #fff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .logo { font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.topbar .logo span { opacity: .72; font-weight: 400; }
.topbar .spacer { flex: 1; }
.topbar select, .topbar .btn-ghost {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.topbar select option { color: #16202c; }
.topbar .who { font-size: 13.5px; opacity: .9; }

/* ---- khung trang ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 9px;
  background: var(--bad);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  vertical-align: 1px;
}
.tabs .badge.zero { display: none; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 650;
}
.panel .sub { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; }

/* ---- the so lieu ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow);
}
.kpi .label { color: var(--ink-soft); font-size: 13px; }
.kpi .value { font-size: 25px; font-weight: 680; margin-top: 3px; letter-spacing: -.4px; }
.kpi .value.sm { font-size: 20px; }
.kpi .note { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.kpi.good .value { color: var(--ok); }
.kpi.bad .value { color: var(--bad); }

/* ---- bang ---- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th {
  text-align: left;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}
td { padding: 8px 10px; border-bottom: 1px solid #f0f3f6; vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* bang P&L */
.pnl td { padding: 7px 10px; }
.pnl tr.head td {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border-bottom: none;
  padding-top: 11px;
  padding-bottom: 11px;
}
.pnl tr.calc td { font-weight: 700; background: #fafbfc; border-top: 1px solid var(--line); }
.pnl tr.pct td { color: var(--ink-soft); font-size: 13.5px; }
.pnl tr.blank td { height: 8px; border: none; background: none; padding: 0; }
.pnl tr.line td:first-child { padding-left: 22px; }
.pnl .warn-inline {
  display: block;
  font-size: 12.5px;
  color: var(--warn);
  margin-top: 2px;
}
.pnl .n { color: var(--ink-faint); font-size: 12px; }

/* ---- phieu kiem ---- */
.check {
  display: flex;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 9px;
  margin-bottom: 9px;
  border: 1px solid transparent;
  align-items: flex-start;
}
.check .icon { font-weight: 800; font-size: 15px; line-height: 1.4; flex-shrink: 0; width: 18px; }
.check .title { font-weight: 620; }
.check .detail { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.check.chan { background: var(--bad-bg); border-color: #f5cfcd; }
.check.chan .icon, .check.chan .title { color: var(--bad); }
.check.canh_bao { background: var(--warn-bg); border-color: #f3e0bd; }
.check.canh_bao .icon, .check.canh_bao .title { color: var(--warn); }
.check.tin { background: var(--ok-bg); border-color: #cfe8d9; }
.check.tin .icon, .check.tin .title { color: var(--ok); }

/* ---- nut ---- */
.btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.sec { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.danger { background: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

input[type=text], input[type=email], input[type=password], select, textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
label.field input, label.field select { width: 100%; }

/* ---- nhan trang thai ---- */
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.grey { background: #eef1f4; color: var(--ink-soft); }

/* ---- muc can ban chon ---- */
.pending-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: #fff;
}
.pending-item .top { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pending-item .date { color: var(--ink-faint); font-size: 13px; white-space: nowrap; }
.pending-item .desc { flex: 1; min-width: 220px; }
.pending-item .amt { font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pending-item .amt.thu { color: var(--ok); }
.pending-item .actions { display: flex; gap: 9px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pending-item select { min-width: 260px; }
.pending-item label.remember { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }

/* ---- khac ---- */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-faint); }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.hint { font-size: 13.5px; color: var(--ink-soft); background: #f7f9fa; border-left: 3px solid var(--line); padding: 10px 13px; border-radius: 0 7px 7px 0; margin: 12px 0; }
.hint code { background: #eef1f4; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

/* ---- trang dang nhap ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #12603f 0%, #0d4a31 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 34px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.login-card h1 { margin: 0 0 4px; font-size: 21px; }
.login-card .sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 22px; }
.login-card .btn { width: 100%; padding: 11px; font-size: 15px; }
.login-card .err { background: var(--bad-bg); color: var(--bad); padding: 9px 12px; border-radius: 7px; font-size: 13.5px; margin-bottom: 14px; }

/* ==========================================================================
   Trang gioi thieu dich vu (gioi-thieu.html).
   Dung chung bien mau o :root ben tren de mot lan doi mau la ca hai trang doi.
   ========================================================================== */

body.landing { background: #fff; }
.lp-in { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

.lp-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.lp-nav-in {
  max-width: 1080px; margin: 0 auto; padding: 0 22px;
  height: 62px; display: flex; align-items: center; gap: 20px;
}
.lp-nav .logo { font-weight: 700; font-size: 16.5px; color: var(--brand); }
.lp-nav .logo span { font-weight: 400; color: var(--ink-soft); }
.lp-nav nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.lp-nav nav a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
.lp-nav nav a:hover { color: var(--ink); }
.lp-nav nav a.btn { color: #fff; text-decoration: none; }
@media (max-width: 700px) {
  .lp-nav nav a:not(.btn) { display: none; }
}

.lp-hero { padding: 66px 0 58px; background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); }
.lp-hero h1 {
  margin: 0 0 18px; font-size: 40px; line-height: 1.22;
  letter-spacing: -.9px; font-weight: 720; color: var(--ink); max-width: 20ch;
}
.lp-hero .lead { font-size: 17px; color: var(--ink-soft); max-width: 62ch; margin: 0 0 14px; }
.lp-hero .lead.strong { color: var(--ink); }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn.lg { padding: 13px 26px; font-size: 15.5px; text-decoration: none; display: inline-block; }
@media (max-width: 640px) { .lp-hero h1 { font-size: 30px; } }

.lp-sec { padding: 62px 0; }
.lp-band { padding: 62px 0; background: #f7f9fa; border-block: 1px solid var(--line); }
.lp-end { padding: 66px 0; background: var(--brand); color: #fff; text-align: center; }
.lp-end h2 { color: #fff; }
.lp-end p { color: rgba(255, 255, 255, .88); max-width: 56ch; margin: 0 auto 26px; font-size: 16px; }
.lp-end .btn { background: #fff; color: var(--brand); font-weight: 620; }

.lp-sec h2, .lp-band h2 {
  font-size: 27px; letter-spacing: -.5px; margin: 0 0 8px; font-weight: 700;
}
.lp-sub { color: var(--ink-soft); margin: 0 0 30px; font-size: 15px; }
.lp-sec h2 + .lp-cards, .lp-band h2 + .lp-cards,
.lp-sec h2 + .lp-steps, .lp-sec h2 + .lp-faq, .lp-band h2 + .lp-faq { margin-top: 30px; }

.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 18px; }
.lp-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 22px 20px; box-shadow: var(--shadow);
}
.lp-card h3 { margin: 0 0 7px; font-size: 16.5px; font-weight: 640; }
.lp-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.lp-ic {
  width: 30px; height: 30px; border-radius: 8px; margin-bottom: 13px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14.5px;
}

.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 22px; }
.lp-step { border-top: 3px solid var(--brand); padding-top: 16px; }
.lp-num { color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .7px; text-transform: uppercase; }
.lp-step h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 640; }
.lp-step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

.lp-note {
  margin-top: 32px; background: var(--warn-bg); border: 1px solid #f3e0bd;
  border-radius: 10px; padding: 17px 20px; font-size: 14.5px; color: #6b4a10;
}
.lp-note b { color: var(--warn); }

/* ---- bang gia ---- */
.lp-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; align-items: start; }
.lp-price {
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 26px 24px; box-shadow: var(--shadow); position: relative;
}
.lp-price.hot { border: 2px solid var(--brand); box-shadow: 0 8px 30px rgba(18, 96, 63, .13); }
.lp-tag {
  position: absolute; top: -12px; left: 24px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: .3px;
}
.lp-plan { font-size: 14px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .8px; }
.lp-amt { font-size: 32px; font-weight: 720; letter-spacing: -1px; margin: 9px 0 2px; }
.lp-amt span { font-size: 14.5px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; margin-left: 5px; }
.lp-for { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 17px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lp-price ul { list-style: none; margin: 0; padding: 0; }
.lp-price li { position: relative; padding: 6px 0 6px 25px; font-size: 14.5px; color: var(--ink); }
.lp-price li::before {
  content: ""; position: absolute; left: 3px; top: 13px;
  width: 6px; height: 10px; border: solid var(--ok); border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.lp-setup {
  margin-top: 26px; background: var(--brand-soft); border-radius: 12px; padding: 24px 26px;
}
.lp-setup h3 { margin: 0 0 8px; font-size: 18px; color: var(--brand); font-weight: 660; }
.lp-setup p { margin: 0 0 8px; color: var(--ink-soft); font-size: 14.5px; max-width: 76ch; }
.lp-free { color: var(--ok) !important; font-weight: 620; }

/* ---- cau hoi thuong gap ---- */
.lp-faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 15px 19px; margin-bottom: 11px;
}
.lp-faq summary { cursor: pointer; font-weight: 620; font-size: 15.5px; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::before { content: "+ "; color: var(--brand); font-weight: 800; }
.lp-faq details[open] summary::before { content: "- "; }
.lp-faq p { margin: 11px 0 2px; color: var(--ink-soft); font-size: 14.5px; max-width: 82ch; }

.lp-foot { padding: 30px 0; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 13.5px; }
.lp-foot p { margin: 0 0 4px; }
.lp-small { font-size: 12.5px; }

/* ---- bang bao cao nhieu thang -------------------------------------------
   Cot ten khoan muc dinh ben trai khi cuon ngang, neu khong nhin 12 thang se
   khong biet dang doc dong nao. */
.pnl.multi { min-width: 100%; }
.pnl.multi th { white-space: nowrap; text-align: right; }
.pnl.multi th.dinh, .pnl.multi td.dinh {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  text-align: left;
  min-width: 260px;
}
.pnl.multi thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 2px solid var(--line);
}
.pnl.multi thead th.dinh { z-index: 4; }
.pnl.multi tr.head td.dinh, .pnl.multi tr.head td { background: var(--brand-soft); }
.pnl.multi tr.calc td.dinh, .pnl.multi tr.calc td { background: #f4f6f8; }
.pnl.multi tr.pct td.dinh, .pnl.multi tr.pct td { background: #fff; }
.pnl.multi tr.line td.dinh { padding-left: 22px; }
.pnl.multi .pctcol { color: var(--ink-soft); font-size: 13px; }
.pnl.multi th.caky, .pnl.multi td:nth-last-child(-n+2):not(.dinh) { }
.pnl.multi th.caky { color: var(--brand); }

/* ---- nut chon doan thoi gian ---- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  background: #fff; border: none; border-left: 1px solid var(--line);
  padding: 7px 14px; font: inherit; font-size: 13.5px; color: var(--ink-soft); cursor: pointer;
}
.seg button:first-child { border-left: none; }
.seg button:hover { background: #f4f6f8; color: var(--ink); }
.seg button.on { background: var(--brand); color: #fff; font-weight: 600; }

/* Dong tai khoan co so du vo ly trong bang can doi. */
.pnl.multi.tb tr.xau td, .pnl.multi.tb tr.xau td.dinh { background: var(--bad-bg); }
.pnl.multi.tb tr.xau td.dinh { color: var(--bad); font-weight: 600; }
