/* Trang mua, tra cứu (mẫu Quầy Thanh Toán, Quét Mã) và quản trị (mẫu Sổ Cái). Dùng biến màu ở site.css. */

/* ---------- ô nhập ---------- */
.o { display: grid; gap: 7px; font-size: 14px; font-weight: 700; color: var(--muc-2); }
.o i { font-style: normal; font-weight: 500; color: var(--muc-mo); }
.o input, .o select, .tao-key input, .tao-key select, .tim input {
  height: 48px; padding: 0 14px; border-radius: var(--r-nho); border: 1px solid var(--vach-dam);
  background: #fff; font-size: 16px; font-weight: 500; color: var(--muc); transition: border-color .2s, box-shadow .2s;
}
.o input::placeholder, .tim input::placeholder, .tao-key input::placeholder { color: #8d8f99; }
.o input:focus, .tim input:focus, .tao-key input:focus, .tao-key select:focus { outline: 0; border-color: var(--dong); box-shadow: 0 0 0 3px rgba(180, 83, 42, .16); }
.luoi-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.luoi-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.loi { color: var(--xau); background: var(--xau-nhat); border-radius: var(--r-nho); padding: 10px 14px; font-size: 15px; font-weight: 600; }
.ghi-nho { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muc-2); margin: 18px 0 0; }
.ghi-nho svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--muc-mo); }
.lui { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muc-mo); text-decoration: none; margin-bottom: 20px; }
.lui svg { width: 16px; height: 16px; }
.lui:hover { color: var(--muc); }

