/* The Dashboard's second layer (dash-bento.js): the greeting, "Needs your attention", the new cards, and the language that ties them to the rest:
   soft large corners, coloured cards for what matters, hatched bars for what is still due, trend chips, hover lift and press. Colours are the app's tokens
   (the company's own colour comes through --dp / --da); logical properties throughout, so Arabic mirrors; motion is transform and opacity only. */

.dhello{ margin:2px 2px 14px } .dhello h2{ margin:0; font-size:calc(26px * var(--dt-cap,1)); font-weight:700; letter-spacing:-.025em; line-height:1.15 }
.dhello p{ margin:4px 0 0; font-size:calc(14px * var(--dt,1)); color:var(--muted) }

/* ---- Needs your attention ---- */
.dattn{ margin:0 0 16px } .dattn h3{ margin:0 2px 8px; font-size:calc(13px * var(--dt,1)); font-weight:700; letter-spacing:.02em; text-transform:uppercase; color:var(--muted) }
html[lang="ar"] .dattn h3{ text-transform:none; letter-spacing:0 }
.dat-row{ display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px }
.dat{ display:flex; flex-direction:column; justify-content:space-between; gap:6px; min-height:84px; padding:14px 16px; border:0; border-radius:22px; text-align:start; color:#fff; cursor:pointer; font:inherit;
  box-shadow:0 10px 24px -16px rgba(10,37,64,.55); transition:transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s; -webkit-tap-highlight-color:transparent }
