/* ===================================================================
   DASHBOARD V2 — Authoritative Design System
   Loaded LAST — overrides everything above it.
   Matches the landing page premium red/black aesthetic.
   =================================================================== */

/* ───────────────────────── 1. TOKENS ──────────────────────────── */
:root {
  /* Brand */
  --d-red:         #ef233c;
  --d-red-2:       #c81d32;
  --d-red-3:       #7f101c;
  --d-purple:      #7c3aed;
  --d-purple-2:    #6d28d9;

  /* Backgrounds */
  --d-bg:          #050506;
  --d-surface:     #0b0d10;
  --d-card:        #0f1117;
  --d-card-2:      #151820;
  --d-hover:       rgba(255,255,255,.04);

  /* Borders */
  --d-border:      rgba(255,255,255,.08);
  --d-border-2:    rgba(255,255,255,.14);

  /* Text */
  --d-text:        #f0f2f8;
  --d-muted:       #8892a4;
  --d-soft:        rgba(255,255,255,.55);

  /* Status */
  --d-success:     #22c55e;
  --d-warning:     #eab308;
  --d-info:        #38bdf8;
  --d-danger:      #ef4444;

  /* Accents */
  --d-gradient:    linear-gradient(135deg, #ef233c 0%, #c81d32 60%, #7c3aed 100%);
  --d-glow:        0 0 24px rgba(239,35,60,.28);
  --d-glow-sm:     0 0 12px rgba(239,35,60,.18);

  /* Radius */
  --d-r:           12px;
  --d-r-sm:        8px;
  --d-r-xs:        6px;

  /* Sidebar */
  --d-sidebar-w:   276px;
  --d-sidebar-c:   72px;  /* collapsed */

  /* Transitions */
  --d-t:           0.2s ease;
  --d-t-slow:      0.35s cubic-bezier(.4,0,.2,1);

  /* Shadows */
  --d-shadow:      0 4px 24px rgba(0,0,0,.6);
  --d-shadow-sm:   0 2px 8px rgba(0,0,0,.4);
}

/* ───────────────────────── 2. BASE ────────────────────────────── */
*,::before,::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.body {
  background: var(--d-bg) !important;
  color: var(--d-text) !important;
  font-family: var(--d-font, 'Cairo','Inter',system-ui,sans-serif) !important;
  min-height: 100vh;
  overflow-x: hidden;
}

body.body-rtl { direction: rtl; }
body:not(.body-rtl) { direction: ltr; }

/* ───────────────────────── 3. LAYOUT SHELL ────────────────────── */
.wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content-wrapper {
  flex: 1;
  min-width: 0;
  margin-inline-start: var(--d-sidebar-w);
  transition: margin var(--d-t-slow);
  display: flex;
  flex-direction: column;
}

body.sidebar-collapsed .main-content-wrapper {
  margin-inline-start: var(--d-sidebar-c);
}

/* ───────────────────────── 4. SIDEBAR ─────────────────────────── */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--d-sidebar-w);
  background: var(--d-surface);
  border-inline-end: 1px solid var(--d-border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width var(--d-t-slow), transform var(--d-t-slow);
  overflow: hidden;
}

body.sidebar-collapsed .sidebar {
  width: var(--d-sidebar-c);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Brand */
.pro-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  text-decoration: none !important;
  border-bottom: 1px solid var(--d-border);
  flex-shrink: 0;
  transition: padding var(--d-t-slow);
}

.pro-sidebar-brand .pro-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--d-r-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.pro-sidebar-brand-text strong {
  display: block;
  color: var(--d-text);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.pro-sidebar-brand-text small {
  color: var(--d-muted);
  font-size: .7rem;
  white-space: nowrap;
  overflow: hidden;
  display: block;
}

body.sidebar-collapsed .pro-sidebar-brand-text,
body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-profile-name,
body.sidebar-collapsed .sidebar-profile-balance .amount {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}

/* Collapse toggle */
.sidebar-collapse-toggle {
  display: none; /* shown on desktop via media query */
  position: absolute;
  inset-inline-end: -14px;
  top: 24px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--d-border);
  background: var(--d-card);
  color: var(--d-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--d-t);
  z-index: 10;
  font-size: .7rem;
}
.sidebar-collapse-toggle:hover {
  background: var(--d-card-2);
  color: var(--d-red);
  border-color: var(--d-red);
}
body.sidebar-collapsed .sidebar-collapse-toggle i {
  transform: rotate(180deg);
}

/* Profile */
.sidebar-profile {
  padding: 14px 16px;
  border-bottom: 1px solid var(--d-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.sidebar-profile-brandmark {
  display: none;
}

.sidebar-profile-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  padding: 8px 10px;
  border-radius: var(--d-r-sm);
  background: var(--d-hover);
  transition: var(--d-t);
  overflow: hidden;
}
.sidebar-profile-user:hover {
  background: rgba(239,35,60,.08);
}

.sidebar-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--d-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-profile-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--d-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--d-t-slow);
}

.sidebar-profile-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--d-r-sm);
  background: rgba(239,35,60,.08);
  border: 1px solid rgba(239,35,60,.18);
  text-decoration: none !important;
  transition: var(--d-t);
  overflow: hidden;
}
.sidebar-profile-balance:hover {
  background: rgba(239,35,60,.14);
  border-color: rgba(239,35,60,.3);
}
.sidebar-profile-balance .icon {
  color: var(--d-red);
  font-size: .85rem;
  flex-shrink: 0;
}
.sidebar-profile-balance .amount {
  font-size: .8rem;
  font-weight: 700;
  color: var(--d-text);
  white-space: nowrap;
  transition: var(--d-t-slow);
}

