:root {
  --bg: #0f1319;
  --surface: #181e27;
  --surface-2: #212a37;
  --border: #2b3545;
  --text: #eae7e0;
  --muted: #8b93a1;
  --gold: #cba463;
  --gold-soft: rgba(203, 164, 99, 0.14);
  --emerald: #45a180;
  --emerald-soft: rgba(69, 161, 128, 0.14);
  --rose: #cd6e62;
  --rose-soft: rgba(205, 110, 98, 0.14);
  --radius: 14px;
}
body.theme-light {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #e7ebf2;
  --border: #d3dae4;
  --text: #1d2634;
  --muted: #5b6575;
  --gold: #a87f35;
  --gold-soft: rgba(168, 127, 53, 0.12);
  --emerald: #27805f;
  --emerald-soft: rgba(39, 128, 95, 0.12);
  --rose: #c05048;
  --rose-soft: rgba(192, 80, 72, 0.12);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  direction: rtl;
  overflow: hidden;
}
body {
  background-image: radial-gradient(
    circle at 80% -10%,
    rgba(203, 164, 99, 0.08),
    transparent 35%
  );
}
.figure {
  font-family: Consolas, "Segoe UI", monospace;
  font-variant-numeric: tabular-nums;
}

#app {
  display: flex;
  height: 100vh;
}

/* -------- Sidebar -------- */
#sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
#sidebar .brand {
  font-weight: 900;
  font-size: 18px;
  color: var(--gold);
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 4px;
  transition: all 0.15s;
}
.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav-item.active {
  background: var(--gold-soft);
  color: var(--gold);
}

.year-picker {
  padding: 0 6px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.year-picker label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.year-picker select {
  width: 100%;
}

.theme-toggle-row {
  display: flex;
  gap: 6px;
  padding: 0 6px;
  margin-top: auto;
}
.theme-toggle-row button {
  flex: 1;
}
.theme-toggle-row button.danger {
  background: transparent;
  color: var(--rose);
  border-color: transparent;
}
.theme-toggle-row button.danger:hover {
  background: var(--rose-soft);
}
.theme-toggle-row button.danger.armed {
  background: var(--rose);
  color: #fff;
  font-weight: 700;
}
/* -------- Main -------- */
#main {
  flex: 1;
  overflow-y: auto;
  padding: 26px 32px;
}
.page-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}
.page-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 20px;
}

/* -------- مكونات عامة -------- */
input,
select,
button {
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
}
input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
button {
  cursor: pointer;
  background: var(--gold-soft);
  color: var(--gold);
  border-color: transparent;
  font-weight: 700;
  transition:
    filter 0.15s,
    transform 0.15s,
    background 0.15s;
}
button:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
button.secondary {
  background: var(--surface-2);
  color: var(--text);
}
button.danger {
  background: var(--rose-soft);
  color: var(--rose);
}
.btn-sm {
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 7px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.panel h3 {
  margin: 0 0 12px;
  font-size: 15.5px;
}
.sub {
  color: var(--muted);
  font-size: 12.5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th,
td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
tr:hover td {
  background: var(--surface-2);
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.pill.manual {
  background: var(--surface-2);
  color: var(--muted);
}
.pill.pdf {
  background: var(--emerald-soft);
  color: var(--emerald);
}
/* v4.32: كليندر لقطة الشهر على لوحة التحكم (زرار + لوحة منسدلة) */
.month-panel {
  position: relative;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.month-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 700;
}
.month-picker-btn:hover {
  border-color: var(--gold);
}
.month-picker-btn strong {
  color: var(--gold);
}
.month-picker-btn .chev {
  color: var(--muted);
  font-size: 11px;
}
.month-pop {
  position: absolute;
  top: calc(100% - 4px);
  right: 12px;
  z-index: 60;
  width: 300px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.month-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.month-pop-year {
  font-weight: 700;
  font-size: 14px;
}
.year-step {
  width: 30px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.month-cell {
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}
.month-cell:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.month-cell.active {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold);
}
.month-now {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}
.month-now:hover {
  color: var(--text);
  border-color: var(--gold);
}
.month-now.active {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.compact-summary-cards {
  grid-template-columns: minmax(260px, 390px);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card .k {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 6px;
}
.card .v {
  font-size: 22px;
  font-weight: 800;
}
.card .v.pos {
  color: var(--emerald);
}
.card .v.neg {
  color: var(--rose);
}
.card .v.gold {
  color: var(--gold);
}

.chart-wrap {
  position: relative;
  height: 260px;
}
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 10px;
  z-index: 999;
  font-size: 14px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 13px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 7px;
  cursor: pointer;
  border: 1px solid transparent;
}
.list-item:hover {
  border-color: var(--gold);
}
.list-item .name {
  font-weight: 700;
}
.list-item .sub {
  font-size: 12px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}

::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 10px;
}

/* -------- شاشة القفل -------- */
.lock-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 38px;
  width: 360px;
  max-width: 92vw;
  text-align: center;
}
.lock-logo {
  font-size: 42px;
  margin-bottom: 10px;
}
.lock-box h2 {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 21px;
}
.lock-box input {
  width: 100%;
  margin-top: 12px;
  text-align: center;
  letter-spacing: 2px;
}
.lock-box button {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
}
.lock-error {
  color: var(--rose);
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}
.lock-box #lockSkipRow {
  margin-top: 12px;
}
.lock-box #lockSkipRow button {
  background: transparent;
  color: var(--muted);
}

/* -------- تنبيهات -------- */
.alert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.alert-row:last-child {
  border-bottom: none;
}
.alert-row.warn {
  color: var(--gold);
}
.alert-row.info {
  color: var(--muted);
}
.alert-row.good {
  color: var(--emerald);
}

.progress {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
}

/* -------- أشهر الزكاة -------- */
.zakat-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 9px;
}
.zmonth {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s;
}
.zmonth:hover {
  border-color: var(--gold);
}
.zmonth.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.zmonth.paid {
  border-color: rgba(69, 161, 128, 0.5);
}
.zmonth .zm-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}
.zmonth .zm-total {
  color: var(--muted);
  font-size: 12px;
}

