:root {
  --bg: #f5f7fa;
  --bg2: #edf2f7;
  --fg: #111827;
  --fg2: #374151;
  --muted: #6b7280;
  --accent: #006bff;
  --accent-h: #005ad1;
  --accent-l: #eef6ff;
  --accent-d: #0b4fb8;
  --card: #ffffff;
  --card-b: #e5e7eb;
  --border: #e5e7eb;
  --ok: #22c55e;
  --ok-bg: #ecfdf5;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --err: #ef4444;
  --err-bg: #fef2f2;
  --info: #006bff;
  --info-bg: #eef6ff;
  --sh-s: 0 2px 8px rgba(15, 23, 42, 0.05);
  --sh-m: 0 8px 24px rgba(15, 23, 42, 0.08);
  --sh-l: 0 8px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
  --r: 14px;
  --rs: 10px;
  --rl: 16px;
  --mobile-frame-w: 390px;
  --mobile-frame-r: 34px;
  --t-fast: 0.16s;
  --t-med: 0.26s;
  --fui: "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --fbody: "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fbody);
  background: #e5e7eb;
  color: var(--fg);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-dots {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: none;
  background-size: 22px 22px;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}

@media (min-width: 481px) {
  .app {
    border: 1px solid var(--border);
    width: var(--mobile-frame-w);
    max-width: var(--mobile-frame-w);
    min-height: calc(100dvh - 18px);
    margin: 9px auto;
    border-radius: var(--mobile-frame-r);
    overflow: hidden;
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.22);
  }
}

