/* ==========================================================================
   Portal Assistant — Home, a dashboard (v02/home/)
   The work at a glance: what needs attention, my requests and cases, how the work is going, and
   recent activity and reports. Load after app-02.css, list-02.css and reports-02.css.
   Cards are white with a hairline. Color carries meaning only, from the fixed badge, record kind and
   step colors (css/app-02.css), so every palette reads the same; the palette tints the main button,
   the active tab and the chart's columns.
   ========================================================================== */

.pa-dash { display: flex; flex-direction: column; gap: var(--pa-space-6); }/* ---------- Hero: greeting, how much needs attention, today's date and the one main action ----------
   A light card with a thin border, white at the top and a cool wash at the foot, on every screen.
   On a desktop, HeroMountainIllustration stands in the room between the greeting and the date (the
   scene becomes the flexible space between them): its tall peaks and the sun stay in that room,
   and only low foothills run under the end of the greeting and under the date, fading out at both
   ends. The drawing keeps its proportions and shrinks with the room (at most 100px tall, so the
   tall peaks always fit in it); with under 220px of room it steps aside. Under the greeting, one
   line says how many requests need attention (the numbers below break them down).
   Tablets and phones never have that room (the date and New share the greeting's row or the last
   row), so they keep the card and its gradient without the mountains. The landscape takes fixed
   cool blues and lavender in every palette, like the badge colors; it takes no clicks. */


.pa-dash-hero {
  --pa-hero-pad-y: 12px;
  --pa-hero-line: #E5EDFA;
  --pa-hero-wash: #F5F8FF;
  --pa-hero-sun: #F2A33A;
  --pa-hero-sun-glow: #FFE7B0;
  --pa-hm-glow: #E3ECFF;
  --pa-hm-far: #F1F6FF;
  --pa-hm-pale: #DCE8FF;
  --pa-hm-mid: #BFD2FF;
  --pa-hm-main: #78A8FF;
  --pa-hm-main-foot: #A9C3FF;
  --pa-hm-lavender: #AEB6F6;
  --pa-hm-mist: #D7E4FF;
  --pa-hm-sun-light: #FFE6A3;
  --pa-hm-sun-deep: #FFC857;
  position: relative; z-index: 2; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--pa-space-3) var(--pa-space-4);
  min-height: 96px;
  padding: var(--pa-hero-pad-y) var(--pa-space-6);
  border: 1px solid var(--pa-hero-line);
  border-radius: var(--pa-radius-lg);
  background: linear-gradient(to bottom, var(--pa-surface) 35%, var(--pa-hero-wash));
}
.pa-dash-hero__scene { display: none; pointer-events: none; }
.pa-dash-hero__icon {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--pa-radius-full); color: var(--pa-hero-sun);
  background: radial-gradient(circle, var(--pa-hero-sun-glow) 0, transparent 70%);
}
.pa-dash-hero__icon .ti { font-size: var(--pa-icon-xl); }
.pa-dash-hero__text { flex: 1 1 320px; min-width: 0; max-width: 64ch; }/* The page's h1: the same size as every page title (--pa-text-title) */

