:root {
  --bg: #01080d;
  --compat-canvas: #01080d;
  --panel: rgba(5, 35, 45, 0.9);
  --panel-strong: rgba(8, 48, 62, 0.96);
  --line: rgba(63, 219, 219, 0.28);
  --line-hot: rgba(255, 82, 99, 0.72);
  --text: #effcff;
  --muted: #8abac5;
  --cyan: #50f3ef;
  --blue: #2f78ff;
  --green: #20d09b;
  --orange: #ff9f2d;
  --red: #ff5262;
}

.screen {
  background: var(--compat-canvas);
}

* {
  box-sizing: border-box;
}

html,
body,
.screen {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5, 32, 41, 0.98), rgba(2, 12, 20, 0.98)),
    repeating-linear-gradient(90deg, rgba(80, 243, 239, 0.035) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(80, 243, 239, 0.025) 0 1px, transparent 1px 72px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid rgba(80, 243, 239, 0.38);
  border-radius: 8px;
  padding: 9px 14px;
  color: #dffffd;
  background: linear-gradient(180deg, rgba(31, 119, 137, 0.45), rgba(9, 42, 56, 0.72));
  box-shadow: inset 0 0 20px rgba(80, 243, 239, 0.08), 0 0 16px rgba(80, 243, 239, 0.08);
  font-weight: 800;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.login-panel {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  position: relative;
  width: 640px;
  max-width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 31, 43, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.login-card h1 {
  margin-top: 16px;
  font-size: 28px;
}

.login-card p,
.message,
.empty-text {
  color: var(--muted);
}

.login-card > p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.support-card .mark {
  color: #ffd8dc;
  border-color: rgba(255, 82, 99, 0.72);
  background: rgba(125, 38, 55, 0.48);
}

.login-brand-mark {
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.32);
  background: #079c98;
}

.login-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-card form {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--red);
  font-weight: 800;
}

.login-divider {
  position: relative;
  margin: 18px 0 14px;
  border-top: 1px solid rgba(138, 186, 197, 0.2);
  text-align: center;
}

.login-divider span {
  position: relative;
  top: -11px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(8, 31, 43, 0.96);
  font-size: 13px;
}

.display-settings-button {
  display: block;
  width: auto;
  min-width: 240px;
}

.display-mode-selector {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 182, 92, 0.32);
  border-left: 4px solid #ffb65c;
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(46, 35, 24, 0.86), rgba(10, 31, 40, 0.9));
}

.display-mode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.display-mode-heading strong {
  color: #fff4df;
  font-size: 14px;
}

.display-mode-heading span {
  color: #c9bda8;
  font-size: 12px;
}

.display-mode-options {
  display: flex;
  margin-top: 9px;
}

.display-mode-option {
  display: flex;
  min-width: 0;
  flex: 1 1 50%;
  align-items: center;
  padding: 9px 10px;
  border-color: rgba(188, 204, 207, 0.24);
  border-radius: 10px;
  color: #e4f0f1;
  background: rgba(2, 18, 25, 0.72);
  box-shadow: none;
  text-align: left;
}

.display-mode-option + .display-mode-option {
  margin-left: 10px;
}

.display-mode-option.active {
  border-color: rgba(255, 182, 92, 0.88);
  background: linear-gradient(120deg, rgba(115, 72, 24, 0.72), rgba(20, 62, 68, 0.82));
  box-shadow: inset 0 0 18px rgba(255, 182, 92, 0.09);
}

.display-mode-mark {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  color: #fff;
  background: #9b682d;
  font-size: 15px;
}

.display-mode-mark-standard {
  background: #257b82;
}

.display-mode-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.display-mode-copy strong {
  overflow: hidden;
  color: #f8ffff;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-mode-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: #9fb7bb;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-mode-check {
  display: flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  border: 1px solid rgba(188, 204, 207, 0.32);
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
}

.display-mode-option.active .display-mode-check {
  color: #342008;
  border-color: #ffd18d;
  background: #ffd18d;
}

.login-mode-switch {
  display: flex;
  margin: 18px 0 12px;
  padding: 4px;
  border: 1px solid rgba(80, 243, 239, 0.24);
  border-radius: 12px;
  background: rgba(1, 12, 18, 0.72);
}

.login-mode-switch button {
  flex: 1 1 50%;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.login-mode-switch button + button {
  margin-left: 8px;
}

.login-mode-switch button.active {
  color: #eaffff;
  border-color: rgba(32, 208, 155, 0.68);
  background: linear-gradient(180deg, rgba(18, 126, 102, 0.74), rgba(8, 67, 64, 0.82));
}

.qr-login-panel {
  display: flex;
  align-items: center;
  min-height: 204px;
  margin-top: 0;
  padding: 16px 18px;
  border: 1px solid rgba(80, 243, 239, 0.28);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(2, 17, 24, 0.94), rgba(4, 31, 39, 0.82));
}

.qr-code-shell {
  position: relative;
  width: 168px;
  height: 168px;
  flex: 0 0 168px;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 10px;
  background: #fff;
}

.qr-code-shell > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.qr-code-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(7, 91, 97, 0.08), 0 3px 10px rgba(7, 91, 97, 0.14);
  transform: translate(-50%, -50%);
}

.qr-code-logo img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 7px;
}

.qr-code-state {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13px;
  box-sizing: border-box;
  color: #477072;
  background: #f4fbfa;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.qr-code-result svg {
  width: 58px;
  height: 58px;
  margin-bottom: 7px;
  fill: none;
  stroke: #15937e;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qr-code-result strong {
  color: #116e64;
  font-size: 16px;
}

.qr-code-result span {
  margin-top: 3px;
  color: #5e797a;
  font-size: 11px;
}

.qr-code-expired {
  width: 100%;
  border: 0;
  border-radius: 0;
  color: #7d6560;
  background: #fff7f1;
  box-shadow: none;
}

.qr-code-expired strong {
  margin-top: 5px;
  color: #c16c42;
  font-size: 14px;
}

