:root{
  --primary:#57D62B;
  --primary-hover:#49C220;
  --brand-navy:#1B2236;

  --accent-blue:#3BA8FF;
  --accent-blue-hover:#2596F3;

  --bg-light:#F5F7FA;
  --bg-white:#FFFFFF;

  --bg-dark:#1B2236;
  --bg-deep:#07111F;
  --bg-secondary:#0F172A;
  --bg-card:#111827;

  --text-dark:#1B2236;
  --text-primary:#E5E7EB;
  --text-secondary:#94A3B8;
  --text-muted:#64748B;

  --border:#1E293B;
  --border-light:#E5E7EB;

  --success:#22C55E;
  --warning:#F59E0B;
  --danger:#EF4444;
  --info:#0EA5E9;

  --sidebar-width:280px;
  --topbar-height:78px;

  --shadow:0 10px 30px rgba(0,0,0,.25);
  --radius:18px;
}

*{
  box-sizing:border-box;
}

button,
input,
textarea,
select {
  font: inherit;
}

html{
  scroll-behavior:smooth;
}

body.app-body{
  margin:0;
  min-height:100vh;
  background:var(--bg-light);
  color:var(--text-dark);
  transition:background .2s ease,color .2s ease;
}

body.app-body.is-ltr{
  font-family:'Poppins',sans-serif;
}

body.app-body.is-rtl{
  font-family:'Cairo',sans-serif;
}

body[data-theme="dark"]{
  background:var(--bg-deep);
  color:var(--text-primary);
}

body[data-theme="dark"] .app-main{
  background:var(--bg-deep);
}

body[data-theme="dark"] .app-topbar{
  background:rgba(15,23,42,.86);
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .app-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .card-muted,


body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .lang-link,
body[data-theme="dark"] .sidebar-toggle{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:var(--text-primary);
}

body[data-theme="dark"] .user-pill{
  background:rgba(255,255,255,.04);
  color:#fff;
}

.app-shell{
  display:flex;
  min-height:100vh;
}

.mobile-sidebar-backdrop{
  position:fixed;
  inset:0;
  background:rgba(7,17,31,.58);
  z-index:90;
  opacity:0;
  visibility:hidden;
  transition:.2s ease;
}

.mobile-sidebar-backdrop.open{
  opacity:1;
  visibility:visible;
}

.app-sidebar{
  width:var(--sidebar-width);
  background:var(--brand-navy);
  position:fixed;
  inset-block:0;
  inset-inline-start:0;
  z-index:100;
  overflow-y:auto;
  padding:22px 16px;
  transition:transform .25s ease;
}

.sidebar-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px 30px;
}

.brand-logo-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.brand-logo{
  max-width:178px;
  max-height:54px;
  display:block;
  object-fit:contain;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar-link{
  min-height:48px;
  border-radius:14px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  color:rgba(255,255,255,.72);
  text-decoration:none;
  transition:.18s ease;
  font-size:14px;
  font-weight:600;
}

.sidebar-link:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}

.sidebar-link.active{
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 24px rgba(87,214,43,.35);
}

.sidebar-icon{
  width:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
}

.sidebar-label{
  flex:1;
}

/* =====================================================
   Sidebar Nested Groups
===================================================== */

.sidebar-group{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.sidebar-group-toggle{
  width:100%;
  border:0;
  background:transparent;
  cursor:pointer;
  font-family:inherit;
  text-align:start;
}

.sidebar-group-toggle.active{
  background:rgba(255,255,255,.08);
  color:#fff;
  box-shadow:none;
}

.sidebar-chevron{
  width:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  opacity:.72;
  transition:transform .18s ease;
}

.sidebar-group.open .sidebar-chevron{
  transform:rotate(180deg);
}

.sidebar-subnav{
  display:none;
  flex-direction:column;
  gap:4px;
  padding-inline-start:34px;
  padding-top:2px;
  padding-bottom:4px;
}

.sidebar-group.open .sidebar-subnav{
  display:flex;
}

.sidebar-sublink{
  min-height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  color:rgba(255,255,255,.62);
  text-decoration:none;
  transition:.18s ease;
  font-size:13px;
  font-weight:700;
}

.sidebar-sublink:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}

.sidebar-sublink.active{
  background:rgba(87,214,43,.16);
  color:#fff;
}

.sidebar-subicon{
  width:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  opacity:.86;
}

body.is-rtl .sidebar-subnav{
  padding-inline-start:0;
  padding-inline-end:34px;
}

.app-main{
  width:calc(100% - var(--sidebar-width));
  min-width:0;
  min-height:100vh;
  margin-inline-start:var(--sidebar-width);
}