.pa-dash-hero__title {
  font-family: var(--pa-font-heading); font-size: var(--pa-text-26); font-weight: var(--pa-weight-bold);
  line-height: var(--pa-leading-32); letter-spacing: -0.015em; color: var(--pa-ink-strong);
}
.pa-dash-hero__title:focus { outline: none; }
.pa-dash-hero__sub { margin-top: 2px; font-size: var(--pa-text-base); line-height: var(--pa-leading-20); color: var(--pa-ink-soft); }
.pa-dash-hero__side { display: flex; align-items: center; gap: var(--pa-space-4); margin-left: auto; }
.pa-dash-hero__date { font-size: var(--pa-text-base); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-medium); color: var(--pa-ink-soft); white-space: nowrap; }
.pa-dash-hero__side .pa-btn { height: var(--pa-control-md); }
.pa-dash-hero__side .pa-btn__caret { color: inherit; }
.pa-dash-hero .pa-popover { right: 0; left: auto; min-width: 220px; }
@media (min-width: 992px) {
  .pa-dash-hero { container: pa-hero / inline-size; flex-wrap: nowrap; }
  .pa-dash-hero__text { order: 1; flex: 0 1 auto; }
  .pa-dash-hero__scene {
    display: block; order: 2; position: relative; z-index: -1; flex: 1 1 0; align-self: stretch;
    margin: calc(-1 * var(--pa-hero-pad-y)) 0;
    container: pa-hero-gap / inline-size;
  }
  .pa-dash-hero__side { order: 3; margin-left: 0; }/* The window the landscape shows through: from the end of the greeting to the New button */
  
  .pa-hero-mountains {
    position: absolute; top: 0; bottom: 0; left: -16px; right: -120px; overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 48px, black calc(100% - 96px), transparent);
  }/* The middle of the peaks (x 264 of the 560-wide drawing) sits over the middle of the room */
  
  .pa-hero-mountains svg {
    --hm-h: min(100px, calc(20cqw + 15px));
    position: absolute; bottom: 0; left: calc(16px + 50cqw - var(--hm-h) * 2.64);
    width: calc(var(--hm-h) * 5.6); height: var(--hm-h);
  }
  @container pa-hero-gap (max-width: 219px) { .pa-hero-mountains { display: none; } }
}/* The New menu holds links (pages) as well as buttons */

.pa-dash .pa-menu a {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--pa-item-height); padding: 0 var(--pa-space-3);
  border-radius: var(--pa-radius-md); color: var(--pa-ink); font-size: var(--pa-text-14); line-height: var(--pa-leading-20);
}
.pa-dash .pa-menu a:hover { background: var(--pa-brand-50); }/* ---------- Section heading: icon, title and line, then "View all" ---------- */


.pa-dash-head { display: flex; align-items: center; gap: var(--pa-space-3); margin-bottom: var(--pa-space-3); }
.pa-dash-head__icon {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--pa-radius-md); background: var(--pa-badge-count); color: var(--pa-ink-soft);
}/* On the sunken workspace the cards drop their outline and lift with a soft shadow, the same in
   both shapes (only the corners change) */

.pa-main--sunken :is(.pa-dash-card, .pa-dash-hero) { border-color: transparent; box-shadow: var(--pa-shadow-card); }
.pa-dash-head__icon .ti { font-size: var(--pa-icon-md); }/* A section about one kind of record takes that kind's fixed color (My requests: request blue,
   My cases: case violet); Needs attention turns alert red while anything needs attention. The
   others (summaries, mixed activity, reports) stay neutral. Titles themselves stay ink. */

.pa-dash-head__icon[data-tone] { background: var(--tone-bg); color: var(--tone); }
.pa-dash-head__text { flex: 1; min-width: 0; }
.pa-dash-head__title { font-size: var(--pa-text-20); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-28); color: var(--pa-ink-strong); }
.pa-dash-head__desc { font-size: var(--pa-text-base); line-height: var(--pa-leading-20); color: var(--pa-ink-muted); }
.pa-dash-head__end { flex: none; display: flex; align-items: center; gap: var(--pa-space-2); }
.pa-dash-all {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--pa-control-md); padding: 0 10px; border-radius: var(--pa-radius-md);
  font-size: var(--pa-text-base); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-medium); color: var(--pa-ink-strong); white-space: nowrap;
}
.pa-dash-all:hover { background: var(--pa-hover-tint); }
.pa-dash-all .ti { font-size: var(--pa-icon-sm); }/* ---------- Cards and grids ---------- */


.pa-dash-card {
  container-type: inline-size;
  min-width: 0; padding: var(--pa-space-4);
  border: 1px solid var(--pa-line); border-radius: var(--pa-radius-lg); background: var(--pa-surface);
}/* Two panels side by side while each keeps 540px; one above the other below that */

