/* =====================================================================
   RPP UI: the design system of the Roopgarh plant task software.

   Based on SAP Fiori ("Morning Horizon" theme), his choice 09/11/2026:
   shell bar, inbox (master-detail) floorplan, icon tab bar with counts,
   object header, footer toolbar with ONE emphasized action, message
   strips, dialogs. Plus the greeting band from Oracle Redwood (his ask)
   and the weekly score box (place 1: in the greeting band).

   Rules for every screen:
   1. Use only the tokens below (colours, sizes, radius, shadows).
   2. Use only these parts; a new need = a new part here, not a one-off style.
   3. One emphasized (blue) button per screen area; the rest ghost.
   4. Phone first: everything works at 360px wide; touch targets >= 40px.
   ===================================================================== */

:root {
  /* colour */
  --rp-brand: #0070f2;  --rp-brand-hover: #0064d9;  --rp-brand-dark: #0040b0;  --rp-brand-soft: #ebf8ff;
  --rp-text: #1d2d3e;   --rp-text-2: #556b82;       --rp-text-3: #758ca4;
  --rp-bg: #f5f6f7;     --rp-surface: #ffffff;      --rp-hover: #f7f9fa;
  --rp-line: #e5e9ee;   --rp-line-soft: #eef1f4;    --rp-field: #bcc3ca;     --rp-field-hover: #8396a8;
  --rp-neg: #aa0808;    --rp-neg-soft: #ffeaf4;
  --rp-crit: #b44f00;   --rp-crit-soft: #fff3e6;
  --rp-pos: #256f3a;    --rp-pos-soft: #f5fae5;
  --rp-info: #0070f2;   --rp-info-soft: #ebf8ff;
  --rp-neu: #788fa6;    --rp-neu-soft: #eff1f2;
  /* weekly score (EM) */
  --rp-red: #d20a0a;    --rp-yellow: #e9a100;       --rp-green: #30914c;
  /* type */
  --rp-font: "72", "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --rp-fs-xs: .75rem; --rp-fs-s: .8125rem; --rp-fs: .875rem; --rp-fs-m: 1rem; --rp-fs-l: 1.25rem; --rp-fs-xl: 1.75rem;
  /* space, shape, depth */
  --rp-s1: .25rem; --rp-s2: .5rem; --rp-s3: .75rem; --rp-s4: 1rem; --rp-s5: 1.25rem; --rp-s6: 1.5rem; --rp-s8: 2rem;
  --rp-radius: 12px; --rp-radius-s: 8px; --rp-radius-xs: 4px;
  --rp-shadow: 0 0 .125rem rgba(34,53,72,.15), 0 .125rem .5rem rgba(34,53,72,.15);
  --rp-shadow-up: 0 -1px 0 var(--rp-line-soft), 0 -.125rem .5rem rgba(34,53,72,.08);
  --rp-shadow-pop: 0 .625rem 1.875rem rgba(34,53,72,.25);
  --rp-shell-h: 52px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--rp-font); font-size: var(--rp-fs); color: var(--rp-text); background: var(--rp-bg);
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--rp-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rp-brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.i { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.muted { color: var(--rp-text-2); }
.small { font-size: var(--rp-fs-xs); }
.mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------- shell bar */
.shell { position: sticky; top: 0; z-index: 50; height: var(--rp-shell-h); background: var(--rp-surface);
  display: flex; align-items: center; gap: var(--rp-s3); padding: 0 var(--rp-s3);
  box-shadow: 0 1px 0 var(--rp-line-soft); }
.shell-btn { width: 40px; height: 40px; border: 0; border-radius: var(--rp-radius-s); background: transparent;
  color: var(--rp-text-2); display: inline-grid; place-items: center; position: relative; }
.shell-btn:hover { background: var(--rp-neu-soft); color: var(--rp-text); text-decoration: none; }
.shell-logo { display: flex; align-items: center; gap: var(--rp-s2); color: var(--rp-text); font-weight: 700; white-space: nowrap; }
.shell-logo:hover { text-decoration: none; }
.shell-logo .mk { width: 32px; height: 32px; border-radius: var(--rp-radius-s); color: #fff; font-size: .78rem;
  display: grid; place-items: center; background: linear-gradient(135deg, #0a6ed1, var(--rp-brand-dark)); }
.shell-logo .prod { font-weight: 400; color: var(--rp-text-2); }
.shell-search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: var(--rp-s2);
  height: 36px; border-radius: 18px; background: var(--rp-neu-soft); padding: 0 var(--rp-s4); color: var(--rp-text-2); }
.shell-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.shell-end { display: flex; align-items: center; gap: var(--rp-s1); margin-left: auto; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  background: var(--rp-neg); color: #fff; font-size: .65rem; font-weight: 700; line-height: 18px; text-align: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d1efff; color: var(--rp-brand-dark);
  font-size: .78rem; font-weight: 700; display: grid; place-items: center; border: 0; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }

/* popover menu (user menu, "more" actions) */
.pop { position: relative; }
.pop-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; z-index: 60;
  background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow-pop); padding: var(--rp-s2); }
.pop-panel.up { top: auto; bottom: calc(100% + 6px); }
.pop-panel .who { padding: var(--rp-s2) var(--rp-s3) var(--rp-s3); border-bottom: 1px solid var(--rp-line-soft); margin-bottom: var(--rp-s1); }
.pop-item { display: flex; width: 100%; align-items: center; gap: var(--rp-s2); padding: .55rem var(--rp-s3);
  border: 0; background: none; border-radius: var(--rp-radius-s); color: var(--rp-text); text-align: left; }
.pop-item:hover { background: var(--rp-hover); text-decoration: none; }
.pop-item.neg { color: var(--rp-neg); }

/* app tabs: the main screens, always visible (computer). No hidden side menu (his feedback 09/11). */
.apptabs { position: sticky; top: var(--rp-shell-h); z-index: 45; height: 46px; background: var(--rp-surface);
  display: flex; align-items: stretch; gap: var(--rp-s1); padding: 0 var(--rp-s5); border-bottom: 1px solid var(--rp-line-soft);
  overflow-x: auto; scrollbar-width: none; }
.apptabs a { display: flex; align-items: center; gap: .4rem; padding: 0 var(--rp-s3); color: var(--rp-text-2); font-weight: 600;
  border-bottom: 3px solid transparent; white-space: nowrap; }
