/*
 * Bộ nhận diện MonkeyAgent cho agent.monkeytech.vn (31-10-2026): landing, trang đăng ký, trang chính sách dùng chung.
 * Màu lấy thẳng từ logo agent (monkeytech.vn/brand/agent/): nền than, nhãn vàng, mặt khỉ kem, viền lông cam đất,
 * cùng bảng màu với panel MonkeyAgent (--bg #181a20, --accent #fcd535) để khách đi từ trang mua vào panel không thấy lạ.
 * Không tím, không gradient chữ, không quầng sáng trang trí (memory thiet-ke-khong-ai-slop).
 */
:root {
  --bg: #15161b;
  --surface: #1c1e24;
  --surface-2: #24272f;
  --line: rgba(240, 236, 226, 0.1);
  --line-strong: rgba(240, 236, 226, 0.2);
  --text: #d6d4cd;
  --strong: #f5f2ea;
  --muted: #9c9ea5;
  --yellow: #fcd535;
  --yellow-hover: #ffe066;
  --ink: #16171c;
  --ochre: #e3a23b;
  --cream: #f5e6cc;
  --accent-text: #fcd535;
  --ok: #6fcf8e;
  --ok-soft: rgba(111, 207, 142, 0.12);
  --err: #f08a7a;
  --err-soft: rgba(240, 138, 122, 0.12);
  --field: #121317;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --surface-2: #efe9da;
  --line: rgba(22, 23, 28, 0.1);
  --line-strong: rgba(22, 23, 28, 0.2);
  --text: #3a3c43;
  --strong: #16171c;
  --muted: #5f6168;
  --accent-text: #845f00;
  --ok: #2f7a47;
  --ok-soft: rgba(47, 122, 71, 0.1);
  --err: #b8412f;
  --err-soft: rgba(184, 65, 47, 0.1);
  --field: #ffffff;
  --shadow: 0 10px 30px rgba(60, 50, 20, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* Cảm giác app trên điện thoại: chạm không nháy xanh, không zoom khi chạm đúp nút, thanh trên tránh tai thỏ */
html { -webkit-tap-highlight-color: transparent; }
a, button, label, summary, [role="tab"] { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  caret-color: var(--yellow);
}
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
b, strong { font-weight: 600; color: var(--strong); }
h1, h2, h3 { color: var(--strong); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── Nút ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--strong);
  font: 500 0.95rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { border-color: var(--strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 600; }
.btn-primary:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 0.85rem; }

/* ── Thanh trên ── */
.topbar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); }
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { height: 26px; width: auto; }
.brand .on-light, :root[data-theme="light"] .brand .on-dark { display: none; }
:root[data-theme="light"] .brand .on-light { display: block; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 0.95rem; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--strong); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--strong); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--strong); cursor: pointer; }
.icon-btn:hover { border-color: var(--strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon, .menu-btn .i-close { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .moon { display: block; }
.menu-btn { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mnav { display: none; }
@media (max-width: 860px) {
  .nav, .top-actions .btn { display: none; }
  .top-actions { margin-left: auto; }
  .menu-btn { display: grid; }
  .mnav:not([hidden]) { display: grid; gap: 2px; padding: 8px 16px 16px; border-top: 1px solid var(--line); }
  .mnav a { padding: 14px 10px; font-size: 1.02rem; color: var(--strong); text-decoration: none; border-radius: 10px; }
  .mnav a:hover { background: var(--surface-2); }
  .mnav .btn { margin-top: 8px; }
}

/* ── Chân trang (khối company-footer do scripts/render-company.mjs sinh) ── */
.eco-foot { margin-top: 96px; padding: 48px 20px 32px; border-top: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 0.875rem; }
.eco-in { max-width: 1160px; margin: 0 auto; }
.eco-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
/* Dấu "Đang chờ cấp phép" giống vps.monkeytech.vn; đổi sang dấu thật khi agent.monkeytech.vn có mã hồ sơ riêng. */
.bct-wait { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-strong); }
.bct-wait svg { width: 32px; height: 32px; color: var(--yellow); flex: none; }
.bct-wait b { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--strong); }
.bct-wait span { display: block; font-size: 0.78rem; color: var(--muted); }
.eco-logo img { height: 28px; width: auto; display: block; }
.eco-logo .on-light, :root[data-theme="light"] .eco-logo .on-dark { display: none; }
:root[data-theme="light"] .eco-logo .on-light { display: block; }
.eco-muted { color: var(--muted); }
.eco-tagline { max-width: 30rem; margin: 12px 0 0; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.socials a { display: block; border-radius: 50%; transition: transform 0.15s; }
.socials a:hover { transform: translateY(-2px); }
.socials svg { width: 36px; height: 36px; display: block; }
.eco-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; padding: 40px 0; }
.eco-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eco-link { color: var(--text); text-decoration: none; transition: color 0.15s; }
.eco-link:hover { color: var(--accent-text); }
.eco-prod { display: flex; align-items: center; gap: 8px; }
.eco-prod img { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.eco-cur { color: var(--strong); font-weight: 500; }
.eco-legal { padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.78rem; line-height: 1.65; }
.eco-legal p { margin: 0 0 6px; }
.eco-legal a { color: var(--strong); }
.eco-legal .heart { color: #f43f5e; }
.eco-legal .by { color: var(--accent-text); font-weight: 500; text-decoration: none; }
.eco-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; padding: 0; margin: 0 0 16px; background: none; color: var(--strong); font: inherit; font-weight: 600; text-align: left; pointer-events: none; }
.eco-heading span { display: none; transition: transform 0.2s; }
@media (max-width: 1023px) { .eco-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .eco-foot { padding: 40px 16px calc(32px + env(safe-area-inset-bottom)); }
  .eco-cols { display: block; padding: 0; }
  .eco-cols nav { border-bottom: 1px solid var(--line); }
  .eco-heading { min-height: 52px; margin: 0; cursor: pointer; pointer-events: auto; }
  .eco-heading span { display: block; }
  .eco-heading[aria-expanded="true"] span { transform: rotate(180deg); }
  .eco-body { display: none; padding-bottom: 16px; }
  .eco-heading[aria-expanded="true"] + .eco-body { display: block; }
  .eco-body a { min-height: 44px; display: flex; align-items: center; }
  .eco-legal { border-top: 0; overflow-wrap: anywhere; }
}
@media (max-width: 640px) { .wrap, .topbar-in { padding-left: 16px; padding-right: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
