*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #F5F4F1;
  --surface:     #FFFFFF;
  --sidebar:     #1A3A7A;
  --primary:     #F5A000;
  --pri-dark:    #D48A00;
  --pri-light:   #FFF8E6;
  --pri-mid:     #FFE4A0;
  --idoom:       #5e358b;
  --green:       #2E7D32;
  --text-h:      #1C1C1E;
  --text-b:      #4A4A4A;
  --text-m:      #9A9A9A;
  --border:      #EBEBEB;
  --shadow:      0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --font:        'Poppins', sans-serif;
  --sidebar-w:   240px;
}

html {
  overflow-x: hidden;
  width: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-h);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── Global button reset — prevents UA "Windows 98" rendering ── */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1.2;
  letter-spacing: inherit;
}
button:focus { outline: none; }
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo .brand-tile {
  background: white;
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.sidebar-logo .brand-tile .one { color: #1A3A7A; }
.sidebar-logo .brand-tile .step { color: var(--primary); }
.sidebar-nav { flex: 1; padding: 14px 12px; }
.nav-lbl {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 12px 8px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  transition: all .18s;
  margin-bottom: 2px;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-link.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(245,160,0,0.4); }
.nav-link svg { flex-shrink: 0; opacity: .85; }
.nav-link.active svg { opacity: 1; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}
.user-ava-sm {
  width: 36px; height: 36px;
  background: #F5A000;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 12px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: rgba(255,255,255,0.4); }

/* ── MAIN ── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; overflow-x: hidden; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text-h); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.tb-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-b);
  position: relative;
  background: var(--surface);
  transition: border-color .15s, color .15s, background .15s, transform .12s;
}
.tb-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--pri-light);
}
.tb-btn:active { transform: scale(.96); }
.notif-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; border: 2px solid white; }
.tb-ava { width: 38px; height: 38px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: white; cursor: pointer; }
.page-content { flex: 1; padding: 28px 32px; overflow-x: hidden; max-width: 100%; }
.page { display: none; overflow-x: hidden; max-width: 100%; }
.page.active { display: block; overflow-x: hidden; max-width: 100%; }

/* ── CARDS ── */
.card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.card-p { padding: 24px; }

/* ── LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ── WALLET HERO ── */
.wallet-hero {
  background: linear-gradient(135deg, #0F2554 0%, #1A3A7A 55%, #1E4A9A 100%);
  border-radius: 24px;
  padding: 28px 32px;
  color: white;
  position: relative;
  overflow: hidden;
  overflow: hidden;
  margin-bottom: 24px;
}
.wallet-hero::before { content:''; position:absolute; top:-50px; right:-50px; width:220px; height:220px; background:rgba(255,255,255,0.06); border-radius:50%; }
.wallet-hero::after  { content:''; position:absolute; bottom:-70px; right:80px; width:160px; height:160px; background:rgba(255,255,255,0.04); border-radius:50%; }
.wh-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; }
.wh-brand { font-size:13px; font-weight:700; opacity:.75; }
.wh-badge { background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.2); border-radius:8px; padding:4px 12px; font-size:11px; font-weight:600; }
.wh-name { font-size:13px; opacity:.7; margin-bottom:4px; }
.wh-bal { font-size:38px; font-weight:800; letter-spacing:-1px; }
.wh-bal sub { font-size:16px; font-weight:600; opacity:.8; margin-right:6px; }
.wh-actions { display:flex; gap:10px; margin-top:22px; flex-wrap:wrap; }
.wh-btn {
  display:flex; align-items:center; gap:7px;
  background:rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.2);
  border-radius:10px;
  padding:8px 16px;
  font-size:12px;
  font-weight:600;
  color:white;
  cursor:pointer;
  transition:background .15s;
  font-family:var(--font);
}
.wh-btn:hover { background:rgba(255,255,255,0.22); }

/* ── STATS — gradient cards ── */
.stats-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:24px; min-width:0; }
.stat-card { border-radius:20px; padding:20px; border:none; min-width:0; overflow:hidden; }

/* Bonus — green gradient */
.stat-grad-bonus {
  background: linear-gradient(135deg, #1B8A5A 0%, #43A878 100%);
  box-shadow: 0 8px 24px rgba(27,138,90,0.35);
}
/* Credit — amber/orange gradient */
.stat-grad-credit {
  background: linear-gradient(135deg, #D4780A 0%, #F5A000 100%);
  box-shadow: 0 8px 24px rgba(212,120,10,0.35);
}
.sg-top { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.sg-title { font-size:14px; font-weight:700; color:rgba(255,255,255,0.9); }
.sg-val {
  font-size:28px; font-weight:800; color:#fff; letter-spacing:-.5px;
  line-height:1;
}
.sg-val span { font-size:14px; font-weight:600; opacity:.85; margin-right:4px; }
.sg-link {
  margin-top:10px; font-size:12px; font-weight:700;
  color:rgba(255,255,255,0.75);
  text-decoration:underline; text-underline-offset:3px;
  cursor:pointer;
}
/* keep old class names harmless */
.stat-lbl, .stat-chip { display:none; }
.stat-val { font-size:24px; font-weight:800; color:var(--text-h); }
.stat-val span { font-size:13px; font-weight:600; color:var(--text-m); margin-right:3px; }

/* ── SECTION HEADER ── */
.sec-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.sec-title { font-size:14px; font-weight:700; color:var(--text-h); display:flex; align-items:center; gap:8px; }
.see-all { font-size:12px; font-weight:600; color:var(--primary); cursor:pointer; }

/* ── QUICK ACTIONS ── */
.qa-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:24px; min-width:0; }
.qa-item {
  background:transparent; border-radius:16px; padding:10px 6px 14px;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  cursor:pointer; border:none; transition:transform .18s; text-align:center;
}
.qa-item:hover { transform:translateY(-4px); }
.qa-icon {
  width:54px; height:54px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:box-shadow .18s, transform .18s;
}
.qa-item:hover .qa-icon { transform:scale(1.07); }

/* Glow colours */
.qa-glow-orange { box-shadow: 0 6px 22px rgba(255,140,0,0.5); }
.qa-glow-teal   { box-shadow: 0 6px 22px rgba(0,137,123,0.45); }
.qa-glow-purple { box-shadow: 0 6px 22px rgba(94,53,139,0.45); }
.qa-glow-amber  { box-shadow: 0 6px 22px rgba(245,124,0,0.45); }
.qa-item:hover .qa-glow-orange { box-shadow: 0 10px 28px rgba(255,140,0,0.65); }
.qa-item:hover .qa-glow-teal   { box-shadow: 0 10px 28px rgba(0,137,123,0.6); }
.qa-item:hover .qa-glow-purple { box-shadow: 0 10px 28px rgba(94,53,139,0.6); }
.qa-item:hover .qa-glow-amber  { box-shadow: 0 10px 28px rgba(245,124,0,0.6); }

.qa-lbl { font-size:12px; font-weight:700; color:var(--text-b); }

/* ── OPERATORS ── */
.ops-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:24px; }
.op-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:16px 12px; display:flex; flex-direction:column; align-items:center; gap:8px; cursor:pointer; transition:all .18s; }
.op-card:hover { box-shadow:var(--shadow-md); transform:translateY(-3px); }
.op-circle { width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:800; color:white; }
.op-name { font-size:12px; font-weight:700; color:var(--text-h); }
.op-sub { font-size:10px; color:var(--text-m); }