/* Menu */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--d-border) transparent;
}
.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--d-border); border-radius: 4px; }

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 4px 8px;
}

.sidebar-item { margin-bottom: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--d-r-sm);
  text-decoration: none !important;
  color: var(--d-muted) !important;
  font-size: .85rem;
  font-weight: 500;
  transition: var(--d-t);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.sidebar-link:hover {
  background: var(--d-hover);
  color: var(--d-text) !important;
}
.sidebar-item.active .sidebar-link,
.sidebar-link.active {
  background: rgba(239,35,60,.1);
  color: var(--d-text) !important;
  box-shadow: inset 3px 0 0 var(--d-red);
}

html[dir="rtl"] .sidebar-item.active .sidebar-link,
html[dir="rtl"] .sidebar-link.active {
  box-shadow: inset -3px 0 0 var(--d-red);
}

.sidebar-icon {
  width: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: var(--d-muted);
  transition: var(--d-t);
}
.sidebar-item.active .sidebar-icon,
.sidebar-link:hover .sidebar-icon {
  color: var(--d-red);
}

.sidebar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--d-t-slow);
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
}
body.sidebar-collapsed .sidebar-icon {
  margin: 0;
}

/* ───────────────────────── 5. NAVBAR ──────────────────────────── */
.component-navbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: var(--d-surface) !important;
  border-bottom: 1px solid var(--d-border) !important;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  gap: 12px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--d-muted);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: var(--d-r-sm);
  cursor: pointer;
  transition: var(--d-t);
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: var(--d-hover);
  color: var(--d-text);
}

.page-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--d-text);
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Balance button */
.balance-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--d-r-sm);
  border: 1px solid var(--d-border);
  background: var(--d-card);
  color: var(--d-text) !important;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--d-t);
  white-space: nowrap;
}
.balance-display:hover {
  border-color: var(--d-red);
  background: rgba(239,35,60,.06);
}
.balance-label {
  color: var(--d-muted);
  font-size: .75rem;
}
.balance-amount {
  font-weight: 700;
  color: var(--d-text);
}

/* User dropdown trigger */
.user-dropdown > .nav-link,
.user-dropdown > button.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px !important;
  border-radius: var(--d-r-sm);
  border: 1px solid var(--d-border);
  background: var(--d-card);
  color: var(--d-text) !important;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--d-t);
  text-decoration: none;
  white-space: nowrap;
}
.user-dropdown > .nav-link:hover,
.user-dropdown > button.nav-link:hover {
  border-color: var(--d-border-2);
  background: var(--d-card-2);
}

/* Dropdown menus */
.dropdown-menu {
  background: var(--d-card-2) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r-sm) !important;
  box-shadow: var(--d-shadow) !important;
  min-width: 180px;
  padding: 6px !important;
  margin-top: 6px !important;
}

.dropdown-item {
  color: var(--d-muted) !important;
  font-size: .83rem;
  padding: 8px 12px !important;
  border-radius: var(--d-r-xs) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--d-t);
}
.dropdown-item:hover {
  background: var(--d-hover) !important;
  color: var(--d-text) !important;
}

.dropdown-divider {
  border-color: var(--d-border) !important;
  margin: 4px 0 !important;
}

/* ───────────────────────── 6. MAIN CONTENT ────────────────────── */
.content {
  flex: 1;
  padding: 0;
  min-width: 0;
  overflow-x: hidden;
}

/* ───────────────────────── 7. PRO-PAGE / HERO / CARD ──────────── */
.pro-page {
  padding: 28px 24px 80px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Unified: container-fluid pages also get nice padding */
.container-fluid.mb-5,
.updates-page.container-fluid,
.terms-page.container-fluid {
  padding: 28px 24px 80px !important;
  max-width: 1400px;
  margin: 0 auto;
}

.pro-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pro-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--d-red);
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(239,35,60,.08);
  border: 1px solid rgba(239,35,60,.2);
}

.pro-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--d-text) !important;
  margin: 0 0 6px !important;
  line-height: 1.25;
}

.pro-subtitle {
  color: var(--d-muted) !important;
  font-size: .88rem;
  margin: 0 !important;
  max-width: 520px;
  line-height: 1.6;
}

/* page-hero (legacy) mapped to same style */
.page-hero {
  margin-bottom: 28px;
}
.page-hero .title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--d-text) !important;
  margin-bottom: 8px !important;
}
.page-hero .desc {
  color: var(--d-muted) !important;
  font-size: .88rem;
}

.pro-card,
.table-container {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r) !important;
  padding: 20px !important;
  box-shadow: none !important;
  color: var(--d-text) !important;
  transition: border-color var(--d-t);
}

.pro-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--d-border);
}

.pro-card-header h2,
.pro-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--d-text) !important;
  margin: 0 0 4px !important;
}

.pro-card-header p {
  font-size: .8rem;
  color: var(--d-muted) !important;
  margin: 0 !important;
}

/* Stats row */
.pro-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pro-stat {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 16px 18px !important;
}

.pro-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--d-r-sm);
  background: rgba(239,35,60,.1);
  border: 1px solid rgba(239,35,60,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--d-red);
  font-size: 1rem;
  flex-shrink: 0;
}