.pa-dash-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr)); gap: var(--pa-grid-gutter); }/* ---------- Needs attention: four numbers straight on the work area; each one filters My requests ----------
   A small label ("Requests that need you", the section's heading) says what they count. Each number
   is a white card, the page's most marked block: a 4px bar in its meaning's color on the left, the
   icon on a solid tile of that color, a 32px number, its name and a note. Under the pointer it lifts
   with a shadow, like Home's numbers, in both shapes (the rule shared with .pa-stat in app-02.css);
   the chosen one keeps a tint of its color and a ring. */


.pa-dash-attn__label { margin: 0 0 var(--pa-space-3) 2px; font-size: var(--pa-text-base); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-20); color: var(--pa-ink-soft); }
.pa-dash-kpis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pa-grid-gutter); }
.pa-dash-kpi {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--pa-space-3);
  width: 100%; height: 100%; padding: var(--pa-space-3) var(--pa-space-4);
  position: relative; overflow: hidden;
  border: 0; border-radius: var(--pa-radius-lg);
  background: var(--pa-surface);
  box-shadow: 0 0 0 1px var(--pa-line);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: box-shadow var(--pa-duration) var(--pa-ease), background var(--pa-duration) var(--pa-ease), transform var(--pa-duration) var(--pa-ease);
}
.pa-dash-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone-solid, var(--tone)); }/* The chosen number: a tint and a ring in its own color (its bar's color) */

.pa-dash-kpi { --tone-ring: var(--tone-solid, var(--tone)); }
.pa-dash-kpi[aria-pressed="true"] { background: color-mix(in srgb, var(--tone-bg) 55%, var(--pa-surface)); box-shadow: 0 0 0 2px var(--tone-ring); }/* On the sunken work area: a faint ring and a shadow a little deeper than the other cards' */

.pa-main--sunken .pa-dash-kpi:not([aria-pressed="true"]) { box-shadow: 0 0 0 1px rgb(18 38 63 / 0.06), 0 12px 24px rgb(18 38 63 / 0.06); }
:root[data-shape="soft"] .pa-dash-kpi[aria-pressed="true"] { background: color-mix(in srgb, var(--tone-bg) 55%, var(--pa-surface)); box-shadow: 0 0 0 2px var(--tone-ring), 0 6px 16px rgba(14, 26, 34, 0.07); }/* Under the pointer the chosen one keeps its ring and tint while it lifts */

:root .pa-dash-kpi[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--tone-bg) 55%, var(--pa-surface)); box-shadow: 0 0 0 2px var(--tone-ring), 0 6px 16px rgba(14, 26, 34, 0.08); }/* The icon sits at the top, level with the number */

.pa-dash-kpi__icon {
  align-self: start;
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: var(--pa-radius-full); background: var(--tone-solid, var(--tone)); color: var(--tone-on, var(--pa-text-inverse));
}
.pa-dash-kpi__icon .ti { font-size: var(--pa-icon-lg); }/* The same height of text in every card (number, name, note line), so the numbers line up whether
   or not a card has a note */

.pa-dash-kpi__text { min-width: 0; min-height: 72px; display: flex; flex-direction: column; }
.pa-dash-kpi__num { font-size: var(--pa-text-28); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-36); color: var(--pa-ink-strong); font-variant-numeric: tabular-nums; }
.pa-dash-kpi[data-tone="alert"] .pa-dash-kpi__num { color: var(--tone); }
.pa-dash-kpi__label { font-size: var(--pa-text-13); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-18); color: var(--pa-ink-strong); }
.pa-dash-kpi__note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: var(--pa-text-12); line-height: var(--pa-leading-16); color: var(--pa-ink-soft); font-weight: var(--pa-weight-regular); }
.pa-dash-kpi__note b { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--pa-weight-semibold); }
.pa-dash-kpi__note b.is-bad { color: var(--pa-danger-strong); }
.pa-dash-kpi__note b.is-good { color: var(--pa-status-approved); }
.pa-dash-kpi__note .ti { font-size: var(--pa-icon-sm); }
.pa-dash-kpi__go { font-size: var(--pa-icon-md); color: var(--tone); transition: transform var(--pa-duration) var(--pa-ease); }/* A number that filters My requests doesn't move the page. Instead its arrow turns to point down
   at the list, the list's frame glows for a moment in the primary color (the same for every
   number; the number itself carries its color), the chip saying what is shown drops in and the
   rows arrive one after another */

