/* Design system v3 — MATCHA METSYS (reskin 2026-10-22 đợt 2: user gửi bảng
   màu METSYS, thay toàn bộ hệ token của đợt matcha sáng cùng ngày; bố cục /
   anatomy / logic GIỮ NGUYÊN 100%). Kỷ luật màu: --brand là màu chủ đạo DUY
   NHẤT (nút chính, active, vạch section, viền trên card SP, logo); badge
   giảm giá dùng --sale (nền vàng matcha + chữ --ink) — KHÔNG còn đỏ trên
   card SP; "Esgotado" trung tính (--ink-soft đậm, nút disabled nền --line);
   tồn kho "Restam" giữ TRUNG TÍNH --ink-soft; --danger CHỈ cho lỗi form /
   trạng thái destructive (màu chức năng ngoài palette, không trang trí).
   Token ngữ nghĩa — không rải hex thô trong component (trừ #fff và rgba
   trắng/đen cho overlay). Footer giữ nền ĐẬM (--footer-grad, chữ trắng) vì
   conta.html/faq.html có link footer inline color:#fff, footer sáng sẽ làm
   chìm chữ. Tương phản các cặp chữ/nền chính đã kiểm thủ công ≥4.5:1 (skill
   ui-ux-pro-max: ưu tiên 1 Accessibility + 6 Typography & Color). */