.pro-stat > div span {
  display: block;
  font-size: .75rem;
  color: var(--d-muted);
  margin-bottom: 2px;
}
.pro-stat > div strong {
  font-size: .95rem;
  font-weight: 700;
  color: var(--d-text);
}

/* pro-layout: 2-column */
.pro-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* ───────────────────────── 8. PLATFORM FILTER TABS ────────────── */
.pro-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--d-border);
  background: var(--d-card);
  color: var(--d-muted) !important;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: var(--d-t);
  white-space: nowrap;
}
.platform-filter-btn:hover {
  border-color: var(--d-border-2);
  color: var(--d-text) !important;
  background: var(--d-card-2);
}
.platform-filter-btn.active {
  background: rgba(239,35,60,.1);
  border-color: rgba(239,35,60,.35);
  color: var(--d-text) !important;
}

/* ───────────────────────── 9. TABLES ──────────────────────────── */
.table-container {
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--d-r-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--d-border) transparent;
}
.table-responsive::-webkit-scrollbar { height: 5px; }
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--d-border);
  border-radius: 4px;
}

.table {
  color: var(--d-text) !important;
  border-collapse: collapse !important;
  width: 100%;
  margin: 0 !important;
  font-size: .85rem;
}

.table thead tr {
  border-bottom: 1px solid var(--d-border);
}

.table thead th {
  background: transparent !important;
  color: var(--d-muted) !important;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 14px !important;
  border: none !important;
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--d-border) !important;
  transition: background var(--d-t);
}

.table tbody tr:last-child { border-bottom: none !important; }

.table tbody tr:hover { background: var(--d-hover); }

.table tbody td {
  padding: 13px 14px !important;
  border: none !important;
  vertical-align: middle;
  color: var(--d-text) !important;
}

.table-striped tbody tr:nth-child(odd) {
  background: rgba(255,255,255,.015);
}

/* Table utility classes */
.table-link-truncate {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--d-info) !important;
  text-decoration: none !important;
}
.table-link-truncate:hover { text-decoration: underline !important; }

.order-service-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .83rem;
}

/* ───────────────────────── 10. STATUS PILLS ───────────────────── */
.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status-pill::before,
.status-pill.dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pending,    .status-pending.badge    { color: var(--d-warning); background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.2); }
.status-inprogress, .status-inprogress.badge { color: var(--d-info);    background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.2); }
.status-processing, .status-processing.badge { color: var(--d-info);    background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.2); }
.status-completed,  .status-completed.badge  { color: var(--d-success); background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.2); }
.status-partial,    .status-partial.badge    { color: #fb923c;          background: rgba(251,146,60,.1); border: 1px solid rgba(251,146,60,.2); }
.status-canceled,   .status-canceled.badge  ,
.status-cancelled,  .status-cancelled.badge  { color: var(--d-danger);  background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2); }
.status-refilling,  .status-refilling.badge  { color: var(--d-purple);  background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2); }
.status-rejected,   .status-rejected.badge   { color: var(--d-danger);  background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2); }
.status-error,      .status-error.badge      { color: var(--d-danger);  background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2); }
.status-update                               { color: #fbbf24;          background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2); }
.status-active,     .status-active.badge     { color: var(--d-success); background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.2); }

/* Payment statuses */
.payment-status { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.payment-status-pending   { color: var(--d-warning); background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.2); }
.payment-status-completed { color: var(--d-success); background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.2); }
.payment-status-rejected  { color: var(--d-danger);  background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2); }

/* Pro badge */
.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--d-r-xs);
  background: var(--d-hover);
  border: 1px solid var(--d-border);
  color: var(--d-muted);
  font-size: .75rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* ───────────────────────── 11. FORMS ──────────────────────────── */
.form-control,
.form-select,
select.form-control {
  background: var(--d-card-2) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r-sm) !important;
  color: var(--d-text) !important;
  font-size: .85rem !important;
  padding: 10px 14px !important;
  height: auto !important;
  min-height: 42px;
  transition: border-color var(--d-t), box-shadow var(--d-t);
  width: 100%;
}
.form-control:focus,
.form-select:focus,
select.form-control:focus {
  border-color: var(--d-red) !important;
  box-shadow: 0 0 0 3px rgba(239,35,60,.12) !important;
  outline: none !important;
  background: var(--d-card) !important;
}
.form-control::placeholder { color: var(--d-muted) !important; }
.form-control[readonly],
.form-control:disabled {
  opacity: .6 !important;
  cursor: not-allowed;
}

label, .form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--d-muted);
  margin-bottom: 6px !important;
}

.form-group {
  margin-bottom: 18px !important;
}

.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-control {
  border-radius: var(--d-r-sm) 0 0 var(--d-r-sm) !important;
  flex: 1;
}
html[dir="rtl"] .input-group .form-control {
  border-radius: 0 var(--d-r-sm) var(--d-r-sm) 0 !important;
}
.input-group-append .btn,
.input-group-prepend .btn,
.input-group .btn:last-child {
  border-radius: 0 var(--d-r-sm) var(--d-r-sm) 0 !important;
}
html[dir="rtl"] .input-group-append .btn,
html[dir="rtl"] .input-group .btn:last-child {
  border-radius: var(--d-r-sm) 0 0 var(--d-r-sm) !important;
}
.input-group-text {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  color: var(--d-muted) !important;
  padding: 10px 12px !important;
  font-size: .85rem !important;
}
.input-group > .input-group-prepend + .form-control {
  border-radius: 0 var(--d-r-sm) var(--d-r-sm) 0 !important;
  border-inline-start: none !important;
}

