
*{box-sizing:border-box}
:root{
  --afsm-primary:#6C63FF;
  --afsm-primary-2:#5146ff;
  --afsm-primary-soft:#f0efff;
  --afsm-ink:#172033;
  --afsm-ink-2:#2e3850;
  --afsm-muted:#7e879a;
  --afsm-line:#e9edf5;
  --afsm-line-2:#f0f3f8;
  --afsm-bg:#f6f8fc;
  --afsm-card:#ffffff;
  --afsm-success:#18a76d;
  --afsm-success-bg:#e8fbf2;
  --afsm-warning:#ee991d;
  --afsm-warning-bg:#fff4e2;
  --afsm-danger:#f04d71;
  --afsm-danger-bg:#ffeaf0;
  --afsm-blue:#5570f1;
  --afsm-blue-bg:#ebefff;
  --afsm-shadow:0 10px 35px rgba(24,39,75,.05);
  --afsm-shadow-hover:0 18px 44px rgba(24,39,75,.08);
}

body.afsm-standalone-page{
  margin:0!important;
  padding:0!important;
  background:var(--afsm-bg)!important;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--afsm-ink);
}

body.afsm-standalone-page *{font-family:inherit}

body.afsm-standalone-page #wpadminbar{display:none!important}

.afsm-app{
  display:flex;
  min-height:100vh;
  width:100%;
  background:
    radial-gradient(circle at top right, rgba(108,99,255,.06), transparent 18%),
    radial-gradient(circle at top left, rgba(84,114,255,.04), transparent 20%),
    var(--afsm-bg);
  color:var(--afsm-ink);
  margin:0!important;
}

.afsm-sidebar{
  width:268px;
  background:
    radial-gradient(circle at 20% 0%, rgba(126,115,255,.18), transparent 18%),
    linear-gradient(180deg,#111a2f 0%, #0c1430 55%, #09122a 100%);
  color:#fff;
  padding:18px 16px;
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  z-index:20;
  box-shadow:inset -1px 0 0 rgba(255,255,255,.05);
}

.afsm-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:6px 8px 22px;
}

.afsm-brand-icon{
  width:44px;height:44px;border-radius:15px;
  display:grid;place-items:center;
  font-weight:800;font-size:20px;color:#fff;
  background:linear-gradient(135deg,#7f72ff,#5950ff);
  box-shadow:0 16px 30px rgba(101,87,255,.38);
}

.afsm-brand-copy strong{
  display:block;
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}
.afsm-brand-copy span{
  display:block;
  color:#9aa7c3;
  font-size:12px;
  margin-top:2px;
}

.afsm-nav{
  display:grid;
  gap:8px;
}
.afsm-nav a{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:#aeb7ca;
  padding:12px 12px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
  transition:.22s ease;
  position:relative;
}
.afsm-nav a:hover{
  background:rgba(255,255,255,.05);
  color:#fff;
  transform:translateX(2px);
}
.afsm-nav a.active{
  color:#fff;
  background:linear-gradient(90deg,rgba(110,95,255,.46),rgba(104,92,255,.16));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}

.afsm-nav-icon{
  width:34px;height:34px;border-radius:11px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  flex:none;
}
.afsm-nav a.active .afsm-nav-icon{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.1);
}
.afsm-nav-icon svg{
  width:18px;height:18px;display:block;
}
.afsm-nav-text{line-height:1}

.afsm-nav a b{
  margin-left:auto;
  min-width:24px;height:24px;padding:0 6px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#ff6792,#ff4e74);
  color:#fff;border-radius:999px;
  font-size:10px;font-weight:800;
  box-shadow:0 6px 20px rgba(240,77,113,.3);
}

.afsm-sidebar-bottom{
  margin-top:auto;
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:16px;
}
.afsm-user-mini{
  display:flex;align-items:center;gap:10px;
}
.afsm-user-mini img{
  width:42px;height:42px;border-radius:50%;
  border:2px solid rgba(255,255,255,.08);
}
.afsm-user-mini strong{
  display:block;font-size:13px;color:#fff
}
.afsm-user-mini span{
  display:block;font-size:11px;color:#8d9ab2;margin-top:2px
}
.afsm-logout{
  margin-top:14px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#ff9fb3;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}
.afsm-logout-icon{
  width:16px;height:16px;display:inline-grid;place-items:center
}
.afsm-logout-icon svg{width:16px;height:16px;display:block}

.afsm-main{
  flex:1;
  min-width:0;
  width:calc(100% - 268px);
}

.afsm-topbar{
  height:78px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--afsm-line);
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 28px;
  position:sticky;
  top:0;
  z-index:15;
}
.afsm-menu-toggle{
  display:none;
  width:42px;height:42px;border-radius:12px;
  border:1px solid var(--afsm-line);
  background:#fff;
  padding:0 10px;
}
.afsm-menu-toggle span{
  display:block;height:2px;background:#24304a;border-radius:2px;margin:5px 0
}
.afsm-topbar-title{
  min-width:150px;
}
.afsm-topbar-title strong{
  display:block;font-size:16px;font-weight:800;letter-spacing:.2px
}
.afsm-topbar-title span{
  display:block;font-size:12px;color:var(--afsm-muted);margin-top:3px
}

.afsm-top-search{
  max-width:520px;
  flex:1;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
  background:linear-gradient(180deg,#fdfdff 0%, #f5f7fb 100%);
  border:1px solid var(--afsm-line);
  border-radius:14px;
  padding:0 14px;
  box-shadow:0 6px 18px rgba(34,50,84,.03);
}
.afsm-search-icon{
  width:18px;height:18px;color:#7b88a3;display:grid;place-items:center
}
.afsm-search-icon svg{width:18px;height:18px;display:block}
.afsm-top-search input{
  width:100%;
  height:46px;
  background:transparent;
  border:0;
  outline:none;
  font-size:14px;
  color:var(--afsm-ink);
}

.afsm-top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.afsm-icon-btn{
  width:42px;height:42px;border-radius:14px;
  border:1px solid var(--afsm-line);
  background:#fff;
  display:grid;place-items:center;
  position:relative;
  color:#24304a;
  box-shadow:0 6px 18px rgba(34,50,84,.03);
}
.afsm-icon-btn svg{
  width:19px;height:19px;display:block
}
.afsm-icon-btn i{
  width:8px;height:8px;border-radius:50%;
  background:#ff5379;
  position:absolute;right:10px;top:9px;
  box-shadow:0 0 0 3px #fff;
}
.afsm-top-user{
  width:42px;height:42px;border-radius:14px;
  border:1px solid var(--afsm-line);
  background:#fff;
  display:grid;place-items:center;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(34,50,84,.03);
}
.afsm-top-user img{display:block;border-radius:50%}

.afsm-content{
  padding:28px;
  max-width:1720px;
  margin:0 auto;
}

.afsm-page-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
.afsm-page-head h1{
  margin:0 0 6px;
  font-size:34px;
  line-height:1.1;
  letter-spacing:-.5px;
}
.afsm-page-head p{
  margin:0;
  color:var(--afsm-muted);
  font-size:14px;
}
.afsm-head-chip{
  display:inline-flex;align-items:center;gap:10px;
  background:#fff;
  border:1px solid var(--afsm-line);
  border-radius:999px;
  padding:10px 14px;
  color:#5c6782;
  font-size:13px;font-weight:700;
  box-shadow:var(--afsm-shadow);
}
.afsm-head-chip-icon{
  width:30px;height:30px;border-radius:999px;
  display:grid;place-items:center;
  color:var(--afsm-primary);
  background:var(--afsm-primary-soft);
}
.afsm-head-chip-icon svg{width:15px;height:15px;display:block}

.afsm-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin-bottom:18px;
}
.afsm-kpi{
  background:linear-gradient(180deg,#fff 0%,#fefeff 100%);
  border:1px solid var(--afsm-line);
  border-radius:18px;
  padding:18px;
  display:flex;
  align-items:flex-start;
  gap:14px;
  box-shadow:var(--afsm-shadow);
  transition:.2s ease;
}
.afsm-kpi:hover{
  transform:translateY(-2px);
  box-shadow:var(--afsm-shadow-hover);
}
.afsm-kpi-icon{
  width:48px;height:48px;border-radius:16px;
  display:grid;place-items:center;
  flex:none;
}
.afsm-kpi-icon svg{
  width:20px;height:20px;display:block
}
.afsm-kpi-icon.green{background:var(--afsm-success-bg);color:var(--afsm-success)}
.afsm-kpi-icon.blue{background:var(--afsm-blue-bg);color:var(--afsm-blue)}
.afsm-kpi-icon.orange{background:var(--afsm-warning-bg);color:var(--afsm-warning)}
.afsm-kpi-icon.red{background:var(--afsm-danger-bg);color:var(--afsm-danger)}
.afsm-kpi span,
.afsm-kpi small{
  display:block;
  color:var(--afsm-muted);
}
.afsm-kpi span{font-size:12px;font-weight:600}
.afsm-kpi strong{
  display:block;
  margin:6px 0 5px;
  font-size:24px;
  line-height:1.15;
  color:var(--afsm-ink);
}
.afsm-kpi small{
  font-size:12px;
}

.afsm-grid-2{
  display:grid;
  grid-template-columns:1.65fr .85fr;
  gap:18px;
  margin-bottom:18px;
}

.afsm-card{
  background:linear-gradient(180deg,#fff 0%, #fcfdff 100%);
  border:1px solid var(--afsm-line);
  border-radius:20px;
  padding:20px;
  box-shadow:var(--afsm-shadow);
  margin-bottom:18px;
}
.afsm-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}
.afsm-card-head h3{
  margin:0 0 4px;
  font-size:16px;
  letter-spacing:-.2px;
}
.afsm-card-head p{
  margin:0;
  font-size:13px;
  color:var(--afsm-muted);
}
.afsm-link-more{
  display:inline-flex;align-items:center;gap:8px;
  color:var(--afsm-primary);
  font-size:13px;font-weight:800;
  text-decoration:none;
}
.afsm-link-more span{
  width:14px;height:14px;display:grid;place-items:center
}
.afsm-link-more svg{width:14px;height:14px;display:block}

.afsm-card-chart .afsm-chart{
  margin-top:8px;
}
.afsm-chart{
  min-height:300px;
}
.afsm-chart svg{
  width:100%;height:240px;display:block;overflow:visible
}
.afsm-chart .grid{
  stroke:#eef2f8;stroke-width:1
}
.afsm-chart .line{
  fill:none;stroke:var(--afsm-primary);stroke-width:4.4;stroke-linecap:round;stroke-linejoin:round;
  filter:drop-shadow(0 10px 16px rgba(108,99,255,.18));
}
.afsm-chart-labels{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:8px;
  margin-top:10px;
}
.afsm-chart-labels span{
  color:#8a93a6;
  font-size:12px;
  text-align:center;
}

.afsm-summary-list{
  display:grid;
  gap:12px;
}
.afsm-summary-list > div{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:14px 14px;
  border-radius:16px;
  background:#f8f9fd;
  border:1px solid #eef2f8;
}
.afsm-summary-list span{
  color:#66718a;font-size:13px;font-weight:600
}
.afsm-summary-list strong{
  font-size:18px
}

.afsm-toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.afsm-field{
  min-width:280px;
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  background:#f7f9fd;
  border:1px solid var(--afsm-line);
  border-radius:14px;
  padding:0 14px;
}
.afsm-field span{
  width:18px;height:18px;display:grid;place-items:center;color:#79859f
}
.afsm-field span svg{width:18px;height:18px;display:block}
.afsm-field input{
  border:0;background:transparent;outline:none;width:100%;height:46px;font-size:14px
}
.afsm-filter-select{
  height:46px;
  border:1px solid var(--afsm-line);
  background:#fff;
  border-radius:14px;
  min-width:180px;
  padding:0 14px;
  outline:none;
  color:var(--afsm-ink-2);
  font-size:14px;
}

.afsm-primary-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:46px;padding:0 16px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--afsm-primary),var(--afsm-primary-2));
  color:#fff;text-decoration:none;font-weight:800;font-size:14px;
  box-shadow:0 14px 28px rgba(81,70,255,.22);
}

.afsm-table-wrap{
  overflow:auto;
  border-radius:16px;
}
.afsm-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:900px;
}
.afsm-table thead th{
  text-align:left;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  color:#8994a8;
  padding:14px 14px;
  border-bottom:1px solid var(--afsm-line);
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
  position:sticky;
  top:0;
}
.afsm-table tbody td{
  padding:15px 14px;
  border-bottom:1px solid #f1f4fa;
  vertical-align:middle;
  font-size:14px;
}
.afsm-table tbody tr:hover{
  background:#fbfcff;
}
.afsm-order-customer strong{
  display:block;
  margin-bottom:4px;
  font-size:14px;
}
.afsm-order-customer span{
  color:#96a0b2;font-size:12px
}
.afsm-product-cell,
.afsm-customer{
  display:flex;align-items:center;gap:12px
}
.afsm-product-cell img{
  width:46px;height:46px;object-fit:cover;border-radius:12px;border:1px solid var(--afsm-line)
}
.afsm-product-cell strong,
.afsm-customer strong{
  display:block;font-size:14px
}
.afsm-product-cell span{
  display:block;font-size:12px;color:#96a0b2;margin-top:3px
}
.afsm-customer img{
  width:36px;height:36px;border-radius:50%
}

.afsm-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:30px;padding:0 12px;border-radius:999px;
  font-size:12px;font-weight:800;
}
.afsm-badge.success{background:var(--afsm-success-bg);color:var(--afsm-success)}
.afsm-badge.danger{background:var(--afsm-danger-bg);color:var(--afsm-danger)}
.afsm-badge.muted{background:#f0f2f6;color:#6d778d}

.afsm-status-select{
  min-height:34px;
  padding:0 34px 0 12px;
  border-radius:999px;
  border:1px solid #e7eaf3;
  background:#f7f8ff;
  color:#5d67d9;
  font-size:12px;
  font-weight:800;
  outline:none;
}

.afsm-mini-btn{
  min-height:34px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--afsm-line);
  background:#fff;
  color:var(--afsm-ink-2);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.afsm-stock-control{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#f8f9fd;
  border:1px solid var(--afsm-line);
  border-radius:14px;
  padding:6px;
}
.afsm-stock-control button{
  width:30px;height:30px;border-radius:10px;
  border:1px solid #e5e9f3;background:#fff;color:#2f3d5a;font-size:18px;line-height:1;cursor:pointer
}
.afsm-stock-control input{
  width:64px;height:30px;border:0;background:transparent;text-align:center;outline:none;font-size:14px;font-weight:700;color:var(--afsm-ink)
}

.afsm-mobile-nav{
  display:none;
}

.afsm-toast{
  position:fixed;
  right:20px;
  bottom:20px;
  background:#1c2334;
  color:#fff;
  padding:13px 16px;
  border-radius:14px;
  box-shadow:0 18px 38px rgba(28,35,52,.25);
  font-size:13px;
  font-weight:700;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:.25s ease;
  z-index:100;
}
.afsm-toast.show{
  opacity:1;
  transform:translateY(0);
}

body.afsm-standalone-page .afsm-app{margin:0!important;width:100%!important;max-width:none!important;min-height:100vh!important}
body.afsm-standalone-page .afsm-main{width:calc(100% - 268px)}
body.afsm-standalone-page .afsm-content{max-width:none!important;width:100%!important}

@media (max-width:1280px){
  .afsm-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .afsm-grid-2{grid-template-columns:1fr}
}

@media (max-width:1100px){
  .afsm-sidebar{width:230px}
  .afsm-main{width:calc(100% - 230px)}
  body.afsm-standalone-page .afsm-main{width:calc(100% - 230px)}
  .afsm-content{padding:22px}
  .afsm-page-head h1{font-size:30px}
}

@media (max-width:760px){
  .afsm-app{display:block;padding-bottom:84px}
  .afsm-sidebar{
    position:fixed;
    left:-260px;
    top:0;
    width:250px;
    transition:.24s ease;
    box-shadow:20px 0 40px rgba(0,0,0,.16)
  }
  .afsm-sidebar.open{left:0}
  .afsm-main,
  body.afsm-standalone-page .afsm-main{width:100%!important}
  .afsm-topbar{
    height:70px;
    padding:0 14px;
    gap:10px;
  }
  .afsm-menu-toggle{display:block;flex:none}
  .afsm-topbar-title{display:none}
  .afsm-top-search{
    min-width:0;
    max-width:none;
    margin-left:0;
  }
  .afsm-top-search input{height:42px}
  .afsm-content{padding:16px}
  .afsm-page-head{
    flex-direction:column;
    align-items:flex-start;
    margin-bottom:18px;
  }
  .afsm-page-head h1{font-size:24px}
  .afsm-page-head p{font-size:13px}
  .afsm-head-chip{padding:9px 13px}
  .afsm-kpis{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }
  .afsm-kpi{
    padding:14px;
    border-radius:16px;
    flex-direction:column;
    gap:10px;
  }
  .afsm-kpi strong{font-size:20px}
  .afsm-card{padding:16px;border-radius:18px}
  .afsm-card-head{align-items:center}
  .afsm-toolbar{
    flex-direction:column;
  }
  .afsm-field{min-width:0;width:100%}
  .afsm-filter-select{width:100%}
  .afsm-mobile-nav{
    position:fixed;
    left:12px;right:12px;bottom:12px;
    z-index:50;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:8px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(16px);
    border:1px solid rgba(233,237,245,.9);
    border-radius:22px;
    padding:10px 8px calc(10px + env(safe-area-inset-bottom));
    box-shadow:0 18px 44px rgba(24,39,75,.12);
  }
  .afsm-mobile-nav a{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    text-decoration:none;
    color:#7b87a2;
    font-size:11px;
    font-weight:800;
    padding:6px 4px;
    border-radius:14px;
  }
  .afsm-mobile-nav a.active{
    color:var(--afsm-primary);
    background:#f3f2ff;
  }
  .afsm-mobile-icon{
    width:28px;height:28px;display:grid;place-items:center
  }
  .afsm-mobile-icon svg{width:18px;height:18px;display:block}
  .afsm-mobile-nav em{font-style:normal}
}

@media (max-width:420px){
  .afsm-kpis{grid-template-columns:1fr}
  .afsm-top-search{padding:0 12px}
}


/* v0.2.0 - Order detail + Frontend Product Editor */
.afsm-row-actions{display:flex;align-items:center;gap:7px}
.afsm-action-icon{
  width:34px;height:34px;border-radius:11px;border:1px solid var(--afsm-line);
  background:#fff;color:#536079;display:inline-grid;place-items:center;cursor:pointer;
  transition:.18s ease;
}
.afsm-action-icon:hover{color:var(--afsm-primary);border-color:#d9d6ff;background:#f8f7ff;transform:translateY(-1px)}
.afsm-action-icon svg{width:16px;height:16px;display:block}
button.afsm-primary-btn{border:0;cursor:pointer}

.afsm-modal{
  position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:24px;
}
.afsm-modal.open{display:flex}
.afsm-modal-backdrop{
  position:absolute;inset:0;background:rgba(9,17,37,.62);backdrop-filter:blur(7px)
}
.afsm-modal-dialog{
  width:min(760px,100%);max-height:calc(100vh - 48px);overflow:auto;position:relative;z-index:2;
  background:#f8f9fd;border:1px solid rgba(255,255,255,.7);border-radius:24px;
  box-shadow:0 30px 90px rgba(9,17,37,.32);
}
.afsm-modal-xl{width:min(1180px,100%)}
.afsm-modal-lg{width:min(1120px,100%)}
.afsm-modal-close{
  position:sticky;float:right;top:14px;right:14px;z-index:10;
  width:38px;height:38px;border-radius:12px;border:1px solid var(--afsm-line);
  background:#fff;color:#5b657a;font-size:24px;line-height:1;cursor:pointer;box-shadow:0 8px 24px rgba(19,31,57,.08)
}
.afsm-modal-body{padding:26px}
.afsm-modal-loading,.afsm-modal-error{padding:70px 20px;text-align:center;color:var(--afsm-muted);font-weight:700}
body.afsm-modal-open{overflow:hidden}

.afsm-order-detail{padding:8px}
.afsm-eyebrow{
  display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;
  background:#efedff;color:#5f57db;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em
}
.afsm-order-detail-top{
  display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:18px 4px 22px
}
.afsm-order-detail-top h2{font-size:30px;margin:9px 0 4px;letter-spacing:-.5px}
.afsm-order-detail-top p{margin:0;color:var(--afsm-muted);font-size:13px}
.afsm-order-detail-total{
  background:#fff;border:1px solid var(--afsm-line);border-radius:18px;padding:14px 16px;min-width:170px;box-shadow:var(--afsm-shadow)
}
.afsm-order-detail-total span{display:block;color:var(--afsm-muted);font-size:12px;margin-bottom:5px}
.afsm-order-detail-total strong{font-size:20px}

.afsm-order-status-flow{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px
}
.afsm-flow-step{
  position:relative;background:#fff;border:1px solid var(--afsm-line);border-radius:16px;padding:14px 14px 14px 42px;color:#9099aa
}
.afsm-flow-step span{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;border-radius:50%;border:2px solid #dbe0ea
}
.afsm-flow-step em{font-style:normal;font-size:12px;font-weight:800}
.afsm-flow-step.done{color:var(--afsm-success);background:#f5fdf9;border-color:#dff7ea}
.afsm-flow-step.done span{border-color:var(--afsm-success);background:var(--afsm-success)}
.afsm-flow-step.active{color:var(--afsm-primary);background:#f6f5ff;border-color:#e0ddff}
.afsm-flow-step.active span{border-color:var(--afsm-primary);box-shadow:inset 0 0 0 4px #fff;background:var(--afsm-primary)}

.afsm-order-detail-grid{
  display:grid;grid-template-columns:.85fr 1.5fr .85fr;gap:16px
}
.afsm-detail-panel{
  background:#fff;border:1px solid var(--afsm-line);border-radius:20px;padding:18px;box-shadow:var(--afsm-shadow)
}
.afsm-detail-panel-head{
  display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px
}
.afsm-detail-panel-head h3{margin:0;font-size:15px}
.afsm-detail-panel-head span{color:var(--afsm-muted);font-size:12px}
.afsm-customer-detail{display:flex;gap:12px;align-items:center}
.afsm-customer-detail img{border-radius:50%}
.afsm-customer-detail strong{display:block;font-size:14px;margin-bottom:4px}
.afsm-customer-detail span{display:block;font-size:12px;color:var(--afsm-muted);margin-top:2px}
.afsm-address-box{
  margin-top:15px;padding-top:15px;border-top:1px solid var(--afsm-line-2);font-size:12px;color:#66718a;line-height:1.65
}
.afsm-order-items{display:grid;gap:10px}
.afsm-order-item{
  display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:10px;border-radius:14px;background:#f9fafe;border:1px solid #eef2f8
}
.afsm-order-item-image img{width:48px;height:48px;object-fit:cover;border-radius:12px;display:block}
.afsm-order-item-info strong{display:block;font-size:13px}
.afsm-order-item-info span{display:block;font-size:11px;color:var(--afsm-muted);margin-top:3px}
.afsm-order-item>strong{font-size:13px}
.afsm-order-totals{margin-top:14px;padding-top:14px;border-top:1px solid var(--afsm-line)}
.afsm-order-totals>div{display:flex;justify-content:space-between;gap:12px;padding:6px 0;font-size:12px}
.afsm-order-totals span{color:var(--afsm-muted)}
.afsm-order-totals .total{padding-top:10px;margin-top:5px;border-top:1px dashed #dfe4ee;font-size:14px}
.afsm-order-totals .total span,.afsm-order-totals .total strong{color:var(--afsm-ink);font-weight:800}
.afsm-meta-list{display:grid;gap:12px}
.afsm-meta-list>div{display:flex;justify-content:space-between;gap:12px;padding:12px;background:#f8f9fd;border-radius:13px}
.afsm-meta-list span{font-size:12px;color:var(--afsm-muted)}
.afsm-meta-list strong{font-size:12px;text-align:right}

.afsm-product-editor{padding:28px}
.afsm-product-editor-head{padding-right:50px;margin-bottom:20px}
.afsm-product-editor-head h2{margin:9px 0 5px;font-size:28px;letter-spacing:-.4px}
.afsm-product-editor-head p{margin:0;color:var(--afsm-muted);font-size:13px}
.afsm-editor-grid{display:grid;grid-template-columns:1.6fr .8fr;gap:16px}
.afsm-editor-main,.afsm-editor-side{display:grid;gap:16px;align-content:start}
.afsm-form-card{
  background:#fff;border:1px solid var(--afsm-line);border-radius:20px;padding:18px;box-shadow:var(--afsm-shadow)
}
.afsm-form-card h3{margin:0 0 16px;font-size:15px}
.afsm-form-group{display:grid;gap:7px;margin-bottom:14px}
.afsm-form-group:last-child{margin-bottom:0}
.afsm-form-group>span{font-size:12px;font-weight:800;color:#5f6b83}
.afsm-form-group input,.afsm-form-group textarea,.afsm-form-group select{
  width:100%;border:1px solid #e4e8f1;background:#fbfcfe;border-radius:13px;outline:none;color:var(--afsm-ink);
  padding:11px 12px;font-size:13px;transition:.18s ease
}
.afsm-form-group input,.afsm-form-group select{height:44px}
.afsm-form-group textarea{resize:vertical;line-height:1.6}
.afsm-form-group input:focus,.afsm-form-group textarea:focus,.afsm-form-group select:focus{
  border-color:#beb9ff;background:#fff;box-shadow:0 0 0 4px rgba(108,99,255,.08)
}
.afsm-form-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.afsm-form-3{display:grid;grid-template-columns:1fr 1fr .65fr;gap:12px}
.afsm-money-field{
  display:flex;align-items:center;border:1px solid #e4e8f1;background:#fbfcfe;border-radius:13px;overflow:hidden
}
.afsm-money-field b{
  height:42px;min-width:44px;display:grid;place-items:center;background:#f1f3f8;border-right:1px solid #e4e8f1;color:#707b90;font-size:12px
}
.afsm-money-field input{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.afsm-image-picker{display:grid;gap:10px}
.afsm-image-preview{
  min-height:220px;border:1.5px dashed #dce1ec;border-radius:16px;background:#f8f9fc;display:grid;place-items:center;overflow:hidden;color:#929bad;font-size:12px
}
.afsm-image-preview img{width:100%;height:220px;object-fit:cover;display:block}
.afsm-secondary-btn{
  min-height:42px;padding:0 14px;border-radius:13px;border:1px solid var(--afsm-line);background:#fff;color:#4c586f;font-weight:800;font-size:12px;cursor:pointer
}
.afsm-link-btn{
  border:0;background:transparent;color:#e44d6d;font-size:12px;font-weight:800;cursor:pointer
}
.afsm-editor-footer{
  display:flex;justify-content:flex-end;gap:10px;padding-top:18px;margin-top:18px;border-top:1px solid var(--afsm-line)
}

@media(max-width:980px){
  .afsm-order-detail-grid{grid-template-columns:1fr}
  .afsm-editor-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .afsm-modal{padding:0}
  .afsm-modal-dialog,.afsm-modal-lg,.afsm-modal-xl{
    width:100%;height:100%;max-height:none;border-radius:0
  }
  .afsm-modal-body{padding:18px 14px 100px}
  .afsm-product-editor{padding:18px 14px 100px}
  .afsm-order-detail-top{flex-direction:column}
  .afsm-order-detail-total{width:100%}
  .afsm-order-status-flow{grid-template-columns:1fr}
  .afsm-form-2,.afsm-form-3{grid-template-columns:1fr}
  .afsm-editor-footer{
    position:sticky;bottom:0;background:rgba(248,249,253,.96);backdrop-filter:blur(12px);padding:12px 0 0
  }
}


/* v0.3.0 */
.afsm-order-detail-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.afsm-wa-btn{color:#0b8f59!important;text-decoration:none;background:#effcf5!important;border-color:#d9f5e6!important}
.afsm-order-ops{margin-top:18px;padding-top:18px;border-top:1px solid var(--afsm-line);display:grid;gap:12px}
.afsm-order-ops label{display:grid;gap:6px}
.afsm-order-ops label>span{font-size:11px;font-weight:800;color:#6b768d}
.afsm-order-ops input,.afsm-order-ops textarea{
 width:100%;border:1px solid #e3e8f1;background:#fbfcfe;border-radius:12px;padding:10px 11px;outline:none;font-size:12px;color:var(--afsm-ink)
}
.afsm-order-ops input:focus,.afsm-order-ops textarea:focus{border-color:#bbb6ff;box-shadow:0 0 0 4px rgba(108,99,255,.07);background:#fff}

.afsm-form-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.afsm-form-card-title h3{margin:0}
.afsm-form-card-title>span{font-size:11px;color:var(--afsm-muted);max-width:240px;text-align:right}
.afsm-form-4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.afsm-full-btn{width:100%;margin-top:12px}
.afsm-gallery-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;min-height:90px}
.afsm-gallery-empty{grid-column:1/-1;min-height:90px;border:1.5px dashed #dce1ec;border-radius:14px;display:grid;place-items:center;color:#929bad;font-size:12px;background:#f8f9fc}
.afsm-gallery-item{position:relative;aspect-ratio:1/1;border-radius:12px;overflow:hidden;border:1px solid var(--afsm-line);background:#f7f8fb}
.afsm-gallery-item img{width:100%;height:100%;object-fit:cover;display:block}
.afsm-gallery-item button{position:absolute;right:5px;top:5px;width:24px;height:24px;border-radius:50%;border:0;background:rgba(20,28,45,.78);color:#fff;font-size:16px;cursor:pointer}

.afsm-category-list{display:grid;gap:7px;max-height:260px;overflow:auto;padding-right:3px}
.afsm-check-row{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid #edf0f6;border-radius:11px;background:#fafbfe;cursor:pointer}
.afsm-check-row input{width:16px;height:16px;accent-color:var(--afsm-primary)}
.afsm-check-row span{font-size:12px;font-weight:700;color:#5a657c}

.afsm-variation-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 14px}
.afsm-variation-toolbar p{margin:0;color:var(--afsm-muted);font-size:11px}
.afsm-variations-list{display:grid;gap:10px}
.afsm-variation-row{
 display:grid;grid-template-columns:1.1fr 1.1fr .8fr .8fr .55fr 34px;gap:9px;align-items:end;
 padding:12px;border:1px solid #e9edf5;border-radius:14px;background:#fafbfe
}
.afsm-variation-row label{display:grid;gap:5px}
.afsm-variation-row label span,.afsm-variation-name span{font-size:10px;font-weight:800;color:#7b879d;text-transform:uppercase;letter-spacing:.04em}
.afsm-variation-row input{height:36px;border:1px solid #e2e7f0;background:#fff;border-radius:10px;padding:0 9px;font-size:12px;outline:none;min-width:0}
.afsm-variation-name{align-self:center}
.afsm-variation-name strong{display:block;font-size:13px;margin-top:5px}
.afsm-remove-variation{width:34px;height:36px;border-radius:10px;border:1px solid #ffd6df;background:#fff3f6;color:#dd4264;font-size:18px;cursor:pointer}
[hidden]{display:none!important}

@media(max-width:1100px){
 .afsm-form-4{grid-template-columns:repeat(2,1fr)}
 .afsm-variation-row{grid-template-columns:1fr 1fr 1fr}
 .afsm-remove-variation{align-self:end}
}
@media(max-width:760px){
 .afsm-order-detail-actions{justify-content:flex-start}
 .afsm-form-4{grid-template-columns:1fr 1fr}
 .afsm-form-card-title{display:block}
 .afsm-form-card-title>span{display:block;text-align:left;margin-top:5px}
 .afsm-variation-toolbar{align-items:flex-start;flex-direction:column}
 .afsm-variation-row{grid-template-columns:1fr 1fr}
}


/* v0.4.0 management modules */
.afsm-nav-separator{padding:17px 12px 5px;color:#66738e;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.12em}
.afsm-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.afsm-review-card{background:#fff;border:1px solid var(--afsm-line);border-radius:18px;padding:18px;box-shadow:var(--afsm-shadow)}
.afsm-review-top{display:flex;align-items:center;justify-content:space-between;gap:14px}
.afsm-review-top>div{display:flex;align-items:center;gap:10px}.afsm-review-top img{border-radius:50%}.afsm-review-top strong{display:block;font-size:13px}.afsm-review-top span:not(.afsm-badge){display:block;color:var(--afsm-muted);font-size:11px;margin-top:3px}
.afsm-stars{margin:14px 0 8px;color:#f6ab24;letter-spacing:2px}.afsm-review-card p{color:#5f6980;font-size:13px;line-height:1.65}
.afsm-review-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.afsm-review-actions button{border:1px solid var(--afsm-line);background:#fff;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:800;cursor:pointer}.afsm-review-actions button.danger{color:#e14567;background:#fff4f7;border-color:#ffd8e1}
.afsm-notification-list{display:grid;gap:10px}.afsm-notification-item{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid #edf1f7;border-radius:15px;background:#fbfcff}.afsm-notification-item strong{display:block;font-size:13px}.afsm-notification-item p{margin:4px 0 0;color:var(--afsm-muted);font-size:12px}.afsm-notification-item>span{font-size:11px;color:#98a2b4}.afsm-notification-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center}.afsm-notification-icon svg{width:18px;height:18px}.afsm-notification-icon.order{background:#eeefff;color:#5c62ed}.afsm-notification-icon.stock{background:#fff1e5;color:#e99120}
.afsm-empty-state{padding:50px;text-align:center;color:var(--afsm-muted)}
.afsm-settings-layout{display:grid;grid-template-columns:1.4fr .6fr;gap:18px}.afsm-settings-form{margin:0}.afsm-settings-preview{margin:0;align-self:start}.afsm-color-field{display:grid;grid-template-columns:58px 1fr;gap:10px}.afsm-color-field input[type="color"]{width:58px;height:46px;padding:4px;border:1px solid #e4e8f1;border-radius:12px;background:#fff}.afsm-preview-brand{display:flex;align-items:center;gap:13px;padding:18px;background:linear-gradient(135deg,#111a2f,#0b1430);border-radius:17px;color:#fff}.afsm-preview-brand strong{display:block;font-size:15px}.afsm-preview-brand span{display:block;color:#98a4bd;font-size:11px;margin-top:3px}
.afsm-report-kpis{margin-bottom:18px}
@media(max-width:980px){.afsm-review-grid{grid-template-columns:1fr}.afsm-settings-layout{grid-template-columns:1fr}}
@media(max-width:760px){.afsm-notification-item{grid-template-columns:42px 1fr}.afsm-notification-item>span{grid-column:2}.afsm-review-actions button{flex:1}}


/* =========================================================
   v0.4.2 RESPONSIVE UI REBUILD
   Desktop / Laptop / Tablet / Mobile
   ========================================================= */

.afsm-app{
  --afsm-sidebar-w:268px;
  --afsm-content-pad:28px;
  overflow-x:hidden;
}

.afsm-main{
  min-width:0;
  width:calc(100% - var(--afsm-sidebar-w));
}

.afsm-content{
  width:100%;
  max-width:1680px;
  padding:var(--afsm-content-pad);
}

.afsm-sidebar-overlay{
  display:none;
}

/* Desktop wide */
@media (min-width:1600px){
  .afsm-content{
    padding:32px 38px 44px;
    max-width:1720px;
  }
  .afsm-kpis{gap:20px}
  .afsm-kpi{padding:20px}
  .afsm-page-head h1{font-size:36px}
  .afsm-card{padding:22px}
  .afsm-table thead th{font-size:12px;padding:15px 16px}
  .afsm-table tbody td{font-size:14px;padding:16px}
}

/* Laptop */
@media (max-width:1399px){
  .afsm-app{
    --afsm-sidebar-w:244px;
    --afsm-content-pad:22px;
  }
  .afsm-sidebar{width:244px}
  .afsm-brand-copy strong{font-size:16px}
  .afsm-nav a{font-size:13px;padding:11px}
  .afsm-nav-icon{width:32px;height:32px}
  .afsm-topbar{padding:0 22px}
  .afsm-page-head h1{font-size:30px}
  .afsm-kpi strong{font-size:21px}
  .afsm-grid-2{grid-template-columns:1.45fr .85fr}
}

/* Tablet landscape / Surface */
@media (max-width:1180px){
  .afsm-app{
    --afsm-sidebar-w:218px;
    --afsm-content-pad:18px;
  }
  .afsm-sidebar{
    width:218px;
    padding:16px 12px;
  }
  .afsm-brand{padding-left:5px;padding-right:5px}
  .afsm-brand-icon{width:40px;height:40px;border-radius:13px}
  .afsm-nav a{
    gap:9px;
    font-size:12px;
    padding:10px 9px;
    border-radius:12px;
  }
  .afsm-nav-icon{width:30px;height:30px;border-radius:9px}
  .afsm-nav-icon svg{width:16px;height:16px}
  .afsm-topbar-title span{display:none}
  .afsm-topbar-title{min-width:auto}
  .afsm-top-search{max-width:420px}
  .afsm-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .afsm-grid-2{
    grid-template-columns:1fr;
  }
  .afsm-card{
    border-radius:17px;
    padding:17px;
  }
  .afsm-page-head{
    margin-bottom:18px;
  }
  .afsm-page-head h1{font-size:27px}
  .afsm-table{min-width:820px}
  .afsm-settings-layout{grid-template-columns:1fr}
}

/* Tablet portrait: turn sidebar into drawer */
@media (max-width:900px){
  .afsm-app{
    display:block;
    --afsm-content-pad:18px;
  }

  .afsm-sidebar{
    position:fixed;
    z-index:1002;
    top:0;
    left:0;
    bottom:0;
    width:min(286px,84vw);
    height:100dvh;
    transform:translateX(-105%);
    transition:transform .26s cubic-bezier(.2,.7,.2,1);
    box-shadow:26px 0 60px rgba(7,16,37,.28);
  }

  .afsm-sidebar.open{
    transform:translateX(0);
  }

  .afsm-sidebar-overlay{
    position:fixed;
    z-index:1001;
    inset:0;
    display:block;
    background:rgba(9,17,37,.46);
    backdrop-filter:blur(3px);
    opacity:0;
    visibility:hidden;
    transition:.22s ease;
  }

  .afsm-sidebar-overlay.show{
    opacity:1;
    visibility:visible;
  }

  .afsm-main,
  body.afsm-standalone-page .afsm-main{
    width:100%!important;
  }

  .afsm-topbar{
    height:68px;
    padding:0 16px;
  }

  .afsm-menu-toggle{
    display:block;
    flex:none;
  }

  .afsm-topbar-title{
    display:block;
    min-width:auto;
  }

  .afsm-topbar-title strong{font-size:14px}
  .afsm-topbar-title span{display:none}

  .afsm-top-search{
    margin-left:auto;
    max-width:360px;
  }

  .afsm-content{
    max-width:none;
    padding:18px;
  }

  .afsm-page-head{
    align-items:flex-start;
  }

  .afsm-head-chip{
    display:none;
  }

  .afsm-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }

  .afsm-table{
    min-width:780px;
  }

  .afsm-editor-grid,
  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
  }

  .afsm-review-grid{
    grid-template-columns:1fr;
  }

  .afsm-form-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .afsm-variation-row{
    grid-template-columns:1fr 1fr 1fr;
  }
}

/* Mobile */
@media (max-width:640px){
  .afsm-app{
    padding-bottom:88px;
    --afsm-content-pad:14px;
  }

  .afsm-topbar{
    height:64px;
    padding:0 12px;
    gap:8px;
  }

  .afsm-menu-toggle{
    width:40px;height:40px;
    border-radius:11px;
  }

  .afsm-topbar-title{
    display:none;
  }

  .afsm-top-search{
    max-width:none;
    min-width:0;
    padding:0 11px;
    border-radius:12px;
  }

  .afsm-top-search input{
    height:40px;
    font-size:13px;
  }

  .afsm-top-actions{
    gap:7px;
  }

  .afsm-icon-btn,
  .afsm-top-user{
    width:40px;height:40px;border-radius:12px;
  }

  .afsm-top-user{
    display:none;
  }

  .afsm-content{
    padding:14px;
  }

  .afsm-page-head{
    gap:12px;
    margin-bottom:15px;
  }

  .afsm-page-head h1{
    font-size:23px;
    line-height:1.2;
    margin-bottom:5px;
  }

  .afsm-page-head p{
    font-size:12px;
    line-height:1.55;
  }

  .afsm-page-head>.afsm-primary-btn{
    width:100%;
  }

  .afsm-kpis{
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:12px;
  }

  .afsm-kpi{
    padding:13px;
    border-radius:15px;
    gap:9px;
    flex-direction:column;
  }

  .afsm-kpi-icon{
    width:38px;height:38px;border-radius:12px;
  }

  .afsm-kpi-icon svg{width:17px;height:17px}

  .afsm-kpi span{font-size:10px}
  .afsm-kpi strong{
    font-size:18px;
    margin:3px 0;
    word-break:break-word;
  }
  .afsm-kpi small{font-size:10px;line-height:1.35}

  .afsm-card{
    margin-bottom:12px;
    padding:14px;
    border-radius:16px;
  }

  .afsm-card-head{
    margin-bottom:12px;
    gap:8px;
  }

  .afsm-card-head h3{font-size:14px}
  .afsm-card-head p{font-size:11px}
  .afsm-link-more{font-size:11px}

  .afsm-chart{
    min-height:220px;
  }

  .afsm-chart svg{
    height:180px;
  }

  .afsm-chart-labels{
    gap:2px;
    margin-top:6px;
  }

  .afsm-chart-labels span{
    font-size:10px;
  }

  .afsm-summary-list{gap:8px}
  .afsm-summary-list>div{
    padding:11px 12px;
    border-radius:13px;
  }
  .afsm-summary-list span{font-size:11px}
  .afsm-summary-list strong{font-size:15px}

  .afsm-toolbar{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    margin-bottom:10px;
  }

  .afsm-field,
  .afsm-filter-select{
    min-width:0;
    width:100%;
  }

  .afsm-field input,
  .afsm-filter-select{
    height:42px;
    font-size:13px;
  }

  /* Mobile table behaves like touch-friendly horizontal data grid */
  .afsm-table-wrap{
    margin-left:-4px;
    margin-right:-4px;
    padding-bottom:4px;
  }

  .afsm-table{
    min-width:720px;
  }

  .afsm-table thead th{
    padding:11px 10px;
    font-size:10px;
  }

  .afsm-table tbody td{
    padding:11px 10px;
    font-size:12px;
  }

  .afsm-product-cell img{
    width:40px;height:40px;border-radius:10px;
  }

  .afsm-status-select{
    min-height:31px;
    font-size:10px;
    padding-left:9px;
  }

  .afsm-action-icon{
    width:32px;height:32px;border-radius:10px;
  }

  .afsm-row-actions{
    gap:5px;
    flex-wrap:nowrap;
  }

  .afsm-stock-control{
    padding:4px;
    gap:4px;
    border-radius:11px;
  }

  .afsm-stock-control button{
    width:28px;height:28px;
  }

  .afsm-stock-control input{
    width:52px;
  }

  .afsm-mobile-nav{
    left:8px;
    right:8px;
    bottom:8px;
    gap:3px;
    padding:8px 5px calc(8px + env(safe-area-inset-bottom));
    border-radius:19px;
  }

  .afsm-mobile-nav a{
    gap:4px;
    padding:6px 2px;
    font-size:9px;
    min-width:0;
  }

  .afsm-mobile-icon{
    width:25px;height:25px;
  }

  .afsm-mobile-icon svg{
    width:16px;height:16px;
  }

  /* Modals become proper mobile sheets */
  .afsm-modal{
    padding:0;
    align-items:stretch;
  }

  .afsm-modal-dialog,
  .afsm-modal-lg,
  .afsm-modal-xl{
    width:100%;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    overflow:auto;
  }

  .afsm-modal-close{
    top:10px;
    right:10px;
    width:36px;height:36px;
    border-radius:11px;
  }

  .afsm-modal-body{
    padding:16px 12px 94px;
  }

  .afsm-product-editor{
    padding:16px 12px 94px;
  }

  .afsm-product-editor-head{
    padding-right:44px;
    margin-bottom:14px;
  }

  .afsm-product-editor-head h2{
    font-size:23px;
  }

  .afsm-form-card{
    padding:14px;
    border-radius:16px;
  }

  .afsm-form-2,
  .afsm-form-3,
  .afsm-form-4{
    grid-template-columns:1fr;
    gap:0;
  }

  .afsm-form-group{
    margin-bottom:11px;
  }

  .afsm-form-group input,
  .afsm-form-group select{
    height:42px;
  }

  .afsm-image-preview,
  .afsm-image-preview img{
    min-height:190px;
    height:190px;
  }

  .afsm-gallery-preview{
    grid-template-columns:repeat(3,1fr);
  }

  .afsm-category-list{
    max-height:220px;
  }

  .afsm-variation-row{
    grid-template-columns:1fr 1fr;
    padding:10px;
    gap:8px;
  }

  .afsm-variation-name{
    grid-column:1/-1;
  }

  .afsm-remove-variation{
    width:100%;
    grid-column:1/-1;
  }

  .afsm-editor-footer{
    position:sticky;
    bottom:-1px;
    z-index:8;
    margin:14px -12px -94px;
    padding:12px 12px calc(12px + env(safe-area-inset-bottom));
    background:rgba(248,249,253,.96);
    backdrop-filter:blur(14px);
    border-top:1px solid var(--afsm-line);
  }

  .afsm-editor-footer .afsm-secondary-btn,
  .afsm-editor-footer .afsm-primary-btn{
    flex:1;
  }

  .afsm-order-detail-top{
    padding-top:10px;
  }

  .afsm-order-detail-top h2{
    font-size:25px;
  }

  .afsm-order-detail-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .afsm-order-detail-total{
    grid-column:1/-1;
    width:100%;
  }

  .afsm-order-status-flow{
    grid-template-columns:1fr;
    gap:7px;
  }

  .afsm-flow-step{
    padding:11px 12px 11px 38px;
  }

  .afsm-order-item{
    grid-template-columns:42px 1fr;
    gap:9px;
  }

  .afsm-order-item-image img{
    width:42px;height:42px;
  }

  .afsm-order-item>strong{
    grid-column:2;
  }

  .afsm-review-card{
    padding:14px;
    border-radius:15px;
  }

  .afsm-review-top{
    align-items:flex-start;
  }

  .afsm-review-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .afsm-notification-item{
    padding:12px;
    grid-template-columns:38px 1fr;
  }

  .afsm-notification-icon{
    width:38px;height:38px;
  }

  .afsm-settings-layout{
    gap:12px;
  }

  .afsm-color-field{
    grid-template-columns:50px 1fr;
  }

  .afsm-toast{
    left:12px;
    right:12px;
    bottom:96px;
    text-align:center;
  }
}

/* Very small phones */
@media (max-width:390px){
  .afsm-content{padding:12px}
  .afsm-kpis{grid-template-columns:1fr}
  .afsm-kpi{flex-direction:row;align-items:center}
  .afsm-kpi-icon{margin:0}
  .afsm-page-head h1{font-size:21px}
  .afsm-mobile-nav a{font-size:8px}
  .afsm-gallery-preview{grid-template-columns:repeat(2,1fr)}
}

/* Mobile landscape — v1.9.56: footer visibility handled by afsm-phone-ui class */
@media (max-width:900px) and (orientation:landscape){
  .afsm-sidebar{
    overflow-y:auto;
  }
  .afsm-content{
    padding-top:14px;
  }
}

/* Make controls more touch-friendly */
@media (pointer:coarse){
  .afsm-nav a,
  .afsm-action-icon,
  .afsm-mini-btn,
  .afsm-secondary-btn,
  .afsm-primary-btn,
  .afsm-status-select{
    min-height:40px;
  }
}

@media(max-width:900px){body.afsm-drawer-open{overflow:hidden}}


/* =========================================================
   v0.4.3 SIDEBAR SCROLL FIX
   ========================================================= */

/* Sidebar memakai layout kolom penuh agar area menu bisa scroll
   tanpa mendorong profil/logout keluar viewport. */
.afsm-sidebar{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  min-height:0;
  padding-bottom:max(16px, env(safe-area-inset-bottom));
}

.afsm-brand{
  flex:0 0 auto;
}

.afsm-nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:5px;
  padding-bottom:14px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.18) transparent;
}

/* Scrollbar sidebar */
.afsm-nav::-webkit-scrollbar{
  width:5px;
}
.afsm-nav::-webkit-scrollbar-track{
  background:transparent;
}
.afsm-nav::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}
.afsm-nav::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,.26);
}

.afsm-sidebar-bottom{
  flex:0 0 auto;
  margin-top:8px!important;
  padding-top:14px;
  padding-bottom:env(safe-area-inset-bottom);
  background:linear-gradient(
    180deg,
    rgba(9,18,42,0) 0%,
    rgba(9,18,42,.94) 18%,
    #09122a 42%
  );
}

/* Beri ruang ekstra di bawah daftar menu agar item terakhir
   tidak menempel ke area profil. */
.afsm-nav-separator:last-of-type{
  margin-bottom:0;
}

@media(max-width:900px){
  .afsm-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    padding-top:max(16px, env(safe-area-inset-top));
    padding-bottom:max(12px, env(safe-area-inset-bottom));
  }

  .afsm-nav{
    max-height:none!important;
    overflow-y:auto!important;
    padding-bottom:20px;
  }

  .afsm-sidebar-bottom{
    position:relative;
    z-index:2;
    margin-top:0!important;
    padding-top:14px;
    padding-bottom:max(4px, env(safe-area-inset-bottom));
  }
}

/* Untuk layar pendek / mobile landscape, navigasi tetap bisa
   mencapai menu paling bawah. */
@media(max-height:720px){
  .afsm-brand{
    padding-bottom:12px;
  }

  .afsm-nav{
    gap:4px;
  }

  .afsm-nav a{
    padding-top:9px;
    padding-bottom:9px;
  }

  .afsm-nav-separator{
    padding-top:10px;
  }

  .afsm-sidebar-bottom{
    padding-top:10px;
  }
}

@media(max-height:580px){
  .afsm-user-mini{
    display:none;
  }

  .afsm-sidebar-bottom{
    border-top:1px solid rgba(255,255,255,.08);
  }

  .afsm-logout{
    margin-top:0;
    min-height:38px;
  }
}


/* v0.4.4 Website Branding */
.afsm-brand-icon.afsm-site-logo{
  overflow:hidden;
  padding:0;
  background:linear-gradient(135deg,#ffffff,#f3f4fa);
  border:1px solid rgba(255,255,255,.14);
}
.afsm-brand-icon.afsm-site-logo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  padding:5px;
  border-radius:inherit;
}
.afsm-brand-icon.afsm-site-logo span{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,#7f72ff,#5950ff);
  font-size:20px;
  font-weight:800;
}
.afsm-brand-copy{
  min-width:0;
}
.afsm-brand-copy strong{
  max-width:158px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-preview-brand .afsm-site-logo{
  flex:0 0 auto;
}
@media(max-width:1180px){
  .afsm-brand-copy strong{max-width:126px}
}


/* =========================================================
   v0.4.5 FIXED SIDEBAR / INDEPENDENT CONTENT SCROLL
   ========================================================= */

/* Desktop & laptop: sidebar benar-benar fixed */
@media(min-width:901px){
  html,
  body.afsm-standalone-page{
    height:100%;
    overflow:hidden!important;
  }

  .afsm-app{
    min-height:100vh;
    height:100vh;
    overflow:hidden;
    display:block;
    position:relative;
  }

  .afsm-sidebar{
    position:fixed!important;
    top:0;
    left:0;
    bottom:0;
    height:100vh!important;
    width:var(--afsm-sidebar-w)!important;
    z-index:1000;
    overflow:hidden!important;
  }

  .afsm-main{
    position:relative;
    margin-left:var(--afsm-sidebar-w)!important;
    width:calc(100% - var(--afsm-sidebar-w))!important;
    height:100vh;
    min-height:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }

  .afsm-topbar{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto;
    z-index:20;
  }

  .afsm-content{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    scrollbar-color:#d8deea transparent;
  }

  .afsm-content::-webkit-scrollbar{
    width:8px;
  }

  .afsm-content::-webkit-scrollbar-track{
    background:transparent;
  }

  .afsm-content::-webkit-scrollbar-thumb{
    background:#d8deea;
    border-radius:999px;
    border:2px solid transparent;
    background-clip:padding-box;
  }

  .afsm-content::-webkit-scrollbar-thumb:hover{
    background:#c4ccda;
    background-clip:padding-box;
  }
}

/* Tablet/mobile tetap drawer */
@media(max-width:900px){
  html,
  body.afsm-standalone-page{
    height:auto;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  .afsm-app{
    height:auto;
    min-height:100vh;
    overflow:visible;
  }

  .afsm-main{
    margin-left:0!important;
    width:100%!important;
    height:auto;
    overflow:visible;
    display:block;
  }

  .afsm-content{
    overflow:visible;
  }
}


/* =========================================================
   v0.4.6 MOBILE PREMIUM POLISH
   Target: 360px - 430px phones
   ========================================================= */

@media(max-width:640px){
  body.afsm-standalone-page{
    background:
      radial-gradient(circle at 100% 0%, rgba(108,99,255,.07), transparent 22%),
      #f6f8fc!important;
  }

  .afsm-app{
    padding-bottom:94px;
  }

  /* topbar */
  .afsm-topbar{
    position:sticky!important;
    top:0!important;
    z-index:45;
    height:62px;
    padding:0 10px;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(18px);
    border-bottom:1px solid rgba(229,233,242,.9);
  }

  .afsm-menu-toggle{
    width:40px;
    height:40px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(30,45,80,.05);
  }

  .afsm-top-search{
    height:40px;
    border-radius:13px;
    padding:0 11px;
    background:#f6f8fc;
    border-color:#e8ecf4;
  }

  .afsm-top-search input{
    height:38px;
    font-size:13px;
  }

  .afsm-search-icon{
    width:16px;height:16px;
  }

  .afsm-search-icon svg{
    width:16px;height:16px;
  }

  .afsm-icon-btn{
    width:40px;height:40px;
    border-radius:12px;
  }

  .afsm-icon-btn svg{
    width:18px;height:18px;
  }

  /* main content */
  .afsm-content{
    padding:14px 12px 18px;
  }

  .afsm-page-head{
    margin-bottom:14px;
    gap:10px;
  }

  .afsm-page-head h1{
    font-size:22px;
    letter-spacing:-.35px;
    margin-bottom:4px;
  }

  .afsm-page-head p{
    font-size:12px;
    line-height:1.5;
    max-width:92%;
  }

  /* KPI cards */
  .afsm-kpis{
    gap:9px;
    margin-bottom:12px;
  }

  .afsm-kpi{
    min-height:132px;
    padding:13px;
    border-radius:17px;
    box-shadow:0 8px 24px rgba(31,43,66,.045);
  }

  .afsm-kpi-icon{
    width:38px;height:38px;
    border-radius:12px;
  }

  .afsm-kpi span{
    font-size:10px;
    line-height:1.25;
  }

  .afsm-kpi strong{
    font-size:18px;
    line-height:1.15;
  }

  .afsm-kpi small{
    font-size:10px;
    line-height:1.3;
  }

  /* Cards */
  .afsm-card{
    padding:13px;
    border-radius:17px;
    box-shadow:0 8px 26px rgba(31,43,66,.04);
  }

  .afsm-card-head{
    align-items:flex-start;
  }

  .afsm-card-head h3{
    font-size:14px;
  }

  .afsm-card-head p{
    font-size:11px;
    line-height:1.4;
  }

  .afsm-summary-list>div{
    border-radius:13px;
    padding:11px;
  }

  /* chart */
  .afsm-chart{
    min-height:205px;
  }

  .afsm-chart svg{
    height:166px;
  }

  /* toolbar */
  .afsm-toolbar{
    gap:8px;
  }

  .afsm-field,
  .afsm-filter-select{
    border-radius:12px;
  }

  /* tables */
  .afsm-table-wrap{
    border-radius:13px;
    margin-inline:-2px;
    padding-bottom:5px;
  }

  .afsm-table{
    min-width:690px;
  }

  .afsm-table thead th{
    font-size:9.5px;
    padding:10px 9px;
  }

  .afsm-table tbody td{
    font-size:11.5px;
    padding:10px 9px;
  }

  .afsm-product-cell{
    gap:8px;
  }

  .afsm-product-cell img{
    width:38px;height:38px;
    border-radius:10px;
  }

  .afsm-product-cell strong,
  .afsm-customer strong{
    font-size:12px;
  }

  .afsm-product-cell span,
  .afsm-order-customer span{
    font-size:9.5px;
  }

  /* buttons */
  .afsm-primary-btn,
  .afsm-secondary-btn{
    min-height:42px;
    border-radius:12px;
    font-size:12px;
  }

  .afsm-action-icon{
    width:34px;height:34px;
    border-radius:10px;
  }

  /* bottom nav */
  .afsm-mobile-nav{
    left:8px;
    right:8px;
    bottom:8px;
    min-height:66px;
    padding:8px 5px calc(8px + env(safe-area-inset-bottom));
    border-radius:20px;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(20px);
    box-shadow:
      0 18px 45px rgba(22,36,67,.14),
      inset 0 0 0 1px rgba(255,255,255,.6);
  }

  .afsm-mobile-nav a{
    min-height:48px;
    border-radius:14px;
    font-size:9px;
    padding:5px 2px;
    justify-content:center;
  }

  .afsm-mobile-nav a.active{
    background:linear-gradient(180deg,#f2f0ff,#ece9ff);
    box-shadow:inset 0 0 0 1px rgba(108,99,255,.08);
  }

  .afsm-mobile-icon{
    width:24px;height:24px;
  }

  .afsm-mobile-icon svg{
    width:16px;height:16px;
  }

  /* drawer */
  .afsm-sidebar{
    width:min(286px,86vw);
    padding-left:13px;
    padding-right:13px;
    border-radius:0 22px 22px 0;
  }

  .afsm-brand{
    padding:4px 6px 16px;
  }

  .afsm-brand-icon{
    width:42px;height:42px;
  }

  .afsm-brand-copy strong{
    max-width:170px;
    font-size:16px;
  }

  .afsm-brand-copy span{
    font-size:11px;
  }

  .afsm-nav{
    padding-right:2px;
  }

  .afsm-nav a{
    min-height:48px;
    font-size:13px;
    border-radius:13px;
    padding:10px;
  }

  .afsm-nav-icon{
    width:32px;height:32px;
  }

  /* order detail */
  .afsm-order-detail-top{
    gap:12px;
  }

  .afsm-order-detail-actions{
    gap:8px;
  }

  .afsm-order-detail-actions .afsm-secondary-btn{
    width:100%;
  }

  .afsm-order-detail-total{
    border-radius:15px;
    padding:12px 14px;
  }

  .afsm-order-detail-total strong{
    font-size:18px;
  }

  .afsm-detail-panel{
    border-radius:17px;
    padding:14px;
  }

  .afsm-order-item{
    border-radius:12px;
    padding:9px;
  }

  /* product editor */
  .afsm-product-editor{
    padding:14px 10px 96px;
  }

  .afsm-product-editor-head{
    margin-bottom:12px;
  }

  .afsm-product-editor-head h2{
    font-size:22px;
  }

  .afsm-form-card{
    padding:13px;
    border-radius:16px;
  }

  .afsm-form-group>span{
    font-size:11px;
  }

  .afsm-form-group input,
  .afsm-form-group select,
  .afsm-form-group textarea{
    border-radius:11px;
    font-size:12px;
  }

  .afsm-image-preview,
  .afsm-image-preview img{
    min-height:180px;
    height:180px;
  }

  .afsm-gallery-preview{
    gap:7px;
  }

  .afsm-check-row{
    border-radius:10px;
    padding:8px 9px;
  }

  /* review and notifications */
  .afsm-review-card{
    border-radius:16px;
  }

  .afsm-review-actions button{
    min-height:38px;
  }

  .afsm-notification-item{
    border-radius:14px;
  }

  /* settings */
  .afsm-settings-preview{
    display:none;
  }

  /* toast */
  .afsm-toast{
    bottom:88px;
    left:10px;
    right:10px;
    border-radius:13px;
    font-size:12px;
  }
}

@media(max-width:430px){
  .afsm-top-search input::placeholder{
    color:transparent;
  }

  .afsm-top-search{
    flex:1;
  }

  .afsm-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:375px){
  .afsm-content{
    padding-left:10px;
    padding-right:10px;
  }

  .afsm-kpis{
    grid-template-columns:1fr;
  }

  .afsm-kpi{
    min-height:auto;
    display:grid;
    grid-template-columns:38px 1fr;
    align-items:center;
  }

  .afsm-kpi>div:last-child{
    min-width:0;
  }

  .afsm-kpi small{
    display:none;
  }

  .afsm-top-actions .afsm-icon-btn{
    display:none;
  }

  .afsm-mobile-nav{
    left:6px;
    right:6px;
  }

  .afsm-mobile-nav a{
    font-size:8px;
  }
}

@supports(padding:max(0px)){
  @media(max-width:640px){
    .afsm-topbar{
      padding-top:env(safe-area-inset-top);
      height:calc(62px + env(safe-area-inset-top));
    }
  }
}


/* =========================================================
   v0.5.0 ANALYTICS + CUSTOMER DETAIL
   ========================================================= */
.afsm-dashboard-insights{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-bottom:18px}
.afsm-top-products{display:grid;gap:9px}.afsm-top-product-row{display:grid;grid-template-columns:32px 44px 1fr auto;align-items:center;gap:11px;padding:10px;border:1px solid #edf1f7;border-radius:14px;background:#fbfcff}.afsm-rank{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#efedff;color:#6557ff;font-size:11px;font-weight:800}.afsm-top-product-image img{width:44px;height:44px;object-fit:cover;border-radius:11px;display:block}.afsm-top-product-info{min-width:0}.afsm-top-product-info strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.afsm-top-product-info span{display:block;font-size:11px;color:var(--afsm-muted);margin-top:3px}.afsm-top-product-sales{text-align:right}.afsm-top-product-sales strong{display:block;font-size:15px}.afsm-top-product-sales span{display:block;font-size:10px;color:var(--afsm-muted);margin-top:2px}
.afsm-payment-breakdown{display:grid;gap:14px}.afsm-payment-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.afsm-payment-row-head strong{font-size:12px}.afsm-payment-row-head span{font-size:11px;color:#6f7890;font-weight:800}.afsm-progress{height:8px;border-radius:999px;background:#edf0f6;overflow:hidden}.afsm-progress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#6c63ff,#8d85ff)}.afsm-payment-row small{display:block;margin-top:5px;font-size:10px;color:var(--afsm-muted)}
.afsm-customer-detail-modal{padding:6px}.afsm-customer-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 4px 18px}.afsm-customer-hero-left{display:flex;align-items:center;gap:14px}.afsm-customer-hero-left img{border-radius:20px;width:72px;height:72px}.afsm-customer-hero h2{margin:7px 0 3px;font-size:26px}.afsm-customer-hero p{margin:0;color:var(--afsm-muted);font-size:12px}.afsm-customer-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.afsm-customer-stats>div{background:#fff;border:1px solid var(--afsm-line);border-radius:16px;padding:14px;box-shadow:var(--afsm-shadow)}.afsm-customer-stats span{display:block;color:var(--afsm-muted);font-size:11px;margin-bottom:5px}.afsm-customer-stats strong{display:block;font-size:17px}.afsm-customer-detail-grid{display:grid;grid-template-columns:.85fr 1.5fr;gap:16px}.afsm-customer-orders{display:grid;gap:8px}.afsm-customer-order-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:11px 12px;border:1px solid #edf1f7;border-radius:13px;background:#fbfcff}.afsm-customer-order-row>div strong{display:block;font-size:12px}.afsm-customer-order-row>div span{display:block;font-size:10px;color:var(--afsm-muted);margin-top:2px}.afsm-customer-order-row>strong{font-size:12px}
@media(max-width:1100px){.afsm-dashboard-insights{grid-template-columns:1fr}}
@media(max-width:760px){.afsm-dashboard-insights{gap:12px;margin-bottom:12px}.afsm-top-product-row{grid-template-columns:28px 40px 1fr auto;gap:8px;padding:9px}.afsm-top-product-image img{width:40px;height:40px}.afsm-customer-hero{align-items:flex-start;flex-direction:column}.afsm-customer-hero-left img{width:58px;height:58px;border-radius:16px}.afsm-customer-hero h2{font-size:22px}.afsm-customer-hero>.afsm-secondary-btn{width:100%}.afsm-customer-stats{grid-template-columns:1fr;gap:8px}.afsm-customer-detail-grid{grid-template-columns:1fr}.afsm-customer-order-row{grid-template-columns:1fr auto}.afsm-customer-order-row>strong{grid-column:2}}


/* =========================================================
   v0.5.1 PREMIUM KPI CARDS
   ========================================================= */

.afsm-kpis-premium{
  align-items:stretch;
}

.afsm-kpis-premium .afsm-kpi{
  position:relative;
  overflow:hidden;
  min-height:164px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
  padding:18px;
  border-radius:20px;
}

.afsm-kpis-premium .afsm-kpi-primary{
  color:#fff;
  border:1px solid rgba(99,87,255,.12);
  background:
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.22), transparent 25%),
    radial-gradient(circle at 10% 100%, rgba(75,224,180,.14), transparent 30%),
    linear-gradient(135deg,#6258f6 0%,#7468ff 52%,#5f56ee 100%);
  box-shadow:
    0 18px 42px rgba(92,80,239,.24),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.afsm-kpi-glow{
  position:absolute;
  right:-26px;
  bottom:-45px;
  width:150px;
  height:150px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  filter:blur(2px);
  pointer-events:none;
}

.afsm-kpis-premium .afsm-kpi-premium-card{
  background:
    linear-gradient(180deg,rgba(255,255,255,.98),rgba(252,253,255,.98));
  border:1px solid #e7ebf3;
  box-shadow:
    0 12px 32px rgba(31,43,66,.055),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.afsm-kpis-premium .afsm-kpi-premium-card:hover,
.afsm-kpis-premium .afsm-kpi-primary:hover{
  transform:translateY(-3px);
}

.afsm-kpi-top{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.afsm-kpis-premium .afsm-kpi-icon{
  width:46px;
  height:46px;
  border-radius:15px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}

.afsm-kpis-premium .afsm-kpi-primary .afsm-kpi-icon{
  color:#fff;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(8px);
}

.afsm-kpi-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  backdrop-filter:blur(8px);
}

.afsm-kpi-chip.soft-blue{
  background:#eef1ff;
  border-color:#e5e9ff;
  color:#5868dd;
}

.afsm-kpi-chip.soft-orange{
  background:#fff3e4;
  border-color:#ffe8c8;
  color:#d98a18;
}

.afsm-kpi-chip.soft-red{
  background:#fff0f4;
  border-color:#ffdce5;
  color:#d94569;
}

.afsm-kpi-body{
  position:relative;
  z-index:2;
  min-width:0;
}

.afsm-kpi-label{
  display:block;
  margin-bottom:7px;
  color:#7d8798;
  font-size:12px;
  font-weight:700;
}

.afsm-kpi-primary .afsm-kpi-label{
  color:rgba(255,255,255,.78);
}

.afsm-kpi-value{
  display:block;
  margin:0!important;
  font-size:28px!important;
  line-height:1.08!important;
  font-weight:800!important;
  letter-spacing:-.6px;
  color:#172033;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.afsm-kpi-primary .afsm-kpi-value{
  color:#fff!important;
  text-shadow:0 2px 12px rgba(29,24,100,.18);
}

.afsm-kpi-meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:9px;
  color:#8a93a5;
  font-size:10.5px;
  line-height:1.3;
}

.afsm-kpi-primary .afsm-kpi-meta{
  color:rgba(255,255,255,.72);
}

.afsm-live-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#52e6ad;
  box-shadow:0 0 0 4px rgba(82,230,173,.13);
  flex:none;
}

@media(max-width:1180px){
  .afsm-kpis-premium .afsm-kpi{
    min-height:150px;
  }
  .afsm-kpi-value{
    font-size:25px!important;
  }
}

@media(max-width:640px){
  .afsm-kpis-premium{
    gap:10px;
  }

  .afsm-kpis-premium .afsm-kpi{
    min-height:146px;
    padding:14px;
    gap:13px;
    border-radius:17px;
  }

  .afsm-kpis-premium .afsm-kpi-icon{
    width:40px;
    height:40px;
    border-radius:13px;
  }

  .afsm-kpi-chip{
    min-height:24px;
    padding:0 8px;
    font-size:9px;
  }

  .afsm-kpi-label{
    font-size:10.5px;
    margin-bottom:5px;
  }

  .afsm-kpi-value{
    font-size:21px!important;
    letter-spacing:-.35px;
  }

  .afsm-kpi-meta{
    margin-top:7px;
    font-size:9.5px;
  }
}

@media(max-width:375px){
  .afsm-kpis-premium .afsm-kpi{
    min-height:auto;
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }

  .afsm-kpi-value{
    white-space:normal;
  }
}


/* =========================================================
   v0.5.2 SIMPLE LARGE REVENUE
   Keep card design clean; only emphasize revenue.
   ========================================================= */

.afsm-kpis-simple .afsm-kpi{
  min-height:132px;
}

/* Revenue card stays clean and consistent with the other KPI cards */
.afsm-kpi-sales{
  background:#fff!important;
  color:var(--afsm-ink)!important;
  border:1px solid var(--afsm-line)!important;
  box-shadow:var(--afsm-shadow)!important;
}

.afsm-kpi-sales .afsm-kpi-content{
  min-width:0;
}

/* Make the WooCommerce formatted currency visibly larger */
.afsm-kpi-sales .afsm-sales-value{
  display:block;
  margin:6px 0 7px!important;
  font-size:34px!important;
  line-height:1.05!important;
  font-weight:800!important;
  letter-spacing:-1px;
  color:#172033!important;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}

/* WooCommerce wraps currency symbol inside this span */
.afsm-kpi-sales .afsm-sales-value .woocommerce-Price-currencySymbol{
  font-size:.62em;
  font-weight:800;
  vertical-align:baseline;
  margin-right:3px;
}

/* Neutralize the previous premium-primary styling if browser cache still sees both classes */
.afsm-kpi-sales .afsm-kpi-glow,
.afsm-kpi-sales .afsm-kpi-chip,
.afsm-kpi-sales .afsm-live-dot{
  display:none!important;
}

@media(max-width:1180px){
  .afsm-kpi-sales .afsm-sales-value{
    font-size:30px!important;
  }
}

@media(max-width:640px){
  .afsm-kpis-simple .afsm-kpi{
    min-height:128px;
  }

  .afsm-kpi-sales .afsm-sales-value{
    font-size:27px!important;
    letter-spacing:-.6px;
  }

  .afsm-kpi-sales .afsm-sales-value .woocommerce-Price-currencySymbol{
    font-size:.66em;
  }
}

@media(max-width:375px){
  .afsm-kpi-sales .afsm-sales-value{
    font-size:25px!important;
    white-space:normal;
  }
}


/* =========================================================
   v0.6.0 REPORTS PRO
   ========================================================= */
.afsm-report-filter{
  display:flex;
  align-items:end;
  gap:10px;
  flex-wrap:wrap;
  padding:14px;
  margin-bottom:12px;
  background:#fff;
  border:1px solid var(--afsm-line);
  border-radius:16px;
  box-shadow:var(--afsm-shadow);
}
.afsm-report-filter label{
  display:grid;
  gap:6px;
  min-width:180px;
}
.afsm-report-filter label>span{
  font-size:10px;
  font-weight:800;
  color:#778198;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.afsm-report-filter input{
  height:42px;
  border:1px solid #e4e8f1;
  border-radius:11px;
  padding:0 11px;
  background:#fbfcfe;
  color:var(--afsm-ink);
  outline:none;
}
.afsm-report-filter input:focus{
  border-color:#bbb6ff;
  box-shadow:0 0 0 4px rgba(108,99,255,.07);
  background:#fff;
}
.afsm-reset-report{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  padding:0 8px;
  text-decoration:none;
}
.afsm-report-period{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 14px;
  color:#7b8599;
  font-size:11px;
}
.afsm-report-period strong{
  color:#303a4e;
}
.afsm-report-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-bottom:18px;
}
.afsm-report-top-list{
  display:grid;
  gap:8px;
}
.afsm-report-product,
.afsm-report-customer{
  display:grid;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border:1px solid #edf1f7;
  border-radius:13px;
  background:#fbfcff;
}
.afsm-report-product{
  grid-template-columns:30px 42px 1fr auto;
}
.afsm-report-customer{
  grid-template-columns:30px 1fr auto;
}
.afsm-report-product>div:not(.afsm-top-product-image),
.afsm-report-customer>div{
  min-width:0;
}
.afsm-report-product div>strong,
.afsm-report-customer div>strong{
  display:block;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-report-product div>span,
.afsm-report-customer div>span{
  display:block;
  color:var(--afsm-muted);
  font-size:10px;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-report-product>strong,
.afsm-report-customer>strong{
  font-size:12px;
  text-align:right;
}
.afsm-status-breakdown{
  display:grid;
  gap:12px;
}
.afsm-status-breakdown-row{
  display:grid;
  grid-template-columns:minmax(130px,.6fr) minmax(180px,1.5fr) 48px;
  gap:13px;
  align-items:center;
}
.afsm-status-breakdown-row>div:first-child strong{
  display:block;
  font-size:12px;
}
.afsm-status-breakdown-row>div:first-child span{
  display:block;
  color:var(--afsm-muted);
  font-size:10px;
  margin-top:2px;
}
.afsm-status-breakdown-row>strong{
  text-align:right;
  font-size:11px;
}
@media(max-width:980px){
  .afsm-report-grid{grid-template-columns:1fr}
}
@media(max-width:640px){
  .afsm-report-filter{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:12px;
  }
  .afsm-report-filter label{min-width:0}
  .afsm-report-filter .afsm-primary-btn{
    grid-column:1/-1;
  }
  .afsm-reset-report{
    grid-column:1/-1;
    justify-content:center;
  }
  .afsm-report-period{
    display:block;
    line-height:1.6;
  }
  .afsm-report-period span,
  .afsm-report-period strong{
    display:block;
  }
  .afsm-report-grid{gap:12px;margin-bottom:12px}
  .afsm-report-product{grid-template-columns:28px 38px 1fr}
  .afsm-report-product>strong{grid-column:3}
  .afsm-report-customer{grid-template-columns:28px 1fr}
  .afsm-report-customer>strong{grid-column:2}
  .afsm-status-breakdown-row{
    grid-template-columns:1fr 42px;
    gap:7px;
  }
  .afsm-status-breakdown-row .afsm-progress{
    grid-column:1/-1;
    grid-row:2;
  }
}


/* =========================================================
   v0.7.0 GLOBAL SEARCH + QUICK ACTIONS
   ========================================================= */

.afsm-top-search{
  position:relative;
}

.afsm-global-results{
  position:absolute;
  z-index:200;
  top:calc(100% + 10px);
  left:0;
  width:min(520px,78vw);
  max-height:520px;
  overflow:auto;
  padding:9px;
  background:#fff;
  border:1px solid #e6eaf2;
  border-radius:17px;
  box-shadow:0 24px 60px rgba(24,35,60,.16);
}

.afsm-search-group{
  display:grid;
  gap:4px;
  padding:4px;
}
.afsm-search-group + .afsm-search-group{
  border-top:1px solid #eef1f6;
  margin-top:5px;
  padding-top:9px;
}
.afsm-search-group>span{
  padding:3px 7px 5px;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#929bae;
}
.afsm-search-result{
  display:grid;
  grid-template-columns:36px 1fr;
  gap:10px;
  align-items:center;
  min-width:0;
  padding:8px;
  color:inherit;
  text-decoration:none;
  border-radius:11px;
}
.afsm-search-result:hover{
  background:#f7f8fc;
}
.afsm-search-result img,
.afsm-search-result-icon{
  width:36px;
  height:36px;
  border-radius:10px;
}
.afsm-search-result img{
  object-fit:cover;
  display:block;
}
.afsm-search-result-icon{
  display:grid;
  place-items:center;
  font-size:11px;
  font-weight:800;
}
.afsm-search-result-icon.order{
  color:#5b63df;
  background:#eef0ff;
}
.afsm-search-result-icon.customer{
  color:#168f65;
  background:#eaf9f3;
}
.afsm-search-result div:last-child{
  min-width:0;
}
.afsm-search-result strong{
  display:block;
  font-size:11.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-search-result small{
  display:block;
  margin-top:3px;
  font-size:9.5px;
  color:#8993a6;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-search-empty{
  padding:22px 14px;
  text-align:center;
  color:#8b95a8;
  font-size:11px;
}

.afsm-icon-btn{
  position:relative;
}
.afsm-header-notification-badge{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border:2px solid #fff;
  border-radius:999px;
  background:#ee496b;
  color:#fff;
  font-size:8px;
  line-height:1;
  font-weight:800;
  box-shadow:0 4px 10px rgba(238,73,107,.25);
}

.afsm-quick-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.afsm-quick-action{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:68px;
  padding:11px 12px;
  background:#fff;
  border:1px solid #e8ecf3;
  border-radius:15px;
  color:inherit;
  text-decoration:none;
  box-shadow:0 7px 22px rgba(31,43,66,.035);
  transition:.18s ease;
}
.afsm-quick-action:hover{
  transform:translateY(-2px);
  border-color:#dfe3ee;
  box-shadow:0 12px 28px rgba(31,43,66,.07);
}
.afsm-quick-icon{
  width:38px;
  height:38px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:12px;
}
.afsm-quick-icon svg{
  width:18px;
  height:18px;
}
.afsm-quick-icon.purple{background:#efedff;color:#6659ef}
.afsm-quick-icon.blue{background:#edf5ff;color:#3f7ee8}
.afsm-quick-icon.orange{background:#fff3e5;color:#dc8a22}
.afsm-quick-icon.green{background:#eaf9f2;color:#1a9b6d}
.afsm-quick-action div{
  min-width:0;
}
.afsm-quick-action strong{
  display:block;
  font-size:11.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.afsm-quick-action span:not(.afsm-quick-icon){
  display:block;
  margin-top:3px;
  color:#8a94a7;
  font-size:9.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:1180px){
  .afsm-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:640px){
  .afsm-global-results{
    position:fixed;
    top:67px;
    left:10px;
    right:10px;
    width:auto;
    max-height:calc(100dvh - 160px);
    border-radius:16px;
  }

  .afsm-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
  }

  .afsm-quick-action{
    min-height:62px;
    padding:9px;
    border-radius:14px;
    gap:8px;
  }

  .afsm-quick-icon{
    width:34px;height:34px;border-radius:11px;
  }

  .afsm-quick-icon svg{
    width:16px;height:16px;
  }

  .afsm-quick-action strong{
    font-size:10.5px;
  }

  .afsm-quick-action span:not(.afsm-quick-icon){
    font-size:8.5px;
  }
}

@media(max-width:375px){
  .afsm-quick-actions{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   v0.7.1 WOOCOMMERCE CURRENCY INLINE FIX
   Prevent global KPI span rules from breaking Rp to new line.
   ========================================================= */

.afsm-kpi strong .woocommerce-Price-amount,
.afsm-kpi strong .woocommerce-Price-amount bdi,
.afsm-kpi strong .woocommerce-Price-currencySymbol,
.afsm-sales-value .woocommerce-Price-amount,
.afsm-sales-value .woocommerce-Price-amount bdi,
.afsm-sales-value .woocommerce-Price-currencySymbol{
  display:inline!important;
  white-space:nowrap!important;
}

.afsm-kpi strong .woocommerce-Price-currencySymbol,
.afsm-sales-value .woocommerce-Price-currencySymbol{
  margin-right:4px!important;
  vertical-align:baseline!important;
}

/* Keep the revenue number visually aligned as one unit */
.afsm-sales-value{
  display:flex!important;
  align-items:baseline;
  gap:0;
  flex-wrap:nowrap;
}

.afsm-sales-value .woocommerce-Price-amount{
  display:inline-flex!important;
  align-items:baseline;
  white-space:nowrap!important;
}

@media(max-width:640px){
  .afsm-kpi strong .woocommerce-Price-amount,
  .afsm-kpi strong .woocommerce-Price-amount bdi,
  .afsm-kpi strong .woocommerce-Price-currencySymbol,
  .afsm-sales-value .woocommerce-Price-amount,
  .afsm-sales-value .woocommerce-Price-amount bdi,
  .afsm-sales-value .woocommerce-Price-currencySymbol{
    white-space:nowrap!important;
  }
}


/* =========================================================
   v0.7.2 MONEY KPI SIZE CONSISTENCY
   Currency KPIs match the visual weight of numeric KPIs.
   ========================================================= */

/* All KPI monetary values */
.afsm-kpi strong .woocommerce-Price-amount{
  display:inline-flex!important;
  align-items:baseline!important;
  font-size:30px!important;
  line-height:1.05!important;
  font-weight:800!important;
  letter-spacing:-.55px!important;
  color:#172033!important;
  white-space:nowrap!important;
}

.afsm-kpi strong .woocommerce-Price-amount bdi{
  display:inline-flex!important;
  align-items:baseline!important;
  white-space:nowrap!important;
}

.afsm-kpi strong .woocommerce-Price-currencySymbol{
  display:inline!important;
  font-size:.56em!important;
  line-height:1!important;
  font-weight:800!important;
  margin-right:4px!important;
  vertical-align:baseline!important;
}

/* Penjualan Hari Ini: match the same scale exactly */
.afsm-kpi-sales .afsm-sales-value{
  display:block!important;
  margin:6px 0 7px!important;
  font-size:30px!important;
  line-height:1.05!important;
  font-weight:800!important;
  letter-spacing:-.55px!important;
  color:#172033!important;
}

.afsm-kpi-sales .afsm-sales-value .woocommerce-Price-amount{
  font-size:30px!important;
}

.afsm-kpi-sales .afsm-sales-value .woocommerce-Price-currencySymbol{
  font-size:.56em!important;
}

/* Zero value should still look as strong as 10 / 42 / 0 */
.afsm-kpi-sales .afsm-sales-value,
.afsm-report-kpis .afsm-kpi strong{
  min-height:32px;
}

/* Tablet */
@media(max-width:1180px){
  .afsm-kpi strong .woocommerce-Price-amount,
  .afsm-kpi-sales .afsm-sales-value,
  .afsm-kpi-sales .afsm-sales-value .woocommerce-Price-amount{
    font-size:27px!important;
  }
}

/* Phone */
@media(max-width:640px){
  .afsm-kpi strong .woocommerce-Price-amount,
  .afsm-kpi-sales .afsm-sales-value,
  .afsm-kpi-sales .afsm-sales-value .woocommerce-Price-amount{
    font-size:23px!important;
  }

  .afsm-kpi strong .woocommerce-Price-currencySymbol,
  .afsm-kpi-sales .afsm-sales-value .woocommerce-Price-currencySymbol{
    font-size:.58em!important;
  }
}


/* =========================================================
   v0.8.0 ORDERS PRO
   ========================================================= */
.afsm-order-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.afsm-order-summary>div{padding:12px 14px;background:#fff;border:1px solid #e9edf4;border-radius:14px;box-shadow:0 7px 20px rgba(31,43,66,.035)}
.afsm-order-summary span{display:block;color:#8a94a7;font-size:10px;font-weight:700}
.afsm-order-summary strong{display:block;margin-top:4px;color:#172033;font-size:19px}
.afsm-order-status-tabs{display:flex;gap:7px;overflow-x:auto;padding:2px 0 10px;margin-bottom:4px;scrollbar-width:none}
.afsm-order-status-tabs::-webkit-scrollbar{display:none}
.afsm-order-status-tabs button{flex:none;min-height:36px;padding:0 13px;border:1px solid #e5e9f1;border-radius:999px;background:#fff;color:#768097;font-size:10.5px;font-weight:800;cursor:pointer}
.afsm-order-status-tabs button.active{color:#5e54e9;border-color:#ded9ff;background:#f1efff}
.afsm-order-tools{display:grid;grid-template-columns:minmax(260px,1fr) 190px 160px auto;gap:9px;align-items:center;margin-bottom:12px}
.afsm-order-tools .afsm-field{min-width:0}
.afsm-order-tools input[type="date"]{height:42px;border:1px solid #e4e8f1;border-radius:11px;background:#fff;padding:0 10px;color:#465066}
.afsm-bulk-order-bar{display:flex;align-items:center;gap:10px;padding:11px 12px;margin-bottom:12px;background:linear-gradient(180deg,#f8f7ff,#f4f2ff);border:1px solid #e4e0ff;border-radius:14px}
.afsm-bulk-order-bar>div{flex:1;min-width:0}.afsm-bulk-order-bar strong{display:block;font-size:11.5px;color:#403786}.afsm-bulk-order-bar>div>span{display:block;margin-top:2px;color:#857eaa;font-size:9.5px}
.afsm-bulk-order-bar select{min-width:170px;height:40px;border:1px solid #dfdbff;border-radius:10px;padding:0 10px;background:#fff;color:#4a4568;font-size:11px}
.afsm-check-col{width:42px!important;min-width:42px!important;text-align:center!important}.afsm-check-col input{width:16px;height:16px;accent-color:#6c63ff;cursor:pointer}
@media(max-width:1100px){.afsm-order-tools{grid-template-columns:1fr 1fr}.afsm-order-tools .afsm-field{grid-column:1/-1}}
@media(max-width:640px){.afsm-order-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.afsm-order-summary>div{padding:10px 11px;border-radius:13px}.afsm-order-summary strong{font-size:17px}.afsm-order-tools{grid-template-columns:1fr;gap:8px}.afsm-order-tools .afsm-field{grid-column:auto}.afsm-bulk-order-bar{display:grid;grid-template-columns:1fr;gap:8px}.afsm-bulk-order-bar select,.afsm-bulk-order-bar .afsm-primary-btn{width:100%}}


/* =========================================================
   v0.8.1 STABILITY AUDIT
   ========================================================= */
.afsm-bulk-order-bar[hidden]{
  display:none!important;
}

.afsm-orders-table tbody tr[style*="display: none"]{
  display:none!important;
}

@media(min-width:901px){
  .afsm-orders-table thead th{
    position:sticky;
    top:0;
    z-index:3;
    background:#fff;
  }
}


/* =========================================================
   v0.8.2 ORDER DETAIL PREMIUM POLISH
   ========================================================= */

.afsm-order-detail{
  max-width:100%;
}

.afsm-order-detail-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding:4px 4px 18px;
}

.afsm-order-detail-top>div:first-child{
  min-width:0;
}

.afsm-order-detail-top h2{
  margin:10px 0 7px;
  font-size:34px;
  line-height:1;
  letter-spacing:-.8px;
}

.afsm-order-detail-top p{
  margin:0;
  font-size:12px;
  color:#7d8799;
}

.afsm-order-head-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:11px;
}

.afsm-order-head-meta span{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:0 9px;
  border-radius:999px;
  background:#f3f5f9;
  border:1px solid #e8ecf3;
  color:#687389;
  font-size:9.5px;
  font-weight:800;
}

.afsm-order-detail-actions{
  display:grid;
  grid-template-columns:auto auto minmax(190px,220px);
  align-items:stretch;
  gap:10px;
  flex:none;
}

.afsm-order-detail-actions .afsm-secondary-btn{
  min-height:52px;
  padding:0 17px;
  align-self:stretch;
}

.afsm-order-detail-total{
  min-width:190px;
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:12px 17px;
  border:1px solid #e5e9f1;
  border-radius:17px;
  background:#fff;
  box-shadow:0 10px 28px rgba(29,42,69,.06);
}

.afsm-order-detail-total>span{
  display:block;
  color:#7d8799;
  font-size:10.5px;
  margin-bottom:6px;
}

.afsm-order-grand-total{
  display:block!important;
  font-size:22px!important;
  line-height:1.05!important;
  font-weight:800!important;
  color:#172033!important;
  white-space:nowrap!important;
}

.afsm-order-grand-total .woocommerce-Price-amount,
.afsm-order-grand-total .woocommerce-Price-amount bdi{
  display:inline-flex!important;
  align-items:baseline!important;
  white-space:nowrap!important;
  font-size:22px!important;
}

.afsm-order-grand-total .woocommerce-Price-currencySymbol{
  display:inline!important;
  font-size:.62em!important;
  margin-right:4px!important;
}

.afsm-order-status-flow{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:12px 0 22px;
}

.afsm-flow-step{
  position:relative;
  min-height:62px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  background:#fff;
  border:1px solid #e6eaf2;
  border-radius:15px;
}

.afsm-flow-step span{
  width:20px;
  height:20px;
  flex:none;
  border-radius:50%;
  border:2px solid #d5dce8;
  background:#fff;
  position:relative;
}

.afsm-flow-step em{
  color:#7e889b;
  font-size:11px;
  font-style:normal;
  font-weight:800;
}

.afsm-flow-step.done{
  border-color:#d9efe5;
  background:#fbfefc;
}

.afsm-flow-step.done span{
  border-color:#35b87b;
  background:#35b87b;
}

.afsm-flow-step.done span:after{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:5px;
  height:9px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.afsm-flow-step.active{
  border-color:#dcd7ff;
  background:#f7f5ff;
  box-shadow:0 7px 18px rgba(99,87,238,.07);
}

.afsm-flow-step.active span{
  border-color:#6c63ff;
  box-shadow:0 0 0 4px rgba(108,99,255,.1);
}

.afsm-flow-step.active span:after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:50%;
  background:#6c63ff;
}

.afsm-flow-step.active em{
  color:#5c53d7;
}

.afsm-order-detail-grid{
  display:grid;
  grid-template-columns:minmax(270px,.75fr) minmax(460px,1.35fr) minmax(300px,.78fr);
  gap:16px;
  align-items:start;
}

.afsm-detail-panel{
  border:1px solid #e7ebf2;
  border-radius:19px;
  background:#fff;
  padding:18px;
  box-shadow:0 9px 28px rgba(31,43,66,.045);
}

.afsm-detail-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:15px;
}

.afsm-detail-panel-head h3{
  margin:0;
  font-size:15px;
  letter-spacing:-.2px;
}

.afsm-detail-panel-head>span{
  color:#8178a9;
  font-size:10px;
}

.afsm-customer-detail{
  padding-bottom:15px;
  border-bottom:1px solid #edf0f5;
}

.afsm-customer-detail img{
  border-radius:15px;
}

.afsm-customer-detail strong{
  font-size:13px;
}

.afsm-customer-detail span{
  font-size:10.5px;
  color:#7e879a;
  line-height:1.5;
}

.afsm-address-box{
  margin-top:14px;
  padding:13px 14px;
  background:#f8f9fc;
  border:1px solid #edf0f5;
  border-radius:14px;
  color:#526078;
  font-size:11px;
  line-height:1.65;
}

.afsm-address-label{
  display:block;
  margin-bottom:6px;
  color:#8d96a8;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.afsm-order-items{
  display:grid;
  gap:8px;
}

.afsm-order-item{
  grid-template-columns:54px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:10px 11px;
  border:1px solid #edf1f6;
  border-radius:14px;
  background:#fafbfe;
}

.afsm-order-item-image img{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:12px;
}

.afsm-order-item-info{
  min-width:0;
}

.afsm-order-item-info strong{
  display:block;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.afsm-order-item-info span{
  display:block;
  margin-top:5px;
  color:#8790a2;
  font-size:10px;
}

.afsm-order-item>strong{
  font-size:12px;
  white-space:nowrap;
}

.afsm-order-totals{
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid #e9edf3;
}

.afsm-order-totals>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:6px 0;
  color:#798398;
  font-size:11px;
}

.afsm-order-totals>div strong{
  color:#687287;
}

.afsm-order-totals>div.total{
  margin-top:4px;
  padding-top:10px;
  border-top:1px dashed #dfe4ec;
  color:#111b2e;
  font-size:14px;
  font-weight:800;
}

.afsm-order-totals>div.total strong{
  color:#111b2e;
  font-size:15px;
}

.afsm-meta-list{
  display:grid;
  gap:8px;
}

.afsm-meta-list>div{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:#f7f8fc;
  border-radius:13px;
}

.afsm-meta-list>div span{
  color:#80899d;
  font-size:10.5px;
}

.afsm-meta-list>div strong{
  color:#172033;
  font-size:11px;
  text-align:right;
}

.afsm-order-ops{
  margin-top:14px;
  padding-top:14px;
}

.afsm-order-ops label>span{
  margin-bottom:1px;
}

.afsm-order-ops input,
.afsm-order-ops textarea{
  min-height:44px;
  border-radius:12px;
}

.afsm-order-ops textarea{
  min-height:84px;
  resize:vertical;
}

.afsm-order-ops .afsm-primary-btn{
  width:100%;
  min-height:44px;
}

@media(max-width:1250px){
  .afsm-order-detail-grid{
    grid-template-columns:minmax(260px,.85fr) minmax(420px,1.35fr);
  }

  .afsm-order-detail-grid>.afsm-detail-panel:last-child{
    grid-column:1/-1;
  }

  .afsm-order-detail-actions{
    grid-template-columns:auto auto;
  }

  .afsm-order-detail-total{
    grid-column:1/-1;
  }
}

@media(max-width:900px){
  .afsm-order-detail-top{
    flex-direction:column;
  }

  .afsm-order-detail-actions{
    width:100%;
    grid-template-columns:1fr 1fr;
  }

  .afsm-order-detail-total{
    width:100%;
  }

  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
  }

  .afsm-order-detail-grid>.afsm-detail-panel:last-child{
    grid-column:auto;
  }
}

@media(max-width:640px){
  .afsm-order-detail{
    padding-top:6px;
  }

  .afsm-order-detail-top h2{
    font-size:29px;
  }

  .afsm-order-detail-actions{
    grid-template-columns:1fr 1fr;
  }

  .afsm-order-detail-actions .afsm-secondary-btn{
    min-height:44px;
  }

  .afsm-order-detail-total{
    grid-column:1/-1;
    min-width:0;
    min-height:70px;
  }

  .afsm-order-grand-total,
  .afsm-order-grand-total .woocommerce-Price-amount{
    font-size:21px!important;
  }

  .afsm-order-status-flow{
    display:flex;
    overflow-x:auto;
    gap:8px;
    padding-bottom:4px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }

  .afsm-order-status-flow::-webkit-scrollbar{
    display:none;
  }

  .afsm-flow-step{
    flex:0 0 145px;
    min-height:56px;
    padding:0 12px;
    scroll-snap-align:start;
  }

  .afsm-detail-panel{
    padding:14px;
    border-radius:16px;
  }

  .afsm-order-item{
    grid-template-columns:46px 1fr;
    gap:9px;
  }

  .afsm-order-item-image img{
    width:46px;
    height:46px;
  }

  .afsm-order-item>strong{
    grid-column:2;
    justify-self:start;
  }
}


/* =========================================================
   v0.8.3 ORDER DETAIL TIMELINE + COMPACT HEADER
   ========================================================= */

/* Header action area: compact and balanced */
.afsm-order-detail-actions{
  display:grid!important;
  grid-template-columns:auto auto minmax(210px,240px)!important;
  align-items:center!important;
  gap:10px!important;
}

.afsm-order-detail-actions .afsm-secondary-btn,
.afsm-order-detail-actions .afsm-wa-btn{
  min-height:44px!important;
  height:44px!important;
  padding:0 16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  border-radius:13px!important;
  white-space:nowrap;
}

.afsm-order-detail-total{
  min-height:74px!important;
  justify-content:center!important;
  padding:12px 18px!important;
}

.afsm-order-grand-total{
  font-size:24px!important;
}
.afsm-order-grand-total .woocommerce-Price-amount{
  font-size:24px!important;
}

/* Premium horizontal timeline */
.afsm-order-status-flow{
  position:relative;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:18px 0 24px!important;
  padding:0!important;
}

.afsm-order-status-flow:before{
  content:"";
  position:absolute;
  left:7%;
  right:7%;
  top:31px;
  height:2px;
  background:#e3e7ef;
  z-index:0;
}

.afsm-flow-step{
  position:relative!important;
  z-index:1;
  min-height:84px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:12px 10px!important;
  background:#fff!important;
  border:1px solid #e6eaf2!important;
  border-radius:16px!important;
  box-shadow:0 7px 18px rgba(30,42,70,.035)!important;
}

.afsm-flow-step span{
  width:26px!important;
  height:26px!important;
  border:2px solid #d4dbe7!important;
  background:#fff!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step em{
  font-size:11px!important;
  font-weight:800!important;
  color:#7b8598!important;
  text-align:center;
}

.afsm-flow-step.done{
  background:#fbfefc!important;
  border-color:#d9eee4!important;
}

.afsm-flow-step.done span{
  background:#34b77b!important;
  border-color:#34b77b!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step.done span:after{
  left:7px!important;
  top:4px!important;
  width:6px!important;
  height:10px!important;
}

.afsm-flow-step.done em{
  color:#378a67!important;
}

.afsm-flow-step.active{
  background:#f7f5ff!important;
  border-color:#d9d4ff!important;
  box-shadow:0 9px 22px rgba(95,82,235,.08)!important;
}

.afsm-flow-step.active span{
  border-color:#6c63ff!important;
  box-shadow:
    0 0 0 6px #fff,
    0 0 0 9px rgba(108,99,255,.08)!important;
}

.afsm-flow-step.active span:after{
  inset:5px!important;
  background:#6c63ff!important;
}

.afsm-flow-step.active em{
  color:#5d52df!important;
}

/* Fill connector behind completed/current steps visually */
.afsm-flow-step.done:after{
  content:"";
  position:absolute;
  top:30px;
  left:50%;
  width:calc(100% + 12px);
  height:2px;
  background:#8fd4b6;
  z-index:-1;
}

.afsm-flow-step:last-child.done:after{
  display:none;
}

/* Better header proportions on medium screens */
@media(max-width:1250px){
  .afsm-order-detail-actions{
    grid-template-columns:auto auto minmax(190px,1fr)!important;
    width:100%;
  }
}

@media(max-width:900px){
  .afsm-order-detail-actions{
    grid-template-columns:1fr 1fr!important;
  }

  .afsm-order-detail-total{
    grid-column:1/-1!important;
    width:100%!important;
  }
}

/* Mobile: timeline becomes swipeable cards but stays aligned */
@media(max-width:640px){
  .afsm-order-detail-actions .afsm-secondary-btn,
  .afsm-order-detail-actions .afsm-wa-btn{
    width:100%!important;
    min-height:42px!important;
    height:42px!important;
  }

  .afsm-order-status-flow{
    display:flex!important;
    overflow-x:auto!important;
    gap:9px!important;
    padding:2px 1px 6px!important;
    margin-top:14px!important;
    scroll-snap-type:x proximity;
  }

  .afsm-order-status-flow:before{
    display:none!important;
  }

  .afsm-flow-step{
    flex:0 0 138px!important;
    min-height:76px!important;
    scroll-snap-align:start;
  }

  .afsm-flow-step.done:after{
    display:none!important;
  }

  .afsm-flow-step span{
    width:24px!important;
    height:24px!important;
  }
}


/* =========================================================
   v0.8.4 ORDER TIMELINE LABEL FIX
   Prevent status labels from being clipped/overlapped.
   ========================================================= */

.afsm-order-status-flow{
  position:relative!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  overflow:visible!important;
}

.afsm-order-status-flow:before{
  content:""!important;
  position:absolute!important;
  left:6%!important;
  right:6%!important;
  top:50%!important;
  height:2px!important;
  transform:translateY(-50%)!important;
  background:#e2e7ef!important;
  z-index:0!important;
}

.afsm-flow-step{
  position:relative!important;
  z-index:1!important;
  min-width:0!important;
  min-height:74px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  padding:14px 16px!important;
  overflow:visible!important;
  background:#fff!important;
  border:1px solid #e6eaf2!important;
  border-radius:16px!important;
  box-shadow:0 7px 18px rgba(30,42,70,.035)!important;
}

.afsm-flow-step span{
  position:relative!important;
  z-index:2!important;
  flex:0 0 25px!important;
  width:25px!important;
  height:25px!important;
  margin:0!important;
  border-radius:50%!important;
  border:2px solid #d5dce8!important;
  background:#fff!important;
  box-shadow:0 0 0 5px #fff!important;
}

.afsm-flow-step em{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:#7e889b!important;
  font-size:11px!important;
  line-height:1.25!important;
  font-style:normal!important;
  font-weight:800!important;
  text-align:left!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

.afsm-flow-step.done{
  background:#fbfefc!important;
  border-color:#d8eee3!important;
}

.afsm-flow-step.done span{
  background:#35b87b!important;
  border-color:#35b87b!important;
  box-shadow:0 0 0 5px #fff!important;
}

.afsm-flow-step.done span:after{
  content:""!important;
  position:absolute!important;
  left:7px!important;
  top:4px!important;
  width:6px!important;
  height:10px!important;
  border:solid #fff!important;
  border-width:0 2px 2px 0!important;
  transform:rotate(45deg)!important;
}

.afsm-flow-step.done em{
  color:#338763!important;
}

.afsm-flow-step.active{
  background:#f7f5ff!important;
  border-color:#d7d2ff!important;
  box-shadow:0 9px 22px rgba(95,82,235,.08)!important;
}

.afsm-flow-step.active span{
  border-color:#6c63ff!important;
  background:#fff!important;
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 8px rgba(108,99,255,.10)!important;
}

.afsm-flow-step.active span:after{
  content:""!important;
  position:absolute!important;
  inset:5px!important;
  border-radius:50%!important;
  background:#6c63ff!important;
}

.afsm-flow-step.active em{
  color:#5c52dc!important;
}

/* Remove previous per-card connector that caused overlap */
.afsm-flow-step.done:after{
  display:none!important;
}

/* Keep cards readable when dialog gets narrower */
@media(max-width:1180px){
  .afsm-order-status-flow{
    gap:9px!important;
  }

  .afsm-flow-step{
    padding:12px 11px!important;
    gap:8px!important;
  }

  .afsm-flow-step em{
    font-size:10.5px!important;
  }
}

/* Mobile: simple horizontal chips, no global connector line */
@media(max-width:640px){
  .afsm-order-status-flow{
    display:flex!important;
    gap:8px!important;
    overflow-x:auto!important;
    padding:2px 1px 6px!important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }

  .afsm-order-status-flow::-webkit-scrollbar{
    display:none;
  }

  .afsm-order-status-flow:before{
    display:none!important;
  }

  .afsm-flow-step{
    flex:0 0 142px!important;
    min-height:62px!important;
    padding:11px 12px!important;
    justify-content:flex-start!important;
    scroll-snap-align:start;
  }

  .afsm-flow-step em{
    font-size:10.5px!important;
  }

  .afsm-flow-step span{
    flex-basis:23px!important;
    width:23px!important;
    height:23px!important;
  }
}


/* =========================================================
   v0.8.5 TIMELINE CLEAN ALIGNMENT
   Rapikan layout status step agar icon + label tidak tabrakan.
   ========================================================= */

.afsm-order-status-flow{
  position:relative!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  overflow:visible!important;
}

.afsm-order-status-flow:before{
  content:""!important;
  position:absolute!important;
  left:7%!important;
  right:7%!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  height:2px!important;
  background:#e4e8f0!important;
  z-index:0!important;
}

.afsm-flow-step{
  position:relative!important;
  z-index:1!important;
  min-height:74px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:12px!important;
  padding:0 24px!important;
  border-radius:18px!important;
  background:#fff!important;
  border:1px solid #e5eaf2!important;
  overflow:hidden!important;
  box-shadow:0 7px 18px rgba(30,42,70,.035)!important;
}

.afsm-flow-step span{
  position:relative!important;
  z-index:2!important;
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  margin:0!important;
  border-radius:50%!important;
  border:2px solid #cfd7e4!important;
  background:#fff!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step em{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-style:normal!important;
  font-weight:800!important;
  color:#79849a!important;
  text-align:left!important;
}

/* completed */
.afsm-flow-step.done{
  background:#fbfffc!important;
  border-color:#d7eee2!important;
}

.afsm-flow-step.done span{
  border-color:#37ba7d!important;
  background:#37ba7d!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step.done span:after{
  content:""!important;
  position:absolute!important;
  left:8px!important;
  top:4px!important;
  width:7px!important;
  height:12px!important;
  border:solid #fff!important;
  border-width:0 2px 2px 0!important;
  transform:rotate(45deg)!important;
}

.afsm-flow-step.done em{
  color:#2f8a64!important;
}

/* active */
.afsm-flow-step.active{
  background:#f8f6ff!important;
  border-color:#d8d3ff!important;
  box-shadow:0 9px 22px rgba(95,82,235,.08)!important;
}

.afsm-flow-step.active span{
  border-color:#6c63ff!important;
  background:#fff!important;
  box-shadow:
    0 0 0 6px #fff,
    0 0 0 9px rgba(108,99,255,.10)!important;
}

.afsm-flow-step.active span:after{
  content:""!important;
  position:absolute!important;
  inset:6px!important;
  border-radius:50%!important;
  background:#6c63ff!important;
}

.afsm-flow-step.active em{
  color:#5b52dc!important;
}

/* hide previous connector hacks if still present */
.afsm-flow-step.done:after,
.afsm-flow-step.active:after{
  display:none!important;
}

@media(max-width:1180px){
  .afsm-order-status-flow{
    gap:10px!important;
  }

  .afsm-flow-step{
    padding:0 16px!important;
    gap:10px!important;
  }

  .afsm-flow-step em{
    font-size:11px!important;
  }
}

@media(max-width:640px){
  .afsm-order-status-flow{
    display:flex!important;
    gap:8px!important;
    overflow-x:auto!important;
    padding:2px 2px 6px!important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }

  .afsm-order-status-flow::-webkit-scrollbar{
    display:none;
  }

  .afsm-order-status-flow:before{
    display:none!important;
  }

  .afsm-flow-step{
    flex:0 0 150px!important;
    min-height:62px!important;
    padding:0 14px!important;
    gap:9px!important;
    scroll-snap-align:start;
  }

  .afsm-flow-step span{
    flex-basis:24px!important;
    width:24px!important;
    height:24px!important;
  }

  .afsm-flow-step em{
    font-size:10.5px!important;
  }
}


/* =========================================================
   v0.8.6 HARD TIMELINE ALIGNMENT FIX
   New markup: fixed indicator column + label column.
   ========================================================= */

.afsm-order-status-flow{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  position:relative!important;
}

.afsm-order-status-flow:before{
  content:""!important;
  position:absolute!important;
  left:8%!important;
  right:8%!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  height:2px!important;
  background:#e5e9f1!important;
  z-index:0!important;
}

.afsm-flow-step{
  position:relative!important;
  z-index:1!important;
  min-width:0!important;
  min-height:76px!important;
  padding:0 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#fff!important;
  border:1px solid #e5eaf2!important;
  border-radius:18px!important;
  overflow:visible!important;
}

.afsm-flow-inner{
  width:100%;
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:12px!important;
}

.afsm-flow-indicator{
  position:relative!important;
  display:block!important;
  grid-column:1!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  margin:0!important;
  padding:0!important;
  border-radius:50%!important;
  border:2px solid #d1d9e6!important;
  background:#fff!important;
  box-sizing:border-box!important;
  box-shadow:0 0 0 6px #fff!important;
  transform:none!important;
  inset:auto!important;
}

.afsm-flow-label{
  grid-column:2!important;
  position:static!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  min-width:0!important;
  color:#7b8598!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-style:normal!important;
  font-weight:800!important;
  white-space:nowrap!important;
  text-align:left!important;
  transform:none!important;
}

/* completed */
.afsm-flow-step.done{
  background:#fbfffc!important;
  border-color:#d8eee3!important;
}

.afsm-flow-step.done .afsm-flow-indicator{
  background:#36b97c!important;
  border-color:#36b97c!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step.done .afsm-flow-indicator:after{
  content:""!important;
  position:absolute!important;
  left:8px!important;
  top:4px!important;
  width:6px!important;
  height:11px!important;
  border:solid #fff!important;
  border-width:0 2px 2px 0!important;
  transform:rotate(45deg)!important;
}

.afsm-flow-step.done .afsm-flow-label{
  color:#2f8964!important;
}

/* active */
.afsm-flow-step.active{
  background:#f8f6ff!important;
  border-color:#d7d2ff!important;
  box-shadow:0 8px 20px rgba(95,82,235,.07)!important;
}

.afsm-flow-step.active .afsm-flow-indicator{
  background:#fff!important;
  border-color:#6c63ff!important;
  box-shadow:
    0 0 0 6px #fff,
    0 0 0 9px rgba(108,99,255,.10)!important;
}

.afsm-flow-step.active .afsm-flow-indicator:after{
  content:""!important;
  position:absolute!important;
  inset:5px!important;
  border-radius:50%!important;
  background:#6c63ff!important;
}

.afsm-flow-step.active .afsm-flow-label{
  color:#5b52dc!important;
}

/* Kill legacy pseudo/connectors on old generic selectors */
.afsm-flow-step>span,
.afsm-flow-step>em,
.afsm-flow-step.done:after,
.afsm-flow-step.active:after{
  all:unset;
}

.afsm-flow-step .afsm-flow-indicator,
.afsm-flow-step .afsm-flow-label{
  box-sizing:border-box!important;
}

/* Re-apply after all:unset */
.afsm-flow-step .afsm-flow-indicator{
  position:relative!important;
  display:block!important;
  width:28px!important;
  height:28px!important;
  border-radius:50%!important;
  border:2px solid #d1d9e6!important;
  background:#fff!important;
  box-shadow:0 0 0 6px #fff!important;
}

.afsm-flow-step .afsm-flow-label{
  display:block!important;
  color:#7b8598!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-style:normal!important;
  font-weight:800!important;
  white-space:nowrap!important;
}

.afsm-flow-step.done .afsm-flow-indicator{
  background:#36b97c!important;
  border-color:#36b97c!important;
}
.afsm-flow-step.done .afsm-flow-label{color:#2f8964!important}
.afsm-flow-step.active .afsm-flow-indicator{
  border-color:#6c63ff!important;
  background:#fff!important;
}
.afsm-flow-step.active .afsm-flow-label{color:#5b52dc!important}

@media(max-width:1180px){
  .afsm-flow-step{
    padding:0 14px!important;
  }
  .afsm-flow-inner{
    grid-template-columns:30px minmax(0,1fr)!important;
    column-gap:9px!important;
  }
  .afsm-flow-step .afsm-flow-label{
    font-size:11px!important;
  }
}

@media(max-width:640px){
  .afsm-order-status-flow{
    display:flex!important;
    gap:8px!important;
    overflow-x:auto!important;
    padding:2px 2px 6px!important;
  }
  .afsm-order-status-flow:before{
    display:none!important;
  }
  .afsm-flow-step{
    flex:0 0 152px!important;
    min-height:64px!important;
    padding:0 13px!important;
  }
  .afsm-flow-inner{
    grid-template-columns:26px minmax(0,1fr)!important;
    column-gap:9px!important;
  }
  .afsm-flow-step .afsm-flow-indicator{
    width:24px!important;
    height:24px!important;
  }
  .afsm-flow-step .afsm-flow-label{
    font-size:10.5px!important;
  }
}


/* =========================================================
   v0.8.7 MOBILE RESPONSIVE AUDIT
   Detail Order + Timeline + Modal + Touch UX
   ========================================================= */

@media(max-width:640px){

  /* Modal full screen and safe-area aware */
  #afsm-order-modal .afsm-modal-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
    overflow:hidden!important;
  }

  #afsm-order-modal .afsm-modal-body{
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:
      max(14px, env(safe-area-inset-top))
      12px
      max(24px, env(safe-area-inset-bottom))!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }

  #afsm-order-modal .afsm-modal-close{
    position:fixed!important;
    top:max(10px, env(safe-area-inset-top))!important;
    right:10px!important;
    z-index:300!important;
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 8px 24px rgba(26,37,63,.12)!important;
    backdrop-filter:blur(14px);
  }

  /* Header */
  .afsm-order-detail-top{
    display:block!important;
    padding:8px 0 14px!important;
  }

  .afsm-order-detail-top>div:first-child{
    padding-right:46px!important;
  }

  .afsm-order-detail-top h2{
    font-size:28px!important;
    margin:8px 0 6px!important;
  }

  .afsm-order-detail-top p{
    font-size:11px!important;
  }

  .afsm-order-head-meta{
    gap:6px!important;
    margin-top:9px!important;
  }

  .afsm-order-head-meta span{
    min-height:25px!important;
    padding:0 8px!important;
    font-size:9px!important;
  }

  /* Header actions */
  .afsm-order-detail-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:14px!important;
  }

  .afsm-order-detail-actions .afsm-secondary-btn,
  .afsm-order-detail-actions .afsm-wa-btn{
    min-width:0!important;
    width:100%!important;
    min-height:42px!important;
    height:42px!important;
    padding:0 10px!important;
    font-size:11px!important;
    border-radius:12px!important;
  }

  .afsm-order-detail-total{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    min-height:70px!important;
    padding:12px 14px!important;
    border-radius:15px!important;
  }

  .afsm-order-detail-total>span{
    font-size:9.5px!important;
    margin-bottom:5px!important;
  }

  .afsm-order-grand-total,
  .afsm-order-grand-total .woocommerce-Price-amount{
    font-size:21px!important;
  }

  /* Timeline: horizontal touch cards */
  .afsm-order-status-flow{
    display:flex!important;
    width:100%!important;
    gap:8px!important;
    margin:12px 0 16px!important;
    padding:2px 1px 7px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
  }

  .afsm-order-status-flow::-webkit-scrollbar{
    display:none!important;
  }

  .afsm-order-status-flow:before{
    display:none!important;
  }

  .afsm-flow-step{
    flex:0 0 148px!important;
    min-width:148px!important;
    min-height:62px!important;
    padding:0 13px!important;
    border-radius:14px!important;
    scroll-snap-align:start!important;
  }

  .afsm-flow-inner{
    grid-template-columns:26px minmax(0,1fr)!important;
    column-gap:9px!important;
  }

  .afsm-flow-step .afsm-flow-indicator{
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    min-height:24px!important;
    max-width:24px!important;
    max-height:24px!important;
    box-shadow:0 0 0 4px #fff!important;
  }

  .afsm-flow-step.active .afsm-flow-indicator{
    box-shadow:
      0 0 0 4px #fff,
      0 0 0 7px rgba(108,99,255,.10)!important;
  }

  .afsm-flow-step .afsm-flow-label{
    font-size:10.5px!important;
    white-space:nowrap!important;
  }

  /* Main order panels */
  .afsm-order-detail-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  .afsm-detail-panel,
  .afsm-detail-panel-wide{
    grid-column:auto!important;
    width:100%!important;
    min-width:0!important;
    padding:13px!important;
    border-radius:15px!important;
  }

  .afsm-detail-panel-head{
    margin-bottom:12px!important;
  }

  .afsm-detail-panel-head h3{
    font-size:14px!important;
  }

  /* Customer */
  .afsm-customer-detail{
    display:grid!important;
    grid-template-columns:44px 1fr!important;
    gap:10px!important;
    align-items:start!important;
    padding-bottom:12px!important;
  }

  .afsm-customer-detail img{
    width:44px!important;
    height:44px!important;
    border-radius:12px!important;
  }

  .afsm-customer-detail strong{
    font-size:12px!important;
  }

  .afsm-customer-detail span{
    font-size:10px!important;
    overflow-wrap:anywhere;
  }

  .afsm-address-box{
    margin-top:11px!important;
    padding:11px!important;
    font-size:10.5px!important;
    line-height:1.55!important;
    overflow-wrap:anywhere;
  }

  /* Product */
  .afsm-order-items{
    gap:7px!important;
  }

  .afsm-order-item{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:9px!important;
    padding:9px!important;
    border-radius:12px!important;
  }

  .afsm-order-item-image img{
    width:44px!important;
    height:44px!important;
    border-radius:10px!important;
  }

  .afsm-order-item-info strong{
    font-size:11.5px!important;
  }

  .afsm-order-item-info span{
    font-size:9.5px!important;
  }

  .afsm-order-item>strong{
    grid-column:2!important;
    justify-self:start!important;
    font-size:11px!important;
    margin-top:-2px!important;
  }

  .afsm-order-totals{
    margin-top:12px!important;
    padding-top:10px!important;
  }

  .afsm-order-totals>div{
    padding:5px 0!important;
    font-size:10.5px!important;
  }

  .afsm-order-totals>div.total{
    font-size:12px!important;
  }

  .afsm-order-totals>div.total strong{
    font-size:13px!important;
  }

  /* Payment & shipping */
  .afsm-meta-list>div{
    min-height:46px!important;
    padding:9px 10px!important;
    border-radius:11px!important;
  }

  .afsm-meta-list>div span{
    font-size:10px!important;
  }

  .afsm-meta-list>div strong{
    font-size:10.5px!important;
    max-width:60%;
    overflow-wrap:anywhere;
  }

  .afsm-order-ops{
    margin-top:11px!important;
    padding-top:11px!important;
    gap:9px!important;
  }

  .afsm-order-ops label>span{
    font-size:9.5px!important;
  }

  .afsm-order-ops input,
  .afsm-order-ops textarea{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:9px 10px!important;
    border-radius:11px!important;
    font-size:11px!important;
  }

  .afsm-order-ops textarea{
    min-height:78px!important;
  }

  .afsm-order-ops .afsm-primary-btn{
    width:100%!important;
    min-height:42px!important;
  }
}

/* Very small phones */
@media(max-width:390px){
  #afsm-order-modal .afsm-modal-body{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .afsm-order-detail-actions{
    grid-template-columns:1fr!important;
  }

  .afsm-order-detail-total{
    grid-column:auto!important;
  }

  .afsm-flow-step{
    flex-basis:140px!important;
    min-width:140px!important;
  }
}

/* Landscape phones: preserve access to all content */
@media(max-width:900px) and (orientation:landscape){
  #afsm-order-modal .afsm-modal-body{
    overflow-y:auto!important;
  }

  .afsm-order-detail-actions{
    grid-template-columns:auto auto minmax(180px,1fr)!important;
  }

  .afsm-order-detail-total{
    grid-column:auto!important;
  }
}


/* =========================================================
   v0.8.9 FUNCTIONAL TOPBAR
   Search / Notifications / Profile
   ========================================================= */

.afsm-top-actions{
  position:relative;
}

.afsm-top-popover-wrap{
  position:relative;
  flex:none;
}

.afsm-top-user{
  padding:0!important;
  border:1px solid #e5e9f1!important;
  background:#fff!important;
  cursor:pointer!important;
  overflow:hidden;
}

.afsm-top-user img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:inherit;
}

.afsm-top-popover{
  position:absolute;
  z-index:260;
  top:calc(100% + 10px);
  right:0;
  width:330px;
  background:#fff;
  border:1px solid #e4e8f0;
  border-radius:17px;
  box-shadow:0 24px 60px rgba(25,37,63,.16);
  overflow:hidden;
}

.afsm-top-popover[hidden]{
  display:none!important;
}

.afsm-popover-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 15px 12px;
  border-bottom:1px solid #eef1f5;
}

.afsm-popover-head strong{
  display:block;
  color:#182236;
  font-size:13px;
}

.afsm-popover-head span{
  display:block;
  margin-top:2px;
  color:#8d96a8;
  font-size:9.5px;
}

.afsm-popover-head b{
  min-width:27px;
  height:27px;
  padding:0 7px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#fff0f4;
  color:#df4568;
  font-size:10px;
}

.afsm-popover-list{
  display:grid;
  padding:7px;
}

.afsm-popover-list>a{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:10px;
  align-items:center;
  padding:9px;
  color:inherit;
  text-decoration:none;
  border-radius:12px;
}

.afsm-popover-list>a:hover{
  background:#f7f8fc;
}

.afsm-popover-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
}

.afsm-popover-icon svg{
  width:17px;
  height:17px;
}

.afsm-popover-icon.order{background:#eef0ff;color:#5e63e1}
.afsm-popover-icon.stock{background:#fff2e5;color:#df8a20}
.afsm-popover-icon.review{background:#fff0f4;color:#dd4668}

.afsm-popover-list strong{
  display:block;
  color:#253047;
  font-size:11px;
}

.afsm-popover-list small{
  display:block;
  margin-top:3px;
  color:#8c95a6;
  font-size:9.5px;
}

.afsm-popover-footer{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 12px;
  background:#fafbfe;
  border-top:1px solid #eef1f5;
  color:#655be5;
  text-decoration:none;
  font-size:10.5px;
  font-weight:800;
}

.afsm-popover-footer svg{
  width:14px;
  height:14px;
}

.afsm-profile-popover{
  width:280px;
}

.afsm-profile-summary{
  display:grid;
  grid-template-columns:46px 1fr;
  align-items:center;
  gap:10px;
  padding:15px;
  border-bottom:1px solid #eef1f5;
}

.afsm-profile-summary img{
  width:46px;
  height:46px;
  border-radius:14px;
}

.afsm-profile-summary div{
  min-width:0;
}

.afsm-profile-summary strong{
  display:block;
  color:#1e293d;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.afsm-profile-summary span{
  display:block;
  margin-top:3px;
  color:#8993a5;
  font-size:9.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.afsm-profile-links{
  display:grid;
  padding:7px;
}

.afsm-profile-links>a{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 10px;
  border-radius:11px;
  color:#465168;
  text-decoration:none;
  font-size:10.5px;
  font-weight:700;
}

.afsm-profile-links>a:hover{
  background:#f7f8fc;
}

.afsm-profile-links>a span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#f1f3f8;
}

.afsm-profile-links>a span svg{
  width:15px;
  height:15px;
}

.afsm-profile-links>a.danger{
  color:#d94767;
}

.afsm-profile-links>a.danger span{
  background:#fff0f4;
}

@media(max-width:640px){
  .afsm-top-popover{
    position:fixed;
    top:66px;
    right:10px;
    left:10px;
    width:auto;
    max-height:calc(100dvh - 155px);
    overflow-y:auto;
    border-radius:16px;
  }

  .afsm-profile-popover{
    left:auto;
    width:min(290px,calc(100vw - 20px));
  }

  .afsm-top-user{
    display:grid!important;
    width:40px!important;
    height:40px!important;
  }
}

@media(max-width:375px){
  .afsm-top-actions{
    gap:5px;
  }

  .afsm-top-search{
    min-width:0;
  }

  .afsm-icon-btn,
  .afsm-top-user{
    width:38px!important;
    height:38px!important;
  }
}


/* =========================================================
   v0.9.0 SELF PROFILE EDITOR
   ========================================================= */

.afsm-profile-links>button{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:0 10px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#465168;
  font-size:10.5px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}
.afsm-profile-links>button:hover{background:#f7f8fc}
.afsm-profile-links>button span{
  width:28px;height:28px;
  display:grid;place-items:center;
  border-radius:9px;
  background:#f1f3f8;
}
.afsm-profile-links>button span svg{width:15px;height:15px}

.afsm-profile-modal-dialog{
  width:min(920px,94vw)!important;
  max-width:920px!important;
}
.afsm-profile-editor{
  padding:24px;
}
.afsm-profile-editor-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:18px;
}
.afsm-profile-avatar-card{
  align-self:start;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:20px;
  border:1px solid #e8ecf3;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#fafbfe);
  box-shadow:0 8px 24px rgba(31,43,66,.04);
}
.afsm-profile-avatar-preview{
  width:112px;
  height:112px;
  margin-bottom:13px;
  border-radius:28px;
  overflow:hidden;
  background:#f0f2f7;
  border:1px solid #e4e8f0;
}
.afsm-profile-avatar-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.afsm-avatar-fallback{
  width:100%;height:100%;
  display:grid;place-items:center;
  font-size:28px;font-weight:800;color:#8993a5;
}
.afsm-profile-avatar-card>strong{
  font-size:14px;
  color:#1e293d;
  text-align:center;
}
.afsm-profile-avatar-card>span{
  margin:4px 0 14px;
  color:#8d96a8;
  font-size:10px;
}
.afsm-profile-avatar-card .afsm-secondary-btn{
  width:100%;
}
.afsm-profile-avatar-card .afsm-link-btn{
  margin-top:7px;
}
.afsm-profile-form-content{
  display:grid;
  gap:14px;
}
.afsm-form-group small{
  display:block;
  margin-top:5px;
  color:#9aa3b4;
  font-size:9.5px;
  line-height:1.4;
}
.afsm-password-field{
  position:relative;
}
.afsm-password-field input{
  width:100%;
  padding-right:68px!important;
}
.afsm-password-toggle{
  position:absolute;
  top:50%;
  right:7px;
  transform:translateY(-50%);
  height:30px;
  padding:0 9px;
  border:0;
  border-radius:8px;
  background:#f1f3f8;
  color:#667188;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}

@media(max-width:760px){
  .afsm-profile-modal-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    overflow:auto!important;
  }
  .afsm-profile-editor{
    padding:16px 12px 96px;
  }
  .afsm-profile-editor-layout{
    grid-template-columns:1fr;
    gap:12px;
  }
  .afsm-profile-avatar-card{
    padding:16px;
  }
  .afsm-profile-avatar-preview{
    width:92px;height:92px;border-radius:23px;
  }
}


/* v0.9.2 PREMIUM REPORT EXPORT */
.afsm-export-excel-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:118px;
}


/* =========================================================
   v1.0.0 PRODUCT + ORDER MANAGEMENT FINAL
   ========================================================= */

.afsm-trash-product{
  color:#d94a67!important;
}
.afsm-trash-product:hover{
  background:#fff0f4!important;
  border-color:#ffdce4!important;
}

.afsm-order-ops select{
  width:100%;
  min-height:44px;
  border:1px solid #e2e7ef;
  border-radius:12px;
  padding:0 11px;
  background:#fff;
  color:#364158;
  font-size:11px;
}

.afsm-order-note-visibility{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:8px!important;
  min-height:38px;
  padding:8px 10px;
  background:#f8f9fc;
  border:1px solid #edf0f5;
  border-radius:11px;
}
.afsm-order-note-visibility input{
  width:16px!important;
  height:16px!important;
  min-height:0!important;
  accent-color:#6c63ff;
}
.afsm-order-note-visibility span{
  margin:0!important;
  font-size:10px!important;
  color:#657086!important;
}

.afsm-order-customer-editor{
  margin-top:12px;
  padding:13px;
  background:#f8f9fc;
  border:1px solid #e9edf4;
  border-radius:14px;
}
.afsm-order-customer-editor[hidden]{display:none!important}
.afsm-order-customer-editor label{
  display:grid;
  gap:5px;
  margin-bottom:9px;
}
.afsm-order-customer-editor label>span{
  color:#717c90;
  font-size:9.5px;
  font-weight:800;
}
.afsm-order-customer-editor input{
  width:100%;
  min-width:0;
  height:40px;
  border:1px solid #dfe4ed;
  border-radius:10px;
  padding:0 10px;
  background:#fff;
  color:#354057;
  font-size:10.5px;
}
.afsm-order-customer-editor-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
}

.afsm-order-notes-panel{
  grid-column:1/-1!important;
}
.afsm-order-notes-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.afsm-order-note-item{
  padding:11px 12px;
  border:1px solid #e9edf3;
  border-radius:13px;
  background:#fafbfe;
}
.afsm-order-note-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
}
.afsm-order-note-top small{
  color:#929bad;
  font-size:9px;
}
.afsm-order-note-item p{
  margin:0;
  color:#59657b;
  font-size:10.5px;
  line-height:1.55;
}
.afsm-order-note-item p p{
  margin:0;
}

@media(max-width:760px){
  .afsm-order-notes-list{
    grid-template-columns:1fr;
  }
  .afsm-order-customer-editor-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}


/* =========================================================
   v1.1.0 CUSTOMER CRM + NOTIFICATION CENTER
   ========================================================= */
.afsm-customer-segments{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.afsm-customer-segments>div{padding:13px 14px;background:#fff;border:1px solid #e8ecf3;border-radius:15px;box-shadow:0 7px 20px rgba(31,43,66,.035)}
.afsm-customer-segments span{display:block;color:#7d879a;font-size:10px;font-weight:800}
.afsm-customer-segments strong{display:block;margin:4px 0 3px;color:#172033;font-size:20px}
.afsm-customer-segments small{color:#929bad;font-size:9px}
.afsm-segment-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;font-size:9px;font-weight:800;text-transform:capitalize}
.afsm-segment-badge.vip{background:#fff4db;color:#b87900}.afsm-segment-badge.active{background:#eaf8f1;color:#20865f}.afsm-segment-badge.new{background:#eef0ff;color:#5c59d9}.afsm-segment-badge.inactive{background:#f2f4f7;color:#7b8494}
.afsm-customer-crm-bar{display:grid;grid-template-columns:120px minmax(0,1fr) auto;align-items:end;gap:12px;margin-bottom:16px;padding:13px;background:#f8f9fc;border:1px solid #e9edf4;border-radius:15px}
.afsm-customer-crm-bar>div>span{display:block;margin-bottom:5px;color:#8892a5;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.afsm-customer-crm-bar>div>strong{font-size:15px;color:#202b40}
.afsm-customer-crm-bar textarea{width:100%;min-height:58px;resize:vertical;border:1px solid #dde3ec;border-radius:11px;padding:9px 10px;background:#fff;color:#3a455b;font-size:10.5px}
.afsm-notification-actions{display:flex;justify-content:flex-end;margin-bottom:12px}
.afsm-popover-list>a.is-read{opacity:.55}
.afsm-popover-list>a.is-read:after{content:"Dibaca";margin-left:auto;color:#9aa3b4;font-size:8px;font-weight:800}
@media(max-width:900px){.afsm-customer-segments{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.afsm-customer-crm-bar{grid-template-columns:1fr}.afsm-customer-crm-bar .afsm-primary-btn{width:100%}}


/* =========================================================
   v1.2.0 STAFF ROLE PERMISSIONS
   ========================================================= */
.afsm-permission-mini{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  max-width:330px;
}
.afsm-permission-mini span,
.afsm-permission-mini b{
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:0 8px;
  border-radius:999px;
  background:#f1f2ff;
  color:#6259d6;
  font-size:8.5px;
  font-weight:800;
}
.afsm-permission-mini b{
  background:#f1f3f7;
  color:#788295;
}

.afsm-staff-modal-dialog{
  width:min(930px,94vw)!important;
  max-width:930px!important;
}
.afsm-permission-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.afsm-permission-check{
  display:grid!important;
  grid-template-columns:18px 34px 1fr;
  align-items:center;
  gap:9px!important;
  min-height:65px;
  padding:10px!important;
  border:1px solid #e6eaf2;
  border-radius:13px;
  background:#fbfcff;
  cursor:pointer;
  transition:.16s ease;
}
.afsm-permission-check:hover{
  border-color:#d8d3ff;
  background:#f8f7ff;
}
.afsm-permission-check input{
  width:16px!important;
  height:16px!important;
  min-height:0!important;
  accent-color:#6c63ff;
}
.afsm-permission-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#efedff;
  color:#6157dd;
}
.afsm-permission-icon svg{
  width:16px;
  height:16px;
}
.afsm-permission-check>span:last-child{
  min-width:0;
}
.afsm-permission-check strong{
  display:block;
  color:#273248;
  font-size:10.5px;
}
.afsm-permission-check small{
  display:block;
  margin-top:2px;
  color:#929bad;
  font-size:8.5px;
  line-height:1.3;
}
.afsm-staff-permission-card.is-disabled{
  opacity:.55;
}
.afsm-staff-permission-card.is-disabled .afsm-permission-check{
  cursor:not-allowed;
}

@media(max-width:800px){
  .afsm-permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .afsm-staff-modal-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    overflow:auto!important;
  }
  .afsm-permission-grid{grid-template-columns:1fr}
}


/* =========================================================
   v1.3.0 SCALABLE ANALYTICS + ACTIVITY LOG
   ========================================================= */
.afsm-dashboard-period{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.afsm-dashboard-period select,.afsm-dashboard-period input,.afsm-activity-filter select,.afsm-activity-filter input{height:38px;border:1px solid #e1e6ef;border-radius:10px;background:#fff;padding:0 10px;color:#465268;font-size:10.5px;outline:none}
.afsm-dashboard-custom-dates{display:flex;align-items:center;gap:6px}.afsm-dashboard-custom-dates[hidden]{display:none!important}
.afsm-kpi-change{font-size:9px;font-weight:900}.afsm-kpi-change.up{color:#16865d}.afsm-kpi-change.down{color:#d34d65}.afsm-aov-value .woocommerce-Price-amount{font-size:22px!important;white-space:nowrap}
.afsm-activity-filter{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(130px,1fr) minmax(150px,1fr) auto auto;align-items:end;gap:10px;padding:13px;margin-bottom:12px}
.afsm-activity-filter label{display:grid;gap:5px}.afsm-activity-filter label>span{font-size:9px;font-weight:800;color:#818ca0;text-transform:uppercase;letter-spacing:.04em}.afsm-activity-filter select,.afsm-activity-filter input{width:100%}
.afsm-activity-table td:first-child strong,.afsm-activity-table td:first-child small,.afsm-activity-table td:nth-child(4) strong,.afsm-activity-table td:nth-child(4) small{display:block}.afsm-activity-table td small{margin-top:2px;color:#969fb0;font-size:8.5px}.afsm-activity-user{display:flex;align-items:center;gap:7px;white-space:nowrap}.afsm-activity-user img{width:30px;height:30px;border-radius:9px;object-fit:cover}.afsm-activity-module{display:inline-flex;padding:5px 8px;border-radius:999px;background:#f1f2ff;color:#6259d6;font-size:8.5px;font-weight:800}.afsm-activity-module.orders{background:#eef5ff;color:#3775bd}.afsm-activity-module.inventory{background:#fff5e9;color:#b67824}.afsm-activity-module.customers{background:#edf9f3;color:#27815e}.afsm-activity-module.staff{background:#f7efff;color:#8457b5}
.afsm-activity-table code{padding:4px 7px;border-radius:7px;background:#f4f6f9;color:#5c6678;font-size:9px}.afsm-pagination{display:flex;justify-content:center;gap:6px;padding:14px;border-top:1px solid #edf0f4}.afsm-pagination a{display:grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border:1px solid #e5e9f0;border-radius:9px;color:#667187;text-decoration:none;font-size:10px;font-weight:800}.afsm-pagination a.active{background:#6258ed;color:#fff;border-color:#6258ed}
@media(max-width:900px){.afsm-activity-filter{grid-template-columns:1fr 1fr}.afsm-dashboard-period{width:100%}}
@media(max-width:640px){.afsm-dashboard-period{display:grid;grid-template-columns:1fr auto}.afsm-dashboard-period select{width:100%}.afsm-dashboard-custom-dates{grid-column:1/-1;display:grid;grid-template-columns:1fr auto 1fr}.afsm-dashboard-custom-dates input{width:100%;min-width:0}.afsm-activity-filter{grid-template-columns:1fr}.afsm-activity-filter .afsm-primary-btn,.afsm-activity-filter .afsm-secondary-btn{width:100%}.afsm-activity-table{min-width:760px}}


/* =========================================================
   v1.5.0 EMAIL CENTER
   ========================================================= */
.afsm-email-center-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:14px;align-items:start}
.afsm-email-center-form{padding:16px}.afsm-email-preview-card{position:sticky;top:84px;padding:16px;overflow:hidden}
.afsm-email-logo-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.afsm-email-logo-field input{min-width:0}
.afsm-email-color-wrap{display:grid;grid-template-columns:46px 1fr;gap:8px}.afsm-email-color-wrap input[type="color"]{width:46px;padding:3px}
.afsm-email-subject-title{margin:18px 0 9px}.afsm-email-type-row{display:grid;grid-template-columns:42px 125px minmax(0,1fr);align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #edf0f4}
.afsm-email-type-row>div strong,.afsm-email-type-row>div small{display:block}.afsm-email-type-row>div strong{font-size:10.5px;color:#354057}.afsm-email-type-row>div small{margin-top:2px;color:#9aa3b2;font-size:8.5px}.afsm-email-type-row>input{width:100%;height:39px;border:1px solid #e0e5ed;border-radius:10px;padding:0 10px;font-size:10px;color:#465167}
.afsm-email-switch{position:relative;width:38px;height:22px}.afsm-email-switch input{position:absolute;opacity:0}.afsm-email-switch span{position:absolute;inset:0;border-radius:999px;background:#dfe4eb;cursor:pointer;transition:.2s}.afsm-email-switch span:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.18);transition:.2s}.afsm-email-switch input:checked+span{background:#6258f6}.afsm-email-switch input:checked+span:before{transform:translateX(16px)}
.afsm-email-form-actions{display:flex;justify-content:flex-end;padding-top:14px}.afsm-email-test-box{display:grid;grid-template-columns:minmax(170px,1fr) minmax(190px,.8fr) auto;align-items:center;gap:10px;margin-top:14px;padding:12px;border:1px solid #e8ecf2;border-radius:13px;background:#fafbfe}.afsm-email-test-box strong,.afsm-email-test-box small{display:block}.afsm-email-test-box strong{font-size:10.5px;color:#344056}.afsm-email-test-box small{font-size:8.5px;color:#929cad;margin-top:2px}.afsm-email-test-box input{height:39px;border:1px solid #dfe4ec;border-radius:10px;padding:0 10px;font-size:10px}
.afsm-email-preview-shell{max-height:740px;overflow:auto;padding:12px;background:#eef1f6;border-radius:14px}
.afsm-email-preview-shell>html,.afsm-email-preview-shell body{margin:0!important}.afsm-email-live{overflow:hidden;background:#fff;border-radius:15px;box-shadow:0 10px 30px rgba(36,46,65,.07)}.afsm-email-live-head{padding:22px;color:#fff}.afsm-email-live-head img{display:block;max-height:38px;max-width:150px;margin-bottom:11px}.afsm-email-live-head strong,.afsm-email-live-head span{display:block}.afsm-email-live-head strong{font-size:20px}.afsm-email-live-head span{margin-top:4px;font-size:10px;opacity:.85}.afsm-email-live-body{padding:22px}.afsm-email-live-hero{padding:15px;border:1px solid #e8e7ff;border-radius:13px;background:#f8f8ff}.afsm-email-live-hero small{font-size:8px;font-weight:900;letter-spacing:.08em}.afsm-email-live-hero h3{margin:4px 0 7px;font-size:18px;color:#202a3b}.afsm-email-live-hero p{font-size:10.5px;line-height:1.55;color:#5d687a}.afsm-email-live-hero b{display:inline-flex;margin-top:7px;padding:5px 8px;border:1px solid #e2e6ed;border-radius:999px;background:#fff;font-size:8.5px}.afsm-email-live-table{margin-top:15px;border:1px solid #e7eaf0;border-radius:11px;overflow:hidden}.afsm-email-live-table>div{display:grid;grid-template-columns:1fr auto;gap:10px;padding:10px;font-size:9.5px;border-bottom:1px solid #edf0f4}.afsm-email-live-table>div:first-child{background:#f7f8fb}.afsm-email-live-table>div:last-child{border:0}.afsm-email-live-support{display:grid;gap:3px;margin-top:15px;padding:12px;border:1px solid #eee4cf;border-radius:11px;background:#fffdf8;font-size:9.5px}.afsm-email-live-footer{padding:16px;text-align:center;color:#98a1b1;font-size:9px}
.afsm-last-email-sent{display:block;max-width:150px;color:#8d97a8;font-size:8.5px;line-height:1.4}
@media(max-width:1050px){.afsm-email-center-layout{grid-template-columns:1fr}.afsm-email-preview-card{position:static}.afsm-email-preview-shell{max-height:none}}
@media(max-width:680px){.afsm-email-type-row{grid-template-columns:40px 1fr}.afsm-email-type-row>input{grid-column:1/-1}.afsm-email-test-box{grid-template-columns:1fr}.afsm-email-logo-field{grid-template-columns:1fr}.afsm-email-logo-field .afsm-secondary-btn{width:100%}}


/* =========================================================
   v1.5.1 PROFESSIONAL EMAIL BRAND SYNC
   ========================================================= */
.afsm-email-brand-sync{
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin:12px 0 14px;
  padding:12px 13px;
  border:1px solid #e6eaf1;
  border-radius:13px;
  background:linear-gradient(180deg,#fbfcff 0%,#f7f8fb 100%);
}
.afsm-email-brand-sync strong,
.afsm-email-brand-sync small{
  display:block;
}
.afsm-email-brand-sync strong{
  color:#344056;
  font-size:10.5px;
}
.afsm-email-brand-sync small{
  max-width:520px;
  margin-top:3px;
  color:#8e98aa;
  font-size:8.7px;
  line-height:1.45;
}
.afsm-email-palette-preview{
  display:flex;
  align-items:center;
  gap:5px;
  padding:4px;
  border:1px solid #e7eaf0;
  border-radius:999px;
  background:#fff;
}
.afsm-email-palette-preview i{
  width:20px;
  height:20px;
  display:block;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.05);
}
.afsm-email-color-wrap.is-synced{
  opacity:.58;
}
.afsm-email-color-wrap.is-synced:after{
  content:"AUTO";
  display:grid;
  place-items:center;
  min-width:42px;
  height:38px;
  padding:0 8px;
  border-radius:9px;
  background:#eef0ff;
  color:#6258d7;
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
}
.afsm-email-color-wrap.is-synced{
  grid-template-columns:46px 1fr auto;
}
.afsm-email-preview-badge{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  background:#eef0ff;
  color:#6058d4;
  font-size:8.5px;
  font-weight:850;
}
.afsm-email-preview-card{
  border:1px solid #e7eaf1;
  box-shadow:0 14px 35px rgba(34,44,65,.055);
}
.afsm-email-preview-shell{
  border:1px solid #e4e8ef;
}
.afsm-email-center-form{
  border:1px solid #e7eaf1;
  box-shadow:0 14px 35px rgba(34,44,65,.045);
}
@media(max-width:680px){
  .afsm-email-brand-sync{
    grid-template-columns:40px 1fr;
  }
  .afsm-email-palette-preview{
    grid-column:1/-1;
    justify-self:start;
  }
}


/* =========================================================
   v1.5.2 PROFESSIONAL EMAIL AUDIT
   ========================================================= */
.afsm-email-preview-shell{
  background:#f2f4f8;
  padding:18px;
}
.afsm-email-preview-shell>html,
.afsm-email-preview-shell>body{
  width:100%!important;
}
.afsm-email-preview-card .afsm-card-head{
  align-items:center;
}
.afsm-email-preview-badge{
  border:1px solid #dedcff;
  box-shadow:0 3px 10px rgba(77,69,185,.06);
}
.afsm-email-center-form .afsm-form-group>span{
  color:#596579;
  font-weight:800;
}
.afsm-email-brand-sync{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}


/* =========================================================
   v1.5.3 EMAIL EDITOR FUNCTIONAL AUDIT
   ========================================================= */
.afsm-email-editor-status{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:14px;
  padding:11px 12px;
  border:1px solid #dfece6;
  border-radius:12px;
  background:#f4fbf7;
}
.afsm-email-editor-status-dot{
  flex:0 0 auto;
  width:8px;
  height:8px;
  margin-top:4px;
  border-radius:50%;
  background:#2ea873;
  box-shadow:0 0 0 4px rgba(46,168,115,.10);
}
.afsm-email-editor-status strong,
.afsm-email-editor-status small{
  display:block;
}
.afsm-email-editor-status strong{
  color:#2c644d;
  font-size:10px;
}
.afsm-email-editor-status small{
  margin-top:2px;
  color:#6d877a;
  font-size:8.7px;
  line-height:1.45;
}
.afsm-email-form-actions{
  gap:8px;
}
.afsm-email-live-brand{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}
.afsm-email-live-logo{
  flex:0 0 auto;
  padding:7px 9px;
  border-radius:9px;
  background:#fff;
}
.afsm-email-live-logo img{
  max-height:32px!important;
  max-width:120px!important;
  margin:0!important;
}
.afsm-email-live-head>em{
  display:block;
  margin-top:10px;
  color:rgba(255,255,255,.75);
  font-size:8px;
  font-style:normal;
  font-weight:700;
}
@media(max-width:560px){
  .afsm-email-form-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .afsm-email-form-actions .afsm-primary-btn,
  .afsm-email-form-actions .afsm-secondary-btn{
    width:100%;
  }
}


/* =========================================================
   v1.6.0 WHATSAPP CENTER + AUTOMATION QUEUE
   ========================================================= */
.afsm-wa-center-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:14px;align-items:start}
.afsm-wa-settings,.afsm-wa-preview-card{padding:16px}.afsm-wa-preview-card{position:sticky;top:84px}
.afsm-wa-placeholders{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 14px;padding:10px 11px;border:1px solid #e7ebf1;border-radius:12px;background:#fafbfe}.afsm-wa-placeholders strong{margin-right:3px;color:#4b566a;font-size:9px}.afsm-wa-placeholders span{padding:4px 7px;border-radius:999px;background:#eef0ff;color:#6259d6;font-size:8px;font-weight:800}
.afsm-wa-template textarea{min-height:92px;line-height:1.55}
.afsm-wa-automation-settings{margin-top:15px}.afsm-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #edf0f4}.afsm-toggle-row:last-child{border-bottom:0}.afsm-toggle-row>div strong,.afsm-toggle-row>div small{display:block}.afsm-toggle-row>div strong{color:#344056;font-size:10.5px}.afsm-toggle-row>div small{margin-top:2px;color:#939cad;font-size:8.7px;line-height:1.4}
.afsm-form-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:10px 0}.afsm-wa-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.afsm-wa-phone{overflow:hidden;border:1px solid #dfe4ea;border-radius:20px;background:#efeae2;box-shadow:0 15px 40px rgba(29,39,57,.08)}.afsm-wa-phone-head{display:flex;align-items:center;gap:9px;padding:13px 14px;background:#075e54;color:#fff}.afsm-wa-phone-head svg{width:22px;height:22px}.afsm-wa-phone-head strong,.afsm-wa-phone-head span{display:block}.afsm-wa-phone-head strong{font-size:11px}.afsm-wa-phone-head span{font-size:8px;opacity:.75;margin-top:1px}.afsm-wa-chat{min-height:420px;padding:22px 14px;background:linear-gradient(rgba(239,234,226,.94),rgba(239,234,226,.94));display:flex;align-items:flex-start;justify-content:flex-end}.afsm-wa-bubble{position:relative;max-width:86%;padding:11px 12px;border-radius:10px 2px 10px 10px;background:#d9fdd3;color:#27323d;font-size:10.5px;line-height:1.55;box-shadow:0 1px 2px rgba(0,0,0,.08);white-space:pre-wrap}
.afsm-automation-queue-card{margin-top:14px}.afsm-automation-table td strong,.afsm-automation-table td small{display:block}.afsm-automation-table td small{margin-top:2px;color:#99a1af;font-size:8.5px}.afsm-queue-channel{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:8px;font-weight:800}.afsm-queue-channel.manual_whatsapp{background:#e9f8ef;color:#218154}.afsm-queue-channel.admin{background:#eef0ff;color:#6259d6}.afsm-queue-actions{display:flex;align-items:center;gap:6px}.afsm-queue-actions .afsm-primary-btn,.afsm-queue-actions .afsm-secondary-btn{min-height:30px;padding:0 10px;font-size:8.5px}.afsm-queue-actions .afsm-action-icon{width:30px;height:30px}.afsm-last-whatsapp-opened{display:block;max-width:150px;color:#8d97a8;font-size:8.5px;line-height:1.4}
@media(max-width:980px){.afsm-wa-center-grid{grid-template-columns:1fr}.afsm-wa-preview-card{position:static}.afsm-wa-chat{min-height:300px}}
@media(max-width:680px){.afsm-form-3{grid-template-columns:1fr}.afsm-wa-actions{display:grid;grid-template-columns:1fr}.afsm-wa-actions .afsm-primary-btn,.afsm-wa-actions .afsm-secondary-btn{width:100%}.afsm-automation-table{min-width:760px}}


/* =========================================================
   v1.6.1 WHATSAPP PRODUCTION POLISH
   ========================================================= */
.afsm-wa-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.afsm-wa-status-card{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;min-height:86px;padding:13px;background:#fff;border:1px solid #e7ebf1;border-radius:15px;box-shadow:0 8px 24px rgba(32,43,62,.035)}
.afsm-wa-status-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px}.afsm-wa-status-icon svg{width:18px;height:18px}.afsm-wa-status-icon.automation{background:#eef0ff;color:#6259d6}.afsm-wa-status-icon.queue{background:#fff5e8;color:#b77826}.afsm-wa-status-icon.cron{background:#edf7ff;color:#3a78b7}.afsm-wa-status-icon.last{background:#eaf8f0;color:#23805a}
.afsm-wa-status-card small,.afsm-wa-status-card strong,.afsm-wa-status-card em{display:block}.afsm-wa-status-card small{color:#929bad;font-size:8.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.afsm-wa-status-card strong{margin-top:3px;color:#263146;font-size:12px;line-height:1.35}.afsm-wa-status-card em{margin-top:3px;color:#8c96a8;font-size:8.3px;font-style:normal;line-height:1.4}
.afsm-wa-preview-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:10px;padding:10px;border:1px solid #e7ebf1;border-radius:12px;background:#fafbfe}.afsm-wa-preview-toolbar label{display:grid;gap:4px;min-width:180px}.afsm-wa-preview-toolbar label>span{color:#8993a5;font-size:8px;font-weight:800;text-transform:uppercase}.afsm-wa-preview-toolbar select{height:36px;border:1px solid #dfe4ec;border-radius:9px;background:#fff;padding:0 9px;color:#465166;font-size:9.5px}.afsm-wa-char-count{display:inline-flex;align-items:center;min-height:26px;padding:0 8px;border-radius:999px;background:#f0f2f6;color:#7a8496;font-size:8px;font-weight:800}
.afsm-wa-phone{border-color:#d9dee6}.afsm-wa-phone-head{background:#075e54;background:linear-gradient(135deg,#075e54,#0b7669)}.afsm-wa-bubble{border:1px solid rgba(38,111,69,.08)}
.afsm-wa-safety-note{display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:start;margin:14px 0;padding:12px 13px;border:1px solid #dceee4;border-radius:14px;background:#f4fbf7}.afsm-wa-safety-note>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#e5f7ed;color:#218259}.afsm-wa-safety-note svg{width:19px;height:19px}.afsm-wa-safety-note strong,.afsm-wa-safety-note p{display:block;margin:0}.afsm-wa-safety-note strong{color:#2a5d48;font-size:10.5px}.afsm-wa-safety-note p{margin-top:3px;color:#668071;font-size:8.8px;line-height:1.5}.afsm-wa-safety-note b{font-weight:850;color:#376b55}
.afsm-automation-queue-card{border:1px solid #e7ebf1;box-shadow:0 10px 28px rgba(33,44,64,.035)}.afsm-automation-table tbody tr{transition:background .15s ease,opacity .2s ease}.afsm-automation-table tbody tr:hover{background:#fbfcfe}.afsm-queue-actions{white-space:nowrap}.afsm-wa-settings,.afsm-wa-preview-card{border:1px solid #e7ebf1;box-shadow:0 10px 28px rgba(33,44,64,.04)}
@media(max-width:1100px){.afsm-wa-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.afsm-wa-status-grid{grid-template-columns:1fr 1fr}.afsm-wa-status-card{min-height:78px;padding:11px}.afsm-wa-preview-toolbar{align-items:stretch;flex-direction:column}.afsm-wa-preview-toolbar label{min-width:0;width:100%}.afsm-wa-char-count{align-self:flex-start}}
@media(max-width:430px){.afsm-wa-status-grid{grid-template-columns:1fr}}


/* =========================================================
   v1.6.2 EXACT WHATSAPP PREVIEW
   ========================================================= */
.afsm-wa-preview-data{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:7px;
  margin-bottom:10px;
}
.afsm-wa-preview-data>div{
  padding:8px 9px;
  border:1px solid #e6eaf0;
  border-radius:10px;
  background:#fff;
}
.afsm-wa-preview-data span,
.afsm-wa-preview-data strong{
  display:block;
}
.afsm-wa-preview-data span{
  color:#929bad;
  font-size:7.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.afsm-wa-preview-data strong{
  margin-top:3px;
  color:#364155;
  font-size:9px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.afsm-wa-preview-warning{
  margin-bottom:10px;
  padding:9px 10px;
  border:1px solid #f2d7a7;
  border-radius:10px;
  background:#fff8e8;
  color:#9a6b17;
  font-size:8.5px;
  line-height:1.45;
  font-weight:750;
}
.afsm-wa-preview-warning[hidden]{
  display:none!important;
}
.afsm-wa-bubble{
  min-width:120px;
  word-break:break-word;
}
@media(max-width:760px){
  .afsm-wa-preview-data{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:430px){
  .afsm-wa-preview-data{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   v1.6.3 WHATSAPP SAVE + PREVIEW FIX
   ========================================================= */
.afsm-wa-chat{
  position:relative;
  min-height:420px;
  padding:24px 14px 32px;
  align-items:flex-end;
}
.afsm-wa-chat:before{
  content:"Preview percakapan";
  position:absolute;
  top:11px;
  left:0;
  right:0;
  text-align:center;
  color:#8d897f;
  font-size:7.5px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.afsm-wa-bubble{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-width:160px;
  min-height:42px;
  max-width:88%;
  padding:11px 12px 18px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.55;
}
.afsm-wa-bubble:after{
  content:"14:15 ✓✓";
  position:absolute;
  right:8px;
  bottom:5px;
  color:#73927b;
  font-size:7px;
  line-height:1;
}
.afsm-wa-bubble.is-empty{
  color:#9098a4;
  font-style:italic;
}
#afsm-save-whatsapp[disabled]{
  opacity:.68;
  cursor:wait;
}


/* =========================================================
   v1.7.0 CUSTOMER FOLLOW-UP + CRM AUTOMATION
   ========================================================= */
.afsm-customer-segments-5{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.afsm-customer-segments-5 button{appearance:none;text-align:left;cursor:pointer;border:1px solid #e7ebf1;background:#fff;border-radius:14px;padding:12px 13px;transition:.18s;box-shadow:0 8px 22px rgba(33,44,64,.03)}.afsm-customer-segments-5 button:hover{transform:translateY(-1px);border-color:#d9dcef;box-shadow:0 10px 26px rgba(33,44,64,.055)}.afsm-customer-segments-5 span,.afsm-customer-segments-5 strong,.afsm-customer-segments-5 small{display:block}.afsm-customer-segments-5 span{font-size:8.5px;font-weight:850;color:#8892a4;text-transform:uppercase;letter-spacing:.04em}.afsm-customer-segments-5 strong{margin-top:4px;color:#263146;font-size:18px}.afsm-customer-segments-5 small{margin-top:2px;color:#99a2b1;font-size:8px}
.afsm-crm-automation-card{margin:14px 0;padding:16px;border:1px solid #e7ebf1}.afsm-crm-settings-grid{display:grid;gap:10px}.afsm-crm-toggle{padding-top:0}.afsm-crm-template-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.afsm-crm-template-grid textarea{min-height:96px}.afsm-crm-placeholder-note{margin-top:10px;padding:9px 10px;border-radius:10px;background:#f8f9fc;color:#7d8798;font-size:8.5px}.afsm-crm-placeholder-note b{display:inline-block;margin:2px 3px;padding:3px 6px;border-radius:999px;background:#eef0ff;color:#6259d6}
.afsm-customer-toolbar{display:flex;justify-content:space-between;gap:10px}.afsm-customer-toolbar .afsm-field-search{flex:1}.afsm-customer-toolbar .afsm-select{min-width:180px}.afsm-customer-table .afsm-secondary-btn{min-height:32px;padding:0 10px;font-size:8.5px}
.afsm-crm-segment{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:8px;font-weight:850;white-space:nowrap}.afsm-crm-segment.segment-vip{background:#fff5db;color:#9a6d13}.afsm-crm-segment.segment-active{background:#eaf8f1;color:#237a59}.afsm-crm-segment.segment-new{background:#eef0ff;color:#6259d6}.afsm-crm-segment.segment-at_risk{background:#fff2e5;color:#a86520}.afsm-crm-segment.segment-inactive{background:#f2f3f6;color:#70798a}
.afsm-customer-stats-4{grid-template-columns:repeat(4,minmax(0,1fr))}.afsm-crm-quick-actions{display:flex;justify-content:flex-end;gap:8px;margin:10px 0 12px}.afsm-crm-timeline-panel{margin-top:12px}.afsm-crm-timeline{display:grid;gap:0}.afsm-crm-timeline-item{display:grid;grid-template-columns:14px 1fr;gap:9px;padding:8px 0;border-bottom:1px solid #edf0f4}.afsm-crm-timeline-item:last-child{border-bottom:0}.afsm-crm-timeline-item i{width:8px;height:8px;margin-top:3px;border-radius:50%;background:#6258f6;box-shadow:0 0 0 4px #efefff}.afsm-crm-timeline-item strong,.afsm-crm-timeline-item span{display:block}.afsm-crm-timeline-item strong{font-size:9.5px;color:#3b4659}.afsm-crm-timeline-item span{margin-top:2px;font-size:8px;color:#9aa2b0}
@media(max-width:1100px){.afsm-customer-segments-5{grid-template-columns:repeat(3,minmax(0,1fr))}.afsm-crm-template-grid{grid-template-columns:1fr}.afsm-customer-stats-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.afsm-customer-segments-5{grid-template-columns:1fr 1fr}.afsm-customer-toolbar{flex-direction:column}.afsm-customer-toolbar .afsm-select{width:100%;min-width:0}.afsm-crm-quick-actions{display:grid;grid-template-columns:1fr}.afsm-crm-quick-actions button{width:100%}.afsm-customer-table{min-width:850px}}
@media(max-width:430px){.afsm-customer-segments-5{grid-template-columns:1fr}.afsm-customer-stats-4{grid-template-columns:1fr 1fr}}


/* =========================================================
   v1.7.1 CRM FUNCTIONAL + PROFESSIONAL POLISH
   ========================================================= */
.afsm-crm-segment-note{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin-bottom:10px;
  padding:10px 12px;
  border:1px solid #e7ebf1;
  border-radius:13px;
  background:linear-gradient(180deg,#fbfcff,#f8f9fc);
}
.afsm-crm-segment-note>span{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:10px;
  background:#eef0ff;
  color:#6259d6;
}
.afsm-crm-segment-note svg{width:18px;height:18px}
.afsm-crm-segment-note p{margin:0;color:#7b8596;font-size:8.8px;line-height:1.5}
.afsm-crm-segment-note strong{color:#445064}
.afsm-customer-detail-modal{
  max-width:100%;
}
.afsm-customer-hero{
  padding-bottom:14px;
  border-bottom:1px solid #edf0f4;
}
.afsm-customer-stats-4>div{
  min-height:72px;
  border:1px solid #e7ebf1;
  background:#fff;
}
.afsm-customer-crm-bar{
  border:1px solid #e7ebf1;
  background:#fafbfe;
  border-radius:14px;
}
.afsm-customer-crm-bar textarea{
  min-height:58px;
}
.afsm-crm-quick-actions .afsm-primary-btn,
.afsm-crm-quick-actions .afsm-secondary-btn{
  min-height:38px;
}
.afsm-crm-timeline-panel{
  border:1px solid #e7ebf1;
  border-radius:14px;
}
.afsm-address-box{
  line-height:1.65;
  color:#596579;
}
.afsm-crm-automation-card{
  box-shadow:0 10px 30px rgba(32,43,62,.035);
}
@media(max-width:760px){
  .afsm-crm-segment-note{align-items:start}
  .afsm-customer-hero{gap:12px}
}


/* =========================================================
   v1.8.0 PRODUCTION AUDIT + BACKUP & RECOVERY
   ========================================================= */
.afsm-system-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.afsm-system-summary-card{padding:13px 14px;border:1px solid #e7ebf1;border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(33,44,64,.03)}.afsm-system-summary-card span,.afsm-system-summary-card strong,.afsm-system-summary-card small{display:block}.afsm-system-summary-card span{font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:#8e98aa}.afsm-system-summary-card strong{margin-top:4px;font-size:19px;color:#293449}.afsm-system-summary-card small{margin-top:2px;font-size:8px;color:#9aa3b2}.afsm-system-summary-card.ok{border-top:3px solid #3ab27f}.afsm-system-summary-card.warning{border-top:3px solid #e0a438}.afsm-system-summary-card.error{border-top:3px solid #d95c71}.afsm-system-summary-card.neutral{border-top:3px solid #6258f6}
.afsm-system-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:14px;align-items:start}.afsm-system-grid>.afsm-card{padding:16px;border:1px solid #e7ebf1;box-shadow:0 10px 28px rgba(33,44,64,.035)}.afsm-system-grid-bottom{margin-top:14px}
.afsm-health-list{display:grid;gap:8px}.afsm-health-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border:1px solid #edf0f4;border-radius:11px}.afsm-health-dot{width:8px;height:8px;border-radius:50%}.afsm-health-dot.ok{background:#35ad79;box-shadow:0 0 0 4px rgba(53,173,121,.1)}.afsm-health-dot.warning{background:#dda137;box-shadow:0 0 0 4px rgba(221,161,55,.1)}.afsm-health-dot.error{background:#d95c71;box-shadow:0 0 0 4px rgba(217,92,113,.1)}.afsm-health-row strong,.afsm-health-row small{display:block}.afsm-health-row strong{font-size:9.5px;color:#394458}.afsm-health-row small{margin-top:2px;font-size:8.3px;color:#929bad}.afsm-health-status{padding:4px 7px;border-radius:999px;font-size:7.5px;font-weight:900}.afsm-health-status.ok{background:#eaf8f1;color:#237a59}.afsm-health-status.warning{background:#fff5e3;color:#9b6b16}.afsm-health-status.error{background:#fff0f3;color:#bc4158}
.afsm-system-safe-note{display:grid;gap:3px;margin-bottom:12px;padding:10px 11px;border:1px solid #dceee4;border-radius:11px;background:#f4fbf7}.afsm-system-safe-note strong{font-size:9px;color:#31674f}.afsm-system-safe-note span{font-size:8.3px;color:#70887b;line-height:1.45}.afsm-backup-divider{display:flex;align-items:center;gap:8px;margin:16px 0 12px;color:#9aa2b1;font-size:8px;font-weight:800;text-transform:uppercase}.afsm-backup-divider:before,.afsm-backup-divider:after{content:"";height:1px;flex:1;background:#edf0f4}
.afsm-backup-preview{margin:10px 0}.afsm-backup-meta{padding:9px 10px;border:1px solid #dfe4ec;border-radius:10px;background:#fafbfe}.afsm-backup-meta strong,.afsm-backup-meta span{display:block}.afsm-backup-meta strong{font-size:9px;color:#3c475a}.afsm-backup-meta span{margin-top:2px;font-size:8px;color:#929bad}.afsm-backup-sections{display:grid;gap:6px;margin-top:8px}.afsm-backup-section{display:flex;align-items:center;gap:9px;padding:8px 9px;border:1px solid #edf0f4;border-radius:9px;background:#fff}.afsm-backup-section span strong,.afsm-backup-section span small{display:block}.afsm-backup-section span strong{font-size:8.8px;text-transform:capitalize;color:#465166}.afsm-backup-section span small{font-size:7.8px;color:#9ba3b1;margin-top:1px}.afsm-backup-error{padding:9px 10px;border:1px solid #f0cfd5;border-radius:10px;background:#fff4f6;color:#b94b60;font-size:8.5px}
.afsm-maintenance-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.afsm-maintenance-metrics>div{padding:10px;border:1px solid #e8ebf1;border-radius:11px;background:#fafbfe}.afsm-maintenance-metrics span,.afsm-maintenance-metrics strong,.afsm-maintenance-metrics small{display:block}.afsm-maintenance-metrics span{font-size:8px;color:#8d97a8}.afsm-maintenance-metrics strong{margin-top:3px;font-size:14px;color:#303b50}.afsm-maintenance-metrics small{margin-top:2px;font-size:7.5px;color:#a0a8b5}.afsm-system-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.afsm-production-checklist{display:grid;gap:9px}.afsm-production-checklist>div{display:grid;grid-template-columns:26px 1fr;gap:9px;align-items:start}.afsm-production-checklist i{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#eaf8f1;color:#27805b;font-size:10px;font-style:normal;font-weight:900}.afsm-production-checklist strong,.afsm-production-checklist small{display:block}.afsm-production-checklist strong{font-size:9px;color:#3d485c}.afsm-production-checklist small{margin-top:2px;font-size:8px;color:#929bad;line-height:1.45}
@media(max-width:1050px){.afsm-system-grid{grid-template-columns:1fr}.afsm-system-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.afsm-system-summary{grid-template-columns:1fr 1fr}.afsm-maintenance-metrics{grid-template-columns:1fr}.afsm-system-actions{display:grid;grid-template-columns:1fr}.afsm-system-actions button{width:100%}}
@media(max-width:430px){.afsm-system-summary{grid-template-columns:1fr}}


/* =========================================================
   v1.9.0 FINAL RESPONSIVE & UX CONSISTENCY AUDIT
   ========================================================= */
:root{
  --afsm-radius-xs:8px;
  --afsm-radius-sm:10px;
  --afsm-radius-md:14px;
  --afsm-radius-lg:18px;
  --afsm-border:#e7ebf1;
  --afsm-border-soft:#edf0f4;
  --afsm-text:#263146;
  --afsm-muted:#8d97a8;
  --afsm-surface:#fff;
  --afsm-soft:#fafbfe;
  --afsm-focus:rgba(98,88,246,.16);
}
.afsm-app *{box-sizing:border-box}
.afsm-app button,.afsm-app input,.afsm-app select,.afsm-app textarea{font:inherit}
.afsm-app button,.afsm-app [role="button"],.afsm-app a{ -webkit-tap-highlight-color:transparent }
.afsm-card{border-radius:var(--afsm-radius-md)}
.afsm-card,.afsm-detail-panel,.afsm-form-card,.afsm-customer-crm-bar{border-color:var(--afsm-border)}
.afsm-page-head{gap:14px;align-items:flex-start}
.afsm-page-head h1{letter-spacing:-.02em}
.afsm-page-head p{max-width:760px;line-height:1.55}
.afsm-card-head{gap:12px;align-items:flex-start}.afsm-card-head h3{letter-spacing:-.01em}.afsm-card-head p{line-height:1.5}
.afsm-primary-btn,.afsm-secondary-btn,.afsm-action-icon{transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease,opacity .15s ease}
.afsm-primary-btn:not(:disabled):hover,.afsm-secondary-btn:not(:disabled):hover{transform:translateY(-1px)}
.afsm-primary-btn:disabled,.afsm-secondary-btn:disabled,.afsm-action-icon:disabled{opacity:.58;cursor:not-allowed;transform:none!important}
.afsm-primary-btn.is-busy,.afsm-secondary-btn.is-busy{position:relative;pointer-events:none}
.afsm-primary-btn.is-busy:before,.afsm-secondary-btn.is-busy:before{content:"";width:11px;height:11px;margin-right:6px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;vertical-align:-2px;animation:afsmSpin .65s linear infinite}
@keyframes afsmSpin{to{transform:rotate(360deg)}}
.afsm-app button:focus-visible,.afsm-app a:focus-visible,.afsm-app input:focus-visible,.afsm-app textarea:focus-visible,.afsm-app select:focus-visible{outline:3px solid var(--afsm-focus);outline-offset:2px}
.afsm-form-group input,.afsm-form-group textarea,.afsm-form-group select,.afsm-select{border-radius:var(--afsm-radius-sm)!important;border-color:#dfe4ec!important;background:#fff;color:#3d485b}
.afsm-form-group input:hover,.afsm-form-group textarea:hover,.afsm-form-group select:hover,.afsm-select:hover{border-color:#cfd6e1!important}
.afsm-form-group textarea{resize:vertical;min-height:82px}
.afsm-badge,.afsm-crm-segment,.afsm-health-status,.afsm-queue-channel{letter-spacing:.01em}
.afsm-table-responsive{position:relative;max-width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#d6dce6 transparent}
.afsm-table-responsive::-webkit-scrollbar{height:8px}.afsm-table-responsive::-webkit-scrollbar-thumb{background:#d6dce6;border-radius:999px}.afsm-table-responsive::-webkit-scrollbar-track{background:transparent}
.afsm-table{width:100%;border-collapse:separate;border-spacing:0}.afsm-table thead th{position:sticky;top:0;z-index:2;background:#fbfcfe;box-shadow:0 1px 0 var(--afsm-border-soft);white-space:nowrap}.afsm-table tbody td{vertical-align:middle}.afsm-table tbody tr:last-child td{border-bottom:0}
.afsm-filter-empty{margin:12px 0 0;padding:13px;text-align:center;border:1px dashed #dfe4ec;border-radius:12px;background:#fafbfe;color:#8d97a8;font-size:9px}
.afsm-empty-state{padding:20px 14px!important;border-radius:12px;color:#929bad;line-height:1.55}
.afsm-modal{padding:18px}.afsm-modal-dialog{width:min(100%,980px);max-height:calc(100vh - 36px);border-radius:18px;overflow:hidden}.afsm-modal-body{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.afsm-modal-open{overflow:hidden!important}
.afsm-customer-detail-modal,.afsm-order-detail,.afsm-product-editor{min-width:0}.afsm-detail-panel,.afsm-customer-crm-bar,.afsm-order-detail-grid>*{min-width:0}
.afsm-sidebar{overscroll-behavior:contain}.afsm-sidebar nav{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}.afsm-sidebar nav::-webkit-scrollbar{width:5px}.afsm-sidebar nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:999px}
.afsm-sidebar a{min-height:40px}.afsm-sidebar a.active{box-shadow:inset 3px 0 0 currentColor}
.afsm-head-chip{white-space:nowrap}
.afsm-ux-runtime-status{position:fixed;right:14px;bottom:14px;z-index:9999;pointer-events:none}.afsm-ux-runtime-status span{display:none}.afsm-ux-runtime-status.has-error span{display:block;width:8px;height:8px;border-radius:50%;background:#d85b70;box-shadow:0 0 0 4px rgba(216,91,112,.12)}
/* Desktop wide consistency */
@media(min-width:1600px){
  .afsm-main-inner,.afsm-content{max-width:1560px;margin-left:auto;margin-right:auto}
  .afsm-page-head{margin-bottom:16px}
}
/* Laptop / Surface */
@media(max-width:1366px){
  .afsm-main{min-width:0}.afsm-content{padding-left:16px;padding-right:16px}
  .afsm-card{max-width:100%}
  .afsm-customer-segments-5,.afsm-wa-status-grid,.afsm-system-summary{gap:8px}
}
/* Tablet */
@media(max-width:1024px){
  .afsm-page-head{flex-direction:column}.afsm-head-chip{align-self:flex-start}
  .afsm-modal-dialog{width:min(100%,900px)}
  .afsm-detail-grid,.afsm-order-detail-grid,.afsm-customer-detail-grid{grid-template-columns:1fr!important}
  .afsm-card-head{flex-wrap:wrap}
}
/* Mobile */
@media(max-width:680px){
  .afsm-content{padding:12px!important}.afsm-page-head{margin-bottom:12px}.afsm-page-head h1{font-size:20px!important}.afsm-page-head p{font-size:9px!important}
  .afsm-card{border-radius:13px}.afsm-card-head{margin-bottom:10px}
  .afsm-modal{padding:0;align-items:flex-end}.afsm-modal-dialog{width:100%;max-width:none;max-height:94dvh;border-radius:18px 18px 0 0}.afsm-modal-body{max-height:calc(94dvh - 58px)!important;padding-bottom:max(18px,env(safe-area-inset-bottom))}
  .afsm-primary-btn,.afsm-secondary-btn{min-height:40px}
  .afsm-form-2,.afsm-form-3{grid-template-columns:1fr!important}
  .afsm-toolbar{gap:8px}.afsm-toolbar>*{min-width:0}
  .afsm-table thead th{top:0}
  .afsm-table td,.afsm-table th{white-space:nowrap}
  .afsm-table td:first-child,.afsm-table th:first-child{padding-left:12px}.afsm-table td:last-child,.afsm-table th:last-child{padding-right:12px}
  .afsm-sidebar a{min-height:42px}
  .afsm-head-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}
}
/* Small phones */
@media(max-width:430px){
  .afsm-content{padding:10px!important}
  .afsm-page-head h1{font-size:19px!important}
  .afsm-card{padding-left:12px!important;padding-right:12px!important}
  .afsm-customer-stats-4,.afsm-system-summary,.afsm-wa-status-grid{grid-template-columns:1fr!important}
  .afsm-crm-quick-actions,.afsm-system-actions,.afsm-wa-actions,.afsm-email-form-actions{grid-template-columns:1fr!important;display:grid!important}
  .afsm-crm-quick-actions button,.afsm-system-actions button,.afsm-wa-actions button,.afsm-email-form-actions button{width:100%!important}
}
@media(prefers-reduced-motion:reduce){
  .afsm-app *{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}


/* =========================================================
   v1.9.2 CANONICAL MOBILE SIDEBAR FIX
   One drawer state: .open / .show / body.afsm-drawer-open
   ========================================================= */
.afsm-menu-toggle{
  appearance:none;
  border:0;
  background:transparent;
  color:#334057;
  width:42px;
  height:42px;
  padding:0;
  border-radius:11px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.afsm-menu-toggle svg{
  width:23px;
  height:23px;
  display:block;
}
.afsm-sidebar-close,
.afsm-sidebar-overlay{
  display:none;
}

@media(max-width:760px){
  .afsm-menu-toggle{
    display:inline-flex!important;
    flex:0 0 42px;
    position:relative;
    z-index:5;
    background:#f5f6fa;
    border:1px solid #e4e8ef;
    color:#28364d;
  }

  .afsm-sidebar{
    position:fixed!important;
    left:-280px!important;
    top:0!important;
    bottom:0!important;
    width:min(84vw,260px)!important;
    height:100dvh!important;
    z-index:10020!important;
    transform:none!important;
    transition:left .22s ease!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }

  .afsm-sidebar.open{
    left:0!important;
    transform:none!important;
    box-shadow:20px 0 46px rgba(12,19,34,.28)!important;
  }

  .afsm-sidebar-close{
    display:grid!important;
    place-items:center;
    position:absolute;
    top:12px;
    right:10px;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid rgba(255,255,255,.14);
    border-radius:11px;
    background:rgba(255,255,255,.09);
    color:#fff;
    z-index:4;
    cursor:pointer;
  }
  .afsm-sidebar-close svg{width:18px;height:18px;display:block}
  .afsm-sidebar .afsm-brand{padding-right:48px}

  .afsm-sidebar-overlay{
    display:block!important;
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    margin:0;
    padding:0;
    border:0;
    background:rgba(10,17,29,.48);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    z-index:10010!important;
    transition:opacity .2s ease,visibility .2s ease;
  }
  .afsm-sidebar-overlay.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  body.afsm-drawer-open{
    overflow:hidden!important;
  }
  body.afsm-drawer-open .afsm-sidebar{
    touch-action:pan-y;
  }
}

@media(min-width:761px){
  .afsm-sidebar{
    left:auto!important;
    transform:none!important;
  }
  .afsm-sidebar-close,
  .afsm-sidebar-overlay,
  .afsm-menu-toggle{
    display:none!important;
  }
}


/* =========================================================
   v1.9.3 MODAL / EDITOR RUNTIME RECOVERY
   ========================================================= */
.afsm-modal{
  isolation:isolate;
}
.afsm-modal.open{
  display:flex!important;
}
.afsm-modal-backdrop{
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  cursor:pointer;
}
.afsm-modal-dialog{
  position:relative!important;
  z-index:1!important;
}
.afsm-modal-close{
  display:grid!important;
  place-items:center!important;
  position:sticky!important;
  top:10px!important;
  right:10px!important;
  float:right;
  z-index:50!important;
  flex:0 0 auto;
}
.afsm-modal-body{
  min-height:80px;
}
.afsm-modal-loading,
.afsm-modal-error{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:120px;
  padding:18px;
  border-radius:12px;
  text-align:center;
}
.afsm-modal-loading{
  color:#7d8798;
  background:#fafbfe;
}
.afsm-modal-error{
  color:#b94b60;
  background:#fff4f6;
  border:1px solid #f0cfd5;
}
@media(max-width:680px){
  .afsm-modal-close{
    position:sticky!important;
    top:8px!important;
    right:8px!important;
    margin-left:auto;
  }
}


/* =========================================================
   v1.9.6 RESTORE MODAL SIZE PROPORTIONS
   ========================================================= */

/* Restore the original global modal baseline instead of forcing every editor to 980px. */
.afsm-modal-dialog{
  width:min(760px,calc(100vw - 48px))!important;
  max-width:760px!important;
  max-height:calc(100vh - 48px)!important;
}

/* Order detail needs more horizontal room, as before. */
#afsm-order-modal .afsm-modal-dialog{
  width:min(980px,calc(100vw - 48px))!important;
  max-width:980px!important;
}

/* Product editor is intentionally the widest editor. */
#afsm-product-modal .afsm-modal-dialog{
  width:min(1040px,calc(100vw - 48px))!important;
  max-width:1040px!important;
}

/* CRM/customer detail should be roomy but not oversized. */
#afsm-customer-modal .afsm-modal-dialog{
  width:min(920px,calc(100vw - 48px))!important;
  max-width:920px!important;
}

/* Smaller editors stay compact. */
#afsm-profile-modal .afsm-modal-dialog,
#afsm-staff-modal .afsm-modal-dialog,
#afsm-coupon-modal .afsm-modal-dialog{
  width:min(680px,calc(100vw - 48px))!important;
  max-width:680px!important;
}

/* Keep content height natural, only scroll when needed. */
.afsm-modal-body{
  max-height:calc(100vh - 110px)!important;
}

@media(max-width:1024px){
  .afsm-modal-dialog,
  #afsm-order-modal .afsm-modal-dialog,
  #afsm-product-modal .afsm-modal-dialog,
  #afsm-customer-modal .afsm-modal-dialog,
  #afsm-profile-modal .afsm-modal-dialog,
  #afsm-staff-modal .afsm-modal-dialog,
  #afsm-coupon-modal .afsm-modal-dialog{
    width:min(94vw,920px)!important;
    max-width:94vw!important;
  }
}

@media(max-width:680px){
  .afsm-modal{
    padding:10px!important;
    align-items:center!important;
  }

  .afsm-modal-dialog,
  #afsm-order-modal .afsm-modal-dialog,
  #afsm-product-modal .afsm-modal-dialog,
  #afsm-customer-modal .afsm-modal-dialog,
  #afsm-profile-modal .afsm-modal-dialog,
  #afsm-staff-modal .afsm-modal-dialog,
  #afsm-coupon-modal .afsm-modal-dialog{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 20px)!important;
    border-radius:16px!important;
  }

  .afsm-modal-body{
    max-height:calc(100dvh - 88px)!important;
  }
}


/* =========================================================
   v1.9.7 PRODUCT + STAFF EDITOR FULL CONTENT FIX
   ========================================================= */

/*
 * Product & Staff editors put the complete editor directly inside
 * .afsm-modal-dialog (not inside .afsm-modal-body).
 * v1.9.0 changed dialog overflow to hidden, which clipped their forms.
 */
#afsm-product-modal .afsm-modal-dialog,
#afsm-staff-modal .afsm-modal-dialog,
#afsm-profile-modal .afsm-modal-dialog,
#afsm-coupon-modal .afsm-modal-dialog{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* Product editor needs its original wide editor layout. */
#afsm-product-modal .afsm-modal-dialog{
  width:min(1120px,calc(100vw - 48px))!important;
  max-width:1120px!important;
}

/* Staff permissions need enough width for the permission grid. */
#afsm-staff-modal .afsm-modal-dialog{
  width:min(930px,calc(100vw - 48px))!important;
  max-width:930px!important;
}

/* Do not constrain nested editor height; the dialog is the scroll container. */
#afsm-product-modal .afsm-product-editor,
#afsm-staff-modal .afsm-product-editor{
  min-height:max-content;
  overflow:visible!important;
}

/* Footer always remains reachable and visually separated. */
#afsm-product-modal .afsm-editor-footer,
#afsm-staff-modal .afsm-editor-footer{
  position:sticky;
  bottom:0;
  z-index:12;
  margin-left:-28px;
  margin-right:-28px;
  margin-bottom:-28px;
  padding:14px 28px 18px;
  background:linear-gradient(180deg,rgba(248,249,253,.88),#f8f9fd 32%);
  border-top:1px solid #e6eaf1;
  backdrop-filter:blur(8px);
}

/* Make sure sticky close never masks form controls. */
#afsm-product-modal .afsm-product-editor-head,
#afsm-staff-modal .afsm-product-editor-head{
  padding-right:56px;
}

/* Desktop/tablet grids remain fully visible while dialog scrolls. */
@media(min-width:681px){
  #afsm-product-modal .afsm-modal-dialog,
  #afsm-staff-modal .afsm-modal-dialog{
    max-height:calc(100vh - 48px)!important;
  }
}

/* Tablet: keep editors roomy instead of collapsing to generic 94vw/680px rules. */
@media(max-width:1024px) and (min-width:681px){
  #afsm-product-modal .afsm-modal-dialog{
    width:94vw!important;
    max-width:94vw!important;
  }
  #afsm-staff-modal .afsm-modal-dialog{
    width:min(900px,94vw)!important;
    max-width:94vw!important;
  }
}

/* Mobile: full usable viewport with complete vertical scrolling. */
@media(max-width:680px){
  #afsm-product-modal,
  #afsm-staff-modal{
    padding:8px!important;
    align-items:center!important;
  }

  #afsm-product-modal .afsm-modal-dialog,
  #afsm-staff-modal .afsm-modal-dialog{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:calc(100dvh - 16px)!important;
    overflow-y:auto!important;
    border-radius:16px!important;
  }

  #afsm-product-modal .afsm-product-editor,
  #afsm-staff-modal .afsm-product-editor{
    padding:16px 12px 20px!important;
  }

  #afsm-product-modal .afsm-editor-footer,
  #afsm-staff-modal .afsm-editor-footer{
    margin-left:-12px;
    margin-right:-12px;
    margin-bottom:-20px;
    padding:12px 12px max(14px,env(safe-area-inset-bottom));
    gap:8px;
  }

  #afsm-product-modal .afsm-editor-footer button,
  #afsm-staff-modal .afsm-editor-footer button{
    min-height:42px;
  }
}


/* =========================================================
   v1.9.8 ORDER EDITOR PROFESSIONAL POLISH
   ========================================================= */

#afsm-order-modal .afsm-modal-dialog{
  width:min(1040px,calc(100vw - 48px))!important;
  max-width:1040px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#f6f8fc;
}

#afsm-order-modal .afsm-modal-body{
  padding:20px 22px 24px!important;
  max-height:none!important;
  overflow:visible!important;
}

#afsm-order-modal .afsm-order-detail{
  padding:0;
}

/* Header */
.afsm-order-detail-top{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start!important;
  gap:22px!important;
  padding:4px 0 18px!important;
  border-bottom:1px solid #e7ebf2;
}

.afsm-order-detail-heading{
  min-width:0;
}

.afsm-order-detail-heading h2{
  margin:8px 0 4px!important;
  font-size:29px!important;
  line-height:1.08;
  color:#1f2a3d;
}

.afsm-order-detail-heading>p{
  margin:0!important;
  color:#8993a5!important;
  font-size:11px!important;
}

.afsm-order-head-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  margin-top:11px;
}

.afsm-order-head-meta>span{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:0 9px;
  border:1px solid #e4e8ef;
  border-radius:999px;
  background:#fff;
  color:#667187;
  font-size:9.5px;
  font-weight:750;
}

.afsm-order-head-meta .afsm-order-status-pill{
  font-weight:850;
}

.afsm-order-status-pill.status-processing{background:#eef3ff;border-color:#dbe4ff;color:#4968c8}
.afsm-order-status-pill.status-completed{background:#eaf8f1;border-color:#d6efe2;color:#24815c}
.afsm-order-status-pill.status-on-hold{background:#fff6e8;border-color:#f7e4bd;color:#a57018}
.afsm-order-status-pill.status-pending{background:#fff7e9;border-color:#f6e5c3;color:#9a6c1f}
.afsm-order-status-pill.status-cancelled,
.afsm-order-status-pill.status-failed{background:#fff0f3;border-color:#f3d6dc;color:#b84b61}
.afsm-order-status-pill.status-refunded{background:#f3f4f7;border-color:#e1e4ea;color:#6f7785}

/* Header actions */
.afsm-order-detail-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px!important;
  width:330px;
  max-width:100%;
  align-items:stretch;
}

.afsm-order-detail-actions>.afsm-secondary-btn{
  min-height:38px;
  padding:8px 10px;
  border-radius:10px;
  font-size:9.5px;
  white-space:nowrap;
}

.afsm-order-detail-actions>.afsm-order-whatsapp{
  background:#f1fbf5;
  border-color:#d6eee0;
  color:#28795a;
}

.afsm-last-whatsapp-opened,
.afsm-last-email-sent{
  grid-column:1/-1;
  margin:-2px 2px 1px;
  color:#9aa3b1!important;
  font-size:8px!important;
  line-height:1.35;
}

.afsm-order-detail-total{
  grid-column:1/-1;
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-width:0!important;
  margin-top:2px;
  padding:11px 13px!important;
  border-radius:12px!important;
  box-shadow:none!important;
}

.afsm-order-detail-total span{
  margin:0!important;
  font-size:9px!important;
  font-weight:750;
}

.afsm-order-detail-total strong{
  font-size:17px!important;
  white-space:nowrap;
}

/* Timeline */
.afsm-order-status-flow{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  margin:15px 0!important;
  padding:10px;
  border:1px solid #e8ecf2;
  border-radius:14px;
  background:#fff;
}

.afsm-flow-step{
  min-width:0;
  border-radius:11px!important;
  padding:10px 9px 10px 34px!important;
}

.afsm-flow-step span{
  left:10px!important;
  width:15px!important;
  height:15px!important;
}

.afsm-flow-step em{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9.5px!important;
}

/* Main editor: customer + fulfillment left, products right, notes full */
.afsm-order-detail-grid{
  display:grid!important;
  grid-template-columns:minmax(260px,.82fr) minmax(0,1.55fr)!important;
  grid-template-areas:
    "customer products"
    "fulfillment products"
    "notes notes";
  gap:12px!important;
  align-items:start;
}

.afsm-order-customer-panel{grid-area:customer}
.afsm-order-products-panel{grid-area:products}
.afsm-order-fulfillment-panel{grid-area:fulfillment}
.afsm-order-notes-panel{grid-area:notes!important;grid-column:auto!important}

.afsm-detail-panel{
  min-width:0;
  padding:15px!important;
  border-radius:14px!important;
  box-shadow:0 7px 22px rgba(35,45,65,.035)!important;
}

.afsm-detail-panel-head{
  margin-bottom:12px!important;
  padding-bottom:9px;
  border-bottom:1px solid #edf0f4;
}

.afsm-detail-panel-head h3{
  font-size:12.5px!important;
  color:#303b4e;
}

.afsm-detail-panel-head>span{
  font-size:8.5px!important;
}

/* Customer */
.afsm-customer-detail{
  padding:2px 0 10px;
}

.afsm-customer-detail img{
  width:42px;
  height:42px;
  flex:0 0 42px;
  border:2px solid #fff;
  box-shadow:0 0 0 1px #e6eaf0;
}

.afsm-customer-detail strong{
  font-size:11px!important;
}

.afsm-customer-detail span{
  font-size:9px!important;
  overflow-wrap:anywhere;
}

.afsm-address-box{
  margin-top:8px!important;
  padding:11px!important;
  border:1px solid #edf0f4!important;
  border-radius:10px;
  background:#fafbfe;
  font-size:9px!important;
  line-height:1.55!important;
}

.afsm-address-label{
  display:block;
  margin-bottom:5px;
  color:#7a8598;
  font-size:8px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.035em;
}

/* Product list */
.afsm-order-items{
  gap:7px!important;
}

.afsm-order-item{
  grid-template-columns:48px minmax(0,1fr) auto!important;
  gap:10px!important;
  padding:9px!important;
  border-radius:11px!important;
  background:#fbfcfe!important;
}

.afsm-order-item-image img{
  width:48px!important;
  height:48px!important;
  border-radius:9px!important;
}

.afsm-order-item-info{
  min-width:0;
}

.afsm-order-item-info strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:10.5px!important;
  line-height:1.35;
}

.afsm-order-item-info span{
  font-size:8.5px!important;
}

.afsm-order-item>strong{
  font-size:10px!important;
  white-space:nowrap;
}

.afsm-order-totals{
  margin-top:11px!important;
  padding:10px 11px!important;
  border:1px solid #e8ecf2!important;
  border-radius:11px;
  background:#fafbfe;
}

.afsm-order-totals>div{
  padding:4px 0!important;
  font-size:9.5px!important;
}

.afsm-order-totals .total{
  margin-top:5px!important;
  padding-top:8px!important;
  font-size:11.5px!important;
}

/* Payment / operations */
.afsm-meta-list{
  gap:6px!important;
}

.afsm-meta-list>div{
  padding:8px 9px!important;
  border:1px solid #edf0f4;
  border-radius:9px!important;
  background:#fafbfe!important;
}

.afsm-meta-list span,
.afsm-meta-list strong{
  font-size:8.5px!important;
}

.afsm-order-ops{
  margin-top:11px!important;
  padding-top:11px!important;
  gap:9px!important;
}

.afsm-order-ops label{
  gap:5px!important;
}

.afsm-order-ops label>span{
  font-size:8.5px!important;
}

.afsm-order-ops input,
.afsm-order-ops select,
.afsm-order-ops textarea{
  width:100%;
  min-width:0;
  border:1px solid #e2e7ef;
  border-radius:9px!important;
  background:#fbfcfe;
  color:#344056;
  font-size:9.5px!important;
}

.afsm-order-ops input,
.afsm-order-ops select{
  height:36px;
  padding:0 10px!important;
}

.afsm-order-ops textarea{
  min-height:72px;
  padding:9px 10px!important;
  resize:vertical;
}

.afsm-order-note-visibility{
  display:flex!important;
  grid-template-columns:none!important;
  flex-direction:row;
  align-items:center;
  gap:7px!important;
  padding:8px 9px;
  border:1px solid #edf0f4;
  border-radius:9px;
  background:#fafbfe;
}

.afsm-order-note-visibility input{
  width:15px!important;
  height:15px!important;
  min-height:0!important;
  padding:0!important;
  margin:0;
}

.afsm-order-note-visibility span{
  font-size:8.5px!important;
}

.afsm-order-ops>.afsm-primary-btn,
.afsm-order-ops>.afsm-secondary-btn{
  width:100%;
  min-height:38px;
  border-radius:10px;
  font-size:9.5px;
}

/* Customer inline editor */
.afsm-order-customer-editor{
  margin-top:12px;
  padding:12px;
  border:1px solid #e2e7ef;
  border-radius:11px;
  background:#f8f9fc;
}

.afsm-order-customer-editor label{
  display:grid;
  gap:5px;
  margin-bottom:9px;
}

.afsm-order-customer-editor label>span{
  color:#6f7a8e;
  font-size:8.5px;
  font-weight:800;
}

.afsm-order-customer-editor input{
  width:100%;
  height:36px;
  min-width:0;
  padding:0 9px;
  border:1px solid #dfe4ec;
  border-radius:9px;
  background:#fff;
  font-size:9.5px;
}

.afsm-order-customer-editor-actions{
  gap:7px!important;
  margin-top:4px;
}

/* Notes */
.afsm-order-notes-list{
  gap:7px!important;
}

.afsm-order-note-item{
  padding:10px!important;
  border-radius:10px!important;
}

.afsm-order-note-top{
  margin-bottom:5px!important;
}

.afsm-order-note-item p{
  font-size:9px!important;
}

/* Tablet */
@media(max-width:900px){
  #afsm-order-modal .afsm-modal-dialog{
    width:94vw!important;
    max-width:94vw!important;
  }

  .afsm-order-detail-top{
    grid-template-columns:1fr!important;
  }

  .afsm-order-detail-actions{
    width:100%;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .afsm-order-detail-total{
    grid-column:1/-1;
  }

  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "customer"
      "products"
      "fulfillment"
      "notes";
  }
}

/* Mobile */
@media(max-width:680px){
  #afsm-order-modal{
    padding:8px!important;
  }

  #afsm-order-modal .afsm-modal-dialog{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:16px!important;
  }

  #afsm-order-modal .afsm-modal-body{
    padding:14px 12px 18px!important;
  }

  .afsm-order-detail-heading h2{
    font-size:24px!important;
  }

  .afsm-order-detail-actions{
    grid-template-columns:1fr 1fr!important;
  }

  .afsm-order-detail-actions>.afsm-order-whatsapp{
    grid-column:1/-1;
  }

  .afsm-order-status-flow{
    display:flex!important;
    overflow-x:auto;
    scroll-snap-type:x proximity;
    padding:8px!important;
  }

  .afsm-flow-step{
    flex:0 0 120px;
    scroll-snap-align:center;
  }

  .afsm-detail-panel{
    padding:13px!important;
  }

  .afsm-order-notes-list{
    grid-template-columns:1fr!important;
  }

  .afsm-order-item{
    grid-template-columns:44px minmax(0,1fr) auto!important;
  }

  .afsm-order-item-image img{
    width:44px!important;
    height:44px!important;
  }
}


/* =========================================================
   v1.9.9 ORDER EDITOR COMPACT PREMIUM
   ========================================================= */

/* Overall popup density */
#afsm-order-modal .afsm-modal-dialog{
  width:min(1020px,calc(100vw - 40px))!important;
  max-width:1020px!important;
}

#afsm-order-modal .afsm-modal-body{
  padding:15px 18px 18px!important;
}

#afsm-order-modal .afsm-order-detail{
  padding:0!important;
}

/* Compact header */
.afsm-order-detail-top{
  grid-template-columns:minmax(0,1fr) 430px!important;
  gap:16px!important;
  padding:0 0 12px!important;
}

.afsm-order-detail-heading h2{
  margin:6px 0 2px!important;
  font-size:27px!important;
}

.afsm-order-detail-heading>p{
  font-size:10px!important;
}

.afsm-eyebrow{
  min-height:24px!important;
  padding:0 9px!important;
  font-size:9px!important;
}

.afsm-order-head-meta{
  margin-top:8px!important;
  gap:6px!important;
}

.afsm-order-head-meta>span{
  min-height:24px!important;
  padding:0 8px!important;
  font-size:8.5px!important;
}

/* Actions: three buttons in one row, total underneath */
.afsm-order-detail-actions{
  width:430px!important;
  display:grid!important;
  grid-template-columns:1.15fr .9fr 1.35fr!important;
  gap:6px!important;
}

.afsm-order-detail-actions>.afsm-secondary-btn{
  min-height:34px!important;
  padding:7px 8px!important;
  border-radius:9px!important;
  font-size:8.5px!important;
}

.afsm-last-whatsapp-opened,
.afsm-last-email-sent{
  display:none!important;
}

.afsm-order-detail-total{
  grid-column:1/-1!important;
  min-height:52px;
  padding:8px 11px!important;
  margin-top:0!important;
  border-radius:10px!important;
}

.afsm-order-detail-total span{
  font-size:8px!important;
}

.afsm-order-detail-total strong{
  font-size:15px!important;
}

/* Compact timeline */
.afsm-order-status-flow{
  margin:10px 0 11px!important;
  padding:6px!important;
  gap:6px!important;
  border-radius:11px!important;
}

.afsm-flow-step{
  min-height:46px;
  padding:7px 7px 7px 29px!important;
  border-radius:9px!important;
}

.afsm-flow-step span{
  left:8px!important;
  width:13px!important;
  height:13px!important;
}

.afsm-flow-step em{
  font-size:8.5px!important;
}

/* Tighter content grid */
.afsm-order-detail-grid{
  grid-template-columns:minmax(250px,.78fr) minmax(0,1.5fr)!important;
  gap:10px!important;
}

.afsm-detail-panel{
  padding:12px!important;
  border-radius:12px!important;
}

.afsm-detail-panel-head{
  margin-bottom:9px!important;
  padding-bottom:7px!important;
}

.afsm-detail-panel-head h3{
  font-size:11.5px!important;
}

.afsm-detail-panel-head>span{
  font-size:7.8px!important;
}

/* Customer compact */
.afsm-customer-detail{
  padding:0 0 7px!important;
  gap:9px!important;
}

.afsm-customer-detail img{
  width:38px!important;
  height:38px!important;
  flex-basis:38px!important;
}

.afsm-customer-detail strong{
  font-size:10px!important;
  margin-bottom:2px!important;
}

.afsm-customer-detail span{
  font-size:8px!important;
  margin-top:1px!important;
}

.afsm-address-box{
  margin-top:5px!important;
  padding:8px 9px!important;
  border-radius:9px!important;
  font-size:8px!important;
  line-height:1.45!important;
}

.afsm-address-label{
  margin-bottom:4px!important;
  font-size:7.2px!important;
}

/* Product compact */
.afsm-order-item{
  grid-template-columns:42px minmax(0,1fr) auto!important;
  gap:8px!important;
  padding:7px 8px!important;
  border-radius:10px!important;
}

.afsm-order-item-image img{
  width:42px!important;
  height:42px!important;
  border-radius:8px!important;
}

.afsm-order-item-info strong{
  font-size:9.5px!important;
}

.afsm-order-item-info span{
  font-size:7.8px!important;
  margin-top:2px!important;
}

.afsm-order-item>strong{
  font-size:9px!important;
}

.afsm-order-totals{
  margin-top:8px!important;
  padding:7px 9px!important;
  border-radius:9px!important;
}

.afsm-order-totals>div{
  padding:3px 0!important;
  font-size:8.5px!important;
}

.afsm-order-totals .total{
  padding-top:6px!important;
  font-size:10.5px!important;
}

/* Fulfillment compact so it appears higher */
.afsm-meta-list{
  gap:5px!important;
}

.afsm-meta-list>div{
  padding:6px 8px!important;
  border-radius:8px!important;
}

.afsm-meta-list span,
.afsm-meta-list strong{
  font-size:7.8px!important;
}

.afsm-order-ops{
  margin-top:8px!important;
  padding-top:8px!important;
  gap:7px!important;
}

.afsm-order-ops label{
  gap:4px!important;
}

.afsm-order-ops label>span{
  font-size:7.8px!important;
}

.afsm-order-ops input,
.afsm-order-ops select{
  height:32px!important;
  padding:0 8px!important;
  font-size:8.5px!important;
  border-radius:8px!important;
}

.afsm-order-ops textarea{
  min-height:54px!important;
  padding:7px 8px!important;
  font-size:8.5px!important;
  border-radius:8px!important;
}

.afsm-order-note-visibility{
  padding:6px 8px!important;
  border-radius:8px!important;
}

.afsm-order-note-visibility span{
  font-size:7.8px!important;
}

.afsm-order-ops>.afsm-primary-btn,
.afsm-order-ops>.afsm-secondary-btn{
  min-height:34px!important;
  border-radius:9px!important;
  font-size:8.5px!important;
}

/* Notes compact */
.afsm-order-notes-panel{
  margin-top:0!important;
}

.afsm-order-notes-list{
  gap:6px!important;
}

.afsm-order-note-item{
  padding:8px!important;
}

.afsm-order-note-top{
  margin-bottom:4px!important;
}

.afsm-order-note-top small{
  font-size:7.5px!important;
}

.afsm-order-note-item p{
  font-size:8px!important;
  line-height:1.45!important;
}

/* Keep close button compact but obvious */
#afsm-order-modal .afsm-modal-close{
  width:34px!important;
  height:34px!important;
  top:8px!important;
  right:8px!important;
  border-radius:9px!important;
  font-size:20px!important;
}

/* Laptop / tablet */
@media(max-width:900px){
  .afsm-order-detail-top{
    grid-template-columns:1fr!important;
  }

  .afsm-order-detail-actions{
    width:100%!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
  }
}

/* Mobile */
@media(max-width:680px){
  #afsm-order-modal .afsm-modal-body{
    padding:12px 10px 14px!important;
  }

  .afsm-order-detail-heading h2{
    font-size:22px!important;
  }

  .afsm-order-detail-actions{
    grid-template-columns:1fr 1fr!important;
  }

  .afsm-order-detail-actions>.afsm-order-whatsapp{
    grid-column:1/-1;
  }

  .afsm-order-status-flow{
    margin:8px 0 10px!important;
  }

  .afsm-flow-step{
    flex:0 0 105px!important;
    min-height:42px!important;
  }
}


/* =========================================================
   v1.9.10 ORDER EDITOR BALANCED LAYOUT REBUILD
   ========================================================= */

/* Main content: balanced top row, full-width operational sections below */
.afsm-order-detail-grid{
  display:grid!important;
  grid-template-columns:minmax(280px,.85fr) minmax(0,1.55fr)!important;
  grid-template-areas:
    "customer products"
    "fulfillment fulfillment"
    "notes notes"!important;
  gap:12px!important;
  align-items:start;
}

.afsm-order-customer-panel{grid-area:customer!important}
.afsm-order-products-panel{grid-area:products!important}
.afsm-order-fulfillment-panel{grid-area:fulfillment!important}
.afsm-order-notes-panel{
  grid-area:notes!important;
  grid-column:auto!important;
}

/* Fulfillment becomes a wide, compact operational panel */
.afsm-order-fulfillment-panel{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr);
  column-gap:18px;
  align-items:start;
}

.afsm-order-fulfillment-panel .afsm-detail-panel-head{
  grid-column:1/-1;
}

.afsm-order-fulfillment-panel .afsm-meta-list{
  margin:0!important;
  align-self:start;
}

.afsm-order-fulfillment-panel .afsm-order-ops{
  margin:0!important;
  padding:0!important;
  border-top:0!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px 10px!important;
}

.afsm-order-fulfillment-panel .afsm-order-ops>label:nth-of-type(4),
.afsm-order-fulfillment-panel .afsm-order-note-visibility,
.afsm-order-fulfillment-panel .afsm-order-ops>.afsm-primary-btn,
.afsm-order-fulfillment-panel .afsm-order-ops>.afsm-secondary-btn{
  grid-column:1/-1;
}

.afsm-order-fulfillment-panel .afsm-order-customer-editor{
  grid-column:1/-1;
}

/* Notes use available width instead of a narrow left column */
.afsm-order-notes-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}

.afsm-order-note-item{
  min-height:84px;
}

/* Products card uses its space better */
.afsm-order-products-panel .afsm-order-items{
  max-height:290px;
  overflow-y:auto;
  padding-right:2px;
}

.afsm-order-products-panel .afsm-order-totals{
  margin-top:9px!important;
}

/* Header slightly more balanced */
.afsm-order-detail-top{
  grid-template-columns:minmax(0,1fr) minmax(390px,430px)!important;
}

.afsm-order-detail-actions{
  width:100%!important;
}

/* Desktop modal: enough room, but not oversized */
#afsm-order-modal .afsm-modal-dialog{
  width:min(1080px,calc(100vw - 40px))!important;
  max-width:1080px!important;
}

/* Medium screens */
@media(max-width:980px){
  .afsm-order-detail-top{
    grid-template-columns:1fr!important;
  }

  .afsm-order-detail-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "customer"
      "products"
      "fulfillment"
      "notes"!important;
  }

  .afsm-order-fulfillment-panel{
    grid-template-columns:1fr!important;
    row-gap:12px;
  }

  .afsm-order-fulfillment-panel .afsm-detail-panel-head,
  .afsm-order-fulfillment-panel .afsm-order-customer-editor{
    grid-column:auto;
  }

  .afsm-order-notes-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* Mobile */
@media(max-width:680px){
  .afsm-order-fulfillment-panel .afsm-order-ops{
    grid-template-columns:1fr!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops>*{
    grid-column:1!important;
  }

  .afsm-order-notes-list{
    grid-template-columns:1fr!important;
  }

  .afsm-order-note-item{
    min-height:auto;
  }

  .afsm-order-products-panel .afsm-order-items{
    max-height:none;
    overflow:visible;
  }
}


/* =========================================================
   v1.9.11 ORDER EDITOR 3-COLUMN DESKTOP LAYOUT
   Customer + Produk + Pembayaran/Pengiriman sebaris
   ========================================================= */

@media(min-width:981px){
  #afsm-order-modal .afsm-modal-dialog{
    width:min(1180px,calc(100vw - 40px))!important;
    max-width:1180px!important;
  }

  .afsm-order-detail-grid{
    display:grid!important;
    grid-template-columns:minmax(235px,.82fr) minmax(360px,1.35fr) minmax(255px,.93fr)!important;
    grid-template-areas:
      "customer products fulfillment"
      "notes notes notes"!important;
    gap:12px!important;
    align-items:start!important;
  }

  .afsm-order-customer-panel{
    grid-area:customer!important;
  }

  .afsm-order-products-panel{
    grid-area:products!important;
  }

  .afsm-order-fulfillment-panel{
    grid-area:fulfillment!important;
    display:block!important;
  }

  .afsm-order-notes-panel{
    grid-area:notes!important;
    grid-column:auto!important;
  }

  /* Return fulfillment to vertical compact mode inside its own column */
  .afsm-order-fulfillment-panel .afsm-detail-panel-head{
    display:flex!important;
  }

  .afsm-order-fulfillment-panel .afsm-meta-list{
    margin:0!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    margin-top:9px!important;
    padding-top:9px!important;
    border-top:1px solid #edf0f4!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops>*{
    grid-column:1!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-customer-editor{
    grid-column:auto!important;
  }

  /* Keep each card visually balanced */
  .afsm-order-customer-panel,
  .afsm-order-products-panel,
  .afsm-order-fulfillment-panel{
    min-height:100%;
  }

  .afsm-order-products-panel{
    display:flex;
    flex-direction:column;
  }

  .afsm-order-products-panel .afsm-order-items{
    max-height:280px;
    overflow-y:auto;
  }

  .afsm-order-products-panel .afsm-order-totals{
    margin-top:auto!important;
  }

  /* Notes use full modal width underneath */
  .afsm-order-notes-list{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* Intermediate width: use two columns, fulfillment full-width */
@media(max-width:980px) and (min-width:761px){
  .afsm-order-detail-grid{
    grid-template-columns:minmax(250px,.8fr) minmax(0,1.35fr)!important;
    grid-template-areas:
      "customer products"
      "fulfillment fulfillment"
      "notes notes"!important;
  }

  .afsm-order-fulfillment-panel{
    display:grid!important;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.25fr)!important;
    column-gap:14px!important;
  }

  .afsm-order-fulfillment-panel .afsm-detail-panel-head{
    grid-column:1/-1!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops>label:nth-of-type(4),
  .afsm-order-fulfillment-panel .afsm-order-note-visibility,
  .afsm-order-fulfillment-panel .afsm-order-ops>.afsm-primary-btn,
  .afsm-order-fulfillment-panel .afsm-order-ops>.afsm-secondary-btn{
    grid-column:1/-1!important;
  }
}

/* Mobile remains stacked */
@media(max-width:760px){
  .afsm-order-detail-grid{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "customer"
      "products"
      "fulfillment"
      "notes"!important;
  }

  .afsm-order-fulfillment-panel{
    display:block!important;
  }

  .afsm-order-fulfillment-panel .afsm-order-ops{
    grid-template-columns:1fr!important;
  }

  .afsm-order-notes-list{
    grid-template-columns:1fr!important;
  }
}


/* =========================================================
   v1.9.12 ORDER EDITOR READABILITY + TRUE FULL-WIDTH NOTES
   ========================================================= */

/* Give the 3-column desktop layout enough room for readable typography. */
@media(min-width:1100px){
  #afsm-order-modal .afsm-modal-dialog{
    width:min(1260px,calc(100vw - 36px))!important;
    max-width:1260px!important;
  }

  .afsm-order-detail-grid{
    grid-template-columns:minmax(285px,.9fr) minmax(420px,1.35fr) minmax(310px,1fr)!important;
    gap:14px!important;
    align-items:start!important;
  }
}

/* Prevent short cards from stretching to the height of Fulfillment. */
.afsm-order-customer-panel,
.afsm-order-products-panel,
.afsm-order-fulfillment-panel{
  min-height:0!important;
  height:auto!important;
  align-self:start!important;
}

.afsm-order-products-panel{
  display:block!important;
}

.afsm-order-products-panel .afsm-order-totals{
  margin-top:12px!important;
}

/* Header readability */
.afsm-order-detail-heading h2{
  font-size:30px!important;
}

.afsm-order-detail-heading>p{
  font-size:12px!important;
  line-height:1.45!important;
}

.afsm-eyebrow{
  min-height:28px!important;
  padding:0 11px!important;
  font-size:10px!important;
  letter-spacing:.06em!important;
}

.afsm-order-head-meta>span{
  min-height:29px!important;
  padding:0 10px!important;
  font-size:10.5px!important;
}

.afsm-order-detail-actions>.afsm-secondary-btn{
  min-height:40px!important;
  padding:9px 11px!important;
  font-size:10.5px!important;
}

.afsm-order-detail-total{
  min-height:64px!important;
  padding:10px 14px!important;
}

.afsm-order-detail-total span{
  font-size:9.5px!important;
}

.afsm-order-detail-total strong{
  font-size:21px!important;
}

/* Timeline: compact but readable */
.afsm-order-status-flow{
  margin:12px 0 14px!important;
  padding:8px!important;
  gap:8px!important;
}

.afsm-flow-step{
  min-height:54px!important;
  padding:10px 10px 10px 38px!important;
}

.afsm-flow-step span{
  left:11px!important;
  width:18px!important;
  height:18px!important;
}

.afsm-flow-step em{
  font-size:11px!important;
  font-weight:800!important;
}

/* General card typography */
.afsm-detail-panel{
  padding:16px!important;
}

.afsm-detail-panel-head{
  margin-bottom:12px!important;
  padding-bottom:10px!important;
}

.afsm-detail-panel-head h3{
  font-size:14px!important;
  line-height:1.3!important;
}

.afsm-detail-panel-head>span{
  font-size:10px!important;
  line-height:1.35!important;
}

/* Customer */
.afsm-customer-detail{
  gap:11px!important;
  padding-bottom:10px!important;
}

.afsm-customer-detail img{
  width:46px!important;
  height:46px!important;
  flex-basis:46px!important;
}

.afsm-customer-detail strong{
  font-size:12px!important;
  line-height:1.35!important;
}

.afsm-customer-detail span{
  font-size:10px!important;
  line-height:1.4!important;
}

.afsm-address-box{
  margin-top:7px!important;
  padding:11px 12px!important;
  font-size:10px!important;
  line-height:1.55!important;
}

.afsm-address-label{
  margin-bottom:6px!important;
  font-size:9px!important;
}

/* Product */
.afsm-order-item{
  grid-template-columns:52px minmax(0,1fr) auto!important;
  gap:11px!important;
  padding:10px 11px!important;
}

.afsm-order-item-image img{
  width:52px!important;
  height:52px!important;
}

.afsm-order-item-info strong{
  font-size:12px!important;
  line-height:1.4!important;
}

.afsm-order-item-info span{
  font-size:10px!important;
}

.afsm-order-item>strong{
  font-size:11.5px!important;
}

.afsm-order-totals{
  padding:10px 12px!important;
}

.afsm-order-totals>div{
  padding:5px 0!important;
  font-size:10.5px!important;
}

.afsm-order-totals .total{
  padding-top:9px!important;
  font-size:13px!important;
}

/* Fulfillment: denser without microscopic text */
.afsm-meta-list{
  gap:7px!important;
}

.afsm-meta-list>div{
  padding:9px 10px!important;
}

.afsm-meta-list span,
.afsm-meta-list strong{
  font-size:10px!important;
  line-height:1.35!important;
}

.afsm-order-ops{
  margin-top:10px!important;
  padding-top:10px!important;
  gap:9px!important;
}

.afsm-order-ops label>span{
  font-size:10px!important;
}

.afsm-order-ops input,
.afsm-order-ops select{
  height:40px!important;
  padding:0 10px!important;
  font-size:10.5px!important;
}

.afsm-order-ops textarea{
  min-height:68px!important;
  padding:9px 10px!important;
  font-size:10.5px!important;
  line-height:1.45!important;
}

.afsm-order-note-visibility{
  padding:9px 10px!important;
}

.afsm-order-note-visibility span{
  font-size:10px!important;
  line-height:1.35!important;
}

.afsm-order-ops>.afsm-primary-btn,
.afsm-order-ops>.afsm-secondary-btn{
  min-height:40px!important;
  font-size:10.5px!important;
}

/* TRUE full-width notes row */
.afsm-order-notes-panel{
  grid-area:notes!important;
  grid-column:1 / -1!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  justify-self:stretch!important;
}

.afsm-order-notes-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  gap:10px!important;
}

.afsm-order-note-item{
  width:100%!important;
  min-width:0!important;
  min-height:96px!important;
  padding:12px!important;
}

.afsm-order-note-top{
  gap:8px!important;
  margin-bottom:8px!important;
}

.afsm-order-note-top small{
  font-size:9px!important;
}

.afsm-order-note-item p{
  font-size:10.5px!important;
  line-height:1.55!important;
}

.afsm-order-note-item .afsm-badge{
  min-height:25px!important;
  padding:0 9px!important;
  font-size:9.5px!important;
}

/* Customer inline editor readability */
.afsm-order-customer-editor label>span{
  font-size:10px!important;
}

.afsm-order-customer-editor input{
  height:40px!important;
  font-size:10.5px!important;
}

/* Mid-size desktop/tablet: 2-column remains readable */
@media(max-width:1099px) and (min-width:761px){
  #afsm-order-modal .afsm-modal-dialog{
    width:95vw!important;
    max-width:95vw!important;
  }

  .afsm-order-detail-grid{
    grid-template-columns:minmax(280px,.85fr) minmax(0,1.35fr)!important;
    grid-template-areas:
      "customer products"
      "fulfillment fulfillment"
      "notes notes"!important;
  }

  .afsm-order-fulfillment-panel{
    display:grid!important;
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;
    gap:14px!important;
  }

  .afsm-order-notes-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* Mobile keeps font readable instead of shrinking it further. */
@media(max-width:760px){
  .afsm-detail-panel-head h3{
    font-size:13px!important;
  }

  .afsm-customer-detail strong,
  .afsm-order-item-info strong{
    font-size:11.5px!important;
  }

  .afsm-customer-detail span,
  .afsm-order-item-info span,
  .afsm-meta-list span,
  .afsm-meta-list strong,
  .afsm-order-ops label>span{
    font-size:10px!important;
  }

  .afsm-order-notes-list{
    grid-template-columns:1fr!important;
  }

  .afsm-order-note-item{
    min-height:auto!important;
  }
}


/* =========================================================
   v1.9.13 ORDER STATUS + ACTION SUMMARY POLISH
   ========================================================= */

/* ---------- ORDER ACTION PANEL ---------- */
.afsm-order-detail-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  padding:10px!important;
  border:1px solid #e7ebf2;
  border-radius:16px;
  background:#fbfcfe;
  box-shadow:0 8px 22px rgba(28,38,58,.035);
}

.afsm-order-detail-actions>.afsm-secondary-btn{
  min-height:42px!important;
  padding:9px 12px!important;
  border:1px solid #e1e6ee!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#415069!important;
  font-size:11px!important;
  font-weight:700!important;
  box-shadow:0 4px 12px rgba(35,45,65,.025);
}

.afsm-order-detail-actions>.afsm-secondary-btn:hover{
  border-color:#cfd6e2!important;
  background:#fafbfe!important;
}

.afsm-order-detail-actions>.afsm-order-whatsapp{
  grid-column:1/-1!important;
  background:#effaf4!important;
  border-color:#d4ecdf!important;
  color:#247a58!important;
}

.afsm-order-detail-actions>.afsm-order-whatsapp:hover{
  background:#e9f7f0!important;
  border-color:#c6e4d4!important;
}

.afsm-order-detail-total{
  grid-column:1/-1!important;
  min-height:78px!important;
  display:grid!important;
  grid-template-columns:1fr auto!important;
  grid-template-areas:
    "label amount"!important;
  align-items:center!important;
  gap:16px!important;
  padding:14px 16px!important;
  margin:0!important;
  border:1px solid #e2e7ef!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  box-shadow:none!important;
}

.afsm-order-detail-total span{
  grid-area:label;
  margin:0!important;
  color:#7f899b!important;
  font-size:10px!important;
  font-weight:800!important;
}

.afsm-order-detail-total strong{
  grid-area:amount;
  color:#263146!important;
  font-size:24px!important;
  line-height:1!important;
  letter-spacing:-.02em;
  white-space:nowrap;
}

/* ---------- STATUS TIMELINE ---------- */
.afsm-order-status-flow{
  position:relative;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:14px 0 16px!important;
  padding:10px!important;
  border:1px solid #e8ecf2!important;
  border-radius:16px!important;
  background:#fff!important;
  overflow:hidden;
}

.afsm-order-status-flow:before{
  content:"";
  position:absolute;
  left:11%;
  right:11%;
  top:50%;
  height:2px;
  background:#e8edf4;
  transform:translateY(-50%);
  z-index:0;
}

.afsm-flow-step{
  position:relative!important;
  z-index:1;
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:8px 12px!important;
  border:1px solid #e6ebf2!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#8490a3!important;
  box-shadow:0 3px 10px rgba(35,45,65,.02);
}

.afsm-flow-inner{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0;
  width:100%;
}

.afsm-flow-step .afsm-flow-indicator{
  position:static!important;
  flex:0 0 28px!important;
  width:28px!important;
  height:28px!important;
  border:2px solid #d5dce7!important;
  border-radius:50%!important;
  background:#fff!important;
  transform:none!important;
}

.afsm-flow-step .afsm-flow-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11.5px!important;
  font-weight:800!important;
  color:inherit!important;
}

.afsm-flow-step.done{
  border-color:#d5eee2!important;
  background:#f6fcf8!important;
  color:#1f835d!important;
}

.afsm-flow-step.done .afsm-flow-indicator{
  position:relative!important;
  border-color:#37b77f!important;
  background:#37b77f!important;
}

.afsm-flow-step.done .afsm-flow-indicator:after{
  content:"";
  position:absolute;
  left:8px;
  top:5px;
  width:7px;
  height:12px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.afsm-flow-step.active{
  border-color:#d8d3ff!important;
  background:#f8f7ff!important;
  color:#5a50e7!important;
  box-shadow:0 6px 18px rgba(98,88,246,.08);
}

.afsm-flow-step.active .afsm-flow-indicator{
  position:relative!important;
  border-color:#7268ff!important;
  background:#fff!important;
  box-shadow:0 0 0 5px rgba(114,104,255,.10)!important;
}

.afsm-flow-step.active .afsm-flow-indicator:after{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:50%;
  background:#7268ff;
}

.afsm-flow-step:not(.done):not(.active) .afsm-flow-indicator{
  background:#fff!important;
}

/* ---------- RESPONSIVE ---------- */
@media(max-width:980px){
  .afsm-order-detail-actions{
    grid-template-columns:1fr 1fr!important;
  }

  .afsm-order-detail-actions>.afsm-order-whatsapp{
    grid-column:1/-1!important;
  }
}

@media(max-width:760px){
  .afsm-order-detail-actions{
    grid-template-columns:1fr!important;
    padding:8px!important;
  }

  .afsm-order-detail-actions>*{
    grid-column:1!important;
  }

  .afsm-order-detail-total{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "label"
      "amount"!important;
    gap:6px!important;
    text-align:left;
  }

  .afsm-order-detail-total strong{
    font-size:22px!important;
  }

  .afsm-order-status-flow{
    display:flex!important;
    overflow-x:auto!important;
    gap:8px!important;
    padding:8px!important;
    scroll-snap-type:x proximity;
  }

  .afsm-order-status-flow:before{
    display:none;
  }

  .afsm-flow-step{
    flex:0 0 145px!important;
    min-height:54px!important;
    scroll-snap-align:center;
  }
}


/* =========================================================
   v1.9.14 ORDER STATUS ICON/TEXT SPACING FIX
   ========================================================= */
.afsm-order-status-flow .afsm-flow-inner{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:12px!important;
  width:100%;
  min-width:0;
}

.afsm-order-status-flow .afsm-flow-indicator{
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  margin:0!important;
}

.afsm-order-status-flow .afsm-flow-label{
  display:block!important;
  flex:1 1 auto;
  min-width:0;
  margin:0!important;
  padding:0!important;
  line-height:1.25!important;
  white-space:nowrap;
}

.afsm-order-status-flow .afsm-flow-step{
  padding-left:14px!important;
  padding-right:14px!important;
}

@media(max-width:760px){
  .afsm-order-status-flow .afsm-flow-inner{
    gap:10px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex-basis:28px!important;
    width:28px!important;
    height:28px!important;
  }
}


/* =========================================================
   v1.9.15 ORDER STATUS SPACING + MOBILE RESPONSIVE TUNE
   ========================================================= */

/* Slightly more breathing room on desktop/tablet */
.afsm-order-status-flow .afsm-flow-inner{
  gap:15px!important;
}

.afsm-order-status-flow .afsm-flow-step{
  padding-left:16px!important;
  padding-right:16px!important;
}

.afsm-order-status-flow .afsm-flow-indicator{
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
}

.afsm-order-status-flow .afsm-flow-label{
  font-size:11.5px!important;
  line-height:1.3!important;
}

/* Tablet */
@media(max-width:980px) and (min-width:761px){
  .afsm-order-status-flow .afsm-flow-inner{
    gap:13px!important;
  }

  .afsm-order-status-flow .afsm-flow-step{
    padding-left:14px!important;
    padding-right:14px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex-basis:29px!important;
    width:29px!important;
    height:29px!important;
  }
}

/* Phones: compact but still readable */
@media(max-width:760px){
  .afsm-order-status-flow{
    display:flex!important;
    gap:8px!important;
    padding:7px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }

  .afsm-order-status-flow .afsm-flow-step{
    flex:0 0 150px!important;
    min-width:150px!important;
    min-height:52px!important;
    padding-left:12px!important;
    padding-right:12px!important;
    scroll-snap-align:center;
  }

  .afsm-order-status-flow .afsm-flow-inner{
    gap:11px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex:0 0 27px!important;
    width:27px!important;
    height:27px!important;
  }

  .afsm-order-status-flow .afsm-flow-label{
    font-size:10.5px!important;
    line-height:1.25!important;
  }
}

/* Very small phones */
@media(max-width:420px){
  .afsm-order-status-flow .afsm-flow-step{
    flex-basis:138px!important;
    min-width:138px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .afsm-order-status-flow .afsm-flow-inner{
    gap:10px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex-basis:26px!important;
    width:26px!important;
    height:26px!important;
  }

  .afsm-order-status-flow .afsm-flow-label{
    font-size:10px!important;
  }
}


/* =========================================================
   v1.9.16 MOBILE STATUS ICON CLEARANCE FIX
   ========================================================= */

/* Mobile needs extra visual clearance because active/done indicators
   have ring/halo effects that visually extend beyond their box. */
@media(max-width:760px){
  .afsm-order-status-flow .afsm-flow-step{
    flex:0 0 162px!important;
    min-width:162px!important;
    padding-left:13px!important;
    padding-right:13px!important;
  }

  .afsm-order-status-flow .afsm-flow-inner{
    gap:16px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex:0 0 28px!important;
    width:28px!important;
    height:28px!important;
    margin-right:2px!important;
  }

  .afsm-order-status-flow .afsm-flow-step.active .afsm-flow-indicator{
    margin-right:4px!important;
  }

  .afsm-order-status-flow .afsm-flow-step.done .afsm-flow-indicator{
    margin-right:3px!important;
  }

  .afsm-order-status-flow .afsm-flow-label{
    font-size:10.5px!important;
    line-height:1.25!important;
  }
}

@media(max-width:420px){
  .afsm-order-status-flow .afsm-flow-step{
    flex-basis:152px!important;
    min-width:152px!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }

  .afsm-order-status-flow .afsm-flow-inner{
    gap:14px!important;
  }

  .afsm-order-status-flow .afsm-flow-indicator{
    flex-basis:27px!important;
    width:27px!important;
    height:27px!important;
    margin-right:2px!important;
  }

  .afsm-order-status-flow .afsm-flow-step.active .afsm-flow-indicator{
    margin-right:4px!important;
  }

  .afsm-order-status-flow .afsm-flow-label{
    font-size:10px!important;
  }
}


/* =========================================================
   v1.9.33 COMPLETE PRODUCT EDITOR
   ========================================================= */
.afsm-field-help{
  display:block;margin-top:-7px;color:#8a95a8;font-size:10px;line-height:1.45
}
.afsm-toggle-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:2px 0 14px
}
.afsm-toggle-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.afsm-switch-row{
  display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid #e7ebf2;
  border-radius:13px;background:#fafbfe;cursor:pointer
}
.afsm-switch-row input{
  width:17px;height:17px;flex:0 0 17px;margin:2px 0 0;accent-color:var(--afsm-primary)
}
.afsm-switch-row span{display:block;min-width:0}
.afsm-switch-row strong{display:block;color:#46536b;font-size:11px;line-height:1.3}
.afsm-switch-row small{display:block;margin-top:3px;color:#8d97a9;font-size:9.5px;line-height:1.4}
.afsm-stock-managed-fields[hidden]{display:none!important}

.afsm-variation-row{
  grid-template-columns:1.15fr 1fr .72fr .72fr .58fr .9fr .9fr 34px!important;
}
.afsm-variation-row select{
  width:100%;height:36px;border:1px solid #e2e7f0;background:#fff;border-radius:10px;
  padding:0 8px;font-size:11px;color:#46536b;outline:none;min-width:0
}
.afsm-var-enabled{
  display:flex!important;align-items:center!important;gap:6px!important;margin-top:7px
}
.afsm-var-enabled input{width:15px!important;height:15px!important;min-width:15px;padding:0!important;accent-color:var(--afsm-primary)}
.afsm-var-enabled span{font-size:9px!important}

@media(max-width:1280px){
  .afsm-variation-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:900px){
  .afsm-toggle-grid-3{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
  .afsm-toggle-grid,.afsm-toggle-grid-3{grid-template-columns:1fr}
  .afsm-variation-row{grid-template-columns:1fr 1fr!important}
}


/* =========================================================
   v1.9.34 PRODUCT EDITOR FUNCTIONAL AUDIT + PROFESSIONAL UI
   ========================================================= */
#afsm-product-modal .afsm-modal-dialog{
  width:min(1180px,calc(100vw - 40px))!important;
  max-width:1180px!important;
  background:#f5f7fb!important;
}
#afsm-product-modal .afsm-product-editor{
  padding:24px 24px 26px!important;
}
.afsm-product-editor-head{
  margin-bottom:14px!important;
}
.afsm-product-editor-head h2{
  margin:7px 0 4px!important;
  font-size:26px!important;
  line-height:1.2!important;
}
.afsm-product-editor-head p{
  font-size:12px!important;
}
.afsm-product-editor-meta{
  display:flex;flex-wrap:wrap;gap:6px;margin-top:10px
}
.afsm-product-editor-meta span{
  display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border:1px solid #e3e8f1;
  border-radius:999px;background:#fff;color:#7a8599;font-size:9px;font-weight:750
}
.afsm-product-editor-alert{
  margin:0 0 14px;padding:11px 13px;border-radius:12px;border:1px solid #eadfb0;
  background:#fff9df;color:#806b19;font-size:11px;line-height:1.55
}
.afsm-product-editor-alert[data-type="danger"]{
  border-color:#f3cbd3;background:#fff2f5;color:#a33c54
}
.afsm-product-editor-alert[data-type="info"]{
  border-color:#cedcf4;background:#f1f6ff;color:#48658f
}
.afsm-editor-grid{
  grid-template-columns:minmax(0,1.75fr) minmax(260px,.72fr)!important;
  gap:14px!important;
  align-items:start
}
.afsm-editor-main,.afsm-editor-side{
  gap:12px!important
}
.afsm-editor-side{
  position:sticky;top:0
}
.afsm-product-card,
#afsm-product-modal .afsm-editor-side>.afsm-form-card{
  border-radius:16px!important;
  padding:16px!important;
  border:1px solid #e4e9f2!important;
  box-shadow:0 7px 20px rgba(27,39,64,.035)!important
}
.afsm-product-card>h3,
.afsm-product-card .afsm-form-card-title h3,
#afsm-product-modal .afsm-editor-side>.afsm-form-card>h3{
  color:#27344a!important;
  font-size:14px!important;
  letter-spacing:-.01em
}
.afsm-form-card-title{
  margin-bottom:13px!important
}
.afsm-form-card-title>span{
  max-width:300px!important;
  line-height:1.4!important
}
#afsm-product-modal .afsm-form-group{
  margin-bottom:12px!important;
  gap:6px!important
}
#afsm-product-modal .afsm-form-group>span{
  font-size:10.5px!important;
  color:#657188!important
}
#afsm-product-modal .afsm-form-group input,
#afsm-product-modal .afsm-form-group select{
  height:40px!important;
  border-radius:10px!important;
  padding:0 10px!important;
  font-size:11.5px!important
}
#afsm-product-modal .afsm-form-group textarea{
  border-radius:10px!important;
  padding:10px!important;
  font-size:11.5px!important;
  line-height:1.55!important
}
.afsm-switch-row{
  min-height:62px;padding:10px!important;border-radius:11px!important
}
.afsm-switch-row strong{
  font-size:10.5px!important
}
.afsm-switch-row small{
  font-size:9px!important
}
.afsm-image-preview{
  min-height:180px!important;
  border-radius:13px!important
}
.afsm-image-preview img{
  height:180px!important
}
.afsm-category-list{
  max-height:220px!important
}
.afsm-variation-toolbar{
  padding:9px 10px;margin:0 0 11px!important;border:1px solid #e8ecf3;border-radius:11px;background:#f8faff
}
.afsm-variation-row{
  padding:10px!important;border-radius:12px!important;background:#fbfcff!important
}
.afsm-variation-row input,
.afsm-variation-row select{
  height:34px!important;font-size:10.5px!important;border-radius:9px!important
}
.afsm-variation-row label span,.afsm-variation-name span{
  font-size:8.5px!important
}
.afsm-variation-name strong{
  font-size:11.5px!important
}
.afsm-field-help{
  margin-top:-5px!important
}
.afsm-shipping-card.is-virtual{
  opacity:.55
}
.afsm-shipping-card.is-virtual:after{
  content:"Produk virtual tidak membutuhkan data pengiriman.";
  display:block;margin-top:4px;padding:8px 10px;border-radius:9px;background:#f5f7fb;color:#788499;font-size:9.5px
}
#afsm-product-modal .afsm-editor-footer{
  margin-top:14px!important;
  padding-top:12px!important
}
#afsm-product-modal .afsm-editor-footer button{
  min-width:124px
}

@media(max-width:1024px){
  .afsm-editor-grid{
    grid-template-columns:1fr!important
  }
  .afsm-editor-side{
    position:static;
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@media(max-width:760px){
  #afsm-product-modal .afsm-product-editor{
    padding:14px 10px 20px!important
  }
  .afsm-product-editor-head h2{
    font-size:22px!important
  }
  .afsm-product-editor-meta{
    gap:5px
  }
  .afsm-editor-side{
    grid-template-columns:1fr!important
  }
  .afsm-product-card,
  #afsm-product-modal .afsm-editor-side>.afsm-form-card{
    padding:13px!important;
    border-radius:13px!important
  }
  .afsm-form-2,.afsm-form-3,.afsm-form-4{
    grid-template-columns:1fr!important
  }
  .afsm-toggle-grid,.afsm-toggle-grid-3{
    grid-template-columns:1fr!important
  }
  .afsm-variation-row{
    grid-template-columns:1fr!important
  }
  #afsm-product-modal .afsm-editor-footer{
    justify-content:stretch!important
  }
  #afsm-product-modal .afsm-editor-footer button{
    flex:1;min-width:0
  }
}


/* =========================================================
   v1.9.35 DASHBOARD + REPORTS RESPONSIVE AUDIT
   ========================================================= */

/* Shared safety: all dashboard/report children may shrink inside CSS grid. */
.afsm-dashboard-head,
.afsm-reports-head,
.afsm-dashboard-head>*,
.afsm-reports-head>*,
.afsm-kpis>*,
.afsm-grid-2>*,
.afsm-dashboard-insights>*,
.afsm-report-grid>*{
  min-width:0;
}

/* ---------- DASHBOARD ---------- */
.afsm-dashboard-head{
  align-items:flex-start;
}
.afsm-dashboard-head .afsm-dashboard-period{
  justify-content:flex-end;
  max-width:100%;
}
.afsm-dashboard-period select,
.afsm-dashboard-period input{
  min-width:0;
}
.afsm-dashboard-custom-dates{
  min-width:0;
}
.afsm-kpis-simple .afsm-kpi>div:last-child,
.afsm-kpis-simple .afsm-kpi-content{
  min-width:0;
  width:100%;
}
.afsm-kpis-simple .afsm-kpi strong{
  max-width:100%;
}
.afsm-kpis-simple .woocommerce-Price-amount,
.afsm-kpis-simple .woocommerce-Price-amount bdi{
  max-width:100%;
}
.afsm-card-chart{
  overflow:hidden;
}
.afsm-card-chart .afsm-chart{
  width:100%;
  max-width:100%;
}
.afsm-card-chart .afsm-chart svg{
  width:100%;
  max-width:100%;
}
.afsm-chart-labels{
  min-width:0;
}
.afsm-chart-labels span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.afsm-summary-list>div{
  min-width:0;
}
.afsm-summary-list span{
  min-width:0;
  overflow-wrap:anywhere;
}
.afsm-top-product-row>*,
.afsm-payment-row>*{
  min-width:0;
}
.afsm-top-product-sales{
  white-space:nowrap;
}

/* ---------- REPORTS ---------- */
.afsm-reports-head{
  align-items:flex-start;
}
.afsm-reports-head .afsm-export-excel-btn{
  flex:none;
  white-space:nowrap;
}
.afsm-report-filter{
  display:grid!important;
  grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto auto;
  align-items:end;
  gap:10px;
}
.afsm-report-filter label{
  min-width:0;
}
.afsm-report-filter input{
  width:100%;
  min-width:0;
}
.afsm-report-period{
  min-width:0;
}
.afsm-report-period strong{
  overflow-wrap:anywhere;
}
.afsm-report-kpis .afsm-kpi{
  min-width:0;
}
.afsm-report-kpis .afsm-kpi>div:last-child{
  min-width:0;
  width:100%;
}
.afsm-report-kpis .afsm-kpi strong{
  max-width:100%;
}
.afsm-report-kpis .woocommerce-Price-amount,
.afsm-report-kpis .woocommerce-Price-amount bdi{
  max-width:100%;
  white-space:nowrap!important;
}
.afsm-report-product,
.afsm-report-customer{
  min-width:0;
}
.afsm-report-product>strong,
.afsm-report-customer>strong{
  white-space:nowrap;
}
.afsm-status-breakdown-row>*{
  min-width:0;
}
.afsm-report-transactions-card{
  overflow:hidden;
}
.afsm-report-transactions-card .afsm-card-head{
  min-width:0;
}
.afsm-report-transactions-card .afsm-card-head>div{
  min-width:0;
}
.afsm-report-transactions-card .afsm-card-head>span{
  flex:none;
  white-space:nowrap;
}
.afsm-report-table{
  min-width:780px!important;
}
.afsm-report-table td:nth-child(3){
  min-width:180px;
}
.afsm-report-table td:nth-child(5){
  min-width:140px;
}
.afsm-report-table td:last-child{
  white-space:nowrap;
}

/* Large tablet / small laptop */
@media(max-width:1180px){
  .afsm-dashboard-head,
  .afsm-reports-head{
    flex-direction:column;
  }
  .afsm-dashboard-head .afsm-dashboard-period{
    width:100%;
    justify-content:flex-start;
  }
  .afsm-reports-head .afsm-export-excel-btn{
    align-self:flex-start;
  }
  .afsm-report-filter{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;
  }
}

/* Tablet */
@media(max-width:900px){
  .afsm-dashboard-period{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    width:100%;
  }
  .afsm-dashboard-period select{
    width:100%;
  }
  .afsm-dashboard-custom-dates{
    grid-column:1/-1;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    width:100%;
  }
  .afsm-dashboard-custom-dates[hidden]{
    display:none!important;
  }
  .afsm-dashboard-custom-dates input{
    width:100%;
  }
  .afsm-report-filter{
    grid-template-columns:1fr 1fr!important;
  }
  .afsm-report-filter .afsm-primary-btn,
  .afsm-report-filter .afsm-reset-report{
    width:100%;
  }
  .afsm-report-grid{
    grid-template-columns:1fr!important;
  }
}

/* Phone */
@media(max-width:640px){
  .afsm-dashboard-head,
  .afsm-reports-head{
    gap:10px!important;
  }

  .afsm-dashboard-head h1,
  .afsm-reports-head h1{
    overflow-wrap:anywhere;
  }

  .afsm-dashboard-period{
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  .afsm-dashboard-period>.afsm-secondary-btn{
    width:100%;
  }
  .afsm-dashboard-custom-dates{
    grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr)!important;
    gap:5px!important;
  }
  .afsm-dashboard-custom-dates span{
    display:grid;
    place-items:center;
  }

  .afsm-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .afsm-quick-action{
    min-width:0;
  }

  .afsm-kpis,
  .afsm-kpis-simple,
  .afsm-report-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .afsm-kpis-simple .afsm-kpi,
  .afsm-report-kpis .afsm-kpi{
    min-width:0;
    padding:11px!important;
  }
  .afsm-kpis-simple .afsm-kpi strong,
  .afsm-report-kpis .afsm-kpi strong{
    font-size:17px!important;
    line-height:1.15!important;
  }
  .afsm-kpis-simple .woocommerce-Price-amount,
  .afsm-kpis-simple .afsm-sales-value,
  .afsm-report-kpis .woocommerce-Price-amount{
    font-size:clamp(15px,4.7vw,20px)!important;
    letter-spacing:-.02em!important;
  }

  .afsm-grid-2,
  .afsm-dashboard-insights{
    grid-template-columns:1fr!important;
    gap:10px!important;
    margin-bottom:10px!important;
  }

  .afsm-card-chart .afsm-chart{
    min-height:190px!important;
  }
  .afsm-card-chart .afsm-chart svg{
    height:158px!important;
  }
  /* Keep chart labels readable on narrow widths; retain first/5th/last labels. */
  .afsm-chart-labels span{
    font-size:8.5px!important;
  }
  .afsm-chart-labels span:not(:nth-child(5n+1)):not(:last-child){
    display:none;
  }

  .afsm-top-product-row{
    grid-template-columns:25px 38px minmax(0,1fr) auto!important;
    gap:7px!important;
  }
  .afsm-top-product-image img{
    width:38px!important;
    height:38px!important;
  }
  .afsm-top-product-sales strong{
    font-size:12px!important;
  }

  .afsm-reports-head .afsm-export-excel-btn{
    width:100%;
    align-self:stretch;
  }

  .afsm-report-filter{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    padding:10px!important;
  }
  .afsm-report-filter label>span{
    font-size:8.5px!important;
  }
  .afsm-report-filter input{
    height:39px!important;
    padding:0 8px!important;
    font-size:10px!important;
  }
  .afsm-report-filter .afsm-primary-btn,
  .afsm-report-filter .afsm-reset-report{
    grid-column:1/-1;
  }

  .afsm-report-period{
    padding:9px 10px;
    border:1px solid #e9edf4;
    border-radius:11px;
    background:#fbfcfe;
    line-height:1.45!important;
  }
  .afsm-report-period span{
    font-size:9px;
  }
  .afsm-report-period strong{
    margin-top:2px;
    font-size:10px;
  }

  .afsm-report-product{
    grid-template-columns:25px 36px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:9px!important;
  }
  .afsm-report-product>strong{
    grid-column:auto!important;
    font-size:10.5px!important;
  }
  .afsm-report-customer{
    grid-template-columns:25px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:9px!important;
  }
  .afsm-report-customer>strong{
    grid-column:auto!important;
    font-size:10.5px!important;
  }
  .afsm-report-product div>strong,
  .afsm-report-customer div>strong{
    font-size:10.5px!important;
  }
  .afsm-report-product div>span,
  .afsm-report-customer div>span{
    font-size:8.5px!important;
  }

  .afsm-status-breakdown{
    gap:9px!important;
  }
  .afsm-status-breakdown-row{
    grid-template-columns:minmax(0,1fr) 42px!important;
    gap:6px!important;
  }
  .afsm-status-breakdown-row .afsm-progress{
    grid-column:1/-1!important;
  }

  .afsm-report-transactions-card{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .afsm-report-transactions-card .afsm-card-head{
    align-items:center!important;
  }
  .afsm-report-table{
    min-width:700px!important;
  }
  .afsm-report-table thead th{
    padding:10px!important;
    font-size:9px!important;
  }
  .afsm-report-table tbody td{
    padding:10px!important;
    font-size:10.5px!important;
  }
  .afsm-table-responsive{
    margin-left:-2px;
    margin-right:-2px;
    padding-bottom:4px;
  }
}

/* Small phones */
@media(max-width:420px){
  .afsm-dashboard-custom-dates{
    grid-template-columns:1fr!important;
  }
  .afsm-dashboard-custom-dates span{
    display:none!important;
  }

  .afsm-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .afsm-quick-action{
    flex-direction:column;
    align-items:flex-start!important;
    min-height:86px!important;
  }
  .afsm-quick-action strong,
  .afsm-quick-action span:not(.afsm-quick-icon){
    width:100%;
  }

  .afsm-kpis,
  .afsm-kpis-simple,
  .afsm-report-kpis{
    grid-template-columns:1fr!important;
  }
  .afsm-kpis-simple .afsm-kpi,
  .afsm-report-kpis .afsm-kpi{
    flex-direction:row!important;
    align-items:center!important;
  }
  .afsm-kpis-simple .woocommerce-Price-amount,
  .afsm-kpis-simple .afsm-sales-value,
  .afsm-report-kpis .woocommerce-Price-amount{
    font-size:20px!important;
  }

  .afsm-report-filter{
    grid-template-columns:1fr!important;
  }
  .afsm-report-filter .afsm-primary-btn,
  .afsm-report-filter .afsm-reset-report{
    grid-column:1!important;
  }

  .afsm-report-product{
    grid-template-columns:24px 34px minmax(0,1fr)!important;
  }
  .afsm-report-product>strong{
    grid-column:3!important;
    text-align:left!important;
    margin-top:2px;
  }
  .afsm-report-customer{
    grid-template-columns:24px minmax(0,1fr)!important;
  }
  .afsm-report-customer>strong{
    grid-column:2!important;
    text-align:left!important;
    margin-top:2px;
  }

  .afsm-report-table{
    min-width:660px!important;
  }
}


/* =========================================================
   v1.9.36 MODERN PROFESSIONAL ORDERS PAGE
   ========================================================= */
.afsm-orders-head{align-items:flex-start;margin-bottom:14px!important}
.afsm-orders-head h1{letter-spacing:-.025em}
.afsm-orders-head p{max-width:680px}

/* Overview */
.afsm-order-overview{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 12px!important;
}
.afsm-order-overview>div{
  position:relative;
  min-width:0;
  padding:14px 15px 14px 17px!important;
  border:1px solid #e5eaf2!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  box-shadow:0 7px 20px rgba(25,37,62,.035)!important;
  overflow:hidden
}
.afsm-order-overview>div:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#655bff
}
.afsm-order-overview>div:nth-child(2):before{background:#e3a13b}
.afsm-order-overview>div:nth-child(3):before{background:#4c8ee6}
.afsm-order-overview>div:nth-child(4):before{background:#36a978}
.afsm-order-overview span{
  display:block;margin-bottom:5px;color:#8a95a8;font-size:9.5px;font-weight:750
}
.afsm-order-overview strong{
  display:block;color:#26344a;font-size:20px;line-height:1.1;font-weight:850
}

/* Status nav */
.afsm-orders-status-tabs{
  display:flex!important;
  gap:6px!important;
  margin:0 0 10px!important;
  padding:6px!important;
  border:1px solid #e5eaf2;
  border-radius:13px;
  background:#fff;
  overflow-x:auto;
  scrollbar-width:none
}
.afsm-orders-status-tabs::-webkit-scrollbar{display:none}
.afsm-orders-status-tabs button{
  flex:0 0 auto;
  min-height:34px;
  padding:0 11px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#7f8a9d!important;
  font-size:10px!important;
  font-weight:800!important;
  white-space:nowrap
}
.afsm-orders-status-tabs button:hover{background:#f6f7fb!important;color:#4a566c!important}
.afsm-orders-status-tabs button.active{
  background:#f1efff!important;
  color:#5d53ef!important;
  box-shadow:inset 0 0 0 1px #dedaff
}

/* Toolbar */
.afsm-orders-toolbar{
  display:grid!important;
  grid-template-columns:minmax(240px,1.35fr) minmax(170px,.7fr) minmax(150px,.62fr) auto!important;
  gap:8px!important;
  align-items:center!important;
  margin:0 0 12px!important;
  padding:10px!important;
  border:1px solid #e5eaf2!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(25,37,62,.025)
}
.afsm-orders-toolbar .afsm-field,
.afsm-orders-toolbar select,
.afsm-orders-toolbar input{
  min-width:0!important
}
.afsm-orders-toolbar .afsm-field-search{
  height:40px!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important
}
.afsm-orders-toolbar .afsm-field-search input{
  height:38px!important;
  font-size:11px!important
}
.afsm-orders-toolbar select,
.afsm-orders-toolbar>input[type="date"]{
  height:40px!important;
  padding:0 10px!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
  color:#46536b!important;
  font-size:10.5px!important;
  outline:none
}
.afsm-orders-toolbar .afsm-secondary-btn{
  min-height:40px!important;
  border-radius:10px!important
}

/* Bulk actions */
.afsm-orders-bulkbar{
  margin:0 0 12px!important;
  padding:10px 12px!important;
  border:1px solid #dcd9ff!important;
  border-radius:13px!important;
  background:#f7f6ff!important;
  box-shadow:none!important
}
.afsm-orders-bulkbar>div{min-width:0}
.afsm-orders-bulkbar>div strong{font-size:11px!important;color:#403a9b}
.afsm-orders-bulkbar>div span{font-size:9px!important;color:#7c78a6}
.afsm-orders-bulkbar select{
  min-height:38px;border-radius:9px!important
}
.afsm-orders-bulkbar .afsm-primary-btn{
  min-height:38px!important;border-radius:9px!important
}

/* Main orders card */
.afsm-orders-card{
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #e5eaf2!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(25,37,62,.035)!important
}
.afsm-orders-card-head{
  margin:0!important;
  padding:14px 16px!important;
  border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important
}
.afsm-orders-card-head h3{margin:0 0 3px!important;font-size:14px!important;letter-spacing:-.01em}
.afsm-orders-card-head p{margin:0!important;color:#8b95a7!important;font-size:9.5px!important}
.afsm-orders-card-head>span{flex:none;color:#8a95a8!important;font-size:9.5px!important;white-space:nowrap}

/* Table */
.afsm-orders-card .afsm-table-wrap{
  overflow:auto!important;
  -webkit-overflow-scrolling:touch
}
.afsm-orders-table{
  min-width:940px!important;
  border-collapse:separate!important;
  border-spacing:0!important
}
.afsm-orders-table thead th{
  position:sticky;top:0;z-index:2;
  padding:11px 12px!important;
  border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;
  color:#778398!important;
  font-size:8.8px!important;
  font-weight:850!important;
  letter-spacing:.055em;
  text-transform:uppercase;
  white-space:nowrap
}
.afsm-orders-table tbody td{
  padding:12px!important;
  border-bottom:1px solid #f0f2f6!important;
  color:#435067!important;
  font-size:10.5px!important;
  vertical-align:middle!important
}
.afsm-orders-table tbody tr{transition:background .16s ease}
.afsm-orders-table tbody tr:hover{background:#fafbff!important}
.afsm-orders-table tbody tr:last-child td{border-bottom:0!important}
.afsm-orders-table td:nth-child(2) strong{
  color:#26344a!important;font-size:11.5px!important;font-weight:850!important
}
.afsm-orders-table .afsm-order-customer strong{
  display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#2e3a50!important;font-size:10.5px!important;font-weight:800!important
}
.afsm-orders-table .afsm-order-customer span{
  display:block;max-width:190px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#929bad!important;font-size:8.8px!important
}
.afsm-orders-table .woocommerce-Price-amount{font-weight:800;color:#27344b;white-space:nowrap}
.afsm-orders-table .afsm-status-select{
  min-width:112px!important;
  height:34px!important;
  padding:0 28px 0 9px!important;
  border-radius:9px!important;
  border-color:#e0e5ee!important;
  background-color:#fff!important;
  font-size:9.5px!important;
  font-weight:750!important
}
.afsm-orders-table .afsm-action-icon{
  width:34px!important;height:34px!important;border-radius:9px!important;
  background:#f6f7fb!important;border:1px solid #e5e9f1!important;color:#536078!important
}
.afsm-orders-table .afsm-action-icon:hover{
  background:#efedff!important;border-color:#d9d4ff!important;color:#5e54ef!important
}
.afsm-orders-table .afsm-check-col{width:42px!important;text-align:center!important}
.afsm-orders-table input[type="checkbox"]{width:16px;height:16px;accent-color:#655bff}

/* Responsive */
@media(max-width:1180px){
  .afsm-order-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .afsm-orders-toolbar{
    grid-template-columns:minmax(0,1fr) minmax(160px,.55fr) minmax(150px,.5fr)!important
  }
  .afsm-orders-toolbar .afsm-secondary-btn{grid-column:1/-1;width:100%}
}
@media(max-width:760px){
  .afsm-orders-head{gap:9px!important}
  .afsm-order-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .afsm-order-overview>div{padding:11px 12px 11px 14px!important}
  .afsm-order-overview strong{font-size:17px!important}

  .afsm-orders-status-tabs{padding:5px!important}
  .afsm-orders-status-tabs button{min-height:32px;padding:0 9px!important;font-size:9.5px!important}

  .afsm-orders-toolbar{grid-template-columns:1fr 1fr!important;padding:8px!important;gap:7px!important}
  .afsm-orders-toolbar .afsm-field-search{grid-column:1/-1}
  .afsm-orders-toolbar .afsm-secondary-btn{grid-column:1/-1}
  .afsm-orders-toolbar select,
  .afsm-orders-toolbar>input[type="date"]{width:100%!important}

  .afsm-orders-bulkbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important
  }
  .afsm-orders-bulkbar>div{grid-column:1/-1}
  .afsm-orders-bulkbar select,.afsm-orders-bulkbar button{width:100%!important}

  .afsm-orders-card{border-radius:13px!important}
  .afsm-orders-card-head{padding:12px!important}
  .afsm-orders-table{min-width:820px!important}
  .afsm-orders-table thead th{padding:9px 10px!important;font-size:8.2px!important}
  .afsm-orders-table tbody td{padding:10px!important;font-size:10px!important}
}
@media(max-width:480px){
  .afsm-order-overview{grid-template-columns:1fr!important}
  .afsm-orders-toolbar{grid-template-columns:1fr!important}
  .afsm-orders-toolbar>*{grid-column:1!important}
  .afsm-orders-bulkbar{grid-template-columns:1fr!important}
  .afsm-orders-bulkbar>*{grid-column:1!important}
  .afsm-orders-table{min-width:760px!important}
}


/* =========================================================
   v1.9.37 PROFILE EDITOR FUNCTIONAL + PROFESSIONAL POLISH
   ========================================================= */
#afsm-profile-modal .afsm-profile-modal-dialog{
  width:min(940px,calc(100vw - 40px))!important;
  max-width:940px!important;
  overflow:hidden!important;
  background:#f6f8fb!important;
}
.afsm-profile-editor{
  padding:22px!important;
}
.afsm-profile-editor-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.afsm-profile-editor-title{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
}
.afsm-profile-editor-icon{
  display:grid;
  place-items:center;
  flex:0 0 42px;
  width:42px;height:42px;
  border-radius:13px;
  background:#efedff;
  color:#6258f6;
}
.afsm-profile-editor-icon svg{width:20px;height:20px}
.afsm-profile-editor-title h2{
  margin:5px 0 3px;
  color:#26344a;
  font-size:24px;
  line-height:1.2;
  letter-spacing:-.025em;
}
.afsm-profile-editor-title p{
  margin:0;
  color:#8993a5;
  font-size:11px;
  line-height:1.5;
}
.afsm-profile-status-badge{
  flex:none;
  display:inline-flex;
  align-items:center;
  min-height:29px;
  padding:0 10px;
  border:1px solid #d7ecdf;
  border-radius:999px;
  background:#eff9f3;
  color:#31815e;
  font-size:9.5px;
  font-weight:800;
}
.afsm-profile-status-badge:before{
  content:"";
  width:6px;height:6px;
  margin-right:6px;
  border-radius:50%;
  background:#48ad7d;
}
.afsm-profile-feedback{
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #dce4f0;
  border-radius:11px;
  background:#f4f7fb;
  color:#52617a;
  font-size:10.5px;
  line-height:1.5;
}
.afsm-profile-feedback[data-type="success"]{border-color:#d3eadc;background:#eff9f3;color:#34785b}
.afsm-profile-feedback[data-type="error"]{border-color:#f0cdd4;background:#fff2f4;color:#a24559}

.afsm-profile-editor-layout{
  grid-template-columns:230px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:start;
}
.afsm-profile-avatar-card{
  position:sticky;
  top:0;
  padding:18px!important;
  border-radius:16px!important;
  border:1px solid #e3e8f1!important;
  background:#fff!important;
  box-shadow:0 7px 20px rgba(25,37,62,.035)!important;
}
.afsm-profile-avatar-preview{
  width:104px!important;
  height:104px!important;
  margin-bottom:11px!important;
  border-radius:26px!important;
  border:3px solid #fff!important;
  box-shadow:0 0 0 1px #e0e5ed,0 7px 18px rgba(27,39,64,.08)!important;
}
.afsm-profile-avatar-card>strong{font-size:13px!important}
.afsm-profile-avatar-card>span{margin:3px 0 12px!important}
.afsm-profile-avatar-actions{
  width:100%;
  display:grid;
  gap:5px;
}
.afsm-profile-avatar-actions .afsm-secondary-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:100%;
}
.afsm-profile-avatar-actions .afsm-secondary-btn span{
  display:grid;place-items:center
}
.afsm-profile-avatar-actions .afsm-secondary-btn svg{width:14px;height:14px}
.afsm-profile-avatar-help{
  display:block;
  margin-top:8px;
  color:#9aa3b2;
  font-size:8.5px;
  line-height:1.45;
  text-align:center;
}

.afsm-profile-form-content{
  gap:11px!important;
}
#afsm-profile-modal .afsm-form-card{
  padding:15px!important;
  border-radius:15px!important;
  border:1px solid #e3e8f1!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(25,37,62,.03)!important;
}
#afsm-profile-modal .afsm-form-card>h3,
#afsm-profile-modal .afsm-form-card-title h3{
  color:#2b384e!important;
  font-size:13.5px!important;
  letter-spacing:-.01em
}
#afsm-profile-modal .afsm-form-card-title{
  margin-bottom:11px!important
}
#afsm-profile-modal .afsm-form-card-title>span{
  font-size:9.5px!important
}
#afsm-profile-modal .afsm-form-group{
  margin-bottom:11px!important;
  gap:5px!important
}
#afsm-profile-modal .afsm-form-group>span{
  color:#68748a!important;
  font-size:10px!important
}
#afsm-profile-modal .afsm-form-group input{
  height:40px!important;
  padding:0 10px!important;
  border-radius:10px!important;
  font-size:11px!important
}
#afsm-profile-modal .afsm-form-group input:disabled,
#afsm-profile-modal .afsm-form-group input:read-only{
  background:#f5f7fa!important;
  color:#8791a3!important
}
.afsm-password-toggle{
  right:6px!important;
  height:29px!important;
  border-radius:7px!important
}

.afsm-password-strength{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:4px;
  margin-top:7px;
}
.afsm-password-strength span{
  height:3px;border-radius:999px;background:#e5e9f0
}
.afsm-password-strength em{
  grid-column:1/-1;
  color:#98a1b0;
  font-size:8.5px;
  font-style:normal
}
.afsm-password-strength[data-level="1"] span:nth-child(1){background:#db6d7d}
.afsm-password-strength[data-level="2"] span:nth-child(-n+2){background:#dda348}
.afsm-password-strength[data-level="3"] span:nth-child(-n+3){background:#5c9bd8}
.afsm-password-strength[data-level="4"] span{background:#43a977}

.afsm-profile-security-note{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:2px;
  padding:10px 11px;
  border:1px solid #e7eaf2;
  border-radius:10px;
  background:#fafbfe;
}
.afsm-profile-security-note>span{
  display:grid;place-items:center;
  flex:0 0 27px;width:27px;height:27px;
  border-radius:8px;background:#f0efff;color:#655bff
}
.afsm-profile-security-note svg{width:13px;height:13px}
.afsm-profile-security-note strong{
  display:block;color:#566177;font-size:9.5px
}
.afsm-profile-security-note small{
  display:block;margin-top:2px;color:#929bad;font-size:8.5px;line-height:1.4
}

#afsm-profile-modal .afsm-editor-footer{
  position:sticky;
  bottom:-22px;
  z-index:5;
  margin:13px -22px -22px!important;
  padding:12px 22px!important;
  border-top:1px solid #e5e9f0;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px)
}
#afsm-profile-modal .afsm-editor-footer button{
  min-width:122px;
  min-height:39px!important;
  border-radius:10px!important
}

/* Tablet */
@media(max-width:800px){
  #afsm-profile-modal .afsm-profile-modal-dialog{
    width:min(720px,calc(100vw - 24px))!important
  }
  .afsm-profile-editor-layout{
    grid-template-columns:190px minmax(0,1fr)!important
  }
}

/* Mobile */
@media(max-width:640px){
  #afsm-profile-modal .afsm-profile-modal-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    overflow:auto!important
  }
  .afsm-profile-editor{
    padding:14px 10px 88px!important
  }
  .afsm-profile-editor-head{
    padding-right:34px;
    gap:8px
  }
  .afsm-profile-editor-title{
    gap:9px
  }
  .afsm-profile-editor-icon{
    flex-basis:36px;width:36px;height:36px;border-radius:11px
  }
  .afsm-profile-editor-title h2{font-size:21px}
  .afsm-profile-status-badge{display:none}

  .afsm-profile-editor-layout{
    grid-template-columns:1fr!important;
    gap:10px!important
  }
  .afsm-profile-avatar-card{
    position:static;
    display:grid!important;
    grid-template-columns:76px minmax(0,1fr);
    align-items:center!important;
    column-gap:12px;
    padding:13px!important;
    text-align:left
  }
  .afsm-profile-avatar-preview{
    grid-row:1/5;
    width:76px!important;height:76px!important;
    margin:0!important;border-radius:20px!important
  }
  .afsm-profile-avatar-card>strong,
  .afsm-profile-avatar-card>span{
    text-align:left!important
  }
  .afsm-profile-avatar-card>span{margin:2px 0 5px!important}
  .afsm-profile-avatar-actions{
    display:flex;
    align-items:center;
    gap:5px
  }
  .afsm-profile-avatar-actions .afsm-secondary-btn{
    width:auto!important;
    min-height:34px!important;
    padding:0 9px!important;
    font-size:9px!important
  }
  .afsm-profile-avatar-actions .afsm-link-btn{
    margin:0!important;
    font-size:9px!important
  }
  .afsm-profile-avatar-help{
    display:none
  }

  #afsm-profile-modal .afsm-form-card{
    padding:12px!important;
    border-radius:12px!important
  }
  #afsm-profile-modal .afsm-form-2{
    grid-template-columns:1fr!important
  }

  #afsm-profile-modal .afsm-editor-footer{
    position:fixed!important;
    left:0;right:0;bottom:0;
    margin:0!important;
    padding:10px!important;
    gap:7px;
    background:#fff
  }
  #afsm-profile-modal .afsm-editor-footer button{
    flex:1;
    min-width:0
  }
}


/* =========================================================
   v1.9.38 PROFILE MODAL SCROLL / VIEWPORT FIX
   ========================================================= */
#afsm-profile-modal .afsm-profile-modal-dialog{
  max-height:calc(100dvh - 44px)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#afsm-profile-modal .afsm-profile-editor{
  min-height:0!important;
}
#afsm-profile-modal .afsm-editor-footer{
  position:sticky!important;
  bottom:0!important;
  margin:14px -22px -22px!important;
  padding:12px 22px!important;
}
@media(max-height:760px) and (min-width:641px){
  #afsm-profile-modal .afsm-profile-modal-dialog{
    max-height:calc(100dvh - 24px)!important;
  }
  #afsm-profile-modal .afsm-profile-editor{
    padding-top:16px!important;
  }
  #afsm-profile-modal .afsm-profile-editor-head{
    margin-bottom:10px!important;
  }
  #afsm-profile-modal .afsm-profile-avatar-preview{
    width:88px!important;
    height:88px!important;
  }
}
@media(max-width:640px){
  #afsm-profile-modal .afsm-profile-modal-dialog{
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scrollbar-gutter:auto;
  }
  #afsm-profile-modal .afsm-profile-editor{
    min-height:100%;
    padding-bottom:78px!important;
  }
  #afsm-profile-modal .afsm-editor-footer{
    position:fixed!important;
    bottom:0!important;
    margin:0!important;
  }
}


/* =========================================================
   v1.9.39 PASSWORD CARD POLISH + PREMIUM ICONS
   ========================================================= */
.afsm-profile-password-card{overflow:hidden}
.afsm-profile-password-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:12px;
  margin-bottom:12px!important;
  border-bottom:1px solid #edf1f6;
}
.afsm-profile-password-heading{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}
.afsm-profile-password-icon{
  display:grid;
  place-items:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:12px;
  background:linear-gradient(180deg,#f2f1ff,#ebe8ff);
  color:#6157f6;
  box-shadow:inset 0 0 0 1px #e1dcff;
}
.afsm-profile-password-icon svg{width:18px;height:18px}
.afsm-profile-password-title h3{margin:0!important}
.afsm-profile-password-title small{
  display:block;
  margin-top:3px;
  color:#95a0b1;
  font-size:9.2px;
  line-height:1.45;
}
.afsm-profile-password-title>span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:#fafbfe;
  border:1px solid #e9edf4;
  color:#8d97aa!important;
  font-size:9px!important;
  font-weight:700;
  white-space:nowrap;
}
.afsm-profile-password-group>span{
  display:flex!important;
  align-items:center;
  gap:7px;
  color:#5e6a80!important;
  font-weight:700;
}
.afsm-profile-password-group>span i{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:8px;
  background:#f5f3ff;
  color:#655bff;
  font-style:normal;
  flex:none;
}
.afsm-profile-password-group>span i svg{width:13px;height:13px}
.afsm-profile-password-grid{
  align-items:start!important;
  gap:12px!important;
}
.afsm-password-field{position:relative}
#afsm-profile-modal .afsm-password-field input{
  height:46px!important;
  padding-right:92px!important;
  background:#fff!important;
}
#afsm-profile-modal .afsm-password-toggle{
  right:7px!important;
  top:50%!important;
  transform:translateY(-50%);
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:74px;
  height:32px!important;
  padding:0 12px!important;
  border:1px solid #e4e8f0!important;
  border-radius:10px!important;
  background:#f8faff!important;
  color:#5a6780!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:none!important;
}
#afsm-profile-modal .afsm-password-toggle:hover{
  background:#f1f4fb!important;
  color:#4b5670!important;
  border-color:#d9dfeb!important;
}
#afsm-profile-modal .afsm-password-toggle span{display:grid;place-items:center}
#afsm-profile-modal .afsm-password-toggle svg{width:13px;height:13px}
.afsm-password-strength{
  gap:6px!important;
  margin-top:8px!important;
}
.afsm-password-strength span{
  height:4px!important;
  border-radius:999px!important;
  background:#e7ebf3!important;
}
.afsm-password-strength em{
  margin-top:2px;
  color:#97a0ae!important;
  font-size:8.8px!important;
}
.afsm-profile-security-note-premium{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  margin-top:14px!important;
  padding:12px 13px!important;
  border:1px solid #e8edf4!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#fcfcff,#f8faff)!important;
}
.afsm-profile-security-note-premium>span{
  width:30px!important;
  height:30px!important;
  flex:0 0 30px!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#eeecff,#e7e4ff)!important;
  color:#655bff!important;
  box-shadow:inset 0 0 0 1px #ddd8ff;
}
.afsm-profile-security-note-premium>span svg{width:14px;height:14px}
.afsm-profile-security-note-premium strong{
  color:#5a6579!important;
  font-size:10px!important;
}
.afsm-profile-security-note-premium small{
  color:#97a0ae!important;
  font-size:8.7px!important;
}
@media(max-width:760px){
  .afsm-profile-password-title{
    flex-direction:column;
    align-items:flex-start;
  }
  .afsm-profile-password-title>span{
    white-space:normal;
    min-height:auto;
    padding:7px 10px;
    border-radius:10px;
  }
  .afsm-profile-password-heading{width:100%}
}
@media(max-width:640px){
  .afsm-profile-password-icon{
    width:34px;
    height:34px;
    flex-basis:34px;
    border-radius:10px;
  }
  .afsm-profile-password-icon svg{width:16px;height:16px}
  .afsm-profile-password-title{
    padding-bottom:10px;
    margin-bottom:10px!important;
  }
  #afsm-profile-modal .afsm-password-field input{
    height:44px!important;
    padding-right:84px!important;
  }
  #afsm-profile-modal .afsm-password-toggle{
    min-width:68px;
    height:30px!important;
    padding:0 10px!important;
    font-size:9.6px!important;
    gap:5px;
  }
  .afsm-profile-password-group>span{
    gap:6px;
  }
  .afsm-profile-password-group>span i{
    width:22px;
    height:22px;
    border-radius:7px;
  }
}


/* =========================================================
   v1.9.41 CUSTOMER CRM PROFESSIONAL RESPONSIVE POLISH
   ========================================================= */
.afsm-customers-head{
  align-items:flex-start;
  margin-bottom:12px!important;
}
.afsm-customers-head h1{
  letter-spacing:-.025em;
}
.afsm-customers-head p{
  max-width:720px;
}
.afsm-customers-head .afsm-head-chip{
  flex:none;
  min-height:34px;
  padding:0 11px;
  border-radius:999px;
  background:#f5f3ff;
  border:1px solid #e4e0ff;
  color:#665cf5;
  font-size:9.5px;
  font-weight:800;
  white-space:nowrap;
}

/* CRM note */
.afsm-customers-note{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  margin-bottom:12px!important;
  padding:11px 13px!important;
  border:1px solid #e8ebf4!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#fcfcff,#f8f9ff)!important;
}
.afsm-customers-note>span{
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;height:30px;
  border-radius:9px;
  background:#efedff;
  color:#655bff;
}
.afsm-customers-note>span svg{width:15px;height:15px}
.afsm-customers-note p{
  margin:0!important;
  color:#7b8699!important;
  font-size:10px!important;
  line-height:1.55!important;
}
.afsm-customers-note strong{color:#48546b}

/* Segment cards */
.afsm-customers-segments{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:9px!important;
  margin-bottom:12px!important;
}
.afsm-customers-segments button{
  position:relative;
  min-width:0;
  min-height:92px;
  padding:13px 14px!important;
  border:1px solid #e5eaf2!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  text-align:left!important;
  box-shadow:0 6px 18px rgba(25,37,62,.03)!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease!important;
  overflow:hidden;
}
.afsm-customers-segments button:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:#655bff;
}
.afsm-customers-segments button:nth-child(2):before{background:#3f91d8}
.afsm-customers-segments button:nth-child(3):before{background:#38a975}
.afsm-customers-segments button:nth-child(4):before{background:#dc9b36}
.afsm-customers-segments button:nth-child(5):before{background:#d85c73}
.afsm-customers-segments button:hover{
  transform:translateY(-1px);
  border-color:#d9dff0!important;
  box-shadow:0 9px 22px rgba(25,37,62,.055)!important;
}
.afsm-customers-segments button.active,
.afsm-customers-segments button.is-active{
  border-color:#d8d3ff!important;
  box-shadow:0 0 0 3px rgba(101,91,255,.07)!important;
}
.afsm-customers-segments button span{
  display:block;
  color:#768195!important;
  font-size:9px!important;
  font-weight:800!important;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.afsm-customers-segments button strong{
  display:block;
  margin:5px 0 3px;
  color:#27344a!important;
  font-size:22px!important;
  line-height:1!important;
  font-weight:850!important;
}
.afsm-customers-segments button small{
  display:block;
  color:#9aa3b2!important;
  font-size:8.5px!important;
  line-height:1.35!important;
}

/* CRM automation */
.afsm-customers-automation-card{
  border:1px solid #e5eaf2!important;
  border-radius:16px!important;
  box-shadow:0 7px 22px rgba(25,37,62,.03)!important;
}
.afsm-customers-automation-card .afsm-card-head{
  padding-bottom:12px!important;
  margin-bottom:12px!important;
  border-bottom:1px solid #edf0f5;
}
.afsm-customers-automation-card .afsm-card-head h3{
  font-size:14px!important;
  letter-spacing:-.01em;
}
.afsm-customers-automation-card .afsm-card-head p{
  max-width:700px;
  font-size:9.5px!important;
  line-height:1.5!important;
}
.afsm-customers-automation-card .afsm-crm-settings-grid,
.afsm-customers-automation-card .afsm-crm-template-grid{
  min-width:0;
}
.afsm-customers-automation-card textarea{
  resize:vertical;
  min-height:88px;
}

/* Customer table card */
.afsm-customers-card{
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #e5eaf2!important;
  border-radius:16px!important;
  box-shadow:0 8px 24px rgba(25,37,62,.035)!important;
}
.afsm-customers-card-head{
  margin:0!important;
  padding:14px 16px!important;
  border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important;
}
.afsm-customers-card-head h3{
  margin:0 0 3px!important;
  color:#29364c!important;
  font-size:14px!important;
}
.afsm-customers-card-head p{
  margin:0!important;
  color:#8e98a9!important;
  font-size:9.5px!important;
}
.afsm-customers-card-head>span{
  flex:none;
  color:#8c96a7!important;
  font-size:9.5px!important;
  white-space:nowrap;
}
.afsm-customers-toolbar{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(160px,220px)!important;
  gap:8px!important;
  align-items:center!important;
  margin:0!important;
  padding:10px 12px!important;
  border-bottom:1px solid #edf0f5!important;
  background:#fff!important;
}
.afsm-customers-toolbar .afsm-field-search{
  height:40px!important;
  min-width:0!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
}
.afsm-customers-toolbar .afsm-field-search input{
  height:38px!important;
  min-width:0!important;
  font-size:10.5px!important;
}
.afsm-customers-toolbar .afsm-select{
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
  color:#4d596f!important;
  font-size:10px!important;
}
.afsm-customers-toolbar .afsm-field-search:focus-within,
.afsm-customers-toolbar .afsm-select:focus{
  border-color:#bfc5ff!important;
  box-shadow:0 0 0 3px rgba(101,91,255,.08)!important;
  background:#fff!important;
}

/* Table */
.afsm-customers-card .afsm-table-wrap{
  overflow:auto!important;
  -webkit-overflow-scrolling:touch;
}
.afsm-customers-table{
  min-width:900px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.afsm-customers-table thead th{
  position:sticky;top:0;z-index:2;
  padding:11px 12px!important;
  border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;
  color:#778398!important;
  font-size:8.7px!important;
  font-weight:850!important;
  letter-spacing:.05em;
  text-transform:uppercase;
  white-space:nowrap;
}
.afsm-customers-table tbody td{
  padding:12px!important;
  border-bottom:1px solid #f0f2f6!important;
  color:#435067!important;
  font-size:10.3px!important;
  vertical-align:middle!important;
}
.afsm-customers-table tbody tr{
  transition:background .16s ease;
}
.afsm-customers-table tbody tr:hover{background:#fafbff!important}
.afsm-customers-table tbody tr:last-child td{border-bottom:0!important}
.afsm-customers-table .afsm-customer-identity{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0;
}
.afsm-customers-table .afsm-customer-identity img{
  flex:none;
  width:38px!important;height:38px!important;
  border-radius:11px!important;
  box-shadow:0 0 0 1px #e5e9f1;
}
.afsm-customers-table .afsm-customer-identity strong{
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#2b384e!important;
  font-size:10.7px!important;
  font-weight:800!important;
}
.afsm-customers-table .woocommerce-Price-amount,
.afsm-customers-table .woocommerce-Price-amount bdi{
  white-space:nowrap!important;
  color:#27344b!important;
  font-weight:800!important;
}
.afsm-customers-table .afsm-badge{
  min-height:27px!important;
  padding:0 9px!important;
  border-radius:999px!important;
  font-size:8.8px!important;
  font-weight:800!important;
}
.afsm-customers-table .afsm-action-icon,
.afsm-customers-table .afsm-secondary-btn,
.afsm-customers-table .afsm-primary-btn{
  min-height:32px!important;
  border-radius:9px!important;
}

/* Responsive */
@media(max-width:1180px){
  .afsm-customers-segments{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .afsm-customers-segments button:nth-child(4),
  .afsm-customers-segments button:nth-child(5){
    min-height:82px;
  }
}
@media(max-width:900px){
  .afsm-customers-head{
    flex-direction:column;
    gap:9px!important;
  }
  .afsm-customers-automation-card .afsm-crm-template-grid{
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:680px){
  .afsm-customers-head .afsm-head-chip{
    align-self:flex-start;
  }
  .afsm-customers-note{
    padding:10px!important;
  }
  .afsm-customers-segments{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .afsm-customers-segments button{
    min-height:78px!important;
    padding:11px 12px!important;
  }
  .afsm-customers-segments button strong{
    font-size:19px!important;
  }
  .afsm-customers-automation-card{
    padding:12px!important;
    border-radius:13px!important;
  }
  .afsm-customers-automation-card .afsm-card-head{
    align-items:flex-start!important;
  }
  .afsm-customers-automation-card .afsm-form-3,
  .afsm-customers-automation-card .afsm-crm-template-grid{
    grid-template-columns:1fr!important;
  }
  .afsm-customers-toolbar{
    grid-template-columns:1fr!important;
    padding:8px!important;
  }
  .afsm-customers-card{
    border-radius:13px!important;
  }
  .afsm-customers-card-head{
    padding:12px!important;
  }
  .afsm-customers-table{
    min-width:780px!important;
  }
  .afsm-customers-table thead th{
    padding:9px 10px!important;
    font-size:8.1px!important;
  }
  .afsm-customers-table tbody td{
    padding:10px!important;
    font-size:9.8px!important;
  }
}
@media(max-width:420px){
  .afsm-customers-segments{
    grid-template-columns:1fr 1fr!important;
  }
  .afsm-customers-segments button:last-child{
    grid-column:1/-1;
  }
  .afsm-customers-table{
    min-width:730px!important;
  }
}


/* =========================================================
   v1.9.42 INVENTORY / STOCK PROFESSIONAL RESPONSIVE POLISH
   ========================================================= */
.afsm-inventory-head{align-items:flex-start;margin-bottom:12px!important}
.afsm-inventory-head h1{letter-spacing:-.025em}
.afsm-inventory-head p{max-width:700px}
.afsm-inventory-head .afsm-head-chip{
  flex:none;min-height:34px;padding:0 11px;border-radius:999px;
  background:#f5f3ff;border:1px solid #e4e0ff;color:#655bff;
  font-size:9.5px;font-weight:800;white-space:nowrap
}

.afsm-inventory-overview{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px
}
.afsm-inventory-overview>div{
  position:relative;min-width:0;padding:14px 15px 14px 17px;border:1px solid #e5eaf2;
  border-radius:15px;background:linear-gradient(180deg,#fff,#fbfcfe);
  box-shadow:0 7px 20px rgba(25,37,62,.035);overflow:hidden
}
.afsm-inventory-overview>div:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#655bff
}
.afsm-inventory-overview>div:nth-child(2):before{background:#36a978}
.afsm-inventory-overview>div:nth-child(3):before{background:#dda13e}
.afsm-inventory-overview>div:nth-child(4):before{background:#d95d72}
.afsm-inventory-overview span{display:block;color:#8a95a8;font-size:9.5px;font-weight:750}
.afsm-inventory-overview strong{display:block;margin:5px 0 3px;color:#27344a;font-size:20px;line-height:1.05;font-weight:850}
.afsm-inventory-overview small{display:block;color:#9ba4b3;font-size:8.5px;line-height:1.35}

.afsm-inventory-card{
  padding:0!important;overflow:hidden!important;border:1px solid #e5eaf2!important;
  border-radius:16px!important;background:#fff!important;box-shadow:0 8px 24px rgba(25,37,62,.035)!important
}
.afsm-inventory-card-head{
  margin:0!important;padding:14px 16px!important;border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important
}
.afsm-inventory-card-head h3{margin:0 0 3px!important;color:#29364c!important;font-size:14px!important}
.afsm-inventory-card-head p{margin:0!important;color:#8e98a9!important;font-size:9.5px!important}
.afsm-inventory-card-head>span{flex:none;color:#8d97a8!important;font-size:9.5px!important;white-space:nowrap}

.afsm-inventory-toolbar{
  display:grid!important;grid-template-columns:minmax(260px,1fr) minmax(170px,220px)!important;
  gap:8px!important;align-items:center!important;margin:0!important;padding:10px 12px!important;
  border-bottom:1px solid #edf0f5!important;background:#fff!important
}
.afsm-inventory-toolbar .afsm-field-search{
  height:40px!important;min-width:0!important;border:1px solid #e1e6ef!important;
  border-radius:10px!important;background:#fbfcfe!important
}
.afsm-inventory-toolbar .afsm-field-search input{height:38px!important;min-width:0!important;font-size:10.5px!important}
.afsm-inventory-toolbar .afsm-select{
  width:100%!important;height:40px!important;min-width:0!important;border:1px solid #e1e6ef!important;
  border-radius:10px!important;background:#fbfcfe!important;color:#4d596f!important;font-size:10px!important
}

.afsm-inventory-card .afsm-table-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch}
.afsm-inventory-table{min-width:760px!important;border-collapse:separate!important;border-spacing:0!important}
.afsm-inventory-table thead th{
  position:sticky;top:0;z-index:2;padding:11px 12px!important;border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;color:#778398!important;font-size:8.7px!important;font-weight:850!important;
  letter-spacing:.05em;text-transform:uppercase;white-space:nowrap
}
.afsm-inventory-table tbody td{
  padding:12px!important;border-bottom:1px solid #f0f2f6!important;color:#435067!important;
  font-size:10.3px!important;vertical-align:middle!important
}
.afsm-inventory-table tbody tr{transition:background .16s ease}
.afsm-inventory-table tbody tr:hover{background:#fafbff!important}
.afsm-inventory-table tbody tr[data-stock-state="low"]{background:#fffdf8}
.afsm-inventory-table tbody tr[data-stock-state="out"]{background:#fffafb}
.afsm-inventory-product{display:flex!important;align-items:center!important;gap:10px!important;min-width:0}
.afsm-inventory-product img{
  flex:none;width:42px!important;height:42px!important;object-fit:cover;border-radius:11px!important;
  box-shadow:0 0 0 1px #e5e9f1
}
.afsm-inventory-product>div{min-width:0}
.afsm-inventory-product strong{
  display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#2c394e!important;font-size:10.7px!important;font-weight:800!important
}
.afsm-inventory-product span{display:block;margin-top:2px;color:#939dad;font-size:8.6px}
.afsm-inventory-sku{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#647087;font-size:9.5px}

.afsm-inventory-table .afsm-stock-control{
  display:inline-flex!important;align-items:center!important;gap:5px!important;padding:4px!important;
  border:1px solid #e2e7ef!important;border-radius:11px!important;background:#fafbfe!important
}
.afsm-inventory-table .afsm-stock-control button{
  display:grid!important;place-items:center!important;width:30px!important;height:30px!important;
  border:0!important;border-radius:8px!important;background:#fff!important;color:#566278!important;
  font-size:16px!important;font-weight:700!important;box-shadow:0 0 0 1px #e6eaf1!important;cursor:pointer
}
.afsm-inventory-table .afsm-stock-control button:hover{background:#f0efff!important;color:#655bff!important}
.afsm-inventory-table .afsm-stock-control input{
  width:66px!important;height:30px!important;padding:0 5px!important;border:0!important;background:transparent!important;
  color:#28354a!important;font-size:11px!important;font-weight:800!important;text-align:center!important;outline:none!important
}
.afsm-inventory-table .afsm-badge{
  min-height:27px!important;padding:0 9px!important;border-radius:999px!important;font-size:8.8px!important;font-weight:800!important
}

@media(max-width:980px){
  .afsm-inventory-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .afsm-inventory-head{flex-direction:column;gap:9px!important}
  .afsm-inventory-head .afsm-head-chip{align-self:flex-start}
  .afsm-inventory-overview{gap:8px}
  .afsm-inventory-overview>div{padding:11px 12px 11px 14px}
  .afsm-inventory-overview strong{font-size:17px}
  .afsm-inventory-card{border-radius:13px!important}
  .afsm-inventory-card-head{padding:12px!important}
  .afsm-inventory-toolbar{grid-template-columns:1fr!important;padding:8px!important}
  .afsm-inventory-table{min-width:700px!important}
  .afsm-inventory-table thead th{padding:9px 10px!important;font-size:8.1px!important}
  .afsm-inventory-table tbody td{padding:10px!important;font-size:9.8px!important}
}
@media(max-width:420px){
  .afsm-inventory-overview{grid-template-columns:1fr}
  .afsm-inventory-table{min-width:660px!important}
}


/* =========================================================
   v1.9.44 COUPONS + REVIEWS PROFESSIONAL RESPONSIVE POLISH
   ========================================================= */
.afsm-coupons-head,.afsm-reviews-head{
  align-items:flex-start;
  margin-bottom:12px!important;
}
.afsm-coupons-head h1,.afsm-reviews-head h1{
  letter-spacing:-.025em;
}
.afsm-coupons-head p,.afsm-reviews-head p{
  max-width:700px;
}

/* Coupon / Review summaries */
.afsm-coupon-overview,.afsm-review-overview{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin-bottom:12px!important;
}
.afsm-coupon-overview>div,.afsm-review-overview>div{
  position:relative;
  min-width:0;
  padding:14px 15px 14px 17px!important;
  border:1px solid #e5eaf2!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  box-shadow:0 7px 20px rgba(25,37,62,.035)!important;
  overflow:hidden;
}
.afsm-coupon-overview>div:before,.afsm-review-overview>div:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#655bff;
}
.afsm-coupon-overview>div:nth-child(2):before,.afsm-review-overview>div:nth-child(2):before{background:#4380d7}
.afsm-coupon-overview>div:nth-child(3):before,.afsm-review-overview>div:nth-child(3):before{background:#36a978}
.afsm-coupon-overview>div:nth-child(4):before,.afsm-review-overview>div:nth-child(4):before{background:#db9a36}
.afsm-coupon-overview span,.afsm-review-overview span{
  display:block;margin-bottom:5px;color:#8a95a8!important;font-size:9.5px!important;font-weight:750!important;
}
.afsm-coupon-overview strong,.afsm-review-overview strong{
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#26344a!important;font-size:20px!important;line-height:1.1!important;font-weight:850!important;
}

/* Toolbars */
.afsm-coupons-toolbar,.afsm-reviews-toolbar{
  display:grid!important;
  grid-template-columns:minmax(250px,1fr) minmax(160px,.6fr) auto!important;
  gap:8px!important;
  align-items:center!important;
  margin:0 0 12px!important;
  padding:10px!important;
  border:1px solid #e5eaf2!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(25,37,62,.025)!important;
}
.afsm-coupons-toolbar .afsm-field-search,
.afsm-reviews-toolbar .afsm-field-search{
  height:40px!important;
  min-width:0!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
}
.afsm-coupons-toolbar .afsm-field-search input,
.afsm-reviews-toolbar .afsm-field-search input{
  height:38px!important;
  min-width:0!important;
  font-size:10.5px!important;
}
.afsm-coupons-toolbar select,.afsm-reviews-toolbar select,
.afsm-coupons-toolbar input:not([type="search"]),
.afsm-reviews-toolbar input:not([type="search"]){
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  padding:0 10px!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
  color:#46536b!important;
  font-size:10px!important;
}
.afsm-coupons-toolbar .afsm-primary-btn,.afsm-coupons-toolbar .afsm-secondary-btn,
.afsm-reviews-toolbar .afsm-primary-btn,.afsm-reviews-toolbar .afsm-secondary-btn{
  min-height:40px!important;
  border-radius:10px!important;
}

/* Cards */
.afsm-coupons-card,.afsm-reviews-card{
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #e5eaf2!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(25,37,62,.035)!important;
}
.afsm-coupons-card-head,.afsm-reviews-card-head{
  margin:0!important;
  padding:14px 16px!important;
  border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important;
}
.afsm-coupons-card-head h3,.afsm-reviews-card-head h3{
  margin:0 0 3px!important;color:#29364c!important;font-size:14px!important;
}
.afsm-coupons-card-head p,.afsm-reviews-card-head p{
  margin:0!important;color:#8e98a9!important;font-size:9.5px!important;
}
.afsm-coupons-card-head>span,.afsm-reviews-card-head>span{
  flex:none;color:#8d97a8!important;font-size:9.5px!important;white-space:nowrap;
}
.afsm-coupons-card .afsm-table-wrap,.afsm-reviews-card .afsm-table-wrap{
  overflow:auto!important;-webkit-overflow-scrolling:touch;
}

/* Coupon table */
.afsm-coupons-table{
  min-width:840px!important;
  border-collapse:separate!important;border-spacing:0!important;
}
.afsm-coupons-table thead th,
.afsm-reviews-table thead th{
  position:sticky;top:0;z-index:2;
  padding:11px 12px!important;
  border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;
  color:#778398!important;
  font-size:8.7px!important;
  font-weight:850!important;
  letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;
}
.afsm-coupons-table tbody td,
.afsm-reviews-table tbody td{
  padding:12px!important;border-bottom:1px solid #f0f2f6!important;
  color:#435067!important;font-size:10.3px!important;vertical-align:middle!important;
}
.afsm-coupons-table tbody tr,.afsm-reviews-table tbody tr{
  transition:background .16s ease;
}
.afsm-coupons-table tbody tr:hover,.afsm-reviews-table tbody tr:hover{
  background:#fafbff!important;
}
.afsm-coupons-table strong{
  color:#2a374c!important;
  font-weight:850!important;
}
.afsm-coupons-table code{
  display:inline-flex;align-items:center;min-height:27px;padding:0 8px;
  border:1px solid #e4e8f0;border-radius:8px;background:#f8faff;color:#5a6274;
  font-size:9.5px;font-weight:800;
}
.afsm-coupons-table .woocommerce-Price-amount,
.afsm-coupons-table .woocommerce-Price-amount bdi{
  white-space:nowrap!important;font-weight:800!important;
}
.afsm-coupons-table .afsm-badge,.afsm-reviews-table .afsm-badge{
  min-height:27px!important;padding:0 9px!important;border-radius:999px!important;
  font-size:8.8px!important;font-weight:800!important;
}

/* Reviews */
.afsm-reviews-table{
  min-width:900px!important;
  border-collapse:separate!important;border-spacing:0!important;
}
.afsm-reviews-table .afsm-review-author,
.afsm-reviews-table .afsm-customer{
  min-width:0;
}
.afsm-reviews-table .afsm-review-author strong,
.afsm-reviews-table .afsm-customer strong{
  display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#2c394f!important;font-size:10.6px!important;font-weight:800!important;
}
.afsm-reviews-table .afsm-review-author span,
.afsm-reviews-table .afsm-customer span{
  display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#929cac!important;font-size:8.7px!important;
}
.afsm-reviews-table .afsm-stars,
.afsm-reviews-table .star-rating{
  white-space:nowrap;
}
.afsm-reviews-table .afsm-action-icon,
.afsm-coupons-table .afsm-action-icon,
.afsm-reviews-table .afsm-secondary-btn,
.afsm-coupons-table .afsm-secondary-btn,
.afsm-reviews-table .afsm-primary-btn,
.afsm-coupons-table .afsm-primary-btn{
  min-height:32px!important;border-radius:9px!important;
}

/* Coupon modal/form */
#afsm-coupon-modal .afsm-modal-dialog{
  width:min(760px,calc(100vw - 32px))!important;
  max-height:calc(100dvh - 36px)!important;
  overflow-y:auto!important;
}
#afsm-coupon-modal .afsm-form-card{
  border:1px solid #e5eaf2!important;
  border-radius:14px!important;
  box-shadow:0 6px 18px rgba(25,37,62,.03)!important;
}
#afsm-coupon-modal input,
#afsm-coupon-modal select,
#afsm-coupon-modal textarea{
  border-radius:10px!important;
}

/* Responsive */
@media(max-width:980px){
  .afsm-coupon-overview,.afsm-review-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  .afsm-coupons-head,.afsm-reviews-head{
    flex-direction:column;gap:9px!important;
  }
  .afsm-coupons-toolbar,.afsm-reviews-toolbar{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;padding:8px!important;
  }
  .afsm-coupons-toolbar .afsm-field-search,
  .afsm-reviews-toolbar .afsm-field-search{
    grid-column:1/-1;
  }
  .afsm-coupons-toolbar>*:last-child,
  .afsm-reviews-toolbar>*:last-child{
    grid-column:1/-1;width:100%;
  }
  .afsm-coupons-card,.afsm-reviews-card{
    border-radius:13px!important;
  }
  .afsm-coupons-card-head,.afsm-reviews-card-head{
    padding:12px!important;
  }
  .afsm-coupons-table{min-width:760px!important}
  .afsm-reviews-table{min-width:800px!important}
  .afsm-coupons-table thead th,.afsm-reviews-table thead th{
    padding:9px 10px!important;font-size:8.1px!important;
  }
  .afsm-coupons-table tbody td,.afsm-reviews-table tbody td{
    padding:10px!important;font-size:9.8px!important;
  }
}
@media(max-width:480px){
  .afsm-coupon-overview,.afsm-review-overview{
    grid-template-columns:1fr!important;
  }
  .afsm-coupons-toolbar,.afsm-reviews-toolbar{
    grid-template-columns:1fr!important;
  }
  .afsm-coupons-toolbar>*,.afsm-reviews-toolbar>*{
    grid-column:1!important;
  }
  .afsm-coupons-table{min-width:700px!important}
  .afsm-reviews-table{min-width:740px!important}
}


/* =========================================================
   v1.9.45 NOTIFICATION CENTER PROFESSIONAL RESPONSIVE POLISH
   ========================================================= */
.afsm-notifications-head{
  align-items:flex-start;
  margin-bottom:12px!important;
}
.afsm-notifications-head h1{
  letter-spacing:-.025em;
}
.afsm-notifications-head p{
  max-width:700px;
}

/* Overview */
.afsm-notification-overview{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin-bottom:12px!important;
}
.afsm-notification-overview>div{
  position:relative;
  min-width:0;
  padding:14px 15px 14px 17px!important;
  border:1px solid #e5eaf2!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  box-shadow:0 7px 20px rgba(25,37,62,.035)!important;
  overflow:hidden;
}
.afsm-notification-overview>div:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:#655bff;
}
.afsm-notification-overview>div:nth-child(2):before{background:#4380d7}
.afsm-notification-overview>div:nth-child(3):before{background:#36a978}
.afsm-notification-overview>div:nth-child(4):before{background:#db9a36}
.afsm-notification-overview span{
  display:block;
  margin-bottom:5px;
  color:#8a95a8!important;
  font-size:9.5px!important;
  font-weight:750!important;
}
.afsm-notification-overview strong{
  display:block;
  color:#26344a!important;
  font-size:20px!important;
  line-height:1.1!important;
  font-weight:850!important;
  white-space:nowrap;
}

/* Toolbar */
.afsm-notifications-toolbar{
  display:grid!important;
  grid-template-columns:minmax(240px,1fr) minmax(160px,.55fr) auto!important;
  gap:8px!important;
  align-items:center!important;
  margin:0 0 12px!important;
  padding:10px!important;
  border:1px solid #e5eaf2!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(25,37,62,.025)!important;
}
.afsm-notifications-toolbar .afsm-field-search{
  height:40px!important;
  min-width:0!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
}
.afsm-notifications-toolbar .afsm-field-search input{
  height:38px!important;
  min-width:0!important;
  font-size:10.5px!important;
}
.afsm-notifications-toolbar select{
  width:100%!important;
  height:40px!important;
  min-width:0!important;
  border:1px solid #e1e6ef!important;
  border-radius:10px!important;
  background:#fbfcfe!important;
  color:#4d596f!important;
  font-size:10px!important;
}
.afsm-notifications-toolbar .afsm-primary-btn,
.afsm-notifications-toolbar .afsm-secondary-btn{
  min-height:40px!important;
  border-radius:10px!important;
}

/* Main card */
.afsm-notifications-card{
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #e5eaf2!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(25,37,62,.035)!important;
}
.afsm-notifications-card-head{
  margin:0!important;
  padding:14px 16px!important;
  border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important;
}
.afsm-notifications-card-head h3{
  margin:0 0 3px!important;
  color:#29364c!important;
  font-size:14px!important;
}
.afsm-notifications-card-head p{
  margin:0!important;
  color:#8e98a9!important;
  font-size:9.5px!important;
}
.afsm-notifications-card-head>span{
  flex:none;
  color:#8d97a8!important;
  font-size:9.5px!important;
  white-space:nowrap;
}

/* List rows */
.afsm-notifications-list{
  display:grid;
  gap:0!important;
}
.afsm-notification-row{
  position:relative;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:11px!important;
  align-items:start!important;
  min-width:0;
  margin:0!important;
  padding:13px 15px!important;
  border:0!important;
  border-bottom:1px solid #f0f2f6!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  transition:background .16s ease!important;
}
.afsm-notification-row:hover{
  background:#fafbff!important;
}
.afsm-notification-row:last-child{
  border-bottom:0!important;
}
.afsm-notification-row.is-unread,
.afsm-notification-row.unread{
  background:#fbfaff!important;
}
.afsm-notification-row.is-unread:before,
.afsm-notification-row.unread:before{
  content:"";
  position:absolute;
  left:0;
  top:11px;
  bottom:11px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:#655bff;
}
.afsm-notification-row>*{
  min-width:0;
}
.afsm-notification-row strong{
  color:#2d394e!important;
  font-size:10.8px!important;
  font-weight:820!important;
}
.afsm-notification-row p{
  margin:3px 0 0!important;
  color:#7f8a9c!important;
  font-size:9.5px!important;
  line-height:1.5!important;
  overflow-wrap:anywhere;
}
.afsm-notification-row small{
  color:#99a2b1!important;
  font-size:8.5px!important;
}
.afsm-notification-row .afsm-action-icon,
.afsm-notification-row .afsm-secondary-btn,
.afsm-notification-row .afsm-primary-btn{
  min-height:32px!important;
  border-radius:9px!important;
}

/* Table fallback */
.afsm-notifications-card .afsm-table-wrap{
  overflow:auto!important;
  -webkit-overflow-scrolling:touch;
}
.afsm-notifications-table{
  min-width:780px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.afsm-notifications-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  padding:11px 12px!important;
  border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;
  color:#778398!important;
  font-size:8.7px!important;
  font-weight:850!important;
  letter-spacing:.05em;
  text-transform:uppercase;
  white-space:nowrap;
}
.afsm-notifications-table tbody td{
  padding:12px!important;
  border-bottom:1px solid #f0f2f6!important;
  color:#435067!important;
  font-size:10.3px!important;
  vertical-align:middle!important;
}

/* Empty state */
.afsm-notifications-card .afsm-empty,
.afsm-notifications-card .afsm-empty-state{
  min-height:190px!important;
  padding:30px!important;
  text-align:center!important;
}

/* Responsive */
@media(max-width:980px){
  .afsm-notification-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  .afsm-notifications-head{
    flex-direction:column;
    gap:9px!important;
  }
  .afsm-notifications-toolbar{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    padding:8px!important;
  }
  .afsm-notifications-toolbar .afsm-field-search{
    grid-column:1/-1;
  }
  .afsm-notifications-toolbar>*:last-child{
    grid-column:1/-1;
    width:100%;
  }
  .afsm-notifications-card{
    border-radius:13px!important;
  }
  .afsm-notifications-card-head{
    padding:12px!important;
  }
  .afsm-notification-row{
    grid-template-columns:auto minmax(0,1fr)!important;
    padding:11px 12px!important;
  }
  .afsm-notification-row>*:last-child{
    grid-column:2;
    justify-self:start;
  }
  .afsm-notifications-table{
    min-width:700px!important;
  }
}
@media(max-width:480px){
  .afsm-notification-overview{
    grid-template-columns:1fr!important;
  }
  .afsm-notifications-toolbar{
    grid-template-columns:1fr!important;
  }
  .afsm-notifications-toolbar>*{
    grid-column:1!important;
  }
  .afsm-notification-row{
    gap:8px!important;
  }
}


/* =========================================================
   v1.9.46 STAFF & ROLE PROFESSIONAL + PERMISSION SAFETY
   ========================================================= */
.afsm-staff-head{align-items:flex-start;margin-bottom:12px!important}
.afsm-staff-head h1{letter-spacing:-.025em}
.afsm-staff-head p{max-width:700px}
.afsm-add-staff-btn{display:inline-flex!important;align-items:center;gap:7px}
.afsm-add-staff-btn span{display:grid;place-items:center}
.afsm-add-staff-btn svg{width:15px;height:15px}

.afsm-staff-overview{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px
}
.afsm-staff-overview>div{
  position:relative;min-width:0;padding:14px 15px 14px 17px;border:1px solid #e5eaf2;
  border-radius:15px;background:linear-gradient(180deg,#fff,#fbfcfe);
  box-shadow:0 7px 20px rgba(25,37,62,.035);overflow:hidden
}
.afsm-staff-overview>div:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#655bff
}
.afsm-staff-overview>div:nth-child(2):before{background:#db9a36}
.afsm-staff-overview>div:nth-child(3):before{background:#4380d7}
.afsm-staff-overview>div:nth-child(4):before{background:#36a978}
.afsm-staff-overview span{display:block;color:#8994a6;font-size:9.5px;font-weight:750}
.afsm-staff-overview strong{display:block;margin:5px 0 3px;color:#27344a;font-size:20px;line-height:1;font-weight:850}
.afsm-staff-overview small{display:block;color:#9ba4b3;font-size:8.5px}

.afsm-staff-card{
  padding:0!important;overflow:hidden!important;border:1px solid #e5eaf2!important;
  border-radius:16px!important;background:#fff!important;box-shadow:0 8px 24px rgba(25,37,62,.035)!important
}
.afsm-staff-card-head{
  margin:0!important;padding:14px 16px!important;border-bottom:1px solid #edf0f5!important;
  background:linear-gradient(180deg,#fff,#fcfdff)!important
}
.afsm-staff-card-head h3{margin:0 0 3px!important;color:#29364c!important;font-size:14px!important}
.afsm-staff-card-head p{margin:0!important;color:#8e98a9!important;font-size:9.5px!important}
.afsm-staff-card-head>span{flex:none;color:#8d97a8!important;font-size:9.5px!important;white-space:nowrap}

.afsm-staff-toolbar{
  display:grid;grid-template-columns:minmax(260px,1fr) minmax(170px,220px);gap:8px;
  padding:10px 12px;border-bottom:1px solid #edf0f5;background:#fff
}
.afsm-staff-toolbar .afsm-field-search{
  height:40px!important;border:1px solid #e1e6ef!important;border-radius:10px!important;background:#fbfcfe!important
}
.afsm-staff-toolbar input{height:38px!important;min-width:0!important;font-size:10.5px!important}
.afsm-staff-toolbar .afsm-select{
  width:100%;height:40px;border:1px solid #e1e6ef;border-radius:10px;background:#fbfcfe;color:#4d596f;font-size:10px
}
.afsm-staff-card .afsm-table-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch}
.afsm-staff-table{min-width:900px!important;border-collapse:separate!important;border-spacing:0!important}
.afsm-staff-table thead th{
  position:sticky;top:0;z-index:2;padding:11px 12px!important;border-bottom:1px solid #e8ecf2!important;
  background:#f8faff!important;color:#778398!important;font-size:8.7px!important;font-weight:850!important;
  letter-spacing:.05em;text-transform:uppercase;white-space:nowrap
}
.afsm-staff-table tbody td{
  padding:12px!important;border-bottom:1px solid #f0f2f6!important;color:#435067!important;
  font-size:10.3px!important;vertical-align:middle!important
}
.afsm-staff-table tbody tr:hover{background:#fafbff!important}
.afsm-staff-identity{display:flex!important;align-items:center!important;gap:9px!important;min-width:0}
.afsm-staff-identity img{
  flex:none;width:40px!important;height:40px!important;border-radius:12px!important;box-shadow:0 0 0 1px #e4e8ef
}
.afsm-staff-identity>div{min-width:0}
.afsm-staff-identity strong{
  display:block;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#2c394f!important;font-size:10.8px!important;font-weight:800!important
}
.afsm-staff-identity span{display:block;margin-top:2px;color:#98a1b1;font-size:8.7px}
.afsm-staff-email{display:block;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.afsm-staff-table .afsm-badge{min-height:27px!important;padding:0 9px!important;border-radius:999px!important;font-size:8.8px!important;font-weight:800!important}
.afsm-permission-mini{display:flex!important;flex-wrap:wrap!important;gap:4px!important;max-width:290px}
.afsm-permission-mini span,.afsm-permission-mini b{
  display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:0 7px;border:1px solid #e7eaf1;
  border-radius:7px;background:#f8f9fc;color:#687489;font-size:8.3px;font-weight:750
}
.afsm-permission-mini .afsm-permission-all{border-color:#d8eadf;background:#f1f9f4;color:#39805f}
.afsm-permission-mini .afsm-permission-all svg{width:11px;height:11px}
.afsm-staff-self-label{color:#98a1b0;font-size:8.8px}

/* Staff editor */
#afsm-staff-modal .afsm-staff-modal-dialog{
  width:min(900px,calc(100vw - 36px))!important;
  max-height:calc(100dvh - 40px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important
}
.afsm-staff-editor-head{
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important
}
.afsm-staff-editor-heading{display:flex;align-items:flex-start;gap:10px;min-width:0}
.afsm-staff-editor-icon{
  display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;
  background:#efedff;color:#655bff;box-shadow:inset 0 0 0 1px #dfdbff
}
.afsm-staff-editor-icon svg{width:19px;height:19px}
.afsm-staff-editor-badge{
  display:inline-flex;align-items:center;min-height:29px;padding:0 9px;border:1px solid #e3e6ef;
  border-radius:999px;background:#fafbfe;color:#7c8799;font-size:8.8px;font-weight:800;white-space:nowrap
}
.afsm-staff-feedback{
  margin:0 0 11px;padding:10px 12px;border:1px solid #dce4f0;border-radius:10px;
  background:#f5f7fb;color:#56637b;font-size:10px;line-height:1.45
}
.afsm-staff-feedback[data-type="success"]{border-color:#d3eadc;background:#eff9f3;color:#34785b}
.afsm-staff-feedback[data-type="error"]{border-color:#f0cdd4;background:#fff2f4;color:#a24559}
.afsm-staff-feedback[data-type="warning"]{border-color:#f0dfb8;background:#fffaee;color:#956b27}
.afsm-staff-account-card,.afsm-staff-permission-card{
  border:1px solid #e4e8f0!important;border-radius:15px!important;
  box-shadow:0 6px 18px rgba(25,37,62,.03)!important
}
.afsm-staff-permission-title{align-items:center!important}
.afsm-staff-permission-title>div:first-child small{display:block;margin-top:3px;color:#98a1b0;font-size:8.7px}
.afsm-permission-actions{display:flex;gap:5px}
.afsm-permission-actions button{
  min-height:30px;padding:0 9px;border:1px solid #e3e7ef;border-radius:8px;background:#f9fafc;
  color:#637087;font-size:8.8px;font-weight:800;cursor:pointer
}
.afsm-permission-actions button:hover{background:#f1efff;border-color:#ddd8ff;color:#655bff}
.afsm-permission-actions button:disabled{opacity:.45;cursor:not-allowed}
.afsm-staff-admin-note{
  margin:-2px 0 11px;padding:9px 10px;border:1px solid #ebe7c9;border-radius:9px;
  background:#fffdf2;color:#817448;font-size:8.8px;line-height:1.45
}
.afsm-staff-permission-card.is-disabled .afsm-permission-grid{opacity:.5}
.afsm-staff-permission-card .afsm-permission-check{
  min-height:74px!important;border:1px solid #e6eaf1!important;border-radius:12px!important;
  background:#fff!important;transition:border-color .16s ease,background .16s ease,transform .16s ease
}
.afsm-staff-permission-card .afsm-permission-check:has(input:checked){
  border-color:#d9d5ff!important;background:#faf9ff!important
}
.afsm-staff-permission-card .afsm-permission-check:hover{transform:translateY(-1px)}
.afsm-staff-permission-card .afsm-permission-icon{
  background:#f2f0ff!important;color:#655bff!important
}

@media(max-width:900px){
  .afsm-staff-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .afsm-staff-head{flex-direction:column;gap:9px!important}
  .afsm-add-staff-btn{width:100%;justify-content:center}
  .afsm-staff-overview{gap:8px}
  .afsm-staff-overview>div{padding:11px 12px 11px 14px}
  .afsm-staff-card{border-radius:13px!important}
  .afsm-staff-card-head{padding:12px!important}
  .afsm-staff-toolbar{grid-template-columns:1fr;padding:8px}
  .afsm-staff-table{min-width:800px!important}
  .afsm-staff-table thead th{padding:9px 10px!important;font-size:8.1px!important}
  .afsm-staff-table tbody td{padding:10px!important;font-size:9.8px!important}

  #afsm-staff-modal .afsm-staff-modal-dialog{
    width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;
    border-radius:0!important
  }
  .afsm-staff-editor-head{padding-right:32px}
  .afsm-staff-editor-badge{display:none}
  .afsm-staff-permission-title{align-items:flex-start!important;flex-direction:column!important}
  .afsm-permission-actions{width:100%}
  .afsm-permission-actions button{flex:1}
}
@media(max-width:420px){
  .afsm-staff-overview{grid-template-columns:1fr}
  .afsm-staff-table{min-width:740px!important}
}


/* =========================================================
   v1.9.47 PREMIUM STAFF MODAL VISUAL POLISH
   ========================================================= */
#afsm-staff-modal .afsm-product-editor{
  background:linear-gradient(180deg,#f7f9fd 0%,#f3f6fb 100%)!important
}
#afsm-staff-modal .afsm-modal-close{
  width:44px!important;height:44px!important;border-radius:16px!important;
  background:#ffffff!important;border:1px solid #e4e8f0!important;color:#5d6980!important;
  box-shadow:0 8px 18px rgba(24,39,75,.06)!important
}
#afsm-staff-modal .afsm-modal-close:hover{
  background:#f8f9fd!important;color:#43506a!important;transform:translateY(-1px)
}
#afsm-staff-modal .afsm-product-editor-head{
  padding:18px 18px 12px!important;margin:0!important;border-bottom:1px solid #e6ebf3!important;
  background:linear-gradient(180deg,#fcfdff 0%,#f8faff 100%)!important
}
.afsm-staff-editor-heading>div h2{
  margin:4px 0 5px!important;font-size:30px!important;line-height:1.05!important;letter-spacing:-.03em!important
}
.afsm-staff-editor-heading>div p{
  margin:0!important;color:#8390a4!important;font-size:11px!important;line-height:1.55!important
}
.afsm-staff-editor-badge{
  min-height:34px!important;padding:0 12px!important;border-radius:999px!important;background:#fff!important;
  box-shadow:0 4px 14px rgba(31,44,70,.04)!important;color:#7d879a!important
}

#afsm-staff-form{padding:16px!important;display:grid!important;gap:14px!important}
.afsm-staff-account-card,
.afsm-staff-permission-card{
  padding:18px!important;border:1px solid #e4e9f2!important;border-radius:20px!important;
  background:#fff!important;box-shadow:0 10px 26px rgba(24,39,75,.04)!important
}
.afsm-staff-block-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px
}
.afsm-staff-block-title{display:flex;align-items:flex-start;gap:12px;min-width:0}
.afsm-staff-block-icon{
  display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:14px;
  background:linear-gradient(180deg,#f1efff,#ebe8ff);color:#6359ff;border:1px solid #dfdbff
}
.afsm-staff-block-icon svg{width:19px!important;height:19px!important}
.afsm-staff-block-title h3{
  margin:1px 0 4px!important;color:#26354b!important;font-size:16px!important;line-height:1.15!important
}
.afsm-staff-block-title p{
  margin:0!important;color:#8b97aa!important;font-size:10px!important;line-height:1.55!important;max-width:620px
}
.afsm-staff-block-chip{
  display:inline-flex;align-items:center;min-height:32px;padding:0 11px;border-radius:999px;
  background:#f8f9fc;border:1px solid #e8ebf2;color:#7b8698;font-size:9px;font-weight:800;white-space:nowrap
}

.afsm-staff-form-group{gap:7px!important}
.afsm-staff-field-head{
  display:inline-flex;align-items:center;gap:8px;color:#53617a;font-size:10.3px;font-weight:800
}
.afsm-staff-field-icon{
  display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:10px;
  background:#f7f4ff;color:#6359ff;border:1px solid #e3ddff
}
.afsm-staff-field-icon svg{width:14px!important;height:14px!important}
#afsm-staff-form .afsm-staff-form-group input,
#afsm-staff-form .afsm-staff-form-group select{
  height:56px!important;border-radius:15px!important;border:1px solid #dde4ef!important;
  background:#fbfcfe!important;padding:0 16px!important;font-size:11px!important;color:#31415a!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4)!important
}
#afsm-staff-form .afsm-staff-form-group input::placeholder{color:#a7b0bf!important}
#afsm-staff-form .afsm-staff-form-group input:focus,
#afsm-staff-form .afsm-staff-form-group select:focus{
  background:#fff!important;border-color:#cfc8ff!important;
  box-shadow:0 0 0 4px rgba(101,91,255,.08)!important
}
.afsm-staff-help-text{
  display:block;margin-top:2px;color:#9aa4b4!important;font-size:8.8px!important;line-height:1.45!important
}

.afsm-staff-mini-note{
  display:flex;align-items:flex-start;gap:10px;margin-top:4px;padding:12px 13px;border-radius:14px;
  border:1px solid #e5ecf4;background:linear-gradient(180deg,#fbfcff,#f8faff)
}
.afsm-staff-mini-note-icon{
  display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:12px;background:#eff8f2;
  border:1px solid #d8eadf;color:#2f9860
}
.afsm-staff-mini-note-icon svg{width:16px!important;height:16px!important}
.afsm-staff-mini-note strong{
  display:block;margin:0 0 3px;color:#2c3a50;font-size:10px;font-weight:850
}
.afsm-staff-mini-note p{
  margin:0;color:#8591a4;font-size:8.9px;line-height:1.55
}

/* permission section */
.afsm-staff-permission-title{
  margin-bottom:12px!important;padding-bottom:12px!important;border-bottom:1px solid #edf1f6!important
}
.afsm-staff-permission-headline{display:flex;align-items:flex-start;gap:12px;min-width:0}
.afsm-staff-permission-headline h3{margin:1px 0 3px!important}
.afsm-staff-permission-headline small{display:block;color:#96a0b0;font-size:8.8px;line-height:1.45}
.afsm-staff-permission-intro{
  display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px
}
.afsm-staff-permission-intro span{
  display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 10px;border-radius:999px;
  border:1px solid #e6eaf2;background:#fafbfe;color:#6f7c91;font-size:8.8px;font-weight:750
}
.afsm-staff-permission-intro svg{width:13px!important;height:13px!important}
.afsm-staff-admin-note{
  margin-bottom:12px!important;padding:11px 12px!important;border-radius:12px!important;
  border:1px solid #efe4b8!important;background:linear-gradient(180deg,#fffdf4,#fffaec)!important;
  color:#8d7b43!important;font-size:8.9px!important;line-height:1.5!important
}
.afsm-staff-permission-card .afsm-permission-grid{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:11px!important
}
.afsm-staff-permission-card .afsm-permission-check{
  grid-template-columns:20px 42px 1fr!important;align-items:center!important;gap:10px!important;
  min-height:86px!important;padding:14px 13px!important;border-radius:16px!important;
  border:1px solid #e6ebf4!important;background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;
  box-shadow:0 6px 16px rgba(22,34,68,.03)!important
}
.afsm-staff-permission-card .afsm-permission-check:hover{
  transform:translateY(-1px)!important;border-color:#d7ddf0!important
}
.afsm-staff-permission-card .afsm-permission-check input{
  width:18px!important;height:18px!important;border-radius:6px!important
}
.afsm-staff-permission-card .afsm-permission-icon{
  width:42px!important;height:42px!important;border-radius:14px!important;
  background:linear-gradient(180deg,#f3f0ff,#eeebff)!important;color:#655bff!important;
  border:1px solid #e0dbff!important;box-shadow:none!important
}
.afsm-staff-permission-card .afsm-permission-icon svg{width:18px!important;height:18px!important}
.afsm-staff-permission-card .afsm-permission-check strong{
  display:block;color:#2d3b52!important;font-size:10.3px!important;font-weight:850!important
}
.afsm-staff-permission-card .afsm-permission-check small{
  display:block;margin-top:3px;color:#97a1b1!important;font-size:8.6px!important;line-height:1.5!important
}
.afsm-staff-permission-card .afsm-permission-check:has(input:checked){
  border-color:#d8d2ff!important;background:linear-gradient(180deg,#faf9ff 0%,#f4f2ff 100%)!important;
  box-shadow:0 10px 18px rgba(101,91,255,.08)!important
}
.afsm-staff-permission-card .afsm-permission-check:has(input:checked) .afsm-permission-icon{
  background:linear-gradient(180deg,#6b62ff,#584cff)!important;border-color:#6b62ff!important;color:#fff!important
}

/* footer */
.afsm-staff-editor-footer{
  position:sticky!important;bottom:-1px!important;z-index:5!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
  margin:0 -16px -16px!important;padding:14px 16px!important;background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(8px)!important;border-top:1px solid #e6ebf3!important;
  box-shadow:0 -10px 24px rgba(20,34,66,.05)!important
}
.afsm-staff-footer-note{
  display:flex;align-items:flex-start;gap:10px;min-width:0;max-width:58%
}
.afsm-staff-footer-icon{
  display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;
  background:#f1efff;border:1px solid #dfdbff;color:#6359ff
}
.afsm-staff-footer-icon svg{width:17px!important;height:17px!important}
.afsm-staff-footer-note strong{
  display:block;margin:0 0 2px;color:#2c394f;font-size:10px;font-weight:850
}
.afsm-staff-footer-note small{
  display:block;color:#97a1b1;font-size:8.8px;line-height:1.45
}
.afsm-staff-footer-actions{
  display:flex;align-items:center;gap:10px;flex:none
}
.afsm-staff-editor-footer .afsm-secondary-btn,
.afsm-staff-editor-footer .afsm-primary-btn{
  min-width:132px!important;height:52px!important;border-radius:16px!important;font-size:11px!important;font-weight:850!important
}

/* mobile */
@media(max-width:900px){
  .afsm-staff-permission-card .afsm-permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:680px){
  #afsm-staff-form{padding:12px!important;gap:12px!important}
  .afsm-staff-account-card,
  .afsm-staff-permission-card{padding:14px!important;border-radius:16px!important}
  .afsm-staff-block-head{flex-direction:column;align-items:flex-start}
  .afsm-staff-block-chip{display:none}
  .afsm-staff-editor-heading>div h2{font-size:24px!important}
  .afsm-staff-editor-heading>div p{font-size:10px!important}
  .afsm-staff-permission-title{gap:10px!important}
  .afsm-staff-permission-intro{gap:6px}
  .afsm-staff-permission-intro span{min-height:28px;padding:0 8px}
  .afsm-staff-permission-card .afsm-permission-grid{grid-template-columns:1fr!important;gap:9px!important}
  .afsm-staff-editor-footer{
    flex-direction:column!important;align-items:stretch!important;gap:10px!important;
    margin:0 -12px -12px!important;padding:12px!important
  }
  .afsm-staff-footer-note{max-width:none}
  .afsm-staff-footer-actions{width:100%}
  .afsm-staff-footer-actions .afsm-secondary-btn,
  .afsm-staff-footer-actions .afsm-primary-btn{flex:1;min-width:0!important;height:48px!important}
}
@media(max-width:480px){
  .afsm-staff-field-head{font-size:9.8px}
  #afsm-staff-form .afsm-staff-form-group input,
  #afsm-staff-form .afsm-staff-form-group select{height:52px!important;padding:0 14px!important;font-size:10.3px!important}
}


/* =========================================================
   v1.9.49 IPAD MINI SIDEBAR = MOBILE NAVIGATION
   ========================================================= */
@media(max-width:900px){
  .afsm-app{
    grid-template-columns:1fr!important;
  }

  .afsm-sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    z-index:1200!important;
    width:min(286px,86vw)!important;
    max-width:286px!important;
    height:100dvh!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
    box-shadow:18px 0 40px rgba(20,29,49,.14)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }

  .afsm-sidebar.is-open,
  .afsm-sidebar.open,
  .afsm-sidebar.active,
  .afsm-app.sidebar-open .afsm-sidebar{
    transform:translateX(0)!important;
  }

  .afsm-sidebar-close{
    display:grid!important;
  }

  .afsm-mobile-menu,
  .afsm-menu-toggle,
  #afsm-mobile-menu,
  #afsm-menu-toggle,
  .afsm-hamburger{
    display:grid!important;
  }

  .afsm-main,
  .afsm-content,
  .afsm-main-content{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    min-width:0!important;
  }

  body.afsm-menu-open,
  body.afsm-sidebar-open{
    overflow:hidden!important;
  }
}

/* Keep larger tablets / iPad Pro in desktop navigation. */
@media(min-width:901px){
  .afsm-sidebar{
    transform:none;
  }
}


/* =========================================================
   v1.9.50 MOBILE/TABLET SIDEBAR OVERLAY LAYER FIX
   ========================================================= */
@media(max-width:900px){
  /* Sidebar must always sit ABOVE the dark overlay. */
  .afsm-sidebar{
    z-index:10030!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    opacity:1!important;
  }

  .afsm-sidebar.open,
  .afsm-sidebar.is-open,
  .afsm-sidebar.active,
  body.afsm-drawer-open .afsm-sidebar,
  .afsm-app.sidebar-open .afsm-sidebar{
    z-index:10030!important;
    pointer-events:auto!important;
  }

  /* Overlay covers only the page behind the drawer. */
  .afsm-sidebar-overlay{
    z-index:10020!important;
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
  }

  .afsm-sidebar-overlay:not(.show){
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  .afsm-sidebar-overlay.show{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }

  /* All sidebar children remain clickable even while overlay is visible. */
  .afsm-sidebar,
  .afsm-sidebar *,
  .afsm-sidebar a,
  .afsm-sidebar button{
    pointer-events:auto!important;
  }

  .afsm-sidebar-close{
    z-index:10040!important;
    pointer-events:auto!important;
  }

  /* Prevent any old pseudo/backdrop layer from covering the drawer. */
  .afsm-app:before,
  .afsm-app:after{
    pointer-events:none;
  }
}


/* =========================================================
   v1.9.51 IPAD MINI HAMBURGER FUNCTIONAL FIX
   ========================================================= */
@media(max-width:900px){
  #afsm-mobile-menu-toggle,
  .afsm-menu-toggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 42px!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    position:relative!important;
    z-index:100!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent;
    cursor:pointer!important;
  }

  #afsm-mobile-menu-toggle svg,
  .afsm-menu-toggle svg{
    display:block!important;
    width:20px!important;
    height:20px!important;
    pointer-events:none!important;
  }

  .afsm-topbar{
    position:relative!important;
    z-index:50!important;
  }
}


/* =========================================================
   v1.9.52 IPAD MINI SIDEBAR CLOSE ICON SIZE FIX
   ========================================================= */
@media(max-width:900px){
  #afsm-sidebar-close,
  .afsm-sidebar-close{
    display:grid!important;
    place-items:center!important;
    position:absolute!important;
    top:12px!important;
    right:12px!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    max-width:36px!important;
    max-height:36px!important;
    padding:0!important;
    margin:0!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.08)!important;
    color:#fff!important;
    line-height:1!important;
    font-size:0!important;
    box-shadow:none!important;
    transform:none!important;
    z-index:10040!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }

  #afsm-sidebar-close svg,
  .afsm-sidebar-close svg{
    display:block!important;
    width:16px!important;
    height:16px!important;
    min-width:16px!important;
    min-height:16px!important;
    max-width:16px!important;
    max-height:16px!important;
    margin:0!important;
    padding:0!important;
    flex:none!important;
    pointer-events:none!important;
  }

  #afsm-sidebar-close svg path,
  .afsm-sidebar-close svg path{
    stroke-width:2!important;
  }

  .afsm-sidebar .afsm-brand{
    padding-right:48px!important;
  }
}

@media(max-width:480px){
  #afsm-sidebar-close,
  .afsm-sidebar-close{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    max-width:34px!important;
    max-height:34px!important;
    top:11px!important;
    right:10px!important;
  }

  #afsm-sidebar-close svg,
  .afsm-sidebar-close svg{
    width:15px!important;
    height:15px!important;
    min-width:15px!important;
    min-height:15px!important;
  }
}


/* =========================================================
   v1.9.53 ORDERS MOBILE PROFESSIONAL CARD VIEW
   ========================================================= */
@media(max-width:640px){
  /* Header & overview stay compact on phones */
  .afsm-orders-head{
    margin-bottom:10px!important;
  }
  .afsm-orders-head h1{
    font-size:22px!important;
  }
  .afsm-orders-head p{
    max-width:100%!important;
    font-size:11px!important;
    line-height:1.45!important;
  }

  .afsm-order-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }
  .afsm-order-overview>div{
    min-height:76px!important;
    padding:11px 12px 11px 14px!important;
    border-radius:14px!important;
  }
  .afsm-order-overview span{
    margin-bottom:5px!important;
    font-size:8.8px!important;
  }
  .afsm-order-overview strong{
    font-size:19px!important;
  }

  /* Status tabs become a clean horizontal chip rail */
  .afsm-orders-status-tabs{
    gap:5px!important;
    margin:0 -2px 10px!important;
    padding:5px!important;
    border-radius:12px!important;
    scroll-snap-type:x proximity;
  }
  .afsm-orders-status-tabs button{
    min-height:34px!important;
    padding:0 10px!important;
    border-radius:9px!important;
    font-size:9px!important;
    scroll-snap-align:start;
  }

  /* Filters: full width, finger-friendly */
  .afsm-orders-toolbar{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-bottom:10px!important;
    padding:9px!important;
    border-radius:14px!important;
  }
  .afsm-orders-toolbar>*{
    grid-column:1!important;
    width:100%!important;
  }
  .afsm-orders-toolbar .afsm-field-search,
  .afsm-orders-toolbar select,
  .afsm-orders-toolbar>input[type="date"],
  .afsm-orders-toolbar .afsm-secondary-btn{
    min-height:44px!important;
    height:44px!important;
    border-radius:11px!important;
  }
  .afsm-orders-toolbar .afsm-field-search input{
    height:42px!important;
    font-size:11px!important;
  }

  /* Bulk bar becomes a simple stacked mobile action card */
  .afsm-orders-bulkbar{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-bottom:10px!important;
    padding:10px!important;
    border-radius:13px!important;
  }
  .afsm-orders-bulkbar>div,
  .afsm-orders-bulkbar select,
  .afsm-orders-bulkbar button{
    grid-column:1!important;
    width:100%!important;
  }
  .afsm-orders-bulkbar select,
  .afsm-orders-bulkbar .afsm-primary-btn{
    min-height:43px!important;
  }

  /* Orders container */
  .afsm-orders-card{
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  .afsm-orders-card-head{
    margin-bottom:8px!important;
    padding:0 2px 8px!important;
    border-bottom:0!important;
    background:transparent!important;
  }
  .afsm-orders-card-head h3{
    font-size:13px!important;
  }
  .afsm-orders-card-head p{
    max-width:235px;
    font-size:8.8px!important;
    line-height:1.4!important;
  }
  .afsm-orders-card-head>span{
    padding:5px 8px;
    border:1px solid #e4e8f0;
    border-radius:999px;
    background:#fff;
    font-size:8.5px!important;
  }

  /* Convert table into native-feeling order cards */
  .afsm-orders-card .afsm-table-wrap{
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border-radius:0!important;
  }
  .afsm-orders-table{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    border:0!important;
  }
  .afsm-orders-table thead{
    display:none!important;
  }
  .afsm-orders-table tbody{
    display:grid!important;
    gap:10px!important;
    width:100%!important;
  }
  .afsm-orders-table tbody tr{
    position:relative;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:0 12px!important;
    width:100%!important;
    padding:14px!important;
    border:1px solid #e5eaf2!important;
    border-radius:17px!important;
    background:#fff!important;
    box-shadow:0 8px 24px rgba(26,40,70,.045)!important;
    overflow:hidden!important;
  }
  .afsm-orders-table tbody tr:hover{
    background:#fff!important;
  }
  .afsm-orders-table tbody tr[hidden]{
    display:none!important;
  }

  .afsm-orders-table tbody td{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    width:auto!important;
    min-width:0!important;
    padding:9px 0!important;
    border:0!important;
    border-bottom:1px solid #f0f2f6!important;
    font-size:10px!important;
    text-align:right!important;
  }
  .afsm-orders-table tbody td:before{
    content:attr(data-label);
    flex:0 0 auto;
    color:#8c97a9;
    font-size:8.5px;
    font-weight:800;
    letter-spacing:.025em;
    text-transform:uppercase;
    text-align:left;
  }

  /* Order number is the visual card title */
  .afsm-orders-table .afsm-order-number-cell{
    grid-column:1!important;
    grid-row:1!important;
    display:block!important;
    padding:0 0 3px!important;
    border:0!important;
    text-align:left!important;
  }
  .afsm-orders-table .afsm-order-number-cell:before{
    display:none!important;
  }
  .afsm-orders-table .afsm-order-number-cell strong{
    display:block!important;
    color:#26354b!important;
    font-size:14px!important;
    line-height:1.2!important;
    font-weight:900!important;
  }

  /* Selection checkbox lives top-right without consuming a row */
  .afsm-orders-table .afsm-order-mobile-select{
    position:absolute!important;
    top:12px!important;
    right:12px!important;
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:30px!important;
    padding:0!important;
    border:1px solid #e4e8f0!important;
    border-radius:10px!important;
    background:#fafbfe!important;
    z-index:2;
  }
  .afsm-orders-table .afsm-order-mobile-select:before{
    display:none!important;
  }
  .afsm-orders-table .afsm-order-mobile-select input{
    width:16px!important;
    height:16px!important;
    margin:0!important;
  }

  /* Customer under order number */
  .afsm-orders-table .afsm-order-customer-cell{
    grid-column:1/-1!important;
    justify-content:flex-start!important;
    padding:5px 38px 11px 0!important;
    text-align:left!important;
  }
  .afsm-orders-table .afsm-order-customer-cell:before{
    display:none!important;
  }
  .afsm-orders-table .afsm-order-customer{
    width:100%;
    text-align:left!important;
  }
  .afsm-orders-table .afsm-order-customer strong{
    max-width:100%!important;
    color:#455269!important;
    font-size:10.7px!important;
  }
  .afsm-orders-table .afsm-order-customer span{
    max-width:100%!important;
    margin-top:2px!important;
    font-size:8.8px!important;
  }

  /* Remaining fields take full card width */
  .afsm-orders-table .afsm-order-total-cell,
  .afsm-orders-table .afsm-order-payment-cell,
  .afsm-orders-table .afsm-order-status-cell,
  .afsm-orders-table .afsm-order-date-cell,
  .afsm-orders-table .afsm-order-action-cell{
    grid-column:1/-1!important;
  }
  .afsm-orders-table .afsm-order-total-cell .woocommerce-Price-amount{
    color:#27354a!important;
    font-size:11.3px!important;
    font-weight:900!important;
  }
  .afsm-orders-table .afsm-order-payment-cell{
    color:#556278!important;
    font-weight:750!important;
  }

  .afsm-orders-table .afsm-order-status-cell{
    align-items:center!important;
  }
  .afsm-orders-table .afsm-status-select{
    width:min(190px,62%)!important;
    min-width:0!important;
    height:38px!important;
    padding:0 30px 0 10px!important;
    border-radius:10px!important;
    background:#f9fafc!important;
    font-size:9.5px!important;
  }

  .afsm-orders-table .afsm-order-date-cell{
    color:#6f7b8e!important;
  }

  /* Full-width detail action instead of tiny eye icon */
  .afsm-orders-table .afsm-order-action-cell{
    padding:11px 0 0!important;
    border-bottom:0!important;
  }
  .afsm-orders-table .afsm-order-action-cell:before{
    display:none!important;
  }
  .afsm-orders-table .afsm-order-detail-btn{
    width:100%!important;
    height:42px!important;
    min-height:42px!important;
    border-radius:12px!important;
    background:linear-gradient(180deg,#f4f2ff,#efedff)!important;
    border:1px solid #ddd8ff!important;
    color:#5c53e8!important;
  }
  .afsm-orders-table .afsm-order-detail-btn:after{
    content:"Lihat Detail Pesanan";
    margin-left:7px;
    font-size:9.5px;
    font-weight:850;
  }
  .afsm-orders-table .afsm-order-detail-btn svg{
    width:16px!important;
    height:16px!important;
  }

  /* Empty states stay card-compatible */
  .afsm-orders-card .afsm-filter-empty{
    margin-top:10px!important;
    padding:24px 14px!important;
    border:1px dashed #dfe4ed!important;
    border-radius:15px!important;
    background:#fff!important;
    text-align:center!important;
  }
}

@media(max-width:380px){
  .afsm-order-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .afsm-orders-table tbody tr{
    padding:12px!important;
    border-radius:15px!important;
  }
  .afsm-orders-table .afsm-status-select{
    width:min(175px,64%)!important;
  }
}


/* =========================================================
   v1.9.54 ORDER STATUS DISTINCT COLORS
   ========================================================= */
.afsm-orders-table .afsm-status-select{
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease!important;
}

/* Pending - amber */
.afsm-orders-table .afsm-status-select[data-status="pending"],
.afsm-orders-table tr[data-order-status="pending"] .afsm-status-select{
  background:#fff8e8!important;
  border-color:#f1d89b!important;
  color:#9a6a12!important;
  box-shadow:inset 0 0 0 1px rgba(212,155,47,.03)!important;
}

/* Processing - blue */
.afsm-orders-table .afsm-status-select[data-status="processing"],
.afsm-orders-table tr[data-order-status="processing"] .afsm-status-select{
  background:#edf6ff!important;
  border-color:#bedcf7!important;
  color:#2872b5!important;
  box-shadow:inset 0 0 0 1px rgba(55,126,190,.03)!important;
}

/* On hold - orange */
.afsm-orders-table .afsm-status-select[data-status="on-hold"],
.afsm-orders-table tr[data-order-status="on-hold"] .afsm-status-select{
  background:#fff1e8!important;
  border-color:#f3c7a7!important;
  color:#ad5e25!important;
  box-shadow:inset 0 0 0 1px rgba(195,104,40,.03)!important;
}

/* Completed - green */
.afsm-orders-table .afsm-status-select[data-status="completed"],
.afsm-orders-table tr[data-order-status="completed"] .afsm-status-select{
  background:#edf9f3!important;
  border-color:#bfe4d0!important;
  color:#25835a!important;
  box-shadow:inset 0 0 0 1px rgba(42,135,91,.03)!important;
}

/* Cancelled - red */
.afsm-orders-table .afsm-status-select[data-status="cancelled"],
.afsm-orders-table tr[data-order-status="cancelled"] .afsm-status-select{
  background:#fff0f2!important;
  border-color:#efc1c9!important;
  color:#b34358!important;
  box-shadow:inset 0 0 0 1px rgba(183,69,89,.03)!important;
}

/* Disabled while saving still keeps its status identity. */
.afsm-orders-table .afsm-status-select:disabled{
  opacity:.72!important;
  cursor:wait!important;
}

@media(max-width:640px){
  .afsm-orders-table .afsm-order-status-cell{
    padding-top:11px!important;
    padding-bottom:11px!important;
  }

  .afsm-orders-table .afsm-status-select{
    font-weight:850!important;
    border-width:1px!important;
  }

  /* subtle colored accent on mobile card */
  .afsm-orders-table tbody tr[data-order-status="pending"]{
    border-left:3px solid #dfaa3c!important;
  }
  .afsm-orders-table tbody tr[data-order-status="processing"]{
    border-left:3px solid #4a91d6!important;
  }
  .afsm-orders-table tbody tr[data-order-status="on-hold"]{
    border-left:3px solid #e28747!important;
  }
  .afsm-orders-table tbody tr[data-order-status="completed"]{
    border-left:3px solid #40a878!important;
  }
  .afsm-orders-table tbody tr[data-order-status="cancelled"]{
    border-left:3px solid #d05b6e!important;
  }
}


/* =========================================================
   v1.9.55 MOBILE FOOTER NAV + FULL BOTTOM SCROLL FIX
   ========================================================= */

/* Normal phone portrait */
@media(max-width:640px){
  html,
  body.afsm-standalone-page{
    min-height:100%!important;
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  .afsm-app{
    min-height:100dvh!important;
    height:auto!important;
    overflow:visible!important;
    padding-bottom:calc(104px + env(safe-area-inset-bottom))!important;
  }

  .afsm-main{
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }

  .afsm-content{
    overflow:visible!important;
    padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
  }

  .afsm-mobile-nav{
    display:grid!important;
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    z-index:10000!important;
    width:auto!important;
    min-height:64px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  .afsm-mobile-nav a{
    min-width:0!important;
    pointer-events:auto!important;
  }
}

/* Phones in landscape can be wider than 640/760px.
   Keep the same footer navigation instead of hiding it. */
@media(max-width:900px) and (max-height:520px) and (orientation:landscape){
  html,
  body.afsm-standalone-page{
    min-height:100%!important;
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  .afsm-app{
    min-height:100dvh!important;
    height:auto!important;
    overflow:visible!important;
    padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;
  }

  .afsm-main{
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }

  .afsm-content{
    overflow:visible!important;
    padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
  }

  .afsm-mobile-nav{
    display:grid!important;
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    z-index:10000!important;
    width:auto!important;
    min-height:56px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
    padding:6px 7px calc(6px + env(safe-area-inset-bottom))!important;
    border-radius:17px!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  .afsm-mobile-nav a{
    min-height:42px!important;
    gap:2px!important;
    padding:3px 2px!important;
    font-size:8px!important;
    pointer-events:auto!important;
  }

  .afsm-mobile-icon{
    width:22px!important;
    height:22px!important;
  }

  .afsm-mobile-icon svg{
    width:15px!important;
    height:15px!important;
  }
}

/* Prevent fixed bottom navigation from clipping the last focusable element. */
@media(max-width:900px){
  body.afsm-standalone-page{
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:auto!important;
  }

  .afsm-content > *:last-child{
    margin-bottom:max(8px,env(safe-area-inset-bottom));
  }
}


/* =========================================================
   v1.9.56 PHONE UI ROOT FIX
   Device-based footer visibility + reliable bottom scrolling
   ========================================================= */

/* JS adds body.afsm-phone-ui on actual phones, independent of orientation. */
body.afsm-standalone-page.afsm-phone-ui{
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch;
}

body.afsm-phone-ui .afsm-app{
  height:auto!important;
  min-height:100dvh!important;
  overflow:visible!important;
  padding-bottom:calc(108px + env(safe-area-inset-bottom))!important;
}

body.afsm-phone-ui .afsm-main{
  height:auto!important;
  min-height:100dvh!important;
  overflow:visible!important;
  display:block!important;
}

body.afsm-phone-ui .afsm-content{
  min-height:0!important;
  overflow:visible!important;
  padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
  scroll-padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
  overscroll-behavior-y:auto!important;
}

body.afsm-phone-ui .afsm-mobile-nav{
  display:grid!important;
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  z-index:10000!important;
  width:auto!important;
  min-height:64px!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  visibility:visible!important;
  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
}

body.afsm-phone-ui .afsm-mobile-nav a{
  min-width:0!important;
  pointer-events:auto!important;
}

/* Landscape phone keeps footer, just makes it more compact. */
@media(orientation:landscape){
  body.afsm-phone-ui .afsm-app{
    padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;
  }

  body.afsm-phone-ui .afsm-content{
    padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
  }

  body.afsm-phone-ui .afsm-mobile-nav{
    min-height:56px!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    padding:6px 7px calc(6px + env(safe-area-inset-bottom))!important;
    border-radius:17px!important;
  }

  body.afsm-phone-ui .afsm-mobile-nav a{
    min-height:42px!important;
    gap:2px!important;
    padding:3px 2px!important;
    font-size:8px!important;
  }

  body.afsm-phone-ui .afsm-mobile-icon{
    width:22px!important;
    height:22px!important;
  }

  body.afsm-phone-ui .afsm-mobile-icon svg{
    width:15px!important;
    height:15px!important;
  }
}

/* Only lock document scrolling while the drawer is actually open. */
body.afsm-phone-ui:not(.afsm-drawer-open){
  overflow-y:auto!important;
}

/* Give the last content block real document space above the fixed footer. */
body.afsm-phone-ui .afsm-content::after{
  content:"";
  display:block;
  width:100%;
  height:calc(20px + env(safe-area-inset-bottom));
  pointer-events:none;
}


/* =========================================================
   v1.9.57 ALL MOBILE FOOTER NAV — CSS ONLY
   Authoritative rule for every viewport <= 900px
   ========================================================= */
@media(max-width:900px){
  html,
  body.afsm-standalone-page{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  body.afsm-standalone-page:not(.afsm-drawer-open){
    overflow-y:auto!important;
  }

  .afsm-app{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding-bottom:calc(108px + env(safe-area-inset-bottom))!important;
  }

  .afsm-main{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    display:block!important;
  }

  .afsm-content{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
  }

  .afsm-mobile-nav{
    display:grid!important;
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    min-height:64px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
    padding:8px 5px calc(8px + env(safe-area-inset-bottom))!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.96)!important;
    border:1px solid rgba(229,233,242,.95)!important;
    box-shadow:0 18px 45px rgba(22,36,67,.14)!important;
    backdrop-filter:blur(20px)!important;
    -webkit-backdrop-filter:blur(20px)!important;
    visibility:visible!important;
    opacity:1!important;
    transform:none!important;
    pointer-events:auto!important;
    z-index:2147483000!important;
  }

  .afsm-mobile-nav a{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:48px!important;
    pointer-events:auto!important;
  }

  .afsm-mobile-nav .afsm-mobile-icon{
    display:grid!important;
  }

  .afsm-mobile-nav em{
    display:block!important;
  }

  .afsm-content::after{
    content:"";
    display:block;
    width:100%;
    height:calc(24px + env(safe-area-inset-bottom));
    pointer-events:none;
  }
}

/* Compact only the height in landscape; do not hide the footer. */
@media(max-width:900px) and (orientation:landscape){
  .afsm-app{
    padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;
  }

  .afsm-content{
    padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
  }

  .afsm-mobile-nav{
    display:grid!important;
    min-height:56px!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    padding:6px 7px calc(6px + env(safe-area-inset-bottom))!important;
    border-radius:17px!important;
  }

  .afsm-mobile-nav a{
    min-height:42px!important;
    gap:2px!important;
    padding:3px 2px!important;
    font-size:8px!important;
  }

  .afsm-mobile-icon{
    width:22px!important;
    height:22px!important;
  }

  .afsm-mobile-icon svg{
    width:15px!important;
    height:15px!important;
  }
}


/* =========================================================
   v1.9.58 MOBILE DOCUMENT SCROLL ROOT FIX
   Do not use nested app/content scrolling on <=900px.
   ========================================================= */

/* Default spacer stays out of desktop flow. */
.afsm-mobile-scroll-spacer{
  display:none;
}

@media(max-width:900px), (hover:none) and (pointer:coarse){
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }

  body.afsm-standalone-page{
    position:static!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }

  /* Remove every internal viewport/scroll lock inherited from desktop. */
  body.afsm-standalone-page .afsm-app{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
    padding-bottom:0!important;
  }

  body.afsm-standalone-page .afsm-main{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin-left:0!important;
    overflow:visible!important;
  }

  body.afsm-standalone-page .afsm-content{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
    overscroll-behavior:visible!important;
    padding-bottom:24px!important;
  }

  /* Explicit real-flow space so the last content can scroll above the fixed nav. */
  body.afsm-standalone-page .afsm-mobile-scroll-spacer{
    display:block!important;
    width:100%!important;
    height:calc(112px + env(safe-area-inset-bottom))!important;
    min-height:calc(112px + env(safe-area-inset-bottom))!important;
    flex:none!important;
    clear:both!important;
    pointer-events:none!important;
  }

  /* Footer nav is attached to the browser viewport. */
  body.afsm-standalone-page .afsm-mobile-nav{
    display:grid!important;
    position:fixed!important;
    inset:auto 8px max(8px, env(safe-area-inset-bottom)) 8px!important;
    width:auto!important;
    max-width:none!important;
    min-height:64px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
    padding:8px 5px calc(8px + env(safe-area-inset-bottom))!important;
    margin:0!important;
    border:1px solid rgba(229,233,242,.96)!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 16px 42px rgba(20,34,65,.18)!important;
    backdrop-filter:blur(18px)!important;
    -webkit-backdrop-filter:blur(18px)!important;
    opacity:1!important;
    visibility:visible!important;
    transform:translateZ(0)!important;
    pointer-events:auto!important;
    z-index:2147483640!important;
  }

  body.afsm-standalone-page .afsm-mobile-nav a{
    display:flex!important;
    min-width:0!important;
    min-height:48px!important;
    align-items:center!important;
    justify-content:center!important;
    pointer-events:auto!important;
  }

  /* Only drawer-open is allowed to lock document scrolling. */
  body.afsm-standalone-page:not(.afsm-drawer-open){
    overflow-y:auto!important;
    touch-action:pan-y!important;
  }
}

/* More compact footer for landscape without hiding it. */
@media(max-width:900px) and (orientation:landscape),
       (hover:none) and (pointer:coarse) and (orientation:landscape){
  body.afsm-standalone-page .afsm-mobile-scroll-spacer{
    height:calc(88px + env(safe-area-inset-bottom))!important;
    min-height:calc(88px + env(safe-area-inset-bottom))!important;
  }

  body.afsm-standalone-page .afsm-mobile-nav{
    display:grid!important;
    min-height:54px!important;
    inset:auto 8px max(6px, env(safe-area-inset-bottom)) 8px!important;
    padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important;
    border-radius:16px!important;
  }

  body.afsm-standalone-page .afsm-mobile-nav a{
    min-height:40px!important;
    gap:2px!important;
    font-size:8px!important;
  }
}

/* Desktop is the only place where the footer nav is hidden. */
@media(min-width:901px) and (hover:hover) and (pointer:fine){
  .afsm-mobile-nav{
    display:none!important;
  }
  .afsm-mobile-scroll-spacer{
    display:none!important;
  }
}


/* =========================================================
   v1.9.59 MOBILE FOOTER PORTAL — BODY ROOT
   Footer is moved to <body>, outside .afsm-app.
   ========================================================= */
body.afsm-mobile-runtime{
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  touch-action:pan-y!important;
}

body.afsm-mobile-runtime:not(.afsm-drawer-open){
  overflow-y:auto!important;
}

body.afsm-mobile-runtime > .afsm-mobile-nav{
  display:grid!important;
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  top:auto!important;
  width:auto!important;
  min-height:64px!important;
  margin:0!important;
  padding:8px 5px calc(8px + env(safe-area-inset-bottom))!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  visibility:visible!important;
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  pointer-events:auto!important;
  z-index:2147483646!important;
}

body.afsm-mobile-runtime > .afsm-mobile-scroll-spacer{
  display:block!important;
  width:100%!important;
  height:calc(118px + env(safe-area-inset-bottom))!important;
  min-height:calc(118px + env(safe-area-inset-bottom))!important;
  margin:0!important;
  padding:0!important;
  pointer-events:none!important;
}

body.afsm-mobile-runtime .afsm-app,
body.afsm-mobile-runtime .afsm-main,
body.afsm-mobile-runtime .afsm-content{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}

@media(orientation:landscape){
  body.afsm-mobile-runtime > .afsm-mobile-nav{
    min-height:54px!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important;
  }
  body.afsm-mobile-runtime > .afsm-mobile-scroll-spacer{
    height:calc(92px + env(safe-area-inset-bottom))!important;
    min-height:calc(92px + env(safe-area-inset-bottom))!important;
  }
}


/* =========================================================
   v1.9.60 SERVER MOBILE SCROLL ROOT + LOGIN REDESIGN
   ========================================================= */

/* WordPress server confirms this is a mobile device. */
body.afsm-standalone-page.afsm-server-mobile{
  position:static!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
}

body.afsm-server-mobile .afsm-app,
body.afsm-server-mobile .afsm-main,
body.afsm-server-mobile .afsm-content{
  position:relative!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

body.afsm-server-mobile .afsm-app{
  display:block!important;
  min-height:100dvh!important;
  padding-bottom:0!important;
}

body.afsm-server-mobile .afsm-main{
  display:block!important;
  margin-left:0!important;
}

body.afsm-server-mobile .afsm-content{
  display:block!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
  padding-bottom:28px!important;
}

body.afsm-server-mobile:not(.afsm-drawer-open){
  overflow-y:auto!important;
  height:auto!important;
  max-height:none!important;
}

/* Real document-flow breathing room. */
body.afsm-server-mobile .afsm-mobile-scroll-spacer{
  display:block!important;
  position:relative!important;
  width:100%!important;
  height:calc(124px + env(safe-area-inset-bottom))!important;
  min-height:calc(124px + env(safe-area-inset-bottom))!important;
  margin:0!important;
  padding:0!important;
  clear:both!important;
  pointer-events:none!important;
}

/* Mobile footer is guaranteed visible on real mobile devices. */
body.afsm-server-mobile .afsm-mobile-nav{
  display:grid!important;
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  top:auto!important;
  width:auto!important;
  min-height:64px!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  padding:8px 5px calc(8px + env(safe-area-inset-bottom))!important;
  margin:0!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
  z-index:2147483646!important;
}

/* =========================================================
   LOGIN — PREMIUM PROFESSIONAL
   ========================================================= */
.afsm-login-shell{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:28px;
  background:
    radial-gradient(circle at 10% 10%,rgba(104,90,255,.16),transparent 26%),
    radial-gradient(circle at 90% 90%,rgba(64,179,137,.10),transparent 24%),
    #f4f7fb;
}

.afsm-login-layout{
  width:min(1040px,100%);
  min-height:620px;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);
  overflow:hidden;
  border:1px solid rgba(224,229,239,.9);
  border-radius:28px;
  background:#fff;
  box-shadow:0 30px 80px rgba(31,43,66,.12);
}

.afsm-login-brand-panel{
  position:relative;
  display:flex;
  flex-direction:column;
  padding:42px;
  color:#fff;
  background:
    radial-gradient(circle at 85% 15%,rgba(255,255,255,.13),transparent 26%),
    linear-gradient(145deg,#151c36 0%,#25245b 58%,#5147d8 100%);
  overflow:hidden;
}

.afsm-login-brand-panel:after{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  right:-90px;
  bottom:-90px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 0 0 44px rgba(255,255,255,.025),0 0 0 88px rgba(255,255,255,.018);
}

.afsm-login-brand-badge{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:12px;
}

.afsm-login-brand-logo,
.afsm-login-mobile-logo{
  display:grid;
  place-items:center;
  flex:none;
  width:46px;
  height:46px;
  border-radius:15px;
  background:linear-gradient(135deg,#8175ff,#5a50f5);
  color:#fff;
  font-size:18px;
  font-weight:900;
  box-shadow:0 14px 30px rgba(35,27,126,.28);
}

.afsm-login-brand-badge strong{
  display:block;
  font-size:15px;
}
.afsm-login-brand-badge small{
  display:block;
  margin-top:3px;
  color:rgba(255,255,255,.62);
  font-size:10px;
}

.afsm-login-brand-copy{
  position:relative;
  z-index:2;
  margin:auto 0 30px;
  max-width:460px;
}

.afsm-login-eyebrow{
  display:block;
  margin-bottom:10px;
  color:#8175ff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}

.afsm-login-brand-copy .afsm-login-eyebrow{
  color:#bcb6ff;
}

.afsm-login-brand-copy h2{
  margin:0 0 14px;
  max-width:420px;
  color:#fff;
  font-size:34px;
  line-height:1.12;
  letter-spacing:-.045em;
}

.afsm-login-brand-copy p{
  margin:0;
  max-width:430px;
  color:rgba(255,255,255,.70);
  font-size:12px;
  line-height:1.75;
}

.afsm-login-feature-list{
  position:relative;
  z-index:2;
  display:grid;
  gap:9px;
}

.afsm-login-feature-list>div{
  display:grid;
  grid-template-columns:30px 1fr;
  align-items:center;
  gap:0 10px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:13px;
  background:rgba(255,255,255,.055);
}

.afsm-login-feature-list>div>span{
  grid-row:1/3;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:9px;
  background:rgba(255,255,255,.10);
  color:#bff2db;
  font-size:12px;
  font-weight:900;
}

.afsm-login-feature-list strong{
  font-size:10.5px;
}
.afsm-login-feature-list small{
  margin-top:2px;
  color:rgba(255,255,255,.58);
  font-size:8.5px;
}

.afsm-login-brand-footer{
  position:relative;
  z-index:2;
  margin-top:25px;
  color:rgba(255,255,255,.38);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}

.afsm-login-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:52px 48px;
  background:#fff;
}

.afsm-login-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:42px;
}

.afsm-login-mobile-logo{
  display:none;
}

.afsm-login-security-chip{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid #dfe4ee;
  border-radius:999px;
  background:#f8fafc;
  color:#68758b;
  font-size:8.5px;
  font-weight:850;
}

.afsm-login-heading{
  margin-bottom:26px;
}

.afsm-login-heading h1{
  margin:0 0 8px;
  color:#202b40;
  font-size:29px;
  line-height:1.15;
  letter-spacing:-.035em;
}

.afsm-login-heading p{
  margin:0;
  color:#8994a7;
  font-size:11px;
  line-height:1.6;
}

.afsm-login-form-wrap form{
  margin:0;
}

.afsm-login-form-wrap p{
  margin:0 0 15px;
}

.afsm-login-form-wrap label{
  display:block;
  margin-bottom:6px;
  color:#536077;
  font-size:10px;
  font-weight:800;
}

.afsm-login-form-wrap input[type="text"],
.afsm-login-form-wrap input[type="password"]{
  width:100%;
  height:48px;
  padding:0 14px;
  border:1px solid #dfe4ed;
  border-radius:12px;
  outline:none;
  background:#fbfcfe;
  color:#243148;
  font-size:12px;
  transition:.18s ease;
}

.afsm-login-form-wrap input[type="text"]:focus,
.afsm-login-form-wrap input[type="password"]:focus{
  border-color:#8378ff;
  background:#fff;
  box-shadow:0 0 0 3px rgba(108,99,255,.10);
}

.afsm-login-form-wrap .login-remember label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#68758b;
  font-size:10px;
  font-weight:700;
}

.afsm-login-form-wrap input[type="checkbox"]{
  width:16px;
  height:16px;
  accent-color:#655bff;
}

.afsm-login-form-wrap .login-submit{
  margin:20px 0 0;
}

.afsm-login-form-wrap input[type="submit"]{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,#6e63ff,#584ded);
  color:#fff;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 14px 28px rgba(94,82,232,.22);
}

.afsm-login-form-wrap input[type="submit"]:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 32px rgba(94,82,232,.28);
}

.afsm-login-help{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:22px;
  padding:11px 12px;
  border:1px solid #e8ebf2;
  border-radius:12px;
  background:#f9fafc;
}

.afsm-login-help span{
  flex:none;
  font-size:12px;
}
.afsm-login-help p{
  margin:0;
  color:#7c879a;
  font-size:9px;
  line-height:1.55;
}

@media(max-width:820px){
  .afsm-login-shell{
    padding:16px;
    align-items:start;
  }

  .afsm-login-layout{
    grid-template-columns:1fr;
    min-height:0;
    max-width:520px;
    margin:auto;
    border-radius:22px;
  }

  .afsm-login-brand-panel{
    display:none;
  }

  .afsm-login-card{
    min-height:calc(100dvh - 32px);
    padding:28px 24px;
  }

  .afsm-login-card-top{
    margin-bottom:38px;
  }

  .afsm-login-mobile-logo{
    display:grid;
  }

  .afsm-login-heading h1{
    font-size:26px;
  }
}

@media(max-width:430px){
  .afsm-login-shell{
    padding:0;
    background:#fff;
  }

  .afsm-login-layout{
    width:100%;
    min-height:100dvh;
    border:0;
    border-radius:0;
    box-shadow:none;
  }

  .afsm-login-card{
    min-height:100dvh;
    padding:24px 20px max(28px,env(safe-area-inset-bottom));
  }

  .afsm-login-card-top{
    margin-bottom:48px;
  }

  .afsm-login-heading h1{
    font-size:24px;
  }
}


/* =========================================================
   v1.9.61 PREMIUM LOGIN BRAND + DYNAMIC ACCENT
   ========================================================= */
.afsm-login-shell{
  --afsm-login-accent:#655bff;
  --afsm-login-accent-soft:color-mix(in srgb,var(--afsm-login-accent) 10%,white);
  --afsm-login-accent-softer:color-mix(in srgb,var(--afsm-login-accent) 5%,white);
  --afsm-login-accent-dark:color-mix(in srgb,var(--afsm-login-accent) 78%,#11162a);
}

.afsm-login-layout{
  min-height:640px!important;
  border-radius:30px!important;
  border:1px solid #e3e8f1!important;
  box-shadow:0 36px 90px rgba(25,38,66,.14)!important;
}

.afsm-login-brand-panel{
  background:
    radial-gradient(circle at 88% 10%,color-mix(in srgb,var(--afsm-login-accent) 42%,transparent),transparent 31%),
    radial-gradient(circle at 18% 95%,color-mix(in srgb,var(--afsm-login-accent) 22%,transparent),transparent 31%),
    linear-gradient(145deg,#11182d 0%,#1a2342 46%,var(--afsm-login-accent-dark) 100%)!important;
}

.afsm-login-brand-panel:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:36px 36px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.85),transparent 85%);
}

.afsm-login-brand-logo,
.afsm-login-mobile-logo{
  background:linear-gradient(135deg,var(--afsm-login-accent),color-mix(in srgb,var(--afsm-login-accent) 76%,#11152d))!important;
}

.afsm-login-brand-logo.has-image,
.afsm-login-mobile-logo.has-image{
  overflow:hidden;
  padding:6px;
  background:#fff!important;
  border:1px solid rgba(255,255,255,.18);
}

.afsm-login-brand-logo.has-image img,
.afsm-login-mobile-logo.has-image img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  border-radius:9px;
}

.afsm-login-eyebrow{
  color:var(--afsm-login-accent)!important;
}

.afsm-login-brand-copy .afsm-login-eyebrow{
  color:color-mix(in srgb,var(--afsm-login-accent) 42%,white)!important;
}

.afsm-login-feature-list>div{
  transition:transform .18s ease,background .18s ease,border-color .18s ease;
}
.afsm-login-feature-list>div:hover{
  transform:translateX(3px);
  background:rgba(255,255,255,.075);
  border-color:rgba(255,255,255,.14);
}

.afsm-login-feature-icon{
  grid-row:1/3;
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  height:34px!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--afsm-login-accent) 30%,rgba(255,255,255,.08))!important;
  color:#fff!important;
}
.afsm-login-feature-icon svg{
  width:17px;
  height:17px;
  display:block;
}

.afsm-login-brand-footer{
  display:flex;
  align-items:center;
  gap:7px;
}
.afsm-login-brand-footer-icon{
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
}
.afsm-login-brand-footer-icon svg{
  width:14px;
  height:14px;
}

.afsm-login-security-chip{
  gap:6px!important;
  color:color-mix(in srgb,var(--afsm-login-accent) 74%,#5f6b80)!important;
  background:var(--afsm-login-accent-softer)!important;
  border-color:color-mix(in srgb,var(--afsm-login-accent) 20%,#dde3ed)!important;
}
.afsm-login-security-icon{
  display:grid;
  place-items:center;
}
.afsm-login-security-icon svg{
  width:13px;
  height:13px;
}

.afsm-login-heading h1{
  font-size:30px!important;
  letter-spacing:-.045em!important;
}

.afsm-login-form-wrap input[type="text"],
.afsm-login-form-wrap input[type="password"]{
  height:50px!important;
  border-radius:13px!important;
  background:#fbfcfe!important;
}

.afsm-login-form-wrap input[type="text"]:focus,
.afsm-login-form-wrap input[type="password"]:focus{
  border-color:var(--afsm-login-accent)!important;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--afsm-login-accent) 11%,transparent)!important;
}

.afsm-login-form-wrap input[type="checkbox"]{
  accent-color:var(--afsm-login-accent)!important;
}

.afsm-login-form-wrap input[type="submit"]{
  min-height:50px!important;
  border-radius:13px!important;
  background:
    linear-gradient(135deg,var(--afsm-login-accent),color-mix(in srgb,var(--afsm-login-accent) 80%,#342c8d))!important;
  box-shadow:0 15px 30px color-mix(in srgb,var(--afsm-login-accent) 28%,transparent)!important;
  transition:transform .18s ease,box-shadow .18s ease;
}

.afsm-login-form-wrap input[type="submit"]:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 19px 34px color-mix(in srgb,var(--afsm-login-accent) 34%,transparent)!important;
}

.afsm-login-help{
  align-items:center!important;
  background:var(--afsm-login-accent-softer)!important;
  border-color:color-mix(in srgb,var(--afsm-login-accent) 16%,#e7ebf2)!important;
}

.afsm-login-help-icon{
  display:grid;
  place-items:center;
  flex:none;
  width:34px;
  height:34px;
  border-radius:11px;
  background:var(--afsm-login-accent-soft);
  color:var(--afsm-login-accent);
}
.afsm-login-help-icon svg{
  width:17px;
  height:17px;
}
.afsm-login-help strong{
  display:block;
  margin-bottom:2px;
  color:#435067;
  font-size:9.5px;
}

@supports not (color:color-mix(in srgb,#000 10%,white)){
  .afsm-login-shell{
    --afsm-login-accent-soft:#f0efff;
    --afsm-login-accent-softer:#f8f7ff;
    --afsm-login-accent-dark:#332b82;
  }
  .afsm-login-security-chip{
    color:#5d54df!important;
    background:#f7f6ff!important;
    border-color:#e2defe!important;
  }
  .afsm-login-help{
    background:#faf9ff!important;
    border-color:#e9e6ff!important;
  }
}

@media(max-width:820px){
  .afsm-login-layout{
    min-height:0!important;
  }

  .afsm-login-card{
    padding:30px 26px!important;
  }

  .afsm-login-card-top{
    margin-bottom:34px!important;
  }

  .afsm-login-mobile-logo{
    display:grid!important;
    width:50px!important;
    height:50px!important;
    border-radius:16px!important;
  }
}

@media(max-width:430px){
  .afsm-login-card{
    padding:24px 20px max(28px,env(safe-area-inset-bottom))!important;
  }

  .afsm-login-heading h1{
    font-size:24px!important;
  }

  .afsm-login-security-chip{
    min-height:30px!important;
    padding:0 9px!important;
  }
}


/* =========================================================
   v1.9.63 EDITABLE ACCENT HEX COLOR
   ========================================================= */
.afsm-color-field{
  grid-template-columns:54px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
}
#afsm-accent-color-picker{
  width:54px!important;
  height:44px!important;
  padding:3px!important;
  border:1px solid #dfe4ed!important;
  border-radius:11px!important;
  background:#fff!important;
  cursor:pointer;
}
#afsm-accent-color-text{
  height:44px!important;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;
  font-weight:800!important;
  letter-spacing:.045em!important;
  text-transform:uppercase!important;
}
#afsm-accent-color-text:focus{
  border-color:#8175ff!important;
  box-shadow:0 0 0 3px rgba(101,91,255,.10)!important;
}
.afsm-color-help{
  display:block;
  margin-top:6px;
  color:#8a95a8;
  font-size:9px;
  line-height:1.45;
}
.afsm-color-feedback{
  margin-top:7px;
  padding:8px 10px;
  border-radius:9px;
  font-size:9px;
  font-weight:750;
}
.afsm-color-feedback.error{
  background:#fff1f3;
  border:1px solid #f2c7cf;
  color:#b84459;
}
.afsm-color-feedback.success{
  background:#eef9f3;
  border:1px solid #c9e7d5;
  color:#277c58;
}


/* =========================================================
   v1.9.64 LOGIN ALL-PHONE RESPONSIVE + PREMIUM ICON POLISH
   ========================================================= */

/* Keep login viewport stable across mobile browsers */
@media(max-width:900px){
  body.afsm-standalone-page .afsm-login-shell{
    width:100%!important;
    min-height:100dvh!important;
    height:auto!important;
    padding:
      max(14px,env(safe-area-inset-top))
      14px
      max(14px,env(safe-area-inset-bottom))!important;
    place-items:start center!important;
    overflow:visible!important;
  }

  .afsm-login-layout{
    width:min(100%,560px)!important;
    max-width:560px!important;
    min-height:0!important;
    height:auto!important;
    margin:auto!important;
    grid-template-columns:1fr!important;
    border-radius:22px!important;
    overflow:hidden!important;
  }

  .afsm-login-brand-panel{
    display:none!important;
  }

  .afsm-login-card{
    width:100%!important;
    min-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    height:auto!important;
    justify-content:center!important;
    padding:28px 24px!important;
    overflow:visible!important;
  }

  .afsm-login-card-top{
    gap:12px!important;
    margin-bottom:32px!important;
  }

  .afsm-login-mobile-logo{
    display:grid!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    border-radius:16px!important;
  }

  .afsm-login-mobile-logo.has-image{
    padding:5px!important;
  }

  .afsm-login-security-chip{
    min-height:30px!important;
    padding:0 10px!important;
    font-size:8.5px!important;
    white-space:nowrap!important;
  }

  .afsm-login-security-icon svg{
    width:13px!important;
    height:13px!important;
  }

  .afsm-login-heading{
    margin-bottom:24px!important;
  }

  .afsm-login-heading h1{
    margin-bottom:8px!important;
    font-size:27px!important;
    line-height:1.16!important;
  }

  .afsm-login-heading p{
    font-size:11px!important;
    line-height:1.55!important;
  }

  .afsm-login-eyebrow{
    font-size:8.5px!important;
    letter-spacing:.12em!important;
  }

  .afsm-login-form-wrap p{
    margin-bottom:14px!important;
  }

  .afsm-login-form-wrap label{
    font-size:10px!important;
  }

  .afsm-login-form-wrap input[type="text"],
  .afsm-login-form-wrap input[type="password"]{
    width:100%!important;
    height:50px!important;
    min-height:50px!important;
    font-size:16px!important; /* prevents iOS zoom */
    border-radius:13px!important;
  }

  .afsm-login-form-wrap .login-remember{
    margin-top:2px!important;
  }

  .afsm-login-form-wrap .login-remember label{
    min-height:36px!important;
    gap:9px!important;
    font-size:10.5px!important;
  }

  .afsm-login-form-wrap input[type="checkbox"]{
    width:18px!important;
    height:18px!important;
    flex:none!important;
  }

  .afsm-login-form-wrap .login-submit{
    margin-top:18px!important;
  }

  .afsm-login-form-wrap input[type="submit"]{
    min-height:50px!important;
    font-size:11px!important;
    border-radius:13px!important;
    touch-action:manipulation!important;
  }

  .afsm-login-help{
    gap:10px!important;
    margin-top:18px!important;
    padding:11px 12px!important;
    border-radius:12px!important;
  }

  .afsm-login-help-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
  }

  .afsm-login-help-icon svg{
    width:17px!important;
    height:17px!important;
  }

  .afsm-login-help strong{
    font-size:9.5px!important;
  }

  .afsm-login-help p{
    font-size:8.8px!important;
    line-height:1.5!important;
  }
}

/* Standard phones */
@media(max-width:640px){
  body.afsm-standalone-page .afsm-login-shell{
    padding:
      max(10px,env(safe-area-inset-top))
      10px
      max(10px,env(safe-area-inset-bottom))!important;
  }

  .afsm-login-layout{
    border-radius:20px!important;
  }

  .afsm-login-card{
    min-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    padding:24px 20px!important;
  }

  .afsm-login-card-top{
    margin-bottom:30px!important;
  }

  .afsm-login-heading h1{
    font-size:25px!important;
  }
}

/* Small phones: iPhone SE / 360-class Android */
@media(max-width:390px){
  body.afsm-standalone-page .afsm-login-shell{
    padding:0!important;
    background:#fff!important;
  }

  .afsm-login-layout{
    width:100%!important;
    max-width:none!important;
    min-height:100dvh!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  .afsm-login-card{
    min-height:100dvh!important;
    padding:
      max(22px,env(safe-area-inset-top))
      18px
      max(26px,env(safe-area-inset-bottom))!important;
  }

  .afsm-login-card-top{
    margin-bottom:34px!important;
  }

  .afsm-login-mobile-logo{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    border-radius:15px!important;
  }

  .afsm-login-heading h1{
    font-size:23px!important;
  }

  .afsm-login-heading p{
    font-size:10.5px!important;
  }

  .afsm-login-security-chip{
    min-height:28px!important;
    padding:0 8px!important;
    font-size:8px!important;
  }
}

/* Extra narrow phones */
@media(max-width:340px){
  .afsm-login-card{
    padding-left:15px!important;
    padding-right:15px!important;
  }

  .afsm-login-card-top{
    align-items:flex-start!important;
  }

  .afsm-login-security-chip{
    max-width:128px!important;
    white-space:normal!important;
    line-height:1.2!important;
    text-align:center!important;
  }

  .afsm-login-heading h1{
    font-size:21px!important;
  }

  .afsm-login-help{
    align-items:flex-start!important;
  }
}

/* Landscape phone: compact but fully usable */
@media(max-width:900px) and (orientation:landscape){
  body.afsm-standalone-page .afsm-login-shell{
    min-height:100dvh!important;
    padding:
      max(8px,env(safe-area-inset-top))
      14px
      max(8px,env(safe-area-inset-bottom))!important;
  }

  .afsm-login-layout{
    width:min(100%,620px)!important;
  }

  .afsm-login-card{
    min-height:auto!important;
    padding:20px 24px!important;
  }

  .afsm-login-card-top{
    margin-bottom:18px!important;
  }

  .afsm-login-heading{
    margin-bottom:16px!important;
  }

  .afsm-login-heading h1{
    font-size:22px!important;
  }

  .afsm-login-heading p{
    font-size:10px!important;
  }

  .afsm-login-form-wrap p{
    margin-bottom:10px!important;
  }

  .afsm-login-form-wrap input[type="text"],
  .afsm-login-form-wrap input[type="password"]{
    height:44px!important;
    min-height:44px!important;
  }

  .afsm-login-form-wrap input[type="submit"]{
    min-height:44px!important;
  }

  .afsm-login-help{
    margin-top:12px!important;
  }
}

/* Premium icon consistency */
.afsm-login-security-icon,
.afsm-login-feature-icon,
.afsm-login-help-icon,
.afsm-login-brand-footer-icon{
  color:currentColor;
}

.afsm-login-security-icon svg,
.afsm-login-feature-icon svg,
.afsm-login-help-icon svg,
.afsm-login-brand-footer-icon svg{
  display:block!important;
  fill:none!important;
  flex:none!important;
}


/* =========================================================
   v1.9.67 MOBILE -> DESKTOP FOOTER RESIZE RESET
   ========================================================= */

/* Desktop must always hide mobile footer, even when server-side
   wp_is_mobile() class remains on body from the initial request. */
@media(min-width:901px){
  body.afsm-standalone-page .afsm-mobile-nav,
  body.afsm-server-mobile .afsm-mobile-nav,
  body.afsm-mobile-runtime > .afsm-mobile-nav{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    position:static!important;
    inset:auto!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    transform:none!important;
  }

  body.afsm-standalone-page .afsm-mobile-scroll-spacer,
  body.afsm-server-mobile .afsm-mobile-scroll-spacer,
  body.afsm-mobile-runtime > .afsm-mobile-scroll-spacer{
    display:none!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  body.afsm-standalone-page{
    touch-action:auto!important;
  }
}

/* Mobile/tablet-small is the only viewport where the footer may render. */
@media(max-width:900px){
  body.afsm-standalone-page .afsm-mobile-nav{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}


/* =========================================================
   v1.9.68 NOTIFICATION CENTER FUNCTIONAL AUDIT
   ========================================================= */
.afsm-notification-toolbar-actions{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:max-content;
}
.afsm-notification-title-line{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.afsm-notification-status-badge{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:0 7px;
  border-radius:999px;
  font-size:8px;
  font-weight:850;
}
.afsm-notification-status-badge.unread{
  background:#f0efff;
  color:#655bff;
}
.afsm-notification-status-badge.read{
  background:#edf7f1;
  color:#2f8a61;
}
.afsm-notification-row.is-read{
  background:#fff!important;
  opacity:.82;
}
.afsm-notification-row-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}
.afsm-notification-row-actions .afsm-primary-btn,
.afsm-notification-row-actions .afsm-secondary-btn{
  min-height:34px!important;
  padding:0 11px!important;
  font-size:9px!important;
  text-decoration:none!important;
}
.afsm-notification-popover-empty{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:9px;
  align-items:center;
  padding:13px 14px;
}
.afsm-notification-popover-empty>span{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:11px;
  background:#eef8f3;
  color:#32966a;
}
.afsm-notification-popover-empty svg{
  width:17px;
  height:17px;
}
.afsm-notification-popover-empty strong{
  display:block;
  color:#354157;
  font-size:10px;
}
.afsm-notification-popover-empty small{
  display:block;
  margin-top:2px;
  color:#8c96a8;
  font-size:8.5px;
  line-height:1.4;
}
.afsm-notification-empty-state{
  padding:42px 20px!important;
  text-align:center;
}
.afsm-notification-empty-state .afsm-empty-state-icon{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  margin:0 auto 10px;
  border-radius:14px;
  background:#eef8f3;
  color:#32966a;
}
.afsm-notification-empty-state .afsm-empty-state-icon svg{
  width:21px;
  height:21px;
}
.afsm-notification-empty-state strong{
  display:block;
  margin-bottom:4px;
  color:#344056;
  font-size:11px;
}
.afsm-notification-empty-state p{
  margin:0;
  color:#8a95a7;
  font-size:9px;
}

@media(max-width:900px){
  .afsm-notifications-toolbar{
    grid-template-columns:1fr 170px!important;
  }
  .afsm-notification-toolbar-actions{
    grid-column:1/-1;
    width:100%;
  }
  .afsm-notification-toolbar-actions>*{
    flex:1 1 0;
  }
  .afsm-notification-row{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .afsm-notification-row-actions{
    grid-column:1/-1;
    justify-content:stretch;
    padding-left:49px;
  }
  .afsm-notification-row-actions>*{
    flex:1 1 140px;
    justify-content:center;
  }
}

@media(max-width:640px){
  .afsm-notification-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .afsm-notifications-toolbar{
    grid-template-columns:1fr!important;
  }
  .afsm-notifications-toolbar>*{
    grid-column:1!important;
  }
  .afsm-notification-toolbar-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    min-width:0;
  }
  .afsm-notification-row{
    padding:13px!important;
  }
  .afsm-notification-row-actions{
    padding-left:0;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:390px){
  .afsm-notification-toolbar-actions,
  .afsm-notification-row-actions{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   v1.9.70 VISITOR ANALYTICS
   ========================================================= */
.afsm-visitors-filter{
  display:grid;
  grid-template-columns:180px 180px auto;
  gap:10px;
  align-items:end;
  margin-bottom:12px;
}
.afsm-visitors-filter label span{
  display:block;
  margin-bottom:6px;
  font-size:9px;
  font-weight:800;
  color:#7e899b;
}
.afsm-visitors-filter input{
  width:100%;
  height:42px;
  border:1px solid #e1e6ef;
  border-radius:10px;
  padding:0 11px;
  background:#fbfcfe;
}
.afsm-visitors-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.afsm-visitor-kpi{
  padding:15px!important;
}
.afsm-visitor-kpi span{
  display:block;
  color:#8a95a8;
  font-size:9.5px;
  font-weight:800;
}
.afsm-visitor-kpi strong{
  display:block;
  margin:6px 0 3px;
  font-size:24px;
  line-height:1;
  color:#26344a;
}
.afsm-visitor-kpi small{
  color:#9aa4b4;
  font-size:8.5px;
}
.afsm-visitors-chart-card{margin-bottom:12px}
.afsm-visitors-chart{
  height:230px;
  display:flex;
  align-items:stretch;
  gap:8px;
  padding:12px 6px 2px;
  overflow-x:auto;
}
.afsm-visitor-chart-col{
  flex:1 0 42px;
  min-width:42px;
  display:grid;
  grid-template-rows:1fr auto;
  gap:6px;
}
.afsm-visitor-chart-bars{
  height:180px;
  display:flex;
  gap:3px;
  align-items:end;
  justify-content:center;
}
.afsm-visitor-chart-bars span{
  width:10px;
  min-height:4px;
  border-radius:7px 7px 2px 2px;
}
.afsm-visitor-chart-bars .visitors{background:#655bff}
.afsm-visitor-chart-bars .pageviews{background:#42a67a}
.afsm-visitor-chart-col small{
  text-align:center;
  color:#8b96a8;
  font-size:7.8px;
  white-space:nowrap;
}
.afsm-visitors-grid{
  display:grid;
  grid-template-columns:1.2fr 1.2fr .8fr .8fr;
  gap:12px;
}
.afsm-visitor-list{
  display:grid;
  gap:0;
}
.afsm-visitor-list>a,
.afsm-visitor-list>div:not(.afsm-empty-state){
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #f0f2f6;
  text-decoration:none;
}
.afsm-visitor-list strong{
  display:block;
  color:#344157;
  font-size:9.7px;
}
.afsm-visitor-list small{
  display:block;
  margin-top:2px;
  color:#98a2b1;
  font-size:8px;
}
.afsm-visitor-list span{
  flex:none;
  color:#667287;
  font-size:8.5px;
  font-weight:800;
}
.afsm-visitor-bars{
  display:grid;
  gap:7px;
}
.afsm-visitor-bars>div:not(.afsm-empty-state){
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid #edf0f5;
  border-radius:10px;
  background:#fbfcfe;
}
.afsm-visitor-bars span{
  color:#667287;
  font-size:9px;
}
.afsm-visitor-bars strong{
  color:#2f3e55;
  font-size:10px;
}

@media(max-width:1100px){
  .afsm-visitors-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .afsm-visitors-filter{grid-template-columns:1fr 1fr}
  .afsm-visitors-filter .afsm-primary-btn{grid-column:1/-1}
  .afsm-visitors-kpis{grid-template-columns:1fr 1fr}
  .afsm-visitors-grid{grid-template-columns:1fr}
}
@media(max-width:430px){
  .afsm-visitors-filter{grid-template-columns:1fr}
  .afsm-visitors-filter .afsm-primary-btn{grid-column:auto}
  .afsm-visitor-kpi strong{font-size:21px}
}


/* =========================================================
   v1.9.72 VISITOR FUNNEL & CONVERSION
   ========================================================= */
.afsm-visitor-funnel-card{
  margin-bottom:12px;
}
.afsm-conversion-chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#eef8f3;
  color:#2c8a60;
  font-size:8.5px;
  font-weight:850;
}
.afsm-visitor-funnel{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;
  gap:8px;
  align-items:center;
}
.afsm-visitor-funnel>div{
  min-width:0;
  padding:14px;
  border:1px solid #e7ebf2;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#fbfcfe);
}
.afsm-funnel-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  margin-bottom:10px;
  border-radius:11px;
  background:#f0efff;
  color:#655bff;
}
.afsm-funnel-icon svg{
  width:17px;
  height:17px;
}
.afsm-visitor-funnel small{
  display:block;
  color:#8994a7;
  font-size:8.5px;
  font-weight:750;
}
.afsm-visitor-funnel strong{
  display:block;
  margin:5px 0 3px;
  color:#27354a;
  font-size:21px;
  line-height:1;
}
.afsm-visitor-funnel em{
  color:#6e798d;
  font-size:8.5px;
  font-style:normal;
  font-weight:800;
}
.afsm-funnel-arrow{
  color:#b1b8c5;
  font-size:18px;
  font-weight:900;
}
.afsm-low-conversion-card{
  margin-top:12px;
}
.afsm-low-conversion-row>span{
  text-align:right;
  color:#6f7a8d!important;
  font-size:8.5px!important;
}

@media(max-width:900px){
  .afsm-visitor-funnel{
    grid-template-columns:1fr 1fr;
  }
  .afsm-funnel-arrow{
    display:none;
  }
}
@media(max-width:520px){
  .afsm-visitor-funnel{
    grid-template-columns:1fr;
  }
  .afsm-low-conversion-row{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  .afsm-low-conversion-row>span{
    text-align:left!important;
  }
}


/* =========================================================
   v1.9.73 VISITOR ADVANCED ANALYTICS
   ========================================================= */
.afsm-visitors-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.afsm-visitor-live-kpi{position:relative;overflow:hidden}
.afsm-visitor-live-kpi:before{
  content:"";position:absolute;width:8px;height:8px;top:13px;right:13px;
  border-radius:999px;background:#35ad78;box-shadow:0 0 0 5px rgba(53,173,120,.11)
}
.afsm-visitors-advanced-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px
}
.afsm-visitor-split{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.afsm-visitor-split>div{
  padding:13px;border:1px solid #e9edf3;border-radius:12px;background:#fbfcfe
}
.afsm-visitor-split span{display:block;color:#8994a7;font-size:8.5px;font-weight:750}
.afsm-visitor-split strong{display:block;margin-top:5px;color:#2e3d54;font-size:20px}
.afsm-visitor-campaign-card,.afsm-source-conversion-card{margin-top:12px}
.afsm-visitor-campaign-table{min-width:720px!important}
.afsm-visitor-campaign-table th,.afsm-visitor-campaign-table td{font-size:9px!important}
@media(max-width:1200px){
  .afsm-visitors-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .afsm-visitors-advanced-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .afsm-visitors-kpis{grid-template-columns:1fr 1fr}
  .afsm-visitors-advanced-grid{grid-template-columns:1fr}
}
@media(max-width:390px){
  .afsm-visitors-kpis{grid-template-columns:1fr}
}


/* =========================================================
   v1.9.74 VISITOR INSIGHTS + PERIOD COMPARISON
   ========================================================= */
.afsm-visitor-compare-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.afsm-visitor-compare-strip>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:42px;
  padding:9px 12px;
  border:1px solid #e7ebf2;
  border-radius:11px;
  background:#fff;
}
.afsm-visitor-compare-strip span{
  color:#7e899b;
  font-size:8.8px;
  font-weight:750;
}
.afsm-visitor-compare-strip strong{
  font-size:10px;
  font-weight:900;
}
.afsm-visitor-compare-strip .is-up strong{color:#2f9366}
.afsm-visitor-compare-strip .is-down strong{color:#c44c5e}

.afsm-visitor-insights-card{margin-bottom:12px}
.afsm-visitor-insights{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.afsm-visitor-insight{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:11px 12px;
  border:1px solid #e7ebf2;
  border-radius:12px;
  background:#fbfcfe;
}
.afsm-visitor-insight-icon{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:11px;
  background:#f0efff;
  color:#655bff;
}
.afsm-visitor-insight-icon svg{width:17px;height:17px}
.afsm-visitor-insight strong{
  display:block;
  color:#354158;
  font-size:9.7px;
  margin-bottom:3px;
}
.afsm-visitor-insight p{
  margin:0;
  color:#7e899b;
  font-size:8.6px;
  line-height:1.5;
}
.afsm-visitor-insight.warning .afsm-visitor-insight-icon{
  background:#fff6e8;color:#c9872c
}
.afsm-visitor-insight.critical .afsm-visitor-insight-icon{
  background:#fff0f2;color:#c64b5e
}
.afsm-visitor-insight.positive .afsm-visitor-insight-icon{
  background:#eef8f3;color:#34966a
}
.afsm-visitor-insight.neutral .afsm-visitor-insight-icon{
  background:#f3f5f8;color:#748096
}

@media(max-width:760px){
  .afsm-visitor-compare-strip{grid-template-columns:1fr}
  .afsm-visitor-insights{grid-template-columns:1fr}
}


/* =========================================================
   v1.9.77 LIVE VISITOR ANALYTICS
   ========================================================= */
.afsm-visitor-live-card{margin-bottom:12px}
.afsm-live-head-actions{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap
}
.afsm-live-status{
  display:inline-flex;align-items:center;gap:6px;
  min-height:30px;padding:0 10px;border-radius:999px;
  background:#eef8f3;color:#347f5f;font-size:8.8px;font-weight:800
}
.afsm-live-status i{
  width:7px;height:7px;border-radius:999px;background:#35ad78;
  box-shadow:0 0 0 4px rgba(53,173,120,.12)
}
.afsm-live-status b{font-size:10px}
.afsm-live-grid{
  display:grid;grid-template-columns:1.5fr .75fr .75fr;gap:10px
}
.afsm-live-panel{
  min-width:0;padding:12px;border:1px solid #e8ecf2;
  border-radius:13px;background:#fbfcfe
}
.afsm-live-panel-title{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:8px
}
.afsm-live-panel-title span{
  color:#435067;font-size:9px;font-weight:850
}
.afsm-live-panel-title small{
  color:#9aa4b4;font-size:7.8px
}
.afsm-live-list{display:grid;gap:0}
.afsm-live-list>a{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:8px 0;border-bottom:1px solid #edf0f5;text-decoration:none
}
.afsm-live-list>a:last-child{border-bottom:0}
.afsm-live-list strong{
  display:block;color:#354158;font-size:9px
}
.afsm-live-list small{
  display:block;margin-top:2px;color:#9aa4b4;font-size:7.8px;text-transform:capitalize
}
.afsm-live-list>a>span{
  flex:none;color:#5f6c82;font-size:8px;font-weight:800
}
.afsm-live-bars{display:grid;gap:6px}
.afsm-live-bar-row{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:8px 9px;border-radius:9px;background:#fff;border:1px solid #edf0f5
}
.afsm-live-bar-row span{
  color:#667287;font-size:8.4px;text-transform:capitalize
}
.afsm-live-bar-row strong{
  color:#2f3d53;font-size:9.5px
}
.afsm-device-conversion-card{margin-top:12px}
.afsm-device-conversion-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px
}
.afsm-device-conversion-item{
  display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;align-items:center;
  padding:12px;border:1px solid #e8ecf2;border-radius:13px;background:#fbfcfe
}
.afsm-device-icon{
  display:grid;place-items:center;width:40px;height:40px;border-radius:12px;
  background:#f0efff;color:#655bff
}
.afsm-device-icon svg{width:19px;height:19px}
.afsm-device-conversion-item small{
  display:block;color:#8994a7;font-size:8px
}
.afsm-device-conversion-item strong{
  display:block;margin:3px 0;color:#2f3d53;font-size:18px
}
.afsm-device-conversion-item em{
  display:block;color:#8f99aa;font-size:7.8px;font-style:normal
}

@media(max-width:900px){
  .afsm-live-grid{grid-template-columns:1fr 1fr}
  .afsm-live-panel:first-child{grid-column:1/-1}
}
@media(max-width:640px){
  .afsm-live-grid{grid-template-columns:1fr}
  .afsm-live-panel:first-child{grid-column:auto}
  .afsm-device-conversion-grid{grid-template-columns:1fr}
  .afsm-live-head-actions{width:100%;justify-content:space-between}
}


/* =========================================================
   v1.9.78 VISITOR DROP-OFF ANALYTICS
   ========================================================= */
.afsm-dropoff-card{margin-top:12px}
.afsm-dropoff-chip{
  display:inline-flex;align-items:center;min-height:28px;padding:0 10px;
  border-radius:999px;background:#fff4ec;color:#b86c32;
  font-size:8.5px;font-weight:850
}
.afsm-dropoff-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px
}
.afsm-dropoff-kpis>div{
  padding:12px;border:1px solid #e8ecf2;border-radius:12px;background:#fbfcfe
}
.afsm-dropoff-kpis span{
  display:block;color:#8994a7;font-size:8.3px;font-weight:750
}
.afsm-dropoff-kpis strong{
  display:block;margin:5px 0 2px;color:#2e3c53;font-size:20px
}
.afsm-dropoff-kpis small{
  display:block;color:#9aa4b3;font-size:7.8px
}
.afsm-dropoff-grid{
  display:grid;grid-template-columns:1.35fr .825fr .825fr;gap:10px
}
.afsm-dropoff-panel{
  min-width:0;padding:12px;border:1px solid #e8ecf2;border-radius:13px;background:#fbfcfe
}
@media(max-width:1000px){
  .afsm-dropoff-grid{grid-template-columns:1fr 1fr}
  .afsm-dropoff-panel:first-child{grid-column:1/-1}
}
@media(max-width:640px){
  .afsm-dropoff-kpis{grid-template-columns:1fr 1fr}
  .afsm-dropoff-grid{grid-template-columns:1fr}
  .afsm-dropoff-panel:first-child{grid-column:auto}
}
@media(max-width:390px){
  .afsm-dropoff-kpis{grid-template-columns:1fr}
}


/* =========================================================
   v1.9.79 VISITOR INTELLIGENCE & ACTION CENTER
   ========================================================= */
.afsm-visitor-action-center{margin-bottom:12px}
.afsm-health-score{
  display:grid;
  grid-template-columns:auto auto;
  column-gap:9px;
  align-items:center;
  min-width:150px;
  padding:9px 11px;
  border:1px solid #e5eaf1;
  border-radius:12px;
  background:#fbfcfe
}
.afsm-health-score span{
  grid-column:1/-1;
  color:#8994a6;
  font-size:7.8px;
  font-weight:800
}
.afsm-health-score strong{
  color:#2e3b51;
  font-size:17px;
  line-height:1
}
.afsm-health-score small{
  justify-self:end;
  font-size:8px;
  font-weight:850
}
.afsm-health-score.good small{color:#329567}
.afsm-health-score.medium small{color:#bc7b2c}
.afsm-health-score.bad small{color:#c54d60}

.afsm-primary-issue{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:13px 14px;
  margin-bottom:10px;
  border:1px solid #e7ebf2;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#fbfcfe)
}
.afsm-primary-issue.high{
  border-color:#f2d8dc;
  background:linear-gradient(180deg,#fff,#fff8f9)
}
.afsm-primary-issue.medium{
  border-color:#f0dfc7;
  background:linear-gradient(180deg,#fff,#fffaf3)
}
.afsm-primary-issue-icon{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:13px;
  background:#fff0f2;
  color:#c74e61
}
.afsm-primary-issue.medium .afsm-primary-issue-icon{
  background:#fff6e9;
  color:#c08230
}
.afsm-primary-issue-icon svg{width:20px;height:20px}
.afsm-primary-issue small{
  display:block;
  margin-bottom:3px;
  color:#a06b76;
  font-size:7.8px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.08em
}
.afsm-primary-issue strong{
  display:block;
  color:#354158;
  font-size:10.5px
}
.afsm-primary-issue p{
  margin:4px 0 0;
  color:#7e899b;
  font-size:8.7px;
  line-height:1.5
}

.afsm-action-center-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px
}
.afsm-action-center-item{
  position:relative;
  min-width:0;
  padding:12px;
  border:1px solid #e8ecf2;
  border-radius:13px;
  background:#fbfcfe
}
.afsm-action-center-item.high{border-top:3px solid #d65a6d}
.afsm-action-center-item.medium{border-top:3px solid #d19a45}
.afsm-action-center-item.low{border-top:3px solid #45a476}
.afsm-action-priority{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:7px
}
.afsm-action-priority i{
  width:7px;
  height:7px;
  border-radius:999px;
  background:#45a476
}
.afsm-action-center-item.high .afsm-action-priority i{background:#d65a6d}
.afsm-action-center-item.medium .afsm-action-priority i{background:#d19a45}
.afsm-action-priority span{
  color:#8d97a7;
  font-size:7.5px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.05em
}
.afsm-action-center-item>strong{
  display:block;
  color:#354158;
  font-size:9.8px
}
.afsm-action-center-item>p{
  min-height:42px;
  margin:4px 0 10px;
  color:#7f8a9c;
  font-size:8.5px;
  line-height:1.5
}
.afsm-action-center-item .afsm-secondary-btn{
  min-height:32px!important;
  padding:0 10px!important;
  font-size:8.3px!important;
  text-decoration:none!important
}

@media(max-width:1000px){
  .afsm-action-center-list{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .afsm-visitor-action-center .afsm-card-head{
    align-items:stretch!important;
    flex-direction:column!important
  }
  .afsm-health-score{width:100%}
  .afsm-action-center-list{grid-template-columns:1fr}
  .afsm-action-center-item>p{min-height:0}
}


/* =========================================================
   v1.9.81 VISITOR SEGMENTATION
   ========================================================= */
.afsm-visitor-segments-card{margin-bottom:12px}
.afsm-segment-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.afsm-segment-item{
  display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;align-items:center;
  min-width:0;padding:11px;border:1px solid #e7ebf2;border-radius:12px;background:#fbfcfe
}
.afsm-segment-icon{
  display:grid;place-items:center;width:38px;height:38px;border-radius:11px;
  background:#f0efff;color:#655bff
}
.afsm-segment-icon svg{width:18px;height:18px}
.afsm-segment-item small{display:block;color:#8792a5;font-size:7.8px;font-weight:800}
.afsm-segment-item strong{display:block;margin:2px 0;color:#2f3c53;font-size:18px;line-height:1}
.afsm-segment-item em{display:block;color:#98a2b2;font-size:7.5px;font-style:normal}
.afsm-segment-item.cart_abandoner .afsm-segment-icon,
.afsm-segment-item.checkout_abandoner .afsm-segment-icon{background:#fff4ec;color:#bd7434}
.afsm-segment-item.buyer .afsm-segment-icon{background:#eef8f3;color:#35956a}
.afsm-segment-note{
  display:flex;align-items:flex-start;gap:8px;margin-top:9px;padding:9px 10px;
  border-radius:10px;background:#f7f8fb
}
.afsm-segment-note>span{flex:none;color:#7e899b}
.afsm-segment-note svg{width:15px;height:15px}
.afsm-segment-note p{margin:0;color:#8994a6;font-size:8px;line-height:1.45}
@media(max-width:1200px){.afsm-segment-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.afsm-segment-grid{grid-template-columns:1fr 1fr}}
@media(max-width:390px){.afsm-segment-grid{grid-template-columns:1fr}}


/* =========================================================
   v1.9.84 MOBILE SIDEBAR / FOOTER NAV SAFE CLEARANCE
   ========================================================= */
@media(max-width:900px){
  :root{
    --afsm-mobile-nav-height:72px;
    --afsm-mobile-safe-bottom:max(0px, env(safe-area-inset-bottom));
    --afsm-mobile-sidebar-bottom-gap:calc(
      var(--afsm-mobile-nav-height) + var(--afsm-mobile-safe-bottom) + 18px
    );
  }

  body.afsm-standalone-page .afsm-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    padding-bottom:var(--afsm-mobile-sidebar-bottom-gap)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-gutter:stable;
  }

  body.afsm-standalone-page .afsm-sidebar-nav,
  body.afsm-standalone-page .afsm-sidebar .afsm-nav,
  body.afsm-standalone-page .afsm-sidebar nav{
    padding-bottom:20px!important;
  }

  body.afsm-standalone-page .afsm-sidebar > :last-child{
    margin-bottom:12px!important;
  }

  body.afsm-standalone-page .afsm-mobile-nav{
    min-height:var(--afsm-mobile-nav-height)!important;
    padding-bottom:max(8px, env(safe-area-inset-bottom))!important;
  }

  body.afsm-drawer-open{
    overflow:hidden!important;
  }
}

@media(max-width:640px){
  :root{
    --afsm-mobile-nav-height:70px;
  }

  body.afsm-standalone-page .afsm-sidebar{
    padding-bottom:calc(
      var(--afsm-mobile-nav-height) + max(0px, env(safe-area-inset-bottom)) + 22px
    )!important;
  }
}

@media(max-width:390px){
  :root{
    --afsm-mobile-nav-height:68px;
  }

  body.afsm-standalone-page .afsm-sidebar{
    padding-bottom:calc(
      var(--afsm-mobile-nav-height) + max(0px, env(safe-area-inset-bottom)) + 24px
    )!important;
  }
}

/* Landscape phones: footer still needs physical clearance */
@media(max-width:900px) and (orientation:landscape){
  body.afsm-standalone-page .afsm-sidebar{
    padding-bottom:calc(
      62px + max(0px, env(safe-area-inset-bottom)) + 18px
    )!important;
  }
}


/* =========================================================
   v1.9.85 MOBILE SIDEBAR ABOVE FIXED FOOTER
   ========================================================= */
@media(max-width:900px){
  /* Undo v1.9.84 "lift content above footer" behavior. */
  body.afsm-standalone-page .afsm-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    padding-bottom:18px!important;
    bottom:0!important;
    z-index:2147483647!important;
  }

  body.afsm-standalone-page .afsm-sidebar-nav,
  body.afsm-standalone-page .afsm-sidebar .afsm-nav,
  body.afsm-standalone-page .afsm-sidebar nav{
    padding-bottom:18px!important;
  }

  body.afsm-standalone-page .afsm-sidebar.open,
  body.afsm-drawer-open .afsm-sidebar,
  body.afsm-mobile-runtime .afsm-sidebar.open{
    z-index:2147483647!important;
  }

  /* Backdrop stays below the drawer but can cover page/footer area. */
  body.afsm-standalone-page .afsm-sidebar-overlay,
  body.afsm-standalone-page .afsm-drawer-overlay,
  body.afsm-drawer-open .afsm-sidebar-overlay,
  body.afsm-drawer-open .afsm-drawer-overlay{
    z-index:2147483646!important;
  }

  /* Footer remains fixed, but drawer is one layer above it when opened. */
  body.afsm-standalone-page .afsm-mobile-nav{
    z-index:2147483645!important;
  }

  /* Drawer must visually cover the footer area down to the screen edge. */
  body.afsm-drawer-open .afsm-sidebar{
    top:0!important;
    bottom:0!important;
    min-height:100dvh!important;
    height:100dvh!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
}

@media(max-width:640px){
  body.afsm-standalone-page .afsm-sidebar{
    padding-bottom:16px!important;
  }
}

@media(max-width:390px){
  body.afsm-standalone-page .afsm-sidebar{
    padding-bottom:14px!important;
  }
}

/* Payment proof - v1.9.91 */
.afsm-payment-proof-panel{margin:18px 0;padding:20px;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.afsm-payment-proof-title{display:flex;align-items:center;gap:12px}.afsm-payment-proof-title strong{display:block;font-size:16px}.afsm-payment-proof-title small{display:block;color:#64748b;margin-top:3px}.afsm-payment-proof-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#eff6ff}.afsm-payment-proof-content{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:16px}.afsm-payment-proof-content img{width:130px;max-height:150px;object-fit:contain;border:1px solid #e2e8f0;border-radius:10px}.afsm-payment-proof-empty{margin:12px 0 0;color:#64748b;font-size:13px}

/* Givchael payment confirmation */
.afsm-gc-payment-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:8px 20px;margin:14px 0}.afsm-gc-payment-meta p{margin:0;line-height:1.6}.afsm-gc-payment-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.afsm-gc-approve{background:#3157ed!important;color:white!important;border-color:#3157ed!important}

/* v1.9.93 — premium payment confirmation */
.afsm-payment-proof-panel{padding:24px!important;border-radius:20px!important;border:1px solid #dfe7f3!important;box-shadow:0 8px 28px rgba(15,35,75,.035);background:#fff!important;color:#122345}
.afsm-pay-sprite{position:absolute;width:0;height:0;overflow:hidden}.afsm-pay-svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.afsm-payment-proof-title{gap:14px!important}.afsm-payment-proof-title strong{font-size:19px!important;font-weight:750}.afsm-payment-proof-title small{font-size:13px!important}.afsm-payment-proof-icon{width:50px!important;height:50px!important;color:#1455dc;background:#eaf2ff!important;border-radius:14px!important}
.afsm-gc-payment-meta{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important;margin:22px 0 16px!important}
.afsm-pay-info{min-width:0;display:flex;align-items:center;gap:11px;padding:15px 12px;border-radius:15px;background:#f5f7fc}.afsm-pay-info-icon{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;background:#e6eafb;color:#4840c6}.afsm-pay-info>div{min-width:0}.afsm-pay-info small{display:block;font-size:12px;color:#5d6c85;margin-bottom:5px}.afsm-pay-info strong{display:block;font-size:14px;line-height:1.4;font-weight:700;overflow-wrap:anywhere;color:#14284c}.afsm-pay-status-badge{display:inline-block!important;width:max-content;max-width:100%;border-radius:30px;padding:5px 10px;background:#fff0c5;color:#925500!important;font-size:12px!important}.afsm-pay-method{background:#eef4ff}.afsm-pay-method .afsm-pay-info-icon{background:#dce9ff;color:#1455dc}.afsm-pay-sender{background:#f6f2ff}.afsm-pay-sender .afsm-pay-info-icon{background:#ebe1ff;color:#7540c5}.afsm-pay-bank{background:#effaf5}.afsm-pay-bank .afsm-pay-info-icon{background:#d9f6e7;color:#15905a}.afsm-pay-amount{background:#fff8ec}.afsm-pay-amount .afsm-pay-info-icon{background:#fff0d2;color:#d88b00}.afsm-pay-amount strong{color:#1249c7!important;font-size:17px!important}
.afsm-pay-date{display:inline-flex;align-items:center;gap:9px;padding:9px 12px;background:#f2f6fd;border-radius:10px;font-size:13px;color:#344b70}.afsm-pay-date .afsm-pay-svg{width:18px;height:18px;color:#174cb8}.afsm-payment-proof-content{margin-top:18px!important;gap:16px!important}.afsm-pay-preview{display:inline-flex;padding:7px;border:1px solid #dfe7f3;border-radius:14px;background:#fff}.afsm-payment-proof-content img{width:115px!important;max-height:130px!important;border:0!important;object-fit:contain}.afsm-pay-view-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:12px 16px;border:1px solid #bcd0ff;border-radius:12px;color:#1649c9!important;text-decoration:none!important;font-size:13px;font-weight:700;background:#fff;transition:.2s}.afsm-pay-view-btn:hover{background:#eef4ff;border-color:#3763e6}.afsm-pay-view-btn .afsm-pay-svg{width:19px;height:19px}
.afsm-gc-payment-actions{gap:10px!important;margin-top:22px!important}.afsm-pay-action{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 18px;border-radius:12px;text-decoration:none!important;font-weight:700;font-size:13px;transition:.2s}.afsm-pay-action .afsm-pay-svg{width:19px;height:19px}.afsm-gc-payment-actions .afsm-gc-approve{background:#2355e8!important;color:#fff!important;border:1px solid #2355e8!important}.afsm-gc-payment-actions .afsm-gc-approve:hover{background:#1741bf!important}.afsm-pay-decline{border:1px solid #ffc5ca!important;color:#c82436!important;background:#fff!important}.afsm-pay-decline:hover{background:#fff0f2!important}
@media(max-width:1100px){.afsm-gc-payment-meta{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media(max-width:650px){.afsm-payment-proof-panel{padding:16px!important}.afsm-gc-payment-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.afsm-pay-info{padding:11px 9px;gap:8px}.afsm-pay-info-icon{width:34px;height:34px}.afsm-pay-info-icon .afsm-pay-svg{width:18px;height:18px}.afsm-pay-info strong{font-size:12px}.afsm-pay-amount strong{font-size:14px!important}.afsm-payment-proof-title strong{font-size:16px!important}.afsm-gc-payment-actions .afsm-pay-action{flex:1 1 180px}.afsm-pay-view-btn{width:100%}}@media(max-width:370px){.afsm-gc-payment-meta{grid-template-columns:1fr!important}}

/* Midtrans transaction verification panel - v1.9.94 */
.afsm-midtrans-payment{display:grid;gap:18px;color:#172a4c}.afsm-midtrans-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.afsm-midtrans-heading>div{flex:1;min-width:170px;display:grid;gap:4px}.afsm-midtrans-heading strong{font-size:19px}.afsm-midtrans-heading small,.afsm-midtrans-facts small,.afsm-midtrans-amount small{color:#70809c;font-size:12px}.afsm-midtrans-emblem{width:48px;height:48px;border-radius:15px;background:#e8f7ef;color:#15804d;display:grid;place-items:center;font-size:24px;font-weight:700}.afsm-midtrans-pill{padding:9px 12px;border-radius:999px;font-size:12px;font-weight:700;background:#fff5e3;color:#99600c}.afsm-midtrans-pill.is-paid{background:#e7f7ed;color:#137947}.afsm-midtrans-amount{text-align:center;padding:19px;border-radius:15px;background:#f6f9ff;display:grid;gap:5px}.afsm-midtrans-amount strong{font-size:27px;line-height:1.3;color:#18365e}.afsm-midtrans-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.afsm-midtrans-facts>div{border:1px solid #e6ecf5;border-radius:12px;padding:13px;display:grid;gap:6px;min-width:0}.afsm-midtrans-facts strong{font-size:13px;overflow-wrap:anywhere}.afsm-midtrans-fact-wide{grid-column:1/-1}.afsm-midtrans-note{margin:0;padding:12px 14px;background:#f3f7fc;border-radius:12px;font-size:12px;color:#61718b;line-height:1.6}@media(max-width:600px){.afsm-midtrans-facts{grid-template-columns:1fr}.afsm-midtrans-amount strong{font-size:23px}.afsm-midtrans-heading strong{font-size:17px}}