:root {
  --brand: #52681D;
  --brand-dark: #2E3D17;
  --brand-deep: #035718;
  --brand-tint: #D5E4AA;
  --brand-soft: #E4EDB6;
  --tint: #D5E4AA;
  --tint-soft: #E4EDB6;
  --soft: #B9DCA9;
  --ink: #2E3D17;
  --ink-soft: #51610F;
  --bg: #F4F6EB;
  --card: #FFFFFF;
  --line: #DFE5C6;
  --chip-bg: #E4EDB6;
  --badge-auto: #2E3D17;
  --badge-manual: #51610F;
  --accent: #76A51D;
  --accent-2: #889E19;
  --sale: #BDBE2E;
  --pill-discount: #BDBE2E;
  --highlight: #D3E171;
  --success: #469843;
  --teal: #378552;
  --danger: #C0392B;
  --hero-grad: linear-gradient(120deg, #2E3D17 0%, #52681D 55%, #7A872C 100%);
  --footer-grad: linear-gradient(165deg, #2E3D17 0%, #52681D 100%);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(46, 61, 23, .05), 0 8px 24px -12px rgba(46, 61, 23, .12);
  --shadow-lift: 0 2px 6px rgba(46, 61, 23, .08), 0 16px 30px -16px rgba(46, 61, 23, .25);
  --maxw: 1180px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; color: var(--ink); background-color: var(--bg); background-image: radial-gradient(rgba(46,61,23,0.16) 1.4px, transparent 1.8px); background-size: 22px 22px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; border-radius: 6px; }
.btn { border: 1px solid transparent; border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; font-size: 14px; background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--line); background: var(--card); }
.btn-outline:hover { box-shadow: var(--shadow); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-dark { background: rgba(0,0,0,.35); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-block { width: 100%; margin-top: 8px; border-radius: 12px; }
.btn:disabled { background: var(--line); color: var(--ink-soft); font-weight: 700; cursor: not-allowed; }

/* Header + nav */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); max-width: var(--maxw); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; white-space: nowrap; letter-spacing: -.01em; }
.logo-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 800; }
.logo-img { width: 36px; height: 36px; display: block; }
.search-box { flex: 1; display: flex; gap: 8px; max-width: 520px; }
.search-box input { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 9px 16px; font-size: 14px; font-family: inherit; color: var(--ink); min-width: 0; }
.search-box input:focus { outline: none; border-color: var(--brand); background: #fff; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 20px; background: var(--card); border-bottom: 1px solid var(--line); max-width: var(--maxw); margin: 0 auto; }
.nav-link { padding: 7px 11px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.nav-cats { display: contents; }

main { max-width: var(--maxw); margin: 0 auto; padding: 18px 20px 8px; }

/* Hero (+ canvas 3D phong bì wireframe — JS ở cuối app.js, lấy nguyên từ prototype v3) */
.hero { position: relative; overflow: hidden; background: var(--hero-grad); color: #fff; border-radius: 20px; padding: 38px 36px; }
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
#hero-3d { position: absolute; z-index: 1; right: 26px; top: 50%; transform: translateY(-50%); width: 360px; height: 280px; pointer-events: none; }
.hero-pill { background: rgba(255,255,255,.18); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; display: inline-block; }
.hero h1 { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.015em; margin: 16px 0 10px; max-width: 640px; }
.hero p { color: rgba(255,255,255,.88); max-width: 620px; margin: 0 0 20px; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 20px; font-weight: 800; }
.stat span { font-size: 13px; color: rgba(255,255,255,.8); }

/* Sections */
.section-title { font-size: 20px; font-weight: 800; margin: 30px 0 14px; padding-left: 12px; border-left: 4px solid var(--brand); text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.see-all { color: var(--brand-dark); font-weight: 600; font-size: 14px; white-space: nowrap; }
.see-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 13px 18px; }
.post-list li + li { border-top: 1px solid var(--line); }
.post-list a { font-weight: 600; }
.post-list a:hover { color: var(--brand-dark); }
.post-list time { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }

.category-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-tile { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-weight: 700; box-shadow: var(--shadow); transition: box-shadow .15s ease; }
.cat-tile:hover { box-shadow: var(--shadow-lift); }
.cat-mark { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 21px; flex: 0 0 auto; }
.cat-tile h3 { font-size: 16px; font-weight: 700; margin: 0; }
.cat-tile .from { font-size: 13px; color: var(--ink-soft); margin: 2px 0 0; font-weight: 500; }
.cat-tile .from strong { color: var(--ink); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; font-size: 19px; font-weight: 800; }
.cat-count { display: block; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

/* Product cards (legado .card — giữ tương thích; renderer mới dùng .product-card) */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 9px; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.badge-auto { background: var(--brand-tint); color: var(--badge-auto); }
.badge-manual { background: var(--bg); color: var(--badge-manual); border: 1px solid var(--line); }
.pill { background: var(--pill-discount); color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
.card h3 { font-size: 15.5px; line-height: 1.35; margin: 0; min-height: 42px; }
.card h3 a:hover { color: var(--brand-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); color: var(--ink-soft); font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.chip strong { color: var(--ink); font-weight: 600; }
.price-row { display: flex; align-items: baseline; gap: 9px; }
.price { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.compare { color: var(--ink-soft); text-decoration: line-through; font-size: 14px; }
.stock { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.stock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.stock.out { color: var(--ink-soft); font-weight: 700; }
.stock.out .dot { background: var(--ink-soft); }
.card .btn { margin-top: auto; }

/* Product card v3 (anatomy vuavia — renderer productCard trong app.js) */
.product-card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 18px; display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s ease; }
.product-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--brand); }
.product-card:hover { box-shadow: var(--shadow-lift); }
.p-badges { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 24px; }
.badge-disc { background: var(--pill-discount); color: var(--ink); margin-left: auto; }
.product-card h3 { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.product-card h3 a:hover { color: var(--brand-dark); }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.p-divider { border: 0; border-top: 1px solid var(--line); margin: 0 0 13px; }
.p-bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.p-price .now { font-size: 19px; font-weight: 800; letter-spacing: -.01em; display: block; line-height: 1.2; }
.p-under { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 12.5px; }
.p-under .was { color: var(--ink-soft); text-decoration: line-through; }
.p-stock { color: var(--ink-soft); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.p-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.p-stock.out { color: var(--ink-soft); font-weight: 700; }
.p-stock.out::before { background: var(--ink-soft); }
.btn-buy { height: 36px; padding: 0 18px; flex: 0 0 auto; }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
#guias .why-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.why-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.why-num { color: var(--brand); font-weight: 800; font-size: 13px; }
.why-card h3 { margin: 6px 0 5px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.why-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.why-card p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }

/* Footer — nền đậm mực matcha (xem ghi chú đầu file) */
.site-footer { background: var(--footer-grad); color: #fff; margin-top: 40px; padding: 34px 20px 22px; }
.footer-cols { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-col h4 { margin: 0 0 10px; }
.footer-col a { display: block; color: rgba(255,255,255,.85); font-size: 14px; padding: 3px 0; }
.footer-col a:hover { color: #fff; }
.pay-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-badge { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.footer-legal { max-width: var(--maxw); margin: 22px auto 0; font-size: 12.5px; color: rgba(255,255,255,.75); line-height: 1.55; }

/* Modals + support */
.modal-backdrop { position: fixed; inset: 0; background: rgba(46, 61, 23, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--card); border-radius: 16px; padding: 26px; max-width: 460px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lift); }
.modal h3 { margin-top: 0; font-size: 18px; font-weight: 800; line-height: 1.4; }
.modal-actions { display: flex; gap: 9px; margin-top: 18px; }
.modal-actions .btn { flex: 1; border-radius: 12px; padding: 11px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; font-weight: 700; cursor: pointer; }
.auth-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.field { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.field input { display: block; width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font-size: 14px; font-family: inherit; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--brand); }
.form-hint { font-size: 13px; color: var(--ink-soft); background: var(--chip-bg); padding: 9px 12px; border-radius: 8px; }
.form-error { color: var(--danger); font-weight: 600; font-size: 14px; }
.auth-divider { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 12px 0 4px; }
.buy-delivery { margin: 0 0 4px; font-size: 14px; color: var(--ink-soft); }
.buy-delivery strong { color: var(--ink); }
.buy-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14.5px; }
.buy-total { font-size: 16px; }
.buy-specs { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 12px 0; font-size: 13.5px; }
.buy-specs .spec-row { padding: 8px 13px; }
.buy-specs .spec-row:nth-child(odd) { background: var(--bg); }
.buy-specs .spec-row strong { color: var(--ink); }
.buy-summary { background: var(--bg); border-radius: 12px; padding: 11px 14px; margin-top: 10px; }
.buy-summary .buy-row { padding: 3px 0; }
.buy-summary .buy-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 9px; }
.buy-stock { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.qty-stepper { display: inline-flex; align-items: center; gap: 2px; }
.qty-stepper button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; font-weight: 700; }
.qty-stepper button:hover { border-color: var(--brand); color: var(--brand-dark); }
.qty-stepper input { width: 46px; height: 32px; text-align: center; border: 1px solid var(--brand); border-radius: 9px; padding: 6px 0; font: inherit; font-weight: 700; }
.support-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 12px 21px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lift); }
.support-float:hover { background: var(--brand-dark); }
.support-menu { position: fixed; right: 18px; bottom: 70px; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 2px; box-shadow: var(--shadow-lift); min-width: 180px; }
.support-menu[hidden] { display: none; }
.support-menu a { padding: 9px 12px; font-weight: 600; border-radius: 8px; font-size: 14px; }
.support-menu a:hover { background: var(--bg); }

/* ===== Phase 1: páginas, catálogo, detalhe, conta, admin ===== */
.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 10px 20px 30px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.015em; margin: 18px 0 14px; }
.balance-chip { background: var(--brand-tint); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; white-space: nowrap; }
.balance-chip strong { color: var(--brand-dark); }
.spec-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 13.5px; }
.spec-row span { color: var(--ink-soft); }
.payload-box { display: block; background: var(--brand-dark); color: var(--tint); border-radius: 10px; padding: 10px 12px; font-size: 13px; word-break: break-all; margin: 8px 0; }
.buy-success { color: var(--brand-dark); font-weight: 700; }
.claim-tag { font-size: 12.5px; font-weight: 700; background: var(--chip-bg); border-radius: 999px; padding: 4px 9px; }
.pos { color: var(--brand-dark); font-weight: 700; }
.neg { color: var(--danger); font-weight: 700; }

/* Catálogo */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.catalog-sidebar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 130px; box-shadow: var(--shadow); }
.catalog-sidebar h3 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
.tree-item { display: flex; justify-content: space-between; padding: 7px 9px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.tree-item:hover { background: var(--chip-bg); }
.tree-item.active { background: var(--brand); color: #fff; }
.tree-sub { padding-left: 22px; font-weight: 500; }
.tree-count { font-size: 12px; opacity: .75; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 14px; }
.catalog-toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin-left: 6px; font-family: inherit; background: var(--card); color: var(--ink); }
.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.page-btn { border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 14px; background: var(--card); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Detalhe do produto */
.breadcrumb { font-size: 13.5px; color: var(--ink-soft); margin: 14px 0 4px; }
.breadcrumb a { color: var(--brand-dark); font-weight: 600; }
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.detail-meta { color: var(--ink-soft); font-size: 14px; }
.spec-table { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; background: var(--card); }
.spec-table .spec-row { border-bottom: 1px solid var(--line); padding: 9px 0; }
.spec-table .spec-row:last-child { border-bottom: 0; }
.detail-desc { line-height: 1.6; color: var(--ink); }
.detail-desc a { color: var(--brand-dark); font-weight: 600; }
.reviews-frame { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink-soft); background: var(--card); }
.price-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 130px; background: var(--card); }
.price-box .price { font-size: 26px; }
.price-note { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* Conta / Admin (layout 2 colunas) */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.dash-menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 4px; position: sticky; top: 130px; }
.dash-menu a { padding: 9px 11px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.dash-menu a:hover { background: var(--chip-bg); }
.dash-menu a.active { background: var(--brand); color: #fff; }
.acc-panel h2 { margin-top: 4px; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-card span { font-size: 13px; color: var(--ink-soft); }
.stat-card strong { font-size: 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 18px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.data-table th { background: var(--chip-bg); }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.order-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.order-head .btn { margin-left: auto; }
.order-status { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--chip-bg); color: var(--ink-soft); }
.status-delivered { background: var(--brand-tint); color: var(--brand-dark); }
.status-pending { background: var(--chip-bg); color: var(--ink-soft); }
.order-items { margin-top: 10px; display: grid; gap: 8px; }
.order-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
.inline-form label, .stack-form label { display: block; font-size: 13.5px; font-weight: 600; }
.inline-form input, .inline-form select, .stack-form input, .stack-form select, .stack-form textarea {
  display: block; margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 14px; min-width: 170px; font-family: inherit; background: var(--card); color: var(--ink);
}
.inline-form input:focus, .inline-form select:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { outline: none; border-color: var(--brand); }
.stack-form { display: grid; gap: 12px; max-width: 560px; margin: 12px 0 22px; }
.stack-form textarea { width: 100%; font-family: inherit; }

/* Políticas + FAQ */
.policy-body { line-height: 1.65; max-width: 780px; }
.policy-body h2 { font-size: 18px; margin: 22px 0 6px; }
.policy-updated { color: var(--ink-soft); font-size: 13px; margin-top: 26px; }
.policy-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.policy-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; background: var(--card); }
.policy-nav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.faq-list { display: grid; gap: 10px; max-width: 820px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 15.5px; }
.faq-item p { line-height: 1.6; color: var(--ink); margin-bottom: 4px; }

/* Phase 2: blog, glossário, docs API, reviews, nível */
.page-intro { color: var(--ink-soft); max-width: 760px; line-height: 1.6; margin-bottom: 22px; }
.blog-grid, .glossary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.blog-card, .glossary-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.blog-card time { font-size: 13px; color: var(--ink-soft); }
.blog-card h2, .glossary-card h2 { font-size: 18px; margin: 8px 0 6px; }
.blog-card h2 a:hover, .glossary-card h2 a:hover { color: var(--brand-dark); }
.blog-card p, .glossary-card p { line-height: 1.55; color: var(--ink); }
.article-body { max-width: 780px; line-height: 1.65; }
.article-body h2 { font-size: 19px; margin: 24px 0 6px; }
.article-cta { margin-top: 26px; font-weight: 600; }
.guide-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; max-width: 820px; }
.guide-step h2 { font-size: 19px; margin-top: 2px; }
.guide-step p { line-height: 1.65; }
.code-block { background: var(--chip-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; overflow-x: auto; white-space: pre; }
.docs-page h2 { margin-top: 30px; }
.docs-page h3 { margin-top: 22px; }
.docs-page p, .docs-page li { line-height: 1.6; }
.docs-page code { background: var(--chip-bg); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.review-average { font-size: 16px; }
.review-stars { color: var(--brand); letter-spacing: 2px; }
.review-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.review-head time { color: var(--ink-soft); font-size: 13px; }
.review-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; display: grid; gap: 10px; max-width: 560px; }
.review-form select, .review-form textarea { display: block; margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 14px; font-family: inherit; width: 100%; background: var(--card); color: var(--ink); }
.review-form select:focus, .review-form textarea:focus { outline: none; border-color: var(--brand); }
.tier-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-top: 16px; max-width: 640px; }
.buy-discount strong { color: var(--brand-dark); }
.buy-tier-note, .buy-savings { font-size: 13.5px; color: var(--brand-dark); margin: 6px 0; }

@media (max-width: 900px) {
  .catalog-layout, .detail-layout, .dash-layout { grid-template-columns: 1fr; }
  .catalog-sidebar, .dash-menu, .price-box { position: static; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  #hero-3d { display: none; }
  .hero-inner { max-width: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-tiles, .why-grid, #guias .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .site-header { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .stat-cards { grid-template-columns: 1fr; }
  .product-grid, .category-tiles, .why-grid, #guias .why-grid, .footer-cols, .blog-grid, .glossary-grid { grid-template-columns: 1fr; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 26px; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; }
}

/* ===== Phase 3: menu Ferramentas (dropdown) + ferramentas ===== */
.nav-dropdown { position: relative; display: inline-flex; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 6px; min-width: 248px; z-index: 60; flex-direction: column; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 640px; box-shadow: var(--shadow); }
.tool-card label { font-weight: 700; display: block; margin-bottom: 6px; }
.tool-card input[type="text"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; font-family: inherit; }
.tool-note { background: var(--brand-tint); border: 1px solid var(--brand-soft); border-radius: 10px; padding: 12px 14px; max-width: 780px; line-height: 1.55; }
.totp-codes { display: flex; gap: 24px; flex-wrap: wrap; margin: 18px 0 6px; }
.totp-now span, .totp-next span { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.totp-code { font-size: 42px; letter-spacing: 4px; color: var(--brand-dark); }
.totp-code-next { font-size: 26px; letter-spacing: 3px; color: var(--ink-soft); }
.totp-timer { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.totp-progress { height: 6px; background: var(--chip-bg); border-radius: 3px; margin-top: 6px; max-width: 260px; overflow: hidden; }
.totp-progress > div { height: 100%; background: var(--brand); transition: width .25s linear; }

/* ===== Phase 3: carteira USDT + afiliados + admin config ===== */
.dep-method-tabs { display: flex; gap: 8px; margin: 10px 0; }
.dep-method-tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.dep-method-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dep-usdt-box { border: 1px dashed var(--brand); border-radius: 10px; padding: 12px 14px; margin-top: 10px; background: var(--brand-tint); word-break: break-all; }
.ref-link-box { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ref-link-box input { flex: 1; min-width: 260px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; background: var(--card); color: var(--ink); }

/* Landing pages (gói SEO) — render server-side từ api/landings.js */
.landing-section { max-width: 820px; margin-bottom: 26px; }
.landing-section h2 { font-size: 21px; margin: 0 0 10px; }
.landing-section p { line-height: 1.65; margin: 0 0 10px; }
.landing-section ul { line-height: 1.65; margin: 6px 0 0; padding-left: 20px; }
.landing-section a, .page-intro a, .landing-cta a:not(.btn) { color: var(--brand-dark); font-weight: 600; }
.landing-cta { max-width: 820px; border: 1px solid var(--brand); background: var(--brand-tint); border-radius: var(--radius); padding: 20px 22px; margin: 30px 0; }
.landing-cta p { margin: 10px 0 0; color: var(--ink-soft); line-height: 1.6; }
.landing-faq { max-width: 820px; }
.landing-faq .faq-item { margin-bottom: 10px; }
.landing-related { max-width: 820px; margin-top: 34px; }
.landing-related-link { display: inline-block; margin: 0 8px 8px 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 14px; background: var(--card); }
.landing-related-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.landing-terms { color: var(--ink-soft); font-size: 14px; }
.landing-terms a { color: var(--brand-dark); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Prova social (quem comprou) — pilha de cards no canto inferior esquerdo */
.sp-stack { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.sp-card { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: 324px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 11px 12px; opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .35s ease; }
.sp-card.sp-in { opacity: 1; transform: translateY(0); }
.sp-card.sp-hide { opacity: 0; transform: translateY(8px); }
.sp-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.sp-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sp-body b { font-size: 13.5px; color: var(--ink); }
.sp-text { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-time { font-size: 11.5px; color: var(--ink-soft); opacity: .75; }
.sp-x { flex: 0 0 auto; border: 0; background: transparent; color: var(--ink-soft); font-size: 17px; line-height: 1; cursor: pointer; padding: 2px 4px; }

/* Catálogo: filtros em chips, skeleton, empty state e toggle mobile */
.catalog-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.filter-chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); border-radius: 999px; padding: 7px 14px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.filter-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.skel-card { min-height: 232px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); animation: skelPulse 1.1s ease-in-out infinite alternate; }
@keyframes skelPulse { from { opacity: .5; } to { opacity: 1; } }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 44px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.empty-state p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; }
.page-btn.disabled { opacity: .45; pointer-events: none; }
.filters-toggle { display: none; margin-bottom: 14px; }
@media (max-width: 900px) {
  .filters-toggle { display: inline-flex; }
  .catalog-sidebar { display: none; }
  .catalog-sidebar.open { display: block; }
}
