/* Core One — the home screen's "Today" (public/hometoday.js): white cards on the night hero,
   the way the "needs you" cards already sat there. Logical properties, so Arabic mirrors. */

/* ---------- the money, in the hero's right side ---------- */
.hh-cards.hk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hk {
  display: flex; flex-direction: column; gap: 3px; min-inline-size: 0;
  background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 16px 18px 15px;
  box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  animation: rise .36s var(--ease) both;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hk:nth-child(2) { animation-delay: .04s; } .hk:nth-child(3) { animation-delay: .08s; } .hk:nth-child(4) { animation-delay: .12s; }
.hk:hover { transform: translateY(-2px); box-shadow: 0 32px 56px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1); }
.hk-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.hk-label::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; flex: none; background: var(--royal, #1e56d5); }
.hk.cash .hk-label::before { background: #1fae45; }
.hk.ap .hk-label::before { background: #e08a12; }
.hk.rev .hk-label::before { background: var(--electric, #216ffb); }
.hk-val {
  font-size: clamp(22px, 2.3vw, 30px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.hk-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-sub b { font-weight: 600; }
.hk-sub.bad b { color: var(--danger); }
.hk-sub.good b { color: var(--success); }

/* ---------- under the hero: needs you | quick actions + recent ---------- */
.ht-body {
  inline-size: 100%; max-inline-size: 1080px; display: grid; gap: 20px; align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.ht-side { display: grid; gap: 20px; min-inline-size: 0; }
.ht-panel {
  background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 16px 14px 10px;
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  min-inline-size: 0; animation: rise .4s var(--ease) both;
}
.ht-h {
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 6px 8px;
}
:root[dir="rtl"] .ht-h { letter-spacing: 0; font-size: 12.5px; }
.ht-list { display: grid; }
.ht-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px; border-radius: 12px; color: var(--ink);
  transition: background .15s var(--ease);
}
.ht-row:hover { background: var(--raised); }
.ht-row + .ht-row { margin-block-start: 1px; }
.ht-ico {
  inline-size: 34px; block-size: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}
.ht-ico .ico { inline-size: 18px; block-size: 18px; }
.ht-ico.sm { inline-size: 28px; block-size: 28px; border-radius: 8px; }
.ht-ico.sm .ico { inline-size: 15px; block-size: 15px; }
.ht-txt { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; }
.ht-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-cap { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-count { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ht-go { inline-size: 16px; block-size: 16px; flex: none; color: var(--faint); }
:root[dir="rtl"] .ht-go { transform: scaleX(-1); }

.ht-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 2px 6px; }
.ht-q {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; min-inline-size: 0;
  border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 600;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.ht-q:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--raised); }
.ht-qico { inline-size: 26px; block-size: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff; }
.ht-qico .ico { inline-size: 14px; block-size: 14px; }
.ht-qlabel { flex: 1; min-inline-size: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-plus { inline-size: 15px; block-size: 15px; flex: none; color: var(--muted); }

.ht-empty { display: grid; gap: 2px; padding: 12px 8px 14px; }
.ht-empty b { font-size: 14px; font-weight: 600; }
.ht-empty span { font-size: 13px; color: var(--muted); }
.ht-empty.ok { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.ht-empty.ok .ht-okmark {
  grid-row: span 2; inline-size: 34px; block-size: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 17px;
}
.ht-skel {
  block-size: 42px; border-radius: 12px; margin: 4px 0;
  background: linear-gradient(90deg, var(--raised) 0%, var(--line-2) 50%, var(--raised) 100%);
  background-size: 200% 100%; animation: htshimmer 1.2s linear infinite;
}
@keyframes htshimmer { to { background-position: -200% 0; } }

/* ---------- the app grid: only a phone needs it, having no list on the left ---------- */
.home-apps { inline-size: 100%; display: flex; flex-direction: column; align-items: center; margin-block-start: 28px; }
.home-apps-h { align-self: stretch; color: rgba(255, 255, 255, .7); text-align: center; margin-block-end: 14px; }
@media (min-width: 761px) { .home-apps { display: none; } }

@media (max-width: 900px) {
  .ht-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hh-cards.hk-grid { gap: 10px; }
  .hk { padding: 12px 14px; border-radius: 16px; }
  .ht-body { gap: 14px; }
  .ht-side { gap: 14px; }
}
:root[data-theme="dark"] .hk, :root[data-theme="dark"] .ht-panel {
  box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
}
@media (prefers-reduced-motion: reduce) {
  .hk, .ht-panel, .ht-skel { animation: none; }
  .hk:hover { transform: none; }
}