.qr-code-expired:focus,
.qr-code-expired.remote-focused {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(255, 182, 92, 0.92);
}

.qr-login-copy {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin-left: 24px;
}

.qr-login-copy strong {
  color: #eaffff;
  font-size: 17px;
  line-height: 1.45;
}

.qr-login-steps {
  margin-top: 10px;
}

.qr-login-steps span {
  display: flex;
  align-items: center;
  color: #d7f4f5;
  font-size: 13px;
  line-height: 26px;
}

.qr-login-steps span + span {
  margin-top: 5px;
}

.qr-login-steps b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 9px;
  border: 1px solid rgba(80, 243, 239, 0.36);
  border-radius: 50%;
  color: #bffefa;
  background: rgba(15, 98, 91, 0.38);
  font-size: 12px;
}

.qr-login-actions {
  display: flex;
  align-items: center;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(138, 186, 197, 0.16);
}

.qr-login-actions span {
  min-width: 0;
  flex: 1 1 auto;
  margin-right: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.qr-login-actions button {
  flex: 0 0 auto;
  padding: 8px 14px;
}

#loginSettingsBtn {
  margin: 12px auto 0;
  padding: 8px 18px;
  color: #bfe8ed;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

#loginSettingsBtn:hover,
#loginSettingsBtn:focus,
#loginSettingsBtn.remote-focused {
  color: #fff;
  border-color: rgba(80, 243, 239, 0.92);
  background: rgba(20, 92, 101, 0.82);
}

.login-card button:focus,
.login-card button.remote-focused {
  position: relative;
  z-index: 3;
  outline: none;
  border-color: #50f3ef;
  box-shadow:
    0 0 0 3px #f7ffff,
    0 0 0 6px rgba(80, 243, 239, 0.9),
    0 0 26px rgba(80, 243, 239, 0.76),
    inset 0 0 18px rgba(80, 243, 239, 0.14);
}

.login-card .display-mode-option.active:focus,
.login-card .display-mode-option.active.remote-focused {
  border-color: #ffd18d;
  box-shadow:
    0 0 0 3px #fff4d8,
    0 0 0 6px rgba(255, 182, 92, 0.94),
    0 0 28px rgba(255, 182, 92, 0.82),
    inset 0 0 20px rgba(255, 182, 92, 0.18);
}

.login-card input:focus,
.login-card input.remote-focused {
  position: relative;
  z-index: 3;
  outline: none;
  border-color: #50f3ef;
  box-shadow:
    0 0 0 3px #f7ffff,
    0 0 0 6px rgba(80, 243, 239, 0.9),
    0 0 26px rgba(80, 243, 239, 0.72);
}

button:focus,
button.remote-focused,
input:focus,
input.remote-focused {
  outline: none;
  box-shadow: 0 0 0 3px #f7ffff, 0 0 0 6px rgba(80, 243, 239, 0.86), 0 0 22px rgba(80, 243, 239, 0.68);
}

.board button {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.board button:focus,
.board button.remote-focused,
.board input:focus,
.board input.remote-focused {
  position: relative;
  z-index: 8;
  outline: none;
  border-color: rgba(139, 239, 233, 0.78);
  box-shadow:
    0 0 0 1px rgba(239, 255, 254, 0.72),
    0 0 0 3px rgba(80, 243, 239, 0.22),
    0 0 14px rgba(80, 243, 239, 0.3),
    inset 0 0 10px rgba(80, 243, 239, 0.08) !important;
}

html.compat-display-app .login-panel {
  padding: 4vh 5vw;
}

html.compat-display-app .login-card {
  width: 640px;
  padding: 14px 20px;
}

html.compat-display-app .login-card > .login-brand-mark {
  position: absolute;
  top: 14px;
  left: 20px;
  display: block;
  width: 38px;
  height: 38px;
}

html.compat-display-app .login-card h1 {
  margin-top: 0;
  padding-left: 50px;
  line-height: 38px;
  font-size: 24px;
}

html.compat-display-app .login-card > p {
  font-size: 13px;
  line-height: 1.4;
}

html.compat-display-app .login-mode-switch {
  margin: 9px 0;
}

html.compat-display-app .display-mode-selector {
  margin-top: 8px;
  padding: 8px 10px;
}

html.compat-display-app .display-mode-options {
  margin-top: 6px;
}

html.compat-display-app .display-mode-option {
  padding: 6px 8px;
}

html.compat-display-app .display-mode-mark {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-right: 8px;
}

html.compat-display-app .login-mode-switch button {
  padding: 6px 10px;
}

html.compat-display-app .qr-login-panel {
  min-height: 156px;
  padding: 10px 12px;
}

html.compat-display-app .qr-code-shell {
  width: 136px;
  height: 136px;
  flex-basis: 136px;
  border-width: 5px;
}

html.compat-display-app .qr-code-logo {
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 8px;
}

html.compat-display-app .qr-code-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

html.compat-display-app .qr-code-state {
  padding: 9px;
  font-size: 11px;
}

html.compat-display-app .qr-code-result svg {
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
}

html.compat-display-app .qr-code-result strong {
  font-size: 14px;
}

html.compat-display-app .qr-code-result span {
  font-size: 10px;
}

html.compat-display-app .qr-login-copy {
  margin-left: 18px;
}

html.compat-display-app .qr-login-copy strong {
  font-size: 15px;
}

html.compat-display-app .qr-login-steps {
  margin-top: 6px;
}

html.compat-display-app .qr-login-steps span {
  line-height: 22px;
}

html.compat-display-app .qr-login-steps span + span {
  margin-top: 2px;
}

html.compat-display-app .qr-login-steps b {
  width: 20px;
  height: 20px;
  margin-right: 7px;
}

html.compat-display-app .qr-login-actions {
  margin-top: 8px;
  padding-top: 8px;
}

html.compat-display-app .qr-login-actions span {
  margin-right: 10px;
  font-size: 12px;
}

html.compat-display-app .qr-login-actions button {
  padding: 6px 10px;
}

html.compat-display-app #loginSettingsBtn {
  min-width: 0;
  margin-top: 7px;
  padding: 5px 12px;
}

