:root {
  --bg: #f3f4fa;
  --panel: #ffffff;
  --panel-2: #f7f8fc;
  --ink: #161b2e;
  --muted: #636b85;
  --line: #e2e5ef;
  --accent: #4f63d2;
  --accent-ink: #ffffff;
  --accent-soft: #e8ebfb;
  --danger: #d14343;
  --danger-soft: #fbe9e9;
  --ok: #2e9e5b;
  --warn: #d98c1f;
  --warn-soft: #fcf1df;
  --shadow: 0 2px 12px rgba(22, 27, 46, 0.06);
  --radius: 16px;
  --radius-sm: 11px;
  --tabbar: 62px;
  --topbar: 52px;
  --font:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Inter,
    Roboto,
    system-ui,
    sans-serif;
  --mono:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html:not([data-effective-theme=light]) {
    --bg: #0f1424;
    --panel: #171d33;
    --panel-2: #1c2340;
    --ink: #eef0f7;
    --muted: #9aa2bf;
    --line: #283152;
    --accent: #8290f0;
    --accent-ink: #0f1424;
    --accent-soft: #242c4d;
    --danger: #f07878;
    --danger-soft: #3a2230;
    --ok: #5ec98a;
    --warn: #f0b35a;
    --warn-soft: #3a2f1c;
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
html[data-effective-theme=dark] {
  --bg: #0f1424;
  --panel: #171d33;
  --panel-2: #1c2340;
  --ink: #eef0f7;
  --muted: #9aa2bf;
  --line: #283152;
  --accent: #8290f0;
  --accent-ink: #0f1424;
  --accent-soft: #242c4d;
  --danger: #f07878;
  --danger-soft: #3a2230;
  --ok: #5ec98a;
  --warn: #f0b35a;
  --warn-soft: #3a2f1c;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}
p {
  margin: 0 0 10px;
}
code {
  font-family: var(--mono);
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.desktop-only {
  display: none;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-ink);
}
.brand-mark svg .star {
  fill: var(--accent-ink);
}
.brand-login {
  justify-content: center;
  margin-bottom: 18px;
}
.brand-small .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  background: var(--panel);
  color: var(--ink);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.secondary {
  background: var(--panel);
  border-color: var(--line);
}
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}
.btn.wide {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
}
.link-btn.danger {
  color: var(--danger);
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.login-card h1 {
  font-size: 24px;
  margin-bottom: 6px;
}
.login-card h2 {
  font-size: 19px;
  margin-bottom: 6px;
}
.auth-form {
  margin-top: 16px;
}
.auth-form label {
  display: block;
  margin-bottom: 12px;
}
.auth-form label span,
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
.auth-form .btn {
  margin-top: 6px;
}
.auth-form .link-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.auth-status {
  color: var(--ok);
  font-size: 14px;
  margin: 12px 0 0;
}
.auth-error {
  color: var(--danger);
  font-size: 14px;
  margin: 10px 0 0;
  white-space: pre-line;
}
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=time],
input[type=date],
input[type=search],
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
textarea {
  resize: vertical;
  line-height: 1.4;
}
input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.field {
  display: block;
  margin-bottom: 12px;
}
.field:last-child {
  margin-bottom: 0;
}
.unit-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.unit-input input {
  width: 130px;
  flex: none;
}
.unit-input em {
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.inline-form .field {
  flex: 1;
  margin: 0;
}
.stack-form .btn {
  margin-top: 4px;
}
.pdf-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.pdf-form .btn {
  grid-column: 1 / -1;
}
.app-shell {
  min-height: 100vh;
}
.main-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 20px);
}
.top-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topbar) + env(safe-area-inset-top));
  background: var(--bg);
  margin: 0 -16px 8px;
  padding-left: 16px;
  padding-right: 16px;
}
.page-title {
  font-size: 19px;
  flex: 1;
}
#themeToggle .icon {
  display: none;
}
html[data-theme=light] #themeToggle .icon-theme-light {
  display: block;
}
html[data-theme=dark] #themeToggle .icon-theme-dark {
  display: block;
}
html[data-theme=auto] #themeToggle .icon-theme-auto,
html:not([data-theme]) #themeToggle .icon-theme-auto {
  display: block;
}
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 0;
}
.tab.active {
  color: var(--accent);
}
.tab .icon {
  width: 24px;
  height: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel h2.later {
  margin-top: 18px;
}
.panel h3 {
  font-size: 14px;
  margin: 16px 0 6px;
}
.panel h3:first-child {
  margin-top: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-head h2 {
  margin: 0;
}
.num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.panel .btn + .btn {
  margin-top: 8px;
}
.panel .btn.secondary {
  width: 100%;
}
.panel .inline-form .btn,
.panel .pdf-form .btn,
.panel .stack-form .btn {
  width: auto;
}
.panel .pdf-form .btn {
  width: 100%;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--warn-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 6px 0 12px;
  font-size: 14px;
}
.notice strong {
  display: block;
}
.notice span {
  color: var(--muted);
  font-size: 13px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px);
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 20;
  max-width: calc(100% - 32px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.day-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}
.day-pick {
  flex: 1;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  text-align: center;
  min-height: 54px;
}
.day-pick strong {
  display: block;
  font-size: 17px;
}
.day-pick small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.day-pick input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  min-height: 0;
  padding: 0;
  border: 0;
}
.day-status {
  text-align: center;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.day-status.ok {
  color: var(--ok);
}
.rating {
  margin: 14px 0 4px;
}
.rating-head strong {
  display: block;
  font-size: 14px;
}
.rating-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.rating-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.rating-scale label {
  position: relative;
  display: block;
}
.rating-scale input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.rating-scale span {
  display: block;
  height: 46px;
  line-height: 44px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-weight: 600;
  font-size: 17px;
  background: var(--panel-2);
}
.rating-scale input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.rating-scale input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.metric strong {
  display: block;
  font-size: 18px;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.form-actions {
  margin: 6px 0 20px;
  text-align: center;
}
.save-status {
  font-size: 13px;
  min-height: 18px;
  margin: 8px 0 0;
  white-space: pre-line;
}
.save-status.ok {
  color: var(--ok);
}
.save-status.error {
  color: var(--danger);
}
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
}
.month-nav strong {
  font-size: 17px;
  text-transform: capitalize;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.cal-day {
  position: relative;
  aspect-ratio: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: var(--panel-2);
  font-size: 14px;
  padding: 0;
  color: var(--ink);
}
.cal-day.outside {
  visibility: hidden;
}
.cal-day.future {
  opacity: .35;
}
.cal-day.filled {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.cal-day.missing {
  border-color: var(--danger);
  border-style: dashed;
  color: var(--danger);
  background: transparent;
}
.cal-day.today::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: currentColor;
}
.cal-day.today {
  font-weight: 700;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}
.dot.filled {
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}
.dot.missing {
  border: 1.5px dashed var(--danger);
}
.dot.today {
  background: var(--ink);
  border-radius: 50%;
  width: 7px;
  height: 7px;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.chip.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.entry-head {
  margin: 4px 0 12px;
}
.entry-head h2 {
  font-size: 20px;
  margin-top: 4px;
}
.detail-section {
  margin-bottom: 14px;
}
.detail-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 4px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.detail-row:last-child {
  border-bottom: 0;
}
.detail-row span {
  color: var(--muted);
  flex: 1;
}
.detail-row strong {
  text-align: right;
  max-width: 58%;
  white-space: pre-line;
  font-weight: 600;
}
.detail-row strong.empty {
  color: var(--muted);
  font-weight: 400;
}
.detail-row.block {
  flex-direction: column;
  gap: 4px;
}
.detail-row.block strong {
  text-align: left;
  max-width: none;
}
.range-switch,
.segmented {
  display: flex;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 12px;
}
.range-switch button,
.segmented button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 6px;
}
.range-switch button.active,
.segmented button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.kpi strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
}
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.kpi small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart .axis {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .label {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--font);
}
.chart .bar-bed {
  fill: var(--accent-soft);
}
.chart .bar-sleep {
  fill: var(--accent);
}
.chart .line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .point {
  stroke: none;
}
.chart .empty {
  fill: var(--muted);
  font-size: 13px;
  font-family: var(--font);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.stat-table .detail-row strong {
  max-width: none;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 6px 0 12px;
}
.settings-row strong {
  word-break: break-all;
  text-align: right;
}
.mfa-setup {
  margin-top: 12px;
}
.mfa-qr svg {
  width: 176px;
  height: 176px;
  display: block;
  margin: 8px 0;
}
.mfa-secret {
  display: block;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 10px;
  color: var(--muted);
}
.danger-zone {
  border-color: var(--danger);
}
.app-meta {
  text-align: center;
  margin: 20px 0 8px;
}
.search-field {
  position: relative;
  display: block;
  margin: 4px 0 12px;
}
.search-field .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  margin-top: -11px;
  color: var(--muted);
}
.search-field input {
  padding-left: 42px;
}
.hb-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hb-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.hb-section h2 {
  font-size: 17px;
  margin-bottom: 8px;
}
.hb-section h3 {
  font-size: 14px;
  margin: 12px 0 4px;
}
.hb-section p,
.hb-section li {
  font-size: 14px;
}
.hb-section ol,
.hb-section ul {
  padding-left: 20px;
  margin: 4px 0 10px;
}
.hb-note {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  margin: 6px 0 10px;
}
.hb-warn {
  background: var(--warn-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  margin: 6px 0 10px;
}
.hb-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 96px;
}
.activity-day {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.activity-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.activity-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn);
  margin-top: 3px;
}
.user-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.user-row:last-child {
  border-bottom: 0;
}
.user-row .who {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.user-row .who strong {
  word-break: break-all;
}
.user-row .who small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.user-meta {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0;
}
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.ok {
  color: var(--ok);
}
.pill.wait {
  color: var(--warn);
}
.pill.error {
  color: var(--danger);
}
.pill.admin {
  color: var(--accent);
}
.mail-events .detail-row {
  font-size: 13px;
}
.sidebar {
  flex-direction: column;
  gap: 16px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  text-align: left;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.profile-card strong {
  display: block;
  font-size: 14px;
}
.profile-card small {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
}
@media (min-width: 900px) {
  .mobile-only {
    display: none !important;
  }
  .desktop-only {
    display: flex;
  }
  .app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
  }
  .main-area {
    padding: 0 32px 40px;
    max-width: 800px;
  }
  .top-bar {
    margin: 0 -32px 12px;
    padding-left: 32px;
    padding-right: 32px;
  }
  .page-title {
    font-size: 24px;
  }
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  .pdf-form {
    grid-template-columns: 1fr 1fr auto;
  }
  .pdf-form .btn {
    grid-column: auto;
    width: auto;
  }
  .toast {
    bottom: 24px;
  }
}


/* ---- generated: flexbox gap fallback for Safari < 14.1 ----
   Written by scripts/build-frontend.py. Do not edit; edit styles.css.
   Active only when the boot script finds no real flex gap support. */
.no-flex-gap .brand > * + * { margin-left: 10px; }

.no-flex-gap .btn > * + * { margin-left: 8px; }

.no-flex-gap .unit-input > * + * { margin-left: 10px; }

.no-flex-gap .check > * + * { margin-left: 10px; }

.no-flex-gap .inline-form > * + * { margin-left: 8px; }

.no-flex-gap .top-bar > * + * { margin-left: 12px; }

.no-flex-gap .tab > * + * { margin-top: 3px; }

.no-flex-gap .panel h2 > * + * { margin-left: 10px; }

.no-flex-gap .panel-head > * + * { margin-left: 10px; }

.no-flex-gap .notice > * + * { margin-left: 12px; }

.no-flex-gap .day-nav > * + * { margin-left: 8px; }

.no-flex-gap .calendar-legend > * + * { margin-left: 14px; }
.no-flex-gap .calendar-legend > * { margin-bottom: 14px; }

.no-flex-gap .calendar-legend > span > * + * { margin-left: 6px; }

.no-flex-gap .chip-list > * + * { margin-left: 8px; }
.no-flex-gap .chip-list > * { margin-bottom: 8px; }

.no-flex-gap .detail-row > * + * { margin-left: 14px; }

.no-flex-gap .legend > * + * { margin-left: 12px; }
.no-flex-gap .legend > * { margin-bottom: 12px; }

.no-flex-gap .legend span > * + * { margin-left: 6px; }

.no-flex-gap .settings-row > * + * { margin-left: 12px; }

.no-flex-gap .hb-toc > * + * { margin-left: 8px; }
.no-flex-gap .hb-toc > * { margin-bottom: 8px; }

.no-flex-gap .activity-chart > * + * { margin-left: 3px; }

.no-flex-gap .user-row .who > * + * { margin-left: 10px; }

.no-flex-gap .user-actions > * + * { margin-left: 6px; }
.no-flex-gap .user-actions > * { margin-bottom: 6px; }

.no-flex-gap .side-nav > * + * { margin-top: 4px; }

.no-flex-gap .nav-item > * + * { margin-left: 10px; }

.no-flex-gap .profile-card > * + * { margin-left: 10px; }


/* Auto margins restated: the reserves above are more specific than the
   rules that set them, and would otherwise cancel every push-to-the-end. */
.no-flex-gap .main-area { margin-left: auto; margin-right: auto; }