.app-topbar{
  min-height:var(--topbar-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 28px;
  position:sticky;
  top:0;
  z-index:80;
  backdrop-filter:blur(14px);
  background:rgba(255,255,255,.82);
  border-bottom:1px solid rgba(0,0,0,.05);
}

.topbar-start{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.topbar-title-wrap{
  min-width:0;
}

.page-title{
  margin:0;
  font-size:24px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.sidebar-toggle,
.theme-toggle,
.lang-link{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:.18s ease;
  text-decoration:none;
  color:var(--text-dark);
  font-weight:800;
}

.sidebar-toggle:hover,
.theme-toggle:hover,
.lang-link:hover{
  transform:translateY(-1px);
}

.lang-link{
  font-size:12px;
}

.user-pill{
  border:none;
  background:#fff;
  min-height:46px;
  border-radius:999px;
  padding:0 16px 0 10px;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  color:var(--text-dark);
  cursor:pointer;
  box-shadow:0 4px 18px rgba(0,0,0,.05);
  max-width:220px;
}

.user-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:800;
  flex-shrink:0;
}

.user-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.app-content{
  padding:30px;
}

.app-card{
  background:#fff;
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.05);
  padding:24px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

.card-title{
  margin:0 0 10px;
  font-size:20px;
  font-weight:800;
}

.card-muted{
  margin:0;
  color:var(--text-muted);
  line-height:1.7;
}

.card-header-status{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

@media (max-width:960px){

  :root{
    --topbar-height:68px;
  }

  .app-sidebar{
    transform:translateX(-100%);
    width:290px;
    box-shadow:0 20px 60px rgba(0,0,0,.35);
  }

  body.is-rtl .app-sidebar{
    transform:translateX(100%);
  }

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

  .app-main{
    width:100%;
    margin-inline-start:0;
  }

  .sidebar-toggle{
    display:flex;
  }

  .app-topbar{
    padding:12px 14px;
    gap:10px;
  }

  .topbar-start{
    gap:10px;
  }

  .page-title{
    font-size:18px;
    max-width:38vw;
  }

  .topbar-actions{
    gap:8px;
  }

  .theme-toggle,
  .lang-link,
  .sidebar-toggle{
    width:38px;
    height:38px;
    border-radius:11px;
  }

  .user-pill{
    min-height:38px;
    padding:0;
    width:38px;
    justify-content:center;
  }

  .user-avatar{
    width:38px;
    height:38px;
  }

  .user-name{
    display:none;
  }

  .app-content{
    padding:18px;
  }

  .brand-logo{
    max-width:165px;
  }
}

@media (min-width:961px){
  .sidebar-toggle{
    display:none;
  }

  .mobile-sidebar-backdrop{
    display:none;
  }
}

/* =====================================================
   Buttons
===================================================== */

.btn{
  border:none;
  min-height:44px;
  padding:0 18px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  transition:.18s ease;
}

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

.btn-primary{
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 24px rgba(87,214,43,.25);
}

.btn-primary:hover{
  background:var(--primary-hover);
}

.btn-secondary{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  color:var(--text-dark);
}

.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-success {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.btn-orange {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.btn-orange:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

body[data-theme="dark"] .btn-secondary{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:#fff;
}

.btn-sm{
  min-height:34px;
  padding:0 12px;
  font-size:13px;
}

/* =====================================================
   Page Actions
===================================================== */

.page-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
  flex-wrap:wrap;
}

.page-actions-end{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

@media (max-width:960px){

  .page-actions{
    align-items:stretch;
  }

  .page-actions-end{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

}


/* =====================================================
   Forms
===================================================== */

.search-form{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.form-control-wrap{
  min-width:280px;
  position:relative;
}

.form-control-wrap i{
  position:absolute;
  inset-inline-start:14px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text-muted);
  font-size:18px;
}

.form-input{
  width:100%;
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  padding-inline:44px 14px;
  font-size:14px;
  outline:none;
  transition:.18s ease;
  font: inherit;
}

.form-field textarea.form-input{
  min-height:120px;
  padding:14px;
  resize:vertical;
  line-height:1.7;
}

.font-ar{
  font-family:'Cairo',sans-serif !important;
}

.font-en{
  font-family:'Poppins',sans-serif !important;
}

.form-input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(87,214,43,.12);
}

body[data-theme="dark"] .form-input{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:#fff;
}

.form-field[hidden],
[data-heading-field][hidden],
[data-body-field][hidden]{
  display:none !important;
}

/* =====================================================
   Table
===================================================== */

.app-table{
  width:100%;
  border-collapse:collapse;
  min-width:900px;
}


.table-responsive{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}

.table-view-panel{
  min-width:0;
  overflow:hidden;
}

.products-table{
  min-width:1280px;
}

.products-table td,
.products-table th{
  white-space:nowrap;
}

.app-table thead th{
  text-align:start;
  padding:14px 18px;
  font-size:13px;
  font-weight:800;
  color:var(--text-muted);
  border-bottom:1px solid rgba(0,0,0,.06);
  white-space:nowrap;
}

.app-table tbody td{
  padding:18px;
  border-bottom:1px solid rgba(0,0,0,.05);
  vertical-align:middle;
}

body[data-theme="dark"] .app-table thead th,
body[data-theme="dark"] .app-table tbody td{
  border-color:rgba(255,255,255,.06);
}

.app-table tbody tr:hover{
  background:rgba(87,214,43,.03);
}

body[data-theme="dark"] .app-table tbody tr:hover{
  background:rgba(255,255,255,.02);
}



/* =====================================================
   Table UI
===================================================== */

.strong-text{
  font-weight:700;
}

.muted-text{
  color:var(--text-muted);
  font-size:13px;
  margin-top:3px;
}

.code-pill{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(87,214,43,.12);
  color:#1d7a00;
  font-size:12px;
  font-weight:700;
}

body[data-theme="dark"] .code-pill{
  background:rgba(87,214,43,.15);
  color:#7ef75a;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  text-transform:capitalize;
}

.status-active{
  background:rgba(34,197,94,.12);
  color:#15803d;
}

.status-disabled{
  background:rgba(239,68,68,.12);
  color:#b91c1c;
}

.status-suspended{
  background:rgba(245,158,11,.12);
  color:#b45309;
}

.status-stack{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.status-switch{
  width:46px;
  height:26px;
  border-radius:999px;
  border:0;
  background:#cbd5e1;
  position:relative;
  cursor:pointer;
  transition:.18s ease;
  flex:0 0 auto;
}

.status-switch::after{
  content:'';
  position:absolute;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  top:3px;
  inset-inline-start:3px;
  transition:.18s ease;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
}

.status-switch.is-active{
  background:var(--primary);
}

.status-switch.is-active::after{
  inset-inline-start:23px;
}

.row-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.row-actions .btn{
    white-space:nowrap;
}

.icon-btn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  transition:.18s ease;
}

.icon-btn:hover{
  transform:translateY(-1px);
  border-color:var(--primary);
  color:var(--primary);
}

body[data-theme="dark"] .icon-btn{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:#fff;
}

.table-actions-col{
  width:90px;
}

.empty-state{
  text-align:center;
  color:var(--text-muted);
  padding:40px 20px !important;
}

/* wrap text in table */

.table-text-wrap{
  display:block;
  max-width:260px;
  white-space:normal;
  line-height:1.4;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.table-text-wrap-sm{
  max-width:180px;
}

.table-text-wrap-lg{
  max-width:340px;
}

.table-cell-date{
  min-width:135px;
  white-space:nowrap;
}

.table-cell-product{
  min-width:260px;
}



/* =====================================================
   Mobile Tables
===================================================== */

@media (max-width: 960px){

  .btn{
    width:100%;
  }
}

/* =====================================================
   Alerts
===================================================== */

.alert{
  border-radius:var(--radius);
  padding:18px 20px;
  margin-bottom:20px;
  font-size:14px;
  line-height:1.7;
}

.alert ul{
  margin:10px 0 0;
  padding-inline-start:22px;
}

.alert-danger{
  background:rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.20);
  color:#b91c1c;
}

body[data-theme="dark"] .alert-danger{
  color:#fecaca;
}

/* =====================================================
   Form Layout
===================================================== */

.form-layout{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.form-section{
  padding:26px;
}

.section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.section-divider{
  margin-top:28px;
  padding-top:24px;
  border-top:2px solid rgba(0,0,0,.08);
}

body[data-theme="dark"] .section-divider{
  border-color:rgba(255,255,255,.08);
}

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

.form-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-field label{
  font-size:13px;
  font-weight:800;
  color:var(--text-dark);
}

body[data-theme="dark"] .form-field label{
  color:var(--text-primary);
}

.form-field .form-input{
  padding-inline:14px;
}

.form-field textarea.form-input{
  min-height:120px;
  padding:14px;
  resize:vertical;
  line-height:1.7;
}

select.form-input{
  appearance:none;
  cursor:pointer;
}




/* =====================================================
   Sticky Form Actions
===================================================== */

.sticky-form-actions{
  position:sticky;
  bottom:0;
  z-index:40;
  background:rgba(245,247,250,.86);
  backdrop-filter:blur(14px);
  border:1px solid rgba(0,0,0,.06);
  border-radius:var(--radius);
  padding:14px;
  display:flex;
  justify-content:flex-end;
  gap:12px;
  box-shadow:0 -10px 30px rgba(15,23,42,.06);
}

@media (max-width:768px){
  .sticky-form-actions{
    flex-direction:column;
  }
}

body[data-theme="dark"] .sticky-form-actions{
  background:rgba(15,23,42,.86);
  border-color:rgba(255,255,255,.06);
}

/* =====================================================
   Mobile Forms
===================================================== */

@media (max-width: 960px){

  .form-grid{
    grid-template-columns:1fr;
  }

  .form-section{
    padding:20px;
  }

  .section-heading{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
  }

  .section-heading > div{
    min-width:0;
    width:100%;
  }

  .section-heading .card-title{
    margin-bottom:6px;
  }

  .section-heading .card-muted{
    line-height:1.55;
    max-width:100%;
  }

  .section-heading > .btn,
  .section-heading > a.btn,
  .section-heading > button.btn{
    width:100%;
  }

  .sticky-form-actions{
    flex-direction:column-reverse;
  }

}

/* =====================================================
   mobile product-form-actions
===================================================== */
.product-form-actions{
  gap:16px;
}

.product-form-actions-secondary{
  display:flex;
  align-items:center;
  gap:12px;
}

@media (max-width:960px){

  .product-form-actions{
    width:100%;
    flex-direction:column-reverse;
    align-items:stretch;
  }

  .product-form-actions > .btn-primary{
    width:100%;
  }

  .product-form-actions-secondary{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .product-form-actions-secondary .btn{
    width:100%;
    justify-content:center;
  }
}

/* =====================================================
   Smart Select
===================================================== */

.smartSelect{
  position:relative;
  width:100%;
}

.smartSelect__control{
  min-height:46px;
  width:100%;
  padding:0 14px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--text-dark);
  font-family:inherit;
  font-size:14px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:text;
  transition:.18s ease;
}

.smartSelect.isOpen .smartSelect__control,
.smartSelect__control:focus-within{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(87,214,43,.12);
}

.smartSelect__input{
  border:0;
  outline:0;
  flex:1;
  min-width:0;
  font:inherit;
  color:inherit;
  background:transparent;
  height:42px;
}

.smartSelect__input::placeholder{
  color:var(--text-muted);
}

.smartSelect__arrow{
  color:var(--text-muted);
  font-size:18px;
  flex:0 0 auto;
}

.smartSelect__dropdown{
  position:absolute;
  inset-inline-start:0;
  inset-inline-end:0;
  top:calc(100% + 8px);
  z-index:1000;
  display:none;
  max-height:260px;
  overflow:auto;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 40px rgba(15,23,42,.14);
  padding:8px;
}

.smartSelect.isOpen .smartSelect__dropdown{
  display:block;
}

.smartSelect__option{
  padding:11px 12px;
  border-radius:12px;
  cursor:pointer;
  color:var(--text-dark);
  font-size:14px;
  line-height:1.45;
  transition:.14s ease;
}

.smartSelect__option:hover,
.smartSelect__option.isActive{
  background:rgba(87,214,43,.10);
}

.smartSelect__option.isSelected{
  background:var(--primary);
  color:#fff;
  font-weight:700;
}

.smartSelect__empty{
  padding:14px 12px;
  color:var(--text-muted);
  font-size:14px;
}

.smart-select-native{
  display:none !important;
}

.smartSelect__clear{
  width:28px;
  height:28px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:var(--text-muted);
  transition:.18s ease;
  flex:0 0 auto;
}

.smartSelect__clear:hover{
  background:rgba(239,68,68,.10);
  color:var(--danger);
}

body[data-theme="dark"] .smartSelect__control{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:#fff;
}

body[data-theme="dark"] .smartSelect__dropdown{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 18px 40px rgba(0,0,0,.35);
}

body[data-theme="dark"] .smartSelect__option{
  color:var(--text-primary);
}

body[data-theme="dark"] .smartSelect__option:hover,
body[data-theme="dark"] .smartSelect__option.isActive{
  background:rgba(255,255,255,.06);
}

/* =====================================================
   Modal
===================================================== */

.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:2000;
  background:rgba(7,17,31,.62);
  backdrop-filter:blur(8px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.modal-backdrop.isOpen{
  display:flex;
}

.modal-box{
  width:min(720px, 100%);
  max-height:calc(100vh - 40px);
  overflow:auto;
  background:#fff;
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}

body[data-theme="dark"] .modal-box{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.08);
}

.modal-header{
  min-height:68px;
  padding:18px 22px;
  border-bottom:1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

body[data-theme="dark"] .modal-header{
  border-color:rgba(255,255,255,.08);
}

.modal-title{
  margin:0;
  font-size:18px;
  font-weight:800;
}

.modal-close{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

body[data-theme="dark"] .modal-close{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
  color:#fff;
}

.modal-body{
  padding:22px;
}

@media (max-width: 960px){
  .modal-backdrop{
    align-items:flex-end;
    padding:0;
  }

  .modal-box{
    width:100%;
    max-height:90vh;
    border-radius:22px 22px 0 0;
  }
}

.mt-20{
  margin-top:20px;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:22px;
}

@media (max-width:960px){
  .modal-actions{
    flex-direction:column-reverse;
  }
}


/* =====================================================
   Order Product Picker
===================================================== */

.modal-lg{
  width:min(900px, 100%);
}

.modal-subtitle{
  margin-top:4px;
  color:var(--text-muted);
  font-size:13px;
}

.order-product-search-results{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:18px;
  max-height:420px;
  overflow:auto;
}

.order-product-result{
  width:100%;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  background:#fff;
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  cursor:pointer;
  text-align:start;
  transition:.18s ease;
}

.order-product-result:hover{
  border-color:var(--primary);
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(87,214,43,.12);
}

body[data-theme="dark"] .order-product-result{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
  color:var(--text-primary);
}

.success-message{
  padding:10px 14px;
  border-radius:12px;
  background:rgba(34,197,94,.10);
  color:#15803d;
  font-size:13px;
  font-weight:700;
}

body[data-theme="dark"] .success-message{
  background:rgba(34,197,94,.15);
  color:#86efac;
}

@media (max-width:960px){

  .order-product-result{
    flex-direction:column;
    align-items:flex-start;
  }

}

.order-product-search-bar{
  display:flex;
  gap:10px;
  align-items:stretch;
}

.order-product-search-bar .form-control-wrap{
  flex:1;
}

@media (max-width:768px){

  .order-product-search-bar{
    flex-direction:column;
  }

  .order-product-search-bar .btn{
    width:100%;
  }
}

.order-mobile-add-product{
  display:none;
}

@media (max-width:960px){
  .order-mobile-add-product{
    display:block;
  }

  .section-heading [data-open-modal="orderProductPickerModal"]{
    display:none;
  }
}

/* =====================================================
   Upload Module
===================================================== */
.image-uploader {
  display: grid;
  gap: 12px;
}

.image-uploader-preview {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  object-fit: cover;
  display: none;
}

.image-uploader-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.image-uploader-file {
  font-size: 13px;
  color: var(--text-muted);
}

.upload-progress {
  display: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .25);
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width .2s ease;
}

.upload-progress-text {
  display: none;
  font-size: 12px;
  color: var(--text-muted);
}


/* =====================================================
   Login Page
===================================================== */

.login-body{
  margin:0;
  min-height:100vh;
  background:var(--bg-deep);
}

.login-body.is-ltr{
  font-family:'Poppins',sans-serif;
}

.login-body.is-rtl{
  font-family:'Cairo',sans-serif;
}

.login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.05fr .95fr;
}

.login-brand-panel{
  background:
    radial-gradient(circle at 20% 20%, rgba(87,214,43,.22), transparent 32%),
    linear-gradient(135deg, var(--brand-navy), var(--bg-deep));
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px;
  color:#fff;
}

.login-brand-inner{
  max-width:520px;
}

.login-logo{
  width:210px;
  max-width:100%;
  display:block;
  margin-bottom:46px;
}

.login-hero-title{
  margin:0 0 14px;
  font-size:42px;
  line-height:1.15;
  font-weight:800;
}

.login-hero-text{
  margin:0;
  max-width:440px;
  color:rgba(255,255,255,.72);
  line-height:1.8;
  font-size:15px;
}

.login-form-panel{
  background:var(--bg-light);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
}

.login-card{
  width:100%;
  max-width:430px;
  background:#fff;
  border-radius:26px;
  padding:34px;
  box-shadow:0 24px 70px rgba(15,23,42,.12);
}

.login-card-head{
  margin-bottom:24px;
}

.login-card-head h2{
  margin:0 0 8px;
  font-size:28px;
  font-weight:800;
  color:var(--text-dark);
}

.login-card-head p{
  margin:0;
  color:var(--text-muted);
  line-height:1.7;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Login final override */
body.login-body[data-theme="dark"] .login-card .form-field label{
  color:var(--text-dark) !important;
}

body.login-body[data-theme="dark"] .login-card .form-input{
  background:#fff !important;
  color:var(--text-dark) !important;
  border:1px solid rgba(0,0,0,.10) !important;
}

body.login-body[data-theme="dark"] .login-card .form-input::placeholder{
  color:var(--text-muted) !important;
}

body.login-body[data-theme="dark"] .login-card .form-input:focus{
  border-color:var(--primary) !important;
  box-shadow:0 0 0 4px rgba(87,214,43,.12) !important;
}

.form-control-wrap.no-icon .form-input{
  padding-inline:14px;
}

.login-submit{
  width:100%;
  min-height:48px;
  margin-top:6px;
}

.login-lang{
  display:flex;
  justify-content:center;
  margin-top:22px;
}

.login-lang a{
  width:42px;
  height:42px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  color:var(--text-dark);
  background:rgba(27,34,54,.06);
}

@media (max-width:960px){
  .login-shell{
    grid-template-columns:1fr;
  }

  .login-brand-panel{
    min-height:260px;
    padding:34px 24px;
    align-items:flex-end;
  }

  .login-logo{
    width:170px;
    margin-bottom:26px;
  }

  .login-hero-title{
    font-size:28px;
  }

  .login-form-panel{
    padding:22px;
  }

  .login-card{
    max-width:none;
    padding:26px;
    border-radius:22px;
  }
}



/* =====================================================
   Dashboard Widgets
===================================================== */

.dashboard-grid{
  display:flex;
  flex-direction:column;
  gap:22px;
}

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

.stat-card{
  background:#fff;
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.05);
  padding:22px;
  display:flex;
  align-items:center;
  gap:16px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

body[data-theme="dark"] .stat-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

.stat-icon{
  width:56px;
  height:56px;
  border-radius:18px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
}

.stat-content{
  flex:1;
}

.stat-label{
  font-size:13px;
  color:var(--text-muted);
  margin-bottom:6px;
}

.stat-value{
  font-size:28px;
  font-weight:800;
}

@media (max-width:960px){

  .stats-grid{
    grid-template-columns:1fr;
  }

}

/* =====================================================
   Responsive Data View
===================================================== */

.view-switcher{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
}

.view-switch-btn{
  min-height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 13px;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}

.view-switch-btn.active{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}

.view-switcher-inline{
  margin-bottom:0;
}

body[data-theme="dark"] .view-switch-btn{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
  color:#fff;
}

.mobile-card-list{
  display:none;
  flex-direction:column;
  gap:10px;
}

.data-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.05);
  border-radius:16px;
  padding:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.035);
}

body[data-theme="dark"] .data-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

.data-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.data-card-title{
  font-size:15px;
  line-height:1.35;
  font-weight:800;
}

.data-card-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
}

.data-card-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:7px 0;
  border-bottom:1px solid rgba(0,0,0,.045);
}

.data-card-item:last-child{
  border-bottom:0;
}

body[data-theme="dark"] .data-card-item{
  border-color:rgba(255,255,255,.06);
}

.data-card-item span{
  color:var(--text-muted);
  font-size:12px;
}

.data-card-item strong{
  font-size:12.5px;
  font-weight:700;
  text-align:end;
  word-break:break-word;
}

.data-card-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}

.data-card-actions .btn{
  min-height:38px;
  padding:0 14px;
  
  font-size:13px;
  width:auto;
}

.table-view-panel{
  display:block;
}

@media (max-width:960px){
  .mobile-card-list{
    display:flex;
  }

  .table-view-panel{
    display:none;
  }

  .responsive-data-view.show-table .mobile-card-list{
    display:none;
  }

  .responsive-data-view.show-table .table-view-panel{
    display:block;
  }
}

@media (min-width:961px){
  .view-switcher{
    display:none;
  }

  .mobile-card-list{
    display:none;
  }
}

/* =====================================================
   Reusable Media Object
===================================================== */

.media-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.media-row-lg{
  gap:12px;
}

.media-thumb{
  width:42px;
  height:42px;
  border-radius:12px;
  object-fit:cover;
  flex:0 0 auto;
}

.media-thumb-lg{
  width:52px;
  height:52px;
  border-radius:14px;
}

.media-placeholder{
  width:42px;
  height:42px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(148,163,184,.16);
  color:var(--text-muted);
  flex:0 0 auto;
}

.media-placeholder-lg{
  width:52px;
  height:52px;
  border-radius:14px;
}

.media-content{
  min-width:0;
}

.media-title{
  font-weight:800;
  line-height:1.35;
}

.media-subtitle{
  color:var(--text-muted);
  font-size:13px;
  margin-top:3px;
}

/* =====================================================
   Pagination
===================================================== */

.pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:22px;
  flex-wrap:wrap;
}