.apptabs a:hover { color: var(--rp-brand); text-decoration: none; }
.apptabs a.on { color: var(--rp-brand); border-bottom-color: var(--rp-brand); }
.apptabs .cnt { border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; }
.apptabs .cnt.neg { background: var(--rp-neg-soft); color: var(--rp-neg); }
.apptabs .sp { flex: 1; }
.apptabs a.assign { align-self: center; border-bottom: 0; color: #fff; padding: 0 var(--rp-s3); }
/* bottom bar (phone) */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; height: 62px; background: var(--rp-surface);
  box-shadow: var(--rp-shadow-up); justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .68rem;
  color: var(--rp-text-2); position: relative; min-width: 58px; border: 0; background: none; padding: .3rem 0; }
.tabbar a.on { color: var(--rp-brand); font-weight: 700; }
.tabbar a:hover { text-decoration: none; }
.tabbar .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--rp-brand); color: #fff; display: grid; place-items: center;
  margin-top: -22px; box-shadow: 0 4px 12px rgba(0,112,242,.4); }
.tabbar .b { position: absolute; top: -2px; right: 10px; background: var(--rp-neg); color: #fff; border-radius: 9px; font-size: .62rem; padding: 0 .3rem; line-height: 1.1rem; }

/* ---------------------------------------------------------- greeting band + weekly score box */
.greet { display: flex; align-items: center; justify-content: space-between; gap: var(--rp-s6);
  padding: var(--rp-s4) var(--rp-s5); border-bottom: 1px solid var(--rp-line-soft);
  background: linear-gradient(100deg, #fff 0%, #f2f8ff 55%, #e3f0ff 100%); }
.greet h1 { margin: 0; font-size: var(--rp-fs-xl); font-weight: 300; letter-spacing: -.01em; }
.greet h1 b { font-weight: 700; }
.greet p { margin: .3rem 0 0; color: var(--rp-text-2); font-size: .95rem; }
.greet p b { color: var(--rp-text); }
.greet p .neg { color: var(--rp-neg); font-weight: 700; }
.score-box { display: flex; align-items: stretch; background: var(--rp-surface); border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow); overflow: hidden; flex: none; }
.score { display: flex; align-items: center; gap: var(--rp-s3); padding: .65rem var(--rp-s4); color: var(--rp-text); min-width: 300px; }
.score:hover { background: var(--rp-hover); text-decoration: none; }
.score + .score { border-left: 1px solid var(--rp-line-soft); }
.score .h { font-size: var(--rp-fs-xs); color: var(--rp-text-2); white-space: nowrap; }
.score .big { font-weight: 700; margin: .1rem 0 .35rem; white-space: nowrap; }
.score .go { color: var(--rp-brand); font-size: 1.3rem; margin-left: auto; }
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .trk { stroke: #e5e9ee; }
.ring .bar { stroke-linecap: round; }
.ring .v { position: absolute; font-weight: 700; }
.ring.bad .bar { stroke: var(--rp-red); }    .ring.bad .v { color: var(--rp-neg); }
.ring.warn .bar { stroke: var(--rp-yellow); } .ring.warn .v { color: var(--rp-crit); }
.ring.ok .bar { stroke: var(--rp-green); }   .ring.ok .v { color: var(--rp-pos); }
.ring.zero .v { color: var(--rp-text-3); }
.ryg { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #e5e9ee; min-width: 150px; }
.ryg i { display: block; }
.ryg .r { background: var(--rp-red); } .ryg .y { background: var(--rp-yellow); } .ryg .g { background: var(--rp-green); }
.leg { font-size: var(--rp-fs-xs); color: var(--rp-text-2); margin-top: .3rem; white-space: nowrap; }
.leg .r { color: var(--rp-red); font-weight: 700; } .leg .y { color: #a87400; font-weight: 700; } .leg .g { color: var(--rp-green); font-weight: 700; }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; vertical-align: middle; }
.dot.red { background: var(--rp-red); } .dot.yellow { background: var(--rp-yellow); } .dot.green { background: var(--rp-green); }

/* ---------------------------------------------------------- page */
.page { max-width: 1240px; margin: 0 auto; padding: var(--rp-s5) var(--rp-s5) 6rem; }
.page.wide { max-width: none; }   /* list pages use the full width, like the board */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--rp-s4); flex-wrap: wrap;
  margin-bottom: var(--rp-s4); }
.page-head h1 { margin: 0; font-size: var(--rp-fs-l); font-weight: 700; }
.page-head .sub { color: var(--rp-text-2); margin-top: .2rem; }
.crumb { font-size: var(--rp-fs-xs); color: var(--rp-text-2); display: flex; gap: var(--rp-s2); align-items: center; flex-wrap: wrap; }
.crumb a { color: var(--rp-text-2); }
.back-link { display: inline-flex; align-items: center; gap: .2rem; font-weight: 700; padding: var(--rp-s3) 0 0; }

.card { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s4) var(--rp-s5); }
.card + .card { margin-top: var(--rp-s4); }
.card h2, .card h3 { font-size: var(--rp-fs-m); margin: 0 0 var(--rp-s3); }
.section-title { font-size: var(--rp-fs-m); font-weight: 700; margin: var(--rp-s6) 0 var(--rp-s3); }

/* ---------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--rp-s2); height: 36px;
  padding: 0 var(--rp-s4); border-radius: var(--rp-radius-s); border: 1px solid var(--rp-field); background: var(--rp-surface);
  color: var(--rp-brand); font-weight: 700; font-size: var(--rp-fs); white-space: nowrap; }
.btn:hover { background: var(--rp-brand-soft); text-decoration: none; }
.btn-em { background: var(--rp-brand); border-color: var(--rp-brand); color: #fff; }
.btn-em:hover { background: var(--rp-brand-hover); }
.btn-pos { color: var(--rp-pos); border-color: var(--rp-pos); }
.btn-pos:hover { background: var(--rp-pos-soft); }
.btn-neg { color: var(--rp-neg); border-color: var(--rp-neg); }
.btn-neg:hover { background: var(--rp-neg-soft); }
.btn-plain { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 var(--rp-s3); font-size: var(--rp-fs-s); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: var(--rp-s2); flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------- message strips */
.msg { display: flex; gap: var(--rp-s2); align-items: flex-start; padding: .6rem var(--rp-s3); border-radius: var(--rp-radius-s);
  border: 1px solid; font-size: var(--rp-fs); margin-bottom: var(--rp-s3); }
.msg-ok { background: var(--rp-pos-soft); border-color: #a8d5b5; color: #1e5631; }
.msg-error { background: var(--rp-neg-soft); border-color: #f5b7b7; color: var(--rp-neg); }
.msg-info { background: var(--rp-info-soft); border-color: #a6d2ff; color: #00438a; }
.msg-warn { background: var(--rp-crit-soft); border-color: #f5c99b; color: var(--rp-crit); }
.flashes { padding: var(--rp-s3) var(--rp-s5) 0; }
.flashes .msg { max-width: 1240px; margin: 0 auto var(--rp-s2); }

/* ---------------------------------------------------------- status, tags */
.status { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: var(--rp-fs-s);
  border-radius: var(--rp-radius-xs); padding: .1rem .45rem; white-space: nowrap; }
.st-overdue, .st-CANCELLED { background: var(--rp-neg-soft); color: var(--rp-neg); }
.st-today { background: var(--rp-crit-soft); color: var(--rp-crit); }
.st-tomorrow, .st-later, .st-COMPLETED { background: var(--rp-pos-soft); color: var(--rp-pos); }
.st-none, .st-ON_HOLD { background: var(--rp-neu-soft); color: #4f6377; }
.st-PENDING { background: var(--rp-crit-soft); color: var(--rp-crit); }
.st-AWAITING_APPROVAL { background: var(--rp-info-soft); color: #00438a; }
.t-overdue { color: var(--rp-neg); } .t-today { color: var(--rp-crit); } .t-tomorrow, .t-later { color: var(--rp-pos); } .t-none { color: var(--rp-neu); }
.tag { display: inline-block; border: 1px solid var(--rp-field); border-radius: var(--rp-radius-xs); padding: 0 .4rem;
  font-size: var(--rp-fs-xs); color: var(--rp-text-2); background: var(--rp-surface); }

/* ---------------------------------------------------------- icon tab bar */
.tabs { display: flex; gap: var(--rp-s1); padding: 0 var(--rp-s2); border-bottom: 1px solid var(--rp-line-soft);
  overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: .55rem .55rem .45rem; display: flex; flex-direction: column; align-items: center;
  gap: .1rem; color: var(--rp-text-2); border-bottom: 3px solid transparent; min-width: 64px; }
.tab .n { font-size: 1.15rem; font-weight: 700; color: var(--rp-text); }
.tab .t { font-size: var(--rp-fs-xs); white-space: nowrap; }
.tab.neg .n { color: var(--rp-neg); } .tab.info .n { color: var(--rp-info); } .tab.neu .n { color: var(--rp-neu); }
.tab.crit .n { color: var(--rp-crit); }
.tab.on { border-bottom-color: var(--rp-brand); color: var(--rp-brand); }
.tab:hover { color: var(--rp-brand); }
/* text tabs (filter chips in list pages) */
.seg { display: flex; gap: var(--rp-s2); flex-wrap: wrap; }
.seg a, .seg button { border: 1px solid var(--rp-field); background: var(--rp-surface); color: var(--rp-text);
  border-radius: 999px; padding: .3rem .8rem; font-size: var(--rp-fs-s); }
.seg a:hover { text-decoration: none; background: var(--rp-hover); }
.seg .on { background: var(--rp-brand-soft); border-color: var(--rp-brand); color: var(--rp-brand); font-weight: 700; }

/* ---------------------------------------------------------- board (My Tasks): columns = stages */
.board-tools { display: flex; gap: var(--rp-s2); align-items: center; flex-wrap: wrap; padding: var(--rp-s4) var(--rp-s5) 0; }
.pill-search { height: 36px; border: 1px solid var(--rp-field); border-radius: 18px; padding: 0 var(--rp-s4); background: #fff; min-width: 260px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr); gap: var(--rp-s4);
  padding: var(--rp-s4) var(--rp-s5) var(--rp-s8); overflow-x: auto; align-items: start; }
.col { background: #e9edf1; border-radius: 14px; padding: var(--rp-s2); display: flex; flex-direction: column; min-width: 0; }
.col-h { display: flex; align-items: center; gap: var(--rp-s2); padding: var(--rp-s2) .55rem; font-weight: 700; border: 0; background: transparent;
  border-radius: 10px; width: 100%; text-align: left; }
.col-h:hover { background: rgba(255,255,255,.7); }
.col-h .n { margin-left: auto; font-size: var(--rp-fs-xs); background: #fff; border-radius: 999px; padding: .1rem .55rem; color: var(--rp-text-2); }
.col-h .go { color: var(--rp-brand); opacity: .35; }
.col-h:hover .go { opacity: 1; }
.col-sub { font-size: var(--rp-fs-xs); color: var(--rp-text-2); padding: 0 .6rem var(--rp-s2); margin-top: -.2rem; }
.col-list { display: flex; flex-direction: column; gap: var(--rp-s2); padding: .1rem; }
.stage-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.c-brand { --c: var(--rp-brand); } .c-red { --c: var(--rp-red); } .c-yellow { --c: var(--rp-yellow); }
.c-green { --c: var(--rp-green); } .c-neu { --c: var(--rp-neu); }
.stage-dot { background: var(--c); }
.kc { display: block; background: #fff; border-radius: 10px; padding: .7rem .8rem; border-top: 3px solid var(--c, var(--rp-line));
  box-shadow: 0 1px 2px rgba(34,53,72,.12); color: var(--rp-text); cursor: pointer; }
.kc:hover { box-shadow: 0 .25rem .75rem rgba(34,53,72,.18); text-decoration: none; }
.kc .top { display: flex; justify-content: space-between; gap: var(--rp-s2); align-items: center; margin-bottom: .35rem; }
.kc .ttl { font-weight: 700; line-height: 1.3; font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.kc .meta { font-size: var(--rp-fs-xs); color: var(--rp-text-2); margin-top: .3rem; }
.kc .foot { display: flex; justify-content: space-between; align-items: center; gap: var(--rp-s2); margin-top: .55rem; }
.see-all { margin-top: var(--rp-s2); border: 0; background: #fff; border-radius: 10px; padding: .55rem; font-weight: 700; color: var(--rp-brand); width: 100%; }
.see-all:hover { background: var(--rp-brand-soft); }
.empty-col { text-align: center; color: var(--rp-text-3); font-size: var(--rp-fs-s); padding: var(--rp-s6) var(--rp-s2); border: 2px dashed #d3dae1; border-radius: 10px; }
.colnav { display: none; }

/* stage view: one column as a full list (opened from its header) */
/* full width like the board, so the small search sits right under "Assign a task" (his layout, 09/11) */
.stage { padding: var(--rp-s4) var(--rp-s5) 7rem; }
.stage-head { display: flex; align-items: center; gap: var(--rp-s3); flex-wrap: wrap; margin-bottom: var(--rp-s3); }
.stage-head h1 { margin: 0; font-size: var(--rp-fs-l); display: flex; align-items: center; gap: var(--rp-s2); }
.stage-search { margin-left: auto; display: flex; align-items: center; gap: .4rem; height: 34px; width: 260px;
  border: 1px solid var(--rp-field); border-radius: 17px; padding: 0 .75rem; background: #fff; color: var(--rp-text-2); }
.stage-search:focus-within { border-color: var(--rp-brand); box-shadow: 0 0 0 1px var(--rp-brand); }
.stage-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: var(--rp-fs-s); }
.stage-bar { display: flex; align-items: center; gap: var(--rp-s3); flex-wrap: wrap; margin-bottom: var(--rp-s3); }
.stage-bar .chips { margin: 0; flex: 0 1 auto; min-width: 0; }
.stage-selects { display: flex; gap: var(--rp-s2); margin-left: auto; }
.stage-selects select { height: 34px; border: 1px solid var(--rp-field); border-radius: var(--rp-radius-s); padding: 0 .6rem;
  background: #fff; font-size: var(--rp-fs-s); }
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--rp-s3); }
.chips button, .chips a { white-space: nowrap; border: 1px solid var(--rp-field); background: #fff; border-radius: 999px;
  padding: .35rem .8rem; font-size: var(--rp-fs-s); color: var(--rp-text); }
.chips .on { background: var(--rp-brand-soft); border-color: var(--rp-brand); color: var(--rp-brand); font-weight: 700; }
.chips.neg .on { background: var(--rp-neg-soft); border-color: var(--rp-neg); color: var(--rp-neg); }
.rt .ck { width: 40px; }
.rt input[type=checkbox], .mrow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rp-brand); }
.rt tr.picked td { background: var(--rp-brand-soft); }
.mrows { display: none; }
.mrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .65rem; padding: .7rem var(--rp-s4); border-bottom: 1px solid var(--rp-line-soft); }
.mrow input { margin-top: .15rem; }
.mrow a { color: var(--rp-text); }
.bulkbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--rp-s5); z-index: 60; background: #1d2d3e; color: #fff;
  border-radius: 14px; padding: .55rem .6rem .55rem var(--rp-s4); display: flex; align-items: center; gap: .6rem; box-shadow: var(--rp-shadow-pop); flex-wrap: wrap; }
.bulkbar .btn { height: 34px; }
.bulkbar .btn:not(.btn-em) { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

/* slide-over: a task opens on top of the board, from the right */
.so-bg { position: fixed; inset: 0; background: rgba(29,45,62,.35); z-index: 75; }
.so { position: fixed; top: 0; right: 0; bottom: 0; width: min(700px, 100%); background: var(--rp-bg); z-index: 76;
  box-shadow: var(--rp-shadow-pop); display: flex; flex-direction: column; animation: rp-so-in .18s ease-out; }
@keyframes rp-so-in { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.so-head { height: var(--rp-shell-h); flex: none; background: #fff; display: flex; align-items: center; gap: var(--rp-s2); padding: 0 var(--rp-s3);
  box-shadow: 0 1px 0 var(--rp-line-soft); }
.so-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.so-loading { margin: auto; color: var(--rp-text-2); }

/* bulk page: one card per task, each with its own remark */
.bulk-card { background: #fff; border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s4) var(--rp-s5); margin-bottom: var(--rp-s3);
  border-left: 4px solid var(--rp-brand); }
.bulk-card.bad { border-left-color: var(--rp-neg); }
.bulk-card.off { opacity: .6; border-left-color: var(--rp-neu); }
.bulk-card .bh { display: flex; justify-content: space-between; gap: var(--rp-s3); align-items: flex-start; margin-bottom: var(--rp-s3); }
.bulk-card .bh b { line-height: 1.3; }
.bulk-card .grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--rp-s3); }
.helper { background: var(--rp-info-soft); border: 1px solid #a6d2ff; border-radius: var(--rp-radius); padding: var(--rp-s3) var(--rp-s4); margin-bottom: var(--rp-s4);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--rp-s2) var(--rp-s3); align-items: end; }

.li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem var(--rp-s3); padding: .7rem var(--rp-s4);
  border-bottom: 1px solid var(--rp-line-soft); border-left: 3px solid transparent; color: var(--rp-text); cursor: pointer; }
.li:hover { background: var(--rp-hover); text-decoration: none; }
.li.sel { background: var(--rp-brand-soft); border-left-color: var(--rp-brand); }
.li.dim { opacity: .72; }
.li-title { font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li-meta { grid-column: 1; color: var(--rp-text-2); font-size: var(--rp-fs-xs); line-height: 1.4; }
.li-state { text-align: right; font-size: var(--rp-fs-xs); font-weight: 700; white-space: nowrap; }
.li-code { text-align: right; font-size: var(--rp-fs-xs); color: var(--rp-text-3); white-space: nowrap; }
.detail { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.detail-scroll { flex: 1; overflow-y: auto; padding: var(--rp-s4) var(--rp-s5) var(--rp-s6); }

/* ---------------------------------------------------------- object header + sections */
.obj { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s4) var(--rp-s5); }
.obj-title { font-size: 1.4rem; line-height: 1.25; margin: .35rem 0 var(--rp-s4); font-weight: 700; word-break: break-word; }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--rp-s4) var(--rp-s6); }
.attr .k { font-size: var(--rp-fs-xs); color: var(--rp-text-2); }
.attr .v { font-size: .95rem; margin-top: .15rem; word-break: break-word; }
.sec { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s4) var(--rp-s5); margin-top: var(--rp-s4); }
.sec h3 { font-size: var(--rp-fs-m); margin: 0 0 var(--rp-s3); }
.prewrap { white-space: pre-wrap; }
.tl { position: relative; padding-left: 1.25rem; }
.tl::before { content: ""; position: absolute; left: .35rem; top: .35rem; bottom: .35rem; width: 2px; background: var(--rp-line-soft); }
.ev { position: relative; padding: .15rem 0 .8rem; }
.ev::before { content: ""; position: absolute; left: -1.05rem; top: .4rem; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--rp-brand); }
.ev .h { font-size: var(--rp-fs-xs); color: var(--rp-text-2); }
.ev .h b { color: var(--rp-text); }
.ev .b { margin-top: .1rem; white-space: pre-wrap; word-break: break-word; }

/* footer toolbar: the actions of the screen, bottom right, one emphasized */
.footbar { flex: none; background: var(--rp-surface); box-shadow: var(--rp-shadow-up); padding: .55rem var(--rp-s5);
  display: flex; justify-content: flex-end; align-items: center; gap: var(--rp-s2); flex-wrap: wrap; }
.footbar.fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }
.footbar .note { margin-right: auto; color: var(--rp-text-2); font-size: var(--rp-fs-s); }

/* ---------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rp-s4) var(--rp-s5); }
.form-grid .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-size: var(--rp-fs-s); color: var(--rp-text-2); margin-bottom: .3rem; }
.field label .req { color: var(--rp-neg); }
.field input[type=text], .field input[type=date], .field input[type=url], .field input[type=password],
.field input[type=search], .field input[type=file], .field select, .field textarea {
  width: 100%; min-height: 36px; padding: .45rem .65rem; border: 1px solid var(--rp-field); border-radius: var(--rp-radius-s);
  background: #fff; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--rp-field-hover); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--rp-brand); box-shadow: 0 0 0 1px var(--rp-brand); }
.field textarea { min-height: 88px; resize: vertical; }
.field .help { font-size: var(--rp-fs-xs); color: var(--rp-text-2); margin-top: .3rem; }
.check { display: flex; gap: var(--rp-s2); align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: .1rem; accent-color: var(--rp-brand); }
.picker { border: 1px solid var(--rp-field); border-radius: var(--rp-radius-s); background: #fff; }
.picker input[type=search] { border: 0; border-bottom: 1px solid var(--rp-line-soft); border-radius: 0; width: 100%; height: 36px; padding: 0 .65rem; outline: 0; }
.picker .opts { max-height: 190px; overflow-y: auto; padding: var(--rp-s1) 0; }
.picker .opt { display: flex; gap: var(--rp-s2); align-items: center; padding: .35rem .65rem; }
.picker .opt:hover { background: var(--rp-hover); }

/* ---------------------------------------------------------- dialog (bottom sheet on the phone) */
.dlg-bg { position: fixed; inset: 0; z-index: 80; background: rgba(29,45,62,.45); display: flex; align-items: center;
  justify-content: center; padding: var(--rp-s4); }
.dlg { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow-pop); width: 100%;
  max-width: 520px; max-height: 92vh; display: flex; flex-direction: column; }
.dlg-head { padding: var(--rp-s4) var(--rp-s5) var(--rp-s2); }
.dlg-head h2 { margin: 0; font-size: var(--rp-fs-l); }
.dlg-head .what { color: var(--rp-text-2); margin-top: .25rem; font-size: var(--rp-fs-s); }
.dlg-body { padding: var(--rp-s2) var(--rp-s5) var(--rp-s3); overflow-y: auto; display: grid; gap: var(--rp-s4); }
.dlg-foot { padding: var(--rp-s3) var(--rp-s5); border-top: 1px solid var(--rp-line-soft); display: flex; justify-content: flex-end; gap: var(--rp-s2); }

/* ---------------------------------------------------------- table (list report) */
.table-card { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.rt { width: 100%; border-collapse: collapse; }
.rt th { font-size: var(--rp-fs-xs); color: var(--rp-text-2); font-weight: 600; text-align: left; padding: .6rem var(--rp-s3);
  background: #fafbfc; border-bottom: 1px solid var(--rp-line); white-space: nowrap; }
.rt td { padding: .65rem var(--rp-s3); border-bottom: 1px solid var(--rp-line-soft); vertical-align: middle; }
.rt tbody tr:hover td { background: var(--rp-hover); }
.rt tr:last-child td { border-bottom: 0; }
.rt .num { text-align: right; font-variant-numeric: tabular-nums; }
.rt a.row-title { font-weight: 700; color: var(--rp-text); }
.rt a.row-title:hover { color: var(--rp-brand); }
.filterbar { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s3) var(--rp-s4);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--rp-s3); align-items: end; margin-bottom: var(--rp-s4); }
.filterbar .go { display: flex; gap: var(--rp-s2); align-items: center; }
.cards { display: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem var(--rp-s3); font-size: var(--rp-fs-s); margin-top: var(--rp-s2); }
.kv dt { color: var(--rp-text-2); } .kv dd { margin: 0; }

/* empty state */
.empty { text-align: center; padding: 3rem var(--rp-s4); color: var(--rp-text-2); }
.empty b { display: block; font-size: var(--rp-fs-m); color: var(--rp-text); margin-bottom: .3rem; }
.empty .art { width: 64px; height: 64px; margin: 0 auto var(--rp-s3); border-radius: 50%; background: var(--rp-brand-soft);
  color: var(--rp-brand); display: grid; place-items: center; }

/* KPI tiles (score pages) */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--rp-s3); margin-bottom: var(--rp-s4); }
.kpi { background: var(--rp-surface); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: var(--rp-s3) var(--rp-s4); }
.kpi .k { font-size: var(--rp-fs-xs); color: var(--rp-text-2); }
.kpi .v { font-size: 1.6rem; font-weight: 700; margin-top: .1rem; }
/* frozen page head (his ask 09/11): title / greeting / scores / filters stay under the tabs while
   the list scrolls. Computer only: on a phone it would take a third of the screen. */
