/* Shared staff layout and controls. The Life First palette is defined in branding.css. */
body.st {
  --st-canvas: #f1f8fc;
  --st-line: #cfe4f8;
  --st-highlight: #e3f3fc;
  --st-control-height: 2.25rem;
  margin: 0;
  background: var(--st-canvas);
  color: var(--lf-body);
  font: .875rem/1.43 var(--lf-sans);
}

.st-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  border-top: .375rem solid var(--lf-top-rule);
  box-sizing: border-box;
}

.st-sidebar {
  padding: 1rem .75rem 1.5rem;
  border-right: 1px solid var(--st-line);
  background: var(--lf-card);
}
.st-brand { display: flex; align-items: center; width: fit-content; }
.st-brand img { display: block; height: 2.375rem; object-fit: contain; }
.st-brand-bgt { width: 2.5rem; }
.st-brand .st-brand-life-first { width: 7.5rem; object-fit: cover; border-left: 1px solid var(--lf-divider); }
.st-main :where(p) { margin: .5rem 0; }
.st-eyebrow {
  color: var(--lf-link);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}
.st-home { display: inline-block; margin: .75rem .5rem .5rem; text-decoration: none; }
.st-home:hover, .st-home[aria-current] { text-decoration: underline; text-underline-offset: .25em; }
.st-nav-group { margin: .75rem 0; }
.st-nav-label { margin: 0 .5rem .25rem; color: var(--lf-muted); font-size: .75rem; font-weight: 700; }
.st-nav-group ul { display: grid; gap: .125rem; margin: 0; padding: 0; list-style: none; }
.st-nav-group a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2rem;
  box-sizing: border-box;
  padding: .375rem .5rem;
  border-radius: .375rem;
  color: var(--lf-question);
  text-decoration: none;
}
.st-nav-group a::before { content: ""; width: .48rem; height: .48rem; flex: none; border: 2px solid var(--lf-ring-4); border-radius: 50%; }
.st-nav-group a:hover, .st-nav-group a[aria-current] { background: var(--st-highlight); }
.st-nav-group a[aria-current] { color: var(--lf-heading); font-weight: 700; }
.st-nav-group a[aria-current]::before { border-color: var(--lf-heading); background: var(--lf-heading); }
.st-session { margin-top: 1rem; padding: .5rem .5rem 0; border-top: 1px solid var(--st-line); }