/* ───────────────────────── 12. BUTTONS ────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: .83rem;
  font-weight: 600;
  border-radius: var(--d-r-sm);
  border: none;
  cursor: pointer;
  transition: var(--d-t);
  text-decoration: none !important;
  white-space: nowrap;
  min-height: 38px;
}
.btn:focus { outline: none; box-shadow: none; }

.btn-primary {
  background: var(--d-gradient) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: var(--d-glow-sm);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--d-glow);
  filter: brightness(1.1);
}
.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--d-card-2) !important;
  color: var(--d-muted) !important;
  border: 1px solid var(--d-border) !important;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--d-hover) !important;
  color: var(--d-text) !important;
  border-color: var(--d-border-2) !important;
}

.btn-sm {
  padding: 5px 12px;
  font-size: .76rem;
  min-height: 30px;
  border-radius: var(--d-r-xs);
}

.btn-lg {
  padding: 12px 28px;
  font-size: .9rem;
  min-height: 46px;
}

.btn-block, .btn.w-100 {
  width: 100%;
}

/* Spinner inside button */
.btn .spinner-border {
  width: 14px;
  height: 14px;
  border-width: 2px;
  flex-shrink: 0;
}

/* ───────────────────────── 13. ALERTS ─────────────────────────── */
.alert {
  padding: 12px 16px !important;
  border-radius: var(--d-r-sm) !important;
  font-size: .84rem;
  border-width: 1px !important;
  margin-bottom: 16px;
}
.alert-danger  { background: rgba(239,68,68,.08) !important; border-color: rgba(239,68,68,.25) !important; color: #fca5a5 !important; }
.alert-success { background: rgba(34,197,94,.08) !important; border-color: rgba(34,197,94,.25) !important; color: #86efac !important; }
.alert-info    { background: rgba(56,189,248,.08) !important; border-color: rgba(56,189,248,.25) !important; color: var(--d-info) !important; }
.alert-warning { background: rgba(234,179,8,.08) !important; border-color: rgba(234,179,8,.25) !important; color: var(--d-warning) !important; }

/* ───────────────────────── 14. PAGINATION ─────────────────────── */
.pagination { gap: 4px !important; }

.page-item .page-link {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  color: var(--d-muted) !important;
  border-radius: var(--d-r-xs) !important;
  padding: 6px 12px !important;
  font-size: .82rem !important;
  font-weight: 500;
  transition: var(--d-t);
  min-width: 36px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-item .page-link:hover {
  background: var(--d-card-2) !important;
  color: var(--d-text) !important;
  border-color: var(--d-border-2) !important;
}
.page-item.active .page-link {
  background: var(--d-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--d-glow-sm);
}
.page-item.disabled .page-link { opacity: .4; cursor: not-allowed; }

/* ───────────────────────── 15. MODALS ─────────────────────────── */
.modal-content {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r) !important;
  color: var(--d-text) !important;
}
.modal-header {
  border-bottom: 1px solid var(--d-border) !important;
  padding: 16px 20px !important;
}
.modal-title { font-size: 1rem !important; font-weight: 700 !important; }
.modal-body { padding: 20px !important; }
.modal-footer {
  border-top: 1px solid var(--d-border) !important;
  padding: 14px 20px !important;
}
.btn-close, .btn-close-white {
  filter: invert(1) brightness(0.7) !important;
  opacity: .7 !important;
}
.btn-close:hover { opacity: 1 !important; }
.modal-backdrop { background: rgba(5,5,6,.85) !important; backdrop-filter: blur(6px) !important; }

/* ───────────────────────── 16. TOOLBAR ────────────────────────── */
.pro-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pro-toolbar > * { flex: 1; min-width: 140px; }

/* ───────────────────────── 17. FOOTER ─────────────────────────── */
.pro-footer {
  background: var(--d-surface) !important;
  border-top: 1px solid var(--d-border) !important;
  padding: 20px 24px !important;
  flex-shrink: 0;
}
.pro-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.pro-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pro-footer-brand strong {
  font-size: .85rem;
  color: var(--d-text);
}
.pro-footer-brand span {
  font-size: .75rem;
  color: var(--d-muted);
  display: block;
}
.pro-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.pro-footer-nav a {
  color: var(--d-muted) !important;
  font-size: .82rem;
  text-decoration: none !important;
  transition: var(--d-t);
}
.pro-footer-nav a:hover { color: var(--d-text) !important; }
.pro-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pro-footer-links a {
  color: var(--d-muted) !important;
  font-size: .82rem;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--d-t);
}
.pro-footer-links a:hover { color: var(--d-success) !important; }
.pro-footer-links span {
  font-size: .75rem;
  color: var(--d-muted);
}

/* ───────────────────────── 18. MOBILE BOTTOM NAV ──────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--d-surface);
  border-top: 1px solid var(--d-border);
  z-index: 200;
  padding: 6px 8px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  gap: 2px;
  justify-content: space-around;
  align-items: flex-end;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border-radius: var(--d-r-sm);
  color: var(--d-muted) !important;
  text-decoration: none !important;
  font-size: .62rem;
  font-weight: 600;
  transition: var(--d-t);
  flex: 1;
  text-align: center;
  max-width: 72px;
}
.mobile-nav-item i {
  font-size: 1.1rem;
  transition: var(--d-t);
}
.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--d-red) !important;
}
.mobile-nav-item.active i {
  color: var(--d-red);
}

/* ───────────────────────── 19. LOADING / SKELETON ─────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--d-card) 25%, var(--d-card-2) 50%, var(--d-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--d-r-xs);
  height: 18px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}
@keyframes btn-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ───────────────────────── 20. REVEAL ANIMATIONS ──────────────── */
.pro-card,
.pro-stat,
.table-container,
.animate-up {
  animation: fadeUp .4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ───────────────────────── 21. RTL TWEAKS ─────────────────────── */
html[dir="rtl"] .input-group .form-control:not(:last-child) {
  border-radius: 0 var(--d-r-sm) var(--d-r-sm) 0 !important;
  border-inline-start: 1px solid var(--d-border) !important;
  border-inline-end: none !important;
}
html[dir="rtl"] .input-group-append .btn {
  border-radius: var(--d-r-sm) 0 0 var(--d-r-sm) !important;
}
html[dir="rtl"] .input-group-prepend .btn,
html[dir="rtl"] .input-group-prepend .input-group-text {
  border-radius: 0 var(--d-r-sm) var(--d-r-sm) 0 !important;
}
html[dir="rtl"] .input-group-prepend + .form-control {
  border-inline-start: none !important;
}

/* category picker icon  RTL */
html[dir="rtl"] .pro-category-trigger { flex-direction: row-reverse; }

/* ───────────────────────── 22. API PAGE ───────────────────────── */
.api-layout { grid-template-columns: 1fr; }

.api-code-block {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  padding: 14px;
  overflow-x: auto;
  font-size: .78rem;
  color: var(--d-info);
  margin: 12px 0;
}

.api-code-inline {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: .78rem;
  color: var(--d-info);
}

.api-block-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--d-muted);
  margin: 16px 0 8px;
}