.sticky-head { position: sticky; top: calc(var(--rp-shell-h) + 46px); z-index: 30; background: var(--rp-bg); }
.page > .sticky-head, .stage > .sticky-head { padding-top: var(--rp-s3); margin-top: calc(-1 * var(--rp-s3)); }
.sticky-head.is-stuck { box-shadow: 0 10px 12px -12px rgba(34,53,72,.45); }
@media (max-width: 760px) { .sticky-head { position: static; } .sticky-head.is-stuck { box-shadow: none; } }
/* frozen table header (his ask 09/11): the column names stay just below the frozen page head.
   Computer only. The card may not clip (a clipping box stops a header from sticking to the page). */
/* a table's title as the top bar of its box ("The tasks (12), red first"); frozen with the column header */
.table-title { display: flex; align-items: center; gap: var(--rp-s2); height: 44px; padding: 0 var(--rp-s4); font-weight: 700;
  font-size: var(--rp-fs-m); background: var(--rp-surface); border-bottom: 1px solid var(--rp-line-soft);
  border-radius: var(--rp-radius) var(--rp-radius) 0 0; }
.table-card + .table-card { margin-top: var(--rp-s4); }
@media (min-width: 761px) {
  .table-card.freeze-th, .table-card.freeze-th .table-scroll { overflow: visible; }
  .freeze-th .rt thead th { position: sticky; top: calc(var(--rp-shell-h) + 46px + var(--stuck-h, 0px)); z-index: 6;
    border-bottom: 0; box-shadow: inset 0 -1px 0 var(--rp-line); }
  .freeze-th .rt thead th:first-child { border-top-left-radius: var(--rp-radius); }
  .freeze-th .rt thead th:last-child { border-top-right-radius: var(--rp-radius); }
  .freeze-th .table-title { position: sticky; top: calc(var(--rp-shell-h) + 46px + var(--stuck-h, 0px)); z-index: 7; }
  .freeze-th .table-title ~ .table-scroll .rt thead th { top: calc(var(--rp-shell-h) + 46px + var(--stuck-h, 0px) + 44px); }
  .freeze-th .table-title ~ .table-scroll .rt thead th:first-child,
  .freeze-th .table-title ~ .table-scroll .rt thead th:last-child { border-radius: 0; }
}

