/* Tài Chính Pro: xanh dầu thẫm + vàng đồng */
:root {
  --dau: #0b3b3c; --dau2: #12605f; --dau3: #1d7f7c; --dau-nhat: #e6f0ef;
  --dong: #c98a2b; --dong2: #e0a84b; --dong-nhat: #fbf1e1;
  --nen: #f3f5f4; --the: #ffffff; --chu: #13221f; --chu2: #5b6b68; --vien: #e1e7e5;
  --thu: #15803d; --thu-nhat: #e7f6ec; --chi: #c2410c; --chi-nhat: #fdeee6; --canh: #b45309;
  --bo: 14px; --bong: 0 1px 2px rgba(11, 59, 60, .06), 0 6px 18px rgba(11, 59, 60, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Be Vietnam Pro', system-ui, sans-serif; background: var(--nen); color: var(--chu); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--dau2); }
.man-cho { min-height: 100vh; display: grid; place-items: center; }
.vong { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--dau-nhat); border-top-color: var(--dau2); animation: xoay .8s linear infinite; }
@keyframes xoay { to { transform: rotate(360deg); } }

/* Khung */
.khung { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.ben { background: linear-gradient(180deg, var(--dau) 0%, #082c2d 100%); color: #dfeceb; padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.logo img { height: 30px; width: auto; }
.logo .tach { width: 1px; height: 26px; background: rgba(255,255,255,.2); }
.ten-app { padding: 0 8px 10px; }
.ten-app b { display: block; color: #fff; font-size: 18px; letter-spacing: .2px; }
.ten-app span { font-size: 12.5px; color: var(--dong2); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.muc { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #cfe1df; text-decoration: none; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; font-weight: 500; }
.muc svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.muc:hover { background: rgba(255,255,255,.06); color: #fff; }
.muc.dang { background: rgba(224, 168, 75, .16); color: #fff; box-shadow: inset 3px 0 0 var(--dong2); }
.muc.dang svg { color: var(--dong2); opacity: 1; }
.nhom-muc { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: #7fa3a0; padding: 12px 12px 4px; font-weight: 600; }
.ben .duoi { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.anh-tron { width: 34px; height: 34px; border-radius: 50%; background: var(--dong2); color: var(--dau); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.anh-tron img { width: 100%; height: 100%; object-fit: cover; }
.ben .duoi .ai { flex: 1; min-width: 0; font-size: 13px; }
.ben .duoi .ai b { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ben .duoi .ai span { color: #9dbbb8; }
.nut-thoat { background: none; border: 1px solid rgba(255,255,255,.18); color: #cfe1df; border-radius: 8px; padding: 6px 8px; cursor: pointer; flex: none; }
.nut-thoat svg { width: 17px; height: 17px; display: block; }

.chinh { padding: 26px 30px 60px; min-width: 0; }
.dau-trang { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dau-trang h1 { margin: 0; font-size: 26px; letter-spacing: -.3px; }
.dau-trang p { margin: 4px 0 0; color: var(--chu2); }
.cong-cu { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Thẻ */
.the { background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo); box-shadow: var(--bong); padding: 18px 20px; min-width: 0; }
.the h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.the h3 small { font-weight: 500; color: var(--chu2); font-size: 13px; }
.luoi { display: grid; gap: 16px; }
.luoi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.luoi-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.luoi-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.luoi-21 { grid-template-columns: 2fr 1fr; }
.mt { margin-top: 16px; }
.chi-so { position: relative; overflow: hidden; }
.chi-so .nhan { color: var(--chu2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chi-so .nhan i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--dau-nhat); color: var(--dau2); }
.chi-so .nhan i svg { width: 17px; height: 17px; }
.chi-so .so { font-size: 25px; font-weight: 800; margin-top: 10px; letter-spacing: -.4px; white-space: nowrap; }
.chi-so .phu { font-size: 12.5px; color: var(--chu2); margin-top: 2px; }
.chi-so.thu .nhan i { background: var(--thu-nhat); color: var(--thu); }
.chi-so.chi .nhan i { background: var(--chi-nhat); color: var(--chi); }
.chi-so.vang .nhan i { background: var(--dong-nhat); color: var(--dong); }
.chi-so.noi { background: linear-gradient(135deg, var(--dau) 0%, var(--dau2) 100%); color: #fff; border: 0; }
.chi-so.noi .nhan { color: #bcd8d5; }
.chi-so.noi .nhan i { background: rgba(255,255,255,.12); color: var(--dong2); }
.chi-so.noi .phu { color: #bcd8d5; }
.xanh { color: var(--thu); } .do { color: var(--chi); } .vang-chu { color: var(--canh); }

/* Nút, ô nhập */
.nut { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--vien); background: #fff; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.nut svg { width: 17px; height: 17px; }
.nut:hover { border-color: var(--dau3); }
.nut.chinh-n { background: var(--dau2); border-color: var(--dau2); color: #fff; }
.nut.chinh-n:hover { background: var(--dau); }
.nut.vang-n { background: var(--dong); border-color: var(--dong); color: #fff; }
.nut.nho { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.nut.xoa-n { color: var(--chi); }
.nut[disabled] { opacity: .5; cursor: not-allowed; }
.o { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.o label { font-size: 13px; font-weight: 600; color: var(--chu2); }
.o input, .o select, .o textarea, .chon { border: 1px solid var(--vien); border-radius: 10px; padding: 9px 12px; background: #fff; width: 100%; min-width: 0; }
.o input:focus, .o select:focus, .o textarea:focus, .chon:focus { outline: 2px solid rgba(29, 127, 124, .25); border-color: var(--dau3); }
.chon { width: auto; padding: 8px 12px; font-weight: 500; }
.hang-o { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.tien-o input { text-align: right; font-weight: 600; }
.goi-y { font-size: 12px; color: var(--chu2); }
.gat { display: inline-flex; background: var(--nen); border: 1px solid var(--vien); border-radius: 11px; padding: 3px; }
.gat button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--chu2); }
.gat button.dang { background: #fff; color: var(--chu); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.gat button.dang.thu { color: var(--thu); } .gat button.dang.chi { color: var(--chi); }

/* Bảng */
.bang-cuon { overflow-x: auto; margin: 0 -4px; }
table.bang { width: 100%; border-collapse: collapse; font-size: 14px; }
.bang th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--chu2); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--vien); white-space: nowrap; background: #fafbfb; }
.bang td { padding: 10px 10px; border-bottom: 1px solid #eef2f1; vertical-align: middle; }
.bang td.s, .bang th.s { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bang tr.tong td { font-weight: 700; background: var(--dau-nhat); }
.bang tr.tong-lon td { font-weight: 800; background: var(--dau); color: #fff; }
.bang tr.nhom-dau td { font-weight: 700; background: #f7f9f8; color: var(--dau2); }
.bang tbody tr:hover td { background: #fbfcfc; }
.bang tr.tong:hover td { background: var(--dau-nhat); }
.bang tr.tong-lon:hover td { background: var(--dau); }
.nhan-mau { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--dau-nhat); color: var(--dau2); white-space: nowrap; }
.nhan-mau.thu { background: var(--thu-nhat); color: var(--thu); }
.nhan-mau.chi { background: var(--chi-nhat); color: var(--chi); }
.nhan-mau.vang { background: var(--dong-nhat); color: var(--canh); }
.trong { text-align: center; padding: 34px 10px; color: var(--chu2); }
.trong svg { width: 40px; height: 40px; color: #b5c5c2; display: block; margin: 0 auto 8px; }
.thao-tac { display: flex; gap: 4px; justify-content: flex-end; }
.nut-i { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--chu2); }
.nut-i:hover { background: var(--nen); color: var(--chu); }
.nut-i svg { width: 17px; height: 17px; display: block; }

/* Bình luận, cảnh báo */
.bao { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.bao svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.bao.canh { background: var(--dong-nhat); color: #7a4310; }
.bao.tot { background: var(--thu-nhat); color: #14532d; }
.bao.loi { background: var(--chi-nhat); color: #7c2d12; }
.bao.tin { background: var(--dau-nhat); color: var(--dau); }

/* Hộp thoại */
.lop-phu { position: fixed; inset: 0; background: rgba(8, 30, 31, .45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: hien .15s ease; }
@keyframes hien { from { opacity: 0; } }
.hop { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.hop .dau { padding: 18px 20px 6px; display: flex; justify-content: space-between; align-items: center; }
.hop .dau h3 { margin: 0; font-size: 18px; }
.hop .than { padding: 10px 20px; display: grid; gap: 12px; }
.hop .chan { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--dau); color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 60; font-weight: 500; max-width: calc(100vw - 32px); }

/* Đăng nhập */
.dn { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.dn-trai { background: radial-gradient(1200px 500px at 0% 0%, #1d7f7c 0%, transparent 60%), linear-gradient(160deg, var(--dau) 0%, #061f20 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.dn-trai h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.8px; }
.dn-trai h1 em { font-style: normal; color: var(--dong2); }
.dn-trai p { color: #bcd8d5; max-width: 460px; font-size: 16px; }
.dn-diem { display: grid; gap: 12px; margin-top: 26px; }
.dn-diem div { display: flex; gap: 12px; align-items: center; color: #e6f0ef; }
.dn-diem i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: var(--dong2); flex: none; }
.dn-diem svg { width: 18px; height: 18px; }
.dn-phai { display: grid; place-items: center; padding: 32px; }
.dn-hop { width: min(380px, 100%); text-align: center; }
.dn-hop h2 { margin: 0 0 6px; }
.dn-hop p { color: var(--chu2); margin: 0 0 22px; }
.nut-gg { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: 12px; }
.nut-gg svg { width: 20px; height: 20px; }

/* Thanh trên di động */
.thanh-dd { display: none; }
@media (max-width: 1100px) { .luoi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .luoi-21 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .khung { grid-template-columns: 1fr; }
  .ben { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  .ben.mo { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .thanh-dd { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--dau); color: #fff; position: sticky; top: 0; z-index: 30; }
  .thanh-dd img { height: 24px; }
  .thanh-dd b { flex: 1; }
  .thanh-dd button { background: none; border: 0; color: #fff; padding: 6px; }
  .thanh-dd svg { width: 24px; height: 24px; }
  .chinh { padding: 18px 16px 50px; }
  .dau-trang h1 { font-size: 22px; }
  .luoi-3, .luoi-2 { grid-template-columns: 1fr; }
  .dn { grid-template-columns: 1fr; }
  .dn-trai { padding: 30px 22px; }
  .dn-trai h1 { font-size: 30px; }
  .chi-so .so { font-size: 21px; }
}
.bang-cuon .bang td:first-child { min-width: 170px; }
@media (max-width: 640px) { .bang-cuon table.bang { min-width: 560px; } .bang-cuon .bang td:first-child { min-width: 150px; } }
@media (max-width: 520px) { .luoi-4 { grid-template-columns: 1fr 1fr; gap: 10px; } .chi-so { padding: 14px; } .chi-so .so { font-size: 18px; } .bang { font-size: 13px; } }
.an-dd { } @media (max-width: 640px) { .an-dd { display: none; } }
canvas { max-width: 100%; }
.bieu-do { position: relative; height: 280px; }
.bieu-do.thap { height: 230px; }
