/* ══════════════════════════════════════════════════════════════
   phonify.css — الواجهة الجديدة لموقع Alawa 3amarli
   تُحمَّل بعد main.css و store-custom.css فتطغى عليهما.
   القائمة الجانبية الداكنة على اليمين • بطاقة الرصيد السوداء • البطاقات الزرقاء
   ══════════════════════════════════════════════════════════════ */

:root {
  --header-height: 72px;
  --sidebar-width: 296px;
  --sidebar-collapsed-width: 84px;

  --pf-black: #0c0c0e;
  --pf-black-2: #151518;
  --pf-black-3: #1d1d21;
  --pf-line-dark: #26262b;
  --pf-blue: #1a8cff;
  --pf-blue-dark: #0a6fe0;
  --pf-blue-soft: #e4f1ff;
  --pf-radius: 18px;
  --pf-radius-lg: 26px;

  --background-color: #f4f3ee;
  --default-color: #1c1c20;
  --heading-color: #0b0b0d;
  --accent-color: #1a8cff;
  --surface-color: #ffffff;
  --muted-color: #7b7b84;
  --light-color: #a4a4ac;
  --border-color: #e7e4db;
  --border-color-light: #efede6;
  --border-color-dark: #d6d2c6;
  --card-bg: #ffffff;
  --card-border: #e7e4db;
  --input-bg: #ffffff;
  --input-border: #dedacd;
  --input-focus-border: #1a8cff;
  --input-focus-ring: rgb(26 140 255 / .18);
  --table-header-bg: #f8f7f2;
  --table-hover-bg: #f3f8ff;
  --header-bg: #ffffff;
  --header-border: #e7e4db;
  --header-shadow: none;
  --sidebar-bg: #0c0c0e;
  --sidebar-border: #1d1d21;
  --sidebar-text: #ececf1;
  --sidebar-text-muted: #7f7f89;
  --sidebar-hover-bg: #1a1a1e;
  --sidebar-active-bg: #1a8cff;
  --sidebar-active-text: #ffffff;
}

[data-theme=dark] {
  --background-color: #08090c;
  --default-color: #dcdce2;
  --heading-color: #f5f5f8;
  --accent-color: #3b9bff;
  --surface-color: #14161b;
  --muted-color: #8d8d98;
  --light-color: #6c6c77;
  --border-color: #24272e;
  --border-color-light: #1c1f25;
  --border-color-dark: #343842;
  --card-bg: #14161b;
  --card-border: #24272e;
  --input-bg: #0f1115;
  --input-border: #2b2f38;
  --table-header-bg: #101217;
  --table-hover-bg: #181b22;
  --header-bg: #101217;
  --header-border: #1f2229;
  --sidebar-bg: #050506;
  --sidebar-border: #17171b;
  --pf-blue-soft: #10253b;
}

html, body { font-family: 'Cairo','Geist',sans-serif; }
body { background: var(--background-color); color: var(--default-color); direction: rtl; text-align: right; }