.hdr {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px 9px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hdr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-logo {
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hdr-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hdr-name {
  font-family: var(--fui);
  font-weight: 800;
  font-size: 17px;
  color: var(--fg);
}
.hdr-settings {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg2);
  padding: 6px;
  border-radius: var(--rs);
  transition: color 0.15s;
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.hdr-settings svg,
.hdr-settings i {
  pointer-events: none;
}
.hdr-settings:hover {
  color: var(--accent);
}

.net-st {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pdot 2s infinite;
}

.net-dot.off {
  background: var(--err);
  animation: none;
}

@keyframes pdot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.st-line {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg2);
  transition: all 0.3s;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.st-line.s-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.st-line.s-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.st-line.s-err {
  background: var(--err-bg);
  color: var(--err);
}

.st-line.s-info {
  background: var(--info-bg);
  color: var(--info);
}

.mn {
  flex: 1;
  padding: 16px 16px 96px;
}

@media (min-width: 768px) {
  .mn {
    padding: 16px 16px 96px;
  }
}

.scr {
  display: none;
  animation: fi 0.28s ease-out;
}

.scr.on {
  display: block;
}

@keyframes fi {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes si {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

h1 {
  font-family: var(--fui);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 8px;
}

h2 {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 10px;
}

h3 {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.sub {
  font-size: 14px;
  color: var(--fg2);
  margin-bottom: 14px;
  line-height: 1.45;
}

.sm {
  font-size: 12px;
  color: var(--muted);
}

.tc {
  text-align: center;
}

.tl {
  text-align: left;
}

.is-hidden {
  display: none;
}

.header-side-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-error-card {
  background: var(--err-bg);
  border-color: #fca5a5;
}

.text-err {
  color: var(--err);
}

.icon-12 { width: 12px; height: 12px; }
.icon-13 { width: 13px; height: 13px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }
.icon-22 { width: 22px; height: 22px; }
.icon-32 { width: 32px; height: 32px; }
.icon-38 { width: 38px; height: 38px; }

.icon-ok { color: var(--ok); }
.icon-accent { color: var(--accent); }

.icon-alert-inline {
  flex-shrink: 0;
  margin-top: 1px;
}

.icon-copy-inline {
  vertical-align: -3px;
}

.serial-uppercase {
  text-transform: uppercase;
}

.device-status-card {
  padding: 12px 16px;
}

.device-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.device-status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-block {
  text-align: center;
  margin-bottom: 24px;
}

.hero-block-sm {
  margin-bottom: 20px;
}

.hero-logo-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  animation: si 0.5s ease-out;
  overflow: hidden;
}

.hero-logo-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.hero-icon-box {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
  animation: si 0.5s ease-out;
}

.hero-center-pad {
  text-align: center;
  padding-top: 20px;
}

.hero-center-pad-sm {
  text-align: center;
  padding-top: 10px;
}

.center-copy {
  max-width: 340px;
  margin: 0 auto;
}

.btn-center-300 {
  max-width: 300px;
  margin: 0 auto;
}

.btn-center-320 {
  max-width: 320px;
  margin: 0 auto;
}

.mono-field {
  background: var(--bg);
  user-select: all;
  cursor: text;
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 1px;
}

.warn-card {
  background: var(--warn-bg);
  border-color: #fde68a;
  padding: 12px 14px;
}

.warn-card-text {
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.finish-warn-text {
  font-size: 14px;
  color: #92400e;
}

.conclusion-box {
  max-width: 640px;
  margin: 0 auto 14px;
}

.mb10 {
  margin-bottom: 10px;
}

@media (min-width: 481px) {
  h1 {
    font-size: 30px;
  }
}

.cd {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--rl);
  padding: 16px;
  box-shadow: var(--sh-s);
  margin-bottom: 12px;
  transition: box-shadow var(--t-med), transform var(--t-med), border-color var(--t-med);
}

.cd:hover {
  box-shadow: var(--sh-m);
}

.kit-img {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: var(--sh-s);
}

.btn {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  width: 100%;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.btn-p {
  background: var(--accent);
  color: #fff;
}

.btn-p:hover {
  background: var(--accent-h);
}

.btn-s {
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-s:hover {
  background: var(--border);
}

.btn-d {
  background: var(--err);
  color: #fff;
}

.btn-d:hover {
  background: #b91c1c;
}

.btn-t {
  background: none;
  color: var(--accent);
  padding: 10px 16px;
  font-size: 14px;
  width: auto;
}

.btn-t:hover {
  background: var(--accent-l);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn.ld .bt {
  opacity: 0;
}

.btn.ld::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sp 0.6s linear infinite;
}

@keyframes sp {
  to {
    transform: rotate(360deg);
  }
}

.btn-pls {
  animation: bpls 2s ease-in-out infinite;
}

@keyframes bpls {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(84, 161, 214, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(84, 161, 214, 0);
  }
}

.fg {
  margin-bottom: 14px;
}

.fl {
  display: block;
  font-family: var(--fui);
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 5px;
}

.fl .rq {
  color: var(--err);
  margin-left: 1px;
}

.fi,
.fs {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--fbody);
  font-size: 15px;
  color: var(--fg);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}

.fs {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8A7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.fi:focus,
.fs:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 107, 255, 0.12);
}

.fi.er,
.fs.er {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.fe {
  font-size: 12px;
  color: var(--err);
  margin-top: 3px;
  display: none;
}

.fe.vis {
  display: block;
}

.bdg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--fui);
}

.bdg-t {
  background: var(--accent-l);
  color: var(--accent-d);
}

.ck {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.ck-i {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--fg2);
}

.ck-c {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ck-i.dn .ck-c {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ftg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.ftc {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--r);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--sh-s);
}

.fti {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 7px;
  background: var(--accent-l);
  color: var(--accent);
}

.ftt {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 13px;
  color: var(--fg);
}

.wz-p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
}

.wz-d {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.wz-d.act {
  background: var(--accent);
}

.wz-d.dn {
  background: var(--ok);
}

.wz-c {
  font-family: var(--fui);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}

.wz-n {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.wz-n .btn {
  flex: 1;
}

.wz-step-img {
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 12px auto 0;
  border-radius: 12px;
  box-shadow: var(--sh-s);
}

.wz-note {
  margin-top: 10px;
  background: var(--warn-bg);
  border: 1px solid #fde68a;
  border-radius: var(--rs);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
}

.mdm {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--rl);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--sh-m);
}

.mdm-photo {
  width: 100%;
  max-width: 260px;
  margin: 8px auto 12px;
  display: block;
  border-radius: 12px;
  box-shadow: var(--sh-s);
}

.mdm-inst {
  margin: 0 0 12px;
}

.mdm-inst p {
  font-size: 14px;
  color: var(--fg2);
  line-height: 1.55;
}

.mdm-inst p + p {
  margin-top: 8px;
}

.mdm-svg {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 14px;
  display: block;
}

.mdm-st {
  list-style: none;
  padding: 0;
}

.mdm-s {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--fg2);
}

.mdm-si {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.mdm-si.dn {
  background: var(--ok);
  color: #fff;
}

.mdm-si.ac {
  background: var(--warn);
  color: #fff;
  animation: pdot 1.5s infinite;
}

.mdm-si.pn {
  background: var(--border);
  color: var(--muted);
}

.mdm-w {
  background: var(--warn-bg);
  border: 1px solid #fde68a;
  border-radius: var(--rs);
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tmr {
  font-family: var(--fui);
  font-size: 68px;
  font-weight: 900;
  text-align: center;
  color: var(--fg);
  letter-spacing: -2px;
  margin: 22px 0;
  line-height: 1;
}

.tmr.tw {
  color: var(--warn);
}

.tmr.td {
  color: var(--err);
  animation: tp 1s ease-in-out infinite;
}

@keyframes tp {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@media (min-width: 481px) {
  .tmr {
    font-size: 80px;
  }
}

/* ЭКГ-графика на экране ожидания проверки (под таймером) */
.ecg-wait-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 18px;
}

.ecg-wait-card {
  background: var(--card);
  border-radius: var(--rl);
  border: 1.5px solid var(--border);
  box-shadow: var(--sh-m);
  padding: 20px 18px 14px;
  overflow: hidden;
}

.ecg-wait-canvas-wrap {
  position: relative;
  height: 160px;
  border-radius: var(--rs);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg2) 100%);
}

.ecg-wait-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ecg-wait-labels {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 0 40px;
  pointer-events: none;
}

.ecg-wait-labels span {
  color: rgba(84, 161, 214, 0.65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

.ecg-wait-live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.ecg-wait-live-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(84, 161, 214, 0.45);
  animation: ecgLivePulse 2s ease-in-out infinite;
}

@keyframes ecgLivePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.25);
  }
}