html.compat-display-app .message {
  min-height: 18px;
  margin-top: 6px;
}

html.compat-display-app .login-panel.compact-login-fit {
  position: relative;
  display: block;
  padding: 0;
}

html.compat-display-app .login-panel.compact-login-fit .login-card {
  position: absolute;
  transform-origin: 0 0;
}

.board {
  --main-left-column: calc(52.8302% - 4.23px);
  --lower-panel-columns: var(--main-left-column) minmax(210px, 0.35fr) minmax(340px, 0.65fr);
  height: 100vh;
  display: grid;
  grid-template-rows: 54px 88px minmax(0, 1fr) 64px;
  gap: 8px;
  padding: 8px;
}

.board.compact-fit {
  position: absolute;
  transform-origin: 0 0;
}

.board-header,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 0 32px rgba(80, 243, 239, 0.06), 0 16px 48px rgba(0, 0, 0, 0.26);
}

.board-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.54fr) minmax(410px, 0.86fr) minmax(490px, 0.98fr);
  gap: 14px;
  align-items: center;
  padding: 5px 10px;
  background: linear-gradient(90deg, rgba(7, 48, 58, 0.98), rgba(4, 20, 34, 0.98));
}

.title-block {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.title-block > .mark {
  margin-right: 12px;
}

.mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(80, 243, 239, 0.7);
  border-radius: 8px;
  color: #eaffff;
  background: rgba(22, 140, 126, 0.25);
  box-shadow: inset 0 0 18px rgba(80, 243, 239, 0.18), 0 0 18px rgba(80, 243, 239, 0.22);
  font-size: 24px;
  font-weight: 900;
}

.title-block h1 {
  overflow: hidden;
  color: #f4ffff;
  font-size: 28px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-block p {
  margin-top: 2px;
  color: #9ecbd2;
  font-size: 12px;
}

.time-block {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) auto minmax(136px, 0.8fr);
  align-items: center;
  gap: 10px;
  justify-self: center;
  min-width: 0;
  color: #d9f9f8;
}

.time-block span,
.time-block small {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-block span {
  text-align: right;
}

.time-block small {
  min-width: 136px;
}

.time-block strong {
  color: #83fff5;
  font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
  font-size: 38px;
  line-height: 0.9;
  text-shadow: 0 0 18px rgba(80, 243, 239, 0.35);
}

.action-block {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) 66px 66px minmax(116px, 0.72fr) minmax(96px, 0.58fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.action-block > button {
  min-width: 0;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.action-block small {
  overflow: hidden;
  color: #c8ebef;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.compat-display-app .action-block {
  grid-template-columns: minmax(112px, 1fr) 66px minmax(116px, 0.72fr) minmax(96px, 0.58fr);
}

html.compat-display-app .action-block #fullBtn {
  display: none;
}

#voiceBtn {
  border-color: rgba(255, 82, 99, 0.78);
  padding-right: 10px;
  padding-left: 10px;
  color: #ffd8dc;
  background: linear-gradient(180deg, rgba(125, 38, 55, 0.78), rgba(58, 20, 34, 0.72));
}

#logoutBtn {
  border-color: rgba(138, 186, 197, 0.3);
  color: #b7d5db;
  background: rgba(20, 54, 64, 0.72);
  white-space: nowrap;
}

#refreshBtn {
  overflow: hidden;
  border-color: rgba(80, 243, 239, 0.24);
  color: #c8ebef;
  background: rgba(10, 47, 60, 0.72);
  text-overflow: ellipsis;
}

#refreshBtn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 9px 13px 10px;
  border-color: rgba(76, 213, 224, 0.32);
  border-radius: 7px;
  box-shadow: inset 0 0 24px rgba(65, 225, 225, 0.045), 0 8px 28px rgba(0, 0, 0, 0.24);
}