/* ───────────────────────── 23. TERMS & CONTENT PAGES ──────────── */
.terms-content { line-height: 1.85; color: var(--d-muted); }
.terms-content h2, .terms-content h3 { color: var(--d-text) !important; margin-top: 2rem; }
.terms-content p { margin-bottom: 1rem; }
.bg-dark-glass {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r) !important;
}

/* ───────────────────────── 24. NEWORDER SPECIFIC ──────────────── */
.pro-category-picker { position: relative; }
.pro-category-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--d-card-2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  color: var(--d-text);
  cursor: pointer;
  transition: var(--d-t);
  font-size: .85rem;
}
.pro-category-trigger:hover {
  border-color: var(--d-border-2);
}
.pro-category-trigger-icon { font-size: 1.1rem; }
.pro-category-trigger-text { flex: 1; text-align: start; }
.pro-category-chevron {
  font-size: .7rem;
  color: var(--d-muted);
  transition: transform var(--d-t);
}
.pro-category-picker[data-open="true"] .pro-category-chevron { transform: rotate(180deg); }
.pro-native-select { display: none !important; }

.pro-category-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--d-card-2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  display: none;
  box-shadow: var(--d-shadow);
}
.pro-category-picker[data-open="true"] .pro-category-menu { display: block; }

.pro-category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--d-r-xs);
  cursor: pointer;
  font-size: .83rem;
  color: var(--d-muted);
  transition: var(--d-t);
}
.pro-category-option:hover,
.pro-category-option.active {
  background: var(--d-hover);
  color: var(--d-text);
}

/* Price display */
.order-price-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(239,35,60,.06);
  border: 1px solid rgba(239,35,60,.18);
  border-radius: var(--d-r-sm);
  margin-bottom: 16px;
}
.order-price-label { font-size: .8rem; color: var(--d-muted); }
.order-price-value { font-size: 1.1rem; font-weight: 800; color: var(--d-red); }

/* ───────────────────────── 25. ADDFUNDS ───────────────────────── */
.payment-copy-card {
  background: var(--d-card-2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.payment-copy-card span { font-size: .75rem; color: var(--d-muted); display: block; margin-bottom: 3px; }
.payment-copy-card strong { font-size: .95rem; font-weight: 700; color: var(--d-text); }
.copy-payment-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--d-card);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-xs);
  color: var(--d-muted);
  font-size: .78rem;
  cursor: pointer;
  transition: var(--d-t);
}
.copy-payment-number:hover,
.copy-payment-number.copied {
  border-color: var(--d-success);
  color: var(--d-success);
}

.payment-conversion-panel {
  background: var(--d-card-2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.payment-conversion-result__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: .85rem;
}
.payment-conversion-result__head i { color: var(--d-red); font-size: 1.1rem; }
.payment-conversion-result__head span { font-size: .75rem; color: var(--d-muted); }
.payment-conversion-result__head strong { font-size: 1rem; font-weight: 800; color: var(--d-text); }
.payment-conversion-result__calc {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--d-muted);
  margin-bottom: 8px;
}
.payment-conversion-result__calc .text-success { color: var(--d-success) !important; font-weight: 700; }
.payment-conversion-result__note { font-size: .77rem; color: var(--d-muted); }
.payment-conversion-result__note .fas { margin-inline-end: 4px; }
.payment-conversion-result.is-ready .payment-conversion-result__note { color: var(--d-success); }

.addfunds-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.addfunds-success-modal {
  background: var(--d-card);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r);
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--d-shadow);
}
.addfunds-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34,197,94,.12);
  border: 2px solid rgba(34,197,94,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
  color: var(--d-success);
}
.addfunds-success-modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--d-text); }
.addfunds-success-modal p { color: var(--d-muted); font-size: .85rem; margin-bottom: 16px; }
.addfunds-success-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--d-border);
  font-size: .83rem;
}
.addfunds-success-row:last-child { border-bottom: none; }
.addfunds-success-row span { color: var(--d-muted); }
.addfunds-success-row strong { font-weight: 700; }
.addfunds-success-meta { margin: 16px 0; }