.dat b{ font-size:calc(32px * var(--dt-cap,1)); line-height:1; letter-spacing:-.03em } .dat span{ font-size:calc(13px * var(--dt,1)); line-height:1.25; opacity:.92 }
.dat.bad{ background:#A33B2B } .dat.warn{ background:#8A6726 } .dat.ok{ background:#146B52 }   /* fixed colours: white text on each reads at 4.5:1 or better in light and dark */ .dat.ink{ background:#0A2540 }
html[data-company-dark="true"] .dat.ink{ background:#2B3A52 }
@media(prefers-color-scheme:dark){ html.native-ios .dat.ink{ background:#2B3A52 } }
.dat:active{ transform:scale(.97) } .dat:focus-visible{ outline:3px solid var(--teal, #00D1C1); outline-offset:3px }
.dat-clear{ margin:0; padding:14px 16px; border-radius:18px; background:var(--card); color:var(--muted); font-size:calc(14px * var(--dt,1)); box-shadow:var(--sh) }
@media(hover:hover) and (pointer:fine){ .dat:hover{ transform:translateY(-3px); box-shadow:0 18px 30px -16px rgba(10,37,64,.6) } .dcard:hover, .dash .panel:hover{ transform:translateY(-2px) } }
.dash .panel, .dcard{ transition:transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s }

/* ---- chips: the change, in words and a sign (never colour alone) ---- */
.dchip{ display:inline-flex; align-items:center; gap:4px; font-size:calc(12px * var(--dt,1)); font-weight:700; padding:3px 9px; border-radius:100px; background:var(--line-soft); color:var(--ink-soft, var(--ink)) }
.dchip.up{ background:var(--nile-tint, #E4EFEA); color:var(--nile-ink, #0E5640) } .dchip.down{ background:var(--clay-tint, #F6E4E0); color:var(--clay-ink, #8A2F22) }

/* ---- this month and last ---- */
.dvs-row{ display:grid; grid-template-columns:minmax(0, 104px) 1fr auto; gap:10px; align-items:center; font-size:calc(13px * var(--dt,1)); padding:5px 0 }
.dvs-row > span:first-child{ color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.dvs-bar{ height:10px; border-radius:100px; background:var(--line-soft); overflow:hidden } .dvs-bar i{ display:block; height:100%; border-radius:100px; transform-origin:left center }
html[dir="rtl"] .dvs-bar i{ transform-origin:right center }
.dvs-bar i.now{ background:var(--dp) } .dvs-bar i.was{ background:repeating-linear-gradient(135deg, var(--dp) 0 3px, transparent 3px 7px); opacity:.55 }

/* ---- overdue by age ---- */
.dstack{ display:flex; gap:3px; height:14px; border-radius:100px; overflow:hidden; margin:2px 0 10px } .dstack i{ display:block; border-radius:6px }
.dstack i.late, .dage-lg i.late{ background:repeating-linear-gradient(135deg, #D98B73 0 3px, #EBC3B6 3px 7px) } .dstack i.old, .dage-lg i.old{ background:var(--clay) }
.dage-lg{ display:flex; flex-wrap:wrap; gap:6px 16px; font-size:calc(12.5px * var(--dt,1)); color:var(--muted) } .dage-lg b{ color:var(--ink); margin-inline-start:4px }
.dage-lg i{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-inline-end:6px; vertical-align:-1px }

/* ---- occupancy: a ring ---- */
.docc-body{ display:flex; align-items:center; gap:18px }
.dring{ flex:none; width:104px; height:104px; border-radius:50%; background:conic-gradient(var(--nile) calc(var(--p) * 1%), var(--line-soft) 0); display:grid; place-items:center }
html[dir="rtl"] .dring{ background:conic-gradient(from 360deg, var(--line-soft) 0, var(--line-soft) calc(100% - var(--p) * 1%), var(--nile) 0); transform:scaleX(-1) } html[dir="rtl"] .dring i{ transform:scaleX(-1) }
.dring i{ direction:ltr; width:76px; height:76px; border-radius:50%; background:var(--card); display:flex; align-items:baseline; justify-content:center; padding-top:24px; font-style:normal }
.dring b{ font-size:calc(26px * var(--dt-cap,1)); font-weight:700; letter-spacing:-.02em } .dring small{ font-size:calc(13px * var(--dt,1)); color:var(--muted); margin-inline-start:1px }
.docc-t{ display:flex; flex-direction:column; gap:4px; font-size:calc(14px * var(--dt,1)); color:var(--muted) } .docc-t b{ color:var(--ink); font-size:calc(18px * var(--dt-cap,1)) }

/* ---- leases ending ---- */
.dtiles{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px }
.dtile{ display:flex; flex-direction:column; align-items:center; gap:2px; padding:12px 6px; border:0; border-radius:16px; background:var(--line-soft); color:var(--muted); font:inherit; font-size:calc(12.5px * var(--dt,1)); cursor:pointer; transition:transform .18s cubic-bezier(.2,.8,.2,1) }
.dtile b{ font-size:calc(26px * var(--dt-cap,1)); letter-spacing:-.02em; color:var(--ink) } .dtile.warn{ background:#F5EEE0 } html[data-company-dark="true"] .dtile.warn{ background:#3A3120 }
.dtile:active{ transform:scale(.96) }

/* a chart bar that morphs keeps its base: it grows from the bottom */
.dchart-svg rect[data-h]{ transform-box:fill-box; transform-origin:50% 100% }

/* ---- the wide screen: the greeting and the attention row span the grid ---- */
@media(min-width:1000px){
  body[data-view="overview"] .content > .dhello, body[data-view="overview"] .content > .dattn{ grid-column:1 / -1 }
  body[data-view="overview"] .content > .dhello h2{ font-size:calc(30px * var(--dt-cap,1)) }
}
@media(prefers-reduced-motion:reduce){ .dat, .dtile, .dash .panel, .dcard{ transition:none } .dat:hover, .dcard:hover, .dash .panel:hover{ transform:none } }

/* ---- the cards of a currency block flow in two balanced columns (the old fixed left and right columns left a screen of empty space beside the longer one) ---- */
.dgrid{ display:block; column-count:2; column-gap:16px }
.dcol{ display:contents }
.dgrid .panel{ break-inside:avoid; margin:0 0 16px }
@media(max-width:900px){ .dgrid{ column-count:1 } .dgrid .panel{ margin-bottom:14px } }

/* on a phone the attention cards are one swipeable strip (five tall cards in two columns used a whole screen), each card a fixed width that snaps.
   The strip runs to the screen's edges so a card can scroll under them, and its cards start and end on the page gutter (--gut, the .content padding:
   14 px on the web, 16 in the iPhone app). The snap is inset by the same gutter (scroll-padding): without it the first card snapped to the screen's edge,
   16 px outside the gutter, as soon as the strip was scrolled (the owner's iPhone, 2026-11-02) */
@media(max-width:700px){
  .dat-row{ --gut:14px; display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x proximity; margin-inline:calc(-1 * var(--gut)); padding:2px var(--gut) 8px; scroll-padding-inline:var(--gut); scrollbar-width:none; -webkit-overflow-scrolling:touch }
  html.native-ios .dat-row{ --gut:16px }
  .dat-row::-webkit-scrollbar{ display:none }
  .dat{ flex:0 0 138px; min-height:92px; scroll-snap-align:start }
}