/* ---------- quầy thanh toán ---------- */
.quay { padding: 48px 0 96px; }
.quay h1 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 24px; font-weight: 800; }
.quay-luoi { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.phieu { background: var(--giay); border: 1px solid var(--vach); border-radius: 18px; padding: 36px 40px 40px; box-shadow: var(--bong); }
.buoc { list-style: none; padding: 0; margin: 0 0 32px; display: flex; gap: 0; counter-reset: b; }
.buoc li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muc-mo); position: relative; }
.buoc li:not(:last-child)::after { content: ''; flex: 1; height: 1px; background: var(--vach-dam); margin: 0 12px; }
.buoc .so { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--vach-dam); font-size: 13px; background: #fff; }
.buoc .so svg { width: 14px; height: 14px; }
.buoc .dang { color: var(--muc); }
.buoc .dang .so { background: var(--dong); border-color: var(--dong); color: #fff; }
.buoc .xong .so { background: var(--tot-nhat); border-color: transparent; color: var(--tot); }
.chon-goi { border: 0; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chon-goi legend { font-size: 14px; font-weight: 700; color: var(--muc-2); margin-bottom: 10px; padding: 0; }
.o-goi { position: relative; display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--vach-dam); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.o-goi input { position: absolute; opacity: 0; }
.o-goi:hover { border-color: var(--muc-mo); }
.o-goi:has(input:checked) { border-color: var(--dong); background: #fffaf6; box-shadow: 0 0 0 3px rgba(180, 83, 42, .14); }
.o-goi:has(input:focus-visible) { outline: 2px solid var(--dong); outline-offset: 2px; }
.o-ten { font-weight: 800; }
.o-gia { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.o-han { font-size: 13.5px; color: var(--muc-mo); }
.mau-don { display: grid; gap: 22px; }
.mau-don .nut { justify-self: start; }
.tom-don { position: sticky; top: 92px; background: var(--giay); border: 1px solid var(--vach); border-radius: 18px; padding: 28px; box-shadow: var(--bong); }
.tom-don h2 { font-size: 19px; margin: 0 0 14px; }
.dong-don { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--vach); font-size: 15.5px; }
.dong-don span { color: var(--muc-mo); }
.dong-don.tong { border-top: 1px solid var(--muc); margin-top: 6px; padding-top: 16px; }
.dong-don.tong b { font-size: 28px; letter-spacing: -.02em; }

/* ---------- quét mã ---------- */
.dong-ck-nhom { border-top: 1px solid var(--vach); }
.dong-ck { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--vach); }
.dong-ck span { display: block; font-size: 13px; font-weight: 700; color: var(--muc-mo); }
.dong-ck b { font-size: 18px; word-break: break-all; }
.the-qr { background: #fff; border: 1px solid var(--vach); border-radius: 22px; padding: 26px; box-shadow: var(--bong-lon); text-align: center; position: sticky; top: 92px; }
.qr-dau { display: flex; justify-content: space-between; align-items: flex-start; text-align: left; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 2px solid var(--tot); }
.qr-dau span { font-size: 13px; font-weight: 700; color: var(--muc-mo); }
.qr-dau b { display: block; font-size: 30px; letter-spacing: -.02em; }
.the-qr img { width: 100%; max-width: 300px; height: auto; margin: 0 auto 10px; border-radius: 12px; border: 1px solid var(--vach); }
.qr-ghi { font-size: 14px; color: var(--muc-2); margin: 10px 0 16px; }
.bao-ok { display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--tot-nhat); color: var(--tot); font-weight: 700; border-radius: 12px; padding: 14px; margin: 0; }
.bao-ok svg { width: 18px; height: 18px; }

/* ---------- tra cứu ---------- */
.hep { max-width: 760px; }
.tab { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--nen-2); margin-bottom: 18px; }
.tab button { border: 0; background: none; height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muc-2); cursor: pointer; }
.tab button[aria-selected="true"] { background: var(--giay); color: var(--muc); box-shadow: 0 1px 3px rgba(27, 34, 54, .14); }
.tim { display: flex; gap: 10px; margin-bottom: 22px; }
.tim input { flex: 1; min-width: 0; height: 54px; font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.tim .nut { height: 54px; }
.ket { background: var(--giay); border: 1px solid var(--vach); border-radius: 18px; box-shadow: var(--bong); overflow: hidden; }
.ket-dau { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--vach); }
.ket-dau span:first-child, .ket-luoi span, .ket-key > span { display: block; font-size: 13px; font-weight: 700; color: var(--muc-mo); }
.ket-dau b { font-size: 22px; }
.ket-luoi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ket-luoi > div { padding: 18px 26px; border-left: 1px solid var(--vach); }
.ket-luoi > div:first-child { border-left: 0; }
.ket > .ghi-nho { margin: 0; padding: 18px 26px; border-top: 1px solid var(--vach); }
.ket-key { padding: 24px 26px 28px; border-top: 1px solid var(--vach); background: #fff; }
.key-dong { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 16px; }
.key-dong b { font-size: 24px; letter-spacing: .03em; }
.ket-key ol { margin: 0 0 22px; padding-left: 20px; color: var(--muc-2); display: grid; gap: 6px; }

/* ---------- quản trị: sổ cái ---------- */
.qt { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.qt-ray { background: var(--navy); color: var(--navy-chu); padding: 26px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.qt-ray .logo { color: #fff; padding: 0 10px; }
.qt-phu { font-size: 13px; color: var(--navy-mo); padding: 2px 10px 22px; }
.qt-ray nav { display: grid; gap: 4px; }
.qt-ray nav button, .qt-thoat { display: flex; justify-content: space-between; align-items: center; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--navy-chu); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; }
.qt-ray nav button:hover, .qt-thoat:hover { background: var(--navy-2); }
.qt-ray nav button.on { background: var(--giay); color: var(--muc); }
.dem-so:not(:empty) { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--dong); color: #fff; font-size: 12px; display: grid; place-items: center; }
.qt-thoat { margin-top: auto; color: var(--navy-mo); }
.qt-than { padding: 32px 40px 60px; min-width: 0; }
.qt-tong { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--giay); border: 1px solid var(--vach); border-radius: var(--r); margin-bottom: 30px; }
.qt-o { padding: 18px 22px; border-left: 1px solid var(--vach); display: grid; gap: 2px; }
.qt-o:first-child { border-left: 0; }
.qt-o span { font-size: 13px; font-weight: 700; color: var(--muc-mo); }
.qt-o b { font-size: 26px; letter-spacing: -.02em; }
.qt-o small { font-size: 13px; color: var(--muc-mo); }
.qt-dau { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.qt-dau h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.loc { display: flex; gap: 6px; flex-wrap: wrap; }
.loc button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--vach-dam); background: transparent; font-weight: 700; font-size: 13.5px; color: var(--muc-2); cursor: pointer; }
.loc button.on { background: var(--muc); border-color: var(--muc); color: #fff; }
.qt-bang { background: var(--giay); border: 1px solid var(--vach); border-radius: var(--r); overflow-x: auto; }
.qt-bang table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.qt-bang th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muc-mo); padding: 12px 16px; background: var(--nen); border-bottom: 1px solid var(--vach); white-space: nowrap; }
.qt-bang td { padding: 14px 16px; border-bottom: 1px solid var(--vach); vertical-align: top; }
.qt-bang tr:last-child td { border-bottom: 0; }
.qt-bang tbody tr:hover { background: #fff; }
.qt-bang small { display: block; color: var(--muc-mo); font-size: 13px; margin-top: 2px; }
.qt-bang .r { text-align: right; white-space: nowrap; }
.qt-bang .dam { font-weight: 800; white-space: nowrap; }
.chep-key { border: 0; background: none; padding: 0; font-weight: 800; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.chep-key svg { width: 13px; height: 13px; color: var(--muc-mo); }
.qt-trong { padding: 48px; text-align: center; color: var(--muc-mo); background: var(--giay); border: 1px dashed var(--vach-dam); border-radius: var(--r); }
.tao-key { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; margin-bottom: 18px; }
.tao-key .nut { height: 48px; }
.qt-cai { display: grid; gap: 18px; max-width: 900px; background: var(--giay); border: 1px solid var(--vach); border-radius: var(--r); padding: 28px 30px; }
.qt-cai h2 { font-size: 17px; margin: 10px 0 -4px; }
.qt-cai .nut { justify-self: start; }
.bao-nhanh { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--muc); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: var(--bong-lon); transition: opacity .3s, transform .4s var(--vao); pointer-events: none; }
.bao-nhanh.hien { opacity: 1; transform: translate(-50%, 0); }
.qt-vao { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.the-vao { width: min(420px, 100%); background: var(--giay); border: 1px solid var(--vach); border-radius: 20px; padding: 34px; box-shadow: var(--bong-lon); display: grid; gap: 16px; }
.the-vao h1 { font-size: 24px; margin: 8px 0 4px; }

@media (max-width: 960px) {
  .quay-luoi { grid-template-columns: minmax(0, 1fr); }
  .tom-don, .the-qr { position: static; }
  .phieu { padding: 26px 22px 30px; }
  .chon-goi, .luoi-2, .luoi-3, .tao-key { grid-template-columns: minmax(0, 1fr); }
  .ket-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ket-luoi > div:nth-child(3) { border-left: 0; }
  .ket-luoi > div:nth-child(n+3) { border-top: 1px solid var(--vach); }
  .qt { grid-template-columns: minmax(0, 1fr); }
  .qt-ray { position: static; height: auto; }
  .qt-ray nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt-thoat { margin-top: 6px; }
  .qt-tong { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt-o:nth-child(3) { border-left: 0; }
  .qt-o:nth-child(n+3) { border-top: 1px solid var(--vach); }
  .qt-than { padding: 24px 16px 48px; }
  .buoc li { font-size: 12.5px; }
}
.quay { min-height: calc(100vh - 190px); }