/* ───────────────────────── 26. CATEGORY HEADER ────────────────── */
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--d-surface);
  border-radius: var(--d-r-xs);
  color: var(--d-muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.category-header strong { color: var(--d-text); }
.services-list-category-title td { padding: 0 !important; }

/* ───────────────────────── 27. TICKETS FORM ───────────────────── */
.ticket-section,
.tickets-list-section { padding: 0; }

/* ───────────────────────── 28. TEXT UTILITIES ─────────────────── */
.text-muted   { color: var(--d-muted) !important; }
.text-success { color: var(--d-success) !important; }
.text-danger  { color: var(--d-danger) !important; }
.text-info    { color: var(--d-info) !important; }
.text-primary { color: var(--d-red) !important; }
.text-highlight { color: var(--d-text) !important; font-weight: 600; }
.font-weight-bold { font-weight: 700 !important; }
.text-center { text-align: center !important; }
html[dir="rtl"] .text-center { text-align: center !important; }

code { color: var(--d-info); background: var(--d-surface); padding: 2px 6px; border-radius: 4px; font-size: .82em; }
pre  { color: var(--d-text); }

/* ───────────────────────── 29. ACCOUNT PAGE ───────────────────── */
#block_account_settings .row { max-width: 860px; margin: 0 auto; }
#block_account_settings h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--d-text) !important;
  margin-bottom: 20px !important;
}
.border-top { border-top: 1px solid var(--d-border) !important; }

/* ───────────────────────── 30. UPDATES PAGE ───────────────────── */
.table-section { width: 100%; }
.name-truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc-truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────────────────── 31. SEARCH DROPDOWN ────────────────── */
.search-dropdown { position: relative; }
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--d-card-2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  z-index: 300;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--d-shadow);
}
.input-wrapper { position: relative; }
.input-wrapper__prepend,
.input-wrapper__append {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--d-muted);
  font-size: .9rem;
  padding: 0 10px;
  cursor: pointer;
  z-index: 1;
}
.input-wrapper__prepend { inset-inline-start: 0; }
.input-wrapper__append  { inset-inline-end: 0; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — DESKTOP COLLAPSE
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 993px) {
  .sidebar-collapse-toggle { display: flex; }
  .sidebar-toggle { display: none; }
  .mobile-bottom-nav { display: none !important; }
  .pro-page { padding-bottom: 40px; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤1200px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .pro-layout { grid-template-columns: 1fr; }
  .pro-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .pro-page, .container-fluid.mb-5, .updates-page.container-fluid, .terms-page.container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤992px) — sidebar becomes drawer
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
    width: 280px !important;
    box-shadow: var(--d-shadow);
  }
  html[dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  .sidebar.show {
    transform: translateX(0) !important;
  }

  .sidebar-collapse-toggle { display: none !important; }
  .sidebar-text { opacity: 1 !important; width: auto !important; overflow: visible !important; pointer-events: auto !important; }
  .pro-sidebar-brand-text { opacity: 1 !important; width: auto !important; overflow: visible !important; pointer-events: auto !important; }
  .sidebar-profile-name { opacity: 1 !important; width: auto !important; overflow: visible !important; }
  .sidebar-profile-balance .amount { opacity: 1 !important; width: auto !important; overflow: visible !important; }

  body.sidebar-open {
    overflow: hidden !important;
    touch-action: none;
  }

  /* Let clicks pass through page content to the overlay */
  body.sidebar-open .main-content-wrapper {
    pointer-events: none;
  }
  body.sidebar-open .component-navbar {
    pointer-events: auto;
    z-index: 1200 !important;
  }
  body.sidebar-open .sidebar-toggle {
    position: relative;
    z-index: 1201;
    pointer-events: auto;
  }

  .sidebar-inner {
    position: relative;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 6, .82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1180;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
  }
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open::before {
    display: none !important;
  }

  body.sidebar-open .sidebar {
    pointer-events: auto;
  }

  .sidebar-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--d-border);
    border-radius: var(--d-r-sm);
    background: var(--d-hover);
    color: var(--d-text);
    cursor: pointer;
    z-index: 2;
  }
  .sidebar-mobile-close:hover {
    background: var(--d-border);
  }

  .sidebar { z-index: 1190 !important; }

  .main-content-wrapper,
  body.sidebar-collapsed .main-content-wrapper {
    margin-inline-start: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
  }

  .component-navbar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-height: 56px !important;
    height: auto !important;
    z-index: 1100 !important;
    flex-shrink: 0;
  }

  .sidebar-toggle { display: flex !important; }

  .mobile-bottom-nav {
    display: flex !important;
    z-index: 1080 !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .pro-page,
  .container-fluid.mb-5,
  .updates-page.container-fluid,
  .terms-page.container-fluid {
    padding: 16px 12px 80px !important;
  }

  /* Table → cards on mobile */
  .table-container { padding: 0 !important; border-radius: var(--d-r) !important; overflow: hidden; }
  .responsive-table thead { display: none; }
  .responsive-table tbody tr {
    display: block;
    border: 1px solid var(--d-border) !important;
    border-radius: var(--d-r-sm);
    margin-bottom: 10px;
    padding: 12px;
    background: var(--d-card-2);
    animation: fadeUp .3s ease both;
  }
  .responsive-table tbody tr td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0 !important;
    font-size: .82rem;
    border-bottom: 1px solid var(--d-border) !important;
    flex-wrap: wrap;
  }
  .responsive-table tbody tr td:last-child { border-bottom: none !important; }
  .responsive-table tbody tr td::before {
    content: attr(data-label);
    font-size: .72rem;
    font-weight: 700;
    color: var(--d-muted);
    letter-spacing: .05em;
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 90px;
  }
  html[dir="rtl"] .responsive-table tbody tr td {
    flex-direction: row-reverse;
  }
  html[dir="rtl"] .responsive-table tbody tr td::before {
    text-align: right;
  }

  .table-link-truncate { max-width: 160px; }
  .order-service-name  { max-width: 180px; }

  .pro-hero { flex-direction: column; }
  .pro-hero .d-flex { width: 100%; }
  .pro-hero .btn { flex: 1; }

  .pro-stats { grid-template-columns: 1fr 1fr; gap: 10px; }

  .platform-filter-btn { font-size: .75rem; padding: 5px 10px; }
  .pro-platforms { gap: 6px; }

  .pro-toolbar { flex-direction: column; }
  .pro-toolbar > * { min-width: 0; }

  .pagination .page-link { padding: 5px 10px !important; font-size: .78rem !important; }

  /* Account page */
  #block_account_settings .row > div { padding-inline: 0; }

  /* Addfunds layout */
  .addfunds-page .pro-layout { grid-template-columns: 1fr; }

  /* Buttons full width on mobile forms */
  .pro-card > form .btn-primary:not(.btn-sm),
  .table-container .btn-primary:not(.btn-sm) {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤480px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .pro-title { font-size: 1.3rem; }
  .pro-stats { grid-template-columns: 1fr; }
  .pro-stat { padding: 12px 14px !important; }
  .navbar-right .balance-label { display: none; }
  .user-dropdown > .nav-link .d-none,
  .user-dropdown > button.nav-link .d-none { display: none !important; }
  .modal-dialog { margin: 8px; }
  .addfunds-success-modal { padding: 24px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — EXTRA SMALL (≤360px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .pro-page,
  .container-fluid.mb-5,
  .updates-page.container-fluid,
  .terms-page.container-fluid {
    padding: 12px 8px 72px !important;
  }
  .btn { font-size: .78rem; padding: 8px 14px; }
  .mobile-nav-item { font-size: .58rem; padding: 5px 4px; }
}

/* ───────────────────────── 32. SERVICE MODAL (custom) ─────────── */
.svc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  transition: opacity .25s ease;
}
.svc-modal-overlay.is-active { opacity: 1; }

.svc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2001;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .25s ease, transform .25s ease;
}
.svc-modal.is-active { opacity: 1; transform: translateY(0); }