/* -------- فواصل البنوك -------- */
.bank-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}
.bank-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  text-align: right;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.bank-tab:hover {
  color: var(--text);
}
.bank-tab.active {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-soft);
}
.bank-tab[data-tone="rose"].active {
  color: var(--rose);
  border-color: var(--rose);
  background: var(--rose-soft);
}
.bank-tab[data-tone="emerald"].active {
  color: var(--emerald);
  border-color: var(--emerald);
  background: var(--emerald-soft);
}
.bank-tab[data-filter="all"] {
  grid-column: 1 / -1;
}
.bank-tab-count {
  min-width: 25px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface);
}
.list-item.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.bank-summary-cards .card {
  border-top: 3px solid var(--gold);
}

/* -------- سلة PDF -------- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
}
.dropzone.drag {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}
.basket-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 7px;
  border-inline-start: 5px solid var(--muted);
}
.basket-file.saved {
  border-inline-start-color: var(--emerald);
}
.basket-file.warn {
  border-inline-start-color: var(--gold);
}
.basket-file.card {
  border-inline-start-color: var(--emerald);
}
.bf-name {
  font-weight: 700;
  font-size: 13px;
  flex: 1;
  min-width: 150px;
}
.bf-status.ok {
  color: var(--emerald);
}
.bf-status.warn {
  color: var(--gold);
}
.bf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.chk-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
}
.chk-label input {
  accent-color: var(--gold);
}

/* -------- سعر افتتاح المحفظة -------- */
.opening-market-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 11px;
  border: 1px solid var(--gold);
  background: var(--gold-soft);
}
.opening-market-box > div:first-child {
  flex: 1;
  min-width: 260px;
}
.opening-market-box input {
  width: 150px;
}

/* -------- مقارنة التطبيقات والمحافظ -------- */
.compare-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.compare-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}
.compare-choice {
  margin: 3px;
  background: var(--surface);
}
.compare-choice.compare-program {
  display: flex;
  width: fit-content;
  color: var(--gold);
}
.compare-portfolios {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding-top: 5px;
}
.compare-actions {
  margin-top: 10px;
}
.compare-chart {
  margin-top: 18px;
  height: 310px;
}
.compare-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}
.compare-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-inline-end: 7px;
}

.ded-reasons {
  display: inline-block;
  max-width: 190px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: normal;
  line-height: 1.35;
}
.deduction-pill {
  margin: 3px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.deduction-pill .edit-ded {
  padding: 0;
  background: transparent;
  color: var(--text);
  border: 0;
  font-size: 12px;
}
.deduction-pill .rm-ded {
  color: var(--rose);
  text-decoration: none;
  font-size: 16px;
}

.dead-debt {
  opacity: 0.62;
  filter: grayscale(0.35);
}
.dead-pill {
  background: var(--rose-soft);
  color: var(--rose);
}
.debt-summary-cards,
.zakat-summary-cards {
  grid-template-columns: repeat(2, minmax(220px, 390px));
}

.ramadan-cycle-panel {
  border-color: rgba(203, 164, 99, 0.55);
  background: linear-gradient(135deg, var(--gold-soft), var(--surface));
}
.ramadan-cycle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.ramadan-cycle-grid > div:not(.cycle-arrow) {
  display: grid;
  gap: 5px;
  text-align: center;
}
.ramadan-cycle-grid strong {
  color: var(--gold);
  font-size: 17px;
}
.cycle-arrow {
  color: var(--gold);
  font-size: 26px;
}
.recipient-row {
  justify-content: space-between;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 7px 12px;
  margin-bottom: 5px;
}
.zakat-month-detail {
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
}
.zakat-entry-row {
  margin-top: 10px;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}
.health-badge.emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
}
.health-badge.gold {
  background: var(--gold-soft);
  color: var(--gold);
}
.health-badge.rose {
  background: var(--rose-soft);
  color: var(--rose);
}