/* score card + compact EM rule side by side, inside the frozen head of My week / Team score */
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--rp-s4); align-items: stretch; }
.score-row > .card + .card { margin-top: 0; }
.rules-compact { padding: var(--rp-s3) var(--rp-s4); }
.rules-compact h2 { font-size: var(--rp-fs); margin: 0 0 .35rem; }
.rules-compact .rl { display: flex; gap: .45rem; align-items: baseline; font-size: var(--rp-fs-xs); line-height: 1.4; margin-top: .25rem; }
.rules-compact .rl .dot { flex: none; transform: translateY(1px); }
@media (max-width: 1000px) { .score-row { grid-template-columns: 1fr; } }

/* page with a narrow box on the right; the box stays in view below the frozen head */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--rp-s5); align-items: start; }
.with-aside > .main-col { min-width: 0; }
.aside { position: sticky; top: calc(var(--rp-shell-h) + 46px + var(--stuck-h, 0px) + var(--rp-s6)); }
.aside h2 { font-size: var(--rp-fs-m); }
.rule-list { display: grid; gap: var(--rp-s2); }
.rule-list > div { border-radius: var(--rp-radius-s); padding: .6rem .75rem; font-size: var(--rp-fs-s); line-height: 1.45; }
.rule-list b { display: block; margin-bottom: .1rem; }
.rule-list .r { background: #fdeceb; } .rule-list .y { background: #fff6dc; } .rule-list .g { background: #eaf6ec; }
@media (max-width: 1000px) { .with-aside { grid-template-columns: 1fr; } .aside { position: static; } }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--rp-s3); }
.rules > div { border-radius: var(--rp-radius-s); padding: var(--rp-s3); font-size: var(--rp-fs-s); line-height: 1.45; }
.rules .r { background: #fdeceb; } .rules .y { background: #fff6dc; } .rules .g { background: #eaf6ec; }
.rules b { display: block; margin-bottom: .15rem; }

/* ---------------------------------------------------------- people (Users & access) */
/* plain semantic status chips (any list): pos / crit / neg / info / neu */
.st-pos { background: var(--rp-pos-soft); color: var(--rp-pos); }
.st-crit { background: var(--rp-crit-soft); color: var(--rp-crit); }
.st-neg { background: var(--rp-neg-soft); color: var(--rp-neg); }
.st-info { background: var(--rp-info-soft); color: #00438a; }
.st-neu { background: var(--rp-neu-soft); color: #4f6377; }
.avatar.off { background: var(--rp-neu-soft); color: var(--rp-neu); }
/* a person in a list: avatar + name + username */
.person { display: flex; align-items: center; gap: var(--rp-s3); min-width: 0; color: var(--rp-text); }
.person:hover { text-decoration: none; }
.person:hover .nm { color: var(--rp-brand); }
.person .nm { display: block; font-weight: 700; line-height: 1.3; }
.person .sub { display: block; font-size: var(--rp-fs-xs); color: var(--rp-text-2); line-height: 1.35; }
.rt td.act { width: 1%; white-space: nowrap; }
.row-actions { display: flex; gap: var(--rp-s1); align-items: center; justify-content: flex-end; }
/* object header with an avatar and the screen's own actions on the right */
.obj-head { display: flex; align-items: center; gap: var(--rp-s4); flex-wrap: wrap; margin: .35rem 0 var(--rp-s4); }
.obj-head .obj-title { margin: 0; }
.obj-head .who { min-width: 0; flex: 1; }
.obj-head .chipline { display: flex; gap: var(--rp-s2); flex-wrap: wrap; margin-top: .35rem; }
.obj-actions { display: flex; gap: var(--rp-s2); flex-wrap: wrap; margin-left: auto; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--rp-s3); flex-wrap: wrap; margin-bottom: var(--rp-s2); }
.sec-head h3 { margin: 0; }
.sec .lead { color: var(--rp-text-2); font-size: var(--rp-fs-s); margin: 0 0 var(--rp-s3); line-height: 1.45; }
/* permission / place tick lists, in groups */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--rp-s3); }
.perm-group { border: 1px solid var(--rp-line); border-radius: var(--rp-radius-s); padding: var(--rp-s2); }
/* many groups of different lengths: flow in columns so short ones leave no white gaps */
.perm-cols { column-width: 300px; column-gap: var(--rp-s3); }
.perm-cols > .perm-group { break-inside: avoid; margin-bottom: var(--rp-s3); display: inline-block; width: 100%; }
.perm-group h4 { display: flex; justify-content: space-between; gap: var(--rp-s2); margin: .15rem .4rem .35rem;
  font-size: var(--rp-fs-s); color: var(--rp-text); }