.pa-dash-kpi[aria-pressed="true"] .pa-dash-kpi__go { transform: rotate(90deg); }
@keyframes pa-dash-ping {
  from, 40% { box-shadow: 0 0 0 2px var(--pa-brand-600), 0 0 0 6px color-mix(in srgb, var(--pa-brand-600) 16%, transparent); }
}
.pa-dash-panel.is-pinged { animation: pa-dash-ping calc(var(--pa-duration-long) * 4) var(--pa-ease-exit); }
.pa-dash-filter:not([hidden]) { animation: pa-drop-in var(--pa-duration) var(--pa-ease-enter) backwards; }
[data-tone="alert"] { --tone: var(--pa-danger-strong); --tone-bg: color-mix(in srgb, var(--pa-danger-strong) 9%, var(--pa-surface)); }/* Due soon and Waiting on you take brighter fills for their bar and icon tile, so orange and yellow
   stay apart (the text colors are both brownish) */

[data-tone="soon"] { --tone-solid: var(--pa-status-pending-solid); }
[data-tone="open"] { --tone-solid: var(--pa-status-open-solid); --tone-on: var(--pa-status-open-on); }
[data-tone="soon"] { --tone: var(--pa-status-pending); --tone-bg: var(--pa-status-pending-bg); }
[data-tone="open"] { --tone: var(--pa-status-open); --tone-bg: var(--pa-status-open-bg); }
[data-tone="request"] { --tone: var(--pa-kind-request); --tone-bg: var(--pa-kind-request-bg); }
[data-tone="case"] { --tone: var(--pa-kind-case); --tone-bg: var(--pa-kind-case-bg); }
[data-tone="new"] { --tone: var(--pa-badge-new); --tone-bg: var(--pa-badge-new-bg); }
[data-tone="done"] { --tone: var(--pa-status-approved); --tone-bg: var(--pa-status-approved-bg); }
[data-tone="progress"] { --tone: var(--pa-status-progress); --tone-bg: var(--pa-status-progress-bg); }
[data-tone="ended"] { --tone: var(--pa-status-cancelled); --tone-bg: var(--pa-status-cancelled-bg); }/* ---------- Panels with tabs (My requests, My cases) ---------- *//* overflow-x: clip keeps content sliding in from a side (tab change) inside the card; menus still open below */



.pa-dash-panel { display: flex; flex-direction: column; overflow-x: clip; }
.pa-dash-panel .pa-dash-head { margin-bottom: var(--pa-space-2); }
.pa-dash-tabs {
  display: flex; gap: var(--pa-space-1);
  margin: 0 calc(-1 * var(--pa-space-4)); padding: 0 var(--pa-space-2);
  border-bottom: 1px solid var(--pa-line-soft);
  overflow-x: auto; scrollbar-width: none;
}
.pa-dash-tabs::-webkit-scrollbar { display: none; }
.pa-dash-tabs .pa-tab { height: var(--pa-tab-height); padding: 0 var(--pa-space-3); }/* A number from Needs attention narrows the list; the chip says which and clears it */

.pa-dash-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pa-space-2); margin-top: var(--pa-space-3); font-size: var(--pa-text-base); line-height: var(--pa-leading-20); color: var(--pa-ink-soft); }
.pa-dash-filter[hidden] { display: none; }
.pa-dash-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 4px 0 12px; border-radius: var(--pa-radius-pill);
  background: var(--tone-bg); color: var(--pa-ink-strong); font-weight: var(--pa-weight-medium);
}
.pa-dash-chip > .ti { font-size: var(--pa-icon-sm); color: var(--tone); }
.pa-dash-chip button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--pa-radius-full); background: none; color: var(--pa-ink-soft); cursor: pointer; }
.pa-dash-chip button:hover { background: color-mix(in srgb, var(--pa-ink-strong) 8%, transparent); }/* Rows: one table per panel; under 520px of panel each row becomes a small card */


