/* =========================
   VARIABLES
========================= */
:root{
  --primary:#1e3a8a;
  --accent:#f59e0b;
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
}

/* =========================
   RESET & BASE
========================= */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* =========================
   LAYOUT
========================= */
.container{
  max-width:960px;
  margin:auto;
  padding:16px;
}

/* =========================
   CARD
========================= */
.card{
  background:var(--card);
  padding:16px;
  margin-bottom:16px;
}

.card h2{
  margin:0 0 12px;
  font-size:16px;
  font-weight:700;
}

/* =========================
   TABLE – FIT, KHÔNG SCROLL
========================= */
.table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:14px;
}

.table th,
.table td{
  padding:8px;
  border-bottom:1px solid var(--border);
  word-break:break-word;
}

.table th{
  background:var(--card); /* ⬅️ QUAN TRỌNG */
}

.table th:first-child,
.table td:first-child{
  text-align:left;
}

.table th:nth-child(2),
.table th:nth-child(3),
.table td:nth-child(2),
.table td:nth-child(3){
  text-align:right;
}

/* =========================
   NAVIGATION – BOTTOM TAB
========================= */
.main-nav{
  background:var(--card);   /* ⬅️ BỎ #fff */
  border-top:1px solid var(--border);
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  z-index:9999;
}

.nav-menu{
  display:flex;
  justify-content:space-around;
  align-items:center;
  list-style:none;
  margin:0;
  padding:0;
  height:56px;
}

.nav-menu li{
  flex:1;
}

.nav-menu a{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  height:56px;
  text-decoration:none;
  color:var(--muted);
  font-size:11px;
}

.nav-menu .icon{
  font-size:20px;
  line-height:1;
}

.nav-menu a.active{
  color:var(--primary);
  font-weight:600;
}

/* =========================
   BODY OFFSET CHO MENU
========================= */
body[data-app]{
  padding-bottom:56px;
}

/* =========================
   FOOTER
========================= */
body[data-app] .footer{
  /* web dùng thì hiện – app thì ẩn */
}

/* =========================
   TRADINGVIEW – FIX SCROLL DỌC
========================= */
.tv-box{
  height:260px;
  overflow:hidden;
}

.tradingview-widget-container{
  height:100% !important;
  overflow:hidden !important;
}

.tradingview-widget-container iframe{
  height:260px !important;
  max-height:260px !important;
  overflow:hidden !important;
  border:0 !important;
}

/* =========================
   DARK MODE (APP FORCE)
========================= */
body.dark{
  --bg:#0f172a;
  --card:#020617;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#1e293b;
  --primary:#60a5fa;
}
/* =========================
   FOOTER
========================= */
.footer{
  max-width:960px;
  margin:24px auto 80px; /* chừa chỗ cho bottom menu */
  padding:12px 16px;
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
  text-align:center;
  border-top:1px solid var(--border);
}

/* link trong footer (nếu có) */
.footer a{
  color:var(--primary);
  text-decoration:none;
}

.footer a:hover{
  text-decoration:underline;
}

/* =========================
   MOBILE APP MODE
========================= */
body[data-app] .footer{
  margin-bottom:72px; /* tránh bị che bởi bottom tab */
}

/* =========================
   DARK MODE (nếu bật sau này)
========================= */
body.dark .footer{
  color:var(--muted);
  border-top:1px solid var(--border);
}
/* =========================
   DESKTOP TOP NAV
========================= */
.desktop-nav{
  display:none;
  background:var(--card);
  border-bottom:1px solid var(--border);
}

.desktop-nav-inner{
  max-width:960px;
  margin:auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.desktop-nav .logo{
  font-weight:700;
  color:var(--primary);
}

.desktop-menu{
  list-style:none;
  display:flex;
  gap:24px;
  margin:0;
  padding:0;
}

.desktop-menu a{
  text-decoration:none;
  color:var(--muted);
  font-weight:500;
}

.desktop-menu a.active,
.desktop-menu a:hover{
  color:var(--primary);
}
/* =========================
   RESPONSIVE SWITCH
========================= */
@media (min-width: 768px){

  /* HIỆN MENU DESKTOP */
  .desktop-nav{
    display:block;
    position:sticky;
    top:0;
    z-index:1000;
  }

  /* ẨN BOTTOM MENU MOBILE */
  .main-nav{
    display:none;
  }

  /* BỎ OFFSET DƯỚI */
  body[data-app]{
    padding-bottom:0;
  }
}
/* =========================
   DESKTOP NAV – BEAUTIFUL STYLE
========================= */
.desktop-nav{
  background:#0b0f19;               /* đen xanh sang */
  border-bottom:1px solid #1f2937;  /* viền nhẹ */
}

.desktop-nav-inner{
  min-height:56px;
}
/* =========================
   LOGO – FINAL (ACTIVE)
========================= */
.desktop-nav .logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-family:'Inter',system-ui,sans-serif;
  font-size:21.5px;
  font-weight:800;
  letter-spacing:.2px;
  line-height:1;
  cursor:pointer;
  transition:transform .2s ease;
}



/* =========================
   LOGO TEXT – MATCH SVG GOLD
========================= */
.logo-text{
  background:linear-gradient(
    135deg,
    #fff6cc 0%,
    #fde68a 25%,
    #facc15 45%,
    #f59e0b 65%,
    #d97706 85%,
    #92400e 100%
  );
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}