.metric-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.metric-symbol {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.metric-copy { min-width: 0; display: grid; grid-template-rows: 16px 34px 14px; align-items: center; }
.metric-copy label { color: #cce0e6; font-size: 12px; white-space: nowrap; }
.metric-copy strong { color: #fff; font-size: 34px; line-height: 34px; }
.metric-copy small { overflow: hidden; color: #8ca8b2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.metric-card.inpatient { color: #39e7cf; background: linear-gradient(120deg, rgba(7, 68, 70, 0.96), rgba(3, 29, 39, 0.94)); }
.metric-card.pending { color: #6ea6ff; background: linear-gradient(120deg, rgba(15, 56, 93, 0.96), rgba(3, 27, 43, 0.94)); }
.metric-card.dueSoon { color: #ffc043; background: linear-gradient(120deg, rgba(83, 54, 7, 0.96), rgba(35, 26, 8, 0.94)); }
.metric-card.overdue { color: #ff6976; background: linear-gradient(120deg, rgba(83, 24, 34, 0.96), rgba(39, 13, 23, 0.94)); }
.metric-card.processing { color: #42e2c2; background: linear-gradient(120deg, rgba(5, 63, 61, 0.96), rgba(3, 31, 39, 0.94)); }
.metric-card.done { color: #77b3ff; background: linear-gradient(120deg, rgba(13, 53, 82, 0.96), rgba(4, 28, 43, 0.94)); }

.main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(520px, 1.12fr) minmax(420px, 1fr);
  grid-template-rows: minmax(390px, 74fr) minmax(190px, 26fr);
  gap: 8px;
}

.panel {
  min-height: 0;
  padding: 10px;
  overflow: hidden;
}

.panel-head {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.panel h2 {
  color: #f5ffff;
  font-size: 20px;
}

.panel-head span {
  color: #79f5ee;
  font-size: 13px;
  font-weight: 900;
}

.queue-list {
  height: calc(100% - 34px);
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-color: rgba(255, 82, 99, 0.45) rgba(8, 34, 43, 0.6);
  scrollbar-width: thin;
}

.queue-list::-webkit-scrollbar,
.voice-queue::-webkit-scrollbar,
.record-list::-webkit-scrollbar {
  width: 6px;
}

.queue-list::-webkit-scrollbar-thumb,
.voice-queue::-webkit-scrollbar-thumb,
.record-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(80, 243, 239, 0.38);
}

.queue-item {
  display: grid;
  grid-template-columns: 58px 70px minmax(150px, 1fr) minmax(170px, 1fr) 84px 98px;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  border: 1px solid rgba(80, 243, 239, 0.24);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(14, 54, 66, 0.9), rgba(11, 40, 53, 0.84));
  overflow: hidden;
  padding-right: 8px;
}

.queue-item.overdue {
  border-color: rgba(255, 82, 99, 0.92);
  background: linear-gradient(90deg, rgba(202, 52, 65, 0.56), rgba(70, 21, 34, 0.78));
}

.queue-item.dueSoon {
  border-color: rgba(255, 159, 45, 0.9);
  background: linear-gradient(90deg, rgba(171, 90, 17, 0.52), rgba(63, 39, 12, 0.78));
}

.queue-priority {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-radius: 7px 0 0 7px;
  color: #fff;
  background: rgba(47, 120, 255, 0.78);
  font-weight: 900;
}

.queue-priority strong {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.queue-priority small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
}

.queue-item.overdue .queue-priority {
  background: rgba(255, 82, 99, 0.78);
}

.queue-item.dueSoon .queue-priority {
  background: rgba(255, 159, 45, 0.78);
}

.queue-avatar {
  width: 68px;
  height: 68px;
  align-self: end;
  display: grid;
  place-items: end center;
  overflow: visible;
}

.queue-avatar img,
.queue-avatar span {
  grid-area: 1 / 1;
}

.queue-avatar img {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
}

.queue-avatar span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  color: #fff;
  background: #126a72;
  font-size: 14px;
  font-weight: 900;
}

.queue-avatar.has-photo img { display: block; }
.queue-avatar.has-photo span { display: none; }

.queue-item strong,
.queue-item p,
.queue-item em,
.queue-plan small,
.queue-state small,
.call-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-pet,
.queue-task,
.queue-plan,
.queue-state {
  min-width: 0;
}

.queue-pet strong,
.queue-task strong {
  display: block;
  color: #fff;
  font-size: 18px;
  white-space: nowrap;
}

.queue-task strong {
  color: #f7ffff;
}

.queue-item p {
  margin-top: 3px;
  color: #b7dde4;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-task p {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.queue-task p span {
  min-width: 0;
  overflow: hidden;
  color: #c4dadd;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-task p em {
  flex: none;
  margin-left: 6px;
  color: #8fd6d4;
  font-style: normal;
  white-space: nowrap;
}

.queue-plan,
.queue-state {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 7px;
  background: rgba(5, 23, 33, 0.38);
}

.queue-plan small,
.queue-state small {
  max-width: 100%;
  color: #9bc8d0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.queue-plan strong {
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.queue-state {
  border: 1px solid rgba(255, 159, 45, 0.18);
  background: rgba(255, 159, 45, 0.12);
}

.queue-state strong {
  color: #ffe9a6;
  font-size: 13px;
  white-space: nowrap;
}

.queue-item.overdue .queue-state {
  border-color: rgba(255, 82, 99, 0.35);
  background: rgba(255, 82, 99, 0.18);
}

.queue-item.overdue .queue-state strong,
.queue-item.overdue .queue-state small {
  color: #ffd4d9;
}

.queue-item.dueSoon .queue-state strong,
.queue-item.dueSoon .queue-state small {
  color: #ffe0a6;
}

.voice-panel {
  display: grid;
  grid-template-rows: 28px minmax(190px, 0.46fr) minmax(180px, 0.54fr);
  gap: 8px;
  border-color: rgba(80, 243, 239, 0.4);
  background: linear-gradient(180deg, rgba(5, 37, 49, 0.98), rgba(3, 20, 30, 0.96));
}

.voice-panel-head {
  min-height: 28px;
  margin-bottom: 0;
}

.voice-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 0;
}

.voice-panel-head .voice-title-mark {
  margin-right: 9px;
}

.voice-title-mark {
  width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
}

.voice-title-mark i {
  width: 2px;
  border-radius: 2px;
  background: #58eee4;
  box-shadow: 0 0 7px rgba(88, 238, 228, 0.46);
}

.voice-title-mark i + i {
  margin-left: 4px;
}

.voice-title-mark i:nth-child(1),
.voice-title-mark i:nth-child(5) { height: 8px; }
.voice-title-mark i:nth-child(2),
.voice-title-mark i:nth-child(4) { height: 15px; }
.voice-title-mark i:nth-child(3) { height: 20px; }

.voice-status-pill {
  min-width: 82px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 13px;
  border: 1px solid rgba(116, 216, 193, 0.32);
  border-radius: 999px;
  color: #9be8d0 !important;
  background: rgba(22, 102, 83, 0.34);
  box-shadow: inset 0 0 12px rgba(73, 227, 189, 0.08);
  font-size: 12px !important;
  white-space: nowrap;
}

.voice-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.voice-status-pill[data-state="speaking"] {
  color: #75f0b4 !important;
  border-color: rgba(117, 240, 180, 0.44);
  background: rgba(18, 109, 73, 0.42);
}

.voice-status-pill[data-state="loading"] {
  color: #ffd071 !important;
  border-color: rgba(255, 208, 113, 0.4);
  background: rgba(116, 78, 20, 0.38);
}

.voice-status-pill[data-state="attention"],
.voice-status-pill[data-state="error"] {
  color: #ff969f !important;
  border-color: rgba(255, 103, 118, 0.42);
  background: rgba(116, 31, 48, 0.42);
}

.voice-status-pill[data-state="idle"] {
  color: #91aeb5 !important;
  border-color: rgba(145, 174, 181, 0.25);
  background: rgba(81, 103, 110, 0.2);
}

.call-board {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(80, 243, 239, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 42, 57, 0.8), rgba(3, 27, 39, 0.68));
  box-shadow: inset 0 0 24px rgba(80, 243, 239, 0.035);
}

.current-call-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 16px 24px 10px;
}

.speaker-mark {
  width: 108px;
  height: 108px;
  justify-self: center;
  display: grid;
  place-items: center;
}

.speaker-mark svg {
  width: 104px;
  height: 104px;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(95, 255, 246, 0.48));
}

.speaker-body {
  fill: #7ffff7;
}

.speaker-wave {
  fill: none;
  stroke: #7ffff7;
  stroke-linecap: round;
  stroke-width: 5.5;
}

.speaker-wave.large {
  opacity: 0.72;
}

.speaker-mark.playing .speaker-body {
  animation: speaker-body-breathe 0.9s ease-in-out infinite;
}

.speaker-mark.playing .speaker-wave {
  animation: speaker-wave-spread 1.25s cubic-bezier(0.2, 0.7, 0.25, 1) infinite both;
  will-change: opacity, transform;
}

.speaker-mark.playing .speaker-wave.large {
  animation-delay: 0.22s;
}

.call-content {
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

.call-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  align-self: center;
  margin: 0;
  color: #79fff6;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.28;
  text-shadow: 0 0 14px rgba(68, 238, 229, 0.2);
}

.next-call-preview {
  display: grid;
  gap: 6px;
  padding: 11px 20px 13px;
  border-top: 1px solid rgba(80, 243, 239, 0.14);
  background: rgba(2, 22, 32, 0.52);
}

.next-call-preview span {
  color: #9bbbc2;
  font-size: 12px;
  font-weight: 800;
}

.next-call-preview strong {
  overflow: hidden;
  color: #ffd27b;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-queue-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  overflow: hidden;
  padding: 7px 12px 9px;
  border: 1px solid rgba(80, 243, 239, 0.25);
  border-radius: 8px;
  background: rgba(2, 23, 33, 0.62);
}

.voice-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.voice-queue-head > strong {
  color: #d3f6f6;
  font-size: 13px;
}

.voice-queue-head > strong i {
  margin-right: 5px;
  color: #61e8df;
  font-style: normal;
}

.voice-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.voice-controls > * + * {
  margin-left: 8px;
}

.voice-controls small {
  overflow: hidden;
  max-width: 180px;
  color: #83a7af;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-controls button {
  min-height: 24px;
  padding: 3px 9px;
  color: #bfe9e8;
  border-color: rgba(94, 205, 204, 0.3);
  background: rgba(20, 83, 91, 0.48);
  font-size: 10px;
}

.voice-controls .demo-voice-button {
  color: #ffe0a6;
  border-color: rgba(255, 177, 59, 0.55);
  background: rgba(185, 105, 17, 0.26);
  font-weight: 800;
}

.voice-queue {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.voice-row {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 28px minmax(120px, 0.9fr) minmax(130px, 1fr) 100px 48px 96px;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(80, 243, 239, 0.12);
}

.voice-row:last-child { border-bottom: 0; }

.voice-rank {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: rgba(55, 119, 214, 0.9);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.voice-row.overdue .voice-rank {
  background: rgba(255, 82, 99, 0.86);
}

.voice-row:nth-child(3) .voice-rank {
  background: rgba(31, 166, 158, 0.9);
}

.voice-target,
.voice-task,
.voice-plan,
.voice-wait,
.voice-countdown {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-target {
  color: #e1f3f4;
  font-weight: 800;
}

.voice-task {
  color: #e7bd5e;
  font-style: normal;
  font-weight: 800;
}

.voice-row:nth-child(2) .voice-task { color: #64a8ff; }
.voice-row:nth-child(3) .voice-task { color: #48d5bd; }

.voice-plan {
  display: flex;
  align-items: center;
  gap: 0;
  color: #c5d9dd;
}

.voice-plan i {
  margin-right: 8px;
  color: #78979f;
  font-style: normal;
}

.voice-plan b { font-weight: 800; }

.voice-wait {
  color: #98adb3;
  text-align: center;
}

.voice-countdown {
  color: #ffde7a;
  font-weight: 900;
  text-align: right;
}

.voice-empty {
  grid-row: 1 / -1;
  align-self: center;
  color: #6f9098;
  text-align: center;
}

.bottom-grid {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--lower-panel-columns);
  gap: 8px;
}

.room-panel,
.type-panel,
.record-panel {
  min-height: 0;
}

.legend {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
}

.legend span + span {
  margin-left: 4px;
}

.legend span {
  padding: 2px 5px;
  border-radius: 999px;
  color: #bdd7de;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.legend .empty { color: #9fb0bd; }
.legend .occupied,
.legend .observing { color: #88f7d2; }
.legend .cleaning { color: #ffe080; }
.legend .maintenance,
.legend .overdue { color: #ff9aa5; }

.room-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--room-count, 5), minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  overflow: hidden;
}

.room-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(80, 243, 239, 0.18);
  border-radius: 8px;
  background: rgba(7, 35, 46, 0.72);
}

.room-card h3 {
  margin-bottom: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 3px;
}

.bed {
  min-width: 0;
  min-height: 28px;
  padding: 3px 2px;
  border-radius: 4px;
  background: rgba(112, 127, 139, 0.48);
}

.bed.occupied,
.bed.observing {
  background: rgba(32, 208, 155, 0.52);
}

.bed.cleaning {
  background: rgba(242, 191, 53, 0.78);
}

.bed.maintenance,
.bed.overdue {
  background: rgba(255, 82, 99, 0.78);
}

.bed.empty {
  background: rgba(112, 127, 139, 0.48);
  opacity: 0.82;
}

.bed strong,
.bed small {
  display: block;
  overflow: hidden;
  color: #fff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bed strong {
  font-size: 10px;
}

.bed small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
}

.room-panel,
.type-panel,
.record-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.duty-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 2px;
  overflow: hidden;
}

.duty-group {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid rgba(80, 243, 239, 0.2);
  border-radius: 6px;
  padding: 2px 4px;
  background: rgba(7, 42, 53, 0.72);
}

.duty-group-head {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding-right: 3px;
  border-right: 1px solid rgba(80, 243, 239, 0.18);
}

.duty-group-head strong {
  color: #bde9eb;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.duty-group-head span {
  display: block;
  color: #82c8ee;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.duty-group.nurse .duty-group-head span {
  color: #7bd9c4;
}

.member-list {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.member-page {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 3px;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(26px, 1fr));
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s linear 0.7s;
  pointer-events: none;
}

.member-page.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.member-item {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 28px minmax(11px, auto);
  align-content: center;
  justify-items: center;
  gap: 1px;
  border-radius: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.member-avatar { position: relative; width: 28px; height: 28px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(104, 185, 226, 0.46); border-radius: 50%; color: #fff; background: #174d6c; font-size: 9px; font-weight: 900; }
.member-avatar img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: none; object-fit: cover; object-position: center; }
.member-avatar.has-photo img { display: block; }
.member-avatar.has-photo > span { visibility: hidden; }
.duty-group.nurse .member-avatar { border-color: rgba(77, 220, 190, 0.45); background: #145b54; }
.member-item strong { width: 100%; display: block; overflow: hidden; color: #f2ffff; font-size: 9px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.duty-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 9px; text-align: center; }

.type-panel { padding: 8px; }
.type-panel .panel-head { min-height: 22px; margin-bottom: 4px; gap: 5px; }
.type-panel h2 { font-size: 16px; }
.type-panel .panel-head span { font-size: 11px; }
.type-chart { min-height: 0; display: grid; grid-template-columns: minmax(92px, 0.82fr) minmax(104px, 1fr); align-items: center; gap: 6px; overflow: hidden; }
.type-donut { position: relative; width: 124px; height: 124px; display: grid; place-items: center; justify-self: center; border-radius: 50%; box-shadow: 0 0 26px rgba(62, 199, 212, 0.2); }
.type-donut svg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.type-donut-track,
.type-donut-segment { fill: none; stroke-width: 14; }
.type-donut-track { stroke: rgba(94, 153, 164, 0.2); }
.type-donut-segment { stroke-linecap: butt; }
.type-donut span { z-index: 1; display: grid; text-align: center; }
.type-donut small { color: #adc7ce; font-size: 10px; }
.type-donut strong { color: #fff; font-size: 31px; line-height: 1; }
.type-legend { min-width: 0; display: grid; align-content: center; gap: 6px; }
.type-legend > div { min-width: 0; display: grid; grid-template-columns: 8px minmax(0, 1fr) 20px 30px; align-items: center; gap: 4px; font-size: 9px; }
.type-legend i { width: 7px; height: 7px; border-radius: 2px; }
.type-legend span { overflow: hidden; color: #d4e5e8; text-overflow: ellipsis; white-space: nowrap; }
.type-legend strong { color: #fff; text-align: right; }
.type-legend small { color: #78959e; }

.record-list {
  --record-columns: 40px minmax(58px, 0.95fr) minmax(38px, 0.65fr) minmax(54px, 1.15fr) minmax(42px, 0.72fr) 16px;
  display: grid;
  grid-template-rows: 24px repeat(5, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

.record-head,
.record-item {
  min-width: 0;
  display: grid;
  grid-template-columns: var(--record-columns);
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.record-head {
  border-bottom: 1px solid rgba(80, 243, 239, 0.2);
  color: #789ca5;
  font-size: 9px;
  font-weight: 800;
}

.record-item {
  border-bottom: 1px solid rgba(80, 243, 239, 0.12);
  color: #d6e8eb;
  font-size: 10px;
}

.record-item:nth-child(even) {
  background: rgba(45, 128, 143, 0.035);
}

.record-head > span,
.record-item > strong,
.record-item > span,
.record-item > em,
.record-item > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-item > strong {
  color: #9ceefa;
}

.record-location {
  display: flex !important;
  align-items: center;
  gap: 0;
  overflow: hidden !important;
}

.record-location span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-location b {
  flex: 0 0 auto;
  margin-left: 3px;
  color: #8edee5;
  font-size: 9px;
  white-space: nowrap;
}

.record-item > em {
  color: #e4e7c8;
  font-style: normal;
}

.record-item > small {
  color: #a9c0c5;
  font-size: 9px;
}

.record-item > i {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #05241c;
  background: #64e49f;
  box-shadow: 0 0 8px rgba(100, 228, 159, 0.35);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.record-list > .empty-text {
  grid-row: 1 / -1;
  align-self: center;
}

.empty-text {
  padding: 18px 0;
  text-align: center;
}

footer.news-ticker {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--lower-panel-columns);
  gap: 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(80, 243, 239, 0.34);
  border-radius: 8px;
  color: #eaffff;
  background: linear-gradient(90deg, rgba(8, 52, 61, 0.98), rgba(4, 24, 35, 0.98));
  box-shadow: inset 0 0 22px rgba(80, 243, 239, 0.06), 0 8px 24px rgba(0, 0, 0, 0.24);
}

.ticker-feed {
  grid-column: 2 / 4;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(80, 243, 239, 0.2);
  border-radius: 6px;
  background: rgba(2, 23, 33, 0.58);
}

.ticker-label {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 18px;
  border-right: 1px solid rgba(80, 243, 239, 0.24);
  color: #7ffaf2;
  background: rgba(21, 116, 111, 0.3);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ticker-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: #ff6976;
  box-shadow: 0 0 10px rgba(255, 105, 118, 0.82);
}

.ticker-label span {
  display: block;
  line-height: 1.15;
  text-align: center;
}

.ticker-window {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.ticker-track {
  height: 100%;
  display: flex;
  align-items: center;
  width: max-content;
  color: #e9f7f8;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
}

.ticker-track span {
  min-width: 58vw;
  padding: 0 90px 0 36px;
  box-sizing: border-box;
}

@keyframes speaker-wave-spread {
  0% { opacity: 0; transform: translateX(-3px); }
  30% { opacity: 1; }
  72% { opacity: 0.72; }
  100% { opacity: 0; transform: translateX(9px); }
}

@keyframes speaker-body-breathe {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-height: 840px) {
  .board {
    --main-left-column: calc(52.8302% - 3.17px);
    --lower-panel-columns: var(--main-left-column) minmax(190px, 0.35fr) minmax(300px, 0.65fr);
    grid-template-rows: 50px 80px minmax(0, 1fr) 54px;
    gap: 6px;
    padding: 6px;
  }

  .main-grid {
    grid-template-rows: minmax(350px, 74fr) minmax(132px, 26fr);
    gap: 6px;
  }

  .bottom-grid,
  footer.news-ticker {
    gap: 6px;
  }

  .panel {
    padding: 8px;
  }

  .bottom-grid .panel {
    padding: 5px 7px;
  }

  .bottom-grid .panel-head {
    min-height: 20px;
    gap: 5px;
    margin-bottom: 3px;
  }

  .bottom-grid .panel h2 {
    font-size: 13px;
  }

  .bottom-grid .panel-head span {
    font-size: 9px;
  }

  .legend {
    gap: 2px;
  }

  .legend span {
    padding: 1px 3px;
    font-size: 8px;
  }

  .room-grid {
    gap: 4px;
  }

  .room-card {
    padding: 4px;
    border-radius: 6px;
  }

  .room-card h3 {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .bed-grid {
    gap: 2px;
  }

  .bed {
    min-height: 22px;
    padding: 2px 1px;
  }

  .bed strong {
    font-size: 9px;
  }

  .bed small {
    font-size: 7px;
  }

  .metric-grid { gap: 6px; }

  .queue-item {
    min-height: 62px;
    grid-template-columns: 50px 58px minmax(125px, 1fr) minmax(125px, 0.95fr) 72px 78px;
    gap: 6px;
  }

  .queue-avatar { width: 56px; height: 60px; }

  .queue-avatar span { width: 38px; height: 38px; }

  .queue-priority strong {
    font-size: 18px;
  }

  .queue-pet strong,
  .queue-task strong {
    font-size: 15px;
  }

  .queue-plan strong {
    font-size: 20px;
  }

  .queue-state small,
  .queue-plan small {
    font-size: 10px;
  }

  .type-chart {
    grid-template-columns: minmax(86px, 0.82fr) minmax(100px, 1fr);
    gap: 5px;
  }

  .type-donut {
    width: 92px;
    height: 92px;
  }

  .type-donut strong {
    font-size: 21px;
  }

  .type-donut small {
    font-size: 8px;
  }

  .type-legend {
    gap: 3px;
  }

  .type-legend > div {
    grid-template-columns: 7px minmax(0, 1fr) 17px 25px;
    gap: 3px;
    font-size: 8px;
  }

  .record-list {
    grid-template-rows: 18px repeat(5, minmax(0, 1fr));
  }

  .record-head {
    font-size: 8px;
  }

  .record-item {
    font-size: 9px;
  }

  .call-board {
    min-height: 0;
  }

  .voice-panel {
    grid-template-rows: 24px minmax(140px, 0.46fr) minmax(135px, 0.54fr);
    gap: 5px;
  }

  .voice-panel-head {
    min-height: 24px;
  }

  .voice-status-pill {
    min-height: 24px;
    padding: 3px 10px;
  }

  .current-call-main {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 14px 6px;
  }

  .speaker-mark {
    width: 76px;
    height: 76px;
  }

  .speaker-mark svg {
    width: 72px;
    height: 72px;
  }

  .call-text {
    -webkit-line-clamp: 2;
    font-size: 20px;
  }

  .call-content {
    grid-template-rows: minmax(0, 1fr);
  }

  .next-call-preview {
    gap: 3px;
    padding: 6px 13px 7px;
  }

  .next-call-preview span { font-size: 10px; }
  .next-call-preview strong { font-size: 13px; }

  .voice-queue-panel {
    grid-template-rows: 24px minmax(0, 1fr);
    padding: 4px 8px 5px;
  }

  .voice-row {
    grid-template-columns: 24px minmax(100px, 0.9fr) minmax(105px, 1fr) 82px 42px 82px;
    gap: 5px;
    padding: 2px 5px;
    font-size: 9px;
  }

  .voice-rank {
    width: 20px;
    height: 20px;
  }

  .duty-list { gap: 3px; padding: 1px; }
  .duty-group { grid-template-columns: 32px minmax(0, 1fr); padding: 1px 3px; }
  .duty-group-head { padding-right: 2px; }
  .duty-group-head strong { font-size: 8px; line-height: 1.1; }
  .member-page { top: 0; right: 0; bottom: 0; left: 2px; grid-template-columns: repeat(6, minmax(21px, 1fr)); gap: 1px; }
  .member-item { grid-template-rows: 24px minmax(10px, auto); }
  .member-avatar { width: 24px; height: 24px; font-size: 8px; }
  .member-item strong { font-size: 8px; }
  .ticker-label { gap: 5px; padding: 0 10px; font-size: 10px; }
  .ticker-track { font-size: 11px; }
  .ticker-track span { min-width: 58vw; padding-right: 70px; padding-left: 28px; }
}

/* Native-scale lobby televisions need visible panel depth in bright rooms. */
.board:not(.compact-fit) {
  --panel: linear-gradient(180deg, #0a3140 0%, #072630 100%);
  background: #041923;
}

.board:not(.compact-fit) .call-board {
  background: linear-gradient(180deg, #0b3545, #072632);
}

.board:not(.compact-fit) .voice-queue-panel,
.board:not(.compact-fit) .ticker-feed {
  background: #072631;
}

.board:not(.compact-fit) .room-card,
.board:not(.compact-fit) .duty-group {
  background: #0a303c;
}

.board:not(.compact-fit) footer.news-ticker {
  background: linear-gradient(90deg, #0a3440, #061f2b);
}

/* Television scaling can turn subpixel cyan borders into bright white lines. */
.board.compact-fit {
  --line: #0d252c;
  --panel: #021219;
  --panel-strong: #031f29;
  background: var(--compat-canvas);
}

.board.compact-fit .board-header,
.board.compact-fit .metric-card,
.board.compact-fit .panel {
  border-color: #123039;
  box-shadow: none;
}

.board.compact-fit .board-header {
  padding-top: 3px;
  padding-bottom: 3px;
  background: linear-gradient(90deg, #031a21, #010a10);
}

.board.compact-fit .metric-card.inpatient {
  background: linear-gradient(120deg, #032b2d, #011218);
}

.board.compact-fit .metric-card.pending {
  background: linear-gradient(120deg, #08243b, #01111b);
}

.board.compact-fit .metric-card.dueSoon {
  background: linear-gradient(120deg, #2a1d05, #120d03);
}

.board.compact-fit .metric-card.overdue {
  background: linear-gradient(120deg, #2b0d16, #14060b);
}

.board.compact-fit .metric-card.processing {
  background: linear-gradient(120deg, #032824, #011319);
}

.board.compact-fit .metric-card.done {
  background: linear-gradient(120deg, #071f32, #01121b);
}

.board.compact-fit .title-block > .mark {
  width: 36px;
  height: 36px;
  border-width: 1px;
  border-color: #24515a;
  box-shadow: none;
  font-size: 22px;
}

.board.compact-fit .action-block > button {
  padding-top: 3px;
  padding-bottom: 3px;
  border-color: #254650;
  border-radius: 6px;
  box-shadow: none;
  line-height: 1.1;
}

.board.compact-fit .action-block small {
  font-size: 12px;
}

.board.compact-fit #voiceBtn {
  border-color: #743541;
  box-shadow: none;
}

.board.compact-fit .panel-head {
  padding-right: 2px;
  padding-left: 2px;
}

.board.compact-fit .metric-card {
  padding: 7px 11px;
  border-color: #153640;
  box-shadow: none;
}

.board.compact-fit .metric-copy {
  grid-template-rows: 14px 30px 12px;
  row-gap: 4px;
}

.board.compact-fit .metric-copy label {
  line-height: 14px;
}

.board.compact-fit .metric-copy strong {
  font-size: 30px;
  line-height: 30px;
}

.board.compact-fit .metric-copy small {
  line-height: 12px;
}

.board.compact-fit .metric-icon {
  box-shadow: none;
}

.board.compact-fit .queue-item {
  border-color: #23434b;
}

.board.compact-fit .queue-item.overdue {
  border-color: #7a3542;
}

.board.compact-fit .queue-item.dueSoon {
  border-color: #765127;
}

.board.compact-fit .queue-item.overdue .queue-state {
  border-color: #63303a;
}

.board.compact-fit .queue-item.dueSoon .queue-state {
  border-color: #654825;
}

.board.compact-fit .voice-panel,
.board.compact-fit .call-board,
.board.compact-fit .voice-queue-panel,
.board.compact-fit .room-card,
.board.compact-fit .duty-group,
.board.compact-fit footer.news-ticker,
.board.compact-fit .ticker-feed {
  border-color: #14323a;
  box-shadow: none;
}

.board.compact-fit .call-board {
  background: linear-gradient(180deg, #031a22, #010d13);
}

.board.compact-fit .voice-queue-panel,
.board.compact-fit .room-card,
.board.compact-fit .duty-group,
.board.compact-fit footer.news-ticker,
.board.compact-fit .ticker-feed {
  background-color: #011017;
}

.board.compact-fit .voice-status-pill {
  min-height: 20px;
  padding-top: 2px;
  padding-bottom: 2px;
  border-color: #294a48;
  box-shadow: none;
}

.board.compact-fit .voice-controls button {
  min-height: 20px;
  padding-top: 2px;
  padding-bottom: 2px;
  border-color: #24454b;
  box-shadow: none;
}

/* Keep the active target visible without turning it into a hard white block. */
.board.compact-fit button:focus,
.board.compact-fit button.remote-focused {
  position: relative;
  z-index: 10;
  outline: none;
  border-color: rgba(139, 239, 233, 0.82);
  box-shadow:
    0 0 0 1px rgba(239, 255, 254, 0.76),
    0 0 0 3px rgba(80, 243, 239, 0.26),
    0 0 16px rgba(80, 243, 239, 0.34),
    inset 0 0 10px rgba(80, 243, 239, 0.08) !important;
}

/* Keep the logical target after ten idle seconds, but let its highlight recede. */
.board.remote-focus-idle button:focus,
.board.remote-focus-idle button.remote-focused,
.board.remote-focus-idle input:focus,
.board.remote-focus-idle input.remote-focused {
  outline: none;
  border-color: var(--line);
  box-shadow: none !important;
}

.board.compact-fit .duty-group {
  padding: 3px 4px;
}

.board.compact-fit .duty-group-head {
  padding: 2px 4px 2px 2px;
  border-right-color: #17343b;
}

.board.compact-fit .type-donut,
.board.compact-fit .ticker-label i {
  box-shadow: none;
}

/* Clinical outcomes are distinct from a handled task. */
.record-item > i.record-outcome { width: auto; min-width: 30px; height: auto; padding: 2px 3px; border-radius: 4px; font-size: 9px; white-space: nowrap; background: #f7cd72; color: #3d2d0b; box-shadow: none; }
.record-item > i.record-outcome[data-outcome="completed"] { background: #64e49f; color: #05241c; }
.record-item > i.record-outcome[data-outcome="not-executed"], .record-item > i.record-outcome[data-outcome="exception"] { background: #ffb4b4; color: #611d1d; }