/* ── الأساسيات: بطاقات / أزرار / نماذج / جداول ───────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--pf-radius);
  box-shadow: none;
}
.card-header { background: transparent; border-bottom: 1px solid var(--border-color); padding: 16px 20px; }
.card-body { padding: 20px; }

.btn { border-radius: 12px; font-weight: 700; }
.btn-primary, .btn-primary:focus {
  background: var(--pf-blue); border-color: var(--pf-blue); color: #fff;
}
.btn-primary:hover, .btn-primary:active { background: var(--pf-blue-dark) !important; border-color: var(--pf-blue-dark) !important; color: #fff; }
.btn-outline-primary { color: var(--pf-blue); border-color: var(--pf-blue); }
.btn-outline-primary:hover { background: var(--pf-blue); border-color: var(--pf-blue); color: #fff; }
.text-primary { color: var(--pf-blue) !important; }
a { color: var(--pf-blue); }

.form-control, .form-select {
  border-radius: 12px; border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--default-color); min-height: 44px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--pf-blue); box-shadow: 0 0 0 4px var(--input-focus-ring); background: var(--input-bg); color: var(--default-color);
}
.form-label { font-weight: 700; font-size: .88rem; }

.table { --bs-table-bg: transparent; color: var(--default-color); }
.table > :not(caption) > * > * { border-bottom-color: var(--border-color); }
.table thead th { background: var(--table-header-bg); color: var(--muted-color); font-weight: 700; font-size: .8rem; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.table-hover > tbody > tr:hover > * { background: var(--table-hover-bg); --bs-table-accent-bg: transparent; }

.badge-success { background: #dcfce7; color: #166534; border-radius: 999px; padding: 5px 12px; font-weight: 800; }
.badge-pending { background: #fef3c7; color: #92400e; border-radius: 999px; padding: 5px 12px; font-weight: 800; }
.badge-failed  { background: #fee2e2; color: #991b1b; border-radius: 999px; padding: 5px 12px; font-weight: 800; }
[data-theme=dark] .badge-success { background: rgba(34,197,94,.16); color: #4ade80; }
[data-theme=dark] .badge-pending { background: rgba(245,158,11,.16); color: #fbbf24; }
[data-theme=dark] .badge-failed  { background: rgba(239,68,68,.16); color: #f87171; }

.alert { border-radius: 14px; }
.modal-content { border-radius: 20px; border: 1px solid var(--border-color); background: var(--surface-color); color: var(--default-color); }
.dropdown-menu { border-radius: 16px; border: 1px solid var(--border-color); background: var(--surface-color); box-shadow: 0 18px 40px -16px rgba(0,0,0,.25); padding: 8px; }
.dropdown-item { border-radius: 10px; padding: 9px 12px; color: var(--default-color); font-weight: 600; }
.dropdown-item:hover { background: var(--table-hover-bg); color: var(--default-color); }
.nav-pills .nav-link.active { background: var(--pf-blue); border-color: var(--pf-blue); }

/* ── الهيكل: قائمة جانبية يمين + ترويسة ───────────────────────── */
.sidebar {
  left: auto; right: 0; width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border: 0; border-left: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  direction: rtl;
}
@media (max-width: 1199px) {
  .sidebar { transform: translateX(100%); width: min(86vw, 320px); box-shadow: -20px 0 60px rgba(0,0,0,.5); }
  .sidebar-open .sidebar { transform: translateX(0); }
}
.sidebar-overlay { background: rgba(0,0,0,.55); }

.header {
  left: 0; right: 0; height: var(--header-height);
  background: var(--header-bg); border-bottom: 1px solid var(--header-border);
  box-shadow: none; padding: 0 22px; gap: 10px; direction: rtl;
}
@media (min-width: 1200px) {
  .header { left: 0; right: var(--sidebar-width); }
  .sidebar-collapsed .header { left: 0; right: var(--sidebar-collapsed-width); }
  .main { margin-left: 0; margin-right: var(--sidebar-width); }
  .sidebar-collapsed .main { margin-left: 0; margin-right: var(--sidebar-collapsed-width); }
}
@media (max-width: 575px) { .header { padding: 0 12px; } }

.main { margin-top: var(--header-height); }
.main-content { padding: 26px; padding-bottom: 4rem; }
.main-content > .container-fluid { max-width: 1240px; margin: 0 auto; padding: 0; }
@media (max-width: 767px) { .main-content { padding: 14px; } }

