/* app.css: BERI SaaS cloud foundation shell & sign-in surface built on first-ship-app tokens (operator.css, ui.css, pieces.css) */

html.saas-scroll,
html.saas-scroll body {
  overflow: auto !important;
  min-height: 100%;
  background: var(--studio-light, #04070c);
  color: var(--ui-ink, #f5f7fb);
}

.saas-shell {
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top, 20px)) 20px max(36px, env(safe-area-inset-bottom, 36px));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.saas-login-wrap {
  min-height: 100dvh;
  display: block;
  padding: 0;
  /* the prototype start wall's own glow at the top left (start.css:6) */
  background: radial-gradient(95% 50% at 10% 0%, rgba(29, 107, 236, 0.13), transparent 72%), #04070c;
  position: relative;
}

.login-wall {
  position: absolute;
  left: 22px;
  right: 22px;
  top: max(36px, env(safe-area-inset-top, 0px));
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: #fff;
  font: 200 44px/1.02 var(--ui-font, system-ui);
  letter-spacing: -0.035em;
  cursor: pointer;
}

/* hand finish (design studio, 2 Nov): the prototype's start wall (start.css:11-19, 63-66). The studio's name in 650 at 36 px, a
   fifth of the way down; from 768 px it stands in the middle column, 440 px wide. */
.login-wall { top: calc(139px + clamp(84px, 21svh, 190px)); font: 650 36px/1.08 var(--ui-font, system-ui); letter-spacing: -0.036em; transition: filter 260ms ease, opacity 260ms ease; }
/* while the sign-in sheet stands open upright, the wall behind it goes soft, as the prototype's does; on its side the sheet
   stands at the right and the name stays sharp beside it, as in the prototype */
@media (max-width: 899px) { .saas-login-wrap:has(.saas-login-card:not([hidden])) .login-wall { filter: blur(9px); opacity: 0.5; } }
@media (min-width: 768px) {
  .login-wall { top: calc(139px + clamp(84px, 19svh, 190px)); left: 50%; right: auto; width: min(440px, calc(100% - 44px)); transform: translateX(-50%); }
}

.saas-login-wrap.kb-open {
  justify-content: flex-end;
  align-items: stretch;
  padding-top: 0;
}

@media (max-height: 500px) {
  .saas-login-wrap {
    justify-content: flex-end;
    padding-top: 0;
  }
}

.saas-login-alt {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.saas-link-quiet {
  min-height: 44px;
  padding: 4px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-ink-3, rgba(245, 247, 251, 0.62));
  font: 500 13px/1.2 var(--ui-font);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.saas-link-quiet:hover,
.saas-link-quiet:focus-visible {
  color: var(--ui-ink-2, rgba(245, 247, 251, 0.88));
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.saas-login-card {
  position: fixed;
  z-index: 60;
  left: 50%;
  right: auto;
  bottom: 0;
  width: min(620px, 100%);
  transform: translateX(-50%);
  max-height: min(92dvh, calc(100% - 28px));
  overflow: auto;
  background: var(--ui-sheet, rgb(8, 11, 19));
  border: 1px solid var(--ui-sheet-edge, rgba(255, 255, 255, 0.17));
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 8px 18px max(12px, env(safe-area-inset-bottom));
  box-shadow: inset 0 1px 0 rgba(59, 109, 194, 0.55), 0 -36px 100px -30px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ui-ink, #f5f7fb);
}
.saas-login-card[hidden] { display: none !important; }
.saas-login-wrap.kb-open .saas-login-card {
  bottom: var(--login-kb, 0px);
  max-height: calc(100dvh - var(--login-kb, 0px) - 8px);
}
@media (min-width: 900px) {
  .saas-login-card {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: auto;
    width: 440px;
    transform: none;
    max-height: calc(100% - 32px);
    border-bottom: 1px solid var(--ui-sheet-edge, rgba(255, 255, 255, 0.17));
    border-radius: 28px;
  }
}
.saas-login-card .ui-title {
  margin: 4px 0 8px;
  font: 650 22px/1.15 var(--ui-font);
  letter-spacing: -0.02em;
  text-align: left;
}
.saas-login-card .ui-foot { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--ui-sheet, rgb(8, 11, 19)) 16px); }
.saas-login-card .ui-go { background: rgb(var(--ui-accent-rgb, 59, 109, 194)); }
/* the prototype's lit sheet in the accent blue, and its foot on the same 18 px edge as the field */
.saas-login-card {
  --c-rgb: var(--ui-accent-rgb, 59, 109, 194);
  background:
    radial-gradient(70% 30% at 50% -6%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(120% 50% at 6% -8%, rgba(var(--c-rgb), 0.3), transparent 66%),
    radial-gradient(70% 34% at 100% 0%, rgba(var(--c-rgb), 0.14), transparent 72%),
    radial-gradient(140% 42% at 72% 112%, rgba(var(--c-rgb), 0.12), transparent 72%),
    linear-gradient(rgba(var(--c-rgb), 0.04), rgba(var(--c-rgb), 0.04)),
    var(--ui-sheet, rgb(8, 11, 19));
}
.saas-login-card .ui-foot { padding-left: 0; padding-right: 0; background: none; }

.saas-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saas-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.saas-brand-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.saas-brand-title strong {
  font: 650 17px/1.2 var(--ui-font);
  letter-spacing: -0.02em;
  color: var(--ui-ink);
}

.saas-brand-title span {
  font: 500 12.5px/1.3 var(--ui-font);
  color: var(--ui-ink-3);
}

.saas-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.saas-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saas-field label {
  font: 600 12px/1.2 var(--ui-font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
}

.saas-login-card .saas-field label {
  font: 550 13.5px/1.25 var(--ui-font);
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ui-ink-2);
}

.saas-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 0;
  background: var(--ui-well, rgba(0, 0, 0, 0.24));
  box-shadow: inset 0 0 0 1px var(--ui-well-edge, rgba(255, 255, 255, 0.1));
  color: var(--ui-ink);
  font: 500 15.5px/1.2 var(--ui-font);
  transition: box-shadow 200ms var(--ui-ease, ease), background 200ms;
}

.saas-field input:focus {
  background: rgba(59, 109, 194, 0.08);
  box-shadow: inset 0 0 0 1.5px var(--ui-accent, #3b6dc2), 0 0 0 4px rgba(59, 109, 194, 0.16);
}

.saas-btn-primary {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  background: var(--ui-go, #3b6dc2);
  color: var(--ui-on-accent, #ffffff);
  font: 650 15px/1 var(--ui-font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms var(--ui-ease, ease), opacity 180ms;
}

.saas-btn-primary:active {
  transform: scale(0.98);
}

.saas-btn-primary[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.saas-btn-ghost {
  min-height: var(--ui-tap, 44px);
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ui-glass, rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px var(--ui-edge, rgba(255, 255, 255, 0.15));
  color: var(--ui-ink-2);
  font: 600 13.5px/1 var(--ui-font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.saas-error {
  min-height: 18px;
  font: 500 13.5px/1.4 var(--ui-font);
  color: var(--ui-bad, #e58f8f);
}

.saas-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(8, 11, 19, 0.78);
  border: 1px solid var(--ui-sheet-edge, rgba(255, 255, 255, 0.17));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.saas-topbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.saas-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saas-tab {
  min-height: var(--ui-tap, 44px);
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font: 600 14px/1 var(--ui-font);
  color: var(--ui-ink-2);
  background: var(--ui-glass, rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px var(--ui-edge, rgba(255, 255, 255, 0.15));
  transition: transform 160ms var(--ui-ease, ease), background 180ms, color 180ms;
}

.saas-tab.active {
  color: #ffffff;
  background: rgba(59, 109, 194, 0.42);
  box-shadow: inset 0 0 0 1px rgba(153, 191, 254, 0.55);
}

.saas-card {
  background: var(--ui-sheet, rgb(8, 11, 19));
  border: 1px solid var(--ui-sheet-edge, rgba(255, 255, 255, 0.17));
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saas-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.saas-card-head h2 {
  font: 650 20px/1.25 var(--ui-font);
  letter-spacing: -0.02em;
  color: var(--ui-ink);
  margin-top: 3px;
}

.saas-eyebrow {
  font: 600 11px/1.2 var(--ui-font);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ui-gold, #c1b892);
}

.saas-copy {
  font: 450 14.5px/1.55 var(--ui-font);
  color: var(--ui-ink-2);
}

.saas-copy code,
.saas-meta-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ui-accent-ink, #99bffe);
}

.saas-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font: 600 12px/1 var(--ui-font);
  color: var(--ui-ink-2);
  background: var(--ui-glass, rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px var(--ui-edge, rgba(255, 255, 255, 0.15));
}

.saas-pill.ok {
  color: var(--ui-ok, #5fd3b5);
  box-shadow: inset 0 0 0 1px rgba(95, 211, 181, 0.35);
}

.saas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.saas-lane-card {
  background: rgba(8, 11, 19, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 180ms ease, transform 160ms var(--ui-ease, ease);
}

.saas-lane-card:hover {
  border-color: rgba(153, 191, 254, 0.45);
}

.saas-lane-card strong {
  font: 650 16px/1.25 var(--ui-font);
  color: var(--ui-ink);
}

.saas-lane-card p {
  font: 450 13.5px/1.45 var(--ui-font);
  color: var(--ui-ink-3);
}

.saas-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font: 500 12px/1.4 var(--ui-font);
  color: var(--ui-ink-3);
}


/* === Shared CARE 6-Screen Sprint Kit (Redmi Pad 2 800x1280 & 1280x800 + Mobile 360-412px) === */

.saas-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.saas-metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-metric-label {
  font: 600 11px/1.2 var(--ui-font);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
}

.saas-metric-value {
  font: 700 24px/1.15 var(--ui-font);
  letter-spacing: -0.025em;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}

.saas-metric-sub {
  font: 500 12px/1.3 var(--ui-font);
  color: var(--ui-ink-3);
}

.saas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.saas-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.saas-input,
.saas-select,
.saas-textarea {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ui-ink);
  font: 500 14.5px/1.3 var(--ui-font);
}

.saas-textarea {
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
}

.saas-input:focus,
.saas-select:focus,
.saas-textarea:focus {
  outline: none;
  border-color: var(--ui-accent, #3b6dc2);
  box-shadow: 0 0 0 3px rgba(59, 109, 194, 0.2);
}

.saas-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .saas-two-col {
    grid-template-columns: 1fr;
  }
}

.saas-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(4, 7, 14, 0.55);
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  font: 450 13.8px/1.4 var(--ui-font);
  font-variant-numeric: tabular-nums;
}

.saas-table th {
  text-align: left;
  padding: 12px 14px;
  font: 600 11px/1.2 var(--ui-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.saas-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ui-ink-2);
  vertical-align: middle;
}

.saas-table tr:last-child td {
  border-bottom: 0;
}

.saas-table tr:hover td {
  background: rgba(59, 109, 194, 0.08);
}

.saas-pill.warn {
  color: #f3c969;
  box-shadow: inset 0 0 0 1px rgba(243, 201, 105, 0.38);
}

.saas-pill.bad {
  color: var(--ui-bad, #e58f8f);
  box-shadow: inset 0 0 0 1px rgba(229, 143, 143, 0.38);
}

.saas-pill.info {
  color: #99bffe;
  box-shadow: inset 0 0 0 1px rgba(153, 191, 254, 0.38);
}

.saas-sig-box {
  border-radius: 18px;
  border: 1.5px dashed rgba(153, 191, 254, 0.42);
  background: rgba(255, 255, 255, 0.96);
  padding: 8px;
  touch-action: none;
  user-select: none;
}

.saas-sig-canvas {
  display: block;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.saas-banner {
  padding: 14px 16px;
  border-radius: 16px;
  font: 500 14px/1.45 var(--ui-font);
  border: 1px solid rgba(95, 211, 181, 0.35);
  background: rgba(95, 211, 181, 0.1);
  color: #dffaf2;
}

.saas-banner.warn {
  border-color: rgba(243, 201, 105, 0.38);
  background: rgba(243, 201, 105, 0.11);
  color: #fdecc8;
}

.saas-banner.error {
  border-color: rgba(229, 143, 143, 0.4);
  background: rgba(229, 143, 143, 0.12);
  color: #ffdada;
}

.saas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-row-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* seat 2 Nov: 686 layout */
[hidden] { display: none !important; }

/* top actions, every width: Check in is the one filled button; the other three are glass outline */
.pkg-screen .pkg-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pkg-screen .pkg-head-actions > a,
.pkg-screen .pkg-head-actions > button { flex: none; min-height: 48px; height: 48px; padding: 0 22px; border-radius: 999px; font: 600 14.5px/1 var(--ui-font); white-space: nowrap; border: 0; box-sizing: border-box; justify-content: center; }
.pkg-screen .pkg-head-actions #pkg-open-checkin-link { background: var(--ui-go); color: var(--ui-on-accent); box-shadow: none; font-weight: 650; }
.pkg-screen .pkg-head-actions #pkg-open-sell-btn,
.pkg-screen .pkg-head-actions #pkg-open-client-link,
.pkg-screen .pkg-head-actions #pkg-owner-review-link { background: var(--ui-glass); box-shadow: inset 0 0 0 1px var(--ui-edge); color: var(--ui-ink-2); }

/* figure tiles, every width: four counts in one row, number first then its label; the money tile and the sub lines are hidden */
.pkg-screen .saas-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pkg-screen .saas-metric { padding: 12px 16px; gap: 2px; border-radius: 16px; min-width: 0; }
.pkg-screen .saas-metric:has([data-kpi="total-revenue"]) { display: none; }
.pkg-screen .saas-metric-value { order: 1; font-size: 28px; line-height: 1.1; }
.pkg-screen .saas-metric-label { order: 2; font: 500 13px/1.25 var(--ui-font); letter-spacing: 0; text-transform: none; color: var(--ui-ink-3); }
.pkg-screen .saas-metric-sub { display: none; }

/* money never wraps: the currency sign never sits alone on a line */
.pkg-screen .pkg-money,
.pkg-screen .saas-metric-value,
.pkg-screen td[data-label="Paid"] { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* carry-over banner, every width: two short lines per claim, one outlined Renew button */
.pkg-screen .pkg-rollover-card { flex-wrap: nowrap; align-items: center; gap: 12px; padding: 12px 16px; }
.pkg-screen .pkg-rollover-info { flex: 1 1 0; min-width: 0; gap: 0; }
.pkg-screen .pkg-rollover-title { flex-wrap: nowrap; align-items: center; gap: 0 8px; min-width: 0; font-size: 15px; }
.pkg-screen .pkg-rollover-title .pkg-client-link { display: block; flex: 0 1 auto; min-width: 0; min-height: 0; padding: 13px 0; margin: -13px 0; line-height: 1.2; border-bottom: 0; text-decoration: underline dashed rgba(153, 191, 254, 0.45); text-underline-offset: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.pkg-screen .pkg-rollover-title .pkg-muted { flex: 0 8 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@media (max-width: 720px) {
  .pkg-screen .pkg-rollover-title { flex-wrap: wrap; }
  .pkg-screen .pkg-rollover-title .pkg-client-link,
  .pkg-screen .pkg-rollover-title .pkg-muted {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
.pkg-screen .pkg-rollover-pills { display: block; font: 500 13px/1.3 var(--ui-font); color: var(--ui-ink-3); }
.pkg-screen .pkg-rollover-pills > span { white-space: nowrap; }
.pkg-screen .pkg-rollover-cta { flex: none; }
/* one filled button per screen: Renew is an outline in the banner and in the rows */
.pkg-screen .pkg-renew-btn,
.pkg-screen .pkg-row-renew { flex: none; min-height: 44px; height: 44px; padding: 0 18px; border-radius: 999px; background: transparent; border: 1px solid var(--ui-go); box-shadow: none; box-sizing: border-box; color: var(--ui-ink); font: 600 13.5px/1 var(--ui-font); white-space: nowrap; }
/* more than two claims: the header is a native summary, the claims sit behind it, closed */
.pkg-screen .pkg-rollover-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; }
.pkg-screen .pkg-rollover-summary::-webkit-details-marker { display: none; }
.pkg-screen .pkg-rollover-summary h3 { margin: 0; min-width: 0; }
.pkg-screen .pkg-rollover-toggle { flex: none; font: 500 13px/1 var(--ui-font); color: var(--ui-ink-3); }
.pkg-screen .pkg-rollover-t-hide,
.pkg-screen .pkg-rollover-fold[open] .pkg-rollover-t-show { display: none; }
.pkg-screen .pkg-rollover-fold[open] .pkg-rollover-t-hide { display: inline; }
.pkg-screen .pkg-rollover-section:has(> .pkg-rollover-fold) { padding-block: 8px; }
.pkg-screen .pkg-rollover-fold[open] > .saas-list { margin: 8px 0 10px; }

/* package rows, every width: three-line cards (the seven-column table wraps names, money, dates and buttons even at 1098) */
.pkg-screen .pkg-ledger-wrap { border: 0; background: transparent; overflow-x: visible; }
.pkg-screen .pkg-ledger-table,
.pkg-screen .pkg-ledger-table tbody { display: block; width: 100%; }
.pkg-screen .pkg-ledger-table thead { display: none; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] { border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(8, 11, 19, 0.78); box-sizing: border-box; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row]:hover td { background: transparent; }
/* package rows: three-line cards */
.pkg-screen .pkg-ledger-table tr[data-pkg-row] {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
  grid-template-areas: "client client status" "pkg sess paid" "dates dates act";
  margin: 0 0 10px; padding: 14px 16px; border-radius: 16px;
}
.pkg-screen .pkg-ledger-table tr[data-pkg-row][data-has-rollover="true"] { grid-template-areas: "client client status" "pkg sess paid" "dates dates dates" "act act act"; row-gap: 4px; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td { display: block; padding: 0; border: 0; min-width: 0; }
.pkg-screen .pkg-ledger-table td::before { content: none; display: none; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(1) { grid-area: client; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(2) { grid-area: pkg; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(3) { grid-area: sess; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(4) { grid-area: status; justify-self: end; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(5) { grid-area: paid; justify-self: end; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(6) { grid-area: dates; }
.pkg-screen .pkg-ledger-table tr[data-pkg-row] > td:nth-child(7) { grid-area: act; justify-self: end; }

/* line 1 */
.pkg-screen .pkg-client-cell { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.pkg-screen .pkg-client-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; line-height: 1.2; border-bottom: 0; text-decoration: underline dashed rgba(153, 191, 254, 0.45); text-underline-offset: 4px; }
.pkg-screen .pkg-duet-line { margin-top: 0; gap: 6px; flex-wrap: nowrap; }
.pkg-screen .pkg-partner-link { font-size: 13px; min-height: 44px; }
.pkg-screen .pkg-status-cell { justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
.pkg-screen .pkg-status-cell > .saas-pill.ok { display: none; }
.pkg-screen .pkg-status-cell .saas-pill { min-height: 26px; font-size: 12px; white-space: nowrap; }

/* line 2 */
.pkg-screen .pkg-name-cell { gap: 2px; }
.pkg-screen .pkg-title { font-size: 14px; line-height: 1.25; }
.pkg-screen .pkg-sessions-cell { flex-direction: row; align-items: center; gap: 8px; }
.pkg-screen .pkg-sessions-top { flex: none; }
.pkg-screen .pkg-sessions-top .pkg-muted { display: none; }
.pkg-screen .pkg-sessions-top strong { font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pkg-screen .pkg-progress { width: 140px; min-width: 140px; max-width: 160px; }
.pkg-screen .pkg-money { color: var(--ui-ink-3); font-weight: 500; font-size: 13px; }

/* line 3 */
.pkg-screen .pkg-dates-cell { flex-direction: row; flex-wrap: wrap; gap: 0 12px; font-size: 12.5px; color: var(--ui-ink-3); white-space: normal; }
.pkg-screen .pkg-actions-cell { flex-wrap: nowrap; justify-content: flex-end; gap: 8px; width: auto; }
.pkg-screen .pkg-row-btn { flex: none; min-height: 44px; height: 44px; padding: 0 18px; border-radius: 999px; font: 600 13.5px/1 var(--ui-font); }
.pkg-screen .pkg-actions-cell a.pkg-row-btn[data-inline-checkin] { background: transparent; border: 1px solid var(--ui-go); box-shadow: none; font-weight: 650; }

@media (max-width: 760px) {
  /* top actions: one row of four, equal */
  .pkg-screen .pkg-head-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .pkg-screen .pkg-head-actions > a,
  .pkg-screen .pkg-head-actions > button { padding: 0 6px; font-size: 13.5px; }

  /* figure tiles */
  .pkg-screen .saas-metrics { gap: 8px; }
  .pkg-screen .saas-metric { padding: 10px 8px 10px 12px; }
  .pkg-screen .saas-metric-label { font-size: 12px; }

  /* a single client's check-in form gives the note the whole row */
  #pkg-checkin-duet-wrap[hidden] + .pkg-field { grid-column: 1 / -1; }
}

/* CARE tablet: the studio device fills the screen; the saas chrome stays in the markup and stays out of the way */
html.saas-scroll:has(.pkg-device),
html.saas-scroll:has(.pkg-device) body {
  overflow: hidden !important;
  height: 100%;
  background: #04070c;
}
.saas-shell:has(.pkg-device) {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  min-height: 0;
}
.saas-shell:has(.pkg-device) > .saas-nav,
.saas-shell:has(.pkg-device) > .saas-foot,
.saas-shell:has(.pkg-device) .saas-brand,
.saas-shell:has(.pkg-device) #beri-sync-pill { display: none !important; }
.saas-shell:has(.pkg-device) > .saas-topbar {
  position: fixed;
  z-index: 50;
  top: max(10px, env(safe-area-inset-top));
  right: 14px;
  left: auto;
  width: auto;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.saas-shell:has(.pkg-device) #logout-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font: 600 13px/1 var(--ui-font);
}

/* The dock is the prototype bar, not a four-column grid. Sign out stays in the DOM and lives in the studio menu. */
.pkg-screen .dock.pkg-head-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  width: auto;
  max-width: 30rem;
  height: 58px;
  padding: 4px;
}
.pkg-screen .dock.pkg-head-actions > a.d-add,
.pkg-screen .dock.pkg-head-actions > button.d-add {
  flex: none;
  width: auto;
  max-width: 72px;
  height: 50px;
  min-height: 50px;
  padding: 0 14px;
  font-size: 0;
}
.pkg-screen .dock.pkg-head-actions .d-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
}
.pkg-screen .dock.pkg-head-actions .d-search input {
  width: 100%;
  min-width: 8em;
  font-size: 16px;
}
.saas-shell:has(.pkg-device) > .saas-topbar {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