.pagination-btn{
  min-width:42px;
  height:42px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  transition:.18s ease;
}

.pagination-btn:hover{
  transform:translateY(-1px);
  border-color:var(--primary);
  color:var(--primary);
}

.pagination-btn.active{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
  box-shadow:0 8px 24px rgba(87,214,43,.22);
}

body[data-theme="dark"] .pagination-btn{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
  color:var(--text-primary);
}

body[data-theme="dark"] .pagination-btn.active{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}



/* =====================================================
   Permissions
===================================================== */
.permissions-box{
  margin-top:24px;
  border-top:1px solid rgba(0,0,0,.06);
  padding-top:20px;
}

body[data-theme="dark"] .permissions-box{
  border-color:rgba(255,255,255,.08);
}

.permissions-box h4{
  margin:0 0 16px;
  font-size:16px;
  font-weight:800;
}

.permission-group{
  margin-bottom:18px;
}

.permission-group-title{
  font-size:13px;
  font-weight:800;
  color:var(--text-muted);
  margin-bottom:10px;
}

.permission-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.permission-check{
  min-height:42px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}

body[data-theme="dark"] .permission-check{
  border-color:rgba(255,255,255,.08);
}

.permission-check input{
  accent-color:var(--primary);
}

@media (max-width:960px){
  .permission-options{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   Bulk
==================================================== */

.bulk-actions-bar{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  padding:14px;
  border-radius:var(--radius);
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.bulk-actions-bar.is-active{
  display:flex;
}

.bulk-actions-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.bulk-actions-right{
  display:grid;
  grid-template-columns:minmax(220px, 320px) auto;
  gap:10px;
  align-items:center;
}

.bulk-actions-right .smartSelect{
  min-width:0;
  width:100%;
}

.bulk-actions-right .btn{
  width:auto !important;
  white-space:nowrap;
}

.bulk-selected-count{
  font-size:13px;
  font-weight:800;
  color:var(--text-muted);
}

.bulk-check{
  width:18px;
  height:18px;
  accent-color:var(--primary);
}

body[data-theme="dark"] .bulk-actions-bar{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

@media (max-width:960px){

  .bulk-actions-bar.is-active{
    flex-direction:column;
    align-items:stretch;
  }

  .bulk-actions-left{
    width:100%;
  }

  .bulk-actions-right{
    width:100%;
    grid-template-columns:minmax(0, 1fr) auto;
  }

}


/* =====================================================
   Export Actions
===================================================== */

.export-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.export-actions .btn{
  white-space:nowrap;
}

.export-actions .smartSelect{
  min-width:220px;
}

@media (max-width:960px){

  .export-actions{
    width:100%;
  }

  .export-actions .btn{
    flex:1;
  }

  .export-actions .smartSelect{
    width:100%;
  }

}

/* =====================================================
   Toolbar
===================================================== */

.toolbar-shell{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:16px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.toolbar-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.toolbar-main-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.toolbar-search{
  flex:1;
  display:grid;
  grid-template-columns:minmax(260px, 1fr) auto;
  gap:10px;
  min-width:0;
}

.toolbar-search .form-control-wrap{
  min-width:0;
}

.toolbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.toolbar-filter-modal-btn{
  display:none;
}

.toolbar-filter-row{
  display:none;
  border-top:1px solid rgba(0,0,0,.06);
  padding-top:14px;
  gap:14px;
}

.toolbar-filter-row.is-active{
  display:flex;
  align-items:flex-end;
}

.toolbar-filter-grid{
  flex:1;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.toolbar-filter-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.toolbar-filter-field label{
  font-size:12px;
  font-weight:800;
  color:var(--text-muted);
}

.toolbar-filter-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

body[data-theme="dark"] .toolbar-shell{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .toolbar-filter-row{
  border-color:rgba(255,255,255,.06);
}

@media (max-width:960px){

  .toolbar-main-row{
    flex-direction:column;
    align-items:stretch;
  }

  .toolbar-search{
    grid-template-columns:minmax(0, 1fr) auto;
  }

  .toolbar-search-btn{
    width:46px !important;
    height:46px;
    min-height:46px;
    padding:0;
  }

  .toolbar-search-btn span{
    display:none;
  }

.toolbar-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.toolbar-actions .btn,
.toolbar-actions .export-actions,
.toolbar-actions .export-actions .btn{
  width:100%;
}

/* Primary action full width */
.toolbar-actions .btn-primary{
  grid-column:1 / -1;
}

  .toolbar-filter-toggle{
    display:none;
  }

  .toolbar-filter-modal-btn{
    display:inline-flex;
  }

  .toolbar-filter-row{
    display:none !important;
  }

}

.toolbar-filter-badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:var(--danger);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  line-height:1;
}

@media (min-width:961px){

  .toolbar-filter-modal{
    display:none;
  }

}

/* =====================================================
   View / Details Cards
===================================================== */

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

.details-card{
  padding:22px;
  border-radius:22px;
}

.details-list{
  display:flex;
  flex-direction:column;
  gap:0;
}

.details-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:18px 0;
  border-bottom:1px solid rgba(0,0,0,.05);
}

.details-row:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.details-label{
  color:var(--text-muted);
  font-size:13px;
  font-weight:700;
  flex:0 0 180px;
}

.details-value{
  color:var(--text-dark);
  font-size:15px;
  font-weight:700;
  text-align:right;
  line-height:1.5;
  flex:1;
  word-break:break-word;
}

.details-value.isArabic{
  direction:rtl;
  text-align:left;
}

.details-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:26px;
}

@media (max-width:960px){

  .details-header{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
  }

  .details-header .status-stack{
    display:flex;
    justify-content:flex-end;
    width:100%;
    order:-1;
  }

}

.details-title{
  font-size:28px;
  font-weight:900;
  line-height:1.2;
  margin:0 0 8px;
}

.details-subtitle{
  color:var(--text-muted);
  font-size:14px;
}

body[data-theme="dark"] .details-row{
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .details-value{
  color:var(--text-primary);
}

@media (max-width:900px){

  .details-grid{
    grid-template-columns:1fr;
  }

  .details-row{
    flex-direction:column;
    gap:8px;
  }

  .details-label{
    flex:none;
  }

  .details-value{
    text-align:left;
  }

  .details-value.isArabic{
    text-align:right;
  }
}

/* =====================================================
   Readonly Display Fields
===================================================== */

.readonly-field{
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(15,23,42,.025);
  padding:12px 14px;
  font-size:14px;
  line-height:1.5;
  font-weight:600;
  color:var(--text-dark);
  display:flex;
  align-items:center;
}

.readonly-field.font-ar{
  justify-content:flex-end;
}

body[data-theme="dark"] .readonly-field{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.06);
  color:var(--text-primary);
}




/* =====================================================
   Sweet Alert
===================================================== */

.swal2-container{
    z-index: 20000 !important;
}


/* =====================================================
   variant-group-picker and view
===================================================== */

.variant-group-picker{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.variant-group-option{
  display:block;
  cursor:pointer;
}

.variant-group-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.variant-group-card{
  min-height:118px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:14px;
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:12px;
  transition:.18s ease;
}

.variant-group-option:hover .variant-group-card{
  border-color:rgba(87,214,43,.55);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  transform:translateY(-1px);
}

.variant-group-option input:checked + .variant-group-card{
  border-color:var(--primary);
  background:rgba(87,214,43,.08);
  box-shadow:0 10px 24px rgba(87,214,43,.14);
}

.variant-group-card.is-disabled{
  opacity:.55;
  cursor:not-allowed;
}

.variant-group-card-top{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.variant-group-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:21px;
  flex:0 0 auto;
}

.variant-group-meta{
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.variant-group-meta strong{
  font-size:15px;
  line-height:1.35;
}

.variant-group-meta small{
  color:var(--text-muted);
  font-size:12px;
  line-height:1.4;
}

.variant-group-checkmark{
  width:26px;
  height:26px;
  border-radius:999px;
  background:rgba(148,163,184,.18);
  color:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  transition:.18s ease;
}

.variant-group-option input:checked + .variant-group-card .variant-group-checkmark{
  background:var(--primary);
  color:#fff;
}

.variant-group-values-preview{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.variant-value-chip{
  min-height:28px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(15,23,42,.05);
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
}

.variant-value-swatch{
  width:12px;
  height:12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  flex:0 0 auto;
}

.variant-group-empty{
  color:var(--text-muted);
  font-size:12px;
  font-weight:700;
}

body[data-theme="dark"] .variant-group-card{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}

body[data-theme="dark"] .variant-value-chip{
  background:rgba(255,255,255,.06);
  color:var(--text-primary);
}

@media (max-width:960px){
  .variant-group-picker{
    grid-template-columns:1fr;
  }
}

.variant-mobile-cards{
  display:none;
}

.variant-mobile-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  padding:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.035);
}

.variant-mobile-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.variant-mobile-title{
  font-size:15px;
  font-weight:800;
  line-height:1.35;
}

body[data-theme="dark"] .variant-mobile-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

@media (max-width:960px){
  .variant-mobile-cards{
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .variant-desktop-table{
    display:none;
  }
}

.variant-builder-section + .variant-builder-section{
  margin-top:28px;
  padding-top:24px;
  border-top:1px solid rgba(0,0,0,.06);
}

body[data-theme="dark"] .variant-builder-section + .variant-builder-section{
  border-color:rgba(255,255,255,.06);
}

.variant-combinations-table{
  min-width:760px;
  table-layout:fixed;
}

.variant-combinations-table th:nth-child(1),
.variant-combinations-table td:nth-child(1){
  width:34%;
}

.variant-combinations-table th:nth-child(2),
.variant-combinations-table td:nth-child(2){
  width:24%;
}

.variant-combinations-table th:nth-child(3),
.variant-combinations-table td:nth-child(3){
  width:16%;
}

.variant-combinations-table th:nth-child(4),
.variant-combinations-table td:nth-child(4){
  width:16%;
}

.variant-combinations-table th:nth-child(5),
.variant-combinations-table td:nth-child(5){
  width:10%;
}

.variant-table-input{
  padding-inline:14px;
}


/* =====================================================
   Product create-mode
===================================================== */

.create-mode-card{
  padding:20px;
}

.create-mode-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.create-mode-option{
  min-height:84px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:16px;
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:var(--text-dark);
  background:#fff;
  transition:.18s ease;
}

.create-mode-option:hover{
  border-color:rgba(87,214,43,.55);
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}

.create-mode-option.is-active{
  border-color:var(--primary);
  background:rgba(87,214,43,.08);
  box-shadow:0 10px 24px rgba(87,214,43,.14);
}

.create-mode-option i{
  width:44px;
  height:44px;
  border-radius:14px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  flex:0 0 auto;
}

.create-mode-option span{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.create-mode-option strong{
  font-size:15px;
  font-weight:900;
}

.create-mode-option small{
  color:var(--text-muted);
  font-size:12px;
  line-height:1.45;
}

body[data-theme="dark"] .create-mode-option{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
  color:var(--text-primary);
}

@media (max-width:960px){
  .create-mode-switch{
    grid-template-columns:1fr;
  }
}






/* =====================================================
   Help Label
===================================================== */

.label-with-help{
  display:flex;
  align-items:center;
  gap:8px;
}

.help-icon{
  width:20px;
  height:20px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.16);
  background:rgba(0,0,0,.04);
  color:var(--text-muted);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.help-icon:hover{
  border-color:var(--primary);
  color:var(--primary);
  background:rgba(87,214,43,.10);
}


/* =====================================================
   content-block
===================================================== */
.content-block-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.content-block{
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  padding:16px;
  background:rgba(15,23,42,.02);
}

.content-block-label{
  margin-bottom:10px;
  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
}

.content-block-text{
  color:var(--text-dark);
  font-size:14px;
  line-height:1.8;
  font-weight:600;
  white-space:normal;
}

body[data-theme="dark"] .content-block{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .content-block-text{
  color:var(--text-primary);
}

@media (max-width:960px){
  .content-block-grid{
    grid-template-columns:1fr;
  }
}

.block-edit-card {
  box-shadow: none;
}


/* =====================================================
   currency-rate-builder
===================================================== */

.currency-rate-modal{
    padding-top: 6px;
}

.currency-rate-inline{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
}

.currency-rate-fixed,
.currency-rate-equal,
.currency-rate-target{
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    white-space: nowrap;
}

.currency-rate-equal{
    opacity: .55;
}

.currency-rate-select,
.currency-rate-input{
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827 !important;
    font: inherit;
    font-weight: 600;
    outline: none;
    opacity: 1 !important;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.currency-rate-select{
    min-width: 92px;
    padding: 0 12px;
    cursor: pointer;
}

.currency-rate-input{
    flex: 1;
    min-width: 120px;
    padding: 0 14px;
}

.currency-rate-input::placeholder{
    color: #9ca3af;
}

.currency-rate-select option{
    color: #111827;
    background: #ffffff;
}

.currency-rate-select:focus,
.currency-rate-input:focus{
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(87,214,43,.12);
}

.swal2-popup .swal2-actions{
    gap: 10px;
}

.swal2-popup .swal2-confirm,
.swal2-popup .swal2-cancel{
    height: 42px;
    padding: 0 18px;
    border-radius: 12px !important;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none !important;
}

.swal2-popup .swal2-confirm{
    background: var(--primary) !important;
    color: #07111F !important;
}

.swal2-popup .swal2-confirm:hover{
    background: var(--primary-hover) !important;
}

.swal2-popup .swal2-cancel{
    background: #eef2f7 !important;
    color: #111827 !important;
}

.swal2-popup .swal2-cancel:hover{
    background: #e5e7eb !important;
}

@media (max-width: 520px){

    .currency-rate-inline{
        gap: 6px;
        padding: 10px;
    }

    .currency-rate-select{
        min-width: 74px;
        padding: 0 8px;
    }

    .currency-rate-input{
        min-width: 80px;
        padding: 0 10px;
    }

    .currency-rate-fixed,
    .currency-rate-equal,
    .currency-rate-target{
        font-size: 13px;
    }

}



/* =====================================================
   Content Tabs
===================================================== */

.content-tabs{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.content-tabs-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  border-bottom:1px solid rgba(0,0,0,.06);
  padding-bottom:12px;
}

body[data-theme="dark"] .content-tabs-nav{
  border-color:rgba(255,255,255,.06);
}

.content-tab-btn{
  min-height:42px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text-muted);
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}

.content-tab-btn:hover{
  background:rgba(87,214,43,.08);
  color:var(--primary);
}

.content-tab-btn.active{
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 22px rgba(87,214,43,.18);
}

.content-tab-panel[hidden]{
  display:none;
}

/* =====================================================
   Page Blocks
===================================================== */

.page-block-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}

.page-block-card{
  box-shadow:none;
}

.page-block-add-row{
  display:flex;
  justify-content:flex-end;
  margin-bottom:18px;
}

@media (max-width:960px){
  .page-block-actions,
  .page-block-add-row{
    flex-direction:column;
  }
}

/* =====================================================
   Storefront Homepage Slides
===================================================== */

.slide-preview-image {
  width: 400px;
  height: 240px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.slide-card-image-wrap{
  margin-top:12px;
}

.slide-card-image{
  width:100%;
  max-height:180px;
  object-fit:cover;
  border-radius:14px;
}

[data-slide-drag-handle] {
  cursor: grab;
}

[data-slide-drag-handle]:active {
  cursor: grabbing;
}

[data-slide-sort-item].is-dragging {
  opacity: .45;
}

.mobile-card-list [data-slide-drag-handle] {
  touch-action: none;
}

.mobile-sort-actions{
  display:flex;
  gap:8px;
}

/* =====================================================
   Homepage Section Compact Settings
===================================================== */

.homepage-section-compact{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
}

.homepage-section-compact-main{
  min-width:0;
  border:1px solid rgba(0,0,0,.06);
  background:rgba(15,23,42,.02);
  border-radius:16px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  text-align:start;
  font:inherit;
}

.homepage-section-compact-main:hover{
  border-color:rgba(87,214,43,.45);
  background:rgba(87,214,43,.05);
}

.homepage-section-compact-badges{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.homepage-section-compact-arrow{
  width:30px;
  height:30px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  flex:0 0 auto;
  transition:.18s ease;
}

.homepage-section-compact-main.is-active .homepage-section-compact-arrow{
  transform:rotate(180deg);
}

.homepage-section-toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  color:var(--text-dark);
  white-space:nowrap;
}

.homepage-section-advanced[hidden]{
  display:none !important;
}

body[data-theme="dark"] .homepage-section-compact-main{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.08);
}

body[data-theme="dark"] .homepage-section-compact-main:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(87,214,43,.45);
}

body[data-theme="dark"] .homepage-section-toggle{
  color:var(--text-primary);
}

@media (max-width:960px){
  .homepage-section-compact{
    grid-template-columns:1fr;
  }

  .homepage-section-toggle{
    justify-content:space-between;
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border-radius:14px;
    border:1px solid rgba(0,0,0,.06);
  }

  body[data-theme="dark"] .homepage-section-toggle{
    border-color:rgba(255,255,255,.08);
  }
}

/* =====================================================
   Orders View
===================================================== */

.order-view-shell{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 340px;
  gap:18px;
  align-items:start;
}

.order-view-main{
  display:flex;
  flex-direction:column;
  gap:18px;
  min-width:0;
}

.order-mobile-status-pills{
  display:none;
  flex-wrap:wrap;
  gap:8px;
}

.order-action-panel{
  position:sticky;
  top:calc(var(--topbar-height) + 18px);
  display:flex;
  flex-direction:column;
  gap:14px;
}

.order-action-buttons{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.order-action-buttons form,
.order-action-buttons .btn{
  width:100%;
}

.order-action-buttons .btn{
  justify-content:center;
}

.order-status-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.order-status-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.order-status-row + .order-status-row{
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.05);
}

.order-items-table{
  min-width:980px;
}

.order-timeline{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.order-timeline-item{
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  gap:12px;
}

.order-timeline-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
}

.order-timeline-content{
  padding-bottom:12px;
  border-bottom:1px solid rgba(0,0,0,.05);
}

.order-note-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.order-note-card{
  box-shadow:none;
}

body[data-theme="dark"] .order-status-row + .order-status-row,
body[data-theme="dark"] .order-timeline-content{
  border-color:rgba(255,255,255,.06);
}

@media (max-width:1100px){

  .order-view-shell{
    grid-template-columns:1fr;
  }

  .order-action-panel{
    position:sticky;
    bottom:0;
    top:auto;
    z-index:30;
    border-radius:18px 18px 0 0;
    margin-inline:-18px;
    padding:12px;
  }

  .order-action-panel .card-title,
  .order-action-panel .card-muted,
  .order-status-grid{
    display:none;
  }

  .order-action-buttons{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    gap:10px;
    direction:ltr;
  }
  
  .order-mobile-status-pills{
      display:flex;
    }

  .order-action-buttons form{
    margin:0;
    min-width:0;
  }

  .order-action-cancel{
    grid-column:1;
  }

  .order-action-primary{
    grid-column:2;
  }

  .order-action-buttons .btn{
    width:100% !important;
    min-width:0;
    direction:inherit;
  }
}



.clickable-row{
    cursor:pointer;
}

.clickable-row:hover{
    background:rgba(0,0,0,.03);
}

.data-card-clickable{
    cursor:pointer;
}

.data-card-clickable:hover{
    transform:translateY(-1px);
}

body[data-theme="dark"] .clickable-row:hover{
    background:rgba(255,255,255,.04);
}

/* =====================================================
   Storefront Grid Admin
===================================================== */

.storefront-grid-preview{
  display:grid;
  gap:18px;
}

.storefront-grid-profile-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:18px;
  align-items:center;
}

.storefront-grid-avatar{
  width:92px;
  height:92px;
  border-radius:50%;
  overflow:hidden;
  background:var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  font-weight:900;
  flex:0 0 auto;
}

.storefront-grid-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.storefront-grid-profile-main h3{
  margin:0 0 6px;
  font-size:22px;
  font-weight:900;
}

.storefront-grid-profile-main p{
  margin:0;
  color:var(--text-muted);
  line-height:1.7;
}

.storefront-grid-profile-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.storefront-grid-posts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.storefront-grid-post{
  position:relative;
  overflow:hidden;
  aspect-ratio:1/1;
  border-radius:16px;
  background:rgba(148,163,184,.16);
  border:1px solid rgba(0,0,0,.06);
}

.storefront-grid-post img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.storefront-grid-post-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding:8px;
  background:linear-gradient(to bottom,rgba(0,0,0,.42),transparent 55%);
  opacity:0;
  transition:.18s ease;
}

.storefront-grid-post:hover .storefront-grid-post-overlay{
  opacity:1;
}

.storefront-grid-post-actions{
  display:flex;
  gap:6px;
}

.storefront-grid-icon{
  width:34px;
  height:34px;
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.92);
  color:var(--text-dark);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  cursor:pointer;
}

.storefront-grid-icon.danger{
  color:var(--danger);
}

.storefront-grid-drag{
  cursor:grab;
}

.storefront-grid-post.is-dragging{
  opacity:.45;
}

.storefront-grid-empty{
  grid-column:1/-1;
  padding:36px 20px;
  text-align:center;
  color:var(--text-muted);
  border:1px dashed rgba(0,0,0,.16);
  border-radius:18px;
}

.grid-image-source-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.grid-image-source-option{
  cursor:pointer;
}

.grid-image-source-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.grid-image-source-card{
  min-height:92px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:#fff;
  padding:14px;
  display:grid;
  gap:8px;
  transition:.18s ease;
}

.grid-image-source-card i{
  font-size:24px;
  color:var(--primary);
}

.grid-image-source-card strong{
  font-size:14px;
  font-weight:900;
}

.grid-image-source-card small{
  color:var(--text-muted);
  font-size:12px;
  line-height:1.45;
}

.grid-image-source-option input:checked + .grid-image-source-card{
  border-color:var(--primary);
  background:rgba(87,214,43,.08);
  box-shadow:0 10px 24px rgba(87,214,43,.12);
}

[data-grid-image-panel][hidden]{
  display:none !important;
}

body[data-theme="dark"] .storefront-grid-post,
body[data-theme="dark"] .grid-image-source-card{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}

@media (max-width:960px){
  .storefront-grid-profile-card{
    grid-template-columns:1fr;
    text-align:center;
    justify-items:center;
  }

  .storefront-grid-profile-actions{
    width:100%;
    flex-direction:column;
  }

  .storefront-grid-profile-actions .btn{
    width:100%;
  }

  .storefront-grid-post-overlay{
    opacity:1;
  }

  .grid-image-source-options{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   Storefront Grid Admin Refinements
===================================================== */

.storefront-grid-profile-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.storefront-grid-profile-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:8px 0 10px;
}

.storefront-grid-profile-edit{
  flex:0 0 auto;
}

.storefront-grid-intro{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(87,214,43,.08);
  color:var(--text-dark);
  font-size:14px;
  font-weight:800;
}

.storefront-grid-intro span{
  min-width:0;
  line-height:1.6;
}


.storefront-grid-mobile-actions{
  display:none;
}

@media (max-width:960px){

  .storefront-grid-profile-card{
    display:flex;
    align-items:flex-start;
    text-align:start;
    justify-items:initial;
    gap:14px;
  }

  .storefront-grid-avatar{
    width:72px;
    height:72px;
    font-size:28px;
  }

  .storefront-grid-profile-main{
    width:100%;
    min-width:0;
  }

  .storefront-grid-profile-main h3{
    font-size:19px;
  }

  .storefront-grid-profile-actions{
    display:none;
  }

  .storefront-grid-post{
    overflow:visible;
    border-radius:14px;
    background:transparent;
    border:0;
  }

  .storefront-grid-post > img,
  .storefront-grid-post > .media-placeholder{
    aspect-ratio:1/1;
    border-radius:14px;
    border:1px solid rgba(0,0,0,.06);
    background:rgba(148,163,184,.16);
    overflow:hidden;
  }

  .storefront-grid-post-overlay{
    display:none;
  }

  .storefront-grid-mobile-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin-top:6px;
  }

  .storefront-grid-mobile-actions .storefront-grid-icon{
    width:100%;
    height:34px;
    border:1px solid rgba(0,0,0,.06);
    background:#fff;
  }

  .storefront-grid-post .status-badge{
    position:static !important;
    display:flex;
    margin-top:6px;
    justify-content:center;
  }
}


/* =====================================================
   inventory settings
===================================================== */
.settings-card-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.settings-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:18px;
  background:rgba(0,0,0,.015);
}

.settings-card-main{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.settings-card-icon{
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  flex:0 0 auto;
  font-size:22px;
}

.settings-card-large{
  align-items:flex-start;
  flex-wrap:wrap;
}

.settings-explain-grid{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:12px;
}

.settings-explain-box{
  padding:14px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
}

.settings-explain-box ul{
  margin:10px 0 0;
  padding-inline-start:20px;
  color:var(--text-muted);
  font-size:13px;
  line-height:1.6;
}

body[data-theme="dark"] .settings-card{
  border-color:rgba(255,255,255,.07);
  background:rgba(255,255,255,.03);
}

body[data-theme="dark"] .settings-explain-box{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.07);
}

@media (max-width: 768px){
  .settings-card{
    align-items:flex-start;
  }

  .settings-explain-grid{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   payment
===================================================== */

.payment-instructions-section {
    grid-column: 1 / -1;
}

.payment-variable-wrap {
    margin-bottom: 16px;
}

.payment-instructions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .payment-instructions-grid {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   Platform Templates
===================================================== */

.modal-xl{
  width:min(1180px, 95vw);
}

.modal-search-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
}

.modal-search-row .form-control-wrap{
  min-width:0;
}

.platform-template-browser{
  display:flex;
  flex-direction:column;
  gap:16px;
}

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

.platform-template-card{
  display:grid;
  grid-template-columns:52px minmax(0, 1fr);
  gap:14px;
  padding:16px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.045);
  transition:.18s ease;
}

.platform-template-card:hover{
  border-color:rgba(87,214,43,.45);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
  transform:translateY(-1px);
}

.platform-template-card-icon{
  width:52px;
  height:52px;
  border-radius:16px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
}

.platform-template-card-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.platform-template-card-title{
  font-size:15px;
  font-weight:900;
  line-height:1.35;
  color:var(--text-dark);
}

.platform-template-card-desc{
  min-height:38px;
  font-size:13px;
  line-height:1.55;
  color:var(--text-muted);
}

.platform-template-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:2px;
}

.platform-template-card-meta span{
  min-height:28px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(15,23,42,.05);
  color:var(--text-muted);
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:800;
}

.platform-template-card-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:auto;
}

.platform-template-pagination{
  margin-top:4px;
  padding-top:14px;
  border-top:1px solid rgba(0,0,0,.06);
}

body[data-theme="dark"] .platform-template-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.08);
}

