.aep-dashboard{
    display:flex;
    gap:24px;
    width:100%;
    max-width:100%;
    margin:0;
    align-items:flex-start;
    direction:rtl;
}

.aep-sidebar{
    width:260px;
    min-width:260px;
    position:sticky;
    top:20px;
    background:#111827;
    border-radius:20px;
    padding:24px 18px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.aep-sidebar h2{
    color:#fff;
    margin:0 0 22px;
    font-size:24px;
}

.aep-sidebar a{
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:14px 24px;
    margin-bottom:10px;
    border-radius:14px;
    color:#e5e7eb;
    text-decoration:none;
    transition:.2s ease;
    font-size:15px;
    font-weight:600;
}

.aep-sidebar a:hover{
    background:#2563eb;
    color:#fff;
}

.aep-content{
    flex:1;
    width:calc(100% - 284px);
    margin-top:0;
}

.aep-card,
.aep-box,
.aep-auth-box{
    background:#fff;
    border-radius:22px;
    padding:28px;
    margin-bottom:24px;
    box-shadow:0 10px 35px rgba(15,23,42,.06);
    overflow:hidden;
}

.aep-dynamic-panel:first-child,
.aep-order-page{
    margin-top:0;
}

.aep-page-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.aep-page-header h2,
.aep-card h2,
.aep-box h2,
.aep-auth-box h2{
    margin:0;
    font-size:28px;
    color:#111827;
}

.aep-back-btn{
    background:#eff6ff;
    color:#1d4ed8;
    padding:12px 18px;
    border-radius:12px;
    text-decoration:none;
    font-weight:700;
}

.aep-grid-two{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.aep-order-form,
.aep-card form,
.aep-auth-box form{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.aep-order-form input,
.aep-order-form select,
.aep-card input,
.aep-card select,
.aep-auth-box input,
.aep-auth-box select{
    width:100%;
    min-height:58px;
    border:1px solid #d1d5db;
    border-radius:14px;
    padding:14px 16px;
    font-size:16px;
    background:#f9fafb;
    box-sizing:border-box;
}

.aep-order-form button,
.aep-card button,
.aep-auth-box button{
    min-height:56px;
    border:none;
    border-radius:14px;
    background:#2563eb;
    color:#fff;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
}

.aep-stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
}

.aep-mini{
    background:#f8fafc;
    border-radius:18px;
    padding:22px;
}

.aep-mini h4{
    margin:0 0 12px;
    color:#475569;
}

.aep-mini p{
    margin:0;
    font-size:26px;
    font-weight:700;
}

.aep-table,
.widefat{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    table-layout:auto;
    overflow:hidden;
}

.aep-table thead,
.aep-table tbody,
.aep-table tr{
    width:100%;
}

.aep-table th,
.aep-table td,
.widefat th,
.widefat td{
    padding:18px 16px;
    white-space:nowrap;
    border-bottom:1px solid #e5e7eb;
    text-align:right;
    font-size:15px;
}

.aep-table th,
.widefat th{
    background:#f8fafc;
    color:#0f172a;
    font-weight:800;
}

.aep-table tr:hover td,
.widefat tr:hover td{
    background:#fafafa;
}

.aep-success,
.aep-error{
    padding:16px 18px;
    border-radius:14px;
    margin-bottom:18px;
    font-weight:700;
}

.aep-success{background:#ecfdf5;color:#047857;}
.aep-error{background:#fef2f2;color:#b91c1c;}

body .site,
body .content,
body .container,
body .woocommerce{
    max-width:100% !important;
}

@media(max-width:991px){
    .aep-dashboard{
        flex-direction:column;
    }

    .aep-sidebar,
    .aep-content{
        width:100%;
        min-width:100%;
        position:relative;
        top:auto;
    }
}

@media(max-width:767px){
    .aep-grid-two,
    .aep-page-header{
        grid-template-columns:1fr;
        flex-direction:column;
        align-items:stretch;
    }

    .aep-card,
    .aep-box,
    .aep-auth-box{
        padding:18px;
    }

    .aep-table{
        display:block;
        overflow-x:auto;
    }
}

/* Professional dashboard layout improvements */
.aep-dashboard{
    gap:12px;
    align-items:stretch;
    padding:0;
}

.aep-sidebar{
    width:230px;
    min-width:230px;
    margin:0 !important;
    border-radius:0 20px 20px 0;
    min-height:100vh;
    padding:18px 12px;
}

.aep-content{
    width:calc(100% - 230px);
    padding:0 10px 0 0;
}

.aep-card,
.aep-box,
.aep-auth-box{
    margin-top:14px;
    padding:20px;
}

.aep-order-page,
.aep-dynamic-panel,
.aep-withdraw-page,
.aep-account-page,
.aep-stats-page{
    margin-top:18px !important;
}

.aep-stats{
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:14px;
}

.aep-mini{
    padding:16px;
    border:1px solid #e5e7eb;
}

.aep-mini h4{
    font-size:13px;
    color:#64748b;
}

.aep-mini p{
    font-size:20px;
    color:#0f172a;
}

.aep-table-wrapper,
.table-responsive{
    overflow-x:auto;
    width:100%;
}

.aep-table,
.widefat{
    min-width:1100px;
    background:#fff;
}

.aep-table th,
.aep-table td,
.widefat th,
.widefat td{
    padding:16px 18px;
    font-size:14px;
}

.aep-table td{
    color:#1e293b;
}

.aep-page-header{
    margin-bottom:10px;
}

body .site,
body .content,
body .container,
body .woocommerce,
body .site-content{
    max-width:100% !important;
    width:100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
}

@media(max-width:991px){
  .aep-sidebar{
      width:100%;
      min-width:100%;
      border-radius:18px;
      min-height:auto;
  }

  .aep-content{
      width:100%;
      padding:0;
  }

  .aep-table,
  .widefat{
      min-width:900px;
  }
}


/* Order page top alignment fix */
.aep-order-page,
.aep-order-form-wrapper,
.aep-create-order,
.aep-order-section{
    margin-top:-18px !important;
    padding-top:0 !important;
}

.aep-content > .aep-card:first-child{
    margin-top:0 !important;
}

.order-create-wrapper{margin-top:-25px!important}.order-title{margin-bottom:0!important}


.aep-withdraw-balance{
margin-bottom:25px;
}

.aep-actions{
display:flex;
gap:14px;
flex-wrap:wrap;
margin:20px 0 25px;
}

.aep-btn{
display:inline-flex;
align-items:center;
justify-content:center;
padding:14px 22px;
border-radius:14px;
background:#eef2ff;
color:#1e3a8a;
font-weight:700;
text-decoration:none;
min-width:190px;
transition:.2s ease;
}

.aep-btn:hover{
transform:translateY(-2px);
}

.aep-btn-primary{
background:linear-gradient(135deg,#2952cc,#0f1f52);
color:#fff;
}


.aep-btn{display:inline-flex!important;align-items:center;justify-content:center;padding:12px 22px!important;background:#111827!important;color:#fff!important;border-radius:10px!important;text-decoration:none!important;font-weight:700!important;margin:8px 8px 8px 0!important;border:none!important;transition:all .2s ease!important}.aep-btn:hover{opacity:.9;transform:translateY(-1px)}.aep-btn-primary{background:#2563eb!important;color:#fff!important}.aep-actions{margin-top:20px;margin-bottom:15px}.aep-back-btn{display:inline-flex!important;padding:12px 20px!important;background:#111827!important;color:#fff!important;border-radius:10px!important;text-decoration:none!important;font-weight:700!important;margin-bottom:15px!important}

/* Withdraw Buttons Final Fix */
.withdraw-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:12px 22px!important;background:#2563eb!important;color:#fff!important;border-radius:10px!important;text-decoration:none!important;font-weight:700!important;transition:all .25s ease!important;margin:8px 10px 8px 0!important;border:none!important;line-height:1.2!important}.withdraw-btn:hover{background:#1d4ed8!important;color:#fff!important;transform:translateY(-1px)!important}.aep-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important}

/* Withdraw pages fixes */
.page-slug-agent-withdraw .entry-title,
.page-slug-agent-withdraw-request .entry-title,
.page-slug-agent-withdraw-history .entry-title,
.page-slug-agent-withdraw h1,
.page-slug-agent-withdraw-request h1,
.page-slug-agent-withdraw-history h1{
    display:none !important;
}

.page-slug-agent-withdraw .site-main,
.page-slug-agent-withdraw-request .site-main,
.page-slug-agent-withdraw-history .site-main{
    padding-top:0 !important;
    margin-top:0 !important;
}

.page-slug-agent-withdraw .aep-card,
.page-slug-agent-withdraw-request .aep-card,
.page-slug-agent-withdraw-history .aep-card{
    margin-top:0 !important;
}

.page-slug-agent-withdraw .entry-content,
.page-slug-agent-withdraw-request .entry-content,
.page-slug-agent-withdraw-history .entry-content{
    margin-top:0 !important;
    padding-top:0 !important;
}


.page-slug-agent-withdraw-request .entry-title,
.page-slug-agent-withdraw-request h1{
display:none!important;
}

.page-slug-agent-withdraw-request .site-main,
.page-slug-agent-withdraw-request .entry-content{
margin-top:0!important;
padding-top:0!important;
}

.page-slug-agent-withdraw-request .aep-card{
margin-top:0!important;
padding-top:20px!important;
}

.page-slug-agent-withdraw-request input,
.page-slug-agent-withdraw-request select{
height:62px!important;
border-radius:18px!important;
}

.page-slug-agent-withdraw-request .aep-actions{
display:flex!important;
justify-content:space-between!important;
margin-bottom:15px!important;
}




/* =========================
   Withdraw Request Page Final Clean Fix
========================= */

.page-slug-agent-withdraw-request .site-main,
.page-slug-agent-withdraw-request .entry-content{
    margin-top:0 !important;
    padding-top:0 !important;
}

.page-slug-agent-withdraw-request .aep-card.aep-withdraw-modern{
    margin-top:-35px !important;
    padding-top:0 !important;
}

/* Available Balance Card */
.page-slug-agent-withdraw-request .aep-withdraw-balance{
    padding:10px 18px !important;
    min-height:auto !important;
    margin-bottom:12px !important;
    border-radius:16px !important;
}

/* amount beside title */
.page-slug-agent-withdraw-request .aep-withdraw-balance .aep-mini{
    display:flex !important;
    flex-direction:row-reverse !important;
    align-items:center !important;
    justify-content:center !important;
    gap:12px !important;
    padding:10px 14px !important;
}

/* text */
.page-slug-agent-withdraw-request .aep-withdraw-balance .aep-mini h4,
.page-slug-agent-withdraw-request .aep-withdraw-balance .aep-mini p{
    margin:0 !important;
    line-height:1 !important;
    color:#fff !important;
}

.page-slug-agent-withdraw-request .aep-withdraw-balance .aep-mini h4{
    font-size:18px !important;
}

.page-slug-agent-withdraw-request .aep-withdraw-balance .aep-mini p{
    font-size:18px !important;
    font-weight:700 !important;
}



/* =========================
   Withdraw Request Page Only
========================= */

.aep-withdraw-modern{
    margin-top:-45px !important;
    padding-top:0 !important;
}

.aep-withdraw-modern .aep-stats{
    display:block !important;
    margin-bottom:10px !important;
}

.aep-withdraw-modern .aep-withdraw-balance{
    margin-bottom:14px !important;
}

.aep-withdraw-modern .aep-withdraw-balance .aep-mini{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex-direction:row-reverse !important;
    gap:12px !important;
    padding:12px 18px !important;
    border-radius:16px !important;
    min-height:auto !important;
}

.aep-withdraw-modern .aep-withdraw-balance h4,
.aep-withdraw-modern .aep-withdraw-balance p{
    margin:0 !important;
    line-height:1 !important;
    color:#fff !important;
}

.aep-withdraw-modern .aep-withdraw-balance h4{
    font-size:18px !important;
}

.aep-withdraw-modern .aep-withdraw-balance p{
    font-size:18px !important;
    font-weight:700 !important;
}



#aepDynamicStats .aep-mini{
min-width:150px!important;
padding:10px 14px!important;
border-radius:14px!important;
}
#aepDynamicStats .aep-mini h4{font-size:18px!important}
#aepDynamicStats .aep-mini p{font-size:16px!important;margin-top:6px!important}

.aep-agent-orders-page .aep-orders-tools{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:nowrap!important}
.aep-agent-orders-page .aep-orders-tools>div:first-of-type{margin-top:0!important}
.aep-agent-orders-page #aep-orders-search{flex:1!important}
.aep-orders-fixed-stats>div,.aep-orders-filter-stats>div{background:#fff;padding:10px 14px;border-radius:10px;border:1px solid #dfe5ff;min-width:150px;text-align:center;flex:1}

.aep-agent-orders-page .aep-orders-tools{display:flex!important;align-items:end!important;gap:12px!important;flex-wrap:nowrap!important}
.aep-agent-orders-page .aep-orders-length{width:100px;flex:0 0 100px}
.aep-agent-orders-page #aep-orders-search{flex:1}
.aep-orders-fixed-stats{display:grid!important;grid-template-columns:repeat(3,minmax(180px,1fr))!important;gap:12px!important}
.aep-orders-fixed-stats>div{text-align:center}


/* Orders page targeted layout only */
.aep-agent-orders-page .aep-orders-top-wrap{display:flex;gap:20px;align-items:stretch;margin:15px 0}
.aep-agent-orders-page .aep-orders-fixed-stats-wrap{flex:1}
.aep-agent-orders-page .aep-orders-tools-side{width:260px;display:flex;flex-direction:column;justify-content:center;gap:14px}
.aep-agent-orders-page .aep-orders-tools-side #aep-orders-search{width:100%}
.aep-agent-orders-page .aep-orders-tools-side .aep-orders-length{width:100%;margin-top:0!important}

#aep-orders-search{min-height:42px!important;height:42px!important;}


/* Final orders page spacing tweaks */
.aep-agent-orders-page{
margin-top:0!important;
padding-top:0!important;
}
.aep-agent-orders-page .aep-page-header{
margin-top:0!important;
padding-top:0!important;
margin-bottom:8px!important;
}
.aep-content>.aep-card:first-child{
margin-top:0!important;
}
#aep-orders-search{
height:40px!important;
min-height:40px!important;
padding:8px 12px!important;
}
#aep-pagination{
display:flex!important;
justify-content:center!important;
align-items:center!important;
margin-top:8px!important;
margin-bottom:8px!important;
}
.aep-orders-filter-stats{
margin-top:0!important;
}


/* orders fixes */
#aep-orders-search{height:42px !important; min-height:42px !important; padding:8px 12px !important;}
.aep-orders-length select,#aep-per-page{height:42px !important;}
#aep-pagination{justify-content:center !important; width:100% !important;}
.aep-orders-filter-stats{justify-content:center !important;}

#aep-orders-search{height:42px!important;min-height:42px!important;}
#aep-pagination{margin-top:8px!important;margin-bottom:8px!important;}
.aep-orders-filter-stats{justify-content:center!important;margin-top:8px!important;}

.aep-advanced-stats,.aep-order-counts{display:flex;gap:20px;flex-wrap:wrap;justify-content:center;margin-bottom:20px}
.aep-order-counts .aep-mini,.aep-advanced-stats .aep-mini{text-align:center}
.aep-order-counts .aep-mini p,.aep-advanced-stats .aep-mini p{display:block;text-align:center}

.aep-sidebar a{display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important;padding:14px 28px!important;}

.aep-sidebar a{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:14px 28px!important;}

.aep-withdraw-modern .aep-error{margin:0 0 24px 0;text-align:center;font-weight:700;display:block;}


/* Sidebar layout fixes */
.aep-content{flex:1;min-width:0;width:auto;overflow-x:auto;}
.aep-sidebar{width:250px;min-width:250px;}

/* Orders tables */
.aep-table,.aep-orders-table{width:100%;}

/* Pagination buttons */
.aep-pagination{
 display:flex;
 justify-content:center;
 gap:12px;
 flex-wrap:nowrap;
 align-items:center;
}
.aep-pagination a,
.aep-pagination button{
 min-width:120px;
 height:56px;
 font-size:22px;
}


/* targeted fixes only */
.aep-content{min-width:0!important;overflow-x:hidden!important;}

#aepStatsTable{width:100%!important;table-layout:fixed!important;}
.aep-card:has(#aepStatsTable){overflow-x:visible!important;}

.aep-agent-orders-page .aep-orders-top-wrap{
display:block!important;
}
.aep-agent-orders-page .aep-orders-tools-side{
width:100%!important;
display:flex!important;
flex-direction:row!important;
gap:12px!important;
margin:12px 0!important;
}
.aep-agent-orders-page .aep-orders-tools-side > *{
flex:1!important;
}

.aep-withdraw-history .aep-stats-cards,
.aep-withdraw-history .aep-summary-cards{
display:grid!important;
grid-template-columns:repeat(4,1fr)!important;
gap:14px!important;
}

#aep-pagination,
.aep-pagination{
display:flex!important;
flex-wrap:nowrap!important;
justify-content:center!important;
align-items:center!important;
gap:10px!important;
}

#aep-pagination a,
#aep-pagination button,
.aep-pagination a,
.aep-pagination button{
min-width:120px!important;
padding:12px 16px!important;
}

.aep-pagination .page-info,
#aep-pagination .page-info{
white-space:nowrap!important;
}


/* fix orders controls */
.aep-orders-tools-side{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:12px!important;}
.aep-orders-tools-side select{width:90px!important;min-width:90px!important;}
/* withdraw cards and pagination */
.aep-summary-cards,.aep-stats-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.aep-pagination{display:flex!important;flex-wrap:nowrap!important;justify-content:center!important;gap:12px!important;}
/* statistics widths */
#aepStatsTable th:nth-child(1),#aepStatsTable td:nth-child(1){width:50%!important;}
#aepStatsTable th:nth-child(2),#aepStatsTable td:nth-child(2){width:20%!important;}
#aepStatsTable th:nth-child(3),#aepStatsTable td:nth-child(3){width:30%!important;}

/* orders search+length same row */
.aep-orders-tools-side{display:flex!important;align-items:center!important;gap:12px!important;flex-direction:row!important}
.aep-orders-tools-side #aep-orders-search{order:1;flex:1}
.aep-orders-tools-side .aep-orders-length{order:2;display:flex!important;align-items:center!important;gap:8px}
.aep-orders-tools-side .aep-orders-length select{width:90px!important;min-width:90px!important}

/* withdraw history cards and pager */
#aepFixedStats{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:12px!important}
#aepWithdrawPagination, .aep-withdraw-pager{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:10px!important}
#aepWithdrawPagination .aep-btn,.aep-withdraw-pager .aep-btn{min-width:120px!important}
#aepWithdrawPagination div,.aep-withdraw-pager div{white-space:nowrap!important}

/* stats columns */
#aepStatsTable{table-layout:auto!important}
#aepStatsTable th:nth-child(1),#aepStatsTable td:nth-child(1){width:45%!important}
#aepStatsTable th:nth-child(2),#aepStatsTable td:nth-child(2){width:20%!important}
#aepStatsTable th:nth-child(3),#aepStatsTable td:nth-child(3){width:35%!important}


/* v6 targeted fixes */
.aep-orders-tools-side{
display:flex!important;
align-items:center!important;
justify-content:flex-start!important;
gap:14px!important;
flex-direction:row-reverse!important;
}
.aep-orders-tools-side #aep-orders-search{
flex:1!important;
max-width:420px!important;
}
.aep-orders-tools-side .aep-orders-length{
display:flex!important;
align-items:center!important;
gap:8px!important;
min-width:auto!important;
}
.aep-orders-tools-side .aep-orders-length select{
width:90px!important;
}

#aep-pagination{
flex-wrap:nowrap!important;
}
#aep-pagination .page-info{
order:3!important;
white-space:nowrap!important;
}

#aepFixedStats{
display:grid!important;
grid-template-columns:repeat(4,1fr)!important;
gap:12px!important;
}
#aepFixedStats .aep-mini{
width:auto!important;
min-width:0!important;
}