/* ترويسة جديدة */
.pf-header-spacer { flex: 1; }
.pf-icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-color);
  background: var(--surface-color); color: var(--default-color); display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; text-decoration: none; padding: 0;
  transition: .15s;
}
.pf-icon-btn:hover { border-color: var(--pf-blue); color: var(--pf-blue); }
.pf-menu-btn { border-radius: 12px; border: 0; background: transparent; width: 44px; height: 44px; font-size: 1.5rem; }
.pf-lang {
  height: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-color);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--default-color);
  font-weight: 800; font-size: .78rem; background: var(--surface-color); letter-spacing: .5px;
}
.pf-lang:hover { border-color: var(--pf-blue); color: var(--pf-blue); }
.pf-flag { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(90deg,#0a7c3a 50%,#fff 50%); position: relative; display: inline-block; border: 1px solid #d6d2c6; }
.pf-flag::after { content: "☪"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #d21034; font-size: 9px; line-height: 1; }
.pf-bal-chip {
  height: 46px; border-radius: 12px; background: var(--pf-black); color: #fff; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 10px; direction: ltr; border: 1px solid #000;
  font-weight: 800; white-space: nowrap;
}
[data-theme=dark] .pf-bal-chip { background: #1d2027; border-color: #2c313a; }
.pf-bal-chip .cur { font-size: .62rem; color: #9a9aa3; letter-spacing: .6px; }
.pf-bal-chip .amt { font-size: 1.02rem; }
.pf-bal-chip button { background: none; border: 0; color: #fff; padding: 0; display: inline-flex; font-size: 1rem; cursor: pointer; opacity: .9; }
.pf-bal-chip .bal-hidden { letter-spacing: 3px; }
.pf-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#ffd29d,#ff8f6b);
  display: inline-flex; align-items: center; justify-content: center; color: #3b1d10; font-weight: 900; font-size: 1.05rem;
  border: 2px solid var(--surface-color); box-shadow: 0 0 0 1px var(--border-color);
}
@media (max-width: 575px) {
  .pf-lang .pf-flag { display: none; }
  .pf-bal-chip { padding: 0 10px; height: 42px; }
  .pf-bal-chip .eye-btn { display: none; }
}

/* القائمة الجانبية */
.sidebar-header {
  min-height: 84px; padding: 0 18px; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 1; min-width: 0; }
.pf-logo-mark {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; background: linear-gradient(145deg,#2b9bff,#0a63d6);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.35rem; font-weight: 900;
  box-shadow: 0 8px 22px -8px rgba(26,140,255,.7);
}
.sidebar-logo img { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; }
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sidebar-logo-name { color: #fff; font-weight: 900; font-size: 1.18rem; letter-spacing: .2px; direction: ltr; text-align: right; white-space: nowrap; }
.sidebar-logo-label { display: none; }
.sidebar-collapse-btn, .sidebar-close {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--pf-line-dark); background: var(--pf-black-2);
  color: #cfcfd6; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0;
}
.sidebar-collapse-btn:hover, .sidebar-close:hover { color: #fff; border-color: #3a3a42; }
@media (min-width: 1200px) { .sidebar-close { display: none; } }
@media (max-width: 1199px) { .sidebar-collapse-btn { display: none; } }

.sidebar-nav { padding: 6px 14px 22px; overflow-y: auto; flex: 1; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 4px; }
.nav-list { list-style: none; padding: 0; margin: 0; }
.nav-heading { padding: 20px 8px 8px; }
.nav-heading span {
  display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; color: var(--sidebar-text-muted);
  text-transform: uppercase; letter-spacing: .4px;
}
.nav-heading span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #4a4a52; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: 13px; height: 48px; padding: 0 14px; margin: 3px 0; border-radius: 13px;
  color: var(--sidebar-text); font-weight: 700; font-size: .9rem; text-decoration: none; text-align: right; background: transparent;
  border: 0; width: 100%; transition: background .15s, color .15s;
}
.sidebar .nav-link i { font-size: 1.15rem; margin: 0; width: 22px; text-align: center; flex-shrink: 0; color: inherit; }
.sidebar .nav-link span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .nav-link:hover { background: var(--sidebar-hover-bg); color: #fff; }
.sidebar .nav-link.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); box-shadow: 0 10px 24px -12px rgba(26,140,255,.9); }
.sidebar .nav-link.text-danger { color: #ff7a85 !important; }
.sidebar .nav-link .chev { flex: 0 0 auto; width: auto; font-size: .8rem; transition: transform .2s; opacity: .7; }
.nav-group.open > .nav-link .chev { transform: rotate(-90deg); }
.nav-sub { display: none; padding: 2px 0 6px; margin-right: 18px; border-right: 1px dashed #2c2c33; }
.nav-group.open > .nav-sub { display: block; }
.nav-sub .nav-link { height: 42px; font-size: .84rem; color: #bdbdc6; padding-right: 12px; }
.nav-sub .nav-link i { font-size: 1rem; }

.sidebar-footer { padding: 14px 18px 18px; border-top: 1px solid var(--pf-line-dark) !important; text-align: left; direction: ltr; }
.sidebar-footer .brand { color: #fff; font-weight: 800; font-size: .85rem; }
.sidebar-footer .sub { color: #6d6d76; font-size: .7rem; }

@media (min-width: 1200px) {
  .sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-width); }
  .sidebar-collapsed .sidebar-logo-text,
  .sidebar-collapsed .sidebar .nav-link span,
  .sidebar-collapsed .sidebar .nav-link .chev,
  .sidebar-collapsed .nav-heading span,
  .sidebar-collapsed .sidebar-footer { display: none; }
  .sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: 0; }
  .sidebar-collapsed .nav-sub { display: none !important; }
  .sidebar-collapsed .sidebar-header { padding: 0 8px; flex-direction: column; justify-content: center; gap: 6px; min-height: 96px; }
  .sidebar-collapsed .sidebar-collapse-btn i { transform: scaleX(-1); }
}

/* شريط الهاتف السفلي */
.mobile-bottom-nav { background: var(--pf-black); border-radius: 22px; box-shadow: 0 12px 32px rgba(0,0,0,.35); bottom: 12px; }
.mbn-item { color: #9b9ba4; }
.mbn-item.active { color: #fff; }
.mbn-item.active i { color: var(--pf-blue); }
.mbn-center-icon { background: var(--pf-blue); box-shadow: 0 8px 20px -6px rgba(26,140,255,.8); }
.mbn-badge { background: var(--pf-blue); }

/* ══ لوحة التحكم ══════════════════════════════════════════════ */
.pf-hero {
  background: var(--pf-black); border-radius: var(--pf-radius-lg); padding: 28px 30px; color: #fff;
  display: grid; grid-template-columns: 1fr minmax(280px, 40%); gap: 24px; align-items: center; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.pf-hero::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; left: -120px; top: -180px;
  background: radial-gradient(circle, rgba(26,140,255,.20), transparent 68%); pointer-events: none;
}
.pf-hero-text { grid-column: 1; grid-row: 1; position: relative; }
.pf-hero-text .hello { font-size: .82rem; color: #a0a0aa; font-weight: 700; margin-bottom: 6px; }
.pf-hero-text .name { font-size: clamp(1.4rem, 3.2vw, 2.1rem); font-weight: 900; line-height: 1.25; word-break: break-word; margin: 0; color: #fff; }
.pf-hero-text .sub { margin-top: 8px; font-size: .82rem; color: #8e8e98; font-weight: 600; }
.pf-hero-text .code { display: inline-flex; margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: #1b1b20; border: 1px solid #2a2a31; color: #cfcfd8; font-size: .76rem; font-weight: 700; direction: ltr; }
.pf-balance-card {
  grid-column: 2; grid-row: 1; background: var(--pf-black-2); border: 1px solid var(--pf-line-dark); border-radius: 20px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; position: relative;
}
.pf-balance-card .lbl { display: flex; align-items: center; justify-content: space-between; color: #a0a0aa; font-size: .8rem; font-weight: 700; }
.pf-balance-card .lbl i { font-size: 1.05rem; }
.pf-balance-card .val { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.pf-balance-card .val .amt { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 900; color: var(--pf-blue); line-height: 1; direction: ltr; }
.pf-balance-card .val .cur { font-size: .9rem; color: #8e8e98; font-weight: 700; }
.pf-balance-card .extra { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pf-balance-card .extra span { font-size: .74rem; padding: 3px 10px; border-radius: 999px; background: #202026; color: #c9c9d2; font-weight: 700; }
.pf-balance-card .extra span.debt { color: #ff8c96; }
.pf-balance-card .extra span.gain { color: #5fe0a4; }
.pf-deposit-btn {
  align-self: flex-end; background: var(--pf-blue); color: #fff !important; border: 0; border-radius: 11px; padding: 10px 20px;
  font-weight: 800; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: .15s;
}
.pf-deposit-btn:hover { background: #2f9bff; transform: translateY(-1px); }
@media (max-width: 767px) {
  .pf-hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 22px; }
  .pf-hero-text, .pf-balance-card { grid-column: 1; }
  .pf-hero-text { grid-row: 1; } .pf-balance-card { grid-row: 2; }
}

.pf-promos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 767px) { .pf-promos { grid-template-columns: 1fr; gap: 14px; } }
.pf-promo {
  border-radius: var(--pf-radius-lg); padding: 24px 26px; display: flex; align-items: center; gap: 18px; min-height: 140px;
  text-decoration: none; position: relative; overflow: hidden; transition: transform .18s;
}
.pf-promo:hover { transform: translateY(-3px); }
.pf-promo.blue { background: var(--pf-blue); color: #fff; }
.pf-promo.black { background: var(--pf-black); color: #fff; }
.pf-promo .tile {
  width: 84px; height: 84px; border-radius: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: #fff; position: relative; overflow: hidden;
}
.pf-promo.blue .tile { background: linear-gradient(145deg,#38b4ff,#0a8be8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.pf-promo.black .tile { background: linear-gradient(145deg,#2aa0ff,#0b6fe0); }
.pf-promo .tile img { width: 100%; height: 100%; object-fit: cover; }
.pf-promo .tile small { position: absolute; bottom: 5px; font-size: .5rem; font-weight: 900; letter-spacing: .8px; }
.pf-promo .body { flex: 1; min-width: 0; }
.pf-promo .pill { display: inline-block; font-size: .66rem; font-weight: 800; padding: 3px 10px; border-radius: 8px; margin-bottom: 8px; }
.pf-promo.blue .pill { background: #0b5ec2; color: #fff; }
.pf-promo.black .pill { background: var(--pf-blue); color: #fff; }
.pf-promo .ttl { font-size: 1.7rem; font-weight: 900; line-height: 1.2; margin: 0; }
.pf-promo .desc { font-size: .85rem; opacity: .92; margin-top: 6px; font-weight: 600; line-height: 1.5; }
.pf-promo .go {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.pf-promo.blue .go { background: #0a63d6; color: #fff; }
.pf-promo.black .go { background: var(--pf-blue); color: #fff; }
@media (max-width: 575px) {
  .pf-promo { padding: 18px; gap: 12px; }
  .pf-promo .tile { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 16px; }
  .pf-promo .ttl { font-size: 1.3rem; }
  .pf-promo .go { width: 38px; height: 38px; }
}

.pf-section { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--pf-radius-lg); padding: 22px 24px; margin-bottom: 20px; }
.pf-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.pf-section-head h5 { margin: 0; font-weight: 900; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.pf-section-head h5 i { color: var(--pf-blue); }
.pf-section-head a { font-size: .8rem; font-weight: 700; text-decoration: none; }
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pf-tile {
  background: var(--background-color); border-radius: 18px; padding: 22px 10px 16px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-decoration: none; color: var(--default-color); font-weight: 800; font-size: .88rem;
  border: 1px solid transparent; transition: .15s; position: relative;
}
.pf-tile:hover { border-color: var(--pf-blue); transform: translateY(-3px); color: var(--default-color); }
.pf-tile .ic {
  width: 62px; height: 62px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.7rem; overflow: hidden;
}
.pf-tile .ic img { width: 100%; height: 100%; object-fit: cover; }
.pf-tile .ic.dj { background: linear-gradient(145deg,#ff5b5b,#d71f26); }
.pf-tile .ic.mo { background: linear-gradient(145deg,#2fcf6a,#0d9a43); }
.pf-tile .ic.oo { background: linear-gradient(145deg,#ff4f7b,#c2185b); }
.pf-tile .ic.ad { background: linear-gradient(145deg,#38b4ff,#0a6fe0); }
.pf-tile .ic.lt { background: linear-gradient(145deg,#a779ff,#6a35e8); }
.pf-tile .ic.hi { background: linear-gradient(145deg,#ffb04a,#f07b08); }
.pf-tile .ic.dp { background: linear-gradient(145deg,#2c2c33,#0c0c0e); }
.pf-tile .prod-img-add { top: 8px; left: 8px; }

.pf-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 767px) { .pf-quick { grid-template-columns: 1fr; gap: 12px; } }
.pf-quick a {
  background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 22px; padding: 20px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; color: var(--default-color); font-weight: 800; transition: .15s;
}
.pf-quick a:hover { border-color: var(--pf-blue); transform: translateY(-2px); }
.pf-quick .ic { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; }

.pf-banner {
  border-radius: var(--pf-radius-lg); background: var(--pf-blue); position: relative; overflow: hidden; min-height: 190px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff;
}
.pf-banner::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 22%; background: #0b0b0d; clip-path: polygon(0 0, 100% 0, 100% 100%, 30% 100%); }
.pf-banner::after { content: ""; position: absolute; top: 0; bottom: 0; right: 15%; width: 4%; background: #fff; clip-path: polygon(40% 0, 100% 0, 40% 100%, 0 100%); opacity: .95; }
.pf-banner .pill { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #0b0b0d; color: #fff; padding: 8px 26px 10px; border-radius: 0 0 22px 22px; font-weight: 900; font-size: 1.05rem; z-index: 2; }
.pf-banner .big { position: relative; z-index: 2; font-weight: 900; font-size: clamp(2rem, 7vw, 4.4rem); line-height: 1.15; text-align: center; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.18); padding: 40px 12px 14px; }
.pf-banner .big small { display: block; font-size: .32em; font-weight: 700; opacity: .92; text-shadow: none; margin-top: 4px; }
.pf-banner .logo-circle { position: absolute; z-index: 2; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; }
.pf-banner .bg-icon { position: absolute; z-index: 1; left: 5%; bottom: -30px; font-size: 9rem; color: rgba(255,255,255,.14); }

.pf-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.pf-stat { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 20px; padding: 16px; text-align: center; }
.pf-stat i { font-size: 1.5rem; }
.pf-stat .n { font-size: 1.6rem; font-weight: 900; line-height: 1.2; margin-top: 4px; }
.pf-stat .t { font-size: .76rem; color: var(--muted-color); font-weight: 700; }

.marquee-wrap, .ads-banner { border-radius: 20px; overflow: hidden; }

/* ── صفحات الدخول والتسجيل ─────────────────────────────────── */
.auth-page { background: var(--background-color); }
.auth-page .card { border-radius: 26px; border: 1px solid var(--border-color); box-shadow: 0 30px 70px -40px rgba(0,0,0,.35); }
.pf-auth-logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.pf-auth-logo .pf-logo-mark { width: 54px; height: 54px; font-size: 1.7rem; border-radius: 16px; }
.pf-auth-logo .nm { font-weight: 900; font-size: 1.5rem; direction: ltr; color: var(--heading-color); }

/* ── صفحات فليكسي وإيدوم (ألوان البطاقات الداخلية) ──────────── */
.flexy-input-card, .adsl-input-card { border-radius: 22px !important; box-shadow: none !important; }
.flexy-header-badge { background: linear-gradient(145deg,#38b4ff,#0a6fe0) !important; box-shadow: 0 8px 20px -8px rgba(26,140,255,.7) !important; }
.amount-pill.selected { background: var(--pf-blue) !important; border-color: var(--pf-blue) !important; }
.send-btn { background: var(--pf-blue) !important; box-shadow: 0 10px 24px -10px rgba(26,140,255,.8) !important; }
.send-btn:disabled { background: var(--border-color) !important; }

/* طباعة */
@media print { .sidebar, .header, .mobile-bottom-nav { display: none !important; } .main { margin: 0 !important; } }

/* ══ تصحيحات تفوّق قواعد القالب القديم داخل القائمة الجانبية ═════════ */
.sidebar .nav-heading::after { display: none !important; }
.sidebar .nav-item > .nav-link::before,
.sidebar .nav-sub .nav-link::before { display: none !important; }
.sidebar .nav-item > .nav-link > i:first-child,
.sidebar .nav-sub .nav-link > i:first-child {
  background: transparent !important; width: 22px !important; height: auto !important; margin: 0 !important;
  border-radius: 0 !important; font-size: 1.15rem !important; color: inherit !important;
}
.sidebar .nav-item > .nav-link {
  min-height: 48px; border: 0 !important; padding: 0 14px !important; border-radius: 13px !important; color: var(--sidebar-text);
}
.sidebar .nav-item > .nav-link:hover { background: var(--sidebar-hover-bg) !important; color: #fff !important; border: 0 !important; }
.sidebar .nav-item > .nav-link.active,
.sidebar .nav-item.nav-group.open > .nav-link.group-toggle {
  background: var(--pf-blue) !important; color: #fff !important; border: 0 !important;
  box-shadow: 0 10px 24px -12px rgba(26,140,255,.9) !important;
}
.sidebar .nav-item.nav-group.open > .nav-link.group-toggle { background: #1a1a1e !important; box-shadow: none !important; }
.sidebar .nav-sub .nav-link.active { background: var(--pf-blue) !important; color: #fff !important; }
.sidebar .nav-heading { padding: 20px 8px 8px; }
.sidebar .nav-heading span { color: var(--sidebar-text-muted); }
.sidebar .sidebar-toggle:hover { background: #1d1d21; border-color: #3a3a42; color: #fff; }
.sidebar .sidebar-toggle { box-shadow: none; }
.header .sidebar-toggle.pf-menu-btn { border: 0; box-shadow: none; background: transparent; }
.header .sidebar-toggle.pf-menu-btn:hover { background: var(--table-hover-bg); }
.pf-promo .ttl, .pf-promo .desc, .pf-promo .pill { color: #fff !important; }
.pf-hero-text .name { color: #fff !important; }
.pf-quick a, .pf-tile { color: var(--default-color); }

/* ── مجموعات الإدخال (RTL) ─────────────────────────────────────── */
.input-group-text { background: var(--background-color); border-color: var(--input-border); color: var(--muted-color); }
.input-group > .form-control, .input-group > .form-select, .input-group > .input-group-text, .input-group > .btn { border-radius: 0 !important; }
.input-group > :first-child { border-radius: 0 12px 12px 0 !important; }
.input-group > :last-child { border-radius: 12px 0 0 12px !important; }
.input-group > :only-child { border-radius: 12px !important; }
.input-group > :not(:first-child) { margin-left: 0 !important; margin-right: -1px; }

[data-theme=dark] .pf-hero, [data-theme=dark] .pf-promo.black { border: 1px solid #1f2229; }
[data-theme=dark] .pf-tile { background: #0d0f13; }

/* Alawa 3amarli logo image */
.pf-logo-img { width: 40px; height: 40px; border-radius: 12px; display: inline-block; object-fit: contain; flex-shrink: 0; }
.pf-auth-logo .pf-logo-img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 8px 24px rgba(26,140,255,.25); }
.pf-auth-logo { display: flex; justify-content: center; }

/* modal header: close button on the far left in RTL */
.modal-header { display: flex; align-items: center; }
.modal-header .btn-close { margin: 0 auto 0 0 !important; }


/* ═══ صور الأزرار (الأدمن يغيّرها بعلامة +) — الصورة تملأ الإطار وتختفي الكتابة ═══ */
.pf-has-img { background-size: 100% 100% !important; background-position: center !important; background-repeat: no-repeat !important; position: relative; border: 0 !important; }
.pf-has-img { color: transparent !important; font-size: 0 !important; }
.pf-has-img > *:not(.pf-img-ctl) { visibility: hidden; }
.pf-has-img::before, .pf-has-img::after { display: none !important; }
.pf-tile.pf-has-img { min-height: 128px; }
.pf-quick a.pf-has-img { min-height: 118px; }
.pf-banner.pf-has-img { min-height: 190px; }
.pf-quick a { position: relative; }
.pf-img-ctl { position: absolute; top: 8px; left: 8px; z-index: 6; display: flex; gap: 6px; }
.pf-img-btn {
  width: 28px; height: 28px; border-radius: 50%; background: var(--pf-blue); color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-size: .78rem; padding: 0; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .15s;
}
.pf-img-btn:hover { transform: scale(1.12); }
.pf-img-btn.pf-img-del { background: #dc2626; }
.pf-img-btn .spinner-border { width: 12px; height: 12px; border-width: 2px; }