.perm-group h4 span { font-weight: 400; color: var(--rp-text-3); }
.perm-row { display: flex; align-items: center; gap: var(--rp-s2); padding: .45rem .4rem; border-radius: var(--rp-radius-xs); cursor: pointer; }
.perm-row:hover { background: var(--rp-hover); }
.perm-row input { width: 18px; height: 18px; flex: none; accent-color: var(--rp-brand); }
.perm-row .lbl { flex: 1; line-height: 1.35; }
.perm-row:not(.on) .lbl { color: var(--rp-text-2); }
.perm-row.all .lbl { font-weight: 700; }
.perm-row.sub { margin-left: 1.6rem; }
.perm-row.changed { background: #fff8e6; }
.tag-role { color: #4a5560; border-color: #c8ced4; background: #f2f4f6; }
.tag-plus { color: var(--rp-pos); border-color: #a8d5b5; background: var(--rp-pos-soft); font-weight: 700; }
.tag-minus { color: var(--rp-neg); border-color: #f5b7b7; background: var(--rp-neg-soft); font-weight: 700; }
.legend-line { display: flex; gap: .4rem var(--rp-s3); flex-wrap: wrap; align-items: center; font-size: var(--rp-fs-xs); color: var(--rp-text-2); margin-bottom: var(--rp-s3); }
/* role x permission tick table (role templates); first column stays in view when it scrolls sideways */
.matrix th.c, .matrix td.c { text-align: center; }
.matrix th.c { white-space: normal; min-width: 88px; line-height: 1.25; vertical-align: bottom; }
.matrix th.c small { display: block; font-weight: 400; color: var(--rp-text-3); margin-top: .15rem; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; z-index: 2; background: var(--rp-surface); min-width: 260px; }
.matrix th:first-child { background: #fafbfc; z-index: 8; }
.matrix tbody tr:hover td:first-child { background: var(--rp-hover); }
.matrix tr.grp td { background: var(--rp-neu-soft); font-weight: 700; color: var(--rp-text-2); font-size: var(--rp-fs-s); padding-top: .45rem; padding-bottom: .45rem; }
.matrix label { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 40px; min-height: 32px; cursor: pointer; }
.matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rp-brand); }
.chg { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--rp-yellow); vertical-align: middle; }
/* checklist tracker: tasks down, days across, one small square per due date */
.tracker th.c { min-width: 30px; padding: .35rem .15rem; font-variant-numeric: tabular-nums; }
.tracker th.c small { margin-top: 0; }
.tracker td.c { padding: .2rem; }
.tracker th.off, .tracker td.off { background: #eef1f4; }
.tracker th.now { color: var(--rp-brand); box-shadow: inset 0 -3px 0 var(--rp-brand); }
.tracker td:first-child { min-width: 280px; max-width: 360px; }
.tk-task { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk a, .tk-key { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-weight: 700;
  font-size: .8rem; margin: 0 auto; color: inherit; }
.tk a:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--rp-brand); }
.tk-key { display: inline-grid; vertical-align: middle; margin: 0 .25rem 0 0; width: 18px; height: 18px; font-size: .7rem; }
.tk.g a, .tk-key.g { background: #d9f2df; color: var(--rp-pos); }
.tk.l a, .tk-key.l { background: #fff1c7; color: #8a6100; }
.tk.r a, .tk-key.r { background: #fbdcdc; color: var(--rp-neg); }
.tk.o a, .tk-key.o { background: #ffe3cc; color: var(--rp-crit); }
.tk.t a, .tk-key.t { background: #fff; color: var(--rp-brand); box-shadow: inset 0 0 0 2px var(--rp-brand); }
.tk.f a, .tk-key.f { color: var(--rp-text-3); }
.tk-key.off { background: #eef1f4; }

/* a secret shown once (temporary password) */
.pw-box { display: flex; align-items: center; justify-content: space-between; gap: var(--rp-s3); flex-wrap: wrap;
  background: var(--rp-brand-soft); border: 1px dashed var(--rp-brand); border-radius: var(--rp-radius); padding: var(--rp-s4) var(--rp-s5); margin: var(--rp-s4) 0; }
.pw-code { font-family: Consolas, "SFMono-Regular", monospace; font-size: 2rem; font-weight: 700; letter-spacing: .08em; color: var(--rp-brand-dark); }

/* ---------------------------------------------------------- launchpad (All apps): groups of tiles */
.lp-group { margin-bottom: var(--rp-s6); scroll-margin-top: 160px; }
.lp-group h2 { font-size: var(--rp-fs-m); margin: 0 0 var(--rp-s3); display: flex; align-items: center; gap: var(--rp-s2); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--rp-s3); }
.tile { display: flex; flex-direction: column; min-height: 150px; padding: var(--rp-s3) var(--rp-s4); background: var(--rp-surface);
  border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); color: var(--rp-text); position: relative;
  transition: box-shadow .12s, transform .12s; }
.tile:hover { text-decoration: none; box-shadow: 0 .25rem 1rem rgba(34,53,72,.22); transform: translateY(-1px); }
.tile:focus-visible { outline: 2px solid var(--rp-brand); outline-offset: 2px; }
.tile.small { min-height: 112px; }
.tile .t-top { display: flex; justify-content: space-between; gap: var(--rp-s2); align-items: flex-start; }
.tile .t-title { font-weight: 700; line-height: 1.3; }
.tile .t-open { width: .9rem; height: .9rem; color: var(--rp-text-3); flex: none; margin-top: .15rem; }
.tile:hover .t-open { color: var(--rp-brand); }
.tile .t-sub { font-size: var(--rp-fs-xs); color: var(--rp-text-2); margin-top: .25rem; line-height: 1.35; }
.tile .t-foot { margin-top: auto; padding-top: var(--rp-s3); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--rp-s2); }
.tile .t-ic { width: 34px; height: 34px; border-radius: var(--rp-radius-s); background: var(--rp-brand-soft); color: var(--rp-brand);
  display: grid; place-items: center; flex: none; }
.tile .t-kpi { font-size: 1.75rem; font-weight: 300; line-height: 1; text-align: right; color: var(--rp-text); }
.tile .t-kpi small { display: block; font-size: var(--rp-fs-xs); font-weight: 400; color: var(--rp-text-2); margin-top: .2rem; }
.tile .t-kpi.neg { color: var(--rp-neg); } .tile .t-kpi.crit { color: var(--rp-crit); }
.tile .t-kpi.pos { color: var(--rp-pos); } .tile .t-kpi.info { color: var(--rp-info); }
@media (max-width: 760px) {
  .lp-grid { grid-template-columns: 1fr 1fr; gap: var(--rp-s2); }
  .tile { min-height: 128px; padding: var(--rp-s3); }
  .tile.small { min-height: 96px; }
  .tile .t-kpi { font-size: 1.4rem; }
}

/* hand-out slips (temporary passwords): printed two per row and cut along the dashes */
.handout { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--rp-s4); }
.slip { background: #fff; border: 1.5px dashed var(--rp-field); border-radius: var(--rp-radius-s); padding: var(--rp-s4) var(--rp-s5);
  break-inside: avoid; page-break-inside: avoid; }
.slip-h { display: flex; align-items: center; gap: var(--rp-s2); font-size: var(--rp-fs-xs); color: var(--rp-text-2); font-weight: 700; margin-bottom: var(--rp-s3); }
.slip-h .mk { width: 24px; height: 24px; border-radius: 6px; background: var(--rp-brand-dark); color: #fff; font-size: .62rem; display: grid; place-items: center; }
.slip-name { font-size: var(--rp-fs-m); font-weight: 700; }
.slip .kv { font-size: var(--rp-fs); margin-top: var(--rp-s3); }
.slip .kv dd { word-break: break-all; }
.pw-code.sm { font-size: 1.35rem; }
.slip-foot { margin-top: var(--rp-s3); font-size: var(--rp-fs-xs); color: var(--rp-text-2); line-height: 1.4; }
@media print {
  body { background: #fff; padding: 0 !important; }
  .no-print, .flashes { display: none !important; }
  .page { padding: 0; max-width: none; }
  .handout { grid-template-columns: 1fr 1fr; gap: 6mm; }
  .slip { border-color: #777; }
}

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--rp-s4);
  background: linear-gradient(160deg, #fff 0%, #eef6ff 50%, #dcebff 100%); }
.login .card { width: 100%; max-width: 380px; padding: var(--rp-s6); }
.login .brand { display: flex; gap: var(--rp-s3); align-items: center; margin-bottom: var(--rp-s5); }
.login .btn { width: 100%; height: 42px; }
.login form { display: grid; gap: var(--rp-s4); }

/* ---------------------------------------------------------- phone */
@media (max-width: 760px) {
  .shell-search, .shell-logo .prod { display: none; }
  .greet { flex-direction: column; align-items: stretch; gap: var(--rp-s3); padding: var(--rp-s3) var(--rp-s4); }
  .greet h1 { font-size: 1.35rem; } .greet p { font-size: var(--rp-fs-s); }
  .score-box { flex-direction: column; }
  .score { min-width: 0; padding: .55rem var(--rp-s3); }
  .score + .score { border-left: 0; border-top: 1px solid var(--rp-line-soft); }
  .score .ryg, .score .leg .lw { display: none; }
  .score .ring svg { width: 46px; height: 46px; } .score .ring .v { font-size: .78rem !important; }
  .apptabs { display: none; }
  .tabbar { display: flex; }
  body { padding-bottom: 62px; }
  .page { padding: var(--rp-s3) var(--rp-s3) 7rem; }
  .detail-scroll { padding: var(--rp-s3) var(--rp-s3) var(--rp-s4); }
  .board-tools { padding: var(--rp-s3) var(--rp-s3) 0; } .pill-search { min-width: 0; flex: 1; }
  .colnav { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem var(--rp-s3) 0; scrollbar-width: none; }
  .colnav button { white-space: nowrap; border: 1px solid var(--rp-field); border-radius: 999px; padding: .35rem .75rem; font-size: var(--rp-fs-s); background: #fff; }
  .board { grid-auto-columns: 86%; scroll-snap-type: x mandatory; padding: var(--rp-s3) var(--rp-s3) var(--rp-s6); gap: var(--rp-s3); }
  .col { scroll-snap-align: start; }
  .stage { padding: var(--rp-s3) var(--rp-s3) 7rem; }
  .stage table { display: none; } .mrows { display: block; }
  .stage-search { margin-left: 0; width: 100%; height: 38px; }
  .stage-selects { margin-left: 0; width: 100%; } .stage-selects select { flex: 1; min-width: 0; height: 38px; }
  .bulkbar { left: var(--rp-s3); right: var(--rp-s3); transform: none; bottom: 72px; }
  .footbar.fixed { bottom: 62px; }
  .bulk-card .grid, .helper { grid-template-columns: 1fr; }
  .obj, .sec, .card { padding: var(--rp-s4); }
  .obj-title { font-size: 1.2rem; }
  .form-grid, .rules { grid-template-columns: 1fr; }
  .footbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: .5rem var(--rp-s3); }
  .footbar .btn { flex: 1 1 0; min-width: 0; height: 42px; padding: 0 var(--rp-s2); }
  /* phone: the one blue action gets its own full-width row on top, the rest share the row below */
  .footbar > .btn-em, .footbar > form:has(.btn-em) { order: -1; flex: 1 1 100%; }
  .footbar > form:has(.btn-em) .btn { width: 100%; }
  .footbar .pop { flex: none; } .footbar .pop > .btn { width: 44px; flex: none; }
  .footbar .note { width: 100%; }
  .dlg-bg { align-items: flex-end; padding: 0; }
  .dlg { border-radius: 16px 16px 0 0; max-width: none; }
  .table-card.responsive table { display: none; }
  .table-card.responsive .cards { display: block; }
  .mcard { display: block; padding: var(--rp-s3) var(--rp-s4); border-bottom: 1px solid var(--rp-line-soft); color: var(--rp-text); }
  .mcard:hover { text-decoration: none; background: var(--rp-hover); }
  .filterbar { grid-template-columns: 1fr 1fr; }
  .btn { min-height: 40px; }
  .obj-actions { margin-left: 0; width: 100%; } .obj-actions .btn { flex: 1 1 auto; }
  .pw-code { font-size: 1.6rem; }
}
@media (pointer: coarse) { .tab { min-height: 48px; } .li { padding-top: .8rem; padding-bottom: .8rem; } }
@media print { .shell, .footbar, .apptabs, .tabbar, .greet .score-box { display: none !important; } }