.pa-dtable { width: 100%; border-collapse: collapse; font-size: var(--pa-text-base); line-height: var(--pa-leading-20); }
.pa-dtable th {
  height: 40px; padding: 0 var(--pa-space-2);
  border-bottom: 1px solid var(--pa-line-soft);
  font-size: var(--pa-text-12); line-height: var(--pa-leading-16); font-weight: var(--pa-weight-semibold); color: var(--pa-ink-muted); text-align: left; white-space: nowrap;
}
.pa-dtable td { padding: 10px var(--pa-space-2); border-bottom: 1px solid var(--pa-line-soft); vertical-align: middle; color: var(--pa-ink); }
.pa-dtable :is(th, td):first-child { padding-left: 0; }
.pa-dtable :is(th, td):last-child { padding-right: 0; width: 40px; }
.pa-dtable tbody tr:last-child td { border-bottom: 0; }
.pa-dtable tbody tr { cursor: pointer; transition: background var(--pa-duration) var(--pa-ease); }
.pa-dtable tbody tr:hover { background: var(--pa-brand-25); }
.pa-dtable .pa-org-name { gap: var(--pa-space-2); }
.pa-dtable .pa-org, .pa-dtable .pa-avatar { width: 28px; height: 28px; font-size: var(--pa-text-12); }
.pa-drec { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pa-drec__icon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--pa-radius-md);
  background: color-mix(in srgb, var(--record-color, var(--pa-kind-request)) 12%, var(--pa-surface));
  color: var(--record-color, var(--pa-kind-request));
}
.pa-drec__icon .ti { font-size: var(--pa-icon-md); }
.pa-drec__icon--case { background: var(--pa-kind-case-bg); color: var(--pa-kind-case); }
.pa-drec__text { min-width: 0; display: flex; flex-direction: column; }
.pa-drec__title { font-weight: var(--pa-weight-semibold); color: var(--pa-ink-strong); }/* The record link: 40px to click, taken back with a negative margin so the row keeps its height *//* 40px to click: padding grows the link, a matching negative margin gives the room back, so a
   name on two lines never runs into the line under it */


.pa-drec__title, .pa-drep__name { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: .3em; align-self: flex-start; padding-block: 10px; margin-block: -10px; }
.pa-drec__title:hover { text-decoration: underline; }
.pa-drec__meta { font-size: var(--pa-text-13); color: var(--pa-ink-muted); line-height: var(--pa-leading-18); }
.pa-dtable .pa-status { white-space: nowrap; }
.pa-ddue { display: flex; flex-direction: column; white-space: nowrap; }
.pa-ddue__note { font-size: var(--pa-text-12); color: var(--pa-ink-muted); line-height: var(--pa-leading-16); font-weight: var(--pa-weight-regular); }
.pa-ddue.is-late time, .pa-ddue.is-late .pa-ddue__note { color: var(--pa-danger-strong); font-weight: var(--pa-weight-medium); }
.pa-dmenu .pa-icon-btn { width: var(--pa-control-md); height: var(--pa-control-md); }
.pa-dmenu .pa-icon-btn .ti { font-size: var(--pa-icon-md); color: var(--pa-ink-soft); }
.pa-dmenu .pa-popover { right: 0; left: auto; min-width: 220px; }
.pa-dash-empty { display: flex; flex-direction: column; align-items: center; gap: var(--pa-space-2); padding: var(--pa-space-8) var(--pa-space-4); color: var(--pa-ink-muted); text-align: center; }
.pa-dash-empty > .ti { font-size: var(--pa-icon-xl); color: var(--pa-status-approved); }
.pa-dash-empty strong { color: var(--pa-ink-strong); }

