/* Card */
.dx-app .dx-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.dx-app .dx-card-h{
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dx-app .dx-card-b{
  padding: 16px;
}

/* Buttons (don’t override .btn globally — create dx variants) */
.dx-app .dx-btn{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dx-app .dx-btn-primary{
  background: var(--brand);
  color: #fff;
}
.dx-app .dx-btn-primary:hover{ background: var(--brand-600); }

.dx-app .dx-btn-outline{
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.dx-app .dx-btn-outline:hover{ border-color: #D1D5DB; }

/* Forms */
.dx-app .dx-label{
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.dx-app .dx-input,
.dx-app .dx-select{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

.dx-app .dx-input:focus,
.dx-app .dx-select:focus{
  box-shadow: var(--ring);
  border-color: rgba(76,175,47,.55); /* OR define --brand-rgba token if you want */
}


/* Tables */
.dx-app .dx-table-wrap{
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dx-app .dx-table{
  margin: 0;
}

.dx-app .dx-table thead th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dx-app .dx-table tbody td{
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.dx-app .dx-table tbody tr:hover{
  background: #FAFCFF;
}

/* Badges */
.dx-app .dx-badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #fff;
}
.dx-app .dx-badge-success{ border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.10); }
.dx-app .dx-badge-warning{ border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12); }
.dx-app .dx-badge-danger{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); }

/* =========================
   DX Topbar (Premium)
   ========================= */

.dx-app .dx-topbar{
  position: sticky;
  top: 0;
  z-index: 1030; /* stays above content, under modals */
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.dx-app .dx-topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.dx-app .dx-topbar-title{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0;
  color: var(--text);
}

.dx-app .dx-topbar-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.dx-app .dx-topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Topbar action button */
.dx-app .dx-topbar-action{
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* User pill */
.dx-app .dx-user{
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .18s ease, border-color .18s ease;
}

.dx-app .dx-user:hover{
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.dx-app .dx-user:active{
  transform: translateY(1px);
}

.dx-app .dx-user-avatar{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: var(--glow-brand);
}

.dx-app .dx-user-meta{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.dx-app .dx-user-role{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--text);
}

.dx-app .dx-user-phone{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.dx-app .dx-user-caret{
  font-size: 12px;
  color: var(--muted);
  margin-left: 2px;
}

/* Dropdown menu premium */
.dx-app .dx-menu{
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 240px;
}

.dx-app .dx-menu .dropdown-item{
  padding: 10px 14px;
}

.dx-app .dx-menu-item{
  font-weight: 600;
}

.dx-app .dx-menu-item:hover{
  background: rgba(76,175,47,.08);
}

/* Mobile tightening */
@media (max-width: 576px){
  .dx-app .dx-topbar-inner{
    padding: 12px 12px;
  }
  .dx-app .dx-topbar-title{
    font-size: 16px;
  }
}
/* =========================
   DX Sidebar (Premium)
   ========================= */

.dx-app .dx-sidebar{
  width: var(--sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 10px 0 30px rgba(26,31,44,.04);
}

.dx-app .dx-sidebar-brand{
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
}

.dx-app .dx-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  padding: 10px 10px;
  border-radius: 16px;
  transition: background .15s ease, transform .08s ease;
}

.dx-app .dx-brand:hover{
  background: rgba(76,175,47,.06);
}

.dx-app .dx-brand:active{
  transform: translateY(1px);
}

.dx-app .dx-brand-logo{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  display: grid;
  place-items: center;
  box-shadow: var(--glow-brand);
  overflow: hidden;
}

.dx-app .dx-brand-logo img{
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* makes logo white if colored */
}

.dx-app .dx-brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.dx-app .dx-brand-name{
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .2px;
}

.dx-app .dx-brand-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* Scroll region */
.dx-app .dx-sidebar-scroll{
  padding: 10px 10px 14px;
  overflow: auto;
  flex: 1;
}

/* Footer */
.dx-app .dx-sidebar-footer{
  padding: 14px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(249,251,255,.9));
}

.dx-app .dx-userbox{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 12px;
  margin-bottom: 12px;
}

.dx-app .dx-userbox-label{
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .02em;
}

.dx-app .dx-userbox-value{
  margin-top: 4px;
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.dx-app .dx-userbox-role{
  margin-top: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--brand-700);
}

.dx-app .dx-sidebar-logout .dx-btn{
  height: 42px;
  border-radius: 14px;
  justify-content: center;
  gap: 10px;
}

.dx-app .dx-sidebar-meta{
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.dx-app .dx-dot{
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,193,7,.15);
}

/* =========================
   DX Sidebar Navigation
   ========================= */

.dx-app .dx-nav{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dx-app .dx-nav-section{
  padding: 2px 4px;
}

.dx-app .dx-nav-h{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px;
}

/* Parent button */
.dx-app .dx-nav-parent{
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.dx-app .dx-nav-parent:hover{
  background: rgba(76,175,47,.06);
  border-color: rgba(76,175,47,.14);
}

.dx-app .dx-nav-parent:active{
  transform: translateY(1px);
}

.dx-app .dx-nav-ic{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  flex: 0 0 auto;
}

.dx-app .dx-nav-txt{
  font-weight: 800;
  font-size: 13px;
  flex: 1;
  text-align: left;
}

.dx-app .dx-nav-caret{
  color: var(--muted);
  font-size: 12px;
  transition: transform .2s ease;
}

.dx-app .dx-nav-parent.is-open .dx-nav-caret{
  transform: rotate(180deg);
}

/* Single item (Dashboard etc) */
.dx-app .dx-nav-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}

.dx-app .dx-nav-item:hover{
  background: rgba(76,175,47,.06);
  border-color: rgba(76,175,47,.14);
}

.dx-app .dx-nav-item.is-active{
  background: rgba(76,175,47,.12);
  border-color: rgba(76,175,47,.22);
}

.dx-app .dx-nav-item.is-active .dx-nav-ic{
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-brand);
}

/* Children wrapper */
.dx-app .dx-nav-children{
  margin-top: 8px;
  margin-left: 42px; /* aligns under label */
  padding-left: 10px;
  border-left: 1px dashed rgba(107,114,128,.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Child link */
.dx-app .dx-nav-child{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 13px;
  transition: background .15s ease;
}

.dx-app .dx-nav-child:hover{
  background: rgba(76,175,47,.06);
}

.dx-app .dx-nav-child.is-active{
  background: rgba(76,175,47,.12);
  color: var(--text);
}

/* Divider within children */
.dx-app .dx-nav-divider{
  height: 1px;
  background: rgba(229,231,235,.9);
  margin: 6px 2px;
}

/* Dot uses your token accent (already defined) */
.dx-app .dx-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,193,7,.15);
}
/* =========================
   DX Offcanvas (Mobile Sidebar)
   ========================= */

.dx-app .dx-offcanvas{
  width: 320px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.dx-app .dx-offcanvas-header{
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dx-app .dx-offcanvas-body{
  padding: 12px 12px 14px;
}

.dx-app .dx-close{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--text);
}

.dx-app .dx-close:hover{
  background: var(--surface-2);
}

/* Footer spacing */
.dx-app .dx-offcanvas-footer{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ===========================
   Premium Pager (GrociKart)
   =========================== */

.dx-pagerbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;

  padding: 14px 16px;
  border-top: 1px solid rgba(15,23,42,.08);

  background: linear-gradient(180deg,
    rgba(255,255,255,.96),
    rgba(248,250,252,.96)
  );

  border-radius: 0 0 18px 18px;
}

.dx-pager-info{
  font-size: 13px;
  color: rgba(15,23,42,.62);
  display:flex;
  align-items:center;
  gap:10px;
}

.dx-pager-info b{
  color: rgba(15,23,42,.92);
  font-weight: 800;
}

.dx-pager-right{ margin-left:auto; }

.dx-pagination{ display:block; }

.dx-pagination-list{
  list-style:none;
  padding:0;
  margin:0;

  display:flex;
  align-items:center;
  gap:10px;
}

/* Button + Number base */
.dx-page-btn,
.dx-page-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height: 40px;
  min-width: 44px;
  padding: 0 14px;

  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);

  color: rgba(15,23,42,.78);
  text-decoration:none;

  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2px;

  box-shadow:
    0 10px 26px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.70) inset;

  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease;
}

/* Prev/Next a bit softer text */
.dx-page-btn{
  min-width: 88px;
  gap:8px;
  padding: 0 16px;
  font-weight: 800;
}

.dx-page-btn i{ opacity: .7; }

/* Hover: premium lift + brand edge */
.dx-page-btn:hover,
.dx-page-num:hover{
  transform: translateY(-1px);
  border-color: rgba(89,170,40,.35);
  box-shadow:
    0 16px 44px rgba(15,23,42,.10),
    0 1px 0 rgba(255,255,255,.75) inset;
}

/* Active page: brand-filled (premium) */
.dx-pagination-list .is-active .dx-page-num{
  border-color: rgba(89,170,40,.55);
  background: linear-gradient(180deg, #74C233 0%, #59AA28 100%);
  color: #fff;
  box-shadow:
    0 18px 55px rgba(89,170,40,.25),
    0 1px 0 rgba(255,255,255,.20) inset;
}

/* Disabled */
.dx-pagination-list .is-disabled .dx-page-btn{
  opacity: .45;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

/* Make pager feel part of the table card */
.dx-card .dx-pagerbar{
  margin: 0;
}

/* Mobile: compact */
@media (max-width: 576px){
  .dx-pagerbar{
    padding: 12px 12px;
    gap:12px;
  }
  .dx-page-btn,
  .dx-page-num{
    height: 38px;
    border-radius: 12px;
  }
  .dx-page-btn{
    min-width: 76px;
    padding: 0 12px;
  }
}


/* =========================
   DX Alerts / Empty / Timeline (Orders Detail)
   ========================= */

.dx-app .dx-alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.dx-app .dx-alert-success{
  border-color: rgba(16,185,129,.35);
  background: rgba(16,185,129,.10);
}
.dx-app .dx-alert-danger{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.dx-app .dx-empty{
  border: 1px dashed rgba(107,114,128,.35);
  border-radius: 18px;
  padding: 18px;
  text-align:center;
  background: rgba(249,251,255,.8);
}
.dx-app .dx-empty-sm{ padding: 14px; border-radius: 16px; }
.dx-app .dx-empty-ic{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display:grid;
  place-items:center;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  color: var(--text);
}
.dx-app .dx-empty-t{ font-weight: 900; }
.dx-app .dx-empty-s{ margin-top: 4px; font-size: 13px; color: var(--muted); }

.dx-app .dx-note{
  min-width: 260px;
  background: rgba(255,193,7,.10);
  border: 1px solid rgba(255,193,7,.28);
  border-radius: 16px;
  padding: 12px 12px;
}

.dx-app .dx-qty{
  display:inline-flex;
  min-width: 34px;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 900;
}

.dx-app .dx-divider{
  height: 1px;
  background: rgba(229,231,235,.95);
}

/* Key-value totals */
.dx-app .dx-kv{ display:flex; flex-direction:column; gap:10px; }
.dx-app .dx-kv-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size: 14px;
}
.dx-app .dx-kv-divider{
  height:1px;
  background: rgba(229,231,235,.95);
  margin: 6px 0;
}
.dx-app .dx-kv-total{
  font-weight: 900;
  font-size: 16px;
}

/* Right side slab for assignee */
.dx-app .dx-slab{
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(249,251,255,.75);
}

/* Delivery meta grid */
.dx-app .dx-meta-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dx-app .dx-meta{
  border: 1px solid rgba(229,231,235,.9);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(26,31,44,.04);
}
@media (max-width: 576px){
  .dx-app .dx-meta-grid{ grid-template-columns: 1fr; }
}

/* Timeline */
.dx-app .dx-timeline{
  display:flex;
  flex-direction:column;
  gap: 14px;
  position: relative;
}

.dx-app .dx-tl-item{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.dx-app .dx-dotline{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid rgba(107,114,128,.35);
  margin-top: 4px;
  position: relative;
  flex: 0 0 auto;
}
.dx-app .dx-dotline::after{
  content:"";
  position:absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: 2px;
  height: 46px;
  background: rgba(107,114,128,.22);
}
.dx-app .dx-tl-item:last-child .dx-dotline::after{ display:none; }

.dx-app .dx-dotline.is-success{ border-color: rgba(16,185,129,.55); box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.dx-app .dx-dotline.is-warning{ border-color: rgba(245,158,11,.55); box-shadow: 0 0 0 4px rgba(245,158,11,.14); }
.dx-app .dx-dotline.is-danger{ border-color: rgba(239,68,68,.55); box-shadow: 0 0 0 4px rgba(239,68,68,.12); }

.dx-app .dx-tl-body{
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 12px;
  box-shadow: var(--shadow-xs);
}

.dx-app .dx-tl-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.dx-app .dx-tl-title{
  font-weight: 900;
  font-size: 14px;
}
.dx-app .dx-tl-time{
  font-size: 12px;
  color: var(--muted);
}

.dx-app .dx-tl-meta{
  margin-top: 6px;
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.dx-app .dx-tl-actor{ font-weight: 800; color: var(--text-soft); }
.dx-app .dx-tl-role{
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(229,231,235,.95);
  background: rgba(249,251,255,.9);
  font-weight: 800;
  letter-spacing: .02em;
}

.dx-app .dx-tl-reason{
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
  background: rgba(76,175,47,.06);
  border: 1px solid rgba(76,175,47,.18);
  border-radius: 14px;
  padding: 10px 10px;
}

/* Copy feedback */
.dx-app .dx-copy-btn.is-copied{
  border-color: rgba(76,175,47,.35);
  box-shadow: var(--shadow-xs);
}