body[data-theme="dark"] .platform-template-card:hover{
  border-color:rgba(87,214,43,.45);
}

body[data-theme="dark"] .platform-template-card-title{
  color:var(--text-primary);
}

body[data-theme="dark"] .platform-template-card-meta span{
  background:rgba(255,255,255,.06);
  color:var(--text-secondary);
}

body[data-theme="dark"] .platform-template-pagination{
  border-color:rgba(255,255,255,.08);
}

@media (max-width:760px){
  .platform-template-grid{
    grid-template-columns:1fr;
  }

  .platform-template-card{
    grid-template-columns:44px minmax(0, 1fr);
  }

  .platform-template-card-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    font-size:21px;
  }

  .modal-search-row{
    grid-template-columns:1fr;
  }

  .modal-search-row .btn{
    width:100%;
  }
}

/* =====================================================
   Store Onboarding Center
===================================================== */

.onboarding-shell{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.onboarding-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  gap:28px;
  align-items:center;
  padding:30px;
}

.onboarding-hero::before{
  content:'';
  position:absolute;
  inset:auto -80px -140px auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:rgba(87,214,43,.16);
  filter:blur(8px);
  pointer-events:none;
}

.onboarding-hero-main{
  position:relative;
  z-index:1;
  min-width:0;
}