.ecg-wait-live-text {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@media (max-height: 560px) {
  .ecg-wait-canvas-wrap {
    height: 120px;
  }
  .ecg-wait-card {
    padding: 14px 12px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ecg-wait-live-dot {
    animation: none;
    opacity: 0.85;
  }
}

.ci {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fg2);
  padding: 9px 12px;
  background: var(--bg);
  border-radius: var(--rs);
  margin-bottom: 6px;
}

.ci-s {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ci.pd .ci-s {
  color: var(--muted);
}

.ci.ck .ci-s {
  color: var(--warn);
  animation: sp 1s linear infinite;
}

.ci.ok .ci-s {
  color: var(--ok);
}

.ci.fl .ci-s {
  color: var(--err);
}

.ic-lg {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: si 0.5s ease-out;
}

.ic-lg-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.ic-lg-er {
  background: var(--err-bg);
  color: var(--err);
}

.dg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.dg-b {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 8px;
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.dg-b:hover {
  border-color: var(--accent);
  background: var(--accent-l);
}

.dg-b:active {
  transform: scale(0.97);
}

.dg-b i {
  color: var(--accent);
}

.dg-emoji {
  font-size: 22px;
  line-height: 1;
}

.dg-b-active {
  border-color: var(--accent);
  background: var(--accent-l);
  box-shadow: 0 0 0 2px var(--accent);
}

.dg-status {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
  min-height: 14px;
}

.wellbeing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
}

.wellbeing-overlay.is-hidden {
  display: none;
}

.wellbeing-dialog {
  width: min(100%, 430px);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(84, 161, 214, 0.18);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  padding: 18px;
  animation: fi 0.2s ease-out;
}

.wellbeing-dialog h3 {
  margin: 0 0 8px;
}

.wellbeing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wellbeing-option {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--fg);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--fui);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.wellbeing-option:active {
  transform: scale(0.98);
}

.wellbeing-option-emoji {
  font-size: 30px;
  line-height: 1;
}

.wellbeing-option-title {
  font-size: 14px;
  font-weight: 800;
}

.wellbeing-option-subtitle {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.wellbeing-option-active {
  box-shadow: 0 0 0 2px rgba(84, 161, 214, 0.22);
}

.wellbeing-option-good.wellbeing-option-active {
  border-color: #22c55e;
  background: #f0fdf4;
}

.wellbeing-option-normal.wellbeing-option-active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.wellbeing-option-bad.wellbeing-option-active {
  border-color: #fb7185;
  background: #fff1f2;
}

.wellbeing-option-danger.wellbeing-option-active {
  border-color: #dc2626;
  background: #fef2f2;
}

.wellbeing-preview {
  margin-top: 12px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.wellbeing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.de {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--rs);
  margin-bottom: 7px;
  animation: fi 0.3s ease-out;
}

.de-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.de-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-l);
  font-size: 16px;
  flex-shrink: 0;
}