/* ==================== الجوال والأجهزة اللوحية (Responsive) ==================== */
@media (max-width: 900px) {
  #app {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }
  #sidebar {
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 8px 10px;
    border-left: none;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 60;
  }
  #sidebar .only-mobile {
    display: inline-flex;
  }
  #sidebar .sidebar-head {
    border-bottom: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  #sidebar .sidebar-head .brand {
    font-size: 15px;
    padding: 0;
  }
  #sidebarBody {
    display: none;
    padding-top: 10px;
    width: 100%;
  }
  #sidebar.open #sidebarBody {
    display: block;
  }
  #nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    order: 0;
    width: 100%;
  }
  .year-picker {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }
  .year-picker label {
    margin: 0;
    font-size: 12px;
  }
  .year-picker select {
    flex: 1;
    padding: 8px 10px;
    font-size: 16px;
  }
  .nav-item {
    padding: 10px;
    font-size: 13.5px;
    margin: 0;
    justify-content: flex-start;
  }
  .theme-toggle-row {
    margin-top: 10px;
    flex-direction: row;
  }
  .theme-toggle-row button {
    font-size: 12.5px;
    padding: 8px;
  }

  #main {
    padding: 12px 12px 84px; /* أسفل مريح لفوق زرار الإضافة العائم */
  }
  .page-title {
    font-size: 19px;
  }
  .page-sub {
    margin-bottom: 12px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 9px;
  }
  .compact-summary-cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 12px;
  }
  .card .v {
    font-size: 18px;
  }
  .panel {
    padding: 13px;
    overflow-x: auto;
  }
  .panel h3 {
    font-size: 14px;
  }
  .zakat-months {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 7px;
  }
  .chart-wrap {
    height: 200px;
  }
  .row {
    gap: 7px;
  }
  input,
  select {
    padding: 8px 10px;
    font-size: 16px; /* 16px يمنع تكبير آيفون التلقائي عند الكتابة */
  }
  button {
    padding: 8px 10px;
    font-size: 13.5px;
  }
  #main table {
    min-width: 520px;
  } /* الجداول تتمرر أفقيًا بدل ما تتكسر */
  .lock-box {
    padding: 24px 20px;
  }
  .basket-file .bf-actions {
    width: 100%;
  }
  .bank-tabs {
    grid-template-columns: 1fr;
  }
  .debt-summary-cards,
  .zakat-summary-cards {
    grid-template-columns: 1fr;
  }
  .ramadan-cycle-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cycle-arrow {
    transform: rotate(-90deg);
    text-align: center;
  }
}

/* ===== إضافات Arena (كلاسات جديدة فقط — لا تمس أي ستايل قديم) ===== */
.wt-fab { position: fixed; bottom: 26px; left: 26px; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: #111; font-size: 30px; font-weight: 800; border: none; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.4); z-index: 9000; line-height: 1; }
.wt-fab:hover { filter: brightness(1.1); }
.wt-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; z-index: 9500; }
.wt-modal-box { width: min(560px, 92vw); max-height: 70vh; overflow: auto; }
.wt-hit { cursor: pointer; }
.bulk-wrap { overflow-x: auto; }
.bulk-table input { text-align: center; }
.quickadd-panel { border-inline-start: 4px solid var(--emerald); }
.goal-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0; }
@media print {
  #sidebar, .wt-fab, .wt-modal, .toast, .no-print { display: none !important; }
  #app { display: block; }
  #main { padding: 0; }
  .panel { break-inside: avoid; border: 1px solid #999; }
  body { background: #fff; color: #000; }
}

/* التعبئة السريعة: فواصل البرامج وصفوف الإيداعات */
.bulk-prog-sep td { background: var(--gold-soft); color: var(--gold); font-weight: bold; padding: 8px 10px; font-size: 14px; }
.bulk-dep-row td { background: rgba(128, 128, 128, 0.06); }
.bulk-dep { border-style: dashed !important; }

/* v4.33: صفحة الموبايل (mobile.html) — خفيفة ومريحة على شاشة التليفون */
.mobile-body { height: auto; min-height: 100%; overflow: auto; }
.mobile-wrap { max-width: 640px; margin: 0 auto; padding: 12px 12px 28px; }
.mobile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px 10px; }
.mobile-wrap .panel { margin-bottom: 10px; }
.mobile-wrap input, .mobile-wrap button { min-height: 44px; font-size: 16px; }
.mobile-wrap .row { flex-wrap: wrap; }
.mobile-wrap #quickPreview .row { flex-wrap: wrap; }
.mobile-wrap h3 { font-size: 15px; }
.mobile-wrap a { color: var(--gold); }

/* ===== v4.34: هيكل القائمة الجانبية (قائمة منسدلة على الموبايل) + النشر من أي جهاز ===== */
.only-mobile {
  display: none; /* يظهر فقط في وضع الموبايل (media query) */
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
#sidebar .sidebar-head .brand {
  border-bottom: none;
  padding: 0;
  margin: 0;
}
#navToggleBtn {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}
