/* Giao diện skin (kiểu phần mềm cầm đồ cổ điển): thanh nút lớn ở trên, khung nhóm, thanh trạng thái dưới đáy.
   Chỉ đổi cách trình bày, không đổi chức năng. Bật bằng class "kieu-2gold" trên <body>; chỉ áp cho màn hình rộng.
   Màu mặc định là vàng kem + đỏ nâu. Chọn màu khác ở ô "Giao diện" (menu tài khoản) thì skin đổi theo màu đó. */
.thanh-trang-thai { display: none; }

  body.kieu-2gold {
    --sk-nen: #f4f0dd; --sk-the: #fbf9ee; --sk-thanh1: #fffbe2; --sk-thanh2: #f6dd86; --sk-vien: #b8963c; --sk-chu: #5a3d00; --sk-icon: #8a4b00;
    --sk-td1: #7d2323; --sk-td2: #4a1010; --sk-chon1: #ffe9a0; --sk-chon2: #f5cf63; --sk-hover: #fff3c0; --sk-dam: #6b0f0f;
    --sk-th1: #f9f3d3; --sk-th2: #e5d89a; --sk-luoi: #e3dcb8; --sk-ghi: #f6f1da;
    font: 13px/1.5 Tahoma, "Segoe UI", Arial, sans-serif; background: var(--sk-nen); padding-bottom: 30px;
  }
  /* Người dùng chọn màu khác (xanh lá, tím, đỏ rượu, cam nâu hoặc tự phối) thì skin lấy theo màu đó */
  :root[data-giao-dien] body.kieu-2gold {
    --sk-nen: color-mix(in srgb, var(--lam) 5%, #fff); --sk-the: color-mix(in srgb, var(--lam) 3%, #fff);
    --sk-thanh1: color-mix(in srgb, var(--lam) 6%, #fff); --sk-thanh2: color-mix(in srgb, var(--lam) 26%, #fff);
    --sk-vien: color-mix(in srgb, var(--lam) 60%, #fff); --sk-chu: color-mix(in srgb, var(--ben) 80%, #000); --sk-icon: var(--lam);
    --sk-td1: var(--ben); --sk-td2: var(--ben-dam); --sk-chon1: color-mix(in srgb, var(--lam) 22%, #fff); --sk-chon2: color-mix(in srgb, var(--lam) 45%, #fff);
    --sk-hover: color-mix(in srgb, var(--lam) 12%, #fff); --sk-dam: var(--lam);
    --sk-th1: color-mix(in srgb, var(--lam) 8%, #fff); --sk-th2: color-mix(in srgb, var(--lam) 22%, #fff);
    --sk-luoi: color-mix(in srgb, var(--lam) 14%, #fff); --sk-ghi: color-mix(in srgb, var(--lam) 5%, #fff);
  }
  body.kieu-2gold #ung-dung { flex-direction: column; }

  /* ---- Thanh nút lớn ở trên (thay thanh bên): mọi nút cùng cỡ, biểu tượng trên, chữ dưới, xếp đều hàng ---- */
  body.kieu-2gold .thanh-ben, body.kieu-2gold.thu-gon .thanh-ben { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; align-content: flex-start; gap: 5px; width: 100%; height: auto; max-height: none; overflow: visible; position: sticky; top: 0; z-index: 20;
    background: linear-gradient(var(--sk-thanh1), var(--sk-thanh2)); border-bottom: 2px solid var(--sk-vien); box-shadow: 0 1px 0 #fff inset; padding: 4px 8px; color: var(--sk-chu); }
  body.kieu-2gold .man-menu, body.kieu-2gold .dong-menu, body.kieu-2gold .thanh-ben .nhom, body.kieu-2gold .thanh-ben .chan, body.kieu-2gold .nut-dau[title="Ẩn hiện thanh bên"] { display: none; }
  body.kieu-2gold .thanh-ben .ten-tiem { order: 0; width: 116px; height: 50px; min-height: 0; padding: 0 10px 0 4px; justify-content: center; }
  body.kieu-2gold .thanh-ben .ten-tiem img, body.kieu-2gold .thanh-ben .ten-tiem svg { max-height: 40px; max-width: 100%; width: auto; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem), body.kieu-2gold .thanh-ben .cha { order: 1; flex-direction: column; justify-content: center; align-items: center; gap: 3px; width: 88px; height: auto; min-height: 56px; margin: 0; padding: 4px 4px; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center;
    color: var(--sk-chu); background: linear-gradient(#fff, color-mix(in srgb, var(--sk-thanh1) 55%, #fff)); border: 1px solid var(--sk-vien); border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); transition: transform .12s, box-shadow .12s, background .12s; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem) span, body.kieu-2gold .thanh-ben .cha span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem):hover, body.kieu-2gold .thanh-ben .cha:hover { background: linear-gradient(#fff, var(--sk-hover)); border-color: var(--sk-icon); color: var(--sk-chu); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, .2); }
  body.kieu-2gold .thanh-ben a.chon, body.kieu-2gold .thanh-ben .cha.mo { background: linear-gradient(var(--sk-chon1), var(--sk-chon2)); border-color: var(--sk-icon); color: var(--sk-chu); box-shadow: 0 0 0 2px var(--sk-icon) inset, 0 1px 2px rgba(0, 0, 0, .2); }
  body.kieu-2gold .thanh-ben svg.bt, body.kieu-2gold .thanh-ben a:hover svg, body.kieu-2gold .thanh-ben .cha:hover svg, body.kieu-2gold .thanh-ben a.chon svg, body.kieu-2gold .thanh-ben .cha.mo svg { width: 22px; height: 22px; color: var(--sk-icon); stroke-width: 1.7; flex: none; }
  body.kieu-2gold .thanh-ben .cha::after { display: none; }
  /* Nhóm con mở ra thành một hàng nút nhỏ ngay dưới thanh nút chính */
  body.kieu-2gold .thanh-ben .con { order: 2; flex-basis: 100%; display: none; padding: 3px 8px; background: color-mix(in srgb, var(--sk-thanh1) 70%, #fff); border-top: 1px solid var(--sk-vien); border-radius: 0 0 4px 4px; }
  body.kieu-2gold .thanh-ben .cha.mo + .con { display: flex; flex-wrap: wrap; gap: 4px; }
  body.kieu-2gold .thanh-ben .con a { order: 0; flex-direction: row; justify-content: center; width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 3px 10px; white-space: nowrap; border: 1px solid var(--sk-vien); border-radius: 4px; background: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.3; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }

  /* ---- Thanh tiêu đề (đầu trang) ---- */
  body.kieu-2gold .dau-trang { position: static; height: 36px; background: linear-gradient(var(--sk-td1), var(--sk-td2)); box-shadow: none; padding: 0 10px; gap: 2px; color: #fff; }
  body.kieu-2gold .nut-dau { height: 36px; color: #fff; padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: 3px; }
  body.kieu-2gold .nut-dau:hover { color: #fff; background: rgba(255, 255, 255, .14); }
  body.kieu-2gold .nut-dau.chinh { color: #fff; font-weight: 700; }
  body.kieu-2gold .nut-dau svg.bt, body.kieu-2gold .nut-dau.bao svg.bt { width: 18px; height: 18px; color: #fff; }
  body.kieu-2gold .nut-dau .so { top: 3px; left: 17px; }

  /* ---- Nội dung ---- */
  body.kieu-2gold main#noi-dung { background: var(--sk-nen); padding: 12px 16px; }
  body.kieu-2gold .tieu-de h2, body.kieu-2gold #noi-dung > h2 { font-size: 16px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--sk-dam); }
  body.kieu-2gold .the { border-radius: 0; border: 1px solid var(--sk-vien); background: var(--sk-the); box-shadow: none; padding: 12px 14px; }
  body.kieu-2gold .the > h3 { font-size: 13px; color: var(--sk-dam); margin: -12px -14px 12px; padding: 5px 14px; background: linear-gradient(var(--sk-th1), var(--sk-th2)); border-bottom: 1px solid var(--sk-vien); }
  body.kieu-2gold label { color: var(--sk-chu); font-weight: 600; }
  body.kieu-2gold input, body.kieu-2gold select, body.kieu-2gold textarea { border-radius: 2px; border: 1px solid #7f9db9; padding: 4px 8px; background: #fff; font: inherit; }
  body.kieu-2gold input:focus, body.kieu-2gold select:focus, body.kieu-2gold textarea:focus { outline: 2px solid var(--sk-chon2); border-color: var(--sk-vien); }
  body.kieu-2gold .nut { border-radius: 3px; border: 1px solid #707070; background: linear-gradient(#fff, #e4e0cc); color: #222; padding: 5px 14px; font-weight: 600; box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; }
  body.kieu-2gold .nut:hover { filter: none; border-color: var(--sk-vien); background: linear-gradient(#fff, var(--sk-hover)); }
  body.kieu-2gold .nut.xanh, body.kieu-2gold .nut.lam { background: linear-gradient(var(--sk-chon1), var(--sk-chon2)); border-color: var(--sk-vien); color: var(--sk-chu); }
  body.kieu-2gold .nut.do { background: linear-gradient(#ffdada, #e58a8a); border-color: #8a2a2a; color: #4a0000; }
  body.kieu-2gold .nut.vien { background: linear-gradient(#fff, #e4e0cc); border-color: #707070; color: #222; }
  body.kieu-2gold .nut.nho { padding: 3px 10px; }
  body.kieu-2gold th { background: linear-gradient(var(--sk-th1), var(--sk-th2)); color: var(--sk-dam); border: 1px solid var(--sk-vien); padding: 6px 8px; font-weight: 700; }
  body.kieu-2gold td { border: 1px solid var(--sk-luoi); padding: 5px 8px; }
  body.kieu-2gold tbody tr:nth-child(even) td { background: var(--sk-ghi); }
  body.kieu-2gold tbody tr:hover td { background: var(--sk-hover); }
  body.kieu-2gold td.dinh-phai { background: var(--sk-the); }

  /* ---- Trang Cầm đồ: hàng mã HĐ + khung nhập hợp đồng ngay đầu trang ---- */
  body.kieu-2gold .hang-ma-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; padding: 8px 14px; margin-bottom: 10px; }
  body.kieu-2gold .hang-ma-hd > b { color: var(--sk-dam); font-size: 13px; }
  body.kieu-2gold .hang-ma-hd .tinh-nang { display: inline-flex; gap: 4px; }
  body.kieu-2gold .hang-ma-hd .nut.chon { background: linear-gradient(var(--sk-chon1), var(--sk-chon2)); border-color: var(--sk-vien); font-weight: 700; box-shadow: 0 0 0 1px var(--sk-vien) inset; }
  body.kieu-2gold .kq-ma-hd { flex-basis: 100%; }
  body.kieu-2gold .kq-ma-hd .dong-kq { padding: 5px 10px; border: 1px solid var(--sk-luoi); border-top: 0; background: #fff; cursor: pointer; }
  body.kieu-2gold .kq-ma-hd .dong-kq:first-child { border-top: 1px solid var(--sk-luoi); }
  body.kieu-2gold .kq-ma-hd .dong-kq:hover { background: var(--sk-hover); }
  body.kieu-2gold .kq-ma-hd .dong-kq.trong { color: #868e96; cursor: default; }
  body.kieu-2gold .hop-nhung { border: 1px solid var(--sk-vien); background: var(--sk-the); margin-bottom: 14px; }
  body.kieu-2gold .hop-nhung > h3 { font-size: 13px; color: var(--sk-dam); padding: 5px 14px; background: linear-gradient(var(--sk-th1), var(--sk-th2)); border-bottom: 1px solid var(--sk-vien); }
  body.kieu-2gold .hop-nhung > .ruot { padding: 10px 14px; }
  body.kieu-2gold .hop-nhung .muc { color: var(--sk-dam); border-bottom: 1px solid var(--sk-vien); }

  /* ---- Thanh trạng thái dưới đáy ---- */
  body.kieu-2gold .thanh-trang-thai { display: flex; align-items: center; gap: 0; position: fixed; left: 0; right: 0; bottom: 0; height: 28px; z-index: 30;
    background: linear-gradient(var(--sk-thanh1), var(--sk-thanh2)); border-top: 1px solid var(--sk-vien); font-size: 12.5px; color: var(--sk-chu); }
  body.kieu-2gold .thanh-trang-thai span { padding: 0 14px; line-height: 28px; border-right: 1px solid var(--sk-vien); white-space: nowrap; }
  body.kieu-2gold .thanh-trang-thai span:first-child { font-weight: 700; color: var(--sk-dam); }
  body.kieu-2gold .thanh-trang-thai .gian { flex: 1; border-right: 0; }

/* ---- Điện thoại: giữ nguyên bố cục skin như máy tính, thanh nút cuộn ngang, nhóm con hiện thành hàng cuộn ngang bên dưới ---- */
@media (max-width: 900px) {
  body.kieu-2gold { padding-bottom: 34px; }
  body.kieu-2gold .thanh-ben, body.kieu-2gold.thu-gon .thanh-ben { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 5px; padding: 4px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  body.kieu-2gold .thanh-ben::-webkit-scrollbar { display: none; }
  body.kieu-2gold .thanh-ben .ten-tiem { flex: none; width: 76px; height: 50px; padding: 0 6px 0 2px; }
  body.kieu-2gold .thanh-ben .ten-tiem img, body.kieu-2gold .thanh-ben .ten-tiem svg { max-height: 40px; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem), body.kieu-2gold .thanh-ben .cha { flex: none; width: 76px; height: auto; min-height: 50px; font-size: 10.5px; padding: 3px 2px; gap: 2px; }
  body.kieu-2gold .thanh-ben svg.bt, body.kieu-2gold .thanh-ben a:hover svg, body.kieu-2gold .thanh-ben .cha:hover svg, body.kieu-2gold .thanh-ben a.chon svg, body.kieu-2gold .thanh-ben .cha.mo svg { width: 20px; height: 20px; }
  /* Nhóm con: thanh ngang cố định ngay dưới thanh nút chính */
  body.kieu-2gold .thanh-ben .cha.mo + .con { position: fixed; left: 0; right: 0; top: var(--sk-tb, 72px); z-index: 25; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 6px 8px; box-shadow: 0 6px 12px rgba(0, 0, 0, .2); border-bottom: 1px solid var(--sk-vien); background: var(--sk-thanh1); }
  body.kieu-2gold .thanh-ben .con a { flex: none; min-width: 0; padding: 6px 14px; white-space: nowrap; height: auto; width: auto; flex-direction: row; font-size: 12px; }
  body.kieu-2gold .dau-trang { height: 38px; padding: 0 4px; }
  body.kieu-2gold .nut-dau { height: 38px; padding: 0 8px; }
  body.kieu-2gold main#noi-dung { padding: 10px 10px; }
  body.kieu-2gold .hang-ma-hd { padding: 8px 10px; }
  body.kieu-2gold .hang-ma-hd #o-ma-hd { flex: 1 1 100%; width: 100%; }
  body.kieu-2gold .hang-ma-hd .tinh-nang { flex-wrap: wrap; width: 100%; }
  body.kieu-2gold .hang-ma-hd .tinh-nang .nut { flex: 1 1 40%; }
  body.kieu-2gold .hop-nhung > .ruot { padding: 8px 10px; }
  body.kieu-2gold .thanh-trang-thai span { padding: 0 8px; }
  body.kieu-2gold .thanh-trang-thai span:not(:first-child):not(:last-child) { display: none; }
  body.kieu-2gold .thanh-trang-thai .gian { display: block; }
}

/* Ô tính năng con (trong Cài đặt chung, Báo cáo, Quản lý nhân viên...): ô đang chọn tô đậm, đưa chuột vào thì nổi lên */
body.kieu-2gold .thanh-ben .con a:hover { background: linear-gradient(#fff, var(--sk-hover)); border-color: var(--sk-icon); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, .2); }
body.kieu-2gold .thanh-ben .con a.chon, body.kieu-2gold .thanh-ben .con a.chon:hover { background: linear-gradient(var(--sk-chon1), var(--sk-chon2)); border-color: var(--sk-icon); color: var(--sk-chu); font-weight: 700; box-shadow: 0 0 0 2px var(--sk-icon) inset, 0 1px 2px rgba(0, 0, 0, .2); transform: none; }
body.kieu-2gold .thanh-ben .con a.chon::before { content: '✓'; margin-right: 6px; font-weight: 700; color: var(--sk-icon); }

/* ---- Máy tính: tên cửa hàng, thông báo, tài khoản nằm ở góc trên bên phải, cùng hàng với các ô tính năng ---- */
@media (min-width: 901px) {
  body.kieu-2gold #ung-dung { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; align-content: start; }
  body.kieu-2gold .than { display: contents; }
  body.kieu-2gold .thanh-dung-thu { grid-column: 1 / -1; grid-row: 1; }
  body.kieu-2gold .thanh-ben, body.kieu-2gold.thu-gon .thanh-ben { grid-column: 1; grid-row: 2; position: static; }
  body.kieu-2gold .dau-trang { grid-column: 2; grid-row: 2; align-self: stretch; position: static; height: auto; width: max-content; max-width: 640px; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; align-content: flex-start; padding: 6px 10px 4px 4px; gap: 2px;
    background: linear-gradient(var(--sk-thanh1), var(--sk-thanh2)); border-bottom: 2px solid var(--sk-vien); box-shadow: 0 1px 0 #fff inset; color: var(--sk-chu); }
  body.kieu-2gold .dau-trang .gian { display: none; }
  body.kieu-2gold .nut-dau { height: 34px; color: var(--sk-chu); font-weight: 600; }
  body.kieu-2gold .nut-dau:hover { color: var(--sk-chu); background: rgba(0, 0, 0, .07); }
  body.kieu-2gold .nut-dau.chinh { color: var(--sk-chu); }
  body.kieu-2gold .nut-dau svg.bt, body.kieu-2gold .nut-dau.bao svg.bt { color: var(--sk-icon); }
  body.kieu-2gold main#noi-dung { grid-column: 1 / -1; grid-row: 3; }
}

/* ---- Màn hình từ 1250px: tất cả ô tính năng nằm trên MỘT hàng (ô tự co lại cho vừa), nhóm con hiện đè bên dưới, không đẩy nội dung xuống ---- */
@media (min-width: 1250px) {
  body.kieu-2gold .thanh-ben, body.kieu-2gold.thu-gon .thanh-ben { flex-wrap: nowrap; position: relative; gap: 4px; align-items: stretch; }
  body.kieu-2gold .thanh-ben .ten-tiem { flex: none; width: 92px; height: auto; padding: 0 6px 0 2px; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem), body.kieu-2gold .thanh-ben .cha { flex: 1 1 0; width: auto; min-width: 0; max-width: 96px; font-size: 10.5px; padding: 4px 2px; }
  body.kieu-2gold .thanh-ben a:not(.ten-tiem) span, body.kieu-2gold .thanh-ben .cha span { -webkit-line-clamp: 4; overflow-wrap: anywhere; }
  body.kieu-2gold .thanh-ben .cha.mo + .con { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; flex-basis: auto; padding: 4px 8px; background: var(--sk-thanh1); border: 1px solid var(--sk-vien); border-top: 0; box-shadow: 0 8px 14px rgba(0, 0, 0, .25); }
  body.kieu-2gold .thanh-ben .con a { flex: none; width: auto; max-width: none; font-size: 11.5px; padding: 3px 10px; }
  body.kieu-2gold .nut-dau.chinh span { max-width: 120px; }
  body.kieu-2gold .dau-trang .nut-dau[title^="Danh sách khách bị báo xấu"] { font-size: 0; padding: 0 8px; }
}

/* ---- Tắt hiệu ứng cho nhẹ máy (nút gạt "Hiệu ứng" trong khung Giao diện): bỏ chuyển động, kính mờ, bóng đổ, bộ lọc màu, nhấc nút khi rê chuột/bấm.
   Đặt trong @layer: khai báo !important trong layer luôn thắng mọi !important ngoài layer, dù bộ chọn kia mạnh tới đâu.
   Để ở tệp này vì tệp này luôn được nạp ở mọi phong cách. Chính nút gạt (.cong-tac) được chừa ra để vẫn trượt mượt. ---- */
.chon-hieu-ung > label { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; }
@layer tat-hieu-ung {
  body.tat-hieu-ung, body.tat-hieu-ung :not(.cong-tac), body.tat-hieu-ung :not(.cong-tac)::before, body.tat-hieu-ung :not(.cong-tac)::after {
    animation: none !important;
    transition: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    scroll-behavior: auto !important;
  }
  /* Bộ lọc màu, đổ bóng biểu tượng. Chừa ảnh Zalo lỗi (màu xám để báo lỗi) và khung xem ảnh. */
  body.tat-hieu-ung :not(.cong-tac, .zalo-loi img, #xem-anh, #xem-anh *) { filter: none !important; }
  /* Nhấc nút, phóng to khi rê chuột hoặc bấm. Chừa các phần tử dùng transform để căn giữa (nút xem mật khẩu, báo bản mới, nút bên cạnh, nút giao diện, ô số) và khung xem ảnh (xoay, phóng). */
  body.tat-hieu-ung :is(:hover, :active):not(.cong-tac, .mat-xem, #bao-ban-moi, .ben-canh, .nut-giao-dien, .o-so .tron, #xem-anh, #xem-anh *) { transform: none !important; }
  html:has(body.tat-hieu-ung) { scroll-behavior: auto !important; }
}