.st-main { min-width: 0; padding: 1rem clamp(1rem, 2vw, 1.5rem) 2rem; }
.st-page-heading { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.st-page-heading > :first-child { min-width: 0; }
.st-page-actions:empty { display: none; }
.st h1 { color: var(--lf-heading); font: 400 clamp(1.75rem, 2.5vw, 2rem)/1.15 var(--lf-serif); margin: 0; overflow-wrap: anywhere; }
.st h2 { color: var(--lf-heading); font-size: 1rem; line-height: 1.375; margin: 1rem 0 .5rem; }
.st a { color: var(--lf-link); text-underline-offset: .14em; }
.st :is(button, a, input, select, textarea, .st-table-scroll):focus-visible { outline: 3px solid var(--lf-focus); outline-offset: 2px; }
.st-skip { position: absolute; z-index: 1; inset: .75rem auto auto .75rem; background: white; padding: .5rem .75rem; transform: translateY(-180%); }
.st-skip:focus { transform: none; }

.st-card, .st-metric, .st-table-scroll {
  min-width: 0;
  background: var(--lf-card);
  border: 1px solid var(--st-line);
  border-radius: .5rem;
}
.st-card { padding: .75rem; margin: .5rem 0; }
.st-panel { padding: .75rem 1rem; margin: .75rem 0; }
.st-card > :where(h2):first-child { margin-top: 0; }
.st-panel > :first-child { margin-top: 0; }
.st-panel > :last-child { margin-bottom: 0; }
.st-row, .st-actions, .st-status { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.st-status { gap: .25rem; align-items: center; }
.st-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) repeat(2, minmax(7rem, 1fr)) auto auto;
  gap: .5rem .75rem;
  align-items: end;
  padding: .75rem;
  margin: .75rem 0;
}
.st-subscriber-filters { grid-template-columns: minmax(10rem, 1.55fr) repeat(3, minmax(7rem, 1fr)) auto; }
.st label { font-size: .8125rem; color: var(--lf-question); }
.st-field { display: grid; min-width: 0; gap: .25rem; font-weight: 700; }
.st-panel .st-field { margin-bottom: .5rem; }
.st-panel .st-form-grid > .st-field { margin-bottom: 0; }
.st-field > :is(input, select, textarea) { width: 100%; min-width: 0; }
.st-lookup { position: relative; }
.st-lookup > input { padding-right: 1.625rem; }
.st-lookup-arrow { position: absolute; bottom: .425rem; right: .625rem; pointer-events: none; color: var(--lf-muted); }
.st-lookup-options {
  position: absolute;
  z-index: 2;
  inset: 100% 0 auto;
  box-sizing: border-box;
  max-height: 14rem;
  overflow: auto;
  margin: .125rem 0 0;
  padding: .25rem;
  list-style: none;
  border: 1px solid var(--lf-field-border);
  border-radius: .375rem;
  background: white;
  color: var(--lf-body);
  font-size: .875rem;
  font-weight: 400;
}
.st-lookup-options li { padding: .375rem .5rem; }
.st-lookup-options [role="option"] { cursor: pointer; }
.st-lookup-options [role="option"]:hover,
.st-lookup-options .st-lookup-active { background: var(--st-highlight); color: var(--lf-heading); }
.st-lookup-options [aria-selected="true"] { font-weight: 700; }
.st-check { display: flex; align-items: center; gap: .375rem; min-height: var(--st-control-height); }
.st :is(input, select, textarea) {
  font: .875rem/1.43 var(--lf-sans);
  font-weight: 400;
  box-sizing: border-box;
  color: var(--lf-body);
  background: white;
  border: 1px solid var(--lf-field-border);
  border-radius: .375rem;
  padding: .375rem .5rem;
  min-height: var(--st-control-height);
}
.st input[type="checkbox"] { margin: 0; min-height: 0; accent-color: var(--lf-selected-fill); }
.st textarea { width: 100%; min-height: 6rem; }
.st button, .st a.st-button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  min-height: var(--st-control-height);
  box-sizing: border-box;
  padding: .375rem .75rem;
  border-radius: .375rem;
  border: 1px solid var(--lf-selected-fill);
  background: var(--lf-selected-fill);
  color: white;
  text-decoration: none;
  cursor: pointer;
}
.st button.secondary, .st a.st-button--secondary { background: white; color: var(--lf-selected-fill); border-width: 2px; }
.st button:hover:not(:disabled), .st a.st-button:hover { background: var(--lf-heading); }
.st button.secondary:hover:not(:disabled), .st a.st-button--secondary:hover { background: var(--st-highlight); }
.st button:disabled { opacity: .6; cursor: wait; }
.st [hidden] { display: none; }
.st button.st-text-button { min-height: 1.5rem; border: 0; background: transparent; padding: .125rem 0; color: var(--lf-link); font-weight: 400; text-decoration: underline; }
.st button.st-text-button:hover:not(:disabled) { background: transparent; color: var(--lf-heading); }

.st-metrics { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr)); }
.st-metric { padding: .5rem .75rem; display: grid; align-content: start; gap: .125rem; color: var(--lf-muted); font-size: .8125rem; }
.st-metric strong { color: var(--lf-heading); font-size: 1.5rem; line-height: 1.15; }
.st-metric--featured { background: var(--lf-heading); color: white; border-color: var(--lf-heading); }
.st-metric--featured strong { color: inherit; }

