/* APP lane: small, structural rules that go with markup changes in the app shell and pages.
   No colours or tokens here; the visual system owns those. */

/* ---------- sidebar: a pinned page shows once (in Favourites), not again in its section ---------- */
.ngrp .nitem.is-pinned{display:none}
.side.editing .ngrp .nitem.is-pinned,.side.finding .ngrp .nitem.is-pinned{display:flex}
.side .nhint{margin:0 12px 6px;font-size:13px;line-height:1.6;opacity:.85}
.side-lang{display:none}

/* ---------- phones: the header keeps back, title, one action and one bell ---------- */
@media (max-width:900px){
  .top.has-tabbar .menu-btn,.top.has-tabbar .langbtn{display:none}
  .side .side-lang{display:flex}
  .tabbar a span{white-space:normal;line-height:1.2;max-height:2.4em;text-align:center;text-overflow:clip;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word}
}

/* ---------- questionnaires: the result button waits for the last answer ---------- */
.btn[aria-disabled=true]{opacity:.6;cursor:not-allowed}
.rd-opts+.field-err{margin-top:8px}
.site .field-err{display:block;margin-top:8px;font-size:14px;font-weight:600;color:var(--e-t)}

/* ---------- approval cards: on phones the buttons sit under the text, never beside it ---------- */
.note.upd .upd-act{flex-wrap:nowrap}
@media (max-width:640px){
  .note.upd{flex-wrap:wrap}
  .note.upd>.grow{flex:1 1 calc(100% - 30px);min-width:0}
  .note.upd>.upd-act{flex:1 1 100%;justify-content:flex-end}
}

/* ---------- calendar: the month title never splits; phones get an agenda instead of the grid ---------- */
.cal-card .card-head{flex-wrap:wrap}
.cal-card .card-head h3{min-width:0;flex:1 1 auto}
.cal-card .cal-my{white-space:nowrap}
.cal-agenda{display:none;list-style:none;margin:0;padding:0}
.cal-agenda li{display:flex;gap:14px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--border)}
.cal-agenda li:first-child{border-top:0}
.cal-agenda .ag-d{flex:none;width:72px;display:flex;flex-direction:column;line-height:1.35}
.cal-agenda .ag-d b{font-size:20px}
.cal-agenda .ag-d span{font-size:13px;color:var(--muted)}
.cal-agenda li.today .ag-d b{color:var(--teal)}
.cal-agenda .ag-evs{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.cal-agenda .ag-ev{display:flex;gap:8px;align-items:baseline;color:var(--ink);font-size:15px;line-height:1.5;min-height:24px}
.cal-agenda .ag-ev .dot{flex:none;transform:translateY(-2px)}
.cal-agenda .ag-ev.done{color:var(--muted)}
@media (max-width:640px){
  .cal-card .card-head h3 .hspan{display:block;margin-inline-start:0;margin-top:2px}
  .cal-card .cal,.cal-card .legend{display:none}
  .cal-agenda{display:block}
  /* action rows: the button goes under the text so titles keep their width */
  .obl-row{flex-wrap:wrap}
  .obl-row>.grow{flex:1 1 calc(100% - 24px);min-width:0}
  .obl-row>form{flex:1 1 100%;display:flex;justify-content:flex-end}
}

/* ---------- condition card: on phones each term is a card, so no column is ever clipped ---------- */
table.cond-t td.cond-k{white-space:nowrap}
table.cond-t td.cond-x{white-space:normal;min-width:240px}
@media (max-width:640px){
  table.cond-t td.cond-k{white-space:normal}
  table.cond-t td.cond-x{display:block;min-width:0;padding-block:6px 8px}
}

/* ---------- add a waqf: the plan-limit state, and a stepper whose labels may take two lines ---------- */
.limit-card{padding:32px;display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.limit-card h1{font-size:24px;margin:4px 0 0}
.limit-card p{margin:0;max-width:52ch;line-height:1.8;color:var(--muted)}
.limit-card .limit-act{gap:8px;margin:8px 0 4px}
.stepper .s-l{white-space:normal;line-height:1.35}

/* ---------- export menu: a screen's file exports behind one button ---------- */
.xmenu{position:relative;display:inline-block}
.xmenu>summary{list-style:none;cursor:pointer}
.xmenu>summary::-webkit-details-marker{display:none}
.xmenu>summary .ic:last-child{transition:transform .15s}
.xmenu[open]>summary .ic:last-child{transform:rotate(180deg)}
.xmenu-p{position:absolute;top:calc(100% + 6px);inset-inline-end:0;z-index:40;min-width:250px;max-width:min(320px,86vw);background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px;display:flex;flex-direction:column;gap:2px}
.xmenu-p a,.xmenu-p button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:44px;padding:9px 12px;border:0;border-radius:8px;background:none;color:var(--ink);font:inherit;text-align:start;cursor:pointer;white-space:normal}
.xmenu-p a:hover,.xmenu-p button:hover,.xmenu-p a:focus-visible,.xmenu-p button:focus-visible{background:var(--tint-2)}
.xmenu-p b{font-size:14px;font-weight:600;line-height:1.4}
.xmenu-p span{font-size:13px;line-height:1.5;color:var(--muted)}
.rp-hubcard{overflow:visible}
.rp-hubcard:has(.xmenu[open]),.card:has(>.xmenu[open]){position:relative;z-index:6}

/* ---------- dashboard: information-only items under their own divider ---------- */
.acts-div{display:flex;gap:8px;align-items:center;margin:14px 0 2px;padding-top:12px;border-top:1px solid var(--border);font-size:14px;font-weight:700;color:var(--muted)}