/* =========================
   LOGO ICON SVG SIZE
========================= */
.logo-icon svg{
  width:25px;    /* ⬅️ chỉnh tại đây */
  height:25px;   /* ⬅️ chỉnh tại đây */
  display:block;
}

.logo-icon{
  display:flex;
  align-items:center;
}

/* =========================
   DESKTOP MENU – TEXT COLOR FIX
========================= */
.desktop-menu a{
  color:#ffffff;          /* xám xanh sáng */
  font-weight:500;
}

.desktop-menu a:hover{
  color:#ffffff;
}

.desktop-menu a.active{
  color:#facc15;
}


/*========================
Bảng giá chung ===*/
/* =========================
TABLE PRO FINAL
========================= */
/* =========================
TABLE PRO FINAL
========================= */

.price-table{

width:100%;
border-collapse:separate;
border-spacing:0;

font-size:15px;

background:#fff;

border-radius:12px;
overflow:hidden;

box-shadow:0 2px 8px rgba(0,0,0,.06);

}


/* HEADER */

.price-table thead th{

background:#f8fafc;

padding:14px;

font-weight:600;

border-bottom:2px solid #e5e7eb;

cursor:pointer;

user-select:none;

}


/* BODY */

.price-table td{

padding:14px;

border-bottom:1px solid #f1f5f9;

}


/* zebra */

.price-table tbody tr:nth-child(even){

background:#fafafa;

}


/* hover */

.price-table tbody tr{

transition:all .15s ease;

}

.price-table tbody tr:hover{

background:#eef2ff;

transform:scale(1.002);

}


/* price column */

.price{

text-align:right;

letter-spacing:.3px;

font-variant-numeric:tabular-nums;

font-weight:500;

}


/* flash animation */

.flash{

animation:flash 0.8s;

}

@keyframes flash{

0%{background:#fef08a;}
100%{background:transparent;}

}


/* =========================
SORT ICON
========================= */

.price-table th.sorting:after{

content:" ⇅";

font-size:11px;

color:#94a3b8;

margin-left:6px;

}


.price-table th.sorting_asc:after{

content:" ▲";

color:#16a34a;

}


.price-table th.sorting_desc:after{

content:" ▼";

color:#dc2626;

}


/* =========================
DATATABLE FIX
========================= */

.dataTables_wrapper{

font-size:15px;

}


.dataTables_wrapper th{

white-space:nowrap;

}


/* remove default datatable border */

table.dataTable.no-footer{

border-bottom:none;

}
.price-table thead th:first-child{

border-top-left-radius:12px;

}

.price-table thead th:last-child{

border-top-right-radius:12px;

}
.price-table tbody tr:last-child td:first-child{

border-bottom-left-radius:12px;

}

.price-table tbody tr:last-child td:last-child{

border-bottom-right-radius:12px;

}
.price-table th{

position:relative;

}

.price-table th:after{

position:absolute;

right:10px;

top:50%;

transform:translateY(-50%);

}

/* =========================
TABLE DETAIL – FULL FIT
========================= */

.card table{

width:100% !important;

border-collapse:separate;

border-spacing:0;

background:#fff;

border-radius:12px;

overflow:hidden;

box-shadow:0 2px 8px rgba(0,0,0,.06);

}


/* HEADER */

.card table thead th{

background:#f8fafc;

padding:14px;

font-weight:600;

border-bottom:2px solid #e5e7eb;

white-space:nowrap;

}


/* BODY */

.card table td{

padding:14px;

border-bottom:1px solid #f1f5f9;

}


/* zebra */

.card table tbody tr:nth-child(even){

background:#fafafa;

}


/* hover */

.card table tbody tr:hover{

background:#eef2ff;

}


/* number column */

.card table td:nth-child(2),
.card table td:nth-child(3){

text-align:right;

font-variant-numeric:tabular-nums;

letter-spacing:.3px;

}


/* FIX DATATABLE WRAPPER */

.dataTables_wrapper{

width:100%;

overflow:hidden;

}


.dataTables_wrapper table{

width:100% !important;

margin:0 !important;

}
/* FIX DATATABLE FULL WIDTH */

.dataTables_wrapper{

width:100% !important;

}

.dataTables_wrapper .dataTables_scroll{

width:100% !important;

}

.dataTables_wrapper .dataTables_scrollBody{

width:100% !important;

}

.dataTables_wrapper table{

width:100% !important;

}
.card{

overflow:hidden;

}
table.dataTable{
width:100% !important;
}

/* TABLE LAYOUT CONTROL */

.price-table{

width:100%;

table-layout:auto;

}



/* MOBILE mới dùng fixed */

@media(max-width:768px){

.price-table{

table-layout:fixed;

}

.price-table td,
.price-table th{

word-wrap:break-word;
white-space:normal;

}

.price-table td:first-child{

width:40%;

}

.price-table td:nth-child(2),
.price-table td:nth-child(3){

width:30%;

}
/* cột số KHÔNG xuống dòng */
.price-table td:not(:first-child){

white-space:nowrap;

}
}
.price-table thead th{

white-space:normal !important;
word-break:break-word;

}

/* HEADER xuống dòng */
.price-table th{

white-space:normal !important;
word-break:break-word;
line-height:1.3;
text-align:center;

}
/* tăng giảm giá */




.price-diff{
font-size:12px;
margin-top:2px;
font-weight:60;
line-height:1.2;
}

.price-up{
color:#16a34a;
}

.price-down{
color:#dc2626;
}
/*
.price-up::before{
content:"▲ ";
font-size:10px;
}

.price-down::before{
content:"▼ ";
font-size:10px;
}*/