@container (max-width: 520px) {
  .pa-dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pa-dtable, .pa-dtable tbody { display: block; }
  .pa-dtable tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pa-space-2) var(--pa-space-3); padding: var(--pa-space-3) 0; border-bottom: 1px solid var(--pa-line-soft); }
  .pa-dtable tbody tr:last-child { border-bottom: 0; }
  .pa-dtable td { display: flex; align-items: center; gap: var(--pa-space-2); padding: 0; border: 0; }
  .pa-dtable td:last-child { width: auto; grid-column: 2; grid-row: 1; align-self: start; }
  .pa-dtable td:not(:first-child):not(:last-child) { grid-column: 1 / -1; padding-left: 42px; }
  .pa-dtable td[data-label]::before { content: attr(data-label); flex: none; min-width: 64px; font-size: var(--pa-text-12); color: var(--pa-ink-muted); }
  .pa-dtable .pa-stepstate { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .pa-dtable td[data-label] { flex-wrap: wrap; }
  .pa-ddue { flex-direction: row; gap: 6px; }
}/* ---------- Performance overview: a chart and four numbers ---------- */


.pa-dash-perf { container-type: inline-size; }
.pa-dash-perf__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pa-grid-gutter); }
@container (min-width: 920px) {
  .pa-dash-perf__body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.pa-dash-chart__title { font-size: var(--pa-text-md); line-height: var(--pa-leading-24); font-weight: var(--pa-weight-semibold); color: var(--pa-ink-strong); }/* 200px, so beside it the four short number cards keep close to their own height */

.pa-dash-chart__plot { min-height: 200px; margin: var(--pa-space-2) -8px 0; }
.pa-dash-chart__plot .apexcharts-legend-text { font-size: var(--pa-text-12) !important; line-height: var(--pa-leading-16); }/* A number is a short card: the number with its icon at the top right, then its name and the change */

.pa-dash-metrics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pa-space-3); }
.pa-dash-metric {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "num icon" "label label" "trend trend";/* Beside the chart the cards grow to its height: the content stays together in the middle */
  
  align-content: center;
  column-gap: var(--pa-space-3); height: 100%; padding: var(--pa-space-3) var(--pa-space-4);
}
.pa-dash-metric__num { grid-area: num; align-self: center; font-size: var(--pa-text-24); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-32); color: var(--pa-ink-strong); font-variant-numeric: tabular-nums; }
.pa-dash-metric__num small { margin-left: 4px; font-size: var(--pa-text-14); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-semibold); color: var(--pa-ink-soft); }
.pa-dash-metric__label { grid-area: label; font-size: var(--pa-text-base); font-weight: var(--pa-weight-medium); line-height: var(--pa-leading-20); color: var(--pa-ink-strong); }
.pa-dash-metric__trend { grid-area: trend; justify-self: start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--pa-text-12); line-height: var(--pa-leading-16); color: var(--pa-ink-muted); }
.pa-dash-metric__trend b { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--pa-weight-semibold); color: var(--pa-ink-soft); }
.pa-dash-metric__trend .ti { font-size: var(--pa-icon-sm); }
.pa-dash-metric__trend.is-good b { color: var(--pa-status-approved); }
.pa-dash-metric__trend.is-bad b { color: var(--pa-danger-strong); }
.pa-dash-metric__icon {
  grid-area: icon; justify-self: end; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--pa-radius-md); background: var(--tone-bg); color: var(--tone);
}
.pa-dash-metric__icon .ti { font-size: var(--pa-icon-md); }/* ---------- Recent activity ---------- */