.st-table-scroll { overflow-x: auto; }
.st-panel > .st-table-scroll, .st-panel > .st-table-scroll:first-child { margin: .25rem 0; }
.st table { min-width: 35rem; width: 100%; border-collapse: collapse; }
.st th, .st td { text-align: left; vertical-align: top; padding: .5rem .75rem; border-bottom: 1px solid var(--st-line); overflow-wrap: anywhere; }
.st th { color: var(--lf-muted); font-size: .875rem; }
.st th button.st-sort-heading {
  display: inline-flex;
  align-items: baseline;
  gap: .375rem;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.st th button.st-sort-heading:hover:not(:disabled) { background: transparent; color: var(--lf-heading); text-decoration: underline; }
.st-sort-heading span { font-size: .7em; }
.st tbody tr:last-child td { border-bottom: 0; }
.st td:first-child a { font-weight: 700; }
.st td .st-msg { margin: 0; }
.st-badge { display: inline-block; padding: .0625rem .375rem; border-radius: 99px; background: var(--st-highlight); color: var(--lf-heading); font-size: .75rem; font-weight: 700; }
.st-badge--strong { background: var(--lf-heading); color: white; }
.st-badge--muted { background: #edf0f2; color: var(--lf-muted); }
.st-badge--outline { box-shadow: inset 0 0 0 1px var(--lf-field-border); background: white; color: var(--lf-question); }
.st-more { margin-top: .5rem; }
.st-warn, .st-error { color: var(--lf-error); }
.st-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0; }
.st-in { border-left: 4px solid var(--lf-ring-5); }
.st-out { border-left: 4px solid var(--lf-top-rule); background: #f9f8ff; }
.st-muted { color: var(--lf-muted); font-size: .8125rem; }
.st-ticket-form { display: grid; gap: .75rem; padding: clamp(.75rem, 2vw, 1rem); margin-block: .75rem; }
.st-ticket-form > :is(h2, p, .st-msg) { margin: 0; }
.st-ticket-form > [role="status"]:empty { display: none; }
.st-ticket-form .st-row { gap: .75rem; }
.st-ticket-form .st-row > .st-field { flex: 1 1 9rem; }
.st-ticket-form .st-check { align-items: baseline; min-height: auto; }
.st-ticket-form .st-check input { flex: none; }
.st-ticket-form #n-text { min-height: 4rem; }
.st-ticket-activity { padding-inline-start: 1.25rem; overflow-wrap: anywhere; }
.st-ticket-activity li + li { margin-top: .375rem; }
.st-error, .st-ok { margin: .5rem 0; }
.st-ok { color: #11663a; }
.st-dashboard, .st-form-grid { display: grid; gap: .5rem .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-dashboard .st-panel { margin: 0; }
.st-notice:empty { display: none; }
.st-notice { margin-top: .5rem; }
.st-email-preview { display: block; width: 100%; min-height: 36rem; border: 1px solid var(--lf-divider); background: white; }

.st-workflow { padding: .75rem 1rem; margin-bottom: .75rem; background: var(--st-highlight); border-radius: .5rem; }
.st-workflow h2 { margin: 0 0 .5rem; }
.st-workflow ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .5rem .75rem; margin: 0; padding-left: 1.5rem; }
.st-workflow li { padding-left: .25rem; }
.st-workflow li::marker, .st-workflow strong { color: var(--lf-heading); font-weight: 700; }
.st-workflow strong, .st-workflow li span { display: block; }

.st-feedback-summary { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.6fr); gap: .5rem; }
.st-feedback-metrics { display: grid; gap: .5rem; }
.st-chart { display: flex; flex-direction: column; margin: 0; }
.st-chart-bars { flex: 1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(.2rem, 1vw, .6rem); margin: 1.25rem 0 0; padding: 0; list-style: none; }
.st-chart-bars li { display: grid; grid-template-rows: minmax(6rem, 1fr) auto; gap: .25rem; text-align: center; color: var(--lf-question); font-size: .75rem; font-weight: 700; }
.st-chart-track { position: relative; }
.st-chart-fill { position: absolute; inset: auto 0 0; border-radius: .25rem .25rem 0 0; height: max(2px, var(--st-bar)); background: var(--st-rating); }
.st-chart-count { position: absolute; inset: auto 0 calc(var(--st-bar) + .2rem); color: var(--lf-muted); font-weight: 400; }
.st-rating { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 2px solid var(--st-rating); border-radius: 50%; color: var(--lf-heading); font-weight: 700; }
.st-feedback-actions { display: grid; justify-items: start; min-width: 6.5rem; }
.st-feedback-actions .st-notice { margin: .25rem 0 0; color: var(--lf-error); }
.st-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1000px) {
  .st-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .st-wrap { grid-template-columns: minmax(0, 1fr); }
  .st-sidebar { border-right: 0; border-bottom: 1px solid var(--st-line); padding: .65rem 1rem; }
  .st-sidebar nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
  .st-nav-group { margin: .25rem 0; }
  .st-nav-group ul { display: flex; flex-wrap: wrap; }
  .st-nav-group a { padding: .45rem .55rem; }
  .st-home { margin: .25rem .5rem .5rem; }
  .st-session { margin-top: .45rem; padding-top: .3rem; }
}
@media (max-width: 540px) {
  .st-dashboard, .st-form-grid, .st-feedback-summary, .st-filters { grid-template-columns: minmax(0, 1fr); }
  .st-feedback-metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
  .st-page-actions { width: 100%; }
  .st-page-actions > .st-field { width: 100%; }
  .st-panel { padding: .75rem; }
}
@media (pointer: coarse) {
  body.st { --st-control-height: 2.75rem; }
  .st-nav-group a, .st button.st-text-button { min-height: var(--st-control-height); }
  .st :is(input, select, textarea) { font-size: 1rem; }
}