/* withdraw pagination one row */
#aepPagination{
display:flex!important;
flex-wrap:nowrap!important;
justify-content:center!important;
align-items:center!important;
gap:12px!important;
}
#aepPagination .aep-btn{
min-width:120px!important;
padding:12px 18px!important;
}
#aepPagination div{
white-space:nowrap!important;
font-weight:700!important;
}

/* dynamic cards smaller */
#aepDynamicStats{
display:grid!important;
grid-template-columns:repeat(4,1fr)!important;
gap:12px!important;
}
#aepDynamicStats .aep-mini{
padding:14px!important;
min-height:90px!important;
}
#aepDynamicStats .aep-mini h4{
font-size:16px!important;
margin:0 0 8px!important;
}
#aepDynamicStats .aep-mini p{
font-size:22px!important;
margin:0!important;
}

/* orders top controls same row */
.aep-content label{
display:inline-flex;
align-items:center;
gap:10px;
}

/* stats table fit */
#aepStatsTable td,#aepStatsTable th{
white-space:normal!important;
}


/* v8 withdraw history final tuning */
body .aep-dashboard{margin-top:0!important}
.aep-content > h2:first-child{margin-top:0!important}

#aepDynamicStats{
gap:8px!important;
margin-top:0!important;
}
#aepDynamicStats .aep-mini{
padding:10px 12px!important;
min-height:72px!important;
border-radius:12px!important;
}
#aepDynamicStats .aep-mini h4{
font-size:14px!important;
line-height:1.2!important;
margin:0 0 4px!important;
}
#aepDynamicStats .aep-mini p{
font-size:18px!important;
line-height:1.1!important;
}

#aepPagination{
margin-top:10px!important;
gap:8px!important;
}
#aepPagination .aep-btn{
min-width:85px!important;
height:42px!important;
font-size:16px!important;
padding:8px 12px!important;
}

.aep-table th,
.aep-table td{
padding:8px 10px!important;
}

.aep-table th:first-child,
.aep-table td:first-child{
width:55px!important;
}

.aep-table{
margin-top:8px!important;
}


/* v9 final withdraw compact */
.aep-content{padding-top:0!important}
#aepDynamicStats{margin-top:6px!important;gap:6px!important}
#aepDynamicStats .aep-mini{min-height:60px!important;padding:8px 10px!important}
#aepDynamicStats .aep-mini h4{font-size:13px!important}
#aepDynamicStats .aep-mini p{font-size:16px!important}

.aep-table th{padding:6px 8px!important;font-size:14px!important}
.aep-table td{padding:6px 8px!important;font-size:14px!important}

#aepPagination{margin-top:6px!important}
#aepPagination .aep-btn{min-width:75px!important;height:38px!important;font-size:15px!important}



/* v10 withdraw history only */
.page-slug-agent-withdraw-history .entry-content,
.page-slug-agent-withdraw-history .aep-content{
margin-top:0!important;
padding-top:0!important;
}

.page-slug-agent-withdraw-history #aepDynamicStats{
gap:6px!important;
margin-top:4px!important;
}

.page-slug-agent-withdraw-history #aepDynamicStats .aep-mini{
min-height:58px!important;
padding:8px 10px!important;
}

.page-slug-agent-withdraw-history #aepDynamicStats .aep-mini h4{
font-size:12px!important;
line-height:1.15!important;
margin:0 0 3px!important;
}

.page-slug-agent-withdraw-history #aepDynamicStats .aep-mini p{
font-size:15px!important;
}

.page-slug-agent-withdraw-history .aep-table th,
.page-slug-agent-withdraw-history .aep-table td{
padding:6px 6px!important;
font-size:13px!important;
}

.page-slug-agent-withdraw-history .aep-table th:first-child,
.page-slug-agent-withdraw-history .aep-table td:first-child{
width:45px!important;
}

.page-slug-agent-withdraw-history .aep-table th:nth-child(3),
.page-slug-agent-withdraw-history .aep-table td:nth-child(3){
width:90px!important;
}


/* v11 withdraw page real elements */
.aep-dashboard{gap:12px!important;}
.aep-sidebar{width:250px!important;min-width:250px!important;}
.aep-content{flex:1!important;max-width:100%!important;}

#aepFixedStats{gap:6px!important;margin-top:4px!important;}
#aepFixedStats > div{
min-height:95px!important;
padding:12px!important;
}
#aepFixedStats h4{
font-size:16px!important;
line-height:1.2!important;
margin-bottom:6px!important;
}
#aepFixedStats p{
font-size:18px!important;
line-height:1.1!important;
}

#aepWithdrawTable th,
#aepWithdrawTable td{
padding:7px 5px!important;
font-size:14px!important;
}
#aepWithdrawTable th:nth-child(1),
#aepWithdrawTable td:nth-child(1){
width:55px!important;
}
#aepWithdrawTable th:nth-child(3),
#aepWithdrawTable td:nth-child(3){
width:95px!important;
}

.aep-card{margin-top:0!important;}


/* v12 withdraw page width + top spacing */
.aep-dashboard{
    max-width:100%!important;
    width:100%!important;
    gap:8px!important;
    align-items:flex-start!important;
}
.aep-sidebar{
    width:240px!important;
    min-width:240px!important;
}
.aep-content{
    flex:1 1 auto!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
}
.aep-card{
    width:100%!important;
    max-width:100%!important;
}
.entry-content{
    padding-top:0!important;
    margin-top:0!important;
}
.site-main{
    padding-top:0!important;
}


/* Orders page only - search and length same row + remove top spacing */
.aep-agent-orders-page,
.aep-agent-orders-page .aep-card,
.aep-agent-orders-page .aep-page-header{
    margin-top:0 !important;
    padding-top:0 !important;
}

.aep-agent-orders-page .aep-orders-tools-side{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:12px !important;
    width:100% !important;
}

.aep-agent-orders-page .aep-orders-tools-side #aep-orders-search{
    flex:1 !important;
    max-width:100%!important;
}

.aep-agent-orders-page .aep-orders-tools-side .aep-orders-length{
    width:110px !important;
    min-width:110px !important;
    flex:0 0 110px !important;
    margin:0 !important;
}

.aep-agent-orders-page .aep-orders-tools-side .aep-orders-length select,
.aep-agent-orders-page #aep-per-page{
    width:100% !important;
}


/* orders page: reduce display box height only */
.aep-agent-orders-page .aep-orders-length,
.aep-agent-orders-page #aep-per-page,
.aep-agent-orders-page select{
    min-height:48px !important;
    height:48px !important;
    line-height:48px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
}




/* Stats table balanced */
#aepStatsTable{
 width:100% !important;
 table-layout:auto !important;
 min-width:0 !important;
}
#aepStatsTable th,
#aepStatsTable td{
 text-align:center !important;
 vertical-align:middle !important;
}
#aepStatsTable th:nth-child(1),
#aepStatsTable td:nth-child(1){
 width:52% !important;
}
#aepStatsTable th:nth-child(2),
#aepStatsTable td:nth-child(2){
 width:15% !important;
 min-width:140px !important;
}
#aepStatsTable th:nth-child(3),
#aepStatsTable td:nth-child(3){
 width:30% !important;
}


/* Withdraw page only */
.aep-withdraw-page .aep-content{
    max-width:900px;
}


/* Desktop enhancement for Create Order page only */
@media (min-width: 1200px){
.aep-order-page{
    width:100%;
}
.aep-order-page .aep-products-builder,
.aep-order-page .aep-products-table{
    width:100%;
}
.aep-order-page .aep-content{
    max-width:100%;
}
.aep-order-page table{
    width:100%;
}
.aep-order-page .aep-page-header{
    margin-bottom:24px;
}
}


/* Order page layout optimization */
.aep-dashboard{
 display:flex !important;
 flex-direction:row-reverse !important;
 gap:12px !important;
 align-items:flex-start !important;
}
.aep-sidebar{
 order:2 !important;
 margin:0 !important;
 width:280px !important;
 min-width:280px !important;
}
.aep-content,
.aep-main-content,
.aep-box.aep-order-page{
 order:1 !important;
 flex:1 1 auto !important;
 max-width:100%!important;
 width:auto !important;
 margin:0 !important;
}


/* Create Order layout expansion */
.aep-dashboard{
    flex-direction:row-reverse !important;
    gap:8px !important;
    padding:0 !important;
    margin:0 !important;
}
.aep-sidebar{
    margin-left:0 !important;
    margin-right:0 !important;
}
.aep-content{
    width:auto !important;
    flex:1 1 auto !important;
    max-width:100%!important;
}
.aep-order-page{
    width:100% !important;
    max-width:100%!important;
}


/* create order only tweaks */
.aep-products-table th{ text-align:center !important; }
.aep-products-table td.product,
.aep-products-table .product{ text-align:right !important; }


/* Create order page only */
.aep-order-page .aep-products-table th{
 text-align:center !important;
}
.aep-order-page .aep-products-table td:first-child{
 width:30% !important;
 text-align:right !important;
}
.aep-order-page .aep-products-table td:first-child select{
 text-align:right !important;
}
.aep-order-page .aep-products-table th:first-child{
 width:30% !important;
}
.aep-order-page .aep-products-table th:nth-child(4),
.aep-order-page .aep-products-table td:nth-child(4){
 width:9% !important;
 min-width:70px !important;
}
.aep-order-page .aep-sidebar{
 width:240px !important;
 min-width:240px !important;
}





/* CLEAN CREATE ORDER COLUMNS - single source of truth */
.aep-order-page .aep-products-table{
    table-layout:fixed !important;
    width:100% !important;
}

.aep-order-page .aep-products-table th,
.aep-order-page .aep-products-table td{
    font-size:13px !important;
    padding:6px 5px !important;
    box-sizing:border-box !important;
    text-align:center !important;
    vertical-align:middle !important;
    line-height:1.35 !important;
}

 /* المنتج */
.aep-order-page .aep-products-table th:nth-child(1),
.aep-order-page .aep-products-table td:nth-child(1){
    width:31% !important;
}

/* السعر الاصلي */
.aep-order-page .aep-products-table th:nth-child(2),
.aep-order-page .aep-products-table td:nth-child(2){
    width:16% !important;
    white-space:normal !important;
}

/* سعر البيع */
.aep-order-page .aep-products-table th:nth-child(3),
.aep-order-page .aep-products-table td:nth-child(3){
    width:18% !important;
}

/* الكمية */
.aep-order-page .aep-products-table th:nth-child(4),
.aep-order-page .aep-products-table td:nth-child(4){
    width:10% !important;
}

/* العمولة */
.aep-order-page .aep-products-table th:nth-child(5),
.aep-order-page .aep-products-table td:nth-child(5){
    width:13% !important;
}

/* حذف */
.aep-order-page .aep-products-table th:nth-child(6),
.aep-order-page .aep-products-table td:nth-child(6){
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    text-align:center !important;
    padding-left:2px !important;
    padding-right:2px !important;
}

.aep-order-page .aep-product-select{
    text-align:right !important;
    padding:6px 6px !important;
    font-size:12.5px !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}
.aep-order-page .aep-products-table input,
.aep-order-page .aep-products-table select{
    max-width:100% !important;
    box-sizing:border-box !important;
    padding:6px 6px !important;
    font-size:13px !important;
    text-align:center !important;
}


/* FINAL create order tweak only - scoped to create order page */
.aep-order-page .aep-products-table th:nth-child(2),
.aep-order-page .aep-products-table td:nth-child(2){
 width:16% !important;
 white-space:normal !important;
}

.aep-order-page .aep-products-table th:nth-child(3),
.aep-order-page .aep-products-table td:nth-child(3){
 width:18% !important;
}

.aep-order-page input[type=number]::-webkit-outer-spin-button,
.aep-order-page input[type=number]::-webkit-inner-spin-button{
 -webkit-appearance:none !important;
 margin:0 !important;
}
.aep-order-page input[type=number]{
 -moz-appearance:textfield !important;
 appearance:textfield !important;
}


/* V3 only: final create-order column balance */
.aep-order-page .aep-products-table th:nth-child(1),
.aep-order-page .aep-products-table td:nth-child(1){
 width:31% !important;
}

.aep-order-page .aep-products-table th:nth-child(2),
.aep-order-page .aep-products-table td:nth-child(2){
 width:16% !important;
 white-space:normal !important;
}

.aep-order-page .aep-products-table th:nth-child(3),
.aep-order-page .aep-products-table td:nth-child(3){
 width:18% !important;
}