.de-main {
  min-width: 0;
}

.de-t {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.de-n {
  font-family: var(--fui);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.de-sub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.de-wellbeing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 24px;
}

.de-wellbeing-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.de-wellbeing-good {
  background: #dcfce7;
  color: #166534;
}

.de-wellbeing-normal {
  background: #fef3c7;
  color: #92400e;
}

.de-wellbeing-bad {
  background: #ffe4e6;
  color: #9f1239;
}

.de-wellbeing-danger {
  background: #fee2e2;
  color: #991b1b;
}

.de-wellbeing-emoji {
  font-size: 13px;
}

.de-wellbeing-text {
  white-space: nowrap;
}

.de-wellbeing-arrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.de-active {
  border-color: var(--accent);
  background: var(--accent-l);
}

.de-stop {
  cursor: pointer;
}

.de-stop:active {
  transform: translateY(1px);
}

.de-live {
  color: var(--accent);
  font-size: 11px;
  animation: blink 1.2s infinite;
}

#scr-dashboard > h2,
#scr-diary > h2,
#scr-monitor-device > h2,
#scr-profile > h2 {
  margin-top: 2px;
}

#scr-monitor-device .sm,
#scr-dashboard .sm {
  line-height: 1.35;
}

#scr-diary-add .segment-control,
#scr-diary-add .quick-actions {
  margin-bottom: 14px;
}

.diary-kind-tabs .segment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.diary-panel.is-hidden {
  display: none;
}

.diary-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
}

.diary-section-head h3 {
  margin: 0;
}

.diary-section-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sleep-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sleep-btn {
  min-height: 58px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-family: var(--fui);
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.sleep-btn:active {
  transform: translateY(1px) scale(0.985);
}

.sleep-btn-start {
  color: #1e3a8a;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.18);
}

.sleep-btn-end {
  color: #854d0e;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-color: #facc15;
  box-shadow: 0 6px 14px rgba(146, 64, 14, 0.16);
}

.activity-pairs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-pair-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.activity-pair-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fui);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--fg);
}

.activity-pair-row.is-running {
  border-color: #93c5fd;
  background: #eff6ff;
}

.activity-pair-row.is-running .activity-pair-title {
  color: #1d4ed8;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.de-emp {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 14px;
}

.supp {
  background: var(--bg2);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  margin: 14px 0;
}

.supp-ph {
  font-family: var(--fui);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin-top: 5px;
}

.supp-ph:hover {
  text-decoration: underline;
}

.conclusion-frame {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: #fff;
}

.dbg {
  margin-top: 18px;
}

.dbg-tg {
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--fui);
}

.dbg-c {
  display: none;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg2);
  border-radius: var(--rs);
  font-size: 12px;
}

.dbg-c.op {
  display: block;
}

.dbg-c .btn {
  font-size: 12px;
  padding: 7px 10px;
  margin-bottom: 5px;
}

.bk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--fui);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
}