.svc-modal-inner {
  background: var(--d-card);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--d-shadow);
  overflow: hidden;
}

.svc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--d-border);
  flex-shrink: 0;
}

.svc-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--d-text);
  margin: 0;
}

.svc-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--d-r-xs);
  border: 1px solid var(--d-border);
  background: transparent;
  color: var(--d-muted);
  cursor: pointer;
  transition: var(--d-t);
  font-size: .85rem;
  flex-shrink: 0;
}
.svc-modal-close:hover {
  background: rgba(239,35,60,.08);
  border-color: rgba(239,35,60,.25);
  color: var(--d-red);
}

.svc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--d-border) transparent;
}
.svc-modal-body::-webkit-scrollbar { width: 5px; }
.svc-modal-body::-webkit-scrollbar-thumb { background: var(--d-border); border-radius: 4px; }

.svc-modal-desc {
  color: var(--d-muted);
  font-size: .88rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.svc-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--d-border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.svc-modal-footer .btn { flex: 1; min-width: 120px; }

/* Desktop details button */
.svc-detail-btn {
  white-space: nowrap;
  font-size: .78rem;
  padding: 4px 10px;
  gap: 4px;
  display: inline-flex;
  align-items: center;
}
.svc-detail-btn i { font-size: .72rem; }

/* ───────────────────────── 33. PAYMENT INSTRUCTIONS ───────────── */
.payment-instructions-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(56,189,248,.06);
  border: 1px solid rgba(56,189,248,.2);
  border-radius: var(--d-r-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.payment-instructions-icon {
  color: var(--d-info);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.payment-instructions-text {
  color: var(--d-text);
  font-size: .84rem;
  line-height: 1.7;
}

/* Embedded payment gateway (wallet providers) */
.payment-gateway-embed {
  background: var(--d-card2);
  border: 1px solid var(--d-border);
  border-radius: var(--d-r-sm);
  padding: 16px;
  overflow: hidden;
}
.payment-gateway-embed img {
  max-width: 100%;
  height: auto;
}
.payment-gateway-embed .form-group {
  margin-bottom: 14px;
}
.payment-gateway-embed .form-control {
  width: 100%;
}
.payment-gateway-embed center {
  text-align: center;
}
.payment-gateway-embed p {
  color: var(--d-muted);
  font-size: .84rem;
  line-height: 1.6;
}
.payment-gateway-embed #payButton,
.payment-gateway-embed button[type="submit"] {
  width: 100%;
  padding: 12px;
  border-radius: var(--d-r-sm);
  background: linear-gradient(135deg, var(--d-red), #ff6b35);
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ───────────────────────── 34. QUICK SEARCH RESULTS ───────────── */
.quick-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  text-align: start;
  color: var(--d-text);
  font-size: .83rem;
  transition: var(--d-t);
  border-bottom: 1px solid var(--d-border);
}
.quick-search-item:last-child { border-bottom: none; }
.quick-search-item:hover { background: var(--d-hover); }
.quick-search-id {
  font-size: .72rem;
  font-weight: 700;
  color: var(--d-red);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
  min-width: 52px;
}
.quick-search-name { color: var(--d-text); }
.quick-search-empty {
  padding: 14px;
  text-align: center;
  color: var(--d-muted);
  font-size: .82rem;
}

/* Tickets layout: 2-col on desktop, 1-col on tablet */
.tickets-layout {
  grid-template-columns: 1fr 1fr !important;
}
@media (max-width: 900px) {
  .tickets-layout { grid-template-columns: 1fr !important; }
}

/* Account layout: 2-col on desktop */
.account-layout {
  grid-template-columns: 1fr 1fr !important;
}
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   PREVENT HORIZONTAL SCROLL GLOBALLY
   ═══════════════════════════════════════════════════════════════════ */
body { overflow-x: hidden !important; }
.wrapper { overflow-x: hidden; }
.content { overflow-x: hidden; }

/* ═══════════════════════════════════════════════════════════════════
   DARK GLASS OVERRIDE (for existing classes used in templates)
   ═══════════════════════════════════════════════════════════════════ */
.card.bg-dark-glass,
.bg-dark-glass {
  background: var(--d-card) !important;
  border: 1px solid var(--d-border) !important;
  border-radius: var(--d-r) !important;
  backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR — RESPONSIVE RESET (overrides any legacy left/right rules)
   Sidebar is always at inset-inline-start: 0 and uses transform to
   hide/show. Inline <style> blocks that set left: -280px are
   intentionally overridden here with higher specificity.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .sidebar,
  html[dir="rtl"] .sidebar,
  html[dir="ltr"] .sidebar {
    /* Reset any legacy left/right positioning */
    left: 0 !important;
    right: auto !important;
    inset-inline-start: 0 !important;
    transform: translateX(-100%) !important;
    transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
  }

  html[dir="rtl"] .sidebar,
  html[dir="rtl"] html[dir="rtl"] .sidebar {
    left: auto !important;
    right: 0 !important;
    inset-inline-start: 0 !important;
    transform: translateX(100%) !important;
  }

  .sidebar.show,
  html[dir="rtl"] .sidebar.show,
  html[dir="ltr"] .sidebar.show {
    transform: translateX(0) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   TABLET RANGE (993px – 1200px): Sidebar collapsible, not drawer
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 993px) and (max-width: 1200px) {
  .sidebar {
    /* Collapsed by default on 993-1200 to give content room */
    width: var(--d-sidebar-w) !important;
  }
  body.sidebar-collapsed .sidebar {
    width: var(--d-sidebar-c) !important;
  }
  .pro-layout { grid-template-columns: 1fr; }
  .pro-stats  { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════
   TABLE MOBILE CARDS — category-header rows must not get card style
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  /* Category title rows stay as full-width headings, not cards */
  .responsive-table tbody tr.services-list-category-title {
    border: none !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    background: transparent !important;
    margin-bottom: 4px !important;
  }
  .responsive-table tbody tr.services-list-category-title td {
    border-bottom: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .responsive-table tbody tr.services-list-category-title td::before {
    display: none !important;
  }

  /* Services detail button: make compact on mobile */
  .svc-detail-btn { width: 100%; font-size: .75rem; padding: 5px 8px; }

  /* Input groups on mobile */
  .input-group {
    flex-wrap: nowrap !important;
  }
  .input-group .form-control,
  .input-group .form-select {
    min-width: 0;
    flex: 1;
  }
  .input-group-prepend .input-group-text,
  .input-group-append .input-group-text,
  .input-group-text {
    flex-shrink: 0;
  }

  /* Platform filter: horizontal scroll */
  .pro-platforms {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .pro-platforms::-webkit-scrollbar { display: none; }
  .platform-filter-btn { flex-shrink: 0; }

  /* Pro hero */
  .pro-hero {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .pro-hero .btn {
    width: 100%;
    justify-content: center;
  }

  /* Toolbar: stack vertically */
  .pro-toolbar {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .pro-toolbar > * { width: 100% !important; min-width: 0 !important; }
  .pro-toolbar .input-group { width: 100% !important; }
  .pro-toolbar .dropdown { width: 100% !important; }

  /* Payment instructions card on mobile */
  .payment-instructions-card { flex-direction: column; gap: 8px; }

  /* Pro-card header padding */
  .pro-card-header { flex-direction: column; gap: 10px; }
  .pro-card-header > * { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL NO-HORIZONTAL-OVERFLOW for all page widths
   ═══════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html { overflow-x: hidden; }
.content { max-width: 100%; }
.table-container { overflow: hidden; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
img, video { max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE FIXES — override custom_style conflicts, top gap, sidebar
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  body.body-internal .wrapper-content {
    padding-top: 0 !important;
  }
  body.body-internal .component-navbar,
  body.body-internal .navbar.component-navbar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-height: 56px !important;
    height: auto !important;
  }
  body.body-internal .main-content-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  body.body-internal .content {
    padding-top: 0 !important;
  }
  body.body-internal .wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  html, body.body-internal {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  /* Bottom nav stays below sidebar drawer */
  body.sidebar-open .mobile-bottom-nav {
    pointer-events: none;
    opacity: .35;
  }
}
