/* SM Gold System v271 - Responsif Admin & Manager HQ (mobile / tablet / desktop)
 * Dimuat TERAKHIR dalam index.html. Hanya menyentuh .adm-shell (Admin & Manager).
 * Mobile  : <= 760px   -> bottom nav, jadual ringkas + popup butiran, kad 2 lajur
 * Tablet  : 761-1000px -> bottom nav, jadual 6 lajur + popup, kad 2-3 lajur
 * Desktop : >= 1001px  -> tiada perubahan susun atur (sidebar sedia ada)
 */

/* ---------- Bar navigasi bawah (dibina oleh sm-responsive.js) ---------- */
.sm-bn{display:none}
@media(max-width:1000px){
  body.sm-has-adm{overflow-x:clip}
  body.sm-has-adm .sm-bn{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:58;
    height:calc(64px + env(safe-area-inset-bottom,0px));padding:0 max(6px,env(safe-area-inset-left,0px)) env(safe-area-inset-bottom,0px);
    background:#fff;border-top:1px solid #dce6f2;box-shadow:0 -6px 22px #001f4518;
  }
  .sm-bn>a,.sm-bn>button{
    flex:1 1 0;min-width:0;height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    background:none;border:0;border-radius:0;padding:0 2px;color:#607089;font-weight:600;font-size:.68rem;line-height:1.1;font-family:inherit;
    text-decoration:none;position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent
  }
  .sm-bn svg{width:23px;height:23px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .sm-bn span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sm-bn .on{color:#001f45;font-weight:800}
  .sm-bn .on svg{color:#d99a00;stroke-width:2.2}
  .sm-bn .on:before{content:"";position:absolute;top:0;left:22%;right:22%;height:3px;border-radius:0 0 4px 4px;background:#f5b800}
  .sm-bn em{position:absolute;top:7px;left:calc(50% + 7px);background:#d99a00;color:#fff;font-style:normal;font-size:.62rem;font-weight:800;border-radius:99px;min-width:17px;height:17px;line-height:17px;padding:0 4px;text-align:center;box-shadow:0 0 0 2px #fff}
  .sm-bn>*:active{background:#f3f6fb}
  @media(min-width:761px){.sm-bn{justify-content:center;gap:6px}.sm-bn>a,.sm-bn>button{flex:0 1 140px;flex-direction:row;gap:8px;font-size:.8rem}}

  /* ruang untuk bar bawah */
  body.sm-has-adm .adm-shell{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
  body.sm-has-adm .adm-side{bottom:calc(64px + env(safe-area-inset-bottom,0px));width:min(86vw,320px)}
  body.sm-has-adm .adm-scrim{bottom:calc(64px + env(safe-area-inset-bottom,0px))}
  body.sm-has-adm #sm-support{bottom:calc(74px + env(safe-area-inset-bottom,0px))!important}
  body.sm-has-adm .adm-alerts{top:calc(var(--hd,60px) + 6px);right:8px}
}
@media print{.sm-bn,.sm-sheet,.sm-sheet-bg{display:none!important}}

/* ---------- Header ---------- */
@media(max-width:1000px){
  .adm-shell .adm-top{gap:8px;padding:0 10px}
  .adm-shell .adm-ico{width:42px;height:42px;border-radius:12px}
  .adm-shell .adm-brand{flex:1 1 auto;min-width:0;gap:10px}
  .adm-shell .adm-brand>div,.adm-shell .adm-brand>span{min-width:0}
  .adm-shell .adm-brand b{font-size:.92rem;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .adm-shell .adm-brand small{max-width:100%}
  .adm-shell .adm-logo,.adm-shell .adm-brand i{width:38px;height:38px}
  .adm-shell .adm-u{padding:3px;border-radius:12px;min-height:42px}
  .adm-shell .adm-dd{position:fixed;right:8px;top:calc(var(--hd,60px) + 6px);width:min(300px,calc(100vw - 16px))}
  .adm-shell .adm-dd button{min-height:46px;font-size:.92rem}
}
/* pemilih cawangan Manager: dahulu disembunyi <=560px -> jadikan bar kedua */
@media(max-width:560px){
  .adm-shell .adm-br{display:flex!important;position:fixed;top:var(--hd,60px);left:0;right:0;z-index:39;height:50px;
    padding:0 12px;background:#002d62;border-bottom:1px solid #1f4e8c;gap:10px;align-items:center}
  .adm-shell .adm-br span{display:inline!important;flex:none}
  .adm-shell .adm-br select{flex:1;width:auto;min-width:0;min-height:40px;font-size:16px}
  .adm-shell:has(.adm-br) .adm-main{padding-top:50px}
  .adm-shell:has(.adm-br) .adm-side{top:calc(var(--hd,60px) + 0px)}
}

/* ---------- Drawer menu: sasaran sentuh ---------- */
@media(max-width:1000px){
  .adm-shell .adm-link,.adm-shell .adm-gh{min-height:46px;font-size:.95rem}
  .adm-shell .adm-link.sub{min-height:44px;font-size:.92rem}
  .adm-shell .adm-foot .adm-link,.adm-shell .adm-foot button{min-height:46px}
}

/* ---------- Kandungan: jarak & tajuk ---------- */
@media(max-width:760px){
  .adm-shell .adm-content .page{padding:10px 12px 28px}
  .adm-shell .adm-crumb{padding:10px 12px 0;font-size:.74rem}
  .adm-shell .adm-content .page-head{flex-wrap:wrap;gap:10px;padding-bottom:12px;margin-bottom:14px}
  .adm-shell .adm-content .page-head h1{font-size:1.32rem;line-height:1.2}
  .adm-shell .adm-content .page-head p{font-size:.84rem}
  .adm-shell .adm-content .page-head>div:not(:first-child),.adm-shell .adm-content .page-head .row{display:flex;flex-wrap:wrap;gap:8px;width:100%;margin:0}
  .adm-shell .adm-content .page-head .btn,.adm-shell .adm-content .page-head .tbl-exp{flex:1 1 calc(50% - 8px);min-width:0}
  .adm-shell .adm-content .page-head .tbl-exp>.btn{width:100%}
  .adm-shell .adm-content .panel{padding:12px}
  .adm-shell .adm-content .panel>h3{font-size:.98rem}
}

/* ---------- Butang & input: saiz sesuai sentuh ---------- */
@media(max-width:1000px),(pointer:coarse){
  .adm-shell .btn,.adm-shell button.btn,.adm-shell a.btn{min-height:44px;padding:0 16px;font-size:.92rem;line-height:1.2;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:11px}
  .adm-shell .btn.sm,.adm-shell button.sm{min-height:40px;padding:0 13px;font-size:.86rem}
  .adm-shell .btn svg{flex:none}
  .adm-shell input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
  .adm-shell select,.adm-shell textarea{min-height:44px;font-size:16px;border-radius:10px}
  .adm-shell textarea{min-height:88px}
  .adm-shell input[type=checkbox],.adm-shell input[type=radio]{width:20px;height:20px}
  .adm-shell .field>span,.adm-shell label.field>span{font-size:.82rem;margin-bottom:4px}
  .adm-shell .chip{min-height:26px;display:inline-flex;align-items:center}
  .adm-shell .btn.ghost{border:1px solid #c3d2e6;background:#fff}
  #sm-support{display:none!important}
}
@media(max-width:760px){
  /* butang tindakan dalam bar atas halaman / panel: susun rapi, tidak terpotong */
  .adm-shell .adm-content .row.gap-s,.adm-shell .adm-content .row.gap,.adm-shell .adm-content .actions,.adm-shell .adm-content .sheet-head{flex-wrap:wrap}
  .adm-shell .sheet-head{padding:10px 12px;gap:8px}
  .adm-shell .sheet-head>.btn,.adm-shell .sheet-head .btn{flex:1 1 calc(50% - 8px)}
  .adm-shell .sheet-head select,.adm-shell .sheet-head .tbl-search{flex:1 1 100%;width:100%;max-width:none}
}

/* ---------- Penapis (tarikh + butang) ---------- */
@media(max-width:760px){
  .adm-shell .adm-content .filters,.adm-shell .adm-content .page>.row.mb{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;align-items:end}
  .adm-shell .adm-content .filters>*,.adm-shell .adm-content .page>.row.mb>*{min-width:0;margin:0}
  .adm-shell .adm-content .filters>.field,.adm-shell .adm-content .filters>label{width:100%;justify-self:stretch;display:flex;flex-direction:column;min-width:0}
  .adm-shell .adm-content .filters .field input,.adm-shell .adm-content .filters .field select{width:100%;max-width:none}
  .adm-shell .adm-content .filters .btn.primary{grid-column:1/-1}
  .adm-shell .adm-content .filters>select,.adm-shell .adm-content .filters>.tbl-search,.adm-shell .adm-content .filters>.grow,.adm-shell .adm-content .filters>.spacer,.adm-shell .adm-content .filters>span:not(.field){grid-column:1/-1}
  .adm-shell .adm-content .filters .btn{width:100%}
}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .adm-content .filters{gap:10px}
}

/* ---------- Tab: skrol ufuk, sasaran 42px ---------- */
@media(max-width:1000px){
  .adm-shell .adm-content .tabs{display:flex;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;margin-bottom:14px}
  .adm-shell .adm-content .tabs::-webkit-scrollbar{display:none}
  .adm-shell .adm-content .tabs button{flex:none;min-height:42px;padding:0 16px;white-space:nowrap;scroll-snap-align:start;display:inline-flex;align-items:center;gap:6px}
}

/* ---------- Kad ringkasan (.ledger) ---------- */
@media(max-width:1000px){
.adm-shell .ledger>div{container-type:inline-size;min-width:0}
.adm-shell .ledger .v{font-size:clamp(1.05rem,8.6cqi,1.5rem);overflow-wrap:anywhere;line-height:1.2}
.adm-shell .ledger .l{overflow-wrap:anywhere;line-height:1.25}
.adm-shell .ledger .n{overflow-wrap:anywhere}
}
@media(max-width:1000px){
  .adm-shell .ledger,.adm-shell .sdx .ledger{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:10px;margin-bottom:14px}
}
@media(max-width:760px){
  .adm-shell .ledger,.adm-shell .sdx .ledger{grid-template-columns:repeat(2,minmax(0,1fr))}
  .adm-shell .ledger>div,.adm-shell .sdx .ledger>div{padding:12px 13px;min-height:0;border-radius:13px}
  .adm-shell .ledger .l,.adm-shell .sdx .ledger>div .l{font-size:.66rem;letter-spacing:.04em}
  .adm-shell .ledger .n{font-size:.74rem}
  .adm-shell .ledger>div:last-child:nth-child(odd){grid-column:1/-1}
  /* kad Deposit: susun menegak (dahulu pecah satu aksara sebaris) */
  .adm-shell .sdx .ledger>div.dep{grid-column:1/-1;grid-template-columns:1fr;row-gap:10px}
  .adm-shell .sdx .ledger .dr{border-left:0;border-top:1px solid rgba(255,255,255,.4);padding:10px 0 0;min-width:0;flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 18px}
  .adm-shell .sdx .ledger .dp-r{gap:8px}
}
@media(max-width:340px){
  .adm-shell .ledger,.adm-shell .sdx .ledger{grid-template-columns:minmax(0,1fr)}
}

/* ---------- Panel/graf berpasangan ---------- */
@media(max-width:1000px){
  .adm-shell .sdx-r2,.adm-shell .sdx-r3,.adm-shell .hq-pair,.adm-shell .sd-pair{grid-template-columns:minmax(0,1fr)!important}
}

/* ---------- Jadual: ringkas + popup butiran ---------- */
.adm-shell .tbl-wrap{-webkit-overflow-scrolling:touch}
@media(max-width:760px){
  .adm-shell .adm-content table.tbl{min-width:0;width:100%;table-layout:auto}
  .adm-shell .adm-content table.tbl :is(th,td):nth-child(n+4){display:none}
  .adm-shell .adm-content table.tbl :is(th,td){padding:11px 10px;font-size:.86rem;vertical-align:middle}
  .adm-shell .adm-content table.tbl th{font-size:.66rem;padding:10px}
  .adm-shell .adm-content table.tbl tbody tr:has(td:nth-child(4)),
  .adm-shell .adm-content table.tbl tfoot tr:has(td:nth-child(4)){cursor:pointer}
  .adm-shell .adm-content table.tbl tbody tr:has(td:nth-child(4)):active td{background:#fff4cc}
  .adm-shell .adm-content table.tbl tr:has(td:nth-child(4)) td:nth-child(3){position:relative;padding-right:30px}
  .adm-shell .adm-content table.tbl tr:has(td:nth-child(4)) td:nth-child(3)::after{content:"\203A";position:absolute;right:10px;top:50%;transform:translateY(-52%);font-size:1.4rem;line-height:1;color:#98a8c0;font-weight:700}
  .adm-shell .tbl-wrap{overflow-x:auto}
  .adm-shell .tbl-wrap::after{content:none}
}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .adm-content table.tbl :is(th,td):nth-child(n+6){display:none}
  .adm-shell .adm-content table.tbl tbody tr:has(td:nth-child(6)){cursor:pointer}
  .adm-shell .adm-content table.tbl tbody tr:has(td:nth-child(6)):active td{background:#fff4cc}
  .adm-shell .adm-content table.tbl :is(th,td){padding:11px 10px}
}

/* pager & carian jadual */
@media(max-width:760px){
  .adm-shell .pager{padding:10px 12px;gap:10px}
  .adm-shell .pg-btn{min-width:40px;height:40px;border-radius:10px}
  .adm-shell .pg-size select{min-height:40px}
  .adm-shell .pg-nav{justify-content:center;width:100%}
  .adm-shell .tbl-search input{min-height:44px}
  .adm-shell .tbl-menu{position:fixed;left:12px;right:12px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom,0px));width:auto}
  .adm-shell .tbl-menu button{min-height:48px}
}

/* ---------- Popup butiran baris (.sm-sheet) ---------- */
.sm-sheet-bg{position:fixed;inset:0;z-index:100010;background:#001f4599;display:flex;align-items:flex-end;justify-content:center;animation:smFade .16s ease-out}
.sm-sheet{width:100%;max-width:560px;max-height:88dvh;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px #001f4555;display:flex;flex-direction:column;animation:smUp .22s ease-out;padding-bottom:env(safe-area-inset-bottom,0px)}
.sm-sheet-h{display:flex;align-items:center;gap:10px;padding:14px 14px 12px 18px;border-bottom:1px solid #dce6f2;flex:none}
.sm-sheet-h:before{content:"";position:absolute;left:50%;top:7px;width:38px;height:4px;margin-left:-19px;border-radius:4px;background:#cdd7e6}
.sm-sheet-h{position:relative;padding-top:20px}
.sm-sheet-t{flex:1;min-width:0}
.sm-sheet-t b{display:block;font-size:1.05rem;color:#001f45;line-height:1.25;overflow-wrap:anywhere}
.sm-sheet-t small{display:block;color:#607089;font-size:.78rem;margin-top:2px}
.sm-sheet-h button{width:44px;height:44px;border-radius:12px;border:1px solid #dce6f2;background:#f7f9fc;color:#1f4e8c;font-size:1.3rem;line-height:1;cursor:pointer;flex:none;display:grid;place-items:center;padding:0}
.sm-sheet-h button:disabled{opacity:.35}
.sm-sheet-b{overflow-y:auto;padding:4px 18px 8px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sm-kv{display:grid;grid-template-columns:minmax(0,.42fr) minmax(0,.58fr);gap:4px 14px;padding:11px 0;border-bottom:1px dashed #dce6f2;align-items:start}
.sm-kv:last-child{border-bottom:0}
.sm-kv dt{color:#607089;font-size:.76rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding-top:2px;overflow-wrap:anywhere}
.sm-kv dd{margin:0;color:#001f45;font-size:.95rem;font-weight:600;text-align:right;overflow-wrap:anywhere;min-width:0}
.sm-kv dd.l{text-align:left}
.sm-kv.act{grid-template-columns:1fr}
.sm-kv.act dd{display:flex;flex-wrap:wrap;gap:8px;text-align:left}
.sm-kv.act dd .btn,.sm-kv.act dd button{flex:1 1 calc(50% - 8px);text-align:center;display:inline-flex;align-items:center;justify-content:center;min-height:46px;border-radius:11px;border:1px solid #c3d2e6;background:#fff;color:#1f4e8c;font-weight:700;font-size:.9rem;cursor:pointer;padding:0 14px}
.sm-kv.act dd .btn.primary{background:#1f4e8c;border-color:#1f4e8c;color:#fff}
.sm-kv.act dd .btn.danger,.sm-kv.act dd .btn.red{background:#d81f32;border-color:#d81f32;color:#fff}
.sm-sheet-f{padding:10px 18px 14px;border-top:1px solid #dce6f2;flex:none}
.sm-sheet-f button{width:100%;min-height:48px;border-radius:12px;border:0;background:#001f45;color:#fff;font-weight:700;font-size:.95rem;cursor:pointer}
@keyframes smUp{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
@keyframes smFade{from{opacity:0}to{opacity:1}}
@media(min-width:761px){.sm-sheet-bg{align-items:center}.sm-sheet{border-radius:18px;max-height:84dvh}}

/* ---------- Popup sedia ada (.modal): muat skrin kecil ---------- */
@media(max-width:760px){
  .scrim{align-items:flex-end!important;padding:0!important}
  .scrim .modal{width:100%!important;max-width:100%!important;max-height:92dvh;margin:0;border-radius:18px 18px 0 0;display:flex;flex-direction:column}
  .scrim .modal .modal-body,.scrim .modal-body{overflow-y:auto;-webkit-overflow-scrolling:touch}
  .scrim .modal-foot{flex-wrap:wrap;gap:8px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .scrim .modal-foot .btn{flex:1 1 calc(50% - 8px)}
  .scrim .modal table{display:block;overflow-x:auto;max-width:100%}
}

/* ---------- Borang berbilang lajur -> 1 lajur di mobile ---------- */
@media(max-width:760px){
  .adm-shell .grid2,.adm-shell .grid3,.adm-shell .grid4,.adm-shell .form-grid,.adm-shell .fg,.adm-shell .pay-fg{grid-template-columns:minmax(0,1fr)!important}
  .adm-shell .row.mb>.field,.adm-shell .row>.field{flex:1 1 100%;min-width:0}
}

/* ---------- Segmen / tab tambahan (.sk-seg, .hq-tabs) ---------- */
@media(max-width:1000px){
  .adm-shell .sk-seg,.adm-shell .hq-tabs{display:flex;flex-wrap:nowrap;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .adm-shell .sk-seg::-webkit-scrollbar,.adm-shell .hq-tabs::-webkit-scrollbar{display:none}
  .adm-shell .sk-seg>*,.adm-shell .hq-tabs>*{flex:none;min-height:42px;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
  .adm-shell .hq-tab{padding:0 16px}
}
@media(max-width:760px){
  .adm-shell .hq-cols{grid-template-columns:minmax(0,1fr)!important}
  /* teks panjang (emel dsb) tidak memaksa jadual melebar */
  .adm-shell .adm-content table.tbl :is(th,td){overflow-wrap:anywhere;word-break:normal;min-width:0}
}

@media(min-width:761px) and (max-width:1000px){.adm-shell .adm-br select{width:210px}}

.adm-shell .sm-sup{display:none!important}
@media(max-width:1000px){.adm-shell .sm-sup{display:flex!important}}

/* ================= v272: kad sekata + jadual penuh dalam popup ================= */
@media(max-width:760px){
  /* kad: label 2 baris tetap -> nilai sejajar dalam satu baris kad */
  .adm-shell .ledger>div:not(.dep){display:flex;flex-direction:column;justify-content:flex-start}
  .adm-shell .ledger>div:not(.dep) .l{min-height:2.5em;display:flex;align-items:flex-start}
  .adm-shell .ledger>div:not(.dep) .v{margin-top:4px}
  .adm-shell .ledger>div:not(.dep) .n{margin-top:auto;padding-top:4px}
  /* kad ganjil terakhir (atau sebelum kad Deposit) -> penuh lebar, label 1 baris */
  .adm-shell .ledger>div:not(.dep):last-child:nth-child(odd),
  .adm-shell .sdx .ledger>div:not(.dep):nth-last-child(2):nth-child(odd){grid-column:1/-1}
  .adm-shell .ledger>div:not(.dep):last-child:nth-child(odd) .l,
  .adm-shell .sdx .ledger>div:not(.dep):nth-last-child(2):nth-child(odd) .l{min-height:0}
  .adm-shell .ledger>div:not(.dep) .n{min-height:1.1em}
}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .ledger>div:not(.dep){display:flex;flex-direction:column}
  .adm-shell .ledger>div:not(.dep) .l{min-height:2.5em;display:flex;align-items:flex-start}
  .adm-shell .ledger>div:not(.dep) .n{margin-top:auto;padding-top:4px}
}

/* bar "Lihat jadual penuh" (pseudo, tidak mengganggu DOM Vue) */
@media(max-width:760px){
  .adm-shell .tbl-wrap:has(table.tbl :is(th,td):nth-child(4)):not(:has(td.empty))::before{
    content:"\2922  Lihat jadual penuh";display:flex;align-items:center;justify-content:center;gap:8px;
    position:sticky;left:0;height:44px;margin:8px 10px;border:1px solid #c3d2e6;border-radius:11px;background:#f7f9fc;
    color:#1f4e8c;font-weight:700;font-size:.88rem;cursor:pointer}
}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .tbl-wrap:has(table.tbl :is(th,td):nth-child(6)):not(:has(td.empty))::before{
    content:"\2922  Lihat jadual penuh";display:flex;align-items:center;justify-content:center;gap:8px;
    position:sticky;left:0;height:44px;margin:8px 12px;width:max-content;padding:0 18px;border:1px solid #c3d2e6;border-radius:11px;background:#f7f9fc;
    color:#1f4e8c;font-weight:700;font-size:.88rem;cursor:pointer}
}

/* popup jadual penuh */
.sm-ft-bg{position:fixed;inset:0;z-index:100012;background:#001f45cc;display:flex;align-items:flex-end;justify-content:center;animation:smFade .16s ease-out}
.sm-ft{width:100%;height:94dvh;background:#fff;border-radius:18px 18px 0 0;display:flex;flex-direction:column;animation:smUp .22s ease-out;overflow:hidden}
.sm-ft-h{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 16px;border-bottom:1px solid #dce6f2;flex:none}
.sm-ft-h b{flex:1;min-width:0;font-size:1rem;color:#001f45;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-ft-h small{display:block;color:#607089;font-weight:600;font-size:.72rem}
.sm-ft-h button{width:44px;height:44px;border-radius:12px;border:1px solid #dce6f2;background:#f7f9fc;color:#1f4e8c;font-size:1.3rem;cursor:pointer;padding:0;display:grid;place-items:center;flex:none}
.sm-ft-b{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sm-ft-b table{border-collapse:separate;border-spacing:0;min-width:100%;width:max-content;font-size:.84rem}
.sm-ft-b th{position:sticky;top:0;z-index:2;background:#f1f5fb;color:#607089;text-transform:uppercase;font-size:.68rem;letter-spacing:.05em;text-align:left;padding:11px 12px;border-bottom:1px solid #dce6f2;white-space:nowrap}
.sm-ft-b td{padding:11px 12px;border-bottom:1px solid #eef3fa;white-space:nowrap;vertical-align:middle;color:#001f45}
.sm-ft-b tbody tr:nth-child(even) td{background:#fafcff}
.sm-ft-b tfoot td{position:sticky;bottom:0;background:#f1f5fb;font-weight:800;border-top:1px solid #dce6f2}
.sm-ft-b th:first-child,.sm-ft-b td:first-child{position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 #dce6f2}
.sm-ft-b th:first-child{z-index:3;background:#f1f5fb}
.sm-ft-b tbody tr:nth-child(even) td:first-child{background:#fafcff}
.sm-ft-b td .btn,.sm-ft-b td button{min-height:38px;padding:0 12px;border-radius:9px;border:1px solid #c3d2e6;background:#fff;color:#1f4e8c;font-weight:700;font-size:.8rem;margin-right:6px;cursor:pointer}
.sm-ft-b td .btn.primary{background:#1f4e8c;color:#fff;border-color:#1f4e8c}
.sm-ft-b td .btn.danger,.sm-ft-b td .btn.red{background:#d81f32;color:#fff;border-color:#d81f32}
.sm-ft-b td.empty{white-space:normal;text-align:center;color:#607089}
@media(min-width:761px){.sm-ft-bg{align-items:center}.sm-ft{width:min(96vw,980px);height:88dvh;border-radius:18px}}
@media(max-width:760px){.adm-shell .ledger .v{font-size:clamp(1rem,8.6cqi,1.25rem)}}

@media(max-width:760px){
  .adm-shell .ledger>div{min-height:96px}
  .adm-shell .tbl-search{width:100%!important;max-width:none!important;flex:1 1 100%}
  .adm-shell .tbl-exp{flex:1 1 calc(50% - 8px);min-width:0}
  .adm-shell .tbl-exp>.btn{width:100%}
  .adm-shell .sheet-head>.btn,.adm-shell .row>.btn{flex:1 1 calc(50% - 8px)}
}
@media(min-width:761px) and (max-width:1000px){.adm-shell .pg-btn{min-width:40px;height:40px;border-radius:10px}}


/* ================= v276: header Manager seimbang + dropdown nampak penuh + kad Laporan Jualan seimbang ================= */
/* --- Header: saiz teks & tinggi kolum seragam --- */
.adm-shell .adm-top{gap:10px}
.adm-shell .adm-top .adm-ico,.adm-shell .adm-top .adm-date,.adm-shell .adm-top .adm-u,.adm-shell .adm-top .adm-br select{height:38px;min-height:38px;box-sizing:border-box}
.adm-shell .adm-brand b{font-size:.88rem;letter-spacing:.03em}
.adm-shell .adm-brand small{font-size:.62rem;letter-spacing:.05em;max-width:200px}
.adm-shell .adm-br{font-size:.7rem;gap:6px}
.adm-shell .adm-br select{width:auto;min-width:170px;max-width:240px;font-size:.78rem;padding:4px 24px 4px 9px;line-height:1.2}
.adm-shell .adm-date{font-size:.72rem;padding:0 10px}
.adm-shell .adm-u{padding:0 10px 0 4px;gap:8px}
.adm-shell .adm-u em{width:28px;height:28px;font-size:.7rem}
.adm-shell .adm-u b{font-size:.74rem;line-height:1.15;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.adm-shell .adm-u small{font-size:.62rem;display:block;white-space:nowrap}
/* --- Semua dropdown: teks tidak terpotong --- */
.adm-shell select{font-size:.82rem;padding:6px 26px 6px 9px;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;min-width:0}
.adm-shell select option{font-size:.85rem;white-space:normal}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .adm-br select{width:auto;min-width:150px;max-width:210px}
  .adm-shell .adm-u b{max-width:110px}
}
@media(max-width:760px){
  .adm-shell select{font-size:16px;padding:6px 26px 6px 9px;min-height:44px}
  .adm-shell .adm-brand b{font-size:.84rem}
  .adm-shell .adm-top .adm-u{padding:0 4px}
}
@media(max-width:560px){
  .adm-shell .adm-br{font-size:.7rem}
  .adm-shell .adm-br select{flex:1;width:auto;min-width:0;max-width:none;font-size:15px;min-height:40px}
}
/* --- Kad Laporan Jualan (Manager): 5 kad = 5 lajur / 3+2 / 1+2+2 ; 3 kad = 3 lajur / 1+2 --- */
.adm-shell .ledger.rpt-bal{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}
.adm-shell .ledger.rpt-bal:has(>div:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
.adm-shell .ledger.rpt-bal:has(>div:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
.adm-shell .ledger.rpt-bal>div{container-type:inline-size;min-width:0;min-height:92px;padding:14px 15px;display:flex;flex-direction:column;justify-content:flex-start;box-sizing:border-box}
.adm-shell .ledger.rpt-bal .l{min-height:0;display:block;font-size:.68rem;letter-spacing:.05em;line-height:1.25;overflow-wrap:anywhere}
.adm-shell .ledger.rpt-bal .v{font-size:clamp(.95rem,9.5cqi,1.45rem);line-height:1.2;margin-top:6px;overflow-wrap:anywhere}
.adm-shell .ledger.rpt-bal .n{margin-top:auto;padding-top:4px;min-height:1.1em;font-size:.72rem}
@media(min-width:761px) and (max-width:1000px){
  .adm-shell .ledger.rpt-bal:has(>div:nth-child(5):last-child){grid-template-columns:repeat(6,minmax(0,1fr))}
  .adm-shell .ledger.rpt-bal:has(>div:nth-child(5):last-child)>div{grid-column:span 2}
  .adm-shell .ledger.rpt-bal:has(>div:nth-child(5):last-child)>div:nth-child(n+4){grid-column:span 3}
  .adm-shell .ledger.rpt-bal:has(>div:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:760px){
  .adm-shell .ledger.rpt-bal,.adm-shell .ledger.rpt-bal:has(>div:nth-child(3):last-child),.adm-shell .ledger.rpt-bal:has(>div:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .adm-shell .ledger.rpt-bal>div{padding:12px 13px;min-height:84px}
  .adm-shell .ledger.rpt-bal>div:first-child{grid-column:1/-1!important}
  .adm-shell .ledger.rpt-bal>div:last-child:nth-child(odd):not(:first-child){grid-column:auto!important}
  .adm-shell .ledger.rpt-bal:has(>div:nth-child(4):last-child)>div:first-child{grid-column:auto!important}
  .adm-shell .ledger.rpt-bal .v{font-size:clamp(1rem,9cqi,1.3rem)}
}
@media(max-width:340px){.adm-shell .ledger.rpt-bal{grid-template-columns:minmax(0,1fr)!important}}