/* ── HERO IMAGE SLIDER ── */
.hero-slider {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--border);
  aspect-ratio: 16/6;
  min-height: 110px;
  max-height: 200px;
}
.hero-slider:empty { display: none; }
.hs-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.hs-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}
.hs-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hs-dots {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  pointer-events: none;
}
.hs-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background .25s, transform .25s;
}
.hs-dot.active {
  background: #fff;
  transform: scale(1.3);
}
/* hide entirely when no slides loaded */
.hero-slider[data-empty="1"] { display: none; }

/* ── DASHBOARD CATEGORY SLIDER ── */
/* ── Dashboard category slider ── */
.dash-cat-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  margin-bottom: 8px;
  align-items: stretch;
}
.dash-cat-slider::-webkit-scrollbar { display: none; }

/* Cards inside the slider: fixed width + no shrink */
.dash-cat-slider .cat-card,
.dcs-slide-card {
  flex-shrink: 0;
  width: 200px;
  scroll-snap-align: start;
}

.dcs-empty {
  font-size: 13px; color: var(--text-m); padding: 8px 0;
}

/* Skeleton loader items */
.dcs-skeleton {
  flex-shrink: 0; width: 200px; height: 140px; border-radius: 14px;
  background: linear-gradient(90deg, var(--border) 25%, #e8e8e8 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.3s infinite;
}
@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── DIGITAL CARDS ── */
.dc-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.dc-grid-cards { grid-template-columns:repeat(3,1fr); }

/* ── CATEGORY GRID ── */
.cat-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.cat-card {
  border-radius:20px; padding:24px 20px; color:white; cursor:pointer;
  position:relative; overflow:hidden; transition:transform .18s, box-shadow .18s;
  display:flex; flex-direction:column; gap:6px; min-height:130px;
}
.cat-card:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,0.18); }
.cat-card::after { content:''; position:absolute; top:-30px; right:-30px; width:110px; height:110px; background:rgba(255,255,255,0.07); border-radius:50%; }
.cat-icon { margin-bottom:4px; }
.cat-name { font-size:16px; font-weight:800; }
.cat-count { font-size:12px; opacity:.65; font-weight:500; }
.cat-arrow { position:absolute; bottom:16px; right:16px; }
.back-btn {
  display:inline-flex; align-items:center; gap:6px; padding:8px 14px;
  background:var(--bg); border:1.5px solid var(--border); border-radius:10px;
  font-family:var(--font); font-size:13px; font-weight:600; color:var(--text-b);
  cursor:pointer; transition:border .15s;
}
.back-btn:hover  { border-color:var(--primary); color:var(--primary); background:var(--pri-light); }
.back-btn:active { transform: scale(.97); }
.d-card { border-radius:20px; padding:20px; color:white; position:relative; overflow:hidden; cursor:pointer; transition:transform .18s; }
.d-card:hover { transform:translateY(-3px); }
.dc-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
.dc-badge { background:rgba(255,255,255,0.2); border-radius:6px; padding:3px 8px; font-size:11px; font-weight:700; }
.dc-new { background:#F5C518; color:#1A1A1E; border-radius:6px; padding:3px 8px; font-size:10px; font-weight:800; }
.dc-title { font-size:14px; font-weight:700; }
.dc-sub { font-size:11px; opacity:.7; margin-top:2px; }
.dc-btn { margin-top:12px; display:inline-block; background:rgba(255,255,255,0.2); border:1px solid rgba(255,255,255,0.3); border-radius:8px; padding:5px 12px; font-size:11px; font-weight:700; cursor:pointer; }
.dc-btn:hover { background:rgba(255,255,255,0.3); }

/* ── FORM ELEMENTS ── */
.f-group { margin-bottom:18px; }
.f-label { font-size:12px; font-weight:700; color:var(--text-b); margin-bottom:7px; display:block; }
.f-input {
  width:100%; padding:12px 16px; border:1.5px solid var(--border); border-radius:12px;
  font-family:var(--font); font-size:14px; color:var(--text-h); outline:none;
  transition:border .15s; background:var(--surface);
}
.f-input:focus { border-color:var(--primary); }

.seg-row { display:flex; background:var(--bg); border-radius:14px; padding:4px; gap:4px; margin-bottom:18px; }
.seg-btn {
  flex:1; padding:10px; border-radius:10px; text-align:center; font-size:13px; font-weight:700;
  cursor:pointer; color:var(--text-m); transition:all .18s;
  display:flex; align-items:center; justify-content:center; gap:7px;
}
.seg-btn.active { background:var(--surface); color:var(--text-h); box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.seg-btn.idoom-act { background:var(--surface); color:var(--idoom); box-shadow:0 2px 8px rgba(94,53,139,0.15); }
.amounts-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin-bottom:14px; }
.amt-chip {
  padding:12px 8px; border:1.5px solid var(--border); border-radius:12px;
  text-align:center; font-size:13px; font-weight:700; cursor:pointer; color:var(--text-b); transition:all .15s;
}
.amt-chip.sel { border-color:var(--primary); background:var(--pri-light); color:var(--primary); }
.offer-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.offer-card { border:1.5px solid var(--border); border-radius:14px; padding:14px; cursor:pointer; transition:all .15s; }
.offer-card.sel { border-color:var(--primary); background:var(--pri-light); }
.offer-name { font-size:13px; font-weight:700; color:var(--text-h); margin-bottom:3px; }
.offer-sub { font-size:11px; color:var(--text-m); }
.offer-card.offer-disabled { opacity:.5; cursor:not-allowed; background:var(--bg); pointer-events:none; }
.offer-sub-muted { font-style:italic; }
.btn-row { display:flex; gap:12px; margin-top:22px; }
.btn-primary {
  background:var(--primary); color:white; border:none; border-radius:14px;
  padding:13px 28px; font-family:var(--font); font-size:14px; font-weight:700;
  cursor:pointer; display:inline-flex; align-items:center; gap:8px;
  transition:background .15s; box-shadow:0 4px 14px rgba(245,160,0,0.35);
}
.btn-primary:hover { background:var(--pri-dark); }
.btn-primary:disabled { opacity:.6; cursor:not-allowed; }
.btn-ghost {
  background:transparent; color:var(--text-b); border:1.5px solid var(--border);
  border-radius:14px; padding:12px 22px; font-family:var(--font); font-size:14px;
  font-weight:600; cursor:pointer; transition:border .15s;
}
.btn-ghost:hover { border-color:var(--primary); color:var(--primary); }

/* ── INTERNET TABLE ── */
.price-table { width:100%; border-collapse:separate; border-spacing:0 7px; }
.price-table th { font-size:11px; font-weight:700; color:var(--text-m); text-align:left; padding:0 14px 6px; }
.price-table td { background:var(--surface); padding:13px 14px; font-size:13px; font-weight:600; color:var(--text-h); border:1px solid var(--border); }
.price-table td:first-child { border-radius:12px 0 0 12px; border-right:none; }
.price-table td:not(:first-child):not(:last-child) { border-left:none; border-right:none; }
.price-table td:last-child { border-radius:0 12px 12px 0; border-left:none; }
.price-table tr { cursor:pointer; transition:all .12s; }
.price-table tr.sel td { background:var(--pri-light); border-color:var(--pri-mid); }
.price-table tr.inet-sel td { background:rgba(94,53,139,0.07); border-color:rgba(94,53,139,0.2); }
.pt-icon { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; }
.pt-name { font-size:13px; font-weight:700; }
.pt-desc { font-size:11px; color:var(--text-m); font-weight:500; }
.pt-price { font-size:15px; font-weight:800; }
.pt-da { font-size:11px; color:var(--text-m); }
.pt-radio { width:18px; height:18px; border-radius:50%; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; }
.pt-radio.checked { border-color:var(--primary); background:var(--primary); }
.pt-radio.checked::after { content:''; width:7px; height:7px; background:white; border-radius:50%; display:block; }
.tag { display:inline-block; padding:3px 9px; border-radius:6px; font-size:11px; font-weight:700; }
.tag-purple { background:rgba(94,53,139,0.1); color:#5e358b; }
.tag-green  { background:#E8F5E9; color:#2E7D32; }

/* ── RECENT LIST ── */
.recent-row {
  display:flex; align-items:center; gap:12px; padding:10px;
  background:var(--bg); border-radius:12px; margin-bottom:8px;
}
.rec-icon { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:white; flex-shrink:0; }
.rec-main { font-size:12px; font-weight:700; }
.rec-sub { font-size:11px; color:var(--text-m); }
.rec-amt { font-size:13px; font-weight:800; color:var(--primary); white-space:nowrap; }
.rec-right { margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.rec-status { display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; padding:2px 8px; border-radius:6px; }
.rec-status.done    { background:#E8F5E9; color:#2E7D32; }
.rec-status.pending { background:#FFF8E1; color:#F57F17; }
.rec-status.failed  { background:#FFEBEE; color:#C62828; }
.summary-row { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border); font-size:13px; }
.summary-row:last-of-type { border-bottom:none; }
.summary-lbl { color:var(--text-m); font-weight:500; }
.summary-val { font-weight:700; }
.summary-val.accent { color:var(--primary); font-size:14px; }

.empty-state {
  padding:18px 12px; text-align:center; color:var(--text-m); font-size:13px;
}

/* ── ACCOUNT ── */
.profile-hero {
  background:linear-gradient(135deg, #0F2554, #1A3A7A);
  border-radius:24px; padding:28px 30px; color:white;
  margin-bottom:20px; display:flex; align-items:center; gap:20px;
}
.profile-ava { width:64px; height:64px; background:rgba(255,255,255,0.2); border:3px solid rgba(255,255,255,0.35); border-radius:18px; display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:800; flex-shrink:0; }
.profile-name { font-size:20px; font-weight:800; }
.profile-ph { font-size:13px; opacity:.72; margin-top:2px; }
.profile-chips { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.profile-chip { background:rgba(255,255,255,0.14); border:1px solid rgba(255,255,255,0.2); border-radius:8px; padding:4px 12px; font-size:12px; font-weight:600; }
.menu-sec-lbl { font-size:11px; font-weight:700; color:var(--text-m); letter-spacing:.5px; text-transform:uppercase; padding:14px 16px 6px; }
.mi-web {
  display:flex; align-items:center; gap:14px; padding:12px 16px;
  border-radius:14px; cursor:pointer; transition:background .12s; border:1px solid transparent;
}
.mi-web:hover { background:var(--bg); border-color:var(--border); }
.mi-icon-w { width:36px; height:36px; border-radius:11px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.mi-main-w { font-size:13px; font-weight:700; color:var(--text-h); }
.mi-sub-w  { font-size:11px; color:var(--text-m); margin-top:1px; }
.mi-chev-w { margin-left:auto; color:#C8C8C8; }
.divider { height:1px; background:var(--border); margin:8px 0; }

/* ══════════ IDOOM / 4G PAGE ══════════ */

/* Type selector tabs */
.id-type-row {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.id-type-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 10px; border-radius: 16px;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-m);
  cursor: pointer; transition: all .18s;
}
.id-type-btn.active {
  background: #E8F0FE; border-color: #005BAA;
  color: #005BAA;
  box-shadow: 0 4px 16px rgba(0,91,170,0.13);
}
.id-type-img {
  height: 40px; width: auto; max-width: 90%;
  object-fit: contain;
  transition: transform .18s;
}
.id-type-btn.active .id-type-img { transform: scale(1.08); }
.id-type-label {
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
}

/* AT brand bar */
.id-brand-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #EEF4FF;
  border-radius: 14px; margin-bottom: 16px;
}
.id-brand-logo {
  font-size: 20px; font-weight: 900; line-height: 1;
  background: #005BAA; color: white !important;
  padding: 6px 10px; border-radius: 8px;
  display: flex; align-items: baseline; gap: 2px;
}
.id-brand-logo span { color: white !important; }
.id-brand-sub { font-size: 12px; font-weight: 600; color: #005BAA; }

/* Input card */
.id-input-card { margin-bottom: 0; }
#idPhone {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
}
#idPhone::placeholder {
  font-size: clamp(16px, 4vw, 26px);
  font-weight: 400;
  letter-spacing: normal;
  opacity: .4;
}

/* Verify button */
.id-verify-btn {
  display: flex; align-items: center; gap: 7px;
  background: #005BAA; color: white;
  border: none; border-radius: 12px;
  padding: 12px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .15s; font-family: var(--font);
  flex-shrink: 0;
}
.id-verify-btn:hover  { background: #00408a; }
.id-verify-btn:disabled { background: #9E9E9E; cursor: not-allowed; }

/* Info card */
.id-info-card {
  background: #F0F7FF; border: 1.5px solid #B3D1F5;
  margin-bottom: 0;
}
.id-info-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #005BAA;
  margin-bottom: 14px;
}
.id-info-grid { display: flex; flex-direction: column; gap: 8px; }
.id-info-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 6px 0;
  border-bottom: 1px solid rgba(0,91,170,.1);
}
.id-info-row:last-child { border-bottom: none; }
.id-info-lbl { font-size: 12px; font-weight: 600; color: var(--text-m); }
.id-info-val { font-size: 13px; font-weight: 700; color: var(--text-h); text-align: right; direction: ltr; }
.id-debt-loading { display:flex; justify-content:center; padding:16px; }
.id-debt-card {
  display: flex; flex-direction: column; align-items: center;
  border-radius: 16px; padding: 20px 16px; text-align: center;
  margin-bottom: 4px;
}
.id-debt-has {
  background: rgba(229,57,53,.07);
  border: 1.5px solid rgba(229,57,53,.25);
}
.id-debt-none {
  background: rgba(67,160,71,.07);
  border: 1.5px solid rgba(67,160,71,.25);
}
.id-debt-icon { font-size: 28px; margin-bottom: 6px; }
.id-debt-lbl { font-size: 12px; font-weight: 600; color: var(--text-m); margin-bottom: 6px; }
.id-debt-has .id-debt-lbl { color: #c62828; }
.id-debt-none .id-debt-lbl { color: #2e7d32; }
.id-debt-amt { font-size: 32px; font-weight: 900; color: #e53935; line-height: 1; }
.id-debt-amt span { font-size: 14px; font-weight: 600; color: #c62828; margin-left: 4px; }

.id-debt-row {
  background: rgba(229,57,53,.06);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
  border-bottom: none !important;
}

/* Cards grid */
.id-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 20px;
}

/* ── Amount selection buttons ── */
.id-amt-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 16px 8px;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
  width: 100%;
}
.id-amt-btn:hover:not(:disabled) {
  border-color: #005BAA;
  background: #EEF4FF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,91,170,.15);
}
.id-amt-btn:active:not(:disabled) { transform: scale(.97); }
.id-amt-price {
  font-size: 22px; font-weight: 800; color: #005BAA; line-height: 1;
}
.id-amt-da { font-size: 12px; font-weight: 600; color: var(--text-m); }
.id-amt-name {
  font-size: 10px; font-weight: 600; color: var(--text-m);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.id-amt-orig {
  font-size: 10px; color: var(--text-m); text-decoration: line-through;
}
.id-amt-oos { opacity: .45; cursor: not-allowed; }
.id-amt-oos-lbl { font-size: 9px; color: #e53935; font-weight: 700; }

/* Success card */
.id-success-card {
  background: var(--surface); border: 1.5px solid #C8E6C9;
  border-radius: 20px; padding: 28px 20px 24px;
  text-align: center; margin-bottom: 20px;
}
.id-success-icon {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg,#2E7D32,#66BB6A);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: 0 6px 20px rgba(46,125,50,.35);
}
.id-success-title {
  font-size: 20px; font-weight: 900; color: #2E7D32;
  margin-bottom: 18px;
}
.id-trans-grid {
  background: #F1F8E9; border-radius: 12px;
  padding: 12px 14px; text-align: left;
}

@media (max-width: 420px) {
  .id-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ══════════ STATISTICS PAGE ══════════ */
.st-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.st-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
}
.st-kpi-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
}
.st-kpi-val {
  font-size: 22px; font-weight: 900;
  color: var(--text-h); line-height: 1;
}
.st-kpi-lbl {
  font-size: 10px; font-weight: 600;
  color: var(--text-m); line-height: 1.3;
}

.st-chart-card { margin-bottom: 16px; }
.st-chart-hdr {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text-h);
  margin-bottom: 16px;
}
.st-chart-wrap { position: relative; width: 100%; }
.st-donut-wrap { max-width: 280px; margin: 0 auto; }

.st-dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .st-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .st-dual-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .st-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .st-kpi { padding: 12px 8px; }
  .st-kpi-val { font-size: 18px; }
}

/* ── iOS-style preference toggle ── */
.pref-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 14px;
}
.pref-row-text { flex: 1; min-width: 0; }
.pref-row-text .mi-main-w { margin-bottom: 2px; }

.pref-toggle-wrap { flex-shrink: 0; }
.pref-toggle { display: none; }
.pref-toggle-lbl {
  display: block; width: 46px; height: 26px; border-radius: 13px;
  background: #D1D5DB; cursor: pointer;
  transition: background .22s; position: relative;
}
.pref-toggle-lbl::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .22s;
}
.pref-toggle:checked + .pref-toggle-lbl {
  background: var(--primary);
}
.pref-toggle:checked + .pref-toggle-lbl::after {
  transform: translateX(20px);
}

/* ── LOGIN PAGE ── */
.login-page { min-height:100vh; display:flex; background:var(--bg); width:100%; }
.login-left {
  flex:1; background:linear-gradient(145deg,#0F2554,#1A3A7A);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:60px 40px; position:relative; overflow:hidden;
}
.login-left::before { content:''; position:absolute; top:-100px; right:-100px; width:400px; height:400px; background:radial-gradient(circle,rgba(245,160,0,0.22) 0%,transparent 70%); }
.login-left::after  { content:''; position:absolute; bottom:-80px; left:-80px; width:300px; height:300px; background:radial-gradient(circle,rgba(255,255,255,0.08) 0%,transparent 70%); }
.login-left-inner { position:relative; z-index:1; text-align:center; }
.login-logo-box {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:white; border-radius:14px; padding:14px 24px;
  font-weight:900; font-size:32px; letter-spacing:1px; margin-bottom:24px;
}
.login-logo-box .one { color:#1A3A7A; }
.login-logo-box .step { color:var(--primary); }
.login-tagline { font-size:13px; color:rgba(255,255,255,0.45); line-height:1.7; max-width:280px; }
.login-features { margin-top:28px; display:flex; flex-direction:column; gap:10px; }
.login-feat { display:flex; align-items:center; gap:10px; font-size:13px; color:rgba(255,255,255,0.55); }
.feat-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.login-right { width:480px; display:flex; align-items:center; justify-content:center; padding:40px; background:white; }
.login-form-w { width:100%; max-width:380px; }
.login-title { font-size:24px; font-weight:800; margin-bottom:5px; }
.login-sub   { font-size:13px; color:var(--text-m); margin-bottom:26px; }
.login-tab-row { display:flex; background:var(--bg); border-radius:12px; padding:4px; margin-bottom:22px; gap:3px; }
.login-tab { flex:1; padding:10px; text-align:center; font-size:13px; font-weight:700; border-radius:9px; cursor:pointer; color:var(--text-m); transition:all .15s; }
.login-tab.active { background:white; color:var(--text-h); box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.forgot-link { text-align:right; margin-bottom:18px; }
.forgot-link a { font-size:12px; color:var(--primary); font-weight:600; cursor:pointer; }
.switch-hint { font-size:13px; color:var(--text-m); text-align:center; margin-top:14px; }
.switch-hint span { color:var(--primary); font-weight:700; cursor:pointer; }
.terms-note { font-size:11px; color:var(--text-m); text-align:center; margin-top:10px; }
.terms-note span { color:var(--primary); cursor:pointer; }
.form-error {
  background:#FFEBEE; color:#C62828; padding:10px 14px; border-radius:10px;
  font-size:12px; font-weight:600; margin-bottom:14px; display:none;
}
.form-error.show { display:block; }

/* ── MODAL ── */
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:200; opacity:0; visibility:hidden; transition:all .2s; }
.modal-bg.show { opacity:1; visibility:visible; }
.modal-box { background:white; border-radius:24px; padding:30px; width:420px; max-width:90vw; box-shadow:0 20px 60px rgba(0,0,0,0.18); transform:scale(.95); transition:transform .2s; }
.modal-bg.show .modal-box { transform:scale(1); }
.modal-title { font-size:18px; font-weight:800; margin-bottom:5px; }
.modal-sub { font-size:13px; color:var(--text-m); margin-bottom:18px; }
.m-row { display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid var(--border); font-size:13px; }
.m-row:last-of-type { border-bottom:none; }
.m-lbl { color:var(--text-m); font-weight:500; }
.m-val { font-weight:700; }
.m-val.accent { color:var(--primary); font-size:15px; }
.m-btns { display:flex; gap:10px; margin-top:18px; }
.m-cancel { flex:1; padding:13px; background:var(--bg); border:none; border-radius:12px; font-family:var(--font); font-size:14px; font-weight:700; cursor:pointer; color:var(--text-b); }
.m-confirm { flex:2; padding:13px; background:var(--primary); border:none; border-radius:12px; font-family:var(--font); font-size:14px; font-weight:700; cursor:pointer; color:white; box-shadow:0 4px 12px rgba(204,34,34,0.3); }
.m-confirm:disabled { opacity:.6; cursor:not-allowed; }

/* ── TOAST ── */
.toast { position:fixed; bottom:28px; right:28px; background:#1C1C2E; color:white; padding:13px 18px; border-radius:14px; font-size:13px; font-weight:600; display:flex; align-items:center; gap:10px; z-index:300; transform:translateY(20px); opacity:0; transition:all .25s; pointer-events:none; max-width:360px; }
.toast.show { transform:translateY(0); opacity:1; }
.toast.error { background:#C62828; }

/* ── LOADING OVERLAY ── */
.spinner {
  display:inline-block; width:14px; height:14px;
  border:2px solid rgba(255,255,255,0.35);
  border-top-color:white; border-radius:50%;
  animation:spin .8s linear infinite;
}
.btn-ghost .spinner { border-color:rgba(0,0,0,0.15); border-top-color:var(--primary); }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── BOTTOM NAV (mobile) ── */
.bottom-nav {
  display:none;
  position:fixed; bottom:0; left:0; right:0; z-index:120;
  background:var(--surface); border-top:1px solid var(--border);
  height:66px; padding:0 4px;
  box-shadow:0 -4px 24px rgba(0,0,0,0.10);
}
.bottom-nav-inner { display:flex; align-items:center; height:100%; width:100%; padding:0 4px; gap:2px; }
.bn-item {
  flex:1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:3px; cursor:pointer;
  padding:4px 2px; transition:color .15s; color:var(--text-m);
  font-size:10px; font-weight:600; line-height:1; letter-spacing:.1px;
  min-width:0;
}

/* Round icon circle */
.bn-icon {
  width:42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:background .18s, box-shadow .18s;
}
.bn-item svg { flex-shrink:0; transition:stroke .18s; }

/* Active state — coloured pill + glow */
.bn-item.active { color:var(--primary); }
.bn-item.active .bn-icon {
  background:var(--pri-light);
  box-shadow:0 4px 14px rgba(245,160,0,0.35);
}
.bn-item.active svg { stroke:var(--primary); }
.bn-item:not(.active):hover .bn-icon { background:var(--bg); }

/* ── RESPONSIVE ── */
@media(max-width:1100px){
  .qa-grid { grid-template-columns:repeat(5,1fr); }
  .dc-grid { grid-template-columns:repeat(2,1fr); }
  .ops-grid { grid-template-columns:repeat(3,1fr); }
  .amounts-grid { grid-template-columns:repeat(3,1fr); }
}

/* ── TABLET / LARGE PHONE ── */
@media(max-width:768px){
  /* Shell */
  .sidebar { display:none; }
  .bottom-nav { display:flex; }
  .main { margin-left:0; width:100%; max-width:100vw; overflow-x:hidden; }
  .topbar { padding:0 14px; height:56px; }
  .topbar-title { font-size:15px; }
  .page-content { padding:12px 10px; padding-bottom:80px; overflow-x:hidden; }

  /* Home — wallet hero */
  .wallet-hero { padding:18px 16px; border-radius:18px; margin-bottom:14px; }
  .wh-top { margin-bottom:12px; }
  .wh-bal { font-size:30px; letter-spacing:-.5px; }
  .wh-name { font-size:12px; }
  .wh-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:14px; }
  .wh-btn { padding:8px 10px; font-size:11px; gap:5px; border-radius:10px; justify-content:center; }
  .wh-btn svg { width:13px; height:13px; }

  /* Home — stat cards */
  .stats-row { grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
  .stat-card { padding:14px 12px; border-radius:16px; }
  .sg-val { font-size:20px; }
  .sg-title { font-size:11px; }

  /* Home — quick actions */
  .qa-grid { grid-template-columns:repeat(5,1fr); gap:6px; margin-bottom:16px; }
  .qa-icon { width:48px; height:48px; }
  .qa-icon svg { width:22px; height:22px; }
  .qa-lbl { font-size:10px; }

  /* Home — sliders */
  .hero-slider { border-radius:14px; margin-bottom:14px; }
  .dash-cat-slider .cat-card, .dcs-slide-card { width:170px; }

  /* Other grids */
  .grid-2 { grid-template-columns:1fr; }
  .ops-grid { grid-template-columns:repeat(3,1fr); gap:8px; }
  .dc-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .dc-grid-cards { grid-template-columns:1fr 1fr; }
  .amounts-grid { grid-template-columns:repeat(3,1fr); gap:8px; }

  /* Profile */
  .profile-hero { padding:20px; gap:14px; }
  .profile-name { font-size:17px; }
  .btn-row { flex-direction:column; gap:10px; }
  .btn-primary, .btn-ghost { width:100%; justify-content:center; }

  /* Login */
  .login-left { display:none; }
  .login-right { width:100%; padding:24px 20px; }
  .login-form-w { max-width:100%; }
  .login-title { font-size:20px; }

  /* Misc */
  .modal-box { width:92vw; padding:22px 18px; }
  .toast { bottom:72px; right:12px; left:12px; text-align:center; }
  .offer-grid { grid-template-columns:1fr; }
  .tb-ava { display:none; }
}

/* ── SMALL PHONE (≤480px) ── */
@media(max-width:480px){
  .page-content { padding:10px 8px; padding-bottom:76px; }

  /* Wallet hero */
  .wallet-hero { padding:14px 12px; border-radius:16px; margin-bottom:12px; }
  .wh-top { margin-bottom:8px; }
  .wh-bal { font-size:26px; letter-spacing:-.5px; }
  .wh-bal sub { font-size:12px; }
  .wh-badge { font-size:10px; padding:3px 8px; }
  .wh-actions { gap:6px; margin-top:10px; }
  .wh-btn { padding:7px 8px; font-size:10px; gap:4px; }
  .wh-btn svg { width:12px; height:12px; }

  /* Stat cards */
  .stats-row { gap:8px; margin-bottom:12px; }
  .stat-card { padding:12px 10px; border-radius:14px; }
  .sg-val { font-size:18px; }
  .sg-title { font-size:10px; }
  .sg-link { font-size:9px; margin-top:4px; }

  /* Quick actions */
  .qa-grid { gap:4px; margin-bottom:14px; }
  .qa-icon { width:42px; height:42px; }
  .qa-icon svg { width:20px; height:20px; }
  .qa-lbl { font-size:9px; }

  /* Sliders */
  .hero-slider { min-height:80px; border-radius:12px; margin-bottom:12px; }
  .dash-cat-slider .cat-card, .dcs-slide-card { width:150px; }
  .cat-card .cat-card-img { height:80px; }
  .sec-hdr { margin-bottom:8px; }

  /* Grids */
  .ops-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
  .dc-grid-cards { grid-template-columns:1fr 1fr; }
  .cat-grid { grid-template-columns:repeat(2,1fr); }
  .id-cards-grid { grid-template-columns:repeat(2,1fr); }
}

/* ══════════ ADDITIONS (operations, account modals, etc.) ══════════ */

/* Register form: two-column rows */
.grid-2-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) { .grid-2-fields { grid-template-columns: 1fr; } }

/* Flexy operator badge */
/* Phone input with inline operator logo */
.f-input-with-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* input stretches to fill; logo sits as a sibling — never overlaps */
.f-input-logo {
  flex: 1;
  min-width: 0;
}

/* ── Flexy phone input — large fluid font ── */
#fPhone {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  padding-top: 14px;
  padding-bottom: 14px;
  /* no right padding needed — logo is outside the input */
  padding-right: 12px;
  line-height: 1.1;
  width: 100%;
}
#fPhone::placeholder {
  font-size: clamp(18px, 4vw, 30px);
  font-weight: 400;
  letter-spacing: normal;
  opacity: .45;
}

/* Custom amount input — same fluid scale as phone number */
#fCustom {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  padding-top: 14px;
  padding-bottom: 14px;
  text-align: center;
}
#fCustom::placeholder {
  font-size: clamp(16px, 3.5vw, 26px);
  font-weight: 400;
  letter-spacing: normal;
  opacity: .4;
}

.op-logo-side {
  /* flex sibling — no longer absolute inside the input */
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  pointer-events: none;
}
.op-logo-img {
  display: block; height: 30px; width: auto;
  object-fit: contain; border-radius: 4px;
}
.op-badge-name {
  font-size: 12px; font-weight: 800; letter-spacing: .3px;
  white-space: nowrap;
}
[dir="rtl"] #fPhone { padding-right: 12px; padding-left: 12px; }
[dir="rtl"] .f-input-with-logo { flex-direction: row-reverse; }
/* Dashboard operator circles — logo variant */
.op-circle-img {
  background: #f5f5f5;
  padding: 6px;
}
.op-circle-img img {
  width: 40px; height: 40px; object-fit: contain; border-radius: 50%;
}
.facture-row {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}
.facture-row-text { flex: 1; min-width: 0; }
.facture-title { font-size: 13px; font-weight: 700; color: var(--text-h); }
.facture-sub { font-size: 11px; color: var(--text-m); margin-top: 2px; line-height: 1.35; }
.facture-row .pref-toggle-wrap { flex-shrink: 0; }
/* ── CATEGORY CARDS (Cards page) — compact light tile with image on top ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 220px));
  justify-content: start;
  gap: 14px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  min-height: 0;
  color: var(--text-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-card::after { display: none; }            /* kill the old decorative bubble */
.cat-card .cat-card-img {
  width: 100%;
  height: 100px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cat-card .cat-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.cat-card .cat-card-body { padding: 10px 12px 12px; }
.cat-card .cat-card-name {
  font-size: 13px; font-weight: 700; color: var(--text-h);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-card .cat-card-desc {
  font-size: 11px; color: var(--text-m); margin-top: 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── CARD TILES (inside a category) — same compact, readable design ── */
.dc-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
  justify-content: start;
  gap: 14px;
}
.card-tile {
  background: var(--surface);
  color: var(--text-h);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.card-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-tile .card-tile-img {
  position: relative;
  width: 100%;
  height: 110px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-tile .card-tile-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.card-tile .card-tile-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px;
  letter-spacing: .3px;
}
.card-tile .card-tile-body { padding: 10px 12px 6px; flex: 1; }
.card-tile .card-tile-name {
  font-size: 13px; font-weight: 700; color: var(--text-h);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.card-tile .card-tile-price {
  font-size: 15px; font-weight: 800; color: var(--primary);
  margin-top: 4px;
}
.card-tile .card-tile-price span {
  font-size: 10px; color: var(--text-m); font-weight: 700; margin-left: 2px;
}
.card-tile .card-tile-orig {
  text-decoration: line-through;
  color: var(--text-m);
  font-weight: 600;
  font-size: 11px;
  margin-left: 6px !important;
}
.card-tile .card-tile-cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  transition: background .15s;
}
/* ── Stock badge ── */
.ct-stock {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .3px;
  padding: 2px 7px; border-radius: 20px;
  margin-top: 6px;
}
.ct-stock::before {
  content: ''; display: block;
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.ct-stock-in  { background: #E8F5E9; color: #2E7D32; }
.ct-stock-in::before  { background: #43A047; }
.ct-stock-out { background: #FFEBEE; color: #C62828; }
.ct-stock-out::before { background: #EF5350; }

/* ── Out-of-stock tile ── */
.card-tile-oos {
  opacity: .7;
  cursor: default;
  pointer-events: auto; /* keep clickable so toast fires */
}
.card-tile-oos .card-tile-img { filter: grayscale(60%); }
.card-tile-oos:hover { transform: none !important; box-shadow: var(--shadow-sm) !important; }

/* ── Out-of-stock CTA button ── */
.card-tile-cta.cta-oos {
  background: #9E9E9E;
  cursor: default;
}
.card-tile-oos:hover .card-tile-cta.cta-oos { background: #9E9E9E; }

.card-tile:hover .card-tile-cta { background: var(--pri-dark); }

@media (max-width: 520px) {
  .cat-grid, .dc-grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .cat-card .cat-card-img,
  .card-tile .card-tile-img { height: 90px; }
}

/* Operations page */
.ops-controls {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px;
}
.ops-tabs {
  display: flex; gap: 8px;
}
.ops-tab {
  flex: 1; padding: 10px 14px;
  background: var(--bg); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-m);
  text-align: center; cursor: pointer; transition: .15s;
}
.ops-tab.active {
  background: var(--primary); color: #fff;
}
.ops-filters {
  display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; align-items: center;
}
.btn-sm { padding: 8px 12px !important; font-size: 12px; }
.ops-list { display: flex; flex-direction: column; gap: 8px; }
/* Compact variant for the Flexy mini-history */
.ops-list-compact .op-row { padding: 10px 12px; }
.ops-list-compact .op-row-title { font-size: 13px; }
.ops-list-compact .op-row-sub   { font-size: 11px; }
.ops-list-compact .op-row-amt   { font-size: 15px; }
.ops-list-compact .op-row-date  { font-size: 10px; }
.ops-list-compact .op-row-logo { width: 34px; height: 34px; }
.ops-list-compact .op-row-logo .op-logo-img,
.ops-list-compact .op-row-logo-img { max-height: 28px; max-width: 34px; }
.ops-list-compact .op-row-logo-fallback,
.ops-list-compact .op-row-logo-card { width: 30px; height: 30px; border-radius: 8px; }
.op-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 12px;
  cursor: pointer;
  transition: .15s;
}
.op-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.op-row-type .op-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; width: auto; height: auto;
  border-radius: 100px; font-size: 10px; font-weight: 700;
  color: #fff; white-space: nowrap;
}
.op-pill-pending { padding-left: 8px; }
.op-pill-spin {
  display: inline-block; width: 10px; height: 10px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.op-row-pending { opacity: 0.96; }
.od-pending-note {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 4px; padding: 10px 12px;
  background: #E3F2FD; border-radius: 10px;
  font-size: 12px; font-weight: 600; color: #1565C0;
}
.od-pending-spinner {
  width: 14px; height: 14px;
  border-color: rgba(21,101,192,0.25);
  border-top-color: #1565C0;
}
.op-row-info { min-width: 0; }
.op-row-title { font-size: 14px; font-weight: 700; color: var(--text-h); }
.op-row-id { font-size: 11px; color: var(--text-m); margin-left: 4px; }
.op-row-sub { font-size: 12px; color: var(--text-b); margin-top: 2px; }
.op-row-date { font-size: 11px; color: var(--text-m); margin-top: 2px; }
.op-row-logo {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
}
.op-row-logo .op-logo-img,
.op-row-logo-img {
  max-height: 32px; max-width: 40px; width: auto; height: auto;
  object-fit: contain; border-radius: 6px;
}
.op-row-logo-fallback,
.op-row-logo-card {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: #FFF3E0; color: var(--primary);
  font-size: 14px; font-weight: 800;
}
.op-row-amt { font-size: 17px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.op-row-amt span { font-size: 10px; color: var(--text-m); margin-left: 2px; }
.ops-more {
  text-align: center; padding: 10px; cursor: pointer;
  color: var(--primary); font-weight: 700; font-size: 13px;
}
@media (max-width: 520px) {
  .ops-filters { grid-template-columns: 1fr 1fr auto; }
}

/* Modal close button + notes */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-bg.show { display: flex; }
.modal-box {
  background: #fff; border-radius: 18px; padding: 26px 24px;
  width: min(440px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md); position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: var(--text-m);
  transition: background .15s, color .15s, transform .15s;
  z-index: 2;
}
.modal-close:hover { background: var(--border); color: var(--text-h); transform: rotate(90deg); }
.modal-close:active { transform: rotate(90deg) scale(.94); }
.modal-body { margin: 8px 0 14px; font-size: 13px; color: var(--text-b); }
.modal-body .m-row { padding: 8px 0; }
.m-note {
  font-size: 12px; color: var(--text-m); background: var(--pri-light);
  padding: 8px 12px; border-radius: 8px; margin: 12px 0;
  border-left: 3px solid var(--primary);
}
.m-note.error { background: #FFEBEE; border-left-color: #E53935; color: #C62828; }
.m-btns { display: flex; gap: 8px; margin-top: 12px; }
.m-cancel, .m-confirm {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: none;
  font-weight: 700; font-size: 13px; cursor: pointer; transition: .15s;
}
.m-cancel { background: var(--bg); color: var(--text-b); }
.m-cancel:hover { background: var(--border); }
.m-confirm { background: var(--primary); color: #fff; }
.m-confirm:hover { background: var(--pri-dark); }
.m-confirm:disabled { opacity: .5; cursor: not-allowed; }
.m-confirm.danger { background: #E53935; }

/* Card-buy modal */
.cb-img {
  width: 100%; max-height: 140px; object-fit: cover; border-radius: 12px;
  margin: 6px 0 10px; background: var(--bg);
}
.cb-name { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.cb-desc { font-size: 12px; color: var(--text-m); margin-bottom: 14px; }
.qty {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg); padding: 4px 12px; border-radius: 100px;
  font-weight: 700;
}
.qty-btn {
  background: var(--primary); color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; line-height: 1;
  box-shadow: 0 2px 6px rgba(245,160,0,0.35);
  transition: background .15s, transform .12s, box-shadow .15s;
}
.qty-btn:hover  { background: var(--pri-dark); box-shadow: 0 4px 10px rgba(245,160,0,0.5); }
.qty-btn:active { transform: scale(.92); }

/* Operation details modal */
.od-state {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 14px;
}
.od-date { font-size: 12px; color: var(--text-m); }
.od-codes-hdr {
  margin: 16px 0 8px; font-size: 12px; font-weight: 700; color: var(--text-b);
  text-transform: uppercase; letter-spacing: .5px;
}
.od-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); padding: 10px 12px; border-radius: 8px;
  margin-bottom: 6px;
}
.od-code code {
  font-family: 'Poppins', monospace; font-size: 14px; font-weight: 700;
  color: var(--text-h); letter-spacing: 1px; word-break: break-all;
}
.od-copy {
  background: var(--primary); color: #fff;
  padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 2px 6px rgba(245,160,0,0.3);
  transition: background .15s, box-shadow .15s, transform .12s;
}
.od-copy:hover  { background: var(--pri-dark); box-shadow: 0 4px 10px rgba(245,160,0,0.45); transform: translateY(-1px); }
.od-copy:active { transform: translateY(0) scale(.97); }

/* Lists (bonus, payments) */
.list-body { max-height: 50vh; overflow-y: auto; padding-right: 4px; }
.bn-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: var(--bg);
  border-radius: 10px; margin-bottom: 6px;
}
.bn-date { font-size: 13px; font-weight: 700; color: var(--text-h); }
.bn-sub  { font-size: 11px; color: var(--text-m); margin-top: 2px; }
.bn-amt  { font-size: 15px; font-weight: 800; color: #F57C00; }

/* Empty / loading state */
.empty-state {
  text-align: center; padding: 30px 20px; color: var(--text-m);
  font-size: 13px;
}
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid currentColor; border-bottom-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Form error banner */
.form-error {
  display: none;
  background: #FFEBEE; color: #C62828; border-left: 3px solid #E53935;
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-bottom: 12px;
}
.form-error.show { display: block; }

/* Top-bar solde — stylised mini wallet card (navy + orange accent) */
.tb-solde {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: linear-gradient(135deg, #1A3A7A 0%, #2854a8 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  box-shadow:
    0 4px 14px rgba(26,58,122,0.28),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform .15s ease, box-shadow .18s ease;
}
/* Decorative orange glow in the top-right corner */
.tb-solde::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(245,160,0,0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
/* Faint diagonal sheen for a premium-card feel */
.tb-solde::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 0;
}
.tb-solde > * { position: relative; z-index: 1; }
.tb-solde:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px rgba(26,58,122,0.38),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.tb-solde:active { transform: translateY(-1px); }

.tb-solde-icon {
  width: 32px; height: 32px; flex: 0 0 auto;
  background: linear-gradient(135deg, #F5A000, #FFB733);
  color: #fff;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(245,160,0,0.45);
}
.tb-solde-amount {
  display: inline-flex; align-items: baseline; gap: 4px;
  direction: ltr; /* currency always to the right, regardless of page RTL */
}
.tb-solde-val {
  font-size: 16px; font-weight: 900;
  color: #fff;
  letter-spacing: -0.2px;
}
.tb-solde-cur {
  font-size: 10px; font-weight: 800;
  color: #F5A000;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Subtle "flash" pulse fired on balance change */
@keyframes tbFlash {
  0%   { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(245,160,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08); }
  60%  { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 10px rgba(245,160,0,0),    inset 0 1px 0 rgba(255,255,255,0.08); }
  100% { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(245,160,0,0),      inset 0 1px 0 rgba(255,255,255,0.08); }
}
.tb-solde.flash { animation: tbFlash .9s ease-out; }

/* Balance went UP → green ring pulse */
@keyframes tbFlashUp {
  0%   { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(46,125,50,0.7),  inset 0 1px 0 rgba(255,255,255,0.08); }
  60%  { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 12px rgba(46,125,50,0),  inset 0 1px 0 rgba(255,255,255,0.08); }
  100% { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(46,125,50,0),    inset 0 1px 0 rgba(255,255,255,0.08); }
}
/* Balance went DOWN → red ring pulse */
@keyframes tbFlashDown {
  0%   { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(198,40,40,0.7),  inset 0 1px 0 rgba(255,255,255,0.08); }
  60%  { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 12px rgba(198,40,40,0),  inset 0 1px 0 rgba(255,255,255,0.08); }
  100% { box-shadow: 0 4px 14px rgba(26,58,122,0.28), 0 0 0 0 rgba(198,40,40,0),    inset 0 1px 0 rgba(255,255,255,0.08); }
}
.tb-solde.flash-up   { animation: tbFlashUp   1s ease-out; }
.tb-solde.flash-down { animation: tbFlashDown  1s ease-out; }

/* Number bump — the value briefly scales up when it changes */
@keyframes tbValBump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.tb-solde-val.bump { animation: tbValBump .35s cubic-bezier(.34,1.56,.64,1); }

@keyframes tbBtnSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.tb-btn-spin svg { animation: tbBtnSpin .7s linear infinite; }

@media (max-width: 768px) {
  .tb-solde { gap: 8px; padding: 5px 12px 5px 5px; border-radius: 12px; }
  .tb-solde-icon { width: 28px; height: 28px; border-radius: 8px; }
  .tb-solde-val  { font-size: 14px; }
}
@media (max-width: 480px) {
  .tb-solde { padding: 5px 10px 5px 5px; }
}

/* ══════════ LANGUAGE SWITCHER (AR / FR) ══════════ */
.lang-switch {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px;
  gap: 0;
  flex: 0 0 auto;
}
.lang-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 11px;
  border: none;
  background: transparent;
  color: var(--text-m);
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: .6px;
  transition: background .15s, color .15s;
  line-height: 1;
  min-width: 30px;
}
.lang-btn.active {
  background: var(--primary);
  color: white;
}
.lang-btn:not(.active):hover { color: var(--text-h); }
/* The login-page switcher floats in the top-right corner of the right pane. */
.lang-switch-login {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
}
.login-right { position: relative; }
@media (max-width: 520px) {
  .lang-btn { padding: 4px 9px; font-size: 10px; min-width: 28px; }
}

/* ══════════ ARABIC FONT + RTL LAYOUT ══════════ */
body.lang-ar,
body.lang-ar input,
body.lang-ar button,
body.lang-ar textarea,
body.lang-ar select {
  font-family: 'Tajawal', 'Poppins', sans-serif;
}

/* Mirror the fixed sidebar */
[dir="rtl"] .sidebar { left: auto; right: 0; }
[dir="rtl"] .main { margin-left: 0; margin-right: var(--sidebar-w); }
@media (max-width: 768px) {
  [dir="rtl"] .main { margin-right: 0; }
}

/* Mirror chevron / back arrow icons */
[dir="rtl"] .mi-chev-w svg,
[dir="rtl"] .back-btn svg,
[dir="rtl"] .nav-link.active svg ~ * { /* placeholder, harmless */ }
[dir="rtl"] .back-btn svg,
[dir="rtl"] .mi-chev-w svg,
[dir="rtl"] .user-card > svg:last-child,
[dir="rtl"] .wh-btn > svg:first-child {
  transform: scaleX(-1);
}

/* Toast: move to the left in RTL */
[dir="rtl"] .toast { right: auto; left: 28px; }
@media (max-width: 768px) {
  [dir="rtl"] .toast { right: 12px; left: 12px; }
}

/* Login page switcher position flip in RTL */
[dir="rtl"] .lang-switch-login { right: auto; left: 18px; }

/* Numbers + phone / email inputs stay LTR in RTL pages — keeps tel numbers
   like "0770 70 26 64", balances "1 250 Da" and emails readable. */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="number"],
[dir="rtl"] input[type="date"],
[dir="rtl"] input[type="password"],
[dir="rtl"] code,
[dir="rtl"] .tb-solde-val,
[dir="rtl"] .wh-bal,
[dir="rtl"] .stat-val,
[dir="rtl"] .card-tile-price,
[dir="rtl"] .op-row-amt,
[dir="rtl"] .od-date,
[dir="rtl"] .bn-amt,
[dir="rtl"] .od-code code,
[dir="rtl"] .op-circle,
[dir="rtl"] #cbTotal,
[dir="rtl"] #cbUnit,
[dir="rtl"] #cbBal,
[dir="rtl"] #fSumAmt,
[dir="rtl"] #fSumBal,
[dir="rtl"] .summary-val.accent {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Form labels in RTL — align right */
[dir="rtl"] .f-label,
[dir="rtl"] .menu-sec-lbl,
[dir="rtl"] .nav-lbl,
[dir="rtl"] .sec-title { text-align: right; }

/* Op-row amount: keep on the trailing edge (right in LTR, left in RTL) */
[dir="rtl"] .op-row {
  flex-direction: row;
}

/* Modal close button is positioned absolute top-right — flip to top-left */
[dir="rtl"] .modal-close { right: auto; left: 14px; }

/* User-card chevron sits on the trailing edge */
[dir="rtl"] .user-card > svg:last-child { margin-right: 0; }

/* Back button arrow already handled above; tweak gap direction */
[dir="rtl"] .back-btn { padding-left: 14px; padding-right: 12px; }

/* Tajawal needs a slightly larger size to match Poppins visually */
body.lang-ar .nav-link,
body.lang-ar .login-tab,
body.lang-ar .nav-lbl,
body.lang-ar .menu-sec-lbl { letter-spacing: 0; }
body.lang-ar .nav-lbl { font-size: 11px; }

/* Force LTR/numeric on chips that still contain "Da bonus" */
body.lang-ar .profile-chip { direction: rtl; }

/* ══════════ COMMISSIONS MODAL ══════════ */
.cm-title {
  display: flex; align-items: center; gap: 10px;
}
.cm-pct-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg,#E53935,#B71C1C);
  color: #fff; font-size: 18px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.cm-credit-box {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg,#E8F5E9,#C8E6C9);
  border: 1px solid #A5D6A7;
  border-radius: 14px; padding: 14px 18px;
  margin: 14px 0;
}
.cm-credit-lbl { font-size: 12px; font-weight: 700; color: #2E7D32; text-transform: uppercase; letter-spacing: .5px; }
.cm-credit-val { font-size: 22px; font-weight: 900; color: #1B5E20; direction: ltr; }

.cm-table {
  width: 100%; border-collapse: collapse;
  margin: 12px 0;
}
.cm-table thead tr { background: var(--bg); }
.cm-table th {
  padding: 9px 12px; font-size: 12px; font-weight: 700;
  color: var(--text-m); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--border);
  text-align: left;
}
.cm-table td {
  padding: 10px 12px; font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cm-table tbody tr:last-child td { border-bottom: none; }
.cm-table tbody tr:hover { background: var(--bg); }
.cm-op-cell { display: flex; align-items: center; gap: 10px; }
.cm-op-logo { height: 28px; width: auto; object-fit: contain; border-radius: 4px; }
.cm-op-dot  { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.cm-pct { text-align: center; color: #2E7D32; }
.cm-loading { text-align: center; padding: 20px; }
.cm-info-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text-m); line-height: 1.5;
  background: #FFF8E1; border-left: 3px solid #F5A000;
  border-radius: 0 8px 8px 0; padding: 8px 12px;
  margin: 8px 0 14px;
}
[dir="rtl"] .cm-table th,
[dir="rtl"] .cm-op-cell { text-align: right; }
[dir="rtl"] .cm-pct { text-align: center; }
[dir="rtl"] .cm-info-note { border-left: none; border-right: 3px solid #F5A000; border-radius: 8px 0 0 8px; }

/* ══════════ PAYMENTS MODAL — FULL DETAIL ══════════ */
.modal-box-lg { max-width: 580px; }

.pl-filters {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.pl-filters .f-input { flex: 1; min-width: 100px; }

.pl-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.pl-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 10px;
}
.pl-card-ref  { font-size: 14px; font-weight: 700; color: var(--text-b); }
.pl-card-date { font-size: 11px; color: var(--text-m); margin-top: 2px; }
.pl-card-badge {
  background: #E3F2FD; color: #1565C0;
  font-size: 13px; font-weight: 800;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap; direction: ltr;
}
.pl-detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.pl-detail-row:last-of-type { border-bottom: none; }
.pl-detail-lbl { color: var(--text-m); }
.pl-detail-val { font-weight: 600; color: var(--text-b); direction: ltr; }
.pl-detail-val.accent   { color: #2E7D32; }
.pl-detail-val.val-green { color: #2E7D32; font-weight: 700; }
.pl-detail-val.val-red   { color: #C62828; font-weight: 700; }

/* Payment card top badge — green for added balance */
.pl-badge-green {
  background: #E8F5E9 !important;
  color: #2E7D32 !important;
}
.pl-detail-desc {
  margin-top: 8px; font-size: 12px; color: var(--text-m);
  background: var(--card); border-radius: 8px; padding: 6px 10px;
}

/* ══════════ RECHARGE MODAL ══════════ */
.rc-accounts { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.rc-account-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px;
}
.rc-account-icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.rc-account-lbl { font-size: 11px; color: var(--text-m); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.rc-account-val { font-size: 15px; font-weight: 800; color: var(--text-b); direction: ltr; margin-top: 2px; }
.rc-note {
  font-size: 12px; color: var(--text-m);
  background: #FFF8E1; border-left: 3px solid #F5A000;
  border-radius: 0 8px 8px 0;
  padding: 8px 12px; margin: 4px 0 8px;
  line-height: 1.5;
}
.rc-upload-zone {
  display: flex; align-items: center; gap: 10px;
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 14px 18px; cursor: pointer;
  color: var(--text-m); font-size: 13px;
  transition: border-color .15s, background .15s;
}
.rc-upload-zone:hover { border-color: var(--primary); background: var(--pri-light); color: var(--primary); }
[dir="rtl"] .rc-note { border-left: none; border-right: 3px solid #F5A000; border-radius: 8px 0 0 8px; }

/* ══════════ CARD BUY RECHARGE HINT ══════════ */
.cb-recharge-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-m);
  margin-bottom: 8px; flex-wrap: wrap;
}
.link-btn {
  color: var(--primary); font-weight: 700; font-size: 12px;
  text-decoration: underline; cursor: pointer;
  background: none; border: none; padding: 0;
}
.link-btn:hover { color: var(--primary-dark); }