.pa-dact { list-style: none; margin: 0; padding: 0; }
.pa-dact li + li { border-top: 1px solid var(--pa-line-soft); }
.pa-dact__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--pa-space-3); padding: var(--pa-space-3) var(--pa-space-2); margin: 0 calc(-1 * var(--pa-space-2)); border-radius: var(--pa-radius-md); color: inherit; }
.pa-dact__item:hover { background: var(--pa-brand-25); }
.pa-dact__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--pa-radius-md); background: var(--tone-bg); color: var(--tone); }
.pa-dact__icon .ti { font-size: var(--pa-icon-md); }
.pa-dact__title { font-size: var(--pa-text-base); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-semibold); color: var(--pa-ink-strong); }
.pa-dact__title, .pa-dact__desc { display: block; }
.pa-dact__desc { font-size: var(--pa-text-base); line-height: var(--pa-leading-20); color: var(--pa-ink-soft); overflow-wrap: anywhere; }/* A comment is quoted on one line; the request page has all of it */

.pa-dact__desc.is-quote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; overflow-wrap: normal; }
.pa-dact__time { font-size: var(--pa-text-12); color: var(--pa-ink-muted); white-space: nowrap; line-height: var(--pa-leading-16); }
@container (max-width: 440px) {
  .pa-dact__item { grid-template-columns: auto minmax(0, 1fr); }
  .pa-dact__time { grid-column: 2; }
}/* ---------- Recent reports ---------- */


.pa-drep { list-style: none; margin: 0; padding: 0; }
.pa-drep li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--pa-space-3); padding: var(--pa-space-3) 0; }
.pa-drep li + li { border-top: 1px solid var(--pa-line-soft); }
.pa-drep__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--pa-radius-md); background: var(--pa-badge-count); color: var(--pa-ink-soft); }
.pa-drep__icon .ti { font-size: var(--pa-icon-md); }
.pa-drep__name { font-size: var(--pa-text-base); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-semibold); color: var(--pa-ink-strong); }
.pa-drep__name:hover { text-decoration: underline; }
.pa-drep__meta { display: block; font-size: var(--pa-text-13); color: var(--pa-ink-muted); line-height: var(--pa-leading-18); }/* ---------- Narrow screens ---------- */



@media (max-width: 1180px) {
  .pa-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pa-dash { gap: var(--pa-space-5); }/* Hero: the greeting wraps beside a smaller sun; date and New share the last row */
  
  .pa-dash-hero { min-height: 0; padding: var(--pa-space-4); gap: var(--pa-space-3); }
  .pa-dash-hero__icon { width: 36px; height: 36px; align-self: flex-start; }
  .pa-dash-hero__icon .ti { font-size: var(--pa-icon-lg); }
  .pa-dash-hero__text { flex-basis: 200px; }
  .pa-dash-hero__title { font-size: var(--pa-text-22); line-height: var(--pa-leading-28); }
  .pa-dash-hero__side { width: 100%; justify-content: space-between; margin-left: 0; }
  .pa-dash-kpis { gap: var(--pa-space-3); }/* Icon beside the number; the name and the note get the card's whole width */
  
  .pa-dash-kpi { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon num" "text text"; align-items: center; gap: var(--pa-space-1) var(--pa-space-2); padding: var(--pa-space-3); }
  .pa-dash-kpi__icon { grid-area: icon; width: 40px; height: 40px; }
  .pa-dash-kpi__text { display: contents; }
  .pa-dash-kpi__num { grid-area: num; }
  .pa-dash-kpi__label, .pa-dash-kpi__note { grid-column: 1 / -1; }
  .pa-dash-kpi__icon .ti { font-size: var(--pa-icon-md); }
  .pa-dash-kpi__go { display: none; }
  .pa-dash-metric { padding: var(--pa-space-3); }
  .pa-dash-metric__num { font-size: var(--pa-text-20); }/* Tabs: tighter, so three fit across (they still scroll if a count grows) */
  
  .pa-dash-tabs { gap: 0; padding: 0 var(--pa-space-1); }
  .pa-dash-tabs .pa-tab { gap: 6px; padding: 0 var(--pa-space-2); font-size: var(--pa-text-base); line-height: var(--pa-leading-20); }
}
