.kaba-mobile-brand,.af .kaba-mobile-nav{display:none}
@media(max-width:700px){
  .admin-shell .sidebar{display:block;position:sticky;top:0;z-index:60;padding:12px 16px;overflow:visible;border-bottom:2px solid #cba64e;box-shadow:0 5px 18px #06192318}
  .admin-shell .sidebar .brand{display:none!important}
  .kaba-mobile-brand{display:flex;justify-content:space-between;align-items:center;gap:16px}
  .kaba-mobile-brand img{width:122px;max-height:40px;object-fit:contain}
  .kaba-mobile-brand button{min-height:42px;padding:9px 14px;border:1px solid #647d83;border-radius:10px;background:#ffffff0b;color:#fff;font-size:12px;font-weight:700;cursor:pointer}
  .admin-shell .sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:13px 0 0}
  .admin-shell .sidebar nav a{justify-content:flex-start;min-height:43px;min-width:0;padding:10px 12px;font-size:15px;gap:10px}
  .admin-shell .sidebar nav span{display:inline!important;font-size:12px}
  .admin-shell .sidebar .logout{display:flex;justify-content:flex-start;margin:8px 0 0;min-height:42px;padding:10px 12px}
  .kaba-mobile-ready .admin-shell .sidebar:not(.is-open) nav,.kaba-mobile-ready .admin-shell .sidebar:not(.is-open)>.logout{display:none}
  .admin-shell .admin-main{padding:20px 14px 40px;width:100%;margin-left:0}
  .admin-shell .topbar{align-items:flex-start;gap:12px;margin-bottom:20px}
  .admin-shell .topbar>div{min-width:0;flex:1}
  .admin-shell .topbar h1{font-size:22px;line-height:1.25;overflow-wrap:anywhere}
  .admin-shell .topbar p{font-size:11px;line-height:1.6}
  .admin-shell .admin-profile-menu .admin-badge{display:flex;min-height:39px;padding:8px 10px;font-size:10px;gap:6px;white-space:nowrap}
  .admin-shell .admin-profile-menu .admin-badge img{display:none}
  .admin-shell .admin-profile-dropdown{top:130px;z-index:80}
  .admin-shell .panel{padding:18px 13px;border-radius:14px;min-width:0}
  .admin-shell .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .admin-shell .kpi{min-width:0;padding:15px 12px}
  .admin-shell .kpi strong{font-size:24px;overflow-wrap:anywhere}
  .admin-shell .actions-inline{flex-wrap:wrap;gap:8px}
  .admin-shell .btn{min-height:42px}
  .admin-shell .toolbar{gap:13px}
  .admin-shell .lead-actions{min-width:0;flex-wrap:wrap}
  .admin-shell .form-row{display:grid;grid-template-columns:minmax(0,1fr)}
  body.af .af-wrap{padding:22px 14px 40px}
  body.af .af-header{padding:12px 15px;gap:10px}
  body.af .af-header img{width:106px;height:38px}
  body.af .af-header .af-actions{gap:9px}
  body.af .af-header .af-actions>span{max-width:126px;font-size:11px;line-height:1.5}
  body.af .af-header .af-actions>span small{font-size:10px}
  body.af .af-header form button{min-height:39px;padding:8px 10px;font-size:11px}
  .af .af-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;gap:5px;padding-bottom:12px;scrollbar-width:none;max-width:100%}
  .af .af-tabs::-webkit-scrollbar{display:none}
  .af .af-tabs a{flex:0 0 auto;min-height:42px;display:flex;align-items:center;padding:9px 13px;font-size:12px}
  .af .af-card{padding:19px 14px;border-radius:14px}
  .af .af-card h2{font-size:17px;line-height:1.4}
  .af .af-intro h1{font-size:27px;line-height:1.2}
  .af .af-search{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:13px}
  .af .af-search label{grid-column:1/-1;min-width:0!important}
  .af .af-search button,.af .af-search .af-btn{width:100%;min-width:0;min-height:44px}
  .af .af-filter:not(.af-search){align-items:stretch}
  .af .af-filter:not(.af-search)>label{width:100%}
  .af .af-filter:not(.af-search)>button{width:100%}
  .af .af-form input,.af .af-form select,.af .af-form textarea,.admin-shell .input,.admin-shell select,.admin-shell textarea{font-size:16px;min-height:44px}
  .af .af-form .af-actions{display:flex;align-items:stretch}
  .af .af-form .af-actions>*{flex:1;min-width:0}
  .af .af-disclosure>summary{font-size:14px;line-height:1.5;min-height:28px}
  .af .af-disclosure-body{padding-top:20px}
  .af .af-linkbox{display:grid;grid-template-columns:1fr 1fr}
  .af .af-linkbox>input{grid-column:1/-1;width:100%;min-width:0;font-size:14px}
  .af .af-linkbox>button,.af .af-linkbox>.af-btn{padding-left:9px;padding-right:9px;font-size:12px;min-height:43px}
  .af .af-qr{align-items:center;text-align:center}
  .af .af-qr img{width:170px;height:170px}
  .af .af-notice{font-size:12px;line-height:1.75;padding:13px 14px;overflow-wrap:anywhere}
  .af .af-kpi{padding:15px 12px}
  .af .af-kpi span{font-size:11px;line-height:1.55}
  .af .af-kpi strong{font-size:20px;line-height:1.4}
  .af .af-wallet .af-kpi strong{font-size:clamp(15px,4.3vw,20px);white-space:nowrap}
  .af .af-auth{width:calc(100% - 32px);margin:5vh auto}
  .af .af-auth .af-card{padding:25px 21px}
  .af .af-auth h1{font-size:24px}
  .af .af-auth button[type=submit]{width:100%;min-height:46px}
  .af .af-auth-logo{width:142px;margin-bottom:25px}
  .af .af-table,.admin-shell .table-wrap{overflow:visible;max-width:100%}
  .af-table .kaba-card-table,.table-wrap .kaba-card-table{display:block;width:100%;border:0;border-collapse:separate}
  .af-table .kaba-card-table thead,.table-wrap .kaba-card-table thead{display:none}
  .af-table .kaba-card-table tbody,.table-wrap .kaba-card-table tbody{display:grid;gap:12px;width:100%}
  .af-table .kaba-card-table tr,.table-wrap .kaba-card-table tr{display:block;width:100%;border:1px solid #dbe5e6;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 4px 10px #153b4510}
  .af .af-table .kaba-card-table td,.admin-shell .table-wrap .kaba-card-table td{display:block;position:relative;min-width:0;width:100%;padding:11px 13px;border:0;border-bottom:1px solid #edf1f1;font-size:12px;overflow-wrap:anywhere;text-align:left}
  .af-table .kaba-card-table td:last-child,.table-wrap .kaba-card-table td:last-child{border-bottom:0}
  .af-table .kaba-card-table td[data-label]::before,.table-wrap .kaba-card-table td[data-label]::before{content:attr(data-label);display:block;font-size:10px;line-height:1.5;font-weight:700;color:#6d8288;margin-bottom:5px;text-transform:uppercase;letter-spacing:.05em}
  .af-table .kaba-card-table td b,.table-wrap .kaba-card-table td strong{font-size:13px}
  .af .af-table .kaba-empty-cell,.admin-shell .table-wrap .kaba-empty-cell{padding:25px 15px!important;text-align:center}
  .af-table .kaba-card-table td .af-badge,.table-wrap .kaba-card-table td .lead-status{max-width:100%;font-size:11px;white-space:normal}
  .af .af-bottom{line-height:1.8;margin-top:24px;font-size:11px}
}
@media(min-width:371px) and (max-width:700px){
  .af-table .kaba-card-table tr,.table-wrap .kaba-card-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .af-table .kaba-card-table td:first-child,.table-wrap .kaba-card-table td:first-child{grid-column:1/-1;background:#f6f9f8}
  .af-table .kaba-card-table td:last-child,.table-wrap .kaba-card-table td:last-child{grid-column:1/-1}
}

@media(max-width:700px){
  .af .af-tabs.kaba-tabs-ready{display:block;overflow:visible;white-space:normal;padding-bottom:16px}
  .af .af-tabs.kaba-tabs-ready>a{display:none}
  .af .af-tabs.kaba-tabs-ready>.kaba-mobile-nav{display:block;width:100%;font-size:12px;font-weight:700;color:#536d72}
  .af .kaba-mobile-nav>span{display:block;margin-bottom:8px}
  .af .kaba-mobile-nav>select{display:block;width:100%;max-width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid #b4c7ca;border-radius:10px;background:#fff;color:#143d46;font:600 16px/1.4 "Plus Jakarta Sans",sans-serif;cursor:pointer}
  .af .kaba-mobile-nav>select:focus{outline:3px solid #ceeeee;border-color:#296c76}
}

/* ===== Menu HP: header terkunci + panel samping (admin & affiliator) ===== */
.kaba-dd,.kaba-dd-shade{display:none}
body.af-page .af-header .kaba-af-menu{display:none}
.kaba-burger{position:relative;display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;width:46px;height:46px;min-height:46px!important;padding:0!important;border:1px solid #d4af3799!important;border-radius:14px!important;background:#ffffff0d!important;box-shadow:none!important;cursor:pointer;-webkit-tap-highlight-color:transparent}
.kaba-burger span{display:block;width:20px;height:2px;border-radius:2px;background:#f5d76e;transition:transform .25s ease,opacity .2s ease,width .25s ease}
.kaba-burger span:nth-child(2){width:14px;margin-left:6px}
.kaba-dd-open .kaba-burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.kaba-dd-open .kaba-burger span:nth-child(2){opacity:0}
.kaba-dd-open .kaba-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.kaba-burger:active{transform:scale(.96)}

@media(max-width:720px){
  .kaba-dd{display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;width:min(330px,86vw);z-index:90;background:#fff;border-radius:22px 0 0 22px;box-shadow:-18px 0 50px #00000033;transform:translateX(105%);visibility:hidden;transition:transform .3s cubic-bezier(.2,.8,.2,1),visibility 0s .3s;font-family:'Plus Jakarta Sans',sans-serif;padding-bottom:env(safe-area-inset-bottom)}
  .kaba-dd-open .kaba-dd{transform:none;visibility:visible;transition:transform .3s cubic-bezier(.2,.8,.2,1)}
  .kaba-dd-shade{display:block;position:fixed;inset:0;z-index:85;background:#0a0a0a73;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:opacity .25s}
  .kaba-dd-open .kaba-dd-shade{opacity:1;pointer-events:auto}
  html.kaba-dd-open,html.kaba-dd-open body{overflow:hidden!important}
  .kaba-dd-who{display:flex;align-items:center;gap:12px;padding:22px 18px 18px;background:#0a0a0a;color:#fff;border-radius:22px 0 0 0;border-bottom:2px solid #d4af37}
  .kaba-dd-avatar{flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:linear-gradient(180deg,#f3d875,#d4af37);color:#111;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px}
  .kaba-dd-who div{min-width:0;flex:1}
  .kaba-dd-who b{display:block;font-size:15px;line-height:1.3;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .kaba-dd-who small{display:block;font-size:12px;color:#cfcfcf!important;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .kaba-dd-close{flex:0 0 38px;width:38px;height:38px;min-height:38px!important;padding:0!important;border-radius:12px!important;border:1px solid #ffffff2e!important;background:#ffffff12!important;color:#fff!important;display:inline-flex!important;align-items:center;justify-content:center;box-shadow:none!important}
  .kaba-dd-close svg{width:18px;height:18px}
  .kaba-dd-list{flex:1;overflow-y:auto;padding:12px 12px 8px;display:flex;flex-direction:column;gap:2px}
  .kaba-dd-foot{padding:10px 12px 16px;border-top:1px solid #efefef;display:flex;flex-direction:column;gap:2px}
  .kaba-dd-item{position:relative;display:flex!important;align-items:center;justify-content:flex-start!important;gap:14px;width:100%;min-height:52px!important;padding:12px 14px!important;border:0!important;border-radius:14px!important;background:transparent!important;color:#2f2f2f!important;font-family:inherit!important;font-size:15.5px!important;font-weight:600!important;line-height:1.3!important;text-align:left;text-decoration:none!important;box-shadow:none!important;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .kaba-dd-item svg{flex:0 0 22px;width:22px;height:22px;color:#8a8a8a}
  .kaba-dd-item span{flex:1}
  .kaba-dd-item:active,.kaba-dd-item:hover{background:#f5f5f5!important}
  .kaba-dd-item.is-active{background:#fff6d6!important;color:#111!important;font-weight:750!important}
  .kaba-dd-item.is-active svg{color:#b8952a}
  .kaba-dd-item.is-active:before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:4px;border-radius:0 4px 4px 0;background:#d4af37}
  .kaba-dd-item.is-danger,.kaba-dd-item.is-danger svg{color:#b23b22!important}
  .kaba-dd-item i{font-style:normal;min-width:24px;height:24px;padding:0 7px;border-radius:99px;background:#d93a2b;color:#fff;font-size:11.5px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
  .kaba-dd-item:focus-visible,.kaba-dd-close:focus-visible,.kaba-burger:focus-visible{outline:3px solid #d4af3780;outline-offset:2px}
}
@media(max-width:720px) and (prefers-reduced-motion:reduce){.kaba-dd,.kaba-dd-shade,.kaba-burger span{transition:none!important}}

@media(max-width:700px){
  .kaba-dd-ready .admin-shell .sidebar nav,.kaba-dd-ready .admin-shell .sidebar>.logout{display:none!important}
  /* admin.css memakai overflow-x:hidden di html/body sehingga sticky tidak bekerja: kunci header dengan fixed. */
  .kaba-dd-ready .admin-shell .sidebar{position:fixed!important;top:0;left:0;right:0;width:auto!important;margin:0;z-index:60}
  .kaba-dd-ready .admin-shell{padding-top:var(--kaba-head,68px)}
}
@media(max-width:720px){
  .kaba-dd-ready body.af-page .af-header{position:sticky;top:0;z-index:60}
  .kaba-dd-ready body.af-page .af-header>.af-actions{display:none!important}
  .kaba-dd-ready body.af-page .af-header .kaba-af-menu{display:inline-flex}
  .kaba-dd-ready .af-tabs[data-main-nav]{display:none!important}
}
