/* ============================================================================
   TASKEARN UI v3 — "MANGA READER" PAPER THEME
   Bố cục web nhiệm vụ kiếm tiền theo phong cách trình đọc truyện tranh:
   giấy ấm, mực nâu, chữ serif cho tiêu đề, khung trang như trang truyện.
   - Nạp SAU toàn bộ CSS cũ nên mọi khai báo ở đây đều thắng.
   - Ghi đè --theme-1/--theme-2 (màu admin mặc định xanh) → hết "menu xanh".
   Scope: body.te-app → KHÔNG ảnh hưởng Admin Panel. Prefix: .te-*
   ========================================================================== */

/* ---------- 0. TOKENS ---------- */
body.te-app{
  /* giấy & mực */
  --te-bg:#f1e9db; --te-bg-2:#e9dfcd;
  --te-surface:#fffcf4; --te-surface-2:#f7f0e2; --te-surface-3:#efe5d2;
  --te-ink:#2a2620; --te-ink-2:#4a4238; --te-muted:#736857;
  --te-line:#e2d5bd; --te-line-2:#ece2cf;
  /* nhấn: nâu mực (không dùng xanh) */
  --te-primary:#7a5230; --te-primary-2:#9c6b3d; --te-primary-soft:#f4e9d8;
  --te-money:#2f7a5c; --te-money-soft:#e5f1e9;
  --te-coin:#b17a24; --te-coin-soft:#f9efd9;
  --te-danger:#a94a3f; --te-danger-soft:#f8e8e4;
  --te-info:#3f6b6b; --te-info-soft:#e6efee;
  --te-radius:16px; --te-radius-lg:22px; --te-radius-sm:11px;
  --te-shadow:0 1px 2px rgba(80,64,40,.05), 0 10px 26px -18px rgba(80,64,40,.26);
  --te-shadow-lg:0 26px 60px -30px rgba(60,48,30,.4);
  --te-ring:0 0 0 4px rgba(122,82,48,.14);
  --te-sidebar-w:274px; --te-sidebar-w-min:88px; --te-topbar-h:72px;
  --te-font:"Be Vietnam Pro","Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  --te-font-display:"Lora","Be Vietnam Pro",Georgia,"Times New Roman",serif;

  /* ⚠ QUAN TRỌNG: legacy CSS (cute/comic) dùng --theme-1/--theme-2 lấy từ màu
     admin mặc định #5b8def (XANH). Ghi đè tại đây để mọi menu/nút/tab cũ
     chuyển sang tông nâu ấm → hết "menu xanh". */
  --theme-1:var(--te-primary);
  --theme-2:var(--te-primary-2);

  /* ⚠ QUAN TRỌNG #2: bộ token comic (--cm-*) trong comic-theme.css / comic-theme-v3.css
     chứa xanh dương (#3b82f6/#1d4ed8), cyan (#22d3ee) và tím (#a855f7) — đây là
     nguồn "menu xanh" thứ hai (sidebar, .qb-* trang nhiệm vụ, .rd-* đổi thưởng,
     badge, tab, viền...). Ghi đè toàn bộ về tông nâu ấm / teal dịu / terracotta. */
  --cm-ink:#241f19;  --cm-ink-2:#3a332a;
  --cm-line:#2a2620; --cm-line-2:#3a332a;
  --cm-strong-bg:#241f19;
  --cm-text:#2a2620; --cm-text-soft:#4a4238; --cm-text-mute:#8a7f6e;
  --cm-surface-in:#f7f0e2;
  --cm-blue:#9c6b3d;   --cm-blue-d:#7a5230;
  --cm-cyan:#4f8f80;   --cm-cyan-d:#356b60;
  --cm-purple:#b06a4a; --cm-purple-d:#8a4d33;
  --ct-ink-soft:#4a4238; --ct-ink-mute:#8a7f6e;
  --ct-grad-sky:linear-gradient(135deg,#4f8f80 0%,#9c6b3d 100%);
  --ct-grad-lav:linear-gradient(135deg,#b06a4a 0%,#c98a5e 100%);
  --rd-muted:#8a7f6e;
  --ink-soft:#8a7f6e;

  font-family:var(--te-font);
  font-size:15px; line-height:1.72;
  background:var(--te-bg); color:var(--te-ink);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
body.dark.te-app{
  --te-bg:#191612; --te-bg-2:#1f1b16;
  --te-surface:#231f19; --te-surface-2:#2a251e; --te-surface-3:#322c24;
  --te-ink:#ece4d6; --te-ink-2:#cfc5b4; --te-muted:#9b9080;
  --te-line:#39322a; --te-line-2:#322c24;
  --te-primary:#d3a06a; --te-primary-2:#e0b47f; --te-primary-soft:#332a20;
  --te-money:#6cc39a; --te-money-soft:#1e2f27;
  --te-coin:#e0b46a; --te-coin-soft:#332a1c;
  --te-danger:#e09186; --te-danger-soft:#372220;
  --te-info:#8fb8b8; --te-info-soft:#1f2a2a;
  --te-shadow:0 1px 2px rgba(0,0,0,.35), 0 14px 30px -20px rgba(0,0,0,.75);
  --te-shadow-lg:0 26px 60px -30px rgba(0,0,0,.8);
}

/* ---------- 1. BASE ---------- */
body.te-app, body.te-app .wrapper{ background:var(--te-bg) !important; color:var(--te-ink) !important; min-height:100vh; }
body.te-app a{ text-decoration:none !important; color:var(--te-primary); }
body.te-app a:hover, body.te-app a:focus{ color:var(--te-primary-2); }
/* các thẻ a dạng "khối" không phải link chữ → dùng màu chữ chính, tránh xanh Bootstrap */
body.te-app .te-user,
body.te-app .te-stat,
body.te-app .te-quick a,
body.te-app .te-task,
body.te-app .te-widget,
body.te-app .te-bn-cta,
body.te-app .dropdown-item{ color:var(--te-ink); }
body.te-app *{ box-sizing:border-box; }
body.te-app .wrapper{ position:relative; }
body.te-app .cm-offerwall-corner, body.te-app .switch{ display:none !important; }

/* texture giấy chấm nhẹ — dịu mắt, tránh nền phẳng chói */
body.te-app::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:radial-gradient(rgba(120,100,70,.05) 1px, transparent 1px);
  background-size:22px 22px;
}
body.dark.te-app::before{ background-image:radial-gradient(rgba(255,240,210,.028) 1px, transparent 1px); }

/* ---------- 2. SHELL ---------- */
body.te-app .content-page{
  margin-left:var(--te-sidebar-w) !important;
  padding:calc(var(--te-topbar-h) + 28px) 34px 48px !important;
  min-height:100vh; transition:margin-left .22s ease; background:transparent !important;
  position:relative; z-index:1;
}
body.te-app .content-page > .container-fluid{ padding:0 !important; max-width:1320px; margin:0 auto; }
body.te-app.sidebar-main .content-page{ margin-left:var(--te-sidebar-w-min) !important; }
body.te-app .iq-footer{
  margin-left:var(--te-sidebar-w) !important; padding:22px 34px !important;
  background:transparent !important; border:0 !important; color:var(--te-muted) !important;
  transition:margin-left .22s ease; position:relative; z-index:1;
}
body.te-app.sidebar-main .iq-footer{ margin-left:var(--te-sidebar-w-min) !important; }
body.te-app .iq-footer a{ color:var(--te-muted) !important; font-weight:600; }
body.te-app .iq-footer a:hover{ color:var(--te-primary) !important; }

/* ---------- 3. SIDEBAR ---------- */
body.te-app .iq-sidebar.te-sidebar{
  position:fixed !important; inset:0 auto 0 0 !important;
  width:var(--te-sidebar-w) !important; height:100vh !important;
  z-index:1050 !important; display:flex !important; flex-direction:column !important;
  background:var(--te-surface) !important; background-image:none !important;
  border:0 !important; border-right:1px solid var(--te-line) !important;
  box-shadow:none !important; padding:0 !important; overflow:hidden !important;
  transition:width .22s ease, transform .22s ease;
}
body.te-app.sidebar-main .iq-sidebar.te-sidebar{ width:var(--te-sidebar-w-min) !important; }

body.te-app .te-brand{
  height:var(--te-topbar-h); flex:0 0 var(--te-topbar-h);
  display:flex; align-items:center; gap:12px; padding:0 20px;
  border-bottom:1px solid var(--te-line); background:var(--te-surface) !important;
}
body.te-app .te-brand-logo{
  width:40px; height:40px; flex:0 0 40px; border-radius:13px;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#9c6b3d,#7a5230);
  color:#fff; font-size:19px; overflow:hidden;
  box-shadow:0 8px 18px -10px rgba(122,82,48,.65);
}
body.te-app .te-brand-logo img{ width:100%; height:100%; object-fit:cover; }
body.te-app .te-brand-text{ display:flex; flex-direction:column; line-height:1.15; overflow:hidden; white-space:nowrap; }
body.te-app .te-brand-text b{
  font-size:16.5px; font-weight:700; letter-spacing:-.2px; color:var(--te-ink) !important;
  font-family:var(--te-font-display) !important; text-shadow:none !important;
}
body.te-app .te-brand-text small{ font-size:10.5px; font-weight:700; letter-spacing:1.4px; color:var(--te-muted) !important; text-transform:uppercase; }
body.te-app .te-brand-close{
  margin-left:auto; width:32px; height:32px; border-radius:10px; display:none;
  align-items:center; justify-content:center; color:var(--te-muted); cursor:pointer; background:var(--te-surface-2);
}

body.te-app .te-wallet{
  margin:16px 16px 6px; padding:16px 16px 14px; border-radius:var(--te-radius);
  background:linear-gradient(140deg,#4a3826 0%,#6b4d31 55%,#8a6640 100%);
  color:#fff; position:relative; overflow:hidden; flex:0 0 auto;
  box-shadow:0 18px 34px -22px rgba(74,56,38,.85), inset 0 0 0 1px rgba(255,255,255,.08);
}
body.te-app .te-wallet::after{ content:""; position:absolute; width:150px; height:150px; right:-60px; top:-70px; border-radius:50%; background:rgba(255,255,255,.1); }
body.te-app .te-wallet::before{ content:""; position:absolute; width:90px; height:90px; left:-40px; bottom:-50px; border-radius:50%; background:rgba(255,255,255,.08); }
body.te-app .te-wallet-label{ font-size:11px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:rgba(255,255,255,.78); display:flex; align-items:center; gap:6px; }
body.te-app .te-wallet-amount{ font-size:25px; font-weight:700; letter-spacing:-.5px; margin:4px 0 12px; display:flex; align-items:baseline; gap:6px; position:relative; z-index:1; font-family:var(--te-font-display); }
body.te-app .te-wallet-amount span{ font-size:12px; font-weight:700; opacity:.8; font-family:var(--te-font); }
body.te-app .te-wallet-actions{ display:flex; gap:8px; position:relative; z-index:1; }
body.te-app .te-wallet-actions a{
  flex:1; text-align:center; font-size:12px; font-weight:700; padding:8px 6px; border-radius:10px;
  background:rgba(255,255,255,.15); color:#fff !important; border:1px solid rgba(255,255,255,.2);
  transition:.18s; white-space:nowrap;
}
body.te-app .te-wallet-actions a:hover{ background:#fdf8ee; color:#4a3826 !important; }

/* Ngôn ngữ / tiền tệ */
body.te-app .te-langrow{ display:flex; gap:8px; padding:2px 16px 8px; flex:0 0 auto; }
body.te-app .te-langrow > .dropdown{ flex:1; min-width:0; }
body.te-app .te-langbtn{
  display:flex; align-items:center; justify-content:center; gap:7px; width:100%;
  padding:8px 10px; border-radius:10px; font-size:12px; font-weight:700;
  color:var(--te-ink-2) !important; background:var(--te-surface-2) !important;
  border:1px solid var(--te-line) !important; transition:.16s; white-space:nowrap;
  text-decoration:none !important;
}
body.te-app .te-langbtn i{ font-size:12px; color:var(--te-primary) !important; }
body.te-app .te-langbtn b{ font-weight:800; text-transform:uppercase; letter-spacing:.4px; }
body.te-app .te-langbtn:hover{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; border-color:transparent !important; }
body.te-app .te-langrow .dropdown-menu{
  border:1px solid var(--te-line); border-radius:12px; box-shadow:var(--te-shadow-lg);
  padding:6px; min-width:160px; font-size:13px; background:var(--te-surface);
}
body.te-app .te-langrow .dropdown-item{ border-radius:8px; padding:7px 10px; font-weight:600; color:var(--te-ink-2); }
body.te-app .te-langrow .dropdown-item:hover{ background:var(--te-primary-soft); color:var(--te-primary); }
body.te-app.sidebar-main .te-langrow{ padding:2px 12px 8px; }
body.te-app.sidebar-main .te-langbtn b{ display:none; }
body.te-app.sidebar-main .te-langbtn{ padding:9px 6px; }

body.te-app .te-nav-scroll{
  flex:1 1 auto; overflow-y:auto; overflow-x:hidden; padding:8px 12px 18px;
  scrollbar-width:thin; scrollbar-color:var(--te-line) transparent;
}
body.te-app .te-nav-scroll::-webkit-scrollbar{ width:6px; }
body.te-app .te-nav-scroll::-webkit-scrollbar-thumb{ background:var(--te-line); border-radius:99px; }

body.te-app .te-nav-label{
  font-size:10.5px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase;
  color:var(--te-muted) !important; opacity:.9; padding:16px 12px 8px;
  display:flex; align-items:center; gap:7px; background:none !important;
  border:0 !important; box-shadow:none !important; width:auto !important;
  font-family:var(--te-font) !important; text-shadow:none !important; margin:0 !important;
}
body.te-app .te-nav-label i{ font-size:11px; color:var(--te-primary) !important; opacity:.9; }

body.te-app .te-nav-scroll .iq-sidebar-menu,
body.te-app .te-nav-scroll nav,
body.te-app .te-nav-scroll .data-scrollbar{ background:transparent !important; border:0 !important; box-shadow:none !important; padding:0 !important; height:auto !important; }
body.te-app .te-nav-scroll ul.side-menu{ list-style:none; margin:0; padding:0; }
body.te-app .te-nav-scroll ul.side-menu > li{ margin:2px 0; }
body.te-app .te-nav-scroll ul.side-menu > li > a{
  display:flex !important; align-items:center; gap:12px; padding:9px 12px !important;
  border-radius:12px !important; font-size:14px !important; font-weight:600 !important;
  color:var(--te-ink-2) !important; background:transparent !important; border:0 !important;
  box-shadow:none !important; text-shadow:none !important; font-family:var(--te-font) !important;
  line-height:1.3 !important; position:relative; transition:background .16s, color .16s;
}
body.te-app .te-nav-scroll ul.side-menu > li > a > i:first-child{
  width:32px !important; height:32px !important; flex:0 0 32px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  border-radius:9px !important; background:var(--te-surface-2) !important;
  color:var(--te-ink-2) !important; font-size:14px !important; border:0 !important;
  box-shadow:none !important; text-shadow:none !important; transition:.16s; margin:0 !important;
}
body.te-app .te-nav-scroll ul.side-menu > li > a span,
body.te-app .te-nav-scroll ul.side-menu > li > a span.ml-2{
  color:inherit !important; text-shadow:none !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.te-app .te-nav-scroll ul.side-menu > li > a > svg{
  margin-left:auto; width:14px !important; height:14px !important; color:var(--te-muted) !important; opacity:.8; transition:transform .2s;
}
body.te-app .te-nav-scroll ul.side-menu > li > a:hover{ background:var(--te-surface-2) !important; color:var(--te-ink) !important; }
body.te-app .te-nav-scroll ul.side-menu > li > a:hover > i:first-child{ background:var(--te-primary) !important; color:#fff !important; }
body.te-app .te-nav-scroll ul.side-menu > li.active > a,
body.te-app .te-nav-scroll ul.side-menu > li > a.active{
  background:var(--te-ink) !important;
  color:#f7f1e4 !important; box-shadow:0 10px 22px -16px rgba(42,38,32,.75) !important;
}
body.te-app .te-nav-scroll ul.side-menu > li.active > a::after,
body.te-app .te-nav-scroll ul.side-menu > li > a.active::after{
  content:""; position:absolute; right:11px; top:50%; transform:translateY(-50%);
  width:6px; height:6px; border-radius:50%; background:var(--te-coin);
}
body.te-app .te-nav-scroll ul.side-menu > li.active > a > i:first-child,
body.te-app .te-nav-scroll ul.side-menu > li > a.active > i:first-child{ background:rgba(255,255,255,.15) !important; color:#fff !important; }
body.te-app .te-nav-scroll ul.side-menu > li.active > a > svg{ color:#f7f1e4 !important; }

body.te-app .te-nav-scroll ul.submenu{
  list-style:none; margin:2px 0 6px 0 !important; padding:0 0 0 22px !important;
  border-left:0 !important; background:transparent !important;
}
body.te-app .te-nav-scroll ul.submenu > li > a{
  display:flex !important; align-items:center; gap:9px; padding:8px 10px !important; margin:1px 0;
  border-radius:9px !important; font-size:13px !important; font-weight:600 !important;
  color:var(--te-muted) !important; background:transparent !important; border:0 !important;
  box-shadow:none !important; text-shadow:none !important; font-family:var(--te-font) !important;
}
body.te-app .te-nav-scroll ul.submenu > li > a > i{
  width:auto !important; height:auto !important; background:none !important; color:var(--te-muted) !important;
  font-size:12px !important; flex:0 0 16px !important; box-shadow:none !important; border:0 !important;
}
body.te-app .te-nav-scroll ul.submenu > li > a:hover,
body.te-app .te-nav-scroll ul.submenu > li.active > a{ background:var(--te-surface-2) !important; color:var(--te-primary) !important; }
body.te-app .te-nav-scroll ul.submenu > li.active > a > i{ color:var(--te-primary) !important; }

body.te-app .te-side-foot{
  flex:0 0 auto; padding:12px 16px 16px; border-top:1px solid var(--te-line);
  display:flex; align-items:center; gap:10px; background:var(--te-surface) !important;
}
body.te-app .te-side-foot .te-sf-ic{
  width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:var(--te-money-soft); color:var(--te-money); font-size:14px; flex:0 0 34px;
}
body.te-app .te-side-foot .te-sf-txt{ font-size:11.5px; line-height:1.35; color:var(--te-muted); font-weight:600; overflow:hidden; white-space:nowrap; }
body.te-app .te-side-foot .te-sf-txt b{ display:block; color:var(--te-ink) !important; font-size:12px; }

body.te-app.sidebar-main .te-brand{ padding:0 24px; justify-content:center; }
body.te-app.sidebar-main .te-brand-text,
body.te-app.sidebar-main .te-wallet,
body.te-app.sidebar-main .te-nav-label,
body.te-app.sidebar-main .te-nav-scroll ul.side-menu > li > a span,
body.te-app.sidebar-main .te-nav-scroll ul.side-menu > li > a > svg,
body.te-app.sidebar-main .te-nav-scroll ul.submenu,
body.te-app.sidebar-main .te-side-foot .te-sf-txt{ display:none !important; }
body.te-app.sidebar-main .te-nav-scroll{ padding:14px 12px; }
body.te-app.sidebar-main .te-nav-scroll ul.side-menu > li > a{ justify-content:center; padding:8px !important; }
body.te-app.sidebar-main .te-nav-scroll ul.side-menu > li.active > a::after{ display:none; }
body.te-app.sidebar-main .te-side-foot{ justify-content:center; padding:14px 8px; }

body.te-app .tsb-sidebar-overlay{
  position:fixed; inset:0; background:rgba(42,38,32,.5); backdrop-filter:blur(2px);
  z-index:1045; opacity:0; visibility:hidden; transition:.2s;
}
body.te-app.tsb-sidebar-open .tsb-sidebar-overlay{ opacity:1; visibility:visible; }

/* ---------- 4. TOPBAR ---------- */
body.te-app .te-topbar{
  position:fixed !important; top:0; left:var(--te-sidebar-w); right:0;
  height:var(--te-topbar-h); z-index:1040;
  background:rgba(255,252,244,.92) !important; backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--te-line) !important; box-shadow:none !important;
  display:flex; align-items:center; gap:14px; padding:0 34px !important; transition:left .22s ease;
}
body.dark.te-app .te-topbar{ background:rgba(35,31,25,.92) !important; }
body.te-app.sidebar-main .te-topbar{ left:var(--te-sidebar-w-min); }

body.te-app .te-burger{
  width:40px; height:40px; border-radius:12px; border:1px solid var(--te-line);
  background:var(--te-surface); color:var(--te-ink-2); display:flex; align-items:center;
  justify-content:center; cursor:pointer; flex:0 0 40px; transition:.16s;
}
body.te-app .te-burger:hover{ background:var(--te-primary-soft); color:var(--te-primary); border-color:transparent; }
body.te-app .te-burger svg{ width:20px; height:20px; }

body.te-app .te-search{ flex:1 1 auto; max-width:420px; position:relative; }
body.te-app .te-search i{ position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:13px; color:var(--te-muted); }
body.te-app .te-search input{
  width:100%; height:42px; border-radius:12px; border:1px solid var(--te-line);
  background:var(--te-surface-2); padding:0 14px 0 38px; font-size:13.5px;
  color:var(--te-ink); outline:none; transition:.16s; font-family:var(--te-font);
}
body.te-app .te-search input::placeholder{ color:var(--te-muted); }
body.te-app .te-search input:focus{ background:var(--te-surface); border-color:var(--te-primary); box-shadow:var(--te-ring); }

body.te-app .te-top-links{ display:flex; align-items:center; gap:4px; margin-left:auto; }
body.te-app .te-top-links > a{ padding:9px 13px; border-radius:11px; font-size:13.5px; font-weight:600; color:var(--te-ink-2) !important; transition:.16s; white-space:nowrap; }
body.te-app .te-top-links > a:hover{ background:var(--te-surface-2); color:var(--te-ink) !important; }
body.te-app .te-top-links > a.is-active{ background:var(--te-primary-soft); color:var(--te-primary) !important; box-shadow:inset 0 -2px 0 var(--te-primary); }

body.te-app .te-balance{
  display:flex; align-items:center; gap:8px; height:42px; padding:0 14px; border-radius:12px;
  background:var(--te-coin-soft); border:1px solid rgba(177,122,36,.28);
  color:#8a5a15; font-weight:800; font-size:14px; white-space:nowrap;
}
body.dark.te-app .te-balance{ color:#e0b46a; }
body.te-app .te-balance i{ color:var(--te-coin); font-size:14px; }
body.te-app .te-balance b{ font-weight:800; }
body.te-app .te-balance .te-bal-plus{
  width:20px; height:20px; border-radius:7px; background:var(--te-coin); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:10px; margin-left:2px;
}

body.te-app .te-icon-btn{
  width:42px; height:42px; border-radius:12px; position:relative; display:flex;
  align-items:center; justify-content:center; background:var(--te-surface-2);
  border:1px solid var(--te-line); color:var(--te-ink-2); font-size:15px; cursor:pointer; transition:.16s;
}
body.te-app .te-icon-btn:hover{ background:var(--te-primary-soft); color:var(--te-primary); border-color:transparent; }
body.te-app .te-icon-btn .badge{
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; border-radius:9px;
  background:var(--te-danger); color:#fff; font-size:10px; font-weight:800;
  display:flex; align-items:center; justify-content:center; padding:0 4px; border:2px solid var(--te-surface);
}

body.te-app .te-user{
  display:flex; align-items:center; gap:10px; padding:5px 6px 5px 5px; border-radius:14px;
  border:1px solid var(--te-line); background:var(--te-surface); cursor:pointer; transition:.16s;
}
body.te-app .te-user:hover{ border-color:var(--te-primary); box-shadow:var(--te-ring); }
body.te-app .te-user img{ width:32px; height:32px; border-radius:10px; object-fit:cover; }
body.te-app .te-user .te-user-name{ font-size:13px; font-weight:700; color:var(--te-ink); max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.te-app .te-user .te-user-caret{ font-size:10px; color:var(--te-muted); margin-right:4px; }

body.te-app .te-topbar .dropdown-menu{
  border:1px solid var(--te-line) !important; border-radius:16px !important;
  box-shadow:var(--te-shadow-lg) !important; padding:8px !important;
  background:var(--te-surface) !important; margin-top:10px !important; min-width:230px;
}
body.te-app .te-topbar .dropdown-item,
body.te-app .te-topbar .dropdown-menu a{
  border-radius:10px !important; padding:9px 12px !important; font-size:13.5px !important;
  font-weight:600 !important; color:var(--te-ink-2) !important; display:block;
}
body.te-app .te-topbar .dropdown-item:hover,
body.te-app .te-topbar .dropdown-menu a:hover{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; }
body.te-app .te-topbar .dropdown-menu h6{ font-size:13px; font-weight:800; color:var(--te-ink) !important; }

/* ---------- 5. GENERIC UI ---------- */
body.te-app .card, body.te-app .iq-card{
  background:var(--te-surface) !important; border:1px solid var(--te-line) !important;
  border-radius:var(--te-radius) !important; box-shadow:var(--te-shadow) !important;
  color:var(--te-ink) !important; overflow:hidden;
}
body.te-app .card-header, body.te-app .iq-card-header{
  background:transparent !important; border-bottom:1px solid var(--te-line) !important; padding:16px 20px !important;
}
body.te-app .card-header h4, body.te-app .card-header h5,
body.te-app .iq-card-header h4, body.te-app .iq-card-header h5{
  font-size:16px !important; font-weight:700 !important; color:var(--te-ink) !important;
  letter-spacing:-.2px; margin:0; font-family:var(--te-font-display) !important; text-shadow:none !important;
}
body.te-app .card-body{ padding:20px !important; }
body.te-app .text-muted, body.te-app small.text-muted{ color:var(--te-muted) !important; }
body.te-app h1,body.te-app h2,body.te-app h3,body.te-app h4,body.te-app h5,body.te-app h6{
  font-family:var(--te-font-display) !important; color:var(--te-ink); letter-spacing:-.2px;
}

body.te-app .btn{
  border-radius:11px !important; font-weight:700 !important; font-size:13.5px !important;
  padding:9px 18px !important; border:1px solid transparent !important;
  transition:.16s; box-shadow:none !important; font-family:var(--te-font) !important;
}
body.te-app .btn-primary{
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)) !important;
  color:#fff !important; border:0 !important; box-shadow:0 10px 22px -16px rgba(122,82,48,.85) !important;
}
body.te-app .btn-primary:hover{ filter:brightness(1.07); transform:translateY(-1px); }
body.te-app .btn-success{ background:var(--te-money) !important; color:#fff !important; border:0 !important; }
body.te-app .btn-danger{ background:var(--te-danger) !important; color:#fff !important; border:0 !important; }
body.te-app .btn-warning{ background:var(--te-coin) !important; color:#fff !important; border:0 !important; }
body.te-app .btn-info{ background:var(--te-info) !important; color:#fff !important; border:0 !important; }
body.te-app .btn-light, body.te-app .btn-secondary{ background:var(--te-surface-2) !important; color:var(--te-ink-2) !important; border:1px solid var(--te-line) !important; }
body.te-app .btn-outline-primary{ border:1px solid var(--te-primary) !important; color:var(--te-primary) !important; background:transparent !important; }
body.te-app .btn-link{ color:var(--te-primary) !important; }

/* Nút riêng của design system */
body.te-app .te-btn{
  display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border-radius:11px;
  font-size:13.5px; font-weight:800; border:1px solid transparent; transition:.16s; white-space:nowrap;
  text-decoration:none !important; cursor:pointer;
}
body.te-app .te-btn-primary{
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); color:#fff !important;
  box-shadow:0 12px 24px -18px rgba(122,82,48,.9);
}
body.te-app .te-btn-primary:hover{ filter:brightness(1.07); transform:translateY(-1px); }
body.te-app .te-btn-soft{
  background:var(--te-surface); color:var(--te-ink-2) !important; border-color:var(--te-line);
}
body.te-app .te-btn-soft:hover{ background:var(--te-primary-soft); color:var(--te-primary) !important; border-color:transparent; }
body.te-app .te-page-head-actions{ display:flex; gap:10px; flex-wrap:wrap; }

body.te-app .table{ color:var(--te-ink) !important; margin-bottom:0; }
body.te-app .table thead th{
  border:0 !important; background:var(--te-surface-2) !important; color:var(--te-muted) !important;
  font-size:11.5px !important; text-transform:uppercase; letter-spacing:.8px;
  font-weight:800 !important; padding:12px 14px !important; white-space:nowrap;
}
body.te-app .table thead.thead-dark th{ background:var(--te-ink) !important; color:#f7f1e4 !important; }
body.te-app .table td{ border-color:var(--te-line-2) !important; padding:13px 14px !important; font-size:13.5px; vertical-align:middle; color:var(--te-ink-2); background:transparent !important; }
body.te-app .table-striped tbody tr:nth-of-type(odd){ background:var(--te-surface-2) !important; }
body.te-app .table-hover tbody tr:hover{ background:var(--te-surface-3) !important; }

body.te-app .badge{ border-radius:7px !important; font-weight:700 !important; font-size:11px !important; padding:5px 9px !important; }
body.te-app .badge-primary{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; }
body.te-app .badge-success{ background:var(--te-money-soft) !important; color:var(--te-money) !important; }
body.te-app .badge-danger{ background:var(--te-danger-soft) !important; color:var(--te-danger) !important; }
body.te-app .badge-warning{ background:var(--te-coin-soft) !important; color:#8a5a15 !important; }
body.te-app .badge-info{ background:var(--te-info-soft) !important; color:var(--te-info) !important; }
body.te-app .alert{ border-radius:14px !important; border:1px solid var(--te-line) !important; background:var(--te-surface) !important; color:var(--te-ink-2) !important; box-shadow:var(--te-shadow); font-size:13.5px; }
body.te-app .alert-primary{ background:var(--te-primary-soft) !important; border-color:var(--te-line) !important; color:var(--te-ink-2) !important; }

body.te-app .pagination .page-link{ border:1px solid var(--te-line) !important; color:var(--te-ink-2) !important; border-radius:10px !important; margin:0 3px; font-weight:700; font-size:13px; background:var(--te-surface) !important; }
body.te-app .pagination .page-item.active .page-link{ background:var(--te-ink) !important; border-color:var(--te-ink) !important; color:#f7f1e4 !important; }
body.te-app .nav-tabs{ border-bottom:1px solid var(--te-line) !important; }
body.te-app .nav-tabs .nav-link{ border:0 !important; color:var(--te-muted) !important; font-weight:700; font-size:13.5px; border-radius:10px 10px 0 0 !important; padding:10px 16px; }
body.te-app .nav-tabs .nav-link.active{ color:var(--te-primary) !important; background:var(--te-primary-soft) !important; border-bottom:2px solid var(--te-primary) !important; }
body.te-app .nav-pills .nav-link.active{ background:var(--te-primary) !important; color:#fff !important; }
body.te-app .list-group-item{ background:var(--te-surface) !important; border-color:var(--te-line) !important; color:var(--te-ink-2) !important; }
body.te-app .list-group-item.active{ background:var(--te-primary) !important; border-color:var(--te-primary) !important; color:#fff !important; }
body.te-app .dropdown-item.active, body.te-app .dropdown-item:active{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; }
body.te-app .progress{ background:var(--te-surface-3) !important; border-radius:99px; }
body.te-app .progress-bar{ background:var(--te-primary) !important; }
body.te-app .modal-content{ background:var(--te-surface) !important; border:1px solid var(--te-line) !important; border-radius:18px !important; color:var(--te-ink) !important; }
body.te-app .modal-header{ background:var(--te-surface-2) !important; border-bottom:1px solid var(--te-line) !important; border-radius:18px 18px 0 0 !important; }
body.te-app .modal-footer{ border-top:1px solid var(--te-line) !important; }
body.te-app .bg-primary{ background:var(--te-primary) !important; color:#fff !important; }
body.te-app .text-primary{ color:var(--te-primary) !important; }
body.te-app .border-primary{ border-color:var(--te-primary) !important; }

/* ---------- 6. PAGE HEAD (dải phân chương) ---------- */
body.te-app .te-page-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-bottom:26px; padding-bottom:18px; border-bottom:1px solid var(--te-line); position:relative;
}
body.te-app .te-page-head::after{
  content:""; position:absolute; left:0; bottom:-1px; width:72px; height:2px;
  background:linear-gradient(90deg,var(--te-primary),var(--te-primary-2)); border-radius:2px;
}
body.te-app .te-page-head h1, body.te-app .te-page-head h2, body.te-app .te-page-head h3{
  font-size:27px !important; font-weight:700 !important; letter-spacing:-.4px;
  margin:0 0 4px !important; color:var(--te-ink) !important; line-height:1.25;
  font-family:var(--te-font-display) !important;
}
body.te-app .te-page-head p{ margin:0; font-size:13.5px; color:var(--te-muted); }
body.te-app .te-crumb{ display:flex; align-items:center; gap:7px; font-size:12px; color:var(--te-muted); font-weight:600; margin-bottom:6px; }
body.te-app .te-crumb a{ color:var(--te-muted) !important; }
body.te-app .te-crumb a:hover{ color:var(--te-primary) !important; }
body.te-app .te-crumb i{ font-size:9px; opacity:.6; }

/* ---------- 7. FORMS ---------- */
body.te-app .form-group{ margin-bottom:18px; }
body.te-app .form-control, body.te-app select.form-control, body.te-app textarea.form-control{
  border-radius:12px !important; border:1px solid var(--te-line) !important;
  background:var(--te-surface) !important; color:var(--te-ink) !important;
  font-size:14px !important; padding:11px 14px !important; height:auto !important;
  box-shadow:none !important; font-family:var(--te-font) !important;
  transition:border-color .16s, box-shadow .16s, background .16s; line-height:1.5;
}
body.te-app .form-control::placeholder{ color:var(--te-muted); opacity:.85; }
body.te-app .form-control:focus{
  border-color:var(--te-primary) !important; background:var(--te-surface) !important;
  box-shadow:var(--te-ring) !important; outline:none;
}
body.te-app textarea.form-control{ min-height:110px; resize:vertical; }
body.te-app select.form-control{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background-image:url("../../assets/icons/chevron-down.svg") !important;
  background-repeat:no-repeat !important; background-position:right 12px center !important;
  background-size:16px 16px !important; padding-right:38px !important;
}
body.te-app label{ font-size:13px; font-weight:700; color:var(--te-ink-2); margin-bottom:6px; }
body.te-app .input-group-text{
  background:var(--te-surface-2) !important; border:1px solid var(--te-line) !important;
  border-radius:12px !important; color:var(--te-muted) !important; font-size:13.5px; font-weight:700;
}
body.te-app .input-group > .form-control:not(:first-child){ border-top-left-radius:0 !important; border-bottom-left-radius:0 !important; }
body.te-app .input-group > .form-control:not(:last-child){ border-top-right-radius:0 !important; border-bottom-right-radius:0 !important; }
body.te-app .input-group > .input-group-prepend > .input-group-text{ border-top-right-radius:0 !important; border-bottom-right-radius:0 !important; }
body.te-app .input-group > .input-group-append > .input-group-text{ border-top-left-radius:0 !important; border-bottom-left-radius:0 !important; }
body.te-app .form-text, body.te-app small.form-text{ font-size:12px; color:var(--te-muted); }

body.te-app .custom-control-label{ font-size:13.5px; font-weight:600; color:var(--te-ink-2); }
body.te-app .custom-control-input:checked ~ .custom-control-label::before{
  background-color:var(--te-primary) !important; border-color:var(--te-primary) !important;
}
body.te-app .custom-checkbox .custom-control-label::before,
body.te-app .custom-radio .custom-control-label::before{ border-color:var(--te-line); background:var(--te-surface); }
body.te-app .custom-switch .custom-control-label::before{ background:var(--te-line); }
body.te-app .custom-switch .custom-control-input:checked ~ .custom-control-label::before{ background:var(--te-primary); }

body.te-app .custom-file-label{
  border-radius:12px !important; border:1px solid var(--te-line) !important;
  background:var(--te-surface) !important; color:var(--te-muted) !important;
  height:auto !important; padding:11px 14px !important; font-size:13.5px; line-height:1.5;
}
body.te-app .custom-file-label::after{
  background:var(--te-surface-2) !important; border-left:1px solid var(--te-line) !important;
  color:var(--te-ink-2) !important; border-radius:0 12px 12px 0 !important; height:100%;
  display:flex; align-items:center; padding:0 14px;
}

/* khối form mới */
body.te-app .te-form-card{
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:var(--te-radius-lg);
  box-shadow:var(--te-shadow); overflow:hidden;
}
body.te-app .te-form-head{
  padding:20px 24px; border-bottom:1px solid var(--te-line);
  background:linear-gradient(180deg,var(--te-surface-2),var(--te-surface));
}
body.te-app .te-form-head h3{
  font-size:19px !important; font-weight:700 !important; margin:0 0 4px !important;
  color:var(--te-ink) !important; font-family:var(--te-font-display) !important; letter-spacing:-.3px;
}
body.te-app .te-form-head p{ margin:0; font-size:13px; color:var(--te-muted); }
body.te-app .te-form-body{ padding:24px; }
body.te-app .te-form-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
body.te-app .te-form-grid.cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
body.te-app .te-field{ display:flex; flex-direction:column; margin-bottom:18px; min-width:0; }
body.te-app .te-field.span-2{ grid-column:span 2; }
body.te-app .te-field.span-3{ grid-column:span 3; }
body.te-app .te-label{ font-size:13px; font-weight:700; color:var(--te-ink-2); margin-bottom:7px; display:flex; align-items:center; gap:6px; }
body.te-app .te-label .req{ color:var(--te-danger); font-weight:800; }
body.te-app .te-label .opt{ font-size:11px; font-weight:600; color:var(--te-muted); margin-left:auto; }
body.te-app .te-help{ font-size:12px; color:var(--te-muted); margin-top:6px; line-height:1.5; }
body.te-app .te-input-wrap{ position:relative; display:flex; align-items:center; }
body.te-app .te-input-wrap > i{
  position:absolute; left:14px; font-size:14px; color:var(--te-muted); pointer-events:none;
}
body.te-app .te-input-wrap > i + .form-control{ padding-left:40px !important; }
body.te-app .te-input-wrap .te-suffix{
  position:absolute; right:12px; font-size:12.5px; font-weight:700; color:var(--te-muted); pointer-events:none;
}
body.te-app .te-input-wrap .te-suffix + .form-control{ padding-right:52px !important; }
body.te-app .te-form-actions{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding-top:20px; margin-top:6px; border-top:1px dashed var(--te-line);
}
body.te-app .te-form-actions .spacer{ margin-left:auto; }
body.te-app .te-form-note{
  display:flex; gap:10px; align-items:flex-start; padding:13px 16px; border-radius:12px;
  background:var(--te-surface-2); border:1px solid var(--te-line);
  font-size:12.5px; color:var(--te-ink-2); line-height:1.6; margin-bottom:20px;
}
body.te-app .te-form-note i{ color:var(--te-primary); font-size:14px; margin-top:2px; }

body.te-app .te-choice-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
body.te-app .te-choice{
  display:flex; align-items:center; gap:10px; padding:13px 15px; border-radius:12px;
  border:1px solid var(--te-line); background:var(--te-surface); cursor:pointer;
  font-size:13.5px; font-weight:700; color:var(--te-ink-2); transition:.16s;
}
body.te-app .te-choice:hover{ border-color:var(--te-primary); background:var(--te-primary-soft); }
body.te-app .te-choice.is-active{ border-color:var(--te-primary); background:var(--te-primary-soft); color:var(--te-primary); box-shadow:var(--te-ring); }
body.te-app .te-choice i{ font-size:16px; }

/* ---------- 8. HOME ---------- */
body.te-app .te-home{ display:flex; flex-direction:column; gap:24px; }

body.te-app .te-hero{
  position:relative; overflow:hidden; border-radius:var(--te-radius-lg); padding:30px 32px;
  background:linear-gradient(125deg,#3d2e20 0%,#63482e 48%,#8a6640 100%);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10), inset 6px 0 0 rgba(255,255,255,.07),
             0 30px 60px -38px rgba(61,46,32,.85);
  display:flex; align-items:center; gap:26px; flex-wrap:wrap;
}
body.te-app .te-hero::before{ content:""; position:absolute; width:340px; height:340px; right:-120px; top:-160px; border-radius:50%; background:radial-gradient(circle,rgba(255,240,210,.2),transparent 70%); }
body.te-app .te-hero::after{ content:""; position:absolute; width:220px; height:220px; left:38%; bottom:-150px; border-radius:50%; background:radial-gradient(circle,rgba(255,240,210,.13),transparent 70%); }
body.te-app .te-hero-main{ flex:1 1 340px; position:relative; z-index:1; min-width:0; }
body.te-app .te-hero-tag{
  display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:800;
  letter-spacing:1.3px; text-transform:uppercase; background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.22); padding:6px 12px; border-radius:99px; margin-bottom:14px;
}
body.te-app .te-hero-tag .dot{ width:6px; height:6px; border-radius:50%; background:#a8d8b4; box-shadow:0 0 0 3px rgba(168,216,180,.22); }
body.te-app .te-hero h2{
  font-size:clamp(23px,2.4vw,31px) !important; font-weight:700 !important; line-height:1.3 !important;
  letter-spacing:-.4px !important; margin:0 0 10px !important; color:#fff !important;
  font-family:var(--te-font-display) !important;
}
body.te-app .te-hero h2 em{ font-style:normal; color:#f3d9a6; }
body.te-app .te-hero p{ font-size:14px; line-height:1.68; color:rgba(255,255,255,.82); margin:0 0 18px; max-width:560px; }
body.te-app .te-hero-btns{ display:flex; gap:10px; flex-wrap:wrap; }
body.te-app .te-hero-btns a{ display:inline-flex; align-items:center; gap:9px; padding:12px 20px; border-radius:12px; font-size:13.5px; font-weight:800; transition:.18s; white-space:nowrap; }
body.te-app .te-hero-btns .te-btn-white{ background:#fdf8ee; color:#3d2e20 !important; box-shadow:0 14px 26px -18px rgba(0,0,0,.6); }
body.te-app .te-hero-btns .te-btn-white:hover{ transform:translateY(-2px); }
body.te-app .te-hero-btns .te-btn-ghost{ background:rgba(255,255,255,.11); color:#fff !important; border:1px solid rgba(255,255,255,.26); }
body.te-app .te-hero-btns .te-btn-ghost:hover{ background:rgba(255,255,255,.2); }

body.te-app .te-hero-wallet{
  position:relative; z-index:1; flex:0 0 260px; background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.2); border-radius:20px; padding:18px 20px; backdrop-filter:blur(8px);
}
body.te-app .te-hero-wallet .lbl{ font-size:11px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:rgba(255,255,255,.72); }
body.te-app .te-hero-wallet .val{ font-size:30px; font-weight:700; letter-spacing:-.5px; margin:2px 0; display:flex; align-items:baseline; gap:6px; font-family:var(--te-font-display); }
body.te-app .te-hero-wallet .val span{ font-size:12px; font-weight:700; opacity:.8; font-family:var(--te-font); }
body.te-app .te-hero-wallet .sub{ font-size:11.5px; color:rgba(255,255,255,.75); font-weight:600; }
body.te-app .te-hero-wallet .bar{ height:6px; border-radius:99px; background:rgba(255,255,255,.18); margin:12px 0 8px; overflow:hidden; }
body.te-app .te-hero-wallet .bar i{ display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#f3d9a6,#a8d8b4); }

body.te-app .te-quick{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
body.te-app .te-quick a{
  position:relative; overflow:hidden; display:flex; align-items:center; gap:13px;
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:var(--te-radius);
  padding:16px; box-shadow:var(--te-shadow); transition:.18s;
}
body.te-app .te-quick a::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg,var(--te-primary),var(--te-primary-2)); opacity:.28; transition:.18s;
}
body.te-app .te-quick a:hover{ transform:translateY(-3px); box-shadow:var(--te-shadow-lg); border-color:var(--te-line-2); }
body.te-app .te-quick a:hover::before{ opacity:1; }
body.te-app .te-quick .ic{ width:44px; height:44px; flex:0 0 44px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:17px; }
body.te-app .te-quick .tx{ min-width:0; }
body.te-app .te-quick .tx b{ display:block; font-size:13.5px; font-weight:800; color:var(--te-ink); letter-spacing:-.2px; }
body.te-app .te-quick .tx small{ display:block; font-size:11.5px; color:var(--te-muted); font-weight:600; margin-top:1px; }
body.te-app .te-quick .ar{ margin-left:auto; color:var(--te-muted); font-size:11px; }
body.te-app .ic-violet{ background:var(--te-primary-soft); color:var(--te-primary); }
body.te-app .ic-green{ background:var(--te-money-soft); color:var(--te-money); }
body.te-app .ic-amber{ background:var(--te-coin-soft); color:#8a5a15; }
body.te-app .ic-blue{ background:var(--te-info-soft); color:var(--te-info); }
body.dark.te-app .ic-blue{ background:var(--te-info-soft); color:var(--te-info); }

body.te-app .te-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
body.te-app .te-stat{
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:var(--te-radius);
  padding:18px; box-shadow:var(--te-shadow); position:relative; overflow:hidden; transition:.18s;
}
body.te-app .te-stat:hover{ transform:translateY(-2px); box-shadow:var(--te-shadow-lg); }
body.te-app .te-stat .ic{ width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:16px; margin-bottom:12px; }
body.te-app .te-stat .num{ font-size:25px; font-weight:700; letter-spacing:-.5px; color:var(--te-ink); line-height:1.15; font-family:var(--te-font-display); }
body.te-app .te-stat .lbl{ font-size:12px; font-weight:700; color:var(--te-muted); margin-top:3px; }
body.te-app .te-stat .trend{ position:absolute; top:16px; right:16px; font-size:11px; font-weight:800; padding:4px 8px; border-radius:8px; background:var(--te-money-soft); color:var(--te-money); }

body.te-app .te-sec-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom:16px; padding-bottom:12px; border-bottom:1px dashed var(--te-line);
}
body.te-app .te-sec-head h3{
  font-size:18px !important; font-weight:700 !important; letter-spacing:-.3px; margin:0 !important;
  display:flex; align-items:center; gap:10px; color:var(--te-ink) !important; font-family:var(--te-font-display) !important;
}
body.te-app .te-sec-head h3 .ic{ width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:13px; background:var(--te-primary-soft); color:var(--te-primary); }
body.te-app .te-sec-head a{ font-size:12.5px; font-weight:800; color:var(--te-primary) !important; display:flex; align-items:center; gap:6px; }
body.te-app .te-sec-head a:hover{ gap:9px; }

body.te-app .te-tasks{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
body.te-app .te-task{
  position:relative; overflow:hidden; display:flex; gap:14px; align-items:flex-start;
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:var(--te-radius);
  padding:16px 16px 16px 18px; box-shadow:var(--te-shadow); transition:.18s;
}
body.te-app .te-task::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg,var(--te-primary),var(--te-primary-2)); opacity:.3; transition:.18s;
}
body.te-app .te-task:hover{ transform:translateY(-2px); border-color:var(--te-line-2); box-shadow:var(--te-shadow-lg); }
body.te-app .te-task:hover::before{ opacity:1; }
body.te-app .te-task-ic{ width:46px; height:46px; flex:0 0 46px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:18px; background:var(--te-primary-soft); color:var(--te-primary); }
body.te-app .te-task-body{ flex:1 1 auto; min-width:0; }
body.te-app .te-task-top{ display:flex; align-items:center; gap:8px; margin-bottom:5px; flex-wrap:wrap; }
body.te-app .te-task-prov{ font-size:10px; font-weight:800; letter-spacing:.7px; text-transform:uppercase; padding:3px 8px; border-radius:6px; background:var(--te-surface-2); color:var(--te-muted); border:1px solid var(--te-line); }
body.te-app .te-task-hot{ font-size:10px; font-weight:800; padding:3px 8px; border-radius:6px; background:var(--te-danger-soft); color:var(--te-danger); }
body.te-app .te-task h4{ font-size:14.5px !important; font-weight:700 !important; line-height:1.4; margin:0 0 8px !important; color:var(--te-ink) !important; letter-spacing:-.1px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-family:var(--te-font) !important; }
body.te-app .te-task-meta{ display:flex; align-items:center; gap:12px; font-size:11.5px; color:var(--te-muted); font-weight:600; flex-wrap:wrap; }
body.te-app .te-task-meta i{ font-size:11px; margin-right:4px; opacity:.85; }
body.te-app .te-task-side{ flex:0 0 auto; text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:9px; }
body.te-app .te-task-reward{ font-size:14.5px; font-weight:800; color:var(--te-money); background:var(--te-money-soft); padding:6px 11px; border-radius:9px; white-space:nowrap; }
body.te-app .te-task-go{ font-size:12px; font-weight:800; color:#fff !important; white-space:nowrap; background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); padding:8px 14px; border-radius:9px; display:inline-flex; align-items:center; gap:6px; box-shadow:0 10px 18px -14px rgba(122,82,48,.85); }
body.te-app .te-task-go:hover{ filter:brightness(1.07); }

body.te-app .te-cols{ display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:22px; align-items:start; }
body.te-app .te-main-col{ display:flex; flex-direction:column; gap:24px; min-width:0; }
body.te-app .te-side-col{ display:flex; flex-direction:column; gap:18px; min-width:0; }

body.te-app .te-widget{
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:var(--te-radius);
  box-shadow:var(--te-shadow); overflow:hidden;
}
body.te-app .te-widget-head{ padding:15px 18px; border-bottom:1px solid var(--te-line); display:flex; align-items:center; justify-content:space-between; gap:8px; background:linear-gradient(180deg,var(--te-surface-2),var(--te-surface)); }
body.te-app .te-widget-head h4{ font-size:14px !important; font-weight:800 !important; margin:0 !important; color:var(--te-ink) !important; display:flex; align-items:center; gap:8px; letter-spacing:-.1px; font-family:var(--te-font) !important; }
body.te-app .te-widget-head h4 i{ color:var(--te-primary); font-size:13px; }
body.te-app .te-widget-head a{ font-size:11.5px; font-weight:800; color:var(--te-primary) !important; }
body.te-app .te-widget-body{ padding:16px 18px; }

body.te-app .te-streak{ display:flex; justify-content:space-between; gap:6px; }
body.te-app .te-streak .day{ flex:1; text-align:center; padding:9px 2px; border-radius:11px; background:var(--te-surface-2); border:1px solid var(--te-line); font-size:10px; font-weight:800; color:var(--te-muted); }
body.te-app .te-streak .day b{ display:block; font-size:11px; color:var(--te-ink-2); margin-bottom:3px; }
body.te-app .te-streak .day.done{ background:var(--te-money-soft); border-color:rgba(47,122,92,.28); color:var(--te-money); }
body.te-app .te-streak .day.done b{ color:var(--te-money); }
body.te-app .te-streak .day.today{ background:var(--te-ink); border-color:transparent; color:#f7f1e4; box-shadow:0 10px 18px -14px rgba(42,38,32,.75); }
body.te-app .te-streak .day.today b{ color:#f7f1e4; }

body.te-app .te-rank{ display:flex; flex-direction:column; gap:4px; }
body.te-app .te-rank-row{ display:flex; align-items:center; gap:11px; padding:9px 0; border-bottom:1px dashed var(--te-line-2); }
body.te-app .te-rank-row:last-child{ border-bottom:0; }
body.te-app .te-rank-no{ width:24px; height:24px; flex:0 0 24px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; background:var(--te-surface-2); color:var(--te-muted); }
body.te-app .te-rank-row:nth-child(1) .te-rank-no{ background:#f6e9c8; color:#8a5a15; }
body.te-app .te-rank-row:nth-child(2) .te-rank-no{ background:#eae4d8; color:#6b6255; }
body.te-app .te-rank-row:nth-child(3) .te-rank-no{ background:#f1e0cd; color:#8a5a15; }
body.te-app .te-rank-av{ width:32px; height:32px; flex:0 0 32px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:#fff; background:linear-gradient(135deg,#9c6b3d,#7a5230); }
body.te-app .te-rank-name{ font-size:12.5px; font-weight:700; color:var(--te-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.te-app .te-rank-xu{ margin-left:auto; font-size:12px; font-weight:800; color:var(--te-money); white-space:nowrap; }

body.te-app .te-feed{ display:flex; flex-direction:column; }
body.te-app .te-feed-row{ display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px dashed var(--te-line-2); font-size:13px; color:var(--te-ink-2); }
body.te-app .te-feed-row:last-child{ border-bottom:0; }
body.te-app .te-feed-ic{ width:34px; height:34px; flex:0 0 34px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:13px; background:var(--te-surface-2); color:var(--te-primary); }
body.te-app .te-feed-tx{ min-width:0; flex:1 1 auto; line-height:1.45; }
body.te-app .te-feed-tx b{ font-weight:800; color:var(--te-ink); }
body.te-app .te-feed-tx .amt{ color:var(--te-money); font-weight:800; }
body.te-app .te-feed-time{ font-size:11px; font-weight:700; color:var(--te-muted); white-space:nowrap; }

body.te-app .te-proof{ display:flex; flex-direction:column; gap:10px; }
body.te-app .te-proof-row{ display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:11px; background:var(--te-surface-2); }
body.te-app .te-proof-row .av{ width:28px; height:28px; border-radius:9px; background:linear-gradient(135deg,#4f9e79,#2f7a5c); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; }
body.te-app .te-proof-row .nm{ font-size:12px; font-weight:700; color:var(--te-ink); }
body.te-app .te-proof-row .tm{ font-size:10.5px; color:var(--te-muted); font-weight:600; }
body.te-app .te-proof-row .vl{ margin-left:auto; font-size:12px; font-weight:800; color:var(--te-money); }

body.te-app .te-cta{ border-radius:var(--te-radius); padding:18px; background:linear-gradient(135deg,#3a6455,#2f7a5c); color:#fff; position:relative; overflow:hidden; box-shadow:inset 0 0 0 1px rgba(255,255,255,.1); }
body.te-app .te-cta::after{ content:""; position:absolute; width:120px; height:120px; right:-40px; bottom:-60px; border-radius:50%; background:rgba(255,255,255,.12); }
body.te-app .te-cta h4{ font-size:15px !important; font-weight:700 !important; margin:0 0 6px !important; color:#fff !important; font-family:var(--te-font-display) !important; }
body.te-app .te-cta p{ font-size:12px; color:rgba(255,255,255,.85); margin:0 0 12px; line-height:1.55; }
body.te-app .te-cta a{ display:inline-flex; align-items:center; gap:7px; background:#fdf8ee; color:#2f7a5c !important; font-size:12px; font-weight:800; padding:9px 15px; border-radius:9px; position:relative; z-index:1; }

/* ---------- 9. BOTTOM NAV ---------- */
body.te-app .te-bottomnav{
  position:fixed; left:0; right:0; bottom:0; z-index:1035; display:none;
  align-items:center; justify-content:space-around; height:64px; padding:0 6px;
  background:rgba(255,252,244,.97); backdrop-filter:blur(14px); border-top:1px solid var(--te-line);
}
body.dark.te-app .te-bottomnav{ background:rgba(35,31,25,.97); }
body.te-app .te-bottomnav a{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:10px; font-weight:800; color:var(--te-muted) !important; padding:6px 0; border-radius:12px; }
body.te-app .te-bottomnav a i{ font-size:17px; }
body.te-app .te-bottomnav a.is-active{ color:var(--te-primary) !important; }
body.te-app .te-bottomnav .te-bn-cta{
  flex:0 0 54px; width:54px; height:54px; margin-top:-22px; border-radius:18px;
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); color:#fff !important;
  box-shadow:0 14px 26px -14px rgba(122,82,48,.9); display:flex; align-items:center; justify-content:center;
}
body.te-app .te-bottomnav .te-bn-cta i{ font-size:20px; }

/* ---------- 10. RESPONSIVE ---------- */
@media (max-width:1279px){
  body.te-app .te-cols{ grid-template-columns:minmax(0,1fr) 310px; }
  body.te-app .te-quick{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.te-app .te-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.te-app .content-page{ padding-left:26px !important; padding-right:26px !important; }
}
@media (max-width:991px){
  body.te-app .iq-sidebar.te-sidebar{ transform:translateX(-100%); width:280px !important; box-shadow:24px 0 60px -30px rgba(42,38,32,.55) !important; }
  body.te-app.tsb-sidebar-open .iq-sidebar.te-sidebar{ transform:translateX(0); }
  body.te-app .te-brand-close{ display:flex; }
  body.te-app .te-topbar{ left:0 !important; padding:0 16px !important; height:64px; }
  body.te-app .content-page{ margin-left:0 !important; padding:84px 16px 92px !important; }
  body.te-app .iq-footer{ margin-left:0 !important; padding:18px 16px 90px !important; }
  body.te-app .te-bottomnav{ display:flex; }
  body.te-app .te-cols{ grid-template-columns:minmax(0,1fr); }
  body.te-app .te-top-links, body.te-app .te-search{ display:none; }
  body.te-app .te-hero{ padding:22px; border-radius:20px; }
  body.te-app .te-hero-wallet{ flex:1 1 100%; }
  body.te-app .te-tasks{ grid-template-columns:minmax(0,1fr); }
  body.te-app .te-user .te-user-name{ display:none; }
  body.te-app .te-balance{ height:38px; padding:0 11px; font-size:12.5px; }
  body.te-app .te-icon-btn, body.te-app .te-burger{ width:38px; height:38px; flex:0 0 38px; }
  body.te-app .te-form-grid, body.te-app .te-form-grid.cols-3{ grid-template-columns:minmax(0,1fr); }
  body.te-app .te-field.span-2, body.te-app .te-field.span-3{ grid-column:span 1; }
  body.te-app .te-form-body{ padding:18px; }
  body.te-app .te-page-head{ margin-bottom:20px; padding-bottom:14px; }
}
@media (max-width:575px){
  body.te-app{ font-size:14.5px; }
  body.te-app .te-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body.te-app .te-stat{ padding:14px; }
  body.te-app .te-stat .num{ font-size:20px; }
  body.te-app .te-quick{ grid-template-columns:minmax(0,1fr); }
  body.te-app .te-hero h2{ font-size:21px !important; }
  body.te-app .te-hero-btns a{ flex:1 1 100%; justify-content:center; }
  body.te-app .te-task{ padding:13px 13px 13px 15px; gap:11px; }
  body.te-app .te-task-ic{ width:40px; height:40px; flex:0 0 40px; font-size:16px; }
  body.te-app .te-page-head h1{ font-size:21px !important; }
  body.te-app .te-form-head{ padding:16px 18px; }
  body.te-app .te-form-body{ padding:16px; }
}

/* ---------- 11. DARK FIXES ---------- */
body.dark.te-app .te-nav-scroll ul.side-menu > li > a > i:first-child{ background:var(--te-surface-2) !important; color:var(--te-ink-2) !important; }
body.dark.te-app .te-search input{ background:var(--te-surface-2); }
body.dark.te-app .te-user{ background:var(--te-surface); }
body.dark.te-app .te-task-prov{ background:var(--te-surface-2); }
body.te-app .nj-hero-nail, body.te-app .nj-hero-star{ display:none !important; }

/* ---------- 12. SWEETALERT2 / SELECT2 ---------- */
body.te-app .swal2-popup{
  border-radius:20px !important; background:var(--te-surface) !important; color:var(--te-ink) !important;
  font-family:var(--te-font) !important; box-shadow:var(--te-shadow-lg) !important;
  border:1px solid var(--te-line) !important;
}
body.te-app .swal2-title{ font-family:var(--te-font-display) !important; font-size:21px !important; color:var(--te-ink) !important; font-weight:700 !important; }
body.te-app .swal2-html-container{ font-size:14px !important; color:var(--te-ink-2) !important; line-height:1.65 !important; }
body.te-app .swal2-confirm{ background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)) !important; border-radius:11px !important; font-weight:700 !important; box-shadow:none !important; }
body.te-app .swal2-cancel{ background:var(--te-surface-2) !important; color:var(--te-ink-2) !important; border-radius:11px !important; font-weight:700 !important; }
body.te-app .select2-container--default .select2-selection--single{
  height:auto !important; padding:10px 14px !important; border:1px solid var(--te-line) !important;
  border-radius:12px !important; background:var(--te-surface) !important;
}
body.te-app .select2-container--default .select2-selection--single .select2-selection__rendered{ color:var(--te-ink) !important; font-size:14px; line-height:1.5 !important; padding:0 !important; }
body.te-app .select2-container--default .select2-selection--single .select2-selection__arrow{ height:100% !important; right:8px; }
body.te-app .select2-dropdown{ border:1px solid var(--te-line) !important; border-radius:12px !important; background:var(--te-surface) !important; box-shadow:var(--te-shadow-lg) !important; overflow:hidden; }
body.te-app .select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; }
body.te-app .select2-results__option{ font-size:13.5px; padding:8px 12px; color:var(--te-ink-2); }

/* ---------- 13. DỌN SẠCH "MENU XANH" CÒN SÓT ---------- */
/* Các component legacy hard-code màu xanh (không dùng --theme-1) */
body.te-app .rd-btn-blue{
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)) !important;
  color:#fff !important; box-shadow:0 10px 22px -16px rgba(122,82,48,.85) !important;
}
body.te-app .rd-btn-blue *{ color:#fff !important; }
body.te-app .tsb-nav-login:hover{ background:var(--te-primary) !important; border-color:var(--te-primary) !important; }
body.te-app .nj-task:hover,
body.te-app .nj-home .nj-task:hover{ border-color:var(--te-primary) !important; box-shadow:0 0 0 3px var(--te-primary-soft) !important; }
body.te-app .nj-home .nj-task .nj-task-do:hover{ background:var(--te-primary) !important; }
body.te-app .nj-home .nj-hero-banner h3{ color:var(--te-ink) !important; }
body.te-app .cf-input:focus-within,
body.te-app .px-input:focus{ border-color:var(--te-primary) !important; box-shadow:var(--te-ring) !important; }
body.te-app .bm-status.in_progress{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; border-color:var(--te-line) !important; }
body.te-app .ct-heart svg{ color:var(--te-danger) !important; }
body.te-app .btn-primary:hover{ background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)) !important; }
body.te-app .dark-mode .card .card-header,
body.te-app .dark-mode .table thead th{ background:var(--te-surface-2) !important; color:var(--te-ink) !important; }
/* tab / chip / pill legacy dùng nền xanh nhạt */
body.te-app .chip.active,
body.te-app .chips .chip.active,
body.te-app .qb-sort select:focus,
body.te-app .rd-tab.active{ border-color:var(--te-primary) !important; color:var(--te-primary) !important; }
body.te-app .rd-tab.active{ background:var(--te-primary-soft) !important; }
body.te-app .tab-pane .nav-link.active{ background:var(--te-primary-soft) !important; color:var(--te-primary) !important; }

/* --- Bóng đổ legacy còn ánh xanh navy (#0c2556) → đổi sang nâu ấm --- */
body.te-app .iq-sidebar,
body.te-app .iq-top-navbar{ box-shadow:0 0 30px rgba(60,44,26,.08) !important; }
body.te-app .iq-sidebar{ background:var(--te-surface) !important; }
body.dark.te-app .iq-sidebar{ background:var(--te-surface) !important; }

/* --- Thanh cuộn dịu mắt (tránh thanh cuộn xanh mặc định của trình duyệt) --- */
body.te-app *{ scrollbar-color:#c9b99c var(--te-surface-2); }
body.te-app ::-webkit-scrollbar{ width:10px; height:10px; }
body.te-app ::-webkit-scrollbar-track{ background:var(--te-surface-2); }
body.te-app ::-webkit-scrollbar-thumb{ background:#c9b99c; border-radius:99px; border:2px solid var(--te-surface-2); }
body.te-app ::-webkit-scrollbar-thumb:hover{ background:#b3a184; }

/* ---------- 14. DARK MODE — remap token comic/redeem tối (navy/slate) → nâu ấm ---------- */
body.dark.te-app, body.dark-mode.te-app{
  --cm-page:#191612; --cm-page-2:#1f1b16;
  --cm-surface:#231f19; --cm-surface-2:#2a251e; --cm-surface-3:#322c24;
  --cm-surface-in:#241f19;
  --cm-line:#e8dfcd; --cm-line-2:#c9bda8;
  --cm-text:#ece4d6; --cm-text-soft:#cfc5b4; --cm-text-mute:#9b9080;
  --cm-ink:#ece4d6; --cm-ink-2:#cfc5b4;
  --cm-strong-bg:#2a251e; --cm-strong-fg:#f3ecdf;
  --rd-ink:#ece4d6; --rd-ink-2:#cfc5b4; --rd-muted:#9b9080;
  --rd-line:#4a4238; --rd-bg:#1f1b16; --rd-card:#231f19; --rd-card-2:#191612;
  --rd-accent:#6fae9d;
}
body.dark.te-app .rd-acc-body,
body.dark-mode.te-app .rd-acc-body{ background:var(--te-surface) !important; border-color:var(--te-line) !important; }
body.dark.te-app .rd-bank-dropdown::-webkit-scrollbar-thumb,
body.dark-mode.te-app .rd-bank-dropdown::-webkit-scrollbar-thumb{ background:#5a5142 !important; }
body.dark.te-app .iq-sidebar,
body.dark-mode.te-app .iq-sidebar{ background:var(--te-surface) !important; }

/* ---------- 15. CHẤT "GIẤY TRUYỆN" — texture halftone rất nhẹ, dịu mắt ---------- */
body.te-app{
  background-image:
    radial-gradient(rgba(122,82,48,.05) 1px, transparent 1.2px),
    radial-gradient(rgba(122,82,48,.03) 1px, transparent 1.2px);
  background-size:24px 24px, 24px 24px;
  background-position:0 0, 12px 12px;
}
body.dark.te-app{
  background-image:
    radial-gradient(rgba(211,160,106,.05) 1px, transparent 1.2px),
    radial-gradient(rgba(211,160,106,.03) 1px, transparent 1.2px);
}

/* Hero = "khung tranh" truyện: viền kép + vệt tốc độ góc phải */
body.te-app .te-hero{ position:relative; overflow:hidden; }
body.te-app .te-hero::after{
  content:""; position:absolute; right:-40px; top:-40px; width:260px; height:260px;
  background:repeating-conic-gradient(from 0deg at 100% 0%, rgba(255,255,255,.10) 0deg 2deg, transparent 2deg 9deg);
  opacity:.5; pointer-events:none; border-radius:50%;
}
body.te-app .te-hero-main, body.te-app .te-hero-wallet{ position:relative; z-index:1; }

/* Tiêu đề mục có gạch nhấn dọc nhỏ, kiểu "chapter mark" */
body.te-app .te-sec-head h3{ position:relative; padding-left:14px; }
body.te-app .te-sec-head h3::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:4px; height:18px; border-radius:99px;
  background:linear-gradient(180deg,var(--te-primary),var(--te-primary-2));
}
body.te-app .te-sec-head h3 .ic{ display:none; }

/* Thẻ nhiệm vụ: viền trái đậm hơn khi hover để "dẫn mắt" */
body.te-app .te-task{ transition:border-color .18s, box-shadow .18s, transform .18s; }
body.te-app .te-task:hover{ border-color:var(--te-line-2); box-shadow:var(--te-shadow-lg); transform:translateY(-1px); }
body.te-app .te-task:hover::before{ opacity:1; }

/* Nút "LÀM NGAY" dịu hơn, không chói */
body.te-app .te-task-go{ box-shadow:0 6px 14px -8px rgba(122,82,48,.8); }

/* ============================================================================
   11. HOME v2 — "TRANG BÌA TRUYỆN" (bố cục mới, gọn & có nhịp)
   Thay cho chuỗi 4 quick-card + 4 stat-card + 2 feed trùng lặp.
   Nguyên tắc: 1 điểm nhấn lớn (bìa), 1 dải số liệu, 1 mục lục chương,
   1 danh sách chính, 1 bảng hoạt động có tab → mắt chỉ phải quét 1 lần.
   Prefix .th-* (taskearn home) để không đụng CSS cũ.
   ========================================================================== */

/* ---- 11.1 Khung chung ---- */
body.te-app .th-home{ display:flex; flex-direction:column; gap:22px; }

/* ---- 11.2 BÌA (hero) ---- */
body.te-app .th-cover{
  position:relative; overflow:hidden;
  display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:26px; align-items:center;
  padding:30px 32px; border-radius:24px;
  background:
    radial-gradient(120% 150% at 92% -30%, rgba(224,180,127,.5) 0%, rgba(224,180,127,0) 58%),
    radial-gradient(90% 120% at 0% 120%, rgba(79,143,128,.34) 0%, rgba(79,143,128,0) 62%),
    linear-gradient(135deg,#2c2217 0%,#463322 52%,#5a4227 100%);
  box-shadow:0 30px 60px -40px rgba(44,34,23,.9), inset 0 0 0 1px rgba(255,240,210,.14);
}
/* vân giấy dọc + khung kép kiểu trang truyện in */
body.te-app .th-cover::before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:repeating-linear-gradient(90deg, rgba(255,240,210,.05) 0 1px, transparent 1px 7px);
}
body.te-app .th-cover::after{
  content:""; position:absolute; inset:12px; border-radius:18px; pointer-events:none;
  border:1px solid rgba(255,240,210,.16);
}
body.te-app .th-cover-txt{ position:relative; z-index:2; min-width:0; }
body.te-app .th-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 13px; border-radius:99px;
  background:linear-gradient(135deg,#f3d58f,#d9a94e); color:#3d2e12;
  font-size:10.5px; font-weight:900; letter-spacing:1.3px; text-transform:uppercase;
  box-shadow:0 8px 18px -12px rgba(0,0,0,.7);
}
body.te-app .th-eyebrow .dot{ width:6px; height:6px; border-radius:50%; background:#3d2e12; opacity:.55; }
body.te-app .th-cover h1{
  font-family:var(--te-font-display) !important;
  font-size:33px !important; line-height:1.22 !important; font-weight:700 !important;
  color:#fdf8ee !important; margin:16px 0 10px !important; letter-spacing:-.6px;
}
body.te-app .th-cover h1 em{
  font-style:italic;
  background:linear-gradient(100deg,#f3d9a6 10%,#a9d8c8 90%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
body.te-app .th-cover-sub{
  font-size:13.5px; line-height:1.72; color:rgba(253,248,238,.78);
  margin:0 0 20px; max-width:520px;
}
body.te-app .th-cover-cta{ display:flex; gap:10px; flex-wrap:wrap; }
body.te-app .th-cover-cta a{
  display:inline-flex; align-items:center; gap:9px; padding:12px 20px; border-radius:12px;
  font-size:13px; font-weight:800; transition:.18s; white-space:nowrap;
}
body.te-app .th-btn-solid{ background:#fdf8ee; color:#3d2e20 !important; box-shadow:0 16px 28px -20px rgba(0,0,0,.85); }
body.te-app .th-btn-solid:hover{ transform:translateY(-2px); background:#fff; }
body.te-app .th-btn-line{ background:rgba(255,255,255,.08); color:#fdf8ee !important; border:1px solid rgba(255,240,210,.3); }
body.te-app .th-btn-line:hover{ background:rgba(255,255,255,.17); }

/* vé ví — "phiếu" giấy có mép răng cưa, không phải card */
body.te-app .th-slip{
  position:relative; z-index:2;
  padding:20px 20px 18px; border-radius:16px;
  background:linear-gradient(170deg,#fdf8ee,#f6ecd9);
  box-shadow:0 22px 44px -26px rgba(0,0,0,.75), inset 0 0 0 1px rgba(122,82,48,.16);
}
body.te-app .th-slip::before,
body.te-app .th-slip::after{
  content:""; position:absolute; left:14px; right:14px; height:1px;
  background-image:linear-gradient(90deg, rgba(122,82,48,.42) 0 6px, transparent 6px 12px);
  background-size:12px 1px;
}
body.te-app .th-slip::before{ top:-1px; } body.te-app .th-slip::after{ bottom:-1px; }
body.te-app .th-slip .k{
  font-size:9.5px; font-weight:900; letter-spacing:1.6px; text-transform:uppercase;
  color:#8a7f6e; display:block;
}
body.te-app .th-slip .v{
  font-family:var(--te-font-display); font-size:31px; font-weight:700; letter-spacing:-1px;
  color:#2a2620; display:flex; align-items:baseline; gap:5px; margin:3px 0 2px; line-height:1.1;
}
body.te-app .th-slip .v small{ font-family:var(--te-font); font-size:11px; font-weight:800; color:#8a7f6e; letter-spacing:.5px; }
body.te-app .th-slip .track{ height:7px; border-radius:99px; background:#e6d9c2; overflow:hidden; margin:13px 0 8px; }
body.te-app .th-slip .track i{
  display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg,#b17a24,#4f8f80);
  box-shadow:0 0 10px rgba(177,122,36,.4);
}
body.te-app .th-slip .goal{ font-size:11px; font-weight:700; color:#736857; }
body.te-app .th-slip .goal b{ color:#7a5230; }
body.dark.te-app .th-slip{ background:linear-gradient(170deg,#2f2820,#262019); }
body.dark.te-app .th-slip .v{ color:#ece4d6; }
body.dark.te-app .th-slip .track{ background:#3a332a; }

/* ---- 11.3 DẢI SỐ LIỆU (1 khối, chia bằng gạch đứt) ---- */
body.te-app .th-strip{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto;
  align-items:stretch; border-radius:16px; overflow:hidden;
  background:var(--te-surface); border:1px solid var(--te-line);
  box-shadow:var(--te-shadow);
}
body.te-app .th-strip-cell{
  padding:16px 20px; border-right:1px dashed var(--te-line);
  display:flex; flex-direction:column; gap:2px; min-width:0;
}
body.te-app .th-strip-cell .n{
  font-family:var(--te-font-display); font-size:22px; font-weight:700;
  color:var(--te-ink); letter-spacing:-.6px; line-height:1.2;
}
body.te-app .th-strip-cell .l{
  font-size:10.5px; font-weight:800; letter-spacing:.7px; text-transform:uppercase; color:var(--te-muted);
}
body.te-app .th-strip-cell.money .n{ color:var(--te-money); }
body.te-app .th-strip-go{
  display:flex; align-items:center; gap:9px; padding:0 22px;
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2));
  color:#fff !important; font-size:12.5px; font-weight:800; white-space:nowrap;
  transition:.18s;
}
body.te-app .th-strip-go:hover{ filter:brightness(1.08); }
body.te-app .th-strip-go i{ font-size:12px; }

/* ---- 11.4 MỤC LỤC CHƯƠNG (quick actions) ---- */
body.te-app .th-toc{
  border-radius:16px; background:var(--te-surface); border:1px solid var(--te-line);
  box-shadow:var(--te-shadow); overflow:hidden;
}
body.te-app .th-toc-hd{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:13px 18px; border-bottom:1px solid var(--te-line);
  background:linear-gradient(180deg,var(--te-surface-2),var(--te-surface));
}
body.te-app .th-toc-hd b{
  font-family:var(--te-font-display); font-size:14px; font-weight:700; color:var(--te-ink);
  display:flex; align-items:center; gap:8px; letter-spacing:-.2px;
}
body.te-app .th-toc-hd b i{ font-size:12px; color:var(--te-primary); }
body.te-app .th-toc-hd span{ font-size:10px; font-weight:900; letter-spacing:1.2px; text-transform:uppercase; color:var(--te-muted); }
body.te-app .th-toc-list{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
body.te-app .th-toc-item{
  display:flex; align-items:center; gap:13px; padding:14px 18px;
  border-bottom:1px dashed var(--te-line-2); color:var(--te-ink) !important;
  transition:background .16s;
}
body.te-app .th-toc-item:nth-child(odd){ border-right:1px dashed var(--te-line-2); }
body.te-app .th-toc-item:hover{ background:var(--te-primary-soft); }
body.te-app .th-toc-no{
  font-family:var(--te-font-display); font-size:13px; font-weight:700; color:var(--te-faint,#a39784);
  width:26px; flex:0 0 26px; letter-spacing:-.5px;
}
body.te-app .th-toc-item:hover .th-toc-no{ color:var(--te-primary); }
body.te-app .th-toc-ic{
  width:36px; height:36px; flex:0 0 36px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  background:var(--te-primary-soft); color:var(--te-primary); font-size:14px;
}
body.te-app .th-toc-tx{ min-width:0; flex:1 1 auto; }
body.te-app .th-toc-tx b{ display:block; font-size:13px; font-weight:800; color:var(--te-ink); letter-spacing:-.2px; }
body.te-app .th-toc-tx small{ display:block; font-size:11px; color:var(--te-muted); font-weight:600; }
body.te-app .th-toc-ar{ font-size:10px; color:var(--te-faint,#a39784); }

/* ---- 11.5 LƯỚI 2 CỘT ---- */
body.te-app .th-grid{ display:grid; grid-template-columns:minmax(0,1fr) 328px; gap:22px; align-items:start; }
body.te-app .th-col{ display:flex; flex-direction:column; gap:22px; min-width:0; }

/* ---- 11.6 PANEL (khung nội dung có "gáy" mực) ---- */
body.te-app .th-panel{
  background:var(--te-surface); border:1px solid var(--te-line); border-radius:16px;
  box-shadow:var(--te-shadow); overflow:hidden;
}
body.te-app .th-panel-hd{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 18px; border-bottom:1px solid var(--te-line);
  background:linear-gradient(180deg,var(--te-surface-2),var(--te-surface));
}
body.te-app .th-panel-hd h3{
  font-family:var(--te-font-display) !important; font-size:15px !important; font-weight:700 !important;
  margin:0 !important; color:var(--te-ink) !important; letter-spacing:-.3px;
  display:flex; align-items:center; gap:9px;
}
body.te-app .th-panel-hd h3 i{ font-size:12px; color:var(--te-primary); }
body.te-app .th-panel-hd a{ font-size:11.5px; font-weight:800; color:var(--te-primary) !important; display:inline-flex; align-items:center; gap:5px; }
body.te-app .th-panel-hd a:hover{ gap:8px; }
body.te-app .th-panel-bd{ padding:6px 18px 14px; }

/* ---- 11.7 DÒNG NHIỆM VỤ (danh sách, không phải card) ---- */
body.te-app .th-row{
  display:flex; align-items:center; gap:14px; padding:14px 0;
  border-bottom:1px dashed var(--te-line-2);
}
body.te-app .th-row:last-child{ border-bottom:0; }
body.te-app .th-row-ic{
  width:42px; height:42px; flex:0 0 42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:16px; background:var(--te-primary-soft); color:var(--te-primary);
}
body.te-app .th-row-bd{ flex:1 1 auto; min-width:0; }
body.te-app .th-row-top{ display:flex; align-items:center; gap:7px; margin-bottom:3px; flex-wrap:wrap; }
body.te-app .th-tag{
  font-size:9.5px; font-weight:900; letter-spacing:.7px; text-transform:uppercase;
  padding:2px 7px; border-radius:5px; background:var(--te-surface-2); color:var(--te-muted);
  border:1px solid var(--te-line);
}
body.te-app .th-tag.hot{ background:var(--te-danger-soft); color:var(--te-danger); border-color:transparent; }
body.te-app .th-row-bd h4{
  font-size:13.5px !important; font-weight:700 !important; line-height:1.42; margin:0 0 4px !important;
  color:var(--te-ink) !important; font-family:var(--te-font) !important;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;
}
body.te-app .th-row-meta{ font-size:11px; color:var(--te-muted); font-weight:600; display:flex; gap:12px; flex-wrap:wrap; }
body.te-app .th-row-meta i{ font-size:10px; margin-right:3px; opacity:.8; }
body.te-app .th-row-side{ flex:0 0 auto; text-align:right; display:flex; align-items:center; gap:12px; }
body.te-app .th-reward{
  font-family:var(--te-font-display); font-size:14px; font-weight:700; color:var(--te-money);
  white-space:nowrap; letter-spacing:-.3px;
}
body.te-app .th-go{
  width:34px; height:34px; flex:0 0 34px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); color:#fff !important; font-size:11px;
  transition:.18s;
}
body.te-app .th-go:hover{ transform:translateX(2px); filter:brightness(1.1); }

/* ---- 11.8 BẢNG HOẠT ĐỘNG CÓ TAB ---- */
body.te-app .th-tabs{ display:flex; gap:6px; }
body.te-app .th-tab{
  padding:6px 13px; border-radius:99px; font-size:11.5px; font-weight:800;
  color:var(--te-muted) !important; background:var(--te-surface-2); border:1px solid var(--te-line);
  cursor:pointer; transition:.16s;
}
body.te-app .th-tab:hover{ color:var(--te-primary) !important; }
body.te-app .th-tab.on{
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); color:#fff !important;
  border-color:transparent; box-shadow:0 8px 16px -12px rgba(122,82,48,.9);
}
body.te-app .th-pane{ display:none; }
body.te-app .th-pane.on{ display:block; animation:thFade .22s ease; }
@keyframes thFade{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }

body.te-app .th-act{
  display:flex; align-items:center; gap:12px; padding:11px 0;
  border-bottom:1px dashed var(--te-line-2); font-size:12.5px; color:var(--te-ink-2);
}
body.te-app .th-act:last-child{ border-bottom:0; }
body.te-app .th-act-ic{
  width:30px; height:30px; flex:0 0 30px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  font-size:11px; background:var(--te-surface-2); color:var(--te-primary);
}
body.te-app .th-act-ic.money{ background:var(--te-money-soft); color:var(--te-money); }
body.te-app .th-act-tx{ flex:1 1 auto; min-width:0; line-height:1.45; }
body.te-app .th-act-tx b{ font-weight:800; color:var(--te-ink); }
body.te-app .th-act-tx .amt{ color:var(--te-money); font-weight:800; }
body.te-app .th-act-tm{ font-size:10.5px; font-weight:700; color:var(--te-muted); white-space:nowrap; }

/* ---- 11.9 RAIL PHẢI ---- */
body.te-app .th-rail{ display:flex; flex-direction:column; gap:18px; }

/* điểm danh: dải 7 ô liền, không viền rời rạc */
body.te-app .th-days{ display:flex; gap:5px; }
body.te-app .th-day{
  flex:1; text-align:center; padding:9px 2px 8px; border-radius:9px;
  background:var(--te-surface-2); border:1px solid var(--te-line);
  font-size:9.5px; font-weight:800; color:var(--te-muted); line-height:1.35;
}
body.te-app .th-day b{ display:block; font-size:10.5px; color:var(--te-ink-2); margin-bottom:2px; }
body.te-app .th-day.done{ background:var(--te-money-soft); border-color:rgba(47,122,92,.3); color:var(--te-money); }
body.te-app .th-day.done b{ color:var(--te-money); }
body.te-app .th-day.today{ background:var(--te-ink); border-color:transparent; color:#f7f1e4; box-shadow:0 10px 18px -14px rgba(42,38,32,.8); }
body.te-app .th-day.today b{ color:#f7f1e4; }
body.te-app .th-checkin-btn{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  margin-top:13px; padding:11px; border-radius:11px; font-size:12.5px; font-weight:800;
  background:linear-gradient(135deg,var(--te-primary),var(--te-primary-2)); color:#fff !important;
  box-shadow:0 12px 22px -16px rgba(122,82,48,.95); transition:.18s;
}
body.te-app .th-checkin-btn:hover{ filter:brightness(1.08); transform:translateY(-1px); }

/* bảng xếp hạng: gọn, số thứ tự dạng chữ serif */
body.te-app .th-rank-row{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px dashed var(--te-line-2); }
body.te-app .th-rank-row:last-child{ border-bottom:0; }
body.te-app .th-rank-no{
  font-family:var(--te-font-display); font-size:12.5px; font-weight:700; width:20px; flex:0 0 20px;
  color:var(--te-faint,#a39784); text-align:center;
}
body.te-app .th-rank-row:nth-child(1) .th-rank-no{ color:#b17a24; }
body.te-app .th-rank-row:nth-child(2) .th-rank-no{ color:#8a7f6e; }
body.te-app .th-rank-row:nth-child(3) .th-rank-no{ color:#a8623a; }
body.te-app .th-rank-av{
  width:29px; height:29px; flex:0 0 29px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:800; color:#fff; background:linear-gradient(135deg,#9c6b3d,#7a5230);
}
body.te-app .th-rank-nm{ font-size:12.5px; font-weight:700; color:var(--te-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.te-app .th-rank-xu{ margin-left:auto; font-size:11.5px; font-weight:800; color:var(--te-money); white-space:nowrap; }

/* thanh toán: dòng mảnh, không khối nền */
body.te-app .th-pay-row{ display:flex; align-items:center; gap:9px; padding:9px 0; border-bottom:1px dashed var(--te-line-2); }
body.te-app .th-pay-row:last-child{ border-bottom:0; }
body.te-app .th-pay-av{
  width:26px; height:26px; flex:0 0 26px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  font-size:10.5px; font-weight:800; color:#fff; background:linear-gradient(135deg,#4f9e79,#2f7a5c);
}
body.te-app .th-pay-nm{ font-size:12px; font-weight:700; color:var(--te-ink); }
body.te-app .th-pay-tm{ font-size:10px; color:var(--te-muted); font-weight:600; }
body.te-app .th-pay-vl{ margin-left:auto; font-size:11.5px; font-weight:800; color:var(--te-money); }

/* CTA đổi thưởng: khối mực đậm, chữ serif */
body.te-app .th-cta{
  position:relative; overflow:hidden; border-radius:16px; padding:20px;
  background:linear-gradient(150deg,#3a6455,#2a4f45); color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.1), 0 20px 40px -30px rgba(42,79,69,.9);
}
body.te-app .th-cta::after{
  content:""; position:absolute; width:150px; height:150px; right:-55px; bottom:-70px; border-radius:50%;
  background:rgba(255,255,255,.09);
}
body.te-app .th-cta h4{
  font-family:var(--te-font-display) !important; font-size:16px !important; font-weight:700 !important;
  margin:0 0 6px !important; color:#fff !important; position:relative; z-index:1;
}
body.te-app .th-cta p{ font-size:11.5px; line-height:1.6; color:rgba(255,255,255,.82); margin:0 0 13px; position:relative; z-index:1; }
body.te-app .th-cta a{
  display:inline-flex; align-items:center; gap:7px; background:#fdf8ee; color:#2a4f45 !important;
  font-size:11.5px; font-weight:800; padding:9px 15px; border-radius:9px; position:relative; z-index:1;
}

/* ---- 11.10 RESPONSIVE ---- */
@media (max-width:1279px){
  body.te-app .th-grid{ grid-template-columns:minmax(0,1fr) 300px; }
  body.te-app .th-cover{ grid-template-columns:minmax(0,1fr) 260px; padding:26px; }
  body.te-app .th-cover h1{ font-size:28px !important; }
}
@media (max-width:991px){
  body.te-app .th-grid{ grid-template-columns:minmax(0,1fr); }
  body.te-app .th-cover{ grid-template-columns:minmax(0,1fr); gap:20px; padding:24px; border-radius:20px; }
  body.te-app .th-slip{ max-width:340px; }
  body.te-app .th-strip{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.te-app .th-strip-go{ grid-column:1 / -1; justify-content:center; padding:13px; border-top:1px solid var(--te-line); }
  body.te-app .th-strip-cell:nth-child(3){ border-right:0; }
}
@media (max-width:575px){
  body.te-app .th-cover{ padding:20px; }
  body.te-app .th-cover h1{ font-size:23px !important; }
  body.te-app .th-cover-cta a{ flex:1 1 100%; justify-content:center; }
  body.te-app .th-strip{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.te-app .th-strip-cell{ padding:13px 14px; }
  body.te-app .th-strip-cell:nth-child(2){ border-right:0; }
  body.te-app .th-strip-cell:nth-child(3){ border-top:1px dashed var(--te-line); grid-column:1 / -1; }
  body.te-app .th-strip-cell .n{ font-size:18px; }
  body.te-app .th-toc-list{ grid-template-columns:minmax(0,1fr); }
  body.te-app .th-toc-item:nth-child(odd){ border-right:0; }
  body.te-app .th-row{ gap:11px; }
  body.te-app .th-row-ic{ width:38px; height:38px; flex:0 0 38px; font-size:14px; }
  body.te-app .th-row-bd h4{ font-size:12.5px !important; }
  body.te-app .th-reward{ font-size:12.5px; }
  body.te-app .th-go{ display:none; }
  body.te-app .th-panel-hd{ padding:12px 14px; flex-wrap:wrap; }
  body.te-app .th-panel-bd{ padding:4px 14px 12px; }
}
@media (prefers-reduced-motion:reduce){
  body.te-app .th-pane.on{ animation:none; }
  body.te-app .th-go, body.te-app .th-toc-item, body.te-app .th-btn-solid{ transition:none; }
}