.onboarding-kicker{
  width:max-content;
  max-width:100%;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:900;
  margin-bottom:14px;
}

.onboarding-kicker i{
  font-size:18px;
}

.onboarding-title{
  margin:0 0 10px;
  font-size:32px;
  line-height:1.18;
  font-weight:900;
  letter-spacing:-.03em;
}

.onboarding-subtitle{
  margin:0;
  max-width:720px;
  color:var(--text-muted);
  font-size:15px;
  line-height:1.8;
}

.onboarding-progress-wrap{
  margin-top:26px;
  max-width:680px;
}

.onboarding-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  font-size:13px;
  color:var(--text-muted);
}

.onboarding-progress-head strong{
  color:var(--text-dark);
}

body[data-theme="dark"] .onboarding-progress-head strong{
  color:var(--text-primary);
}

.onboarding-progress-track{
  height:14px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(148,163,184,.22);
  box-shadow:inset 0 1px 2px rgba(0,0,0,.08);
}

.onboarding-progress-bar{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--primary), #9DFF73);
  box-shadow:0 8px 20px rgba(87,214,43,.28);
  transition:width .35s ease;
}

.onboarding-score-card{
  position:relative;
  z-index:1;
  border-radius:24px;
  background:linear-gradient(160deg, rgba(27,34,54,.96), rgba(7,17,31,.96));
  color:#fff;
  padding:22px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  box-shadow:0 18px 45px rgba(7,17,31,.22);
}