.bk:hover {
  text-decoration: underline;
}

.toast-c {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: var(--fg);
  color: #fff;
  padding: 11px 16px;
  border-radius: var(--rs);
  font-size: 14px;
  font-family: var(--fui);
  font-weight: 600;
  box-shadow: var(--sh-l);
  animation: ti 0.3s ease-out, to 0.3s ease-in 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

.tab-nav.is-hidden {
  display: none;
}

.tab-nav-item {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 6px 6px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--fui);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.tab-nav-item.active {
  color: var(--accent);
  background: var(--accent-l);
  box-shadow: inset 0 0 0 1px rgba(0, 107, 255, 0.18);
}

.tab-nav-item:active {
  transform: translateY(1px) scale(0.98);
}

.dash-live {
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px;
}

.dash-patient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.dash-avatar {
  width: 44px;
  height: 44px;
  background: var(--accent-l);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.dash-patient-name {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 17px;
}

.heading-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.between-row-sm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.action-row {
  display: flex;
  gap: 8px;
}

.session-live-card {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.no-session-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.electrode-change-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.electrode-change-card.is-overdue {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.btn-attention {
  background: var(--err);
  color: #fff;
}

.btn-attention:hover {
  background: #b91c1c;
}

.electrode-instruction-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.electrode-scheme-switch {
  margin-top: 12px;
}

.dash-live-time {
  font-family: var(--fui);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: center;
  color: var(--fg);
  margin-bottom: 8px;
}

.dash-live-line {
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #bfdbfe 0%, #60a5fa 35%, #2563eb 70%, #60a5fa 100%);
  background-size: 180% 100%;
  animation: dashLineMove 2.2s linear infinite;
}

@keyframes dashLineMove {
  from { background-position: 0 0; }
  to { background-position: 180% 0; }
}

.dash-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  width: 0;
}

.device-main-card {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.monitor-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.monitor-title {
  font-family: var(--fui);
  font-size: 16px;
  font-weight: 700;
}

.info-card {
  background: var(--info-bg);
  border-color: #bfdbfe;
}

.info-card-title {
  font-size: 16px;
}

.info-checklist {
  margin: 6px 0 0;
}

.faq-item {
  margin-top: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.faq-question-btn {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--fui);
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.faq-question-btn::-webkit-details-marker {
  display: none;
}

.faq-question-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: -2px;
}

.faq-chevron {
  color: #2563eb;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 14px 12px;
}

.faq-led {
  border-radius: 10px;
  padding: 8px 10px;
}

.faq-led .ck-c {
  border-width: 1px;
}

.faq-led-red {
  background: #fef2f2;
  color: #991b1b;
}

.faq-led-red .ck-c {
  border-color: #ef4444;
  color: #dc2626;
}

.faq-led-green-blink {
  background: #ecfdf5;
  color: #065f46;
}

.faq-led-green-blink .ck-c {
  border-color: #10b981;
  color: #10b981;
  animation: faqLedBlink 1.15s steps(1, end) infinite;
}

.faq-led-green-on {
  background: #dcfce7;
  color: #14532d;
}

.faq-led-green-on .ck-c {
  border-color: #22c55e;
  color: #15803d;
}

.faq-led-green-off {
  background: #f1f5f9;
  color: #334155;
}

.faq-led-green-off .ck-c {
  border-color: #94a3b8;
  color: #64748b;
}

.faq-led-blue-green {
  background: linear-gradient(90deg, #dbeafe 0%, #dcfce7 100%);
  color: #1e3a8a;
}

.faq-led-blue-green .ck-c {
  border-color: #3b82f6;
  color: #2563eb;
}

.faq-led-blue-blink {
  background: #eff6ff;
  color: #1e3a8a;
}

.faq-led-blue-blink .ck-c {
  border-color: #3b82f6;
  color: #2563eb;
  animation: faqLedBlinkBlue 1.15s steps(1, end) infinite;
}

.faq-audio {
  background: #fff7ed;
  color: #7c2d12;
}

.faq-audio .ck-c {
  border-color: #fb923c;
  color: #ea580c;
}

.faq-audio-fast .ck-c {
  animation: faqAudioPulse 1s ease-in-out infinite;
}

.faq-audio-slow {
  background: #fffbeb;
  color: #854d0e;
}

.faq-audio-slow .ck-c {
  border-color: #f59e0b;
  color: #d97706;
}

.faq-audio-long {
  background: #fef3c7;
  color: #78350f;
}

.faq-audio-long .ck-c {
  border-color: #d97706;
  color: #b45309;
}

@keyframes faqLedBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.35; }
}

@keyframes faqLedBlinkBlue {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.35; }
}

@keyframes faqAudioPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.device-ecg {
  height: 10px;
  border-radius: 999px;
  margin: 8px 0 10px;
  background:
    linear-gradient(90deg, rgba(34,197,94,0) 0%, rgba(34,197,94,0.25) 30%, rgba(34,197,94,0.95) 50%, rgba(34,197,94,0.2) 72%, rgba(34,197,94,0) 100%),
    linear-gradient(180deg, #e5e7eb 0%, #f9fafb 100%);
  background-size: 220% 100%, 100% 100%;
  animation: deviceEcgMove 2.4s linear infinite;
}

@keyframes deviceEcgMove {
  from { background-position: 0 0, 0 0; }
  to { background-position: 220% 0, 0 0; }
}

.segment-control {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--fui);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 8px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.segment-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 107, 255, 0.16);
}

.segment-btn:active {
  transform: translateY(1px) scale(0.99);
}

.segment-btn:focus-visible,
.quick-btn:focus-visible,
.tab-nav-item:focus-visible {
  outline: 2px solid rgba(0, 107, 255, 0.45);
  outline-offset: 1px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.diary-event-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 6px 9px;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--fui);
  font-size: 11px;
  line-height: 1.2;
  color: var(--fg);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.quick-btn i,
.quick-btn .lucide {
  width: 22px;
  height: 22px;
  color: var(--icon-color, var(--accent));
  background: var(--icon-bg, rgba(0, 107, 255, 0.12));
  border: 1px solid var(--icon-brd, rgba(0, 107, 255, 0.2));
  border-radius: 8px;
  padding: 4px;
  box-sizing: content-box;
}

.quick-btn[data-icon-tone="rose"] { --icon-color: #be123c; --icon-bg: #ffe4e6; --icon-brd: #fecdd3; }
.quick-btn[data-icon-tone="crimson"] { --icon-color: #b91c1c; --icon-bg: #fee2e2; --icon-brd: #fecaca; }
.quick-btn[data-icon-tone="sky"] { --icon-color: #0369a1; --icon-bg: #e0f2fe; --icon-brd: #bae6fd; }
.quick-btn[data-icon-tone="violet"] { --icon-color: #6d28d9; --icon-bg: #ede9fe; --icon-brd: #ddd6fe; }
.quick-btn[data-icon-tone="amber"] { --icon-color: #b45309; --icon-bg: #fef3c7; --icon-brd: #fde68a; }
.quick-btn[data-icon-tone="emerald"] { --icon-color: #047857; --icon-bg: #d1fae5; --icon-brd: #a7f3d0; }
.quick-btn[data-icon-tone="orange"] { --icon-color: #c2410c; --icon-bg: #ffedd5; --icon-brd: #fed7aa; }
.quick-btn[data-icon-tone="slate"] { --icon-color: #475569; --icon-bg: #e2e8f0; --icon-brd: #cbd5e1; }
.quick-btn[data-icon-tone="teal"] { --icon-color: #0f766e; --icon-bg: #ccfbf1; --icon-brd: #99f6e4; }
.quick-btn[data-icon-tone="cyan"] { --icon-color: #0e7490; --icon-bg: #cffafe; --icon-brd: #a5f3fc; }
.quick-btn[data-icon-tone="indigo"] { --icon-color: #3730a3; --icon-bg: #e0e7ff; --icon-brd: #c7d2fe; }
.quick-btn[data-icon-tone="pink"] { --icon-color: #be185d; --icon-bg: #fce7f3; --icon-brd: #fbcfe8; }
.quick-btn[data-icon-tone="lime"] { --icon-color: #3f6212; --icon-bg: #ecfccb; --icon-brd: #d9f99d; }
.quick-btn[data-icon-tone="blue"] { --icon-color: #1d4ed8; --icon-bg: #dbeafe; --icon-brd: #bfdbfe; }
.quick-btn[data-icon-tone="mint"] { --icon-color: #065f46; --icon-bg: #dcfce7; --icon-brd: #bbf7d0; }
.quick-btn[data-icon-tone="sea"] { --icon-color: #155e75; --icon-bg: #cffafe; --icon-brd: #a5f3fc; }

.quick-btn-running i,
.quick-btn-running .lucide {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.quick-btn:active {
  transform: translateY(1px) scale(0.985);
}

.quick-btn.active {
  background: var(--accent-l);
  border-color: var(--accent);
  color: var(--accent-d);
  box-shadow: 0 4px 10px rgba(0, 107, 255, 0.14);
}

.quick-btn-running {
  background: var(--accent-l);
  border-color: var(--accent);
  color: var(--accent-d);
  box-shadow: inset 0 0 0 1px var(--accent), 0 4px 10px rgba(0, 107, 255, 0.12);
}

.quick-btn-running i,
.quick-btn-running .lucide {
  color: var(--accent-d);
}

.quick-status {
  display: block;
  min-height: 13px;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.1;
}

.quick-btn-pulse {
  animation: quickPulse 0.22s ease-out;
}

@keyframes quickPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@media (hover: hover) {
  .btn-p:hover {
    box-shadow: 0 8px 18px rgba(0, 107, 255, 0.26);
  }
  .btn-s:hover {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }
  .btn-d:hover {
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.22);
  }
  .tab-nav-item:hover {
    background: rgba(0, 107, 255, 0.06);
    color: var(--accent-d);
  }
  .segment-btn:hover {
    background: rgba(0, 107, 255, 0.08);
    color: var(--accent-d);
  }
  .quick-btn:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }
}

@media (max-width: 380px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quick-emoji {
  font-size: 18px;
  line-height: 1;
}

.diary-add-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.diary-add-title {
  margin: 0;
}

.btn-inline {
  width: auto;
  min-height: 40px;
  padding: 10px 14px;
}

.diary-add-sub {
  margin-top: 8px;
}

.profile-card {
  text-align: center;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-l);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  margin: 0 auto 10px;
}

.profile-name {
  font-family: var(--fui);
  font-size: 16px;
  font-weight: 700;
}

@keyframes ti {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes to {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.mt8 {
  margin-top: 8px;
}

.mt12 {
  margin-top: 12px;
}

.mt16 {
  margin-top: 16px;
}

.mt20 {
  margin-top: 20px;
}

.mt24 {
  margin-top: 24px;
}

.mb8 {
  margin-bottom: 8px;
}

.mb12 {
  margin-bottom: 12px;
}

.mb16 {
  margin-bottom: 16px;
}

.mb20 {
  margin-bottom: 20px;
}

.rpt-card {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--sh-s);
  transition: border-color 0.15s;
}

.rpt-card:hover {
  border-color: var(--accent);
}

.rpt-info {
  flex: 1;
  min-width: 0;
}

.rpt-date {
  font-family: var(--fui);
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
}

.rpt-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.rpt-btn {
  flex-shrink: 0;
  background: var(--accent-l);
  color: var(--accent);
  border: none;
  border-radius: var(--rs);
  padding: 8px 14px;
  font-family: var(--fui);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.rpt-btn:hover {
  background: var(--accent);
  color: #fff;
}

.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--fui);
}

.dash-status-active {
  background: var(--ok-bg);
  color: var(--ok);
}

.dash-status-live {
  position: relative;
  padding-left: 20px;
}

.dash-status-live::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  transform: translateY(-50%);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.dash-status-done {
  background: var(--bg2);
  color: var(--muted);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}

.loading-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sp 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