.aep-auth-tabs{display:flex;gap:10px;margin-bottom:15px}
.aep-tab-btn{flex:1;padding:14px;border:none;border-radius:12px;font-weight:700;cursor:pointer}
.aep-tab-btn.active{background:#4f46e5;color:#fff}

.aep-auth-box{padding-top:12px!important;}
.aep-auth-box h2{display:none!important;}
.aep-grid-city-row{display:grid;grid-template-columns:.7fr 1.3fr;gap:18px;}
.aep-password-wrap{position:relative}
.aep-pass-toggle{position:absolute;left:18px;top:50%;transform:translateY(-50%);cursor:pointer;font-size:22px;opacity:.7}


.aep-section-card{
background:#fff;
border:1px solid #e5e7eb;
border-radius:16px;
padding:20px;
margin:18px 0;
}
.aep-section-card h3{
margin:0 0 15px;
padding-bottom:10px;
border-bottom:1px solid #eee;
}
.aep-success,.aep-error{
padding:12px 16px;
border-radius:10px;
margin-bottom:15px;
}
@media(max-width:768px){
.aep-section-card{padding:15px;}
}


.aep-card{margin-top:0!important;padding-top:0!important;}
.aep-dashboard,.aep-dashboard-content,.aep-content{margin-top:0!important;padding-top:0!important;}
.aep-section-card{
margin:8px 0!important;
padding:14px!important;
}
.aep-section-card h3{
margin-bottom:10px!important;
}
.aep-section-card input,
.aep-section-card select{
min-height:44px!important;
padding:10px 12px!important;
}

/* V46 account spacing fixes */
.aep-dashboard,
.aep-dashboard-content,
.aep-account-wrap,
.aep-account-page{
    margin-top:0 !important;
    padding-top:0 !important;
}

.aep-section-card{
    margin:8px 0 !important;
    padding:14px 16px !important;
}

.aep-section-card input,
.aep-section-card select{
    min-height:42px !important;
    padding:8px 12px !important;
}

.aep-section-card + .aep-section-card{
    margin-top:8px !important;
}


/* V47 remove large account gaps */
.aep-card form{
margin:0!important;
padding:0!important;
}
.aep-card{
margin-top:0!important;
}
.aep-section-card{
margin:6px 0!important;
}
.aep-section-card:first-child{
margin-top:0!important;
}
.aep-section-card h3{
margin:0!important;
padding-bottom:6px!important;
}
.aep-grid-two{
gap:10px!important;
}

.aep-submenu{padding-right:15px}.aep-submenu a{display:block}.aep-menu-toggle{display:block}
.aep-content .aep-card{margin-top:0!important;padding-top:0!important;}
.aep-table th,.aep-table td{text-align:center!important;vertical-align:middle!important;}

#aep-weight{height:46px;text-align:center}
#aep-shipping,#aep-order-total{text-align:center}
.aep-order-form label{font-weight:600}


.aep-cart-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:15px 0}
.aep-card{background:#fff;padding:15px;border:1px solid #ddd;border-radius:12px;text-align:center}
.aep-card span{display:block;font-weight:700;margin-top:8px}
@media(max-width:768px){.aep-cart-cards{grid-template-columns:1fr}}


/* Stage1.1 cart redesign */
.aep-cart-cards{margin:20px 0!important}
.aep-card{background:#fff;border-radius:18px!important;box-shadow:0 3px 12px rgba(0,0,0,.06);padding:22px!important}
.aep-card strong{display:block;font-size:20px}
.aep-card span{font-size:28px}
.woocommerce table.shop_table td,.woocommerce table.shop_table th{text-align:center}

.aep-cart-cards-modern{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:20px 0}
.aep-cart-box{background:#fff;border:1px solid #ececf5;border-radius:18px;padding:25px;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.05)}
.aep-cart-box .aep-title{font-size:18px;font-weight:700;margin-bottom:12px}
.aep-cart-box .aep-value{font-size:34px;font-weight:800;color:#4f46e5}
@media(max-width:768px){.aep-cart-cards-modern{grid-template-columns:1fr}}

.aep-cart-box .aep-value{line-height:1.2!important}
.aep-cart-box{min-height:150px;display:flex;flex-direction:column;justify-content:center}

/* Stage3 Cart UI */
.aep-cart-cards-modern{margin-bottom:30px!important}
.aep-cart-box{border-radius:22px!important}
.woocommerce-cart table.shop_table th{
 background:#4f46e5!important;
 color:#fff!important;
 padding:16px!important;
}
.woocommerce-cart table.shop_table td{
 padding:18px 12px!important;
 vertical-align:middle!important;
}
.woocommerce-cart .quantity input.qty{
 min-width:90px;
 text-align:center;
 font-weight:700;
}
.woocommerce-cart .product-name{
 font-weight:700;
}

/* Stage4 Cart Polish */
.aep-cart-cards-modern{
grid-template-columns:repeat(3,minmax(250px,1fr))!important;
gap:24px!important;
}
.aep-cart-box{
background:linear-gradient(180deg,#fff,#fafaff)!important;
box-shadow:0 10px 30px rgba(79,70,229,.08)!important;
border:1px solid #e8e8ff!important;
}
.woocommerce-cart table.shop_table{
border-radius:18px!important;
overflow:hidden!important;
}
.woocommerce-cart table.shop_table td,
.woocommerce-cart table.shop_table th{
border-color:#ececf5!important;
}
.woocommerce-cart .product-name img{
border-radius:12px!important;
}
.woocommerce-cart input[type=number]{
border-radius:10px!important;
font-size:22px!important;
font-weight:700!important;
}
.woocommerce-cart .product-remove a{
font-size:34px!important;
color:#dc2626!important;
}

/* Stage5 Cart Enhancement */
.woocommerce-cart table.shop_table{
background:#fff!important;
box-shadow:0 12px 35px rgba(79,70,229,.08)!important;
}
.woocommerce-cart table.shop_table th{
font-size:20px!important;
font-weight:800!important;
}
.woocommerce-cart .product-name{
font-size:18px!important;
line-height:1.8!important;
}
.woocommerce-cart .product-name input{
max-width:180px!important;
margin:10px auto!important;
display:block!important;
}
.woocommerce-cart .product-remove{
width:70px!important;
}
.woocommerce-cart .product-thumbnail{
width:110px!important;
}
.woocommerce-cart .product-thumbnail img{
max-width:70px!important;
}
.woocommerce-cart td{
font-size:18px!important;
}
.aep-cart-box .aep-title{
font-size:24px!important;
}
.aep-cart-box .aep-value{
font-size:48px!important;
}

/* Stage6 - compact cart layout */
.woocommerce-cart .product-name{
    width:auto!important;
}
.woocommerce-cart .product-name > div,
.woocommerce-cart .product-name p{
    margin:4px 0!important;
}
.woocommerce-cart table.shop_table td{
    padding:10px 8px!important;
}
.woocommerce-cart .product-thumbnail img{
    max-width:55px!important;
}
.woocommerce-cart input[type=number]{
    font-size:18px!important;
    min-height:42px!important;
}
.woocommerce-cart .product-remove a{
    font-size:26px!important;
}
/* shrink commission box until replaced later */
.woocommerce-cart .product-name div[style*="background"],
.woocommerce-cart .product-name .commission-box{
    padding:10px!important;
    margin-top:8px!important;
}

/* Stage7 visual cleanup */
.woocommerce-cart .product-name{
 text-align:center!important;
}
.woocommerce-cart .product-name br{
 display:none!important;
}
.woocommerce-cart .product-thumbnail{
 width:80px!important;
}
.woocommerce-cart .product-thumbnail img{
 max-width:48px!important;
}
.woocommerce-cart table.shop_table th{
 padding:12px 8px!important;
}
.woocommerce-cart table.shop_table td{
 padding:8px 6px!important;
}
.aep-cart-box{
 min-height:120px!important;
}
.aep-cart-box .aep-title{
 font-size:20px!important;
}
.aep-cart-box .aep-value{
 font-size:42px!important;
}

/* Stage8 */
.woocommerce-cart .product-name{
 max-width:420px!important;
}
.woocommerce-cart .product-name > div{
 border:none!important;
 background:transparent!important;
 box-shadow:none!important;
}
.woocommerce-cart .product-name div{
 line-height:1.5!important;
}
.woocommerce-cart table.shop_table td{
 height:auto!important;
}
.woocommerce-cart .product-name{
 font-size:16px!important;
}
.woocommerce-cart .product-name strong,
.woocommerce-cart .product-name b{
 font-size:15px!important;
}

/* Stage9 - remove old profit box and compact cart */
.aep-profit-preview{display:none!important;}
.woocommerce-cart .product-name{
    min-width:280px!important;
}
.woocommerce-cart .product-thumbnail,
.woocommerce-cart .product-remove{
    width:60px!important;
}
.woocommerce-cart .product-thumbnail img{
    max-width:42px!important;
}

/* Stage10 - aggressive cart cleanup */
.woocommerce-cart .product-thumbnail{display:none!important;}
.woocommerce-cart table.shop_table th:nth-child(1),
.woocommerce-cart table.shop_table td.product-remove{
width:55px!important;
}
.woocommerce-cart .product-name{
min-width:220px!important;
max-width:220px!important;
font-size:15px!important;
}
.woocommerce-cart .product-name label,
.woocommerce-cart .product-name small{
font-size:13px!important;
}
.woocommerce-cart input[type=text],
.woocommerce-cart input[type=number]{
max-width:140px!important;
}
.woocommerce-cart .coupon{
display:flex!important;
gap:10px!important;
align-items:center!important;
}
.woocommerce-cart .actions{
padding:12px!important;
}
.aep-cart-cards-modern{
margin-bottom:15px!important;
}

/* Stage11 */
.woocommerce-cart .product-name{
max-width:180px!important;
min-width:180px!important;
}
.woocommerce-cart .product-name label{
display:none!important;
}
.woocommerce-cart input[type=text],
.woocommerce-cart input[type=number]{
max-width:120px!important;
}
.woocommerce-cart .actions .coupon{
gap:6px!important;
}
.woocommerce-cart .actions button,
.woocommerce-cart .actions .button{
border-radius:12px!important;
}
.aep-cart-box{
border-radius:24px!important;
}

/* Stage13 requested layout */
.woocommerce-cart table.shop_table th:nth-child(3),
.woocommerce-cart table.shop_table td:nth-child(3){
 width:140px!important;
}
/* تصغير عمود الكمية */
.woocommerce-cart table.shop_table th:nth-child(2),
.woocommerce-cart table.shop_table td:nth-child(2){
 width:110px!important;
}
.woocommerce-cart .quantity input.qty{
 max-width:80px!important;
 min-width:80px!important;
}

/* إزالة رمز العملة بصرياً */
.woocommerce-cart .amount .woocommerce-Price-currencySymbol{
 display:none!important;
}

/* توسيع المنتج */
.woocommerce-cart .product-name{
 max-width:420px!important;
 min-width:420px!important;
 line-height:1.8!important;
}

/* مكان مناسب للسعر أسفل اسم المنتج */
.woocommerce-cart .product-name .aep-original-price,
.woocommerce-cart .product-name .original-price{
 display:block!important;
 margin-top:6px!important;
 font-size:14px!important;
 font-weight:700!important;
 opacity:.85!important;
}

/* سعر البيع */
.woocommerce-cart .product-name input{
 margin-top:8px!important;
}

/* العمولة والربح المتوقع أسفل سعر البيع */
.woocommerce-cart .commission-box,
.woocommerce-cart .profit-box,
.woocommerce-cart .aep-profit-preview{
 display:block!important;
 margin-top:8px!important;
 padding:8px!important;
 border-radius:10px!important;
 font-size:14px!important;
 line-height:1.7!important;
}

/* Stage14 requested layout */
.aep-original-price-line{
display:block;
margin-top:6px;
font-size:14px;
font-weight:700;
opacity:.85;
}
/* keep sale price column */
.woocommerce-cart .aep-profit-preview{
margin-top:8px!important;
text-align:center!important;
}
.woocommerce-cart .amount .woocommerce-Price-currencySymbol{
display:none!important;
}


.aep-cart-cards-modern{display:flex;gap:15px;margin:20px 0;flex-wrap:wrap}
.aep-cart-box{flex:1;min-width:220px;padding:18px 15px;border:1px solid #e6e6ff;border-radius:24px;text-align:center;background:#fff}
.aep-cart-box .aep-title{font-size:18px;font-weight:700;margin-bottom:10px}
.aep-cart-box .aep-value{font-size:52px;font-weight:800;line-height:1.1}


/* Phase 2 Cards */
.aep-cart-cards-modern{
    gap:14px !important;
}
.aep-cart-box{
    min-height:115px !important;
    padding:18px !important;
    border-radius:18px !important;
}
.aep-cart-box .aep-title{
    font-size:16px !important;
    margin-bottom:8px !important;
}
.aep-cart-box .aep-value{
    font-size:28px !important;
    font-weight:800 !important;
}


/* Phase 3 */
.aep-cart-cards-modern,
.aep-stats-wrap{
    margin-bottom:18px !important;
}

.aep-cart-box{
    min-height:90px !important;
    padding:12px 15px !important;
}

.aep-cart-box .aep-title{
    font-size:14px !important;
    margin-bottom:4px !important;
}

.aep-cart-box .aep-value{
    font-size:24px !important;
    line-height:1.1 !important;
}



/* phase4 */
.aep-cart-box,.aep-stat-card,.aep-dashboard-card{
min-height:72px!important;
padding:10px 12px!important;
}
.aep-cart-box .aep-value,.aep-stat-card .aep-value,.aep-dashboard-card .aep-value{
font-size:22px!important;
}


body .woocommerce{
    margin-top:0!important;
    padding-top:0!important;
}
.aep-cart-cards-modern,
.aep-stats-wrap{
    margin-top:0!important;
    padding-top:0!important;
}

body, .site-content, .woocommerce{
margin-top:0!important;
padding-top:0!important;
}
.aep-cart-cards-modern{
margin-top:0!important;
}

/* Hide duplicate cart totals section */
.cart_totals,
.wc-proceed-to-checkout{
display:none !important;
}

/* Reduce top empty spacing */
.woocommerce{
margin-top:0 !important;
padding-top:0 !important;
}


/* NovaCore cart footer layout */
.aep-cart-actions,
.cart-actions-row{
display:flex !important;
align-items:center;
justify-content:space-between;
gap:15px;
flex-wrap:wrap;
}

.coupon,
.coupon-area{
display:flex !important;
gap:10px;
align-items:center;
}

.checkout-button,
.wc-forward{
min-width:220px;
}


/* Cart footer final layout */
.woocommerce-cart-form + .cart-collaterals,
.cart_totals{
display:none!important;
}

.woocommerce{
margin-top:0!important;
padding-top:0!important;
}

.aep-cart-summary-row,
.novacore-cart-summary-row{
display:flex!important;
justify-content:space-between!important;
align-items:center!important;
gap:15px!important;
flex-wrap:wrap!important;
}

.aep-final-cart-bar{
display:flex;justify-content:space-between;align-items:center;
margin:20px 0;padding:15px;border:1px solid #eee;border-radius:12px;
}
.aep-final-total{font-size:22px;font-weight:700}
.aep-final-actions .checkout-button{padding:12px 22px}


/* Final footer alignment */
.aep-final-cart-bar{
display:grid !important;
grid-template-columns: 1fr 1fr 1fr !important;
align-items:center !important;
}

.aep-final-total{
grid-column:1 !important;
text-align:right !important;
}

.aep-final-actions{
grid-column:2 !important;
text-align:center !important;
}

.aep-final-actions .checkout-button{
display:inline-block !important;
min-width:260px !important;
}

@media(max-width:768px){
.aep-final-cart-bar{
display:flex !important;
flex-direction:column !important;
gap:15px !important;
}
}


/* Coupon + totals footer polish */
.aep-final-cart-bar{
grid-template-columns:1fr 1fr 1fr!important;
}

.aep-final-cart-bar:before{
content:"مكان عرض الخصم بعد تطبيق القسيمة";
display:block;
font-size:14px;
opacity:.75;
}

.coupon{
display:flex!important;
align-items:center!important;
gap:10px!important;
flex-wrap:wrap!important;
}

.coupon input{
min-width:180px!important;
}

.aep-final-total{
font-size:18px!important;
line-height:1.8!important;
}



/* cleanup footer */
.aep-final-cart-bar:before,
.aep-coupon-note,
.coupon-note,
.aep-discount-placeholder{
display:none !important;
}

/* better footer alignment */
.aep-final-cart-bar{
align-items:center !important;
}



/* نقل ملخص الطلب النهائي لليسار */
.aep-final-cart-bar,
.aep-cart-footer{
display:flex !important;
align-items:center !important;
justify-content:space-between !important;
gap:20px !important;
}

.aep-cart-total,
.aep-final-total{
order:1 !important;
margin-left:auto !important;
}

.aep-checkout-btn,
.aep-proceed-checkout{
order:2 !important;
margin:0 auto !important;
}

/* مساحة لرسالة الخصم */
.aep-coupon-discount{
display:block !important;
min-height:24px !important;
font-weight:700 !important;
}

/* إظهار أي نص مخفي تحت القسيمة */
.woocommerce-message,
.coupon-success,
.aep-coupon-result{
display:block !important;
visibility:visible !important;
opacity:1 !important;
}


/* move total to left side */
.aep-final-total,
.aep-cart-total{
margin-right:auto !important;
margin-left:0 !important;
text-align:right !important;
}

/* center checkout button */
.aep-checkout-btn,
.aep-proceed-checkout{
margin:0 auto !important;
}

/* coupon message visible */
#coupon-error-notice,
.coupon-error-notice{
display:block !important;
visibility:visible !important;
min-height:28px !important;
margin-top:8px !important;
font-weight:600 !important;
}

/* area for discount amount */
.aep-coupon-discount{
display:block !important;
min-height:32px !important;
padding-top:6px !important;
font-weight:bold !important;
}
.aep-discount-row{
display:none!important;
min-height:0 !important;
padding:8px 0 !important;
font-weight:bold !important;
}


/* Orders page */
.aep-table,.aep-orders-table,table.aep-table{
width:100%!important;
border-collapse:collapse!important;
background:#fff!important;
}
.aep-table th,.aep-table td,
.aep-orders-table th,.aep-orders-table td{
padding:10px 8px!important;
text-align:center!important;
vertical-align:middle!important;
}
.aep-mini{
border-radius:12px!important;
padding:12px!important;
}
.aep-mini h4{font-size:13px!important;margin-bottom:6px!important}
.aep-mini p{font-size:20px!important;font-weight:700!important}

/* Order details */
.aep-order-details,
.aep-order-box{
background:#fff!important;
border-radius:12px!important;
padding:15px!important;
margin-bottom:12px!important;
}

.woocommerce table.shop_table,
.aep-table{
overflow:hidden!important;
border-radius:12px!important;
}

/* remove extra top spacing */
.aep-content,
.woocommerce{
margin-top:0!important;
padding-top:0!important;
}

.aep-order-summary,.aep-order-details{width:100%!important}
.aep-order-details table{width:100%!important;table-layout:fixed!important;max-width:100%!important}
.aep-order-details table td,.aep-order-details table th{font-size:13px!important;padding:5px 4px!important;box-sizing:border-box!important;vertical-align:middle!important;white-space:normal!important;overflow-wrap:anywhere!important}
.aep-order-details table th:nth-child(1),.aep-order-details table td:nth-child(1){width:28%!important;font-size:12.5px!important;line-height:1.3!important}
.aep-order-details table th:nth-child(2),.aep-order-details table td:nth-child(2){width:14%!important;white-space:normal!important}
.aep-order-details table th:nth-child(3),.aep-order-details table td:nth-child(3){width:14%!important}
.aep-order-details table th:nth-child(4),.aep-order-details table td:nth-child(4){width:9%!important}
.aep-order-details table th:nth-child(5),.aep-order-details table td:nth-child(5){width:16%!important}
.aep-order-details table th:nth-child(6),.aep-order-details table td:nth-child(6){width:19%!important;min-width:105px!important;white-space:nowrap!important}
.aep-order-detail-products{width:100%!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;overflow:visible!important}
.aep-order-detail-products th,.aep-order-detail-products td{font-size:12.5px!important;padding:5px 3px!important;box-sizing:border-box!important;vertical-align:middle!important;text-align:center!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.3!important}
.aep-order-detail-products th:nth-child(1),.aep-order-detail-products td:nth-child(1){width:auto!important;font-size:12px!important;line-height:1.3!important;text-align:right!important}
.aep-order-detail-products th:nth-child(2),.aep-order-detail-products td:nth-child(2){width:auto!important;white-space:normal!important}
.aep-order-detail-products th:nth-child(3),.aep-order-detail-products td:nth-child(3){width:auto!important}
.aep-order-detail-products th:nth-child(4),.aep-order-detail-products td:nth-child(4){width:auto!important}
.aep-order-detail-products th:nth-child(5),.aep-order-detail-products td:nth-child(5){width:auto!important;white-space:nowrap!important}
.aep-order-detail-products th:nth-child(6),.aep-order-detail-products td:nth-child(6){width:auto!important;white-space:nowrap!important}

.aep-total strong{font-size:42px!important}
.woocommerce-Price-currencySymbol{display:none!important}

.woocommerce-Price-currencySymbol{display:none!important;}

/* checkout layout final */
.aep-checkout-container{display:flex!important;gap:20px!important}
.aep-checkout-customer{flex:0 0 30%!important;max-width:30%!important}
.aep-checkout-products{flex:0 0 70%!important;max-width:70%!important}
.aep-checkout-products table{width:100%!important}
.aep-checkout-products th:nth-child(3),
.aep-checkout-products td:nth-child(3){width:90px!important}
.aep-checkout-products th:nth-child(2),
.aep-checkout-products td:nth-child(2){width:180px!important}
.aep-checkout-products input[type=number]{padding-left:4px!important;padding-right:4px!important}
.aep-checkout-products input.aep-qty{width:70px!important;min-width:70px!important}
.aep-checkout-products input.aep-checkout-price{width:140px!important;min-width:140px!important}




/* Clean checkout layout */
.aep-checkout-grid{
 display:grid !important;
 grid-template-columns:70% 30% !important;
 gap:15px !important;
}

.aep-checkout-products,
.checkout-products-section{
 flex:0 0 70% !important;
 max-width:70% !important;
}

.aep-checkout-customer,
.checkout-customer-section{
 flex:0 0 30% !important;
 max-width:30% !important;
}

.aep-table,
.aep-products-table,
.aep-checkout-table,
table.aep-order-products{
 width:100% !important;
 max-width:100% !important;
}

.aep-table input[type=number],
table.aep-order-products input[type=number]{
 margin:0 !important;
 padding:4px 6px !important;
 font-size:inherit !important;
}

.aep-qty{
 width:80px !important;
}

.aep-checkout-price{
 width:140px !important;
}


/* Checkout layout fixes */
.aep-total strong{
    font-size:26px!important;
    font-weight:700!important;
    line-height:1.3!important;
}
.woocommerce-Price-currencySymbol,
.currency,
.aep-currency{
    display:none!important;
}
.aep-checkout-products th:first-child,
.aep-checkout-products td:first-child{
    width:50px!important;
    min-width:50px!important;
    text-align:center!important;
}
.aep-checkout-price{
    width:110px!important;
    min-width:110px!important;
}
.aep-checkout-products,
.checkout-products-section{
    padding-left:0!important;
    padding-right:0!important;
}
.aep-checkout-products table,
table.aep-order-products{
    margin:0!important;
}


/* FINAL CHECKOUT LAYOUT TUNING */
.aep-checkout-grid{grid-template-columns:68% 32%!important;}
.aep-checkout-products table{width:100%!important;table-layout:fixed!important;}
.aep-checkout-products th,.aep-checkout-products td{padding:10px 6px!important;}
.aep-checkout-products th:nth-child(1),.aep-checkout-products td:nth-child(1){width:34px!important;}
.aep-checkout-products th:nth-child(2),.aep-checkout-products td:nth-child(2){width:78px!important;}
.aep-checkout-products th:nth-child(3),.aep-checkout-products td:nth-child(3){width:120px!important;}
.aep-checkout-products input[type=number]{padding-left:4px!important;padding-right:4px!important;}
.aep-total strong,.aep-summary-value,.aep-order-total-value{font-size:20px!important;font-weight:700!important;}
.aep-summary-row,.aep-summary-row label,.aep-summary-row span{font-size:20px!important;line-height:1.6!important;}
.woocommerce-Price-currencySymbol{display:none!important;}


/* USER REQUESTED FINAL LAYOUT */
.aep-checkout-grid{
    grid-template-columns:72% 28%!important;
}

.aep-checkout-products{
    padding-left:0!important;
    padding-right:0!important;
    margin:0!important;
}

.aep-checkout-products table{
    width:100%!important;
    table-layout:auto!important;
}

/* widen delete + total columns */
.aep-checkout-products th:first-child,
.aep-checkout-products td:first-child{
    width:60px!important;
    min-width:60px!important;
}

.aep-checkout-products th:nth-child(2),
.aep-checkout-products td:nth-child(2){
    width:110px!important;
    min-width:110px!important;
}

/* narrow price column */
.aep-checkout-products th:nth-child(3),
.aep-checkout-products td:nth-child(3){
    width:100px!important;
    min-width:100px!important;
}

.aep-checkout-products input[type=number]{
    max-width:90px!important;
    padding:2px 2px!important;
}

/* summary alignment */
.aep-summary-row,
.aep-total-row,
.aep-order-summary-row{
    display:flex!important;
    justify-content:space-between!important;
    align-items:center!important;
    gap:20px!important;
}

.aep-summary-row label,
.aep-summary-row span,
.aep-total-row label,
.aep-total-row span,
.aep-order-summary-row label,
.aep-order-summary-row span{
    font-size:28px!important;
    font-weight:600!important;
    line-height:1.5!important;
}

.woocommerce-Price-currencySymbol,
.currency,
.aep-currency{
display:none!important;
}


/* precise fixes requested */
.aep-checkout-grid{grid-template-columns:75% 25%!important;}

/* widen delete column and total column */
.aep-checkout-products th:first-child,
.aep-checkout-products td:first-child{width:70px!important;min-width:70px!important;padding-left:12px!important;padding-right:12px!important;}

.aep-checkout-products th:nth-child(2),
.aep-checkout-products td:nth-child(2){width:140px!important;min-width:140px!important;}

/* shrink price column */
.aep-checkout-products th:nth-child(3),
.aep-checkout-products td:nth-child(3){width:90px!important;min-width:90px!important;max-width:90px!important;}

/* remove side space inside number fields */
.aep-checkout-products input[type=number]{
max-width:72px!important;
padding:0 2px!important;
}

/* make summary labels same size as values */
.aep-summary-row *,
.aep-total-row *,
.aep-order-summary-row *{
font-size:22px!important;
font-weight:600!important;
line-height:1.4!important;
}

/* remove currency text */
.woocommerce-Price-currencySymbol,.currency,.aep-currency{display:none!important;}


/* FINAL CHECKOUT LAYOUT FIX */
.aep-agent-checkout-wrapper .aep-customer-col{flex:0 0 30%!important;max-width:30%!important;}
.aep-agent-checkout-wrapper .aep-products-col{flex:0 0 70%!important;max-width:70%!important;}

.aep-agent-checkout-wrapper table{width:100%!important;table-layout:fixed!important;}
.aep-agent-checkout-wrapper th:nth-child(1),
.aep-agent-checkout-wrapper td:nth-child(1){width:42px!important;} /* حذف */

.aep-agent-checkout-wrapper th:nth-child(2),
.aep-agent-checkout-wrapper td:nth-child(2){width:13%!important;} /* الاجمالي */

.aep-agent-checkout-wrapper th:nth-child(3),
.aep-agent-checkout-wrapper td:nth-child(3){width:18%!important;} /* السعر أصغر */

.aep-agent-checkout-wrapper input[type=number]{padding-left:6px!important;padding-right:6px!important;}

.aep-agent-checkout-wrapper .checkout-summary-row{
display:flex!important;
justify-content:space-between!important;
align-items:center!important;
font-size:28px!important;
font-weight:700!important;
padding:12px 0!important;
border-bottom:1px solid #ececec!important;
}

.aep-agent-checkout-wrapper .checkout-summary-row .label,
.aep-agent-checkout-wrapper .checkout-summary-row .value{
font-size:28px!important;
font-weight:700!important;
line-height:1.2!important;
}

.aep-agent-checkout-wrapper .checkout-summary-row:last-child{
border-bottom:none!important;
}

.aep-total{
display:flex!important;
justify-content:space-between!important;
align-items:center!important;
padding:12px 0!important;
border-bottom:1px solid #eee!important;
}
.aep-total span,
.aep-total strong{
font-size:18px!important;
font-weight:600!important;
line-height:1.4!important;
}

.aep-total,.checkout-summary-row{font-size:16px!important}
.aep-total .label,.aep-total .value,.checkout-summary-row .label,.checkout-summary-row .value{font-size:16px!important;font-weight:600!important}

/* Summary final polish */
.aep-total,.checkout-summary-row{
  font-size:15px!important;
}
.aep-total .label,.aep-total .value,
.checkout-summary-row .label,.checkout-summary-row .value{
  font-size:15px!important;
  font-weight:600!important;
}

.aep-total,.checkout-summary-row{font-size:14px!important}
.aep-total .label,.aep-total .value,
.checkout-summary-row .label,.checkout-summary-row .value{
font-size:14px!important;
font-weight:600!important;
}

.aep-discount-line span{display:flex;gap:6px;align-items:center}


/* Checkout summary compact */
.aep-final-total .aep-sum-line{
  font-size:15px!important;
  padding:8px 0!important;
  line-height:1.4!important;
}
.aep-final-total .aep-sum-line strong{
  font-size:15px!important;
}
.aep-final-total{
  gap:4px!important;
}

/* checkout bottom summary */
.aep-final-total{padding:14px 18px!important}
.aep-final-total .aep-sum-line{display:flex;justify-content:space-between;align-items:center;padding:6px 0!important;border-bottom:1px solid #f0f0f0;font-size:15px!important}
.aep-final-total .aep-sum-line span{font-size:15px!important;font-weight:600}
.aep-final-total .aep-sum-line strong{font-size:15px!important;font-weight:700;min-width:90px;text-align:left}

.aep-total{font-size:15px!important}.aep-total span{font-size:15px!important;font-weight:600}.aep-total strong{font-size:15px!important}.aep-final-total .aep-sum-line{padding:8px 0;display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #eee}.aep-final-total .aep-sum-line:last-child{border-bottom:none}

/* Checkout summary polish */
.aep-checkout-summary,.checkout-summary{font-size:15px}
.aep-checkout-summary .row,.checkout-summary-row{
display:flex;justify-content:space-between;align-items:center;
padding:10px 0;border-bottom:1px solid #ececec}
.aep-checkout-summary .label,.checkout-summary-row .label{
font-size:16px;font-weight:600}
.aep-checkout-summary .value,.checkout-summary-row .value{
font-size:18px;font-weight:700;direction:ltr}



/* FINAL CHECKOUT UI TWEAKS */
.aep-agent-checkout-wrap,
.aep-agent-checkout-wrapper{
margin-top:18px!important;
padding-top:0!important;
}
.entry-content>.aep-agent-checkout-wrap:first-child,
.entry-content>.aep-agent-checkout-wrapper:first-child{
margin-top:18px!important;
}
.aep-card>.aep-table{
margin-top:12px!important;
}
.aep-table th{
padding-top:16px!important;
padding-bottom:16px!important;
line-height:1.6!important;
vertical-align:middle!important;
}


/* Agent checkout UI polish */
.aep-agent-checkout-wrap{margin-top:18px!important;padding-top:0!important}
.aep-checkout-grid{margin-top:12px!important}
.aep-card>.aep-table:first-child{margin-top:10px!important}
.aep-table thead th,.aep-table tr:first-child th{
padding:14px 12px!important;
line-height:1.5!important;
vertical-align:middle!important;
}


/* Agent Orders UI */
.aep-orders-tools-side{display:flex!important;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}
.aep-orders-tools-side #aep-orders-search{flex:1;min-width:260px}
.aep-orders-length{display:flex;align-items:center;gap:8px}
#aep-agent-orders-table th,#aep-agent-orders-table td{padding:10px 8px!important;text-align:center;vertical-align:middle}
#aep-agent-orders-table th:nth-child(2),#aep-agent-orders-table td:nth-child(2){width:120px}
#aep-agent-orders-table th:nth-child(3),#aep-agent-orders-table td:nth-child(3){width:120px}
.aep-orders-filter-stats{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:14px!important}
.aep-orders-filter-stats>div{min-width:0!important}
@media(max-width:900px){.aep-orders-filter-stats{grid-template-columns:repeat(2,1fr)!important}}


/* Agent Orders Stage 1 UI tweaks */
.aep-agent-orders-page,
.aep-agent-orders-page .aep-card{direction:rtl!important;}
.aep-agent-orders-page table{margin-right:0!important;margin-left:auto!important;}
#aep-agent-orders-table th:nth-child(2),
#aep-agent-orders-table td:nth-child(2){width:90px!important;max-width:90px!important;}
#aep-agent-orders-table th:nth-child(3),
#aep-agent-orders-table td:nth-child(3){width:90px!important;max-width:90px!important;}
.aep-agent-orders-page select,
.aep-agent-orders-page input[type=text],
.aep-agent-orders-page input[type=search]{
min-height:38px!important;
height:38px!important;
text-align:center!important;
}
.aep-agent-orders-page #aep-orders-search{
width:260px!important;
min-width:260px!important;
max-width:260px!important;
flex:0 0 260px!important;
}
.aep-agent-orders-page .aep-orders-tools-side{
justify-content:flex-start!important;
gap:10px!important;
}
.aep-agent-orders-page .aep-orders-length{
order:2!important;
}
.aep-agent-orders-page #aep-orders-search{
order:1!important;
}


/* Agent Orders final compact layout */
.aep-agent-orders-page .aep-orders-tools-side{width:auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}
.aep-agent-orders-page .aep-orders-length{display:flex!important;align-items:center!important;gap:6px!important;width:auto!important}
.aep-agent-orders-page .aep-orders-length label{margin:0!important}
.aep-agent-orders-page #aep-orders-search{width:260px!important;flex:0 0 260px!important}
.aep-agent-orders-page .aep-filter-row select{text-align:center;text-align-last:center;height:34px}
.aep-agent-orders-page .aep-filter-row th:nth-child(4) select,
.aep-agent-orders-page .aep-filter-row th:nth-child(5) select{width:80px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),
.aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:90px!important;white-space:nowrap}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),
.aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:90px!important;white-space:nowrap}
#aep-pagination button{padding:4px 8px!important;min-width:auto!important;font-size:12px!important}
#aep-pagination span{font-size:13px!important}
.aep-orders-filter-stats span{font-size:22px!important;font-weight:700}


/* Agent Orders safer compact customer column */
.aep-agent-orders-page .aep-orders-tools-side{width:auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;flex-wrap:nowrap!important;margin:8px 0!important}
.aep-agent-orders-page .aep-orders-length{display:flex!important;align-items:center!important;gap:4px!important;width:auto!important;flex:0 0 auto!important;white-space:nowrap!important;order:1!important}
.aep-agent-orders-page .aep-orders-length label{display:inline-block!important;margin:0 0 0 4px!important;white-space:nowrap!important}
.aep-agent-orders-page #aep-per-page{width:64px!important;min-width:64px!important;max-width:64px!important;height:34px!important}
.aep-agent-orders-page #aep-orders-search{order:2!important;width:225px!important;min-width:225px!important;max-width:225px!important;flex:0 0 225px!important;height:34px!important;min-height:34px!important;padding:6px 8px!important}
.aep-agent-orders-page #aep-agent-orders-table{width:auto!important;min-width:640px!important;max-width:100%!important;table-layout:auto!important;border-collapse:collapse!important}
.aep-agent-orders-page #aep-agent-orders-table th,.aep-agent-orders-page #aep-agent-orders-table td{padding:5px 6px!important;font-size:12px!important;line-height:1.35!important;text-align:center!important;vertical-align:middle!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important}
.aep-agent-orders-page #aep-agent-orders-table th{font-size:11px!important;font-weight:700!important}
.aep-agent-orders-page #aep-agent-orders-table .aep-filter-row select{height:30px!important;min-height:30px!important;padding:3px 2px!important;font-size:11px!important;text-align:center!important;text-align-last:center!important;max-width:100%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(1),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(1){width:92px!important;max-width:92px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(2),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){width:130px!important;max-width:130px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(3),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(3){width:86px!important;max-width:86px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:82px!important;max-width:82px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:82px!important;max-width:82px!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(6),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(6){width:82px!important;max-width:82px!important}
.aep-agent-orders-page #aep-agent-orders-table .aep-filter-row th:nth-child(n+3) select{width:68px!important}
.aep-orders-filter-stats span>div{font-size:18px!important}


/* Agent Orders fit pass: keep filtered table inside content */
.aep-agent-orders-page{overflow-x:hidden!important}
.aep-agent-orders-page #aep-agent-orders-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important}
.aep-agent-orders-page #aep-agent-orders-table th,.aep-agent-orders-page #aep-agent-orders-table td{box-sizing:border-box!important;padding:4px 5px!important;font-size:11.5px!important;line-height:1.3!important;white-space:nowrap!important;text-align:center!important;vertical-align:middle!important;overflow:hidden!important;text-overflow:ellipsis!important}
.aep-agent-orders-page #aep-agent-orders-table th{font-size:11px!important;font-weight:700!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(1),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(1){width:14%!important;max-width:14%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(2),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){width:18%!important;max-width:18%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(3),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(3){width:13%!important;max-width:13%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:13%!important;max-width:13%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:12%!important;max-width:12%!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(6),.aep-agent-orders-page #aep-agent-orders-table td:nth-child(6){width:12%!important;max-width:12%!important}
.aep-agent-orders-page #aep-agent-orders-table .aep-filter-row select{width:100%!important;max-width:100%!important;height:28px!important;min-height:28px!important;padding:2px 4px!important;font-size:11px!important;box-sizing:border-box!important}
.aep-agent-orders-page .aep-orders-tools-side{max-width:100%!important;box-sizing:border-box!important}
.aep-agent-orders-page #aep-orders-search{width:225px!important;min-width:225px!important;max-width:225px!important;flex:0 0 225px!important}
.aep-agent-orders-page .aep-orders-filter-stats{max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important}
.aep-agent-orders-page .aep-orders-filter-stats>div{min-width:0!important;box-sizing:border-box!important}


/* Agent Orders stable order details */
.aep-agent-orders-page #aep-agent-orders-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(1),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(1){width:24%!important;max-width:24%!important;overflow:visible!important;text-overflow:clip!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(2),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(2){width:16%!important;max-width:16%!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(3),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(3){width:13%!important;max-width:13%!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(4),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(4){width:13%!important;max-width:13%!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(5),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(5){width:12%!important;max-width:12%!important}
.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(6),.aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(6){width:12%!important;max-width:12%!important}
.aep-agent-orders-page #aep-agent-orders-table tr.aep-order-expanded td:first-child{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;vertical-align:top!important;padding:4px!important}
.aep-agent-orders-page #aep-agent-orders-table tr.aep-order-expanded td:not(:first-child){vertical-align:middle!important}
.aep-agent-orders-page .aep-order-details-box{display:none;box-sizing:border-box!important;width:100%!important;max-width:100%!important;font-size:10.5px!important;line-height:1.25!important;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
.aep-agent-orders-page .aep-order-details-box strong{font-size:11px!important;line-height:1.2!important}
.aep-agent-orders-page .aep-order-details-box div{font-size:10.5px!important;line-height:1.25!important;padding:2px 0!important}
.aep-agent-orders-page .aep-order-expanded .aep-order-view{display:inline-block!important;margin-bottom:3px!important}




/* Agent Orders wrapping and details link */
.aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.25!important}
.aep-agent-orders-page #aep-agent-orders-table th:nth-child(2){white-space:nowrap!important}
.aep-agent-orders-page #aep-agent-orders-table .aep-order-details-box strong,
.aep-agent-orders-page #aep-agent-orders-table .aep-order-details-box div{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;text-overflow:clip!important;overflow:visible!important}
.aep-agent-orders-page .aep-order-details-link{display:inline-flex!important;align-items:center!important;justify-content:center!important;margin-top:6px!important;padding:4px 12px!important;border-radius:6px!important;background:#2563eb!important;color:#fff!important;text-decoration:none!important;font-size:11px!important;font-weight:700!important;line-height:1.2!important}
.aep-agent-orders-page .aep-order-details-link:hover{background:#1d4ed8!important;color:#fff!important}


/* Agent order details page polish */
.aep-content .aep-order-detail-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;margin-bottom:18px!important}
.aep-content .aep-order-detail-head h2{margin:0!important;flex:1!important;text-align:center!important}
.aep-back-orders-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:9px 14px!important;border-radius:8px!important;background:#111827!important;color:#fff!important;text-decoration:none!important;font-size:14px!important;font-weight:700!important;white-space:nowrap!important}
.aep-back-orders-btn:hover{background:#2563eb!important;color:#fff!important}
.aep-order-detail-title{text-align:center!important;margin:8px 0 18px!important;font-size:26px!important;line-height:1.3!important}
.aep-order-customer-card{max-width:760px!important;margin:0 auto 22px!important;padding:22px 26px!important;text-align:center!important;box-sizing:border-box!important}
.aep-order-customer-card strong{display:block!important;font-size:18px!important;line-height:1.25!important;margin-bottom:5px!important;color:#3f3f46!important}
.aep-order-customer-card span{display:block!important;font-size:15px!important;line-height:1.45!important;font-weight:700!important;color:#1f2937!important;overflow-wrap:anywhere!important}
.aep-customer-main{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;margin-bottom:18px!important}
.aep-customer-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;margin:0 auto 18px!important;max-width:520px!important}
.aep-customer-wide,.aep-customer-status{max-width:620px!important;margin:0 auto 16px!important;text-align:center!important}
.aep-customer-status{margin-bottom:0!important}
@media(max-width:700px){.aep-content .aep-order-detail-head{justify-content:center!important}.aep-content .aep-order-detail-head h2{flex:0 0 100%!important}.aep-customer-main,.aep-customer-grid{grid-template-columns:1fr!important}.aep-order-customer-card{padding:18px 14px!important}}



/* Agent order details products table: source-owned column structure */
.aep-order-detail-products col.aep-col-product{width:33%!important}
.aep-order-detail-products col.aep-col-original{width:13%!important}
.aep-order-detail-products col.aep-col-sell{width:13%!important}
.aep-order-detail-products col.aep-col-qty{width:7%!important}
.aep-order-detail-products col.aep-col-total{width:14%!important}
.aep-order-detail-products col.aep-col-commission{width:20%!important}
.aep-order-detail-products thead th{height:44px!important;padding-top:7px!important;padding-bottom:7px!important;vertical-align:middle!important;line-height:1.15!important}
.aep-order-detail-products th span{display:block!important;line-height:1.15!important}
.aep-order-detail-products .aep-cell-product{text-align:right!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
.aep-order-detail-products td.aep-cell-product{font-size:12px!important}
.aep-order-detail-products .aep-cell-qty{text-align:center!important;white-space:nowrap!important}
.aep-order-detail-products .aep-cell-original,
.aep-order-detail-products .aep-cell-sell,
.aep-order-detail-products .aep-cell-total,
.aep-order-detail-products .aep-cell-commission{text-align:center!important;white-space:nowrap!important}

/* NovaCore Stage 1: keep agent checkout price input inside its column */
.aep-table .aep-checkout-price,
.aep-checkout-products input.aep-checkout-price,
.aep-agent-checkout-wrap input.aep-checkout-price,
.aep-agent-checkout-wrapper input.aep-checkout-price{
    width:88px!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    text-align:center!important;
    padding-left:4px!important;
    padding-right:4px!important;
}
.aep-table th:nth-child(3),
.aep-table td:nth-child(3){
    width:14%!important;
}
@media(max-width:768px){
    .aep-table .aep-checkout-price,
    .aep-agent-checkout-wrap input.aep-checkout-price{
        width:76px!important;
        font-size:13px!important;
    }
    .aep-table th,.aep-table td{
        padding-left:2px!important;
        padding-right:2px!important;
    }
}


/* NovaCore Stage 1: Mini Cart buttons visible */
.widget_shopping_cart_content .woocommerce-mini-cart__buttons,
.widget_shopping_cart_content .buttons,
.woocommerce-mini-cart__buttons,
.aep-mini-cart-buttons{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    gap:8px!important;
    flex-wrap:wrap!important;
    margin-top:12px!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button,
.widget_shopping_cart_content .wc-forward,
.woocommerce-mini-cart__buttons .button,
.aep-mini-cart-buttons .button{
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    min-width:auto!important;
    flex:1 1 120px!important;
    justify-content:center!important;
    align-items:center!important;
    white-space:nowrap!important;
}

.aep-order-page .aep-products-table th{height:42px!important;padding-top:8px!important;padding-bottom:8px!important;vertical-align:middle!important}
.aep-order-page .aep-products-table td:first-child{text-align:right!important}
.aep-order-page .aep-products-table td:first-child select{text-align:right!important;font-size:12.5px!important}
.aep-order-page .aep-products-table .aep-remove-row,
.aep-order-page .aep-products-table button.aep-remove-row{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:26px!important;height:26px!important;min-width:26px!important;padding:0!important;margin:0 auto!important;line-height:1!important;text-align:center!important}
.aep-order-page .aep-products-table td:nth-child(6){text-align:center!important;vertical-align:middle!important}

.aep-order-detail-products th{height:42px!important;padding-top:8px!important;padding-bottom:8px!important;vertical-align:middle!important}
.aep-order-detail-products th:nth-child(2){line-height:1.15!important;white-space:normal!important}
.aep-order-detail-products td:first-child{text-align:right!important;overflow-wrap:anywhere!important}

/* Fast UI pass: compact Mini Cart and keep actions visible */
.widget_shopping_cart_content .aep-profit-preview,
.widget_shopping_cart_content .aep-original-price-line,
.widget_shopping_cart_content .commission-box,
.widget_shopping_cart_content .profit-box{
    display:none!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item,
.woocommerce-mini-cart .woocommerce-mini-cart-item{
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr) auto!important;
    align-items:center!important;
    column-gap:8px!important;
    padding:8px 0!important;
    overflow:visible!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove),
.woocommerce-mini-cart .woocommerce-mini-cart-item a:not(.remove){
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.25!important;
    font-size:13px!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item img,
.woocommerce-mini-cart .woocommerce-mini-cart-item img{
    width:42px!important;
    height:42px!important;
    object-fit:cover!important;
    margin:0!important;
}
.widget_shopping_cart_content .aep-mini-cart-compact-qty,
.woocommerce-mini-cart .aep-mini-cart-compact-qty{
    font-size:12px!important;
    white-space:nowrap!important;
    color:#374151!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__total,
.woocommerce-mini-cart__total{
    margin:10px 0 6px!important;
    padding-top:8px!important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons,
.woocommerce-mini-cart__buttons,
.aep-mini-cart-buttons{
    position:relative!important;
    z-index:5!important;
    display:flex!important;
    clear:both!important;
}

/* Agent checkout coupon row: hidden unless a real discount exists */
.aep-agent-checkout-wrap .aep-discount-row[style*="flex"]{display:flex!important}
.aep-agent-checkout-wrap .aep-remove-coupon{font-size:12px!important;margin-right:8px!important;color:#dc2626!important;text-decoration:none!important}

/* NovaCore restored FINAL V2: single order page table (/agent-order-details/?order_id=XXXX)
   Overrides old broad .aep-card span rules and keeps all columns visible. */
body table.aep-order-detail-products,
body .aep-content table.aep-order-detail-products,
body .aep-card table.aep-order-detail-products{
  width:100%!important;
  max-width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  direction:rtl!important;
  overflow:visible!important;
}
body table.aep-order-detail-products col.aep-col-product{width:42%!important}
body table.aep-order-detail-products col.aep-col-original{width:12%!important}
body table.aep-order-detail-products col.aep-col-sell{width:12%!important}
body table.aep-order-detail-products col.aep-col-qty{width:7%!important}
body table.aep-order-detail-products col.aep-col-total{width:13%!important}
body table.aep-order-detail-products col.aep-col-commission{width:14%!important}
body table.aep-order-detail-products th,
body table.aep-order-detail-products td,
body .aep-card table.aep-order-detail-products th,
body .aep-card table.aep-order-detail-products td{
  box-sizing:border-box!important;
  padding:6px 3px!important;
  font-size:12px!important;
  line-height:1.25!important;
  text-align:center!important;
  vertical-align:middle!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  min-width:0!important;
  max-width:100%!important;
}
body table.aep-order-detail-products thead th,
body .aep-card table.aep-order-detail-products thead th{
  height:48px!important;
  padding:7px 3px!important;
  font-size:12px!important;
  line-height:1.18!important;
  font-weight:800!important;
}
body table.aep-order-detail-products thead th span,
body .aep-card table.aep-order-detail-products thead th span,
body table.aep-order-detail-products th.aep-cell-original span,
body table.aep-order-detail-products th.aep-cell-sell span{
  display:block!important;
  font-size:12px!important;
  line-height:1.18!important;
  margin:0!important;
  padding:0!important;
  white-space:nowrap!important;
}
body table.aep-order-detail-products td.aep-cell-product,
body table.aep-order-detail-products th.aep-cell-product{
  text-align:right!important;
  font-size:11.5px!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
body table.aep-order-detail-products td.aep-cell-qty{font-size:12px!important;white-space:nowrap!important}
body table.aep-order-detail-products td.aep-cell-total,
body table.aep-order-detail-products td.aep-cell-commission{font-size:11.5px!important;white-space:nowrap!important}

/* Agent checkout coupon: professional compact box and no zero discount row */
.aep-agent-checkout-wrap .aep-coupon-box{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 0!important;
  border-bottom:1px solid #e9e9e9!important;
  flex-wrap:wrap!important;
}
.aep-agent-checkout-wrap .aep-coupon-code{
  width:160px!important;
  max-width:100%!important;
  height:38px!important;
  border:1px solid #d7dde5!important;
  border-radius:10px!important;
  padding:6px 10px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
.aep-agent-checkout-wrap .aep-apply-coupon{
  height:38px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  border:0!important;
  cursor:pointer!important;
}
.aep-agent-checkout-wrap .aep-coupon-msg{
  font-size:12px!important;
  font-weight:700!important;
  color:#475569!important;
}
.aep-agent-checkout-wrap .aep-total.aep-discount-row,
.aep-total.aep-discount-row{
  display:none!important;
}
.aep-agent-checkout-wrap .aep-total.aep-discount-row.aep-has-discount,
.aep-total.aep-discount-row.aep-has-discount{
  display:flex!important;
}
.aep-agent-checkout-wrap .aep-remove-coupon{
  font-size:12px!important;
  margin-right:8px!important;
  color:#dc2626!important;
  text-decoration:none!important;
}


/* NovaCore registration validation */
.aep-field-invalid{
  border-color:#dc2626!important;
  box-shadow:0 0 0 2px rgba(220,38,38,.12)!important;
}
.aep-inline-error{
  color:#b91c1c;
  font-size:13px;
  font-weight:700;
  margin-top:-4px;
  text-align:right;
}

/* NovaCore precise marketer layout - sidebar stays right, content expands gently left */
body .entry-content:has(.aep-dashboard),
body .site-main:has(.aep-dashboard),
body .content-area:has(.aep-dashboard),
body .inside-article:has(.aep-dashboard),
body .woocommerce:has(.aep-dashboard),
body .elementor-widget-container:has(.aep-dashboard),
body .elementor-container:has(.aep-dashboard),
body .elementor-section:has(.aep-dashboard){
  width:100vw!important;
  max-width:100vw!important;
  margin-right:calc(50% - 50vw)!important;
  margin-left:calc(50% - 50vw)!important;
  padding-right:0!important;
  padding-left:0!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
@media (min-width:1200px){
  html,body{overflow-x:hidden!important;}
  body .aep-dashboard{
    direction:rtl!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:14px!important;
    width:min(1400px, calc(100vw - 56px))!important;
    max-width:calc(100vw - 56px)!important;
    margin-right:16px!important;
    margin-left:auto!important;
    margin-top:0!important;
    margin-bottom:0!important;
    padding:0 0 0 10px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  body .aep-dashboard:has(.novacore-agent-store-wrap),
  body .aep-dashboard:has(.novacore-store-settings-page){
    width:min(1500px, calc(100vw - 52px))!important;
    max-width:calc(100vw - 52px)!important;
    margin-right:16px!important;
    margin-left:auto!important;
  }
  body .aep-dashboard .aep-sidebar{
    order:0!important;
    flex:0 0 250px!important;
    width:250px!important;
    min-width:250px!important;
    max-width:250px!important;
    margin:0!important;
    box-sizing:border-box!important;
    position:sticky!important;
    top:18px!important;
  }
  body .aep-dashboard .aep-content,
  body .aep-dashboard .aep-main-content{
    order:1!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:calc(100% - 264px)!important;
    margin:0!important;
    padding:0 0 0 8px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
}
@media (min-width:1025px) and (max-width:1199px){
  body .aep-dashboard{
    direction:rtl!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:12px!important;
    width:calc(100vw - 34px)!important;
    max-width:calc(100vw - 34px)!important;
    margin-right:10px!important;
    margin-left:auto!important;
    padding:0 0 0 8px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  body .aep-dashboard .aep-sidebar{
    order:0!important;
    flex:0 0 235px!important;
    width:235px!important;
    min-width:235px!important;
    max-width:235px!important;
    margin:0!important;
  }
  body .aep-dashboard .aep-content,
  body .aep-dashboard .aep-main-content{
    order:1!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:calc(100% - 247px)!important;
    margin:0!important;
    padding-left:6px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
}
@media (min-width:1025px){
  body .aep-dashboard .aep-card,
  body .aep-dashboard .aep-box,
  body .aep-dashboard .aep-auth-box,
  body .aep-dashboard .aep-order-page,
  body .aep-dashboard .aep-dynamic-panel,
  body .aep-dashboard .aep-withdraw-page,
  body .aep-dashboard .aep-account-page,
  body .aep-dashboard .aep-stats-page,
  body .aep-dashboard .aep-agent-orders-page{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  body .aep-dashboard .aep-card,
  body .aep-dashboard .aep-box,
  body .aep-dashboard .aep-panel{
    overflow-x:visible!important;
  }
  body .aep-dashboard table,
  body .aep-dashboard .aep-table,
  body .aep-dashboard .aep-products-table,
  body .aep-dashboard #aep-agent-orders-table,
  body .aep-dashboard #aepWithdrawTable,
  body .aep-dashboard #aepStatsTable,
  body .aep-dashboard .widefat{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
    box-sizing:border-box!important;
  }
  body .aep-dashboard th,
  body .aep-dashboard td{
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    white-space:normal!important;
  }
  body .aep-agent-orders-page #aep-agent-orders-table{
    table-layout:fixed!important;
  }
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(1),
  body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(1){width:30%!important;max-width:30%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(2),
  body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){width:17%!important;max-width:17%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(3),
  body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(3){width:16%!important;max-width:16%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),
  body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:18%!important;max-width:18%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),
  body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:19%!important;max-width:19%!important;}
  body .aep-agent-orders-page .aep-order-details-box{
    font-size:13px!important;
    line-height:1.55!important;
  }
  body .aep-order-page .aep-products-table,
  body .aep-order-page table{table-layout:fixed!important;}
  body .aep-order-page .aep-products-table th:nth-child(1),
  body .aep-order-page .aep-products-table td:nth-child(1){width:39%!important;}
  body .aep-order-page .aep-products-table th:nth-child(2),
  body .aep-order-page .aep-products-table td:nth-child(2){width:15%!important;}
  body .aep-order-page .aep-products-table th:nth-child(3),
  body .aep-order-page .aep-products-table td:nth-child(3){width:15%!important;}
  body .aep-order-page .aep-products-table th:nth-child(4),
  body .aep-order-page .aep-products-table td:nth-child(4){width:9%!important;}
  body .aep-order-page .aep-products-table th:nth-child(5),
  body .aep-order-page .aep-products-table td:nth-child(5){width:13%!important;}
  body .aep-order-page .aep-products-table th:nth-child(6),
  body .aep-order-page .aep-products-table td:nth-child(6){width:9%!important;}
  body .aep-dashboard .aep-stats,
  body .aep-dashboard #aepDynamicStats,
  body .aep-dashboard #aepFixedStats{
    display:grid!important;
    grid-template-columns:repeat(auto-fit, minmax(170px, 1fr))!important;
    gap:9px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }
}
@media (max-width:1024px){
  body .aep-dashboard{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    flex-direction:column!important;
  }
  body .aep-dashboard .aep-sidebar,
  body .aep-dashboard .aep-content,
  body .aep-dashboard .aep-main-content{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    flex:0 1 auto!important;
    margin:0!important;
  }
  body .aep-dashboard .aep-table,
  body .aep-dashboard .aep-products-table{
    display:block!important;
    overflow-x:auto!important;
  }
  body .aep-agent-orders-page .aep-orders-filter-stats,
  body .aep-agent-orders-page .aep-orders-fixed-stats{
    display:grid!important;
    grid-template-columns:repeat(2, minmax(0, 1fr))!important;
    gap:8px!important;
    width:100%!important;
  }
}
/* End NovaCore precise marketer layout */

/* NovaCore agent shipping rates page */
.aep-shipping-rates-card{
  padding:22px!important;
  overflow:hidden;
}
.aep-shipping-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.aep-shipping-head h2{
  margin:0 0 6px!important;
  font-size:30px!important;
  font-weight:800!important;
}
.aep-shipping-head p{
  margin:0!important;
  color:#667085;
  font-weight:700;
}
.aep-shipping-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(92px,1fr));
  gap:8px;
  min-width:430px;
}
.aep-ship-stat{
  padding:10px 12px;
  border-radius:16px;
  background:#f4f7ff;
  border:1px solid #d9e4ff;
  text-align:center;
}
.aep-ship-stat span{
  display:block;
  color:#667085;
  font-size:12px;
  font-weight:800;
  margin-bottom:5px;
  white-space:nowrap;
}
.aep-ship-stat strong{
  display:block;
  font-size:22px;
  line-height:1.1;
  color:#0f172a;
}
.aep-shipping-tools{
  display:grid;
  grid-template-columns:165px 190px minmax(220px,1fr) 118px;
  gap:10px;
  margin:16px 0 18px;
  align-items:center;
}
.aep-shipping-tools select,
.aep-shipping-tools input{
  width:100%;
  height:48px;
  border:1px solid #d0d7de;
  border-radius:14px;
  padding:0 14px;
  font-size:15px;
  font-weight:700;
  background:#fff;
  box-sizing:border-box;
}
.aep-shipping-tools button{
  height:48px;
  border:0;
  border-radius:14px;
  background:#0f172a;
  color:#fff;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.aep-shipping-empty{
  padding:14px;
  border-radius:14px;
  background:#fff7ed;
  color:#9a3412;
  font-weight:800;
  text-align:center;
  margin-bottom:14px;
}
.aep-shipping-table-wrap{
  width:100%;
  overflow-x:auto;
}
.aep-shipping-table{
  width:100%;
  table-layout:fixed;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.aep-shipping-table th{
  background:#f8fafc!important;
  font-size:15px!important;
  padding:14px 10px!important;
  cursor:pointer;
  user-select:none;
}
.aep-shipping-table td{
  padding:14px 10px!important;
  font-size:15px!important;
  font-weight:700;
  vertical-align:middle;
}
.aep-shipping-table th:nth-child(1),
.aep-shipping-table td:nth-child(1){width:18%;}
.aep-shipping-table th:nth-child(2),
.aep-shipping-table td:nth-child(2){width:36%;}
.aep-shipping-table th:nth-child(3),
.aep-shipping-table td:nth-child(3){width:22%;}
.aep-shipping-table th:nth-child(4),
.aep-shipping-table td:nth-child(4){width:16%;}
.aep-shipping-table td:nth-child(2){word-break:break-word;}
.aep-shipping-table td:nth-child(3),
.aep-shipping-table td:nth-child(4){text-align:center;}
.aep-shipping-table td:nth-child(3) strong,
.aep-shipping-table td:nth-child(4) strong{
  display:inline-block;
  min-width:58px;
  padding:7px 11px;
  border-radius:999px;
  background:#eef2ff;
}
.aep-sort-mark{font-size:12px;color:#64748b;margin-inline-start:4px;}
@media (max-width:980px){
  .aep-shipping-head{display:block;text-align:center;}
  .aep-shipping-stats{min-width:0;margin-top:14px;}
}
@media (max-width:760px){
  .aep-shipping-rates-card{padding:14px!important;}
  .aep-shipping-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  .aep-shipping-tools{grid-template-columns:1fr;}
  .aep-shipping-table-wrap{overflow:visible;}
  .aep-shipping-table,
  .aep-shipping-table thead,
  .aep-shipping-table tbody,
  .aep-shipping-table tr,
  .aep-shipping-table td{
    display:block!important;
    width:100%!important;
  }
  .aep-shipping-table thead{display:none!important;}
  .aep-shipping-table tr{
    margin-bottom:12px;
    border:1px solid #e5e7eb;
    border-radius:16px;
    overflow:hidden;
    background:#fff;
  }
  .aep-shipping-table td{
    display:flex!important;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    border-bottom:1px solid #eef2f7;
    white-space:normal!important;
    min-width:0!important;
    text-align:inherit!important;
  }
  .aep-shipping-table td:last-child{border-bottom:0;}
  .aep-shipping-table td:before{
    content:attr(data-label);
    color:#64748b;
    font-weight:800;
  }
}

/* Agent dashboard/reports compact final */
.aep-agent-home-pro .aep-agent-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;background:linear-gradient(135deg,#f8fbff,#eef4ff);border:1px solid #dbe6ff;border-radius:18px;padding:16px 20px}
.aep-agent-home-pro .aep-agent-hero h2,.aep-agent-reports-page h2{margin:0;font-size:32px;font-weight:900;color:#07142b}
.aep-agent-home-pro .aep-agent-hero p,.aep-muted{display:none!important}
.aep-agent-rate{background:#0f172a;color:#fff;border-radius:16px;padding:13px 22px;min-width:130px;text-align:center}.aep-agent-rate span{display:block;font-weight:800;color:#cbd5e1;font-size:13px}.aep-agent-rate strong{display:block;font-size:30px;line-height:1.15}
.aep-dashboard-grid{display:grid;gap:12px;margin:14px 0}.aep-agent-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.aep-agent-orders-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.aep-compact-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.aep-admin-kpi{background:linear-gradient(135deg,#234bd1,#101b3d);border-radius:15px;padding:13px;color:#fff;min-height:86px;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.aep-admin-kpi h4{margin:0 0 8px;font-size:15px;font-weight:900;line-height:1.3}.aep-admin-kpi strong{display:block;font-size:27px;font-weight:900;line-height:1.15}.aep-admin-kpi strong span{display:block;font-size:12px;margin-top:3px;opacity:.9}.aep-admin-kpi.green{background:linear-gradient(135deg,#15a46a,#0d3b2b)}.aep-admin-kpi.orange{background:linear-gradient(135deg,#f59e0b,#7c2d12)}.aep-admin-kpi.red{background:linear-gradient(135deg,#ef4444,#7f1d1d)}.aep-admin-kpi.light{background:#fff;color:#0f172a;border:1px solid #dbe6ff}.aep-admin-kpi.blue{background:linear-gradient(135deg,#2355dc,#101b3d)}
.aep-agent-home-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.aep-mini-panel{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:16px;overflow:auto}.aep-mini-panel h3{margin-top:0;text-align:center}.aep-compact-table th,.aep-compact-table td{font-size:13px!important;padding:8px!important}.aep-agent-quick-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:18px}.aep-agent-quick-actions .aep-btn{min-width:170px;text-align:center}
.aep-agent-reports-page{overflow-x:auto}.aep-agent-reports-page h3{font-size:22px!important;margin:26px 0 14px!important}.aep-card form.aep-report-filters,.aep-agent-reports-page form.aep-report-filters{display:grid!important;grid-template-columns:repeat(4,minmax(145px,1fr))!important;gap:10px!important;align-items:center!important;margin:14px 0!important;padding:12px!important;background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px}.aep-agent-reports-page .aep-report-filters select,.aep-agent-reports-page .aep-report-filters input{height:42px!important;min-height:42px!important;border-radius:12px!important;border:1px solid #cbd5e1!important;padding:0 10px!important;font-weight:700!important;min-width:0!important;font-size:13.5px!important}.aep-agent-reports-page .aep-report-filters .aep-btn{height:42px!important;min-height:42px!important;padding:0 14px!important;font-size:14px!important;border-radius:12px!important;display:flex;align-items:center;justify-content:center}.aep-report-tools{margin:12px 0}.aep-report-tools input{width:100%;height:42px!important;min-height:42px!important;border:1px solid #cbd5e1;border-radius:14px;padding:0 14px;font-weight:700}.aep-agent-reports-page .aep-compact-kpis{gap:10px!important;margin:12px 0!important}.aep-agent-reports-page .aep-compact-kpis .aep-admin-kpi{min-height:68px!important;padding:10px 12px!important;border-radius:14px!important}.aep-agent-reports-page .aep-admin-kpi h4{font-size:13px!important;margin-bottom:6px!important;line-height:1.25!important}.aep-agent-reports-page .aep-admin-kpi strong{font-size:23px!important;line-height:1.1!important}.aep-agent-reports-page .aep-admin-kpi strong span{font-size:15px!important;margin-top:5px!important;line-height:1.2!important}.aep-report-table{table-layout:fixed!important;margin-bottom:24px;width:100%!important}.aep-agent-reports-page .aep-report-table th,.aep-agent-reports-page .aep-report-table td{white-space:normal!important;font-size:12.5px!important;padding:8px 6px!important;text-align:center!important;vertical-align:middle!important;line-height:1.45!important}.aep-report-table .aep-report-column-filters input{height:32px!important;min-height:32px!important;border:1px solid #cbd5e1!important;border-radius:10px!important;padding:0 7px!important;font-size:11.5px!important;font-weight:700!important;background:#fff!important}.aep-report-products th:nth-child(1),.aep-report-products td:nth-child(1){width:30%!important;text-align:right!important}.aep-report-products th:nth-child(2),.aep-report-products td:nth-child(2){width:15%!important}.aep-report-products th:nth-child(3),.aep-report-products td:nth-child(3){width:17%!important}.aep-report-products th:nth-child(4),.aep-report-products td:nth-child(4){width:18%!important}.aep-report-products th:nth-child(5),.aep-report-products td:nth-child(5){width:20%!important}.aep-report-traders th:nth-child(1),.aep-report-traders td:nth-child(1){width:26%!important;text-align:right!important}.aep-report-traders th:nth-child(2),.aep-report-traders td:nth-child(2){width:18%!important}.aep-report-traders th:nth-child(3),.aep-report-traders td:nth-child(3){width:26%!important}.aep-report-traders th:nth-child(4),.aep-report-traders td:nth-child(4){width:30%!important}.aep-product-wrap,.aep-report-table td:nth-child(3){overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.45!important}.aep-agent-reports-page .aep-stacked-cell{line-height:1.45!important;text-align:right!important}.aep-agent-reports-page .aep-stacked-cell span{display:block!important;white-space:normal!important;font-size:12.3px!important;line-height:1.45!important;margin:1px 0!important}.aep-agent-reports-page .aep-report-table tfoot th{background:#f8fafc!important;font-weight:900!important;font-size:12.5px!important}
@media(max-width:1100px){.aep-card form.aep-report-filters,.aep-agent-reports-page form.aep-report-filters{grid-template-columns:repeat(2,minmax(140px,1fr))!important}.aep-compact-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.aep-agent-main-grid,.aep-agent-orders-grid,.aep-agent-home-columns{grid-template-columns:1fr 1fr}.aep-agent-home-pro .aep-agent-hero{display:block;text-align:center}.aep-agent-rate{margin:14px auto 0}.aep-admin-kpi{min-height:78px}.aep-admin-kpi strong{font-size:23px}.aep-agent-reports-page .aep-report-table{min-width:760px!important}}
@media(max-width:560px){.aep-agent-main-grid,.aep-agent-orders-grid,.aep-agent-home-columns,.aep-compact-kpis{grid-template-columns:1fr}.aep-card form.aep-report-filters,.aep-agent-reports-page form.aep-report-filters{grid-template-columns:1fr!important}.aep-agent-home-pro .aep-agent-hero h2,.aep-agent-reports-page h2{font-size:26px}.aep-agent-quick-actions .aep-btn{width:100%;text-align:center}.aep-report-table th,.aep-report-table td{font-size:12px!important;padding:7px!important}.aep-report-table td:first-child,.aep-report-table th:first-child{min-width:150px}.aep-agent-reports-page .aep-report-table{min-width:720px!important}}


/* NovaCore final safety: cart/mini-cart/store action layout */
body:not(.logged-in) .aep-cart-cards-modern,
body:not(.logged-in) .aep-profit-preview,
body:not(.logged-in) .aep-original-price-line{display:none!important}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons.buttons:nth-of-type(n+2),
.widget_shopping_cart_content .aep-mini-cart-buttons:nth-of-type(n+2){display:none!important}
.novacore-store-tools-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%!important;align-items:stretch!important}
.novacore-store-tools-row .button{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:100%!important;white-space:nowrap!important}
.novacore-store-actions-box{width:100%!important;display:flex!important;flex-direction:column!important;gap:8px!important;align-items:stretch!important}
.novacore-store-actions-box .novacore-store-action{width:100%!important;text-align:center!important}
.novacore-store-actions-box .novacore-store-action .button{width:100%!important;display:block!important}
@media(max-width:480px){.novacore-store-tools-row{grid-template-columns:1fr!important}}





/* NovaCore targeted polish: desktop readability, create order mobile cards, mobile agent menu */
@media (min-width:1025px){
  body .aep-dashboard .aep-table th,
  body .aep-dashboard .aep-table td,
  body .aep-dashboard table th,
  body .aep-dashboard table td{
    font-size:15px!important;
    line-height:1.55!important;
  }
  body .aep-dashboard .aep-table th,
  body .aep-dashboard table th{font-size:14px!important;font-weight:900!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th,
  body .aep-agent-orders-page #aep-agent-orders-table td{font-size:15px!important;padding:9px 8px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th{font-size:14px!important;}
  body .aep-agent-orders-page .aep-order-details-box,
  body .aep-agent-orders-page .aep-order-details-box div{font-size:14px!important;line-height:1.6!important;}
  body .aep-agent-orders-page .aep-order-details-box strong{font-size:14.5px!important;}
  body .aep-agent-reports-page .aep-report-table th,
  body .aep-agent-reports-page .aep-report-table td{font-size:14px!important;line-height:1.55!important;padding:10px 8px!important;}
  body .aep-agent-reports-page .aep-stacked-cell span{font-size:13.8px!important;line-height:1.5!important;}
  body .aep-agent-reports-page .aep-report-column-filters input{font-size:13px!important;height:36px!important;}
  body .aep-order-detail-products th,
  body .aep-order-detail-products td{font-size:15px!important;padding:10px 9px!important;line-height:1.55!important;}
  body .aep-order-customer-card,
  body .aep-order-customer-card *{font-size:15px!important;line-height:1.65!important;}
  body .aep-dashboard .aep-admin-kpi h4,
  body .aep-dashboard .aep-stat-card h3{font-size:16px!important;line-height:1.35!important;}
  body .aep-dashboard .aep-admin-kpi strong,
  body .aep-dashboard .aep-stat-card strong,
  body .aep-dashboard .aep-value{font-size:28px!important;line-height:1.2!important;}
}

.aep-mobile-menu-toggle{display:none;}
.aep-create-summary-bar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:12px!important;
  margin:14px 0 10px!important;
  flex-wrap:wrap!important;
}
.aep-create-summary-bar>div{
  min-width:170px;
  padding:10px 14px;
  border:1px solid #dbe6ff;
  border-radius:14px;
  background:#f8fbff;
  text-align:center;
}
.aep-create-summary-bar span{display:block;color:#64748b;font-size:13px;font-weight:800;margin-bottom:3px;}
.aep-create-summary-bar strong{display:block;color:#0f172a;font-size:22px;font-weight:900;line-height:1.1;}
.aep-create-summary-bar #aep-add-row{margin:0!important;min-height:50px!important;align-self:stretch!important;}

@media (max-width:768px){
  .aep-mobile-menu-toggle{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:calc(100% - 28px)!important;
    max-width:520px!important;
    margin:10px auto 12px!important;
    height:46px!important;
    border:0!important;
    border-radius:14px!important;
    background:#0f172a!important;
    color:#fff!important;
    font-size:16px!important;
    font-weight:900!important;
    cursor:pointer!important;
    box-shadow:0 8px 20px rgba(15,23,42,.12)!important;
  }
  body .aep-dashboard .aep-sidebar{
    display:none!important;
    position:static!important;
    width:calc(100% - 28px)!important;
    max-width:520px!important;
    min-width:0!important;
    margin:0 auto 14px!important;
    border-radius:18px!important;
    padding:16px!important;
  }
  body .aep-dashboard .aep-sidebar.aep-sidebar-open{display:block!important;}
  body .aep-dashboard .aep-sidebar h2{font-size:24px!important;text-align:center!important;margin-bottom:12px!important;}
  body .aep-dashboard .aep-sidebar a{height:46px!important;margin-bottom:8px!important;font-size:15px!important;padding:10px 12px!important;}
}

@media (max-width:700px){
  body .aep-order-page .aep-page-header{display:block!important;text-align:center!important;}
  body .aep-order-page .aep-page-header .aep-back-btn{display:flex!important;width:100%!important;margin:12px auto!important;justify-content:center!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table thead,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table td{display:block!important;width:100%!important;min-width:0!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    border:1px solid #e5e7eb!important;
    border-radius:16px!important;
    padding:10px!important;
    margin-bottom:12px!important;
    background:#fff!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td{
    border:0!important;
    padding:0!important;
    text-align:right!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-column:1/-1!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{
    display:block!important;
    margin:0 0 5px!important;
    color:#334155!important;
    font-size:12px!important;
    font-weight:900!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'السعر الأصلي';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'سعر البيع';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{content:'حذف';}
  body .aep-order-page .aep-products-table select,
  body .aep-order-page .aep-products-table input{height:48px!important;min-height:48px!important;font-size:14px!important;width:100%!important;padding:0 10px!important;}
  body .aep-order-page .aep-products-table .aep-remove-row{height:48px!important;width:100%!important;min-width:0!important;border-radius:12px!important;}
  .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;}
  body .aep-order-page .aep-grid-two{grid-template-columns:1fr!important;display:grid!important;gap:10px!important;}
  body .aep-order-page [style*="display:flex"]{flex-wrap:wrap!important;}
  body .aep-order-page [style*="flex:0 0 28%"],
  body .aep-order-page [style*="flex:0 0 68%"],
  body .aep-order-page [style*="flex:0 0 16%"],
  body .aep-order-page [style*="flex:1"]{flex:1 1 100%!important;width:100%!important;}
}

/* flexible shipping rate table polish */
.aep-shipping-table th:nth-child(1),.aep-shipping-table td:nth-child(1){width:16%;}
.aep-shipping-table th:nth-child(2),.aep-shipping-table td:nth-child(2){width:30%;}
.aep-shipping-table th:nth-child(3),.aep-shipping-table td:nth-child(3){width:18%;}
.aep-shipping-table th:nth-child(4),.aep-shipping-table td:nth-child(4){width:18%;}
.aep-shipping-table th:nth-child(5),.aep-shipping-table td:nth-child(5){width:18%;}
.aep-shipping-table td:nth-child(3),.aep-shipping-table td:nth-child(4),.aep-shipping-table td:nth-child(5){text-align:center;}
.aep-shipping-table td:nth-child(3) strong,.aep-shipping-table td:nth-child(4) strong,.aep-shipping-table td:nth-child(5) strong{display:inline-block;min-width:58px;padding:7px 11px;border-radius:999px;background:#eef2ff;}

/* NovaCore final agent UI polish requested: desktop readability + mobile menu modal + create order mobile fields */
@media (min-width:1025px){
  body .aep-dashboard .aep-content,
  body .aep-dashboard .aep-content p,
  body .aep-dashboard .aep-content div,
  body .aep-dashboard .aep-content span,
  body .aep-dashboard .aep-content a{
    font-size:16px;
  }
  body .aep-dashboard .aep-card,
  body .aep-dashboard .aep-box{
    font-size:16px!important;
  }
  body .aep-dashboard .aep-table th,
  body .aep-dashboard .aep-table td,
  body .aep-dashboard table th,
  body .aep-dashboard table td,
  body .aep-dashboard .widefat th,
  body .aep-dashboard .widefat td{
    font-size:16px!important;
    line-height:1.62!important;
    font-weight:700!important;
  }
  body .aep-dashboard .aep-table th,
  body .aep-dashboard table th,
  body .aep-dashboard .widefat th{
    font-size:16px!important;
    font-weight:900!important;
  }
  body .aep-dashboard input,
  body .aep-dashboard select,
  body .aep-dashboard textarea,
  body .aep-dashboard button{
    font-size:16px!important;
  }
  body .aep-order-page .aep-products-table th,
  body .aep-order-page .aep-products-table td{
    font-size:16px!important;
    padding:12px 10px!important;
  }
  body .aep-order-page .aep-products-table input,
  body .aep-order-page .aep-products-table select{
    font-size:15.5px!important;
    font-weight:800!important;
  }
  body .aep-create-summary-bar span{font-size:15px!important;}
  body .aep-create-summary-bar strong{font-size:26px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th,
  body .aep-agent-orders-page #aep-agent-orders-table td{
    font-size:16px!important;
    line-height:1.6!important;
  }
  body .aep-agent-orders-page #aep-agent-orders-table th{font-size:15.5px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table .aep-filter-row select{
    font-size:15px!important;
    height:38px!important;
  }
  body .aep-agent-orders-page .aep-order-details-box,
  body .aep-agent-orders-page .aep-order-details-box div,
  body .aep-agent-orders-page .aep-order-details-box span{
    font-size:15.5px!important;
    line-height:1.7!important;
  }
  body .aep-agent-orders-page .aep-order-details-box strong{font-size:16px!important;}
  body .aep-agent-reports-page .aep-report-table th,
  body .aep-agent-reports-page .aep-report-table td{
    font-size:15.5px!important;
    line-height:1.62!important;
    padding:11px 9px!important;
  }
  body .aep-agent-reports-page .aep-stacked-cell span{
    font-size:15px!important;
    line-height:1.55!important;
  }
  body .aep-agent-reports-page .aep-report-column-filters input{
    font-size:14px!important;
    height:38px!important;
  }
  body .aep-dashboard .aep-admin-kpi h4,
  body .aep-dashboard .aep-stat-card h3,
  body .aep-dashboard .aep-mini h4{
    font-size:17px!important;
    line-height:1.4!important;
  }
  body .aep-dashboard .aep-admin-kpi strong,
  body .aep-dashboard .aep-stat-card strong,
  body .aep-dashboard .aep-value,
  body .aep-dashboard .aep-mini p{
    font-size:31px!important;
    line-height:1.18!important;
  }
  body .aep-order-detail-title{
    font-size:28px!important;
    text-align:center!important;
    margin:12px 0 18px!important;
  }
  body .aep-order-customer-card{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
    padding:22px!important;
    border-radius:18px!important;
  }
  body .aep-order-customer-card .aep-customer-main,
  body .aep-order-customer-card .aep-customer-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    grid-column:1/-1!important;
  }
  body .aep-order-customer-card .aep-customer-wide,
  body .aep-order-customer-card .aep-customer-status{
    grid-column:1/-1!important;
    text-align:center!important;
  }
  body .aep-order-customer-card strong{
    display:block!important;
    font-size:18px!important;
    margin-bottom:5px!important;
    color:#334155!important;
  }
  body .aep-order-customer-card span,
  body .aep-order-customer-card div{
    font-size:17px!important;
    line-height:1.7!important;
    font-weight:800!important;
  }
  body .aep-order-detail-products th,
  body .aep-order-detail-products td{
    font-size:16px!important;
    padding:12px 10px!important;
    line-height:1.62!important;
    text-align:center!important;
  }
  body .aep-order-detail-products .aep-cell-product{
    text-align:right!important;
    width:42%!important;
  }
  body .aep-order-detail-products + .aep-card p,
  body .aep-order-detail-products + .aep-card strong{
    font-size:18px!important;
    line-height:1.75!important;
  }
}

@media (max-width:768px){
  .aep-mobile-menu-toggle{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:calc(100% - 28px)!important;
    max-width:520px!important;
    margin:10px auto 12px!important;
    height:48px!important;
    border:0!important;
    border-radius:14px!important;
    background:#0f172a!important;
    color:#fff!important;
    font-size:16px!important;
    font-weight:900!important;
    cursor:pointer!important;
    box-shadow:0 8px 22px rgba(15,23,42,.14)!important;
    position:relative!important;
    z-index:99990!important;
  }
  body .aep-dashboard .aep-sidebar{
    display:none!important;
  }
  body .aep-dashboard .aep-sidebar.aep-sidebar-open{
    display:block!important;
    position:fixed!important;
    top:86px!important;
    right:14px!important;
    left:14px!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    max-height:calc(100vh - 110px)!important;
    overflow:auto!important;
    margin:0!important;
    border-radius:20px!important;
    padding:18px!important;
    z-index:99999!important;
    box-shadow:0 20px 70px rgba(15,23,42,.35)!important;
  }
  body.aep-agent-menu-open:before{
    content:''!important;
    position:fixed!important;
    inset:0!important;
    background:rgba(15,23,42,.45)!important;
    z-index:99980!important;
  }
  body .aep-dashboard .aep-sidebar .aep-mobile-menu-close{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:40px!important;
    height:40px!important;
    border-radius:999px!important;
    border:0!important;
    background:#ef4444!important;
    color:#fff!important;
    font-size:28px!important;
    line-height:1!important;
    font-weight:900!important;
    cursor:pointer!important;
    margin:0 0 10px auto!important;
  }
  body .aep-dashboard .aep-sidebar h2{
    font-size:25px!important;
    text-align:center!important;
    margin:0 0 14px!important;
  }
  body .aep-dashboard .aep-sidebar a{
    min-height:48px!important;
    margin-bottom:9px!important;
    font-size:15.5px!important;
    padding:10px 12px!important;
  }
}

@media (max-width:700px){
  body .aep-order-page .aep-products-builder{overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table thead,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:12px!important;
    margin-bottom:12px!important;
    background:#fff!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td{
    border:0!important;
    padding:0!important;
    text-align:right!important;
    min-width:0!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-column:1/-1!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){grid-column:1/-1!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{
    display:block!important;
    white-space:nowrap!important;
    margin:0 0 6px!important;
    color:#334155!important;
    font-size:12.5px!important;
    line-height:1.25!important;
    font-weight:900!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'السعر الأصلي';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'سعر البيع';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة';}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{content:'حذف';}
  body .aep-order-page .aep-products-table select,
  body .aep-order-page .aep-products-table input{
    height:50px!important;
    min-height:50px!important;
    width:100%!important;
    min-width:0!important;
    border-radius:14px!important;
    padding:0 10px!important;
    font-size:15px!important;
    line-height:1.3!important;
    text-align:center!important;
    box-sizing:border-box!important;
  }
  body .aep-order-page .aep-products-table select{text-align:right!important;}
  body .aep-order-page .aep-products-table .aep-remove-row{
    height:50px!important;
    width:100%!important;
    min-width:0!important;
    border-radius:14px!important;
    font-size:24px!important;
  }
  body .aep-order-page .aep-create-summary-bar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    margin:12px 0!important;
  }
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;padding:10px!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;}
}

@media (max-width:420px){
  body .aep-order-page .aep-products-table tr.aep-product-row{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body .aep-order-page .aep-products-table select,
  body .aep-order-page .aep-products-table input{font-size:14px!important;padding:0 8px!important;}
}

/* NovaCore final targeted UI correction requested by user: mobile create order */
/* NovaCore targeted UI fix: desktop readability + mobile create/order controls */
@media (min-width:1025px){
  body .aep-dashboard .aep-content{font-size:17px!important;}
  body .aep-dashboard .aep-table th,body .aep-dashboard .aep-table td,body .aep-dashboard table th,body .aep-dashboard table td{font-size:17px!important;line-height:1.7!important;font-weight:800!important;}
  body .aep-dashboard .aep-table th,body .aep-dashboard table th{font-size:17px!important;font-weight:900!important;}
  body .aep-order-page .aep-products-table th{font-size:18px!important;padding:14px 12px!important;}
  body .aep-order-page .aep-products-table td{font-size:17px!important;padding:13px 12px!important;}
  body .aep-order-page .aep-products-table .aep-product-select{font-size:17px!important;line-height:1.45!important;height:58px!important;min-height:58px!important;font-weight:900!important;white-space:normal!important;text-align:right!important;}
  body .aep-order-page .aep-products-table input{font-size:17px!important;font-weight:900!important;height:58px!important;min-height:58px!important;}
  body .aep-create-summary-bar span{font-size:16px!important;font-weight:900!important;}
  body .aep-create-summary-bar strong{font-size:30px!important;font-weight:900!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th{font-size:16.5px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table td{font-size:17px!important;line-height:1.7!important;}
  body .aep-agent-orders-page #aep-agent-orders-table .aep-filter-row select{font-size:16px!important;height:42px!important;}
  body .aep-agent-orders-page .aep-order-details-box,body .aep-agent-orders-page .aep-order-details-box div{font-size:16px!important;line-height:1.75!important;}
  body .aep-agent-orders-page .aep-order-details-box strong{font-size:16.5px!important;}
  body .aep-agent-reports-page .aep-report-table th{font-size:16.5px!important;padding:13px 10px!important;}
  body .aep-agent-reports-page .aep-report-table td{font-size:16.5px!important;line-height:1.72!important;padding:13px 10px!important;font-weight:800!important;}
  body .aep-agent-reports-page .aep-stacked-cell,body .aep-agent-reports-page .aep-stacked-cell span{font-size:16px!important;line-height:1.65!important;font-weight:900!important;}
  body .aep-agent-reports-page .aep-report-column-filters input{font-size:15.5px!important;height:42px!important;}
  body .aep-agent-reports-page .aep-admin-kpi strong,body .aep-agent-reports-page .aep-admin-kpi strong span,body .aep-dashboard .aep-admin-kpi strong,body .aep-dashboard .aep-admin-kpi strong span{font-size:30px!important;line-height:1.18!important;font-weight:900!important;display:block!important;margin-top:5px!important;}
  body .aep-agent-reports-page .aep-admin-kpi h4,body .aep-dashboard .aep-admin-kpi h4{font-size:17px!important;font-weight:900!important;}
  body .aep-order-detail-title{font-size:31px!important;text-align:center!important;margin:16px 0 20px!important;}
  body .aep-order-customer-card{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;padding:22px!important;border-radius:18px!important;align-items:stretch!important;}
  body .aep-order-customer-card .aep-customer-main,body .aep-order-customer-card .aep-customer-grid{display:contents!important;}
  body .aep-order-customer-card .aep-customer-main>div,body .aep-order-customer-card .aep-customer-grid>div,body .aep-order-customer-card .aep-customer-wide,body .aep-order-customer-card .aep-customer-status{background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:14px!important;padding:13px 14px!important;text-align:center!important;min-height:74px!important;box-sizing:border-box!important;}
  body .aep-order-customer-card .aep-customer-wide,body .aep-order-customer-card .aep-customer-status{grid-column:1/-1!important;}
  body .aep-order-customer-card strong{display:block!important;font-size:18px!important;line-height:1.35!important;margin-bottom:5px!important;color:#334155!important;font-weight:900!important;}
  body .aep-order-customer-card span{display:block!important;font-size:18px!important;line-height:1.55!important;font-weight:900!important;color:#0f172a!important;overflow-wrap:anywhere!important;}
  body .aep-order-detail-products{table-layout:fixed!important;width:100%!important;}
  body .aep-order-detail-products th{font-size:17px!important;padding:13px 10px!important;}
  body .aep-order-detail-products td{font-size:17px!important;line-height:1.7!important;padding:13px 10px!important;font-weight:800!important;}
  body .aep-order-detail-products .aep-cell-product{width:40%!important;text-align:right!important;font-size:17px!important;}
  body .aep-order-detail-products + .aep-card p,body .aep-order-detail-products + .aep-card strong{font-size:19px!important;line-height:1.8!important;font-weight:900!important;}
}
@media (max-width:700px){
  body .aep-order-page .aep-products-builder{overflow:visible!important;width:100%!important;}
  body .aep-order-page .aep-products-table,body .aep-order-page .aep-products-table thead,body .aep-order-page .aep-products-table tbody,body .aep-order-page .aep-products-table tr,body .aep-order-page .aep-products-table td{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;border:1px solid #e5e7eb!important;border-radius:18px!important;padding:12px!important;margin:0 0 12px!important;background:#fff!important;align-items:end!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td{display:block!important;border:0!important;padding:0!important;margin:0!important;text-align:center!important;min-width:0!important;max-width:100%!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-column:1/-1!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2),body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3),body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4),body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5){grid-column:auto!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){grid-column:1/-1!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{display:block!important;white-space:nowrap!important;margin:0 0 5px!important;color:#334155!important;font-size:12px!important;line-height:1.2!important;font-weight:900!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{content:'حذف'!important;margin:0!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td select,body .aep-order-page .aep-products-table tr.aep-product-row td input,body .aep-order-page .aep-products-table tr.aep-product-row td .aep-base-price,body .aep-order-page .aep-products-table tr.aep-product-row td .aep-sell-price,body .aep-order-page .aep-products-table tr.aep-product-row td .aep-qty,body .aep-order-page .aep-products-table tr.aep-product-row td .aep-profit{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:48px!important;min-height:48px!important;border-radius:14px!important;padding:0 6px!important;margin:0!important;font-size:13.5px!important;line-height:1.25!important;text-align:center!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td select.aep-product-select{height:54px!important;min-height:54px!important;text-align:right!important;text-align-last:right!important;font-size:14.5px!important;padding:0 10px!important;white-space:normal!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td .aep-remove-row{width:72px!important;min-width:72px!important;max-width:72px!important;height:48px!important;border-radius:16px!important;font-size:24px!important;margin:0!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;margin:12px 0!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;padding:10px!important;border-radius:14px!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:13px!important;font-weight:900!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:24px!important;font-weight:900!important;line-height:1.1!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;}
}
@media (max-width:430px){
  body .aep-order-page .aep-products-table tr.aep-product-row{gap:6px!important;padding:10px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td input{font-size:12.5px!important;padding:0 4px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{font-size:11.5px!important;}
}
@media (max-width:768px){
  body .aep-agent-orders-page{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body .aep-agent-orders-page #aep-agent-orders-table{min-width:560px!important;width:560px!important;max-width:none!important;table-layout:fixed!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th,body .aep-agent-orders-page #aep-agent-orders-table td{font-size:13px!important;line-height:1.45!important;padding:8px 6px!important;white-space:normal!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(1),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(1){width:142px!important;max-width:142px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(2),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){width:105px!important;max-width:105px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(3),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(3){width:110px!important;max-width:110px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:100px!important;max-width:100px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:100px!important;max-width:100px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order{min-width:700px!important;width:700px!important;table-layout:fixed!important;}
  body .aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order th:nth-child(1),body .aep-agent-orders-page #aep-agent-orders-table.aep-has-expanded-order td:nth-child(1){width:290px!important;max-width:290px!important;}
  body .aep-agent-orders-page .aep-order-details-box{width:270px!important;max-width:270px!important;min-width:270px!important;font-size:13px!important;line-height:1.55!important;white-space:normal!important;overflow-wrap:anywhere!important;}
  body .aep-agent-orders-page .aep-order-details-box div,body .aep-agent-orders-page .aep-order-details-box strong{font-size:13px!important;line-height:1.55!important;}
  body #aep-pagination{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important;width:100%!important;max-width:100%!important;margin-top:16px!important;align-items:center!important;}
  body #aep-pagination button{min-width:0!important;width:100%!important;padding:9px 4px!important;font-size:12.5px!important;border-radius:10px!important;white-space:nowrap!important;}
  body #aep-pagination span{grid-column:1/-1!important;grid-row:1!important;min-width:0!important;width:100%!important;font-size:14px!important;text-align:center!important;margin-bottom:2px!important;}
}



/* NovaCore targeted mobile responsiveness - Create Order + Agent Orders only */
@media (max-width:768px){
  body .aep-dashboard{display:block!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;box-sizing:border-box!important;}
  body .aep-dashboard .aep-content,
  body .aep-content{width:100%!important;max-width:100%!important;margin:0!important;padding-left:10px!important;padding-right:10px!important;box-sizing:border-box!important;overflow:visible!important;}
  body .aep-dashboard .aep-box,
  body .aep-dashboard .aep-card{width:100%!important;max-width:100%!important;box-sizing:border-box!important;}
}

@media (max-width:700px){
  body .aep-order-page{width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding:14px 10px!important;overflow:visible!important;}
  body .aep-order-page .aep-page-header{display:block!important;text-align:center!important;margin-bottom:14px!important;}
  body .aep-order-page .aep-page-header .aep-back-btn{display:flex!important;width:100%!important;min-height:48px!important;margin:10px auto!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-builder{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table td{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:repeat(4,minmax(72px,1fr))!important;
    grid-template-areas:"remove product product product" "profit qty sell base"!important;
    gap:7px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:10px!important;
    margin:0 0 12px!important;
    background:#fff!important;
    align-items:end!important;
    overflow:visible!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td{display:block!important;direction:rtl!important;border:0!important;padding:0!important;margin:0!important;min-width:0!important;max-width:100%!important;overflow:visible!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-area:product!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2){grid-area:base!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3){grid-area:sell!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4){grid-area:qty!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5){grid-area:profit!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){grid-area:remove!important;grid-column:auto!important;order:initial!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;height:100%!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{display:block!important;margin:0 0 5px!important;color:#334155!important;font-size:12.5px!important;line-height:1.2!important;font-weight:900!important;white-space:nowrap!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{display:none!important;content:''!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:56px!important;min-height:56px!important;border-radius:16px!important;padding:0 12px!important;font-size:16.5px!important;line-height:1.35!important;font-weight:900!important;text-align:right!important;text-align-last:right!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-profit,
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{display:block!important;inline-size:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:48px!important;min-height:48px!important;border-radius:14px!important;padding:0 6px!important;margin:0!important;font-size:14.5px!important;line-height:1.25!important;font-weight:900!important;text-align:center!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;max-width:100%!important;height:56px!important;min-height:56px!important;border-radius:16px!important;font-size:26px!important;padding:0!important;margin:0!important;line-height:1!important;}
  body .aep-order-page .aep-products-table input[type=number]::-webkit-outer-spin-button,
  body .aep-order-page .aep-products-table input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}
  body .aep-order-page .aep-products-table input[type=number]{-moz-appearance:textfield!important;appearance:textfield!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 12px!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;min-height:56px!important;padding:6px 8px!important;border-radius:14px!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;margin-bottom:2px!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:20px!important;line-height:1.05!important;font-weight:900!important;margin-top:1px!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;min-height:48px!important;height:48px!important;border-radius:15px!important;font-size:17px!important;padding:0 12px!important;}
  body .aep-order-page .aep-grid-two{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;}
  body .aep-order-page [style*="display:flex"]{flex-wrap:wrap!important;gap:10px!important;}
  body .aep-order-page [style*="flex:0 0 16%"],
  body .aep-order-page [style*="flex:0 0 28%"],
  body .aep-order-page [style*="flex:0 0 68%"],
  body .aep-order-page [style*="flex:1"]{flex:1 1 100%!important;width:100%!important;max-width:100%!important;}
}

@media (max-width:380px){
  body .aep-order-page{padding-left:7px!important;padding-right:7px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{grid-template-columns:repeat(4,minmax(64px,1fr))!important;gap:5px!important;padding:8px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{font-size:11.5px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{font-size:15.5px!important;padding:0 9px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{font-size:13px!important;padding:0 4px!important;}
}

@media (max-width:768px){
  body .aep-agent-orders-page{width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding:12px 8px!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch!important;}
  body .aep-agent-orders-page .aep-page-header{display:flex!important;justify-content:center!important;text-align:center!important;gap:8px!important;}
  body .aep-agent-orders-page .aep-page-header>div{width:100%!important;justify-content:center!important;gap:8px!important;}
  body .aep-agent-orders-page .aep-page-header h2{width:100%!important;text-align:center!important;margin-bottom:4px!important;}
  body .aep-agent-orders-page .aep-back-btn{flex:1 1 135px!important;min-height:40px!important;font-size:13px!important;padding:8px 10px!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page .aep-orders-top-wrap{width:100%!important;margin:10px 0 12px!important;display:block!important;}
  body .aep-agent-orders-page .aep-orders-tools-side{width:100%!important;max-width:100%!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:nowrap!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page .aep-orders-length{order:1!important;display:flex!important;align-items:center!important;gap:5px!important;flex:0 0 auto!important;white-space:nowrap!important;}
  body .aep-agent-orders-page .aep-orders-length label{font-size:13px!important;margin:0!important;}
  body .aep-agent-orders-page #aep-per-page{width:64px!important;min-width:64px!important;max-width:64px!important;height:40px!important;border-radius:10px!important;padding:4px!important;font-size:13px!important;text-align:center!important;text-align-last:center!important;}
  body .aep-agent-orders-page #aep-orders-search{order:2!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:40px!important;min-height:40px!important;border-radius:10px!important;padding:0 10px!important;font-size:13px!important;text-align:center!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page .aep-orders-filter-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:10px 0 12px!important;padding:8px!important;overflow:visible!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page .aep-orders-filter-stats>div{min-width:0!important;flex:none!important;padding:8px 6px!important;font-size:12px!important;line-height:1.35!important;text-align:center!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page .aep-orders-filter-stats strong{display:block!important;font-size:11.5px!important;margin-bottom:3px!important;}
  body .aep-agent-orders-page .aep-orders-filter-stats span{font-size:16px!important;font-weight:900!important;}
  body .aep-agent-orders-page #aep-agent-orders-table{min-width:540px!important;width:540px!important;max-width:none!important;table-layout:fixed!important;border-collapse:collapse!important;margin:0!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th,
  body .aep-agent-orders-page #aep-agent-orders-table td{box-sizing:border-box!important;padding:7px 5px!important;font-size:12.5px!important;line-height:1.35!important;text-align:center!important;vertical-align:middle!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th{font-size:12px!important;font-weight:900!important;height:38px!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(1),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(1){width:27%!important;max-width:27%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(2),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(2){width:18%!important;max-width:18%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(3),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(3){width:18%!important;max-width:18%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(4),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(4){width:18%!important;max-width:18%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table th:nth-child(5),body .aep-agent-orders-page #aep-agent-orders-table td:nth-child(5){width:19%!important;max-width:19%!important;}
  body .aep-agent-orders-page #aep-agent-orders-table .aep-filter-row select{width:100%!important;max-width:100%!important;height:30px!important;min-height:30px!important;padding:2px 3px!important;font-size:11.5px!important;text-align:center!important;text-align-last:center!important;box-sizing:border-box!important;}
  body .aep-agent-orders-page #aep-agent-orders-table tr.aep-order-expanded td:first-child{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;vertical-align:top!important;padding:7px!important;}
  body .aep-agent-orders-page .aep-order-details-box{width:100%!important;max-width:100%!important;min-width:0!important;font-size:12px!important;line-height:1.45!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:right!important;}
  body .aep-agent-orders-page .aep-order-details-box div,
  body .aep-agent-orders-page .aep-order-details-box strong{font-size:12px!important;line-height:1.45!important;white-space:normal!important;}
  body #aep-pagination{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;width:100%!important;max-width:100%!important;margin-top:14px!important;align-items:center!important;}
  body #aep-pagination button{min-width:0!important;width:100%!important;padding:8px 3px!important;font-size:12px!important;border-radius:9px!important;white-space:nowrap!important;}
  body #aep-pagination span{grid-column:1/-1!important;grid-row:1!important;min-width:0!important;width:100%!important;font-size:13px!important;text-align:center!important;margin-bottom:2px!important;}
}

/* NovaCore HARD mobile fix - Create Order product row: wide fields, stable RTL visual order */
@media (max-width:700px){
  body .aep-order-page{width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding:14px 10px!important;overflow:visible!important;}
  body .aep-order-page .aep-products-builder{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table td{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;table-layout:auto!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:minmax(0,1fr) 60px!important;
    grid-template-areas:
      "product remove"
      "sell base"
      "profit qty"!important;
    gap:10px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:12px!important;
    margin:0 0 13px!important;
    background:#fff!important;
    align-items:end!important;
    overflow:visible!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td{display:block!important;direction:rtl!important;border:0!important;padding:0!important;margin:0!important;min-width:0!important;max-width:100%!important;overflow:visible!important;text-align:center!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-area:product!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2){grid-area:base!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3){grid-area:sell!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4){grid-area:qty!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5){grid-area:profit!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){grid-area:remove!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;height:100%!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{display:block!important;margin:0 0 6px!important;color:#334155!important;font-size:13px!important;line-height:1.2!important;font-weight:900!important;white-space:nowrap!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{display:none!important;content:''!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:58px!important;min-height:58px!important;border-radius:16px!important;padding:0 12px!important;margin:0!important;font-size:16px!important;line-height:1.35!important;font-weight:900!important;text-align:right!important;text-align-last:right!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-profit,
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{display:block!important;inline-size:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:50px!important;min-height:50px!important;border-radius:14px!important;padding:0 9px!important;margin:0!important;font-size:15.5px!important;line-height:1.25!important;font-weight:900!important;text-align:center!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row{display:flex!important;align-items:center!important;justify-content:center!important;width:60px!important;min-width:60px!important;max-width:60px!important;height:58px!important;min-height:58px!important;border-radius:16px!important;font-size:28px!important;padding:0!important;margin:0!important;line-height:1!important;}
  body .aep-order-page .aep-products-table input[type=number]::-webkit-outer-spin-button,
  body .aep-order-page .aep-products-table input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}
  body .aep-order-page .aep-products-table input[type=number]{-moz-appearance:textfield!important;appearance:textfield!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 12px!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;min-height:54px!important;padding:7px 8px!important;border-radius:14px!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;margin-bottom:2px!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:21px!important;line-height:1.05!important;font-weight:900!important;margin-top:1px!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;min-height:48px!important;height:48px!important;border-radius:15px!important;font-size:17px!important;padding:0 12px!important;}
}
@media (max-width:380px){
  body .aep-order-page .aep-products-table tr.aep-product-row{grid-template-columns:minmax(0,1fr) 56px!important;gap:8px!important;padding:10px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row{width:56px!important;min-width:56px!important;max-width:56px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{font-size:12px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{font-size:15.5px!important;padding:0 10px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{font-size:14.5px!important;padding:0 6px!important;}
}

/* NovaCore HARD mobile fix V3 - Create Order: product wide + delete beside it + 2-column wide price fields */
@media (max-width:700px){
  body .aep-order-page{width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding:14px 10px!important;overflow:visible!important;}
  body .aep-order-page .aep-products-builder{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table td{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;table-layout:auto!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    position:relative!important;
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-areas:
      "product product"
      "sell base"
      "profit qty"!important;
    gap:10px!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:12px!important;
    margin:0 0 13px!important;
    background:#fff!important;
    align-items:end!important;
    overflow:visible!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row td{display:block!important;direction:rtl!important;border:0!important;padding:0!important;margin:0!important;min-width:0!important;max-width:100%!important;overflow:visible!important;text-align:center!important;grid-column:auto!important;order:initial!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){grid-area:product!important;padding-left:72px!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2){grid-area:base!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3){grid-area:sell!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4){grid-area:qty!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5){grid-area:profit!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){position:absolute!important;left:12px!important;top:34px!important;width:60px!important;max-width:60px!important;min-width:60px!important;height:58px!important;display:flex!important;align-items:center!important;justify-content:center!important;grid-area:auto!important;padding:0!important;margin:0!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{display:block!important;margin:0 0 6px!important;color:#334155!important;font-size:13px!important;line-height:1.2!important;font-weight:900!important;white-space:nowrap!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6):before{display:none!important;content:''!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:58px!important;min-height:58px!important;border-radius:16px!important;padding:0 12px!important;margin:0!important;font-size:16px!important;line-height:1.35!important;font-weight:900!important;text-align:right!important;text-align-last:right!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-profit,
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{display:block!important;inline-size:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:50px!important;min-height:50px!important;border-radius:14px!important;padding:0 9px!important;margin:0!important;font-size:15.5px!important;line-height:1.25!important;font-weight:900!important;text-align:center!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row{display:flex!important;align-items:center!important;justify-content:center!important;width:60px!important;min-width:60px!important;max-width:60px!important;height:58px!important;min-height:58px!important;border-radius:16px!important;font-size:28px!important;padding:0!important;margin:0!important;line-height:1!important;}
  body .aep-order-page .aep-products-table input[type=number]::-webkit-outer-spin-button,
  body .aep-order-page .aep-products-table input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}
  body .aep-order-page .aep-products-table input[type=number]{-moz-appearance:textfield!important;appearance:textfield!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 12px!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;min-height:54px!important;padding:7px 8px!important;border-radius:14px!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;margin-bottom:2px!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:21px!important;line-height:1.05!important;font-weight:900!important;margin-top:1px!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;min-height:48px!important;height:48px!important;border-radius:15px!important;font-size:17px!important;padding:0 12px!important;}
}
@media (max-width:380px){
  body .aep-order-page .aep-products-table tr.aep-product-row{gap:8px!important;padding:10px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(1){padding-left:66px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:nth-child(6){left:10px!important;top:32px!important;width:56px!important;min-width:56px!important;max-width:56px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row{width:56px!important;min-width:56px!important;max-width:56px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row td:before{font-size:12px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select{font-size:15.5px!important;padding:0 10px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="number"],
  body .aep-order-page .aep-products-table tr.aep-product-row input[type="text"]{font-size:14.5px!important;padding:0 6px!important;}
}


/* NovaCore CREATE ORDER MOBILE HARD FIX V4 - final product card layout */
@media (max-width:700px){
  html,body{overflow-x:hidden!important;}
  body .aep-order-page{width:100%!important;max-width:100%!important;padding:14px 8px!important;box-sizing:border-box!important;overflow:visible!important;}
  body .aep-order-page .aep-products-builder{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table thead,
  body .aep-order-page .aep-products-table tbody,
  body .aep-order-page .aep-products-table tr,
  body .aep-order-page .aep-products-table th,
  body .aep-order-page .aep-products-table td{box-sizing:border-box!important;min-width:0!important;max-width:none!important;table-layout:auto!important;}
  body .aep-order-page .aep-products-table{display:block!important;width:100%!important;overflow:visible!important;border:0!important;border-collapse:separate!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tbody{display:block!important;width:100%!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    width:100%!important;max-width:100%!important;min-width:0!important;
    display:grid!important;
    grid-template-columns:64px repeat(4,minmax(0,1fr))!important;
    grid-template-areas:
      "del product product product product"
      "profit qty sell base"!important;
    gap:8px!important;
    direction:ltr!important;
    align-items:end!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:10px!important;
    margin:0 0 12px!important;
    background:#fff!important;
    overflow:visible!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row>td{
    display:block!important;
    position:static!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;
    border:0!important;padding:0!important;margin:0!important;
    overflow:visible!important;text-align:center!important;vertical-align:bottom!important;
    direction:rtl!important;box-sizing:border-box!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(1){grid-area:product!important;text-align:right!important;padding:0!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(2){grid-area:base!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(3){grid-area:sell!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(4){grid-area:qty!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(5){grid-area:profit!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6){grid-area:del!important;width:64px!important;min-width:64px!important;max-width:64px!important;align-self:end!important;display:flex!important;align-items:end!important;justify-content:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:before{display:block!important;margin:0 0 5px!important;color:#334155!important;font-size:12px!important;line-height:1.15!important;font-weight:900!important;white-space:nowrap!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6):before{display:none!important;content:''!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select{
    display:block!important;width:100%!important;min-width:100%!important;max-width:100%!important;
    inline-size:100%!important;min-inline-size:100%!important;max-inline-size:100%!important;
    height:54px!important;min-height:54px!important;max-height:none!important;
    border-radius:15px!important;padding:0 12px!important;margin:0!important;
    font-size:15.5px!important;line-height:1.25!important;font-weight:900!important;
    text-align:right!important;text-align-last:right!important;direction:rtl!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-profit{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    inline-size:100%!important;min-inline-size:0!important;max-inline-size:100%!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    border-radius:13px!important;padding:0 5px!important;margin:0!important;
    font-size:14px!important;line-height:1.1!important;font-weight:900!important;
    text-align:center!important;direction:ltr!important;
    box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:64px!important;min-width:64px!important;max-width:64px!important;
    height:54px!important;min-height:54px!important;max-height:54px!important;
    border-radius:15px!important;font-size:27px!important;line-height:1!important;padding:0!important;margin:0!important;box-sizing:border-box!important;
  }
  body .aep-order-page .aep-products-table input[type=number]::-webkit-outer-spin-button,
  body .aep-order-page .aep-products-table input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}
  body .aep-order-page .aep-products-table input[type=number]{-moz-appearance:textfield!important;appearance:textfield!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 12px!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar>div{min-width:0!important;min-height:52px!important;padding:6px 8px!important;border-radius:14px!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;margin-bottom:2px!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:20px!important;line-height:1.05!important;font-weight:900!important;margin-top:1px!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{grid-column:1/-1!important;width:100%!important;min-height:46px!important;height:46px!important;border-radius:15px!important;font-size:17px!important;padding:0 12px!important;}
}
@media (max-width:380px){
  body .aep-order-page{padding-left:6px!important;padding-right:6px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{grid-template-columns:56px repeat(4,minmax(0,1fr))!important;gap:6px!important;padding:8px!important;border-radius:16px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6){width:56px!important;min-width:56px!important;max-width:56px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row{width:56px!important;min-width:56px!important;max-width:56px!important;height:50px!important;min-height:50px!important;max-height:50px!important;font-size:25px!important;border-radius:14px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select{height:50px!important;min-height:50px!important;font-size:14px!important;padding:0 8px!important;border-radius:14px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-profit{height:40px!important;min-height:40px!important;max-height:40px!important;font-size:13px!important;padding:0 3px!important;border-radius:12px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:before{font-size:11px!important;margin-bottom:4px!important;}
}

/* NovaCore CREATE ORDER MOBILE HARD FIX V5 external fallback */
@media (max-width:700px){
  html,body{overflow-x:hidden!important;}
  body .aep-order-page{width:100%!important;max-width:100%!important;padding:14px 8px!important;box-sizing:border-box!important;overflow:visible!important;}
  body .aep-order-page .aep-products-builder{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;}
  body .aep-order-page .aep-products-table,
  body .aep-order-page .aep-products-table tbody{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important;border:0!important;border-collapse:separate!important;table-layout:auto!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-table thead{display:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row{
    position:relative!important;
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-template-areas:"product product product product" "profit qty sell base"!important;
    direction:ltr!important;
    gap:7px!important;
    align-items:end!important;
    border:1px solid #e5e7eb!important;
    border-radius:18px!important;
    padding:11px!important;
    margin:0 0 13px!important;
    background:#fff!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row>td{
    display:block!important;
    position:static!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    border:0!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
    text-align:center!important;
    vertical-align:bottom!important;
    direction:rtl!important;
    box-sizing:border-box!important;
    grid-column:auto!important;
    order:initial!important;
  }
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(1){grid-area:product!important;text-align:right!important;padding-left:70px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(2){grid-area:base!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(3){grid-area:sell!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(4){grid-area:qty!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(5){grid-area:profit!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6){position:absolute!important;left:11px!important;top:31px!important;width:58px!important;min-width:58px!important;max-width:58px!important;height:54px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important;grid-area:auto!important;z-index:2!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:before{display:block!important;margin:0 0 5px!important;color:#334155!important;font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;white-space:nowrap!important;text-align:center!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(1):before{content:'المنتج'!important;text-align:right!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(2):before{content:'الأصلي'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(3):before{content:'البيع'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(4):before{content:'الكمية'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(5):before{content:'العمولة'!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6):before{display:none!important;content:''!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select{display:block!important;width:100%!important;min-width:100%!important;max-width:100%!important;inline-size:100%!important;min-inline-size:100%!important;max-inline-size:100%!important;height:54px!important;min-height:54px!important;border-radius:15px!important;padding:0 12px!important;margin:0!important;font-size:15.5px!important;line-height:1.25!important;font-weight:900!important;text-align:right!important;text-align-last:right!important;direction:rtl!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-profit{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;inline-size:100%!important;min-inline-size:0!important;max-inline-size:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;border-radius:13px!important;padding:0 6px!important;margin:0!important;font-size:14.5px!important;line-height:1.1!important;font-weight:900!important;text-align:center!important;direction:ltr!important;box-sizing:border-box!important;writing-mode:horizontal-tb!important;-webkit-writing-mode:horizontal-tb!important;transform:none!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row{display:flex!important;align-items:center!important;justify-content:center!important;width:58px!important;min-width:58px!important;max-width:58px!important;height:54px!important;min-height:54px!important;max-height:54px!important;border-radius:15px!important;font-size:27px!important;line-height:1!important;padding:0!important;margin:0!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-products-table input[type=number]::-webkit-outer-spin-button,
  body .aep-order-page .aep-products-table input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}
  body .aep-order-page .aep-products-table input[type=number]{-moz-appearance:textfield!important;appearance:textfield!important;}
  body .aep-order-page .aep-create-summary-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 12px!important;align-items:stretch!important;}
  body .aep-order-page .aep-create-summary-bar #aep-add-row{order:-1!important;grid-column:1/-1!important;width:100%!important;min-height:48px!important;height:48px!important;border-radius:15px!important;font-size:17px!important;padding:0 12px!important;margin:0!important;}
  body .aep-order-page .aep-create-summary-bar>div{order:0!important;min-width:0!important;min-height:52px!important;padding:6px 8px!important;border-radius:14px!important;box-sizing:border-box!important;}
  body .aep-order-page .aep-create-summary-bar span{font-size:12.5px!important;line-height:1.15!important;font-weight:900!important;margin-bottom:2px!important;}
  body .aep-order-page .aep-create-summary-bar strong{font-size:20px!important;line-height:1.05!important;font-weight:900!important;margin-top:1px!important;}
}
@media (max-width:380px){
  body .aep-order-page .aep-products-table tr.aep-product-row{gap:5px!important;padding:9px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(1){padding-left:62px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:nth-child(6){left:9px!important;top:30px!important;width:52px!important;min-width:52px!important;max-width:52px!important;height:50px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row button.aep-remove-row,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-remove-row{width:52px!important;min-width:52px!important;max-width:52px!important;height:50px!important;min-height:50px!important;max-height:50px!important;font-size:25px!important;border-radius:14px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row select.aep-product-select,
  body .aep-order-page .aep-products-table tr.aep-product-row .aep-product-select{height:50px!important;min-height:50px!important;font-size:14.5px!important;padding:0 8px!important;border-radius:14px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-base-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-sell-price,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-qty,
  body .aep-order-page .aep-products-table tr.aep-product-row input.aep-profit{height:44px!important;min-height:44px!important;max-height:44px!important;font-size:13.5px!important;padding:0 3px!important;border-radius:12px!important;}
  body .aep-order-page .aep-products-table tr.aep-product-row>td:before{font-size:11px!important;margin-bottom:4px!important;}
}

/* NovaCore V6: phone landscape marketer menu visibility only */
@media (max-width:1024px) and (max-height:650px) and (orientation:landscape){
  .aep-mobile-menu-toggle{display:flex!important;align-items:center!important;justify-content:center!important;width:calc(100% - 28px)!important;max-width:620px!important;height:46px!important;min-height:46px!important;margin:8px auto 12px!important;border:0!important;border-radius:14px!important;background:#0f172a!important;color:#fff!important;font-size:15.5px!important;font-weight:900!important;cursor:pointer!important;box-shadow:0 8px 22px rgba(15,23,42,.16)!important;position:sticky!important;top:6px!important;z-index:99990!important;}
  body .aep-dashboard{display:block!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;box-sizing:border-box!important;overflow:visible!important;}
  body .aep-dashboard .aep-content,body .aep-dashboard .aep-main-content{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding-left:10px!important;padding-right:10px!important;box-sizing:border-box!important;overflow:visible!important;}
  body .aep-dashboard .aep-sidebar{display:none!important;position:fixed!important;top:58px!important;right:10px!important;left:10px!important;width:auto!important;max-width:none!important;min-width:0!important;max-height:calc(100vh - 72px)!important;min-height:0!important;overflow:auto!important;margin:0!important;border-radius:18px!important;padding:12px!important;z-index:99999!important;box-shadow:0 20px 70px rgba(15,23,42,.35)!important;}
  body .aep-dashboard .aep-sidebar.aep-sidebar-open{display:block!important;}
  body.aep-agent-menu-open:before{content:''!important;position:fixed!important;inset:0!important;background:rgba(15,23,42,.45)!important;z-index:99980!important;}
  body .aep-dashboard .aep-sidebar .aep-mobile-menu-close{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;border-radius:999px!important;border:0!important;background:#ef4444!important;color:#fff!important;font-size:25px!important;line-height:1!important;font-weight:900!important;cursor:pointer!important;margin:0 0 8px auto!important;padding:0!important;}
  body .aep-dashboard .aep-sidebar h2{font-size:22px!important;line-height:1.25!important;text-align:center!important;margin:0 0 10px!important;}
  body .aep-dashboard .aep-sidebar a{display:flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;height:auto!important;margin-bottom:6px!important;padding:8px 10px!important;font-size:14px!important;line-height:1.35!important;border-radius:11px!important;text-align:center!important;}
}