.onboarding-score-ring{
  width:118px;
  height:118px;
  border-radius:50%;
  display:grid;
  place-items:center;
  margin-bottom:16px;
  position:relative;
}

.onboarding-score-ring span{
  font-size:28px;
  font-weight:900;
}

.onboarding-score-card strong{
  font-size:15px;
  font-weight:900;
}

.onboarding-score-card p{
  margin:8px 0 0;
  color:rgba(255,255,255,.68);
  font-size:13px;
  line-height:1.6;
}

.onboarding-section{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.onboarding-section-heading{
  display:flex;
  align-items:center;
  gap:12px;
}

.onboarding-section-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
}

.onboarding-section-heading h3{
  margin:0;
  font-size:18px;
  font-weight:900;
}

.onboarding-task-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.onboarding-task-card{
  position:relative;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:22px;
  padding:18px;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:14px;
  box-shadow:0 10px 30px rgba(15,23,42,.045);
  transition:.18s ease;
}

.onboarding-task-card:hover{
  transform:translateY(-2px);
  border-color:rgba(87,214,43,.38);
  box-shadow:0 16px 34px rgba(15,23,42,.075);
}

.onboarding-task-card.is-complete{
  border-color:rgba(34,197,94,.24);
  background:linear-gradient(180deg, rgba(34,197,94,.045), #fff 44%);
}


.onboarding-task-card.is-complete .onboarding-task-status{
  background:var(--success);
  color:#fff;
}

.onboarding-task-icon{
  width:52px;
  height:52px;
  border-radius:17px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:25px;
}

.onboarding-task-content{
  min-width:0;
}

.onboarding-task-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.onboarding-task-top h4{
  margin:0;
  font-size:16px;
  line-height:1.35;
  font-weight:900;
}

.onboarding-task-card p{
  margin:0;
  color:var(--text-muted);
  font-size:13px;
  line-height:1.7;
}

.onboarding-mini-checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}

