/* Pack 11: dashboards, analytics and reports. Tokens only.
   Breakpoints follow R5: 1279, 1023 and 767 px. */

/* change against comparison period */
.dl { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl .icon { width: 14px; height: 14px; }
.dl.up { color: var(--ok-ink); }
.dl.down { color: var(--bad-ink); }
.x-note { font-size: 12px; color: var(--muted); }
.x-note .icon { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* period bar under the page head */
.x-period { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin: calc(-1 * var(--s2)) 0 var(--s4); font-size: 12.5px; color: var(--muted); }
.x-period .filter { height: 34px; }
.x-period .sep { width: 1px; height: 18px; background: var(--border); }
@media (max-width: 767px) { .x-period { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--s4)); padding-right: var(--s4); } .x-period .filter { height: 40px; } .x-period .x-asof { display: none; } }

/* service line tiles (overview) */
.x-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 767px) { .x-tiles { grid-template-columns: minmax(0, 1fr); } }
.x-tile { border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; display: grid; gap: 10px; background: var(--surface); min-width: 0; }
.x-tile-h { display: flex; align-items: center; gap: 10px; }
.x-tile-h h3 { font-size: 14.5px; font-weight: 700; }
.x-tile-h .pill { margin-left: auto; }
.x-tile-money { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.x-tile-money .big { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.x-tile-money .spark { width: 120px; height: 28px; }
.x-lbl { font-size: 11.5px; color: var(--muted); }
.x-mstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.x-mstats a, .x-mstats > div { display: grid; gap: 1px; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; min-width: 0; }
.x-mstats a:hover { background: var(--surface-2); }
.x-mstats b { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
.x-mstats span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.x-mstats .muted-val b { color: var(--muted); }
.x-tile.general { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 10px 14px; background: var(--surface-2); }
.x-tile.general .x-tile-h { flex: 1 1 200px; }
@media (max-width: 1023px) { .x-mstats a { min-height: var(--tap); align-content: start; } }

/* money reconciliation */
.x-recon-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-sunk); gap: 2px; }
.x-recon-bar i { display: block; height: 100%; background: var(--c); min-width: 3px; }
.x-recon { display: grid; gap: 0; }
.x-recon a, .x-recon > div { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.x-recon a:hover { background: var(--surface-2); }
.x-recon .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.x-recon .share { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.x-recon .total { border-bottom: 0; border-top: 2px solid var(--border-strong); font-weight: 700; }
.x-recon .total .amt { font-size: 15px; }
.x-sq { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; margin-right: 8px; vertical-align: 0; }
@media (max-width: 1023px) { .x-recon a { min-height: var(--tap); } }

/* attention list */
.x-att { display: grid; }
.x-att-i { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.x-att-i:last-child { border-bottom: 0; }
.x-att-i .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.x-att-i strong { display: block; font-size: 13.5px; color: var(--text); line-height: 1.35; }
.x-att-i small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.x-att-i > .icon { color: var(--muted-2); margin-top: 8px; }
a.x-att-i:hover strong { color: var(--primary-ink); }
@media (max-width: 1023px) { a.x-att-i { min-height: var(--tap); } }

/* attention page rows */
.x-attrow { display: grid; grid-template-columns: 38px minmax(0, 1fr) 190px auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.x-attrow:last-child { border-bottom: 0; }
.x-attrow .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.x-attrow .t strong { display: block; font-size: 14px; }
.x-attrow .t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.x-attrow .t .row { margin-top: 6px; gap: 6px; }
.x-attrow .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 1279px) { .x-attrow { grid-template-columns: 38px minmax(0, 1fr) auto; } .x-attrow .own { display: none; } }
@media (max-width: 767px) { .x-attrow { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 14px; } .x-attrow .acts { grid-column: 1 / -1; justify-content: stretch; } .x-attrow .acts .btn { flex: 1 1 auto; } }

/* activity strip and feed */
.x-acts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 1279px) { .x-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .x-acts > :nth-child(n+4) { display: none; } }
@media (max-width: 767px) { .x-acts { grid-template-columns: minmax(0, 1fr); } .x-acts > :nth-child(n+4) { display: none; } }
.x-act { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 4px; border-radius: 8px; min-width: 0; }
.x-act:hover { background: var(--surface-2); }
.x-act .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.x-act strong { display: block; font-size: 12.5px; color: var(--text); line-height: 1.35; }
.x-act small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.x-feed-day { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); padding: 14px 18px 6px; }
.x-feed { display: grid; }
.x-feed-i { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.x-feed-i:hover { background: var(--surface-2); }
.x-feed-i .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.x-feed-i strong { display: block; font-size: 13.5px; }
.x-feed-i small { display: block; font-size: 12px; color: var(--muted); }
.x-feed-i .when { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
@media (max-width: 767px) { .x-feed-i { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 14px; } .x-feed-i .when { grid-column: 2; text-align: left; } .x-feed-day { padding: 14px 14px 6px; } }

/* plan summary */
.x-plan { display: grid; gap: 7px; font-size: 13px; }
.x-plan > div { display: flex; justify-content: space-between; gap: 10px; }
.x-plan .tot { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 700; }
.x-plan .tot b { color: var(--primary-ink); font-size: 16px; }

/* today strip */
.x-today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.x-today a { display: grid; gap: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.x-today a:hover { border-color: var(--primary-tint-2); }
.x-today b { font-size: 19px; font-variant-numeric: tabular-nums; }
.x-today span { font-size: 12px; color: var(--muted); }
.x-today .bad b { color: var(--bad-ink); }

/* metric definition */
.x-def { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; font-size: 13.5px; margin: 0; }
.x-def dt { color: var(--muted); padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.x-def dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.x-def code, .x-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-sunk); border-radius: 5px; padding: 1px 6px; color: var(--text-2); }
@media (max-width: 767px) { .x-def { grid-template-columns: minmax(0, 1fr); } .x-def dt { border-bottom: 0; padding-bottom: 0; } }
.x-bigval { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.x-bigval b { font-size: 34px; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.x-frac { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.x-frac a, .x-frac > div { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.x-frac a:hover { border-color: var(--primary-tint-2); box-shadow: 0 0 0 3px var(--primary-tint); }
.x-frac b { font-size: 22px; font-variant-numeric: tabular-nums; }
.x-frac span { font-size: 12px; color: var(--muted); }
.x-frac .op { font-size: 20px; color: var(--muted-2); border: 0; padding: 0; }
@media (max-width: 767px) { .x-frac { grid-template-columns: minmax(0, 1fr); } .x-frac .op { text-align: center; } }

/* layout editor */
.x-lay { display: grid; }
.x-lay-row { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.x-lay-row:last-child { border-bottom: 0; }
.x-lay-row.off { opacity: .55; }
.x-lay-row .grip { color: var(--muted-2); }
.x-lay-row .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); }
.x-lay-row strong { display: block; font-size: 13.5px; }
.x-lay-row small { display: block; font-size: 12px; color: var(--muted); }
.x-lay-row .mv { display: flex; gap: 2px; }
@media (max-width: 767px) { .x-lay-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 12px; } .x-lay-row .grip { display: none; } .x-lay-row .seg { grid-column: 2 / -1; justify-self: start; } }
.x-lib { display: grid; gap: 8px; }
.x-lib-i { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.x-lib-i strong { display: block; font-size: 13px; }
.x-lib-i small { display: block; font-size: 12px; color: var(--muted); }
.x-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.x-levels > div { padding: 10px 12px; border-right: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.x-levels > div:last-child { border-right: 0; }
.x-levels > div.on { background: var(--primary-tint); }
.x-levels b { display: block; font-size: 12.5px; }
.x-levels span { display: block; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1023px) { .x-levels { grid-template-columns: minmax(0, 1fr); } .x-levels > div { border-right: 0; border-bottom: 1px solid var(--line); } .x-levels > div:last-child { border-bottom: 0; } }

/* provider production by line */
.x-stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-sunk); min-width: 90px; }
.x-stack i { display: block; height: 100%; background: var(--c); }

/* location comparison */
.x-cmp td.r a { font-weight: 600; }
.x-cmp .grp td { background: var(--surface-2); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; padding-top: 8px; padding-bottom: 8px; }

/* report preview and builder */
.x-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.x-pick .pill { padding: 5px 10px; }
.x-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.x-steps { display: grid; gap: 0; }
.x-steps > section { padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.x-steps > section:last-child { border-bottom: 0; }
.x-steps h3 { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.x-steps h3 b { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-grid; place-items: center; font-size: 11.5px; }
@media (max-width: 767px) { .x-steps > section { padding: 14px; } }

/* goal progress */
.x-prog { display: block; width: 100%; min-width: 120px; position: relative; height: 8px; border-radius: 4px; background: var(--surface-sunk); min-width: 80px; }
.x-prog i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--primary)); }
.x-prog u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); text-decoration: none; }

/* fixes after first screenshot review */
.card-h > a.link { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.x-col { align-content: start; }
.x-tile { align-content: start; }
.x-tile-h > a:last-child { margin-left: auto; }
.x-recon.two a, .x-recon.two > div { grid-template-columns: minmax(0, 1fr) auto; }
.kpi .delta .x-vs { white-space: nowrap; }
@media (max-width: 1023px) { .hbar a.link, .hbar a.who { display: inline-flex; align-items: center; min-height: var(--tap); } .hbars { gap: 2px; } }
.x-cmpw .tbl { table-layout: fixed; }
.x-cmpw .tbl th:nth-child(n+2), .x-cmpw .tbl td:nth-child(n+2) { width: 17%; }
@media (max-width: 1023px) { .x-cmpw .tbl th:nth-child(n+2), .x-cmpw .tbl td:nth-child(n+2) { width: 20%; } }

/* phone order on Overview: attention and today first (R5) */
@media (max-width: 767px) {
  .x-ovgrid > .x-col { display: contents; }
  .x-ovgrid > .x-col > * { grid-column: span 12; min-width: 0; }
  .x-ovgrid .x-ov-att { order: -2; }
  .x-ovgrid .x-ov-today { order: -1; }
}
@media (max-width: 1023px) {
  .x-lay-row .switch { width: 46px; height: 28px; border-radius: 14px; }
  .x-lay-row .switch::after { top: 4px; left: 4px; width: 20px; height: 20px; }
  .x-lay-row .switch.on::after { left: 22px; }
  .x-def dt a { display: inline-flex; align-items: center; min-height: var(--tap); }
}
.card-f > a.link { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
/* own phone list where rows carry actions (Downloads) */
.x-mob { display: none; }
@media (max-width: 767px) {
  .x-desk { display: none; }
  .x-mob { display: block; }
  .x-mob-i { display: grid; gap: 6px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
  .x-mob-i:last-child { border-bottom: 0; }
  .x-mob-i strong { font-size: 14px; }
  .x-mob-i .meta { font-size: 12.5px; color: var(--muted); }
  .x-mob-i .row { justify-content: space-between; }
  .x-mob-i .btn { min-height: var(--tap); }
}
