:root{
  --jun-header: #26b7ea; --jun-header-dk:#199fd4; --jun-subbar:#2aa1d9;
  --jun-primary:#2db7f5; --jun-primary-600:#179fdc; --jun-primary-50:#eaf8ff;
  --bg-app:#f2f6fb; --surface:#ffffff; --surface-soft:#f7fbff; --border:#e0edf7;
  --text:#1e3444; --muted:#6e8091; --thead:#f0f7fd; --success:#22b36b;
  --shadow: 0 8px 20px rgba(23,144,205,.08);
}
*{box-sizing:border-box}
body{ margin:0; background:var(--bg-app);
  font-family:"Microsoft YaHei","Microsoft JhengHei","PingFangTC",Helvetica,Arial,sans-serif; color:var(--text);}


/* Header */
.topbar{height:60px;background:linear-gradient(180deg,var(--jun-header),var(--jun-header-dk));
  border-bottom:1px solid #168fc1;display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#fff;gap:14px;position:sticky;top:0;z-index:1000;}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;}
.brand .logo{width:40px;height:40px;border-radius:8px;background:#fff;color:var(--jun-header);display:grid;place-items:center;font-weight:900;}
.hamburger{display:none;width:40px;height:40px;border:none;border-radius:8px;background:rgba(255,255,255,.2);color:#fff;font-size:18px;align-items:center;justify-content:center;cursor:pointer;}
.hamburger:active{transform:scale(.98)}
.menu{display:flex;gap:20px;margin-left:12px;opacity:.95;font-weight:600;flex-wrap:wrap;}
.menu a{color:#eafaff;text-decoration:none;font-size:14px}
.menu a:hover{opacity:1;text-decoration:underline}
.subbar{height:38px;background:var(--jun-subbar);color:#eafaff;display:flex;align-items:center;padding:0 16px;gap:16px;overflow:auto hidden;border-bottom:1px solid #1d8fcb;font-size:13px;font-weight:600;scrollbar-width:none;}
.subbar::-webkit-scrollbar{display:none}


/* Main */
.container{ padding:20px 16px; display:flex; gap:20px; max-width:1200px; margin:0 auto; }
.sidebar{width:240px;flex-shrink:0;background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;height:fit-content;box-shadow:var(--shadow);}
.sb-header{padding:18px 16px 10px;border-bottom:1px solid var(--border)} .sb-id{font-size:20px;font-weight:800}
.sb-balance{display:flex;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);color:var(--muted)}
.sb-nav a{display:flex;align-items:center;gap:12px;padding:14px 16px;color:var(--text);text-decoration:none;border-left:3px solid transparent;}
.sb-nav a i{width:22px;text-align:center;color:#8aa1b5}
.sb-nav a:hover{background:var(--jun-primary-50);color:var(--jun-primary);border-left-color:var(--jun-primary)}
.sb-nav a:hover i{color:var(--jun-primary)}
.sb-nav a.active{background:var(--jun-primary-50);color:var(--jun-primary);border-left-color:var(--jun-primary);font-weight:700}
.sb-nav a.active i{color:var(--jun-primary)}
.card{flex:1;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;}
.card-header{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.title{font-size:18px;font-weight:800;color:#275a7c}
.tabs{display:flex;gap:10px;padding:16px 18px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.tab{background:#fff;border:1px solid var(--border);color:#385a73;padding:9px 14px;border-radius:999px;cursor:pointer;font-weight:600;font-size:14px}
.tab:hover{border-color:var(--jun-primary);color:var(--jun-primary)} .tab.active{background:var(--jun-primary);border-color:var(--jun-primary);color:#fff}
.filters{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:12px 14px;background:var(--surface-soft);border-top:1px solid var(--border);border-bottom:1px solid var(--border);flex-wrap:wrap}
.filter-left .chip{background:#fff;border:1px solid var(--border);padding:7px 12px;border-radius:8px;cursor:pointer;margin-right:8px;font-weight:600}
.filter-left .chip.active,.filter-left .chip:hover{background:var(--jun-primary);color:#fff;border-color:var(--jun-primary)}
.datebox{display:flex;align-items:center;gap:8px;color:#566b7c;flex-wrap:wrap}
.datebox input{height:34px;border:1px solid var(--border);border-radius:8px;padding:0 10px;background:#fff;outline:none}
.datebox input:focus{border-color:var(--jun-primary);box-shadow:0 0 0 3px rgba(45,183,245,.15)}
.btn{height:34px;border:none;border-radius:8px;padding:0 12px;background:var(--jun-primary);color:#fff;font-weight:700;cursor:pointer}
.btn:hover{background:var(--jun-primary-600)}
.hint{padding:8px 18px;color:var(--muted);font-size:12px}
.table-wrap{padding:0 18px 6px}
.table-responsive{width:100%;overflow:auto;-webkit-overflow-scrolling:touch;border-radius:10px}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:820px;}
thead th{background:var(--thead);color:#395a72;padding:12px;border-bottom:1px solid var(--border);font-weight:800;text-align:center}
tbody td{padding:12px;border-bottom:1px solid var(--border);text-align:center}
tbody tr:hover{background:#fbfdff}
.bank-tag{display:inline-block;padding:4px 8px;background:#e7f8fb;color:#0a788b;border:1px solid #ccecf2;border-radius:999px;font-weight:700}
.pager{display:flex;justify-content:center;gap:8px;padding:16px}
.page{min-width:36px;text-align:center;padding:8px 12px;background:#fff;border:1px solid var(--border);border-radius:8px;cursor:pointer}
.page:hover{background:var(--jun-primary-50);color:var(--jun-primary);border-color:var(--jun-primary)}
.page.active{background:var(--jun-primary);color:#fff;border-color:var(--jun-primary)}


/* Footer */
.footer-wrap{ max-width:1200px; margin:32px auto; padding:0 16px 36px; }
.news-head{ color:#0c87c6; font-weight:800; margin:8px 0 14px; display:flex; align-items:center; gap:8px; }
.badge-news{background:#16c1ff; color:#fff; font-size:12px; padding:2px 6px; border-radius:6px; font-weight:800}
.news-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-bottom:22px; }
.news-card{ background:#fff; border:2px solid #cfefff; border-radius:12px; overflow:hidden; box-shadow: 0 6px 14px rgba(18,137,196,.06); }
.news-img{aspect-ratio:16/9; width:100%; background:#d9f2ff}
.news-body{padding:12px 14px 14px}
.news-title{font-weight:800; color:#2aa1d9}
.news-desc{color:#4f6d82; font-size:14px; margin:6px 0}
.news-more{color:#2aa1d9; font-weight:800; font-size:14px; text-decoration:none}
.news-more:hover{text-decoration:underline}
.footer-brand{display:flex; align-items:center; gap:10px; margin:18px 0 10px}
.footer-brand .logo{width:56px;height:56px;border-radius:12px;background:linear-gradient(180deg,#2db7f5,#179fdc);display:grid;place-items:center;color:#fff;font-size:26px;font-weight:900}
.slogan{color:#1aa0df;font-weight:900;font-size:12px;letter-spacing:.5px}
.footer-cols{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;gap:18px;padding:10px 0 18px;border-bottom:1px solid var(--border);}
.ft-col h4{color:#1aa0df;font-size:14px;margin:0 0 10px} .ft-col p{margin:0;font-size:13px;color:#4f6d82}
.ft-list{list-style:none;padding:0;margin:0} .ft-list li{margin:8px 0}
.ft-list a{color:#1aa0df;text-decoration:none;font-weight:700;font-size:13px} .ft-list a:hover{text-decoration:underline}
.certs,.payments,.responsible,.social{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.cert-badge,.pay-badge{border:2px solid #cfefff;color:#1aa0df;border-radius:10px;padding:8px 10px;background:#fff;font-weight:800;font-size:12px}
.ft-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border);flex-wrap:wrap}
.ft-strip h4{color:#1aa0df;font-size:14px;margin:0}
.copyright{text-align:center;color:#5c7b90;font-size:12px;padding:16px 0 10px}
.copyright a{color:#1aa0df;text-decoration:none} .copyright a:hover{text-decoration:underline}


/* Overlay */
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:900; display:none;}
.overlay.show{display:block}


/* ===== Auth Modal ===== */
.login-modal-backdrop{position:fixed;inset:0;background:rgba(13,37,56,.35);display:none;place-items:center;padding:24px;z-index:1100;}
.login-modal-backdrop.show{display:grid}
.login-modal{width:min(480px,100%);background:#fff;border-radius:24px;box-shadow:0 30px 80px rgba(6,31,52,.22);overflow:hidden;position:relative;border:1px solid rgba(43,158,243,.15);}
.login-modal .close-btn{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#f2f7fb;border:1px solid #e4eef7;cursor:pointer;transition:transform .15s ease,background .2s ease;}
.login-modal .close-btn:hover{transform:rotate(90deg);background:#eaf4fd}
.login-modal .header{padding:24px 24px 8px;text-align:center}
.login-modal .logo{display:inline-flex;align-items:center;gap:10px;margin-bottom:6px;font-weight:800;font-size:26px;color:var(--text)}
.login-modal .logo-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:radial-gradient(100% 100% at 30% 20%, #7ed1ff,#2b9ef3);color:#fff;font-weight:900}
.login-modal .slogan{font-weight:700;font-size:13px;color:#1b7dc3}
.login-modal .sub{font-size:12px;color:#6e8091;margin-top:2px}


.auth-tabs{display:flex;gap:6px;padding:10px 14px 0;justify-content:center}
.auth-tab{padding:8px 12px;border:1px solid var(--border);border-radius:999px;background:#fff;color:#385a73;font-weight:700;font-size:13px;cursor:pointer}
.auth-tab.active{background:var(--jun-primary);border-color:var(--jun-primary);color:#fff}


.form{padding:14px 20px 0}
.field{position:relative;margin-top:12px}
.input{width:100%;background:#e6eef6;border:1px solid #dbe8f4;border-radius:12px;padding:12px 14px;outline:none;font-size:14px;color:var(--text)}
.input:focus{border-color:#2b9ef3;box-shadow:0 0 0 4px rgba(43,158,243,.15)}
.remember{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:13px;color:#6e8091}
.primary{width:100%;background:linear-gradient(180deg,#2b9ef3,#1b7dc3);color:#fff;border:none;border-radius:14px;padding:12px 18px;font-weight:800;letter-spacing:.3px;font-size:16px;cursor:pointer;box-shadow:0 10px 20px rgba(43,158,243,.35)}
.primary:hover{filter:brightness(1.05)} .primary:active{transform:translateY(1px)}
.links{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 20px 8px;font-size:14px}
.link{color:#1b7dc3;text-decoration:none;font-weight:700} .link:hover{text-decoration:underline}
.notice{margin:14px 0 10px;display:grid;grid-template-columns:100px 1fr;gap:10px;align-items:center;background:#f0f7ff;border:1px dashed #a9cff5;padding:12px;border-radius:14px}
.notice .badge{display:grid;place-items:center;border-radius:12px;border:1px solid #d6ecff;background:#e8f3ff;height:60px;font-weight:800;color:#2b9ef3}
.divider{height:1px;background:#eef4fa;margin:10px 0}
.quick{text-align:center;color:#6e8091;padding:0 20px 18px}
.quick .icons{display:flex;justify-content:center;gap:14px;margin-top:8px}
.circle{width:44px;height:44px;border-radius:999px;display:grid;place-items:center;border:1px solid #e3eef8;background:#fff;box-shadow:0 6px 16px rgba(0,0,0,.06);cursor:pointer;font-size:22px}
.error-text{color:#d93025;font-size:12px;margin-top:6px;display:none}
.show{display:block!important}


/* Utils */
.hidden{display:none}


/* Responsive */
@media (max-width: 1024px){
  .menu{display:none}
  .hamburger{display:flex}
  .container{gap:14px}
  .sidebar{
    position:fixed; top:98px; left:0; height:calc(100vh - 98px); width:86%; max-width:320px;
    transform:translateX(-110%); transition:.25s ease; z-index:1001; border-radius:0 12px 12px 0;
  }
  .sidebar.open{ transform:translateX(0); }
  .card{flex:1}
  .tabs{padding:12px}
  .filters{padding:10px 12px}
  .table-wrap{padding:0 12px 6px}
}
@media (max-width: 768px){
  .subbar{font-size:12px; gap:12px}
  .title{font-size:16px}
  .filter-left{width:100%; order:2}
  .datebox{width:100%; order:1; justify-content:space-between}
  .datebox span{font-size:13px}
  .page{min-width:32px; padding:6px 10px}
  .news-grid{grid-template-columns:repeat(2, 1fr)}
  .footer-cols{grid-template-columns: 1fr 1fr}
}
@media (max-width: 480px){
  .brand div:last-child{font-size:18px}
  .news-grid{grid-template-columns:1fr}
  .footer-cols{grid-template-columns:1fr}
  .footer-brand .logo{width:48px; height:48px; font-size:22px}
}
/* ==== BỔ SUNG NHẸ, KHÔNG ĐỔI GIAO DIỆN HIỆN CÓ ==== */

/* Thêm biến thiếu (danger) để không lỗi khi inline style gọi var(--danger) */
:root{ --danger:#d93025; }

/* Chữ & khoảng cách trong bảng gọn hơn, vẫn theo palette của bạn */
thead th{
  position: sticky; top: 0; z-index: 1;
  font-size: 12px; letter-spacing:.2px;
}
tbody td{
  font-size: 13px; color: var(--text);
  line-height: 1.35;
}

/* Căn số đẹp theo ô số liệu */
.amount{ font-variant-numeric: tabular-nums; }

/* Nhãn trạng thái nổi bật nhưng không quá gắt */
.status-badge{ font-weight: 800; }

/* Txn ID + nút sao chép: gọn, đồng bộ màu thương hiệu */
.txn-cell{
  display: inline-flex; align-items: center; gap: 8px;
  justify-content: center; /* vì cột đang text-align:center */
}
.txn-id{
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 6px 8px; border-radius: 8px;
  border:1px solid var(--border); background: var(--thead);
  color:#1a5a95; /* tông xanh nhạt đọc dễ trên nền thead */
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px; letter-spacing:.2px;
}
.copy-btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; height:auto;
  border:1px solid var(--border); background:#fff; color:var(--jun-primary);
  border-radius:8px; cursor:pointer; font-weight:700; font-size:12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
}
.copy-btn:hover{
  border-color: var(--jun-primary);
  box-shadow: 0 0 0 3px rgba(45,183,245,.12);
}
.copy-btn:active{ transform: translateY(1px); }

/* Toast thông báo sao chép */
.toast{
  position: fixed; right: 16px; bottom: 16px;
  background:#ffffff; color: var(--text);
  border:1px solid var(--border); border-radius: 10px;
  padding:10px 12px; box-shadow: var(--shadow);
  font-size:13px; opacity:0; transform: translateY(12px);
  transition: all .22s ease; pointer-events: none; z-index: 2000;
}
.toast.show{ opacity:1; transform: translateY(0); }

/* Nút trong bộ lọc giữ nguyên style nhưng gọn margin khi màn nhỏ */
@media (max-width: 768px){
  .txn-id{ max-width: 52vw; }
}

/* Tiện ích ẩn bớt cột trên màn nhỏ cho bố cục “gọn” */
.hide-md{ /* dùng cho các cột muốn ẩn bớt trên tablet/điện thoại */
  /* mặc định hiện */
}
@media (max-width: 900px){
  .hide-md{ display: none !important; }
}