.onboarding-mini-checklist div{
  min-height:34px;
  padding:0 10px;
  border-radius:12px;
  background:rgba(148,163,184,.12);
  color:var(--text-muted);
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:800;
}

.onboarding-mini-checklist div i{
  width:18px;
  height:18px;
  border-radius:999px;
  background:rgba(148,163,184,.22);
  color:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
}

.onboarding-mini-checklist div.is-done{
  background:rgba(34,197,94,.10);
  color:#15803d;
}

.onboarding-mini-checklist div.is-done i{
  background:var(--success);
  color:#fff;
}

.onboarding-task-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.onboarding-task-actions .btn{
  width:auto;
}

body[data-theme="dark"] .onboarding-task-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

body[data-theme="dark"] .onboarding-task-card.is-complete{
  background:linear-gradient(180deg, rgba(34,197,94,.08), var(--bg-card) 48%);
  border-color:rgba(34,197,94,.22);
}

body[data-theme="dark"] .onboarding-mini-checklist div{
  background:rgba(255,255,255,.045);
}

body[data-theme="dark"] .onboarding-mini-checklist div.is-done{
  background:rgba(34,197,94,.14);
  color:#86efac;
}

@media (max-width:1100px){
  .onboarding-hero{
    grid-template-columns:1fr;
  }

  .onboarding-score-card{
    align-items:flex-start;
    text-align:start;
  }

  .onboarding-score-ring{
    width:96px;
    height:96px;
  }

  .onboarding-score-ring span{
    font-size:23px;
  }
}

@media (max-width:960px){
  .onboarding-hero{
    padding:22px;
  }

  .onboarding-title{
    font-size:25px;
  }

  .onboarding-task-grid{
    grid-template-columns:1fr;
  }

  .onboarding-task-card{
    grid-template-columns:46px minmax(0,1fr);
    padding:16px;
  }

  .onboarding-task-icon{
    width:46px;
    height:46px;
    border-radius:15px;
    font-size:22px;
  }

  .onboarding-task-actions{
    flex-direction:column;
  }

  .onboarding-task-actions .btn{
    width:100%;
  }
}

@media (max-width:560px){
  .onboarding-mini-checklist{
    grid-template-columns:1fr;
  }

  .onboarding-progress-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* ================================
   Store Dashboard
================================ */

.dashboard-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-range-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-range-form .form-control {
    min-width: 150px;
}

.dashboard-custom-date {
    max-width: 160px;
}

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

.dashboard-chart {
    width: 100%;
    min-height: 280px;
    max-height: 320px;
}

.dashboard-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-mini-grid > div {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.dashboard-mini-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-mini-grid strong {
    display: block;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 700;
}

.dashboard-alert-list {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.dashboard-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.dashboard-alert-row strong,
.dashboard-alert-row span {
    display: block;
}

.dashboard-alert-row span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-alert-row b {
    white-space: nowrap;
    font-size: 15px;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .dashboard-hero-card {
        flex-direction: column;
    }

    .dashboard-range-form {
        width: 100%;
    }

    .dashboard-range-form .form-control,
    .dashboard-range-form .btn {
        width: 100%;
        max-width: none;
    }

    .dashboard-two-col {
        grid-template-columns: 1fr;
    }

    .dashboard-mini-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Dashboard Toolbar
========================================================== */

.dashboard-toolbar .toolbar-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.dashboard-toolbar .toolbar-heading {
    flex: 1;
}

.dashboard-toolbar .toolbar-heading h2 {
    margin: 0;
}

.dashboard-toolbar .toolbar-heading p {
    margin: .35rem 0 0;
}

.dashboard-toolbar .toolbar-actions {
    margin-left: auto;
    align-self: flex-start;
}

/* =====================================================
   Store Dashboard V2
===================================================== */

.dashboard-page{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.dashboard-section{
  min-width:0;
}

.dashboard-toolbar{
  margin-bottom:0;
}

.dashboard-toolbar .toolbar-header-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.dashboard-toolbar .toolbar-heading{
  min-width:0;
  flex:1;
}

.dashboard-toolbar .toolbar-heading h2{
  margin:0;
  font-size:24px;
  line-height:1.2;
  font-weight:900;
}

.dashboard-toolbar .toolbar-heading p{
  margin:7px 0 0;
  color:var(--text-muted);
  font-size:14px;
  line-height:1.7;
}

.dashboard-toolbar .toolbar-main-row{
  justify-content:flex-end;
}

.dashboard-toolbar .toolbar-actions{
  margin-inline-start:auto;
}

.dashboard-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.dashboard-stat,
.dashboard-card{
  background:#fff;
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.05);
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

body[data-theme="dark"] .dashboard-stat,
body[data-theme="dark"] .dashboard-card{
  background:var(--bg-card);
  border-color:rgba(255,255,255,.06);
}

.dashboard-stat{
  padding:22px;
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.dashboard-stat-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  background:rgba(87,214,43,.12);
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  flex:0 0 auto;
}

.dashboard-stat-content{
  min-width:0;
  flex:1;
}

.dashboard-stat-label{
  font-size:13px;
  color:var(--text-muted);
  margin-bottom:6px;
  line-height:1.4;
}

.dashboard-stat-value{
  font-size:26px;
  line-height:1.2;
  font-weight:900;
  color:var(--text-dark);
  overflow-wrap:anywhere;
}

body[data-theme="dark"] .dashboard-stat-value{
  color:var(--text-primary);
}

.dashboard-card-grid{
  display:grid;
  gap:18px;
  min-width:0;
}

.dashboard-card-grid--two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.dashboard-card{
  padding:22px;
  min-width:0;
}

.dashboard-card-header{
  margin-bottom:16px;
}

.dashboard-card-header--split{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.dashboard-card-title{
  margin:0;
  font-size:18px;
  line-height:1.3;
  font-weight:900;
  color:var(--text-dark);
}

body[data-theme="dark"] .dashboard-card-title{
  color:var(--text-primary);
}

.dashboard-card-muted{
  margin:0;
  color:var(--text-muted);
  line-height:1.7;
  font-size:14px;
}

.dashboard-card-footer{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
}

.dashboard-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.dashboard-summary-item{
  min-width:0;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.06);
  background:rgba(15,23,42,.025);
}

body[data-theme="dark"] .dashboard-summary-item{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.06);
}

.dashboard-summary-item span{
  display:block;
  margin-bottom:7px;
  color:var(--text-muted);
  font-size:13px;
  line-height:1.35;
}

.dashboard-summary-item strong{
  display:block;
  color:var(--text-dark);
  font-size:22px;
  line-height:1.2;
  font-weight:900;
  overflow-wrap:anywhere;
}

body[data-theme="dark"] .dashboard-summary-item strong{
  color:var(--text-primary);
}

.dashboard-alert-list{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.dashboard-alert-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.06);
  background:rgba(15,23,42,.025);
}

body[data-theme="dark"] .dashboard-alert-row{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.06);
}

.dashboard-alert-row strong,
.dashboard-alert-row span{
  display:block;
}

.dashboard-alert-row strong{
  color:var(--text-dark);
  font-size:14px;
  line-height:1.4;
}

body[data-theme="dark"] .dashboard-alert-row strong{
  color:var(--text-primary);
}

.dashboard-alert-row span{
  margin-top:4px;
  color:var(--text-muted);
  font-size:12px;
  line-height:1.35;
}

.dashboard-alert-row b{
  white-space:nowrap;
  font-size:15px;
  font-weight:900;
  color:var(--text-dark);
}

body[data-theme="dark"] .dashboard-alert-row b{
  color:var(--text-primary);
}

/* Charts */
.dashboard-card--chart{
  overflow:hidden;
}

.dashboard-chart-wrap{
  position:relative;
  width:100%;
  min-height:260px;
  height:300px;
  max-height:320px;
}

.dashboard-chart{
  width:100% !important;
  height:300px !important;
  min-height:260px !important;
  max-height:320px !important;
  display:block;
}

.dashboard-table-wrap{
  margin-top:4px;
}

.dashboard-table{
  min-width:860px;
}

/* Desktop refinements */
@media (max-width:1200px){
  .dashboard-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Mobile dashboard */
@media (max-width:960px){

  .dashboard-page{
    gap:14px;
  }

  .dashboard-toolbar{
    padding:16px;
  }

  .dashboard-toolbar .toolbar-header-row{
    display:block;
  }

  .dashboard-toolbar .toolbar-heading h2{
    font-size:22px;
  }

  .dashboard-toolbar .toolbar-heading p{
    font-size:13px;
    line-height:1.6;
  }

  .dashboard-toolbar .toolbar-main-row{
    margin-top:14px;
  }

  .dashboard-toolbar .toolbar-actions{
    display:block;
    width:100%;
    margin-inline-start:0;
  }

  .dashboard-toolbar .toolbar-filter-modal-btn{
    width:100%;
  }

  .dashboard-stats-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .dashboard-stat{
    padding:16px;
    border-radius:16px;
    gap:12px;
  }

  .dashboard-stat-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    font-size:21px;
  }

  .dashboard-stat-label{
    font-size:12px;
    margin-bottom:4px;
  }

  .dashboard-stat-value{
    font-size:21px;
  }

  .dashboard-card-grid--two{
    grid-template-columns:1fr;
  }

  .dashboard-card-grid{
    gap:14px;
  }

  .dashboard-card{
    padding:18px;
    border-radius:16px;
  }

  .dashboard-card-title{
    font-size:17px;
  }

  .dashboard-card-header--split{
    flex-direction:column;
    align-items:stretch;
  }

  .dashboard-card-header--split .btn{
    width:100%;
  }

  .dashboard-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .dashboard-summary-item{
    padding:12px;
    border-radius:14px;
  }

  .dashboard-summary-item span{
    font-size:12px;
  }

  .dashboard-summary-item strong{
    font-size:19px;
  }

  .dashboard-alert-row{
    align-items:flex-start;
    border-radius:14px;
    padding:12px;
  }

  .dashboard-card-footer{
    justify-content:stretch;
  }

  .dashboard-card-footer .btn{
    width:100%;
  }

    .dashboard-chart-wrap{
      min-height:240px;
      height:260px;
      max-height:280px;
    }
    
    .dashboard-chart{
      height:260px !important;
      min-height:240px !important;
      max-height:280px !important;
    }

  .dashboard-table{
    min-width:760px;
  }
}

@media (max-width:520px){

  .dashboard-summary-grid{
    grid-template-columns:1fr;
  }

  .dashboard-stat{
    align-items:flex-start;
  }

    .dashboard-chart-wrap{
      min-height:230px;
      height:250px;
      max-height:270px;
    }
    
    .dashboard-chart{
      height:250px !important;
      min-height:230px !important;
      max-height:270px !important;
    }
}