:root {
  --bg: #e8eeea;
  --panel: #f8fbf9;
  --card: #ffffff;
  --ink: #1d2d28;
  --muted: #68766f;
  --line: #d6dfda;
  --green: #17805b;
  --green-dark: #0f5f45;
  --green-soft: #e2f3eb;
  --danger: #c43c32;
  --amber: #c98718;
  --graphite: #26302c;
  --screen: #f6faf8;
  --shadow: 0 18px 42px rgba(26, 44, 38, 0.14);
  --font-4: 12px;
  --font-5: 13px;
  --font-6: 14px;
  --font-7: 15px;
  --outer-font-min: 14px;
  --outer-font-mid: 16px;
  --outer-font-max: 18px;
  --presentation-width: 1600px;
  --presentation-height: 900px;
  --presentation-scale: 1;
  --app-font: Roboto, "Noto Sans Thai", "Leelawadee UI", "Segoe UI", Tahoma, Arial, sans-serif;
  font-family: var(--app-font);
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--app-font);
  font-size: var(--outer-font-min);
  background:
    linear-gradient(180deg, rgba(23, 128, 91, 0.08), transparent 34%),
    var(--bg);
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, filter 0.08s ease;
}

button:active:not(:disabled) {
  transform: scale(0.97);
  filter: brightness(0.96);
}

.app-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--presentation-width);
  height: var(--presentation-height);
  min-height: 0;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
  transform: translate(-50%, -50%) scale(var(--presentation-scale));
  transform-origin: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 280px minmax(360px, 1fr);
  grid-template-rows: 80px 88px;
  gap: 8px 10px;
  align-items: stretch;
}

.brand-card {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.brand-card.brand-ready {
  padding: 12px 16px;
}

.brand-ready-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.brand-ready-copy h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  color: var(--green-dark);
}

.brand-ready-copy p {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.phase-timer-panel {
  grid-column: 3;
  grid-row: 1 / 3;
  border: 1px solid rgba(23, 128, 91, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.phase-timer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phase-timer-head strong {
  font-size: var(--outer-font-mid);
}

.phase-timer-head button {
  min-height: 28px;
  border-radius: 7px;
  padding: 5px 10px;
  background: var(--danger);
  color: #fff;
  font-size: var(--outer-font-min);
  font-weight: 900;
}

.phase-timer-list {
  display: grid;
  gap: 2px;
  align-content: start;
}

.phase-timer-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px;
  align-items: center;
  font-size: var(--outer-font-min);
  line-height: 1.05;
}

.phase-timer-row span {
  color: var(--muted);
  font-weight: 800;
}

.phase-timer-row span.active {
  color: var(--green-dark);
  animation: phaseBlink 0.9s ease-in-out infinite;
}

.phase-timer-row strong {
  color: var(--green-dark);
  font-size: var(--outer-font-mid);
  line-height: 1.05;
}

@keyframes phaseBlink {
  50% { opacity: 0.32; }
}

.app-header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 460px) 130px 112px;
  gap: 12px;
  align-items: center;
}

.brand-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green-dark);
  font-size: var(--outer-font-min);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: var(--outer-font-mid);
}

.phase-card,
.system-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.phase-card {
  padding: 12px;
}

.phase-card.phase-main {
  min-height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  border-color: rgba(23, 128, 91, 0.36);
  background: linear-gradient(180deg, #ffffff, #edf8f2);
}

.phase-card span {
  display: block;
  color: var(--muted);
  font-size: var(--outer-font-min);
  font-weight: 700;
}

.phase-card strong {
  display: block;
  margin-top: 5px;
  font-size: var(--outer-font-mid);
  line-height: 1;
  color: var(--green-dark);
}

.phase-card.phase-main strong {
  font-size: var(--outer-font-max);
}

.timer-card strong {
  font-size: var(--outer-font-mid);
}

.reset-header-btn {
  min-height: 72px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: var(--outer-font-min);
  font-weight: 950;
  box-shadow: var(--shadow);
}

.top-system {
  display: block;
  min-height: 122px;
}

.system-card {
  padding: 14px;
  min-width: 0;
}

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

.btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 850;
  color: var(--ink);
  background: #edf3ef;
  border: 1px solid #dce5df;
}

.btn.success,
.mobile-btn.success {
  background: var(--green);
  color: white;
}

.btn.danger,
.mobile-btn.danger {
  background: var(--danger);
  color: white;
}

.btn.subtle,
.mobile-btn.quiet {
  background: #eef3f0;
  color: var(--green-dark);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.dispatch-strip .button-row {
  margin: 0;
}

.top-control-grid {
  display: grid;
  grid-template-columns: 300px 310px minmax(420px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.control-frame {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-height: 112px;
  align-content: center;
}

.dispatch-center-frame {
  grid-column: 1;
  grid-row: 2;
}

.paramedic-room-frame {
  grid-column: 2;
  grid-row: 2;
}

.paramedic-room-frame {
  position: relative;
  overflow: hidden;
}

.paramedic-room-frame.urgent-ring {
  border-color: rgba(196, 60, 50, 0.8);
  background: linear-gradient(180deg, #fff, #fff4f2);
  animation: urgentGlow 0.85s ease-in-out infinite;
}

.paramedic-room-frame.urgent-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(196,60,50,0.14), transparent);
  transform: translateX(-100%);
  animation: urgentSweep 1.1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes urgentGlow {
  50% { box-shadow: 0 0 0 4px rgba(196, 60, 50, 0.12), 0 18px 42px rgba(196, 60, 50, 0.16); }
}

@keyframes urgentSweep {
  100% { transform: translateX(100%); }
}

.desk-status {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef5f1;
}

.urgent-ring .desk-status {
  background: var(--danger);
  color: #fff;
}

.control-title {
  display: grid;
  gap: 2px;
}

.control-title strong {
  font-size: var(--outer-font-mid);
  line-height: 1.05;
}

.control-title span {
  color: var(--muted);
  font-size: var(--outer-font-min);
  font-weight: 800;
}

.btn.wide {
  width: 100%;
}

.button-row.compact {
  margin: 0;
}

.tts-panel {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 10px 12px;
}

.card-head.slim {
  margin-bottom: 8px;
  align-items: center;
}

.script-panel {
  flex: 1;
  max-height: 104px;
}

.button-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.presenter-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.presenter-shortcuts button {
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 8px;
  background: #e8f3ee;
  color: var(--green-dark);
  font-size: var(--outer-font-min);
  font-weight: 900;
}

em.success {
  background: var(--green-soft);
  color: var(--green-dark);
}

em.danger {
  background: #fdecea;
  color: var(--danger);
}

.karaoke-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f4;
  padding: 10px;
  max-height: 104px;
  overflow: auto;
}

.voice-line {
  color: var(--green-dark);
  font-size: var(--outer-font-min);
  font-weight: 850;
  margin-bottom: 8px;
}

.karaoke-box p {
  margin: 0 0 6px;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--muted);
  font-size: var(--outer-font-min);
  line-height: 1.32;
}

.karaoke-box p.active {
  background: var(--green);
  color: white;
  font-weight: 850;
}

.karaoke-box p.done {
  color: var(--green-dark);
}

.shift-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.shift-tabs button,
.name-pills button {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f1f6f3;
  padding: 8px;
  color: var(--ink);
}

.shift-tabs button strong,
.shift-tabs button span {
  display: block;
}

.shift-tabs button.selected,
.name-pills button.selected {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.assign-list {
  display: grid;
  gap: 8px;
  max-height: 292px;
  overflow: auto;
}

.assign-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px;
  align-items: center;
}

.assign-row strong,
.assign-row span {
  display: block;
}

.assign-row span {
  color: var(--muted);
  font-size: var(--font-4);
  margin-top: 2px;
}

.name-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.name-pills button {
  padding: 7px 9px;
  font-weight: 800;
  font-size: var(--font-4);
}

.case-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.case-summary div,
.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  min-width: 0;
}

.case-summary span,
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 800;
}

.case-summary strong,
.metric-grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: var(--font-4);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.pitch-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin: 10px 0 2px;
}

.pitch-flow div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 4px;
  text-align: center;
  background: #f2f6f3;
}

.pitch-flow div.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.pitch-flow b,
.pitch-flow span {
  display: block;
}

.pitch-flow b {
  font-size: var(--font-4);
}

.pitch-flow span {
  font-size: var(--font-4);
  font-weight: 900;
}

.timeline-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 168px;
  overflow: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  font-size: var(--font-4);
}

.timeline-item time {
  color: var(--muted);
  font-family: var(--app-font);
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item span {
  color: var(--muted);
}

.phone-dock {
  display: grid;
  width: 1520px;
  max-width: 1800px;
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  align-items: start;
  align-content: start;
  justify-content: stretch;
  flex: 1;
}

/* Unified 16:9 presenter command panel */
.command-panel {
  width: 1520px;
  margin: 0 auto;
  height: 216px;
  flex: 0 0 216px;
  display: grid;
  grid-template-columns: 600px 330px 250px minmax(210px, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(23, 128, 91, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(26, 44, 38, 0.13);
  overflow: hidden;
}

.command-panel.urgent-ring {
  border-color: rgba(196, 60, 50, 0.8);
  box-shadow: 0 0 0 4px rgba(196, 60, 50, 0.12), 0 12px 30px rgba(26, 44, 38, 0.13);
}

.command-brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #0c5a42, #17805b);
  position: relative;
}

.command-brand h1 {
  margin: 0;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.command-brand p {
  max-width: 250px;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 760;
  color: rgba(255, 255, 255, 0.86);
}

.command-brand p span { display: block; }

.panel-reset {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 7px;
  color: #0f5f45;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 900;
}

.command-controls {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 9px;
}

.command-node {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  padding: 10px 12px;
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #f7faf8;
}

.command-node span,
.command-node strong {
  font-size: 16px;
  line-height: 1.05;
  white-space: nowrap;
}

.command-node strong { color: var(--green-dark); }

.command-button {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.command-button.dispatch,
.command-button.answer { background: var(--green); }
.command-button.hangup { background: var(--danger); }
.command-call-buttons { display: flex; gap: 6px; }

.comparison-block {
  min-width: 0;
  padding: 2px 0;
  overflow: hidden;
}

.comparison-block h2 {
  margin: 0 0 5px;
  font-size: 18px;
  line-height: 1.05;
  color: var(--green-dark);
}

.comparison-head,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 58px;
  gap: 5px;
  align-items: center;
}

.ack-block .comparison-head,
.ack-block .comparison-row {
  grid-template-columns: 128px 48px 48px;
  justify-content: start;
}

.info-block .comparison-head,
.info-block .comparison-row {
  grid-template-columns: minmax(86px, 1fr) 60px 60px;
  justify-content: start;
}

.comparison-head {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: #e7f2ec;
  color: #53655d;
  font-size: 12px;
}

.comparison-head b { text-align: center; color: var(--green-dark); }

.comparison-row {
  min-height: 28px;
  padding: 3px 7px;
  border-bottom: 1px solid #e2e9e5;
  font-size: 13px;
}

.comparison-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.comparison-row > strong,
.captured-time {
  text-align: center;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.now-capture {
  min-height: 27px;
  padding: 4px 5px;
  border-radius: 7px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 3px 8px rgba(196, 60, 50, 0.2);
}

.info-live-list {
  max-height: 140px;
  overflow: hidden;
}

.info-block .comparison-row {
  min-height: 27px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.info-block .now-capture { min-height: 20px; padding: 2px 5px; }

.info-live-list.is-empty {
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px dashed #cddbd3;
  border-radius: 8px;
  margin-top: 7px;
}

.info-live-list p {
  margin: 0;
  padding: 8px;
  color: #7b8982;
  font-size: 13px;
  text-align: center;
}

.phone-unit {
  min-width: 0;
}

.phone-title {
  min-height: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 2px;
}

.phone-title strong,
.phone-title span {
  display: block;
}

.phone-title strong {
  font-size: 20px;
  line-height: 0.95;
  font-weight: 950;
}

.phone-title span {
  color: var(--muted);
  font-size: var(--outer-font-min);
  text-align: center;
}

.muted {
  color: var(--muted);
}

.device-frame {
  width: 100%;
  max-width: min(100%, 300px);
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  height: auto;
  min-height: 0;
  border-radius: 26px;
  background: linear-gradient(135deg, #5a625f, #171d1b 18%, #0f1513 82%, #4d5652);
  padding: 10px;
  position: relative;
  box-shadow: 0 20px 34px rgba(17, 28, 24, 0.28);
  touch-action: manipulation;
  user-select: none;
}

.device-frame.device-ringing {
  animation: phoneRing 0.34s linear infinite;
  box-shadow: 0 0 0 4px rgba(196,60,50,0.18), 0 20px 34px rgba(196, 60, 50, 0.28);
}

@keyframes phoneRing {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-1px) rotate(-0.25deg); }
  75% { transform: translateX(1px) rotate(0.25deg); }
}

.device-side {
  position: absolute;
  width: 3px;
  border-radius: 5px;
  background: #46514c;
}

.side-left {
  left: -2px;
  top: 90px;
  height: 64px;
}

.side-right {
  right: -2px;
  top: 122px;
  height: 82px;
}

.phone-screen {
  height: 100%;
  border-radius: 16px;
  background: var(--screen);
  overflow: hidden;
  position: relative;
  color: var(--ink);
  overscroll-behavior: contain;
  font-size: var(--font-5);
}

.android-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  background: #f7f8f8;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.android-nav span,
.android-nav button {
  width: 20px;
  height: 18px;
  background: transparent;
  position: relative;
}

.android-menu::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 2px;
  border-radius: 2px;
  background: #8d9290;
  box-shadow: 0 5px 0 #8d9290, 0 10px 0 #8d9290;
}

.android-home::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 4px;
  top: 3px;
  border-radius: 50%;
  background: #8d9290;
}

.android-back::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 5px;
  top: 3px;
  border-left: 3px solid #5d6360;
  border-bottom: 3px solid #5d6360;
  transform: rotate(45deg);
}

.incoming-fullscreen .android-nav {
  display: none;
}

.punch-hole {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0a0f0d;
  z-index: 4;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
}

.screen-off {
  background: #050807;
}

.screen-off .punch-hole {
  opacity: 0.52;
}

.off-glass {
  height: 100%;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,0.07), transparent 18%),
    linear-gradient(140deg, rgba(255,255,255,0.08), transparent 28%),
    #050807;
}

.lock-screen {
  height: 100%;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(15, 95, 69, 0.82), rgba(7, 14, 11, 0.94)),
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.16), transparent 34%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 18px 28px;
  touch-action: none;
  user-select: none;
}

.lock-time {
  font-size: var(--font-7);
  line-height: 1;
  font-weight: 800;
}

.lock-date {
  margin-top: 10px;
  color: rgba(255,255,255,0.74);
  font-weight: 800;
}

.unlock-hint {
  margin-top: auto;
  display: grid;
  place-items: center;
  gap: 9px;
  color: rgba(255,255,255,0.84);
  font-size: var(--font-4);
  font-weight: 900;
}

.unlock-hint span {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
}

.smart-home {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #eef1ef;
  color: #101815;
}

.smart-status {
  height: 34px;
  display: grid;
  grid-template-columns: 54px 1fr 42px;
  align-items: center;
  padding: 6px 12px 0;
  background: var(--green-dark);
  color: white;
}

.smart-status strong {
  font-size: var(--font-4);
}

.smart-status span {
  font-size: var(--font-4);
  letter-spacing: 0;
}

.smart-hero {
  min-height: 92px;
  padding: 16px 14px;
  display: grid;
  grid-template-columns: 58px 1fr 30px;
  gap: 12px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.74), rgba(224,236,229,0.86)),
    linear-gradient(110deg, #d5ddd9, #f8faf9 42%, #c5d9cc);
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #303533 0 30%, #ffd3a4 30% 63%, #786f85 63%);
}

.profile-blank {
  min-height: 32px;
  border-radius: 2px;
  background: rgba(255,255,255,0.88);
  display: grid;
  align-items: center;
  padding: 0 10px;
  font-size: var(--font-4);
  font-weight: 850;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bell {
  display: grid;
  place-items: center;
  color: #101815;
  font-size: 20px;
  font-weight: 900;
}

.smart-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 11px 70px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.smart-content h3 {
  margin: 0 0 9px;
  color: #7b817f;
  font-size: var(--font-5);
}

.last-clock {
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.last-clock strong {
  font-size: var(--font-6);
}

.last-clock span {
  color: var(--green-dark);
  font-weight: 900;
}

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

.smart-tile {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e6ece8;
  color: #111;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 9px 5px;
  text-align: center;
}

.smart-tile span {
  color: var(--green-dark);
  font-size: var(--font-7);
  font-weight: 950;
  line-height: 1;
}

.smart-tile strong {
  font-size: var(--font-4);
  line-height: 1.16;
  font-weight: 800;
}

.work-tile {
  box-shadow: inset 0 0 0 2px rgba(23,128,91,0.14);
}

.smart-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  height: 58px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.smart-nav span {
  display: grid;
  place-items: center;
  color: #a1a6a4;
  font-size: var(--font-7);
  font-weight: 900;
}

.smart-nav span.active {
  color: var(--green);
  background: #eff8f3;
}

.smart-home {
  background: #f3f2f8;
  position: relative;
}

.smart-status {
  height: 30px;
  grid-template-columns: 1fr auto 1fr;
  padding: 0 14px;
  background: #000;
  color: #f2f2f2;
}

.smart-status strong {
  min-height: 1px;
  font-size: var(--font-4);
}

.mini-logo {
  justify-self: center;
  width: 17px;
  height: 15px;
  border-radius: 10px 10px 3px 10px;
  background: linear-gradient(135deg, #ff8c2b, #f05b24);
  transform: rotate(-35deg);
  position: relative;
}

.mini-logo::after {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border-radius: 999px;
  border: 2px solid #111;
  border-left: 0;
  border-bottom: 0;
}

.battery-mark {
  justify-self: end;
  color: #aeb0b6;
  font-weight: 900;
  font-size: var(--font-4);
}

.smart-hero {
  min-height: 168px;
  padding: 58px 12px 18px;
  display: block;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.2)),
    url("./Other/smart-home-hero.jpg") center center / cover no-repeat;
  position: relative;
}

.smart-greeting {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: start;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0,0,0,0.45);
}

.smart-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(49, 150, 224, 0.7);
}

.smart-greeting strong {
  display: block;
  font-size: var(--font-7);
  line-height: 1.08;
  font-weight: 950;
}

.points-pill {
  width: max-content;
  margin-top: 7px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: #202020;
  text-shadow: none;
  font-size: var(--font-5);
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.points-pill b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe58c 28%, #d5a923 30% 55%, #fff6c8 57%);
  box-shadow: inset 0 0 0 2px rgba(220,172,34,0.5);
}

.hero-tools {
  position: absolute;
  right: 10px;
  top: 58px;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(24, 28, 31, 0.78);
}

.hero-tools button {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: transparent;
  border: 3px solid rgba(255,255,255,0.92);
  position: relative;
}

.hero-tools button:first-child::before,
.hero-tools button:last-child::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px dashed rgba(255,255,255,0.9);
  border-radius: 8px;
}

.hero-tools button:last-child {
  border-radius: 6px 6px 6px 1px;
}

.smart-content {
  margin-top: -18px;
  padding: 0 10px 76px;
  background: #f3f2f8;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.last-clock {
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 0 15px;
  padding: 20px 16px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 11px 22px rgba(38, 42, 48, 0.16);
}

.clock-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid #20b9c6;
  position: relative;
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  border-radius: 2px;
  background: #1c2023;
  transform-origin: bottom;
}

.clock-icon::before {
  height: 10px;
  transform: translate(-50%, -100%);
}

.clock-icon::after {
  height: 8px;
  transform: translate(-50%, -100%) rotate(130deg);
}

.last-clock strong {
  margin-bottom: 10px;
  color: #0f1114;
  font-size: var(--font-7);
  line-height: 1.05;
  font-weight: 950;
}

.last-clock span,
.last-clock small {
  display: block;
  color: #22252a;
  font-size: var(--font-6);
  font-weight: 850;
}

.last-clock small {
  margin-top: 4px;
  color: #93959a;
  font-size: var(--font-5);
}

.smart-grid {
  gap: 12px;
  min-width: 0;
}

.smart-tile {
  min-width: 0;
  min-height: 82px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 13px;
  gap: 9px;
  box-shadow: 0 1px 0 rgba(31, 33, 37, 0.03);
}

.smart-tile strong {
  max-width: 100%;
  color: #111;
  font-size: var(--font-5);
  line-height: 1.12;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tile-icon {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 14px;
  position: relative;
}

.tile-icon.pin {
  border-radius: 50% 50% 50% 8px;
  background: #f18d98;
  transform: rotate(-45deg);
}

.tile-icon.pin::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  left: 13px;
  top: 13px;
}

.tile-icon.calendar {
  border-radius: 5px;
  background:
    linear-gradient(#1a93d0 0 18%, transparent 18%),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(255,255,255,0.9) 13px 18px),
    repeating-linear-gradient(180deg, #1a93d0 0 12px, #fff 12px 17px);
}

.tile-icon.payslip {
  border-radius: 4px;
  background: linear-gradient(90deg, #ff7046 0 50%, #ffe0df 50%);
}

.tile-icon.money {
  background: #dfe8e8;
}

.tile-icon.money::before {
  content: "";
  position: absolute;
  inset: 8px 11px 15px;
  background: #45a553;
}

.tile-icon.mail {
  background: #1898d8;
  clip-path: polygon(50% 0, 100% 35%, 100% 100%, 0 100%, 0 35%);
}

.tile-icon.headset {
  background: #1887bf;
}

.tile-icon.headset::before {
  content: "∩";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 42px;
  font-weight: 900;
}

.parking-banner {
  height: 70px;
  margin-top: 12px;
  border-radius: 11px 11px 0 0;
  color: #fff;
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.55), transparent 68%),
    url("./Other/smart-parking-banner.jpg") center / cover no-repeat;
  overflow: hidden;
}

.parking-banner strong {
  padding-left: 10px;
  border-left: 3px solid #fff;
  font-size: var(--font-7);
  font-weight: 950;
  line-height: 1.05;
}

.smart-nav {
  height: 72px;
  grid-template-columns: repeat(5, 1fr);
  z-index: 8;
}

.smart-nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: #fff;
  color: #111;
}

.smart-nav-item span {
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
}

.smart-nav-icon {
  width: 27px;
  height: 25px;
  position: relative;
  display: block;
}

.smart-nav-icon.home::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 17px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.smart-nav-icon.home::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 15px;
  height: 15px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.smart-nav-icon.grid {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 4px;
}

.smart-nav-icon.grid::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: 13px 0 0 -2px currentColor, 0 13px 0 -2px currentColor, 13px 13px 0 -2px currentColor;
}

.smart-nav-icon.share::before,
.smart-nav-icon.share::after {
  content: "";
  position: absolute;
}

.smart-nav-icon.share::before {
  inset: 3px 5px;
  background:
    radial-gradient(circle at 2px 2px, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 17px 8px, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 4px 20px, currentColor 0 3px, transparent 4px);
}

.smart-nav-icon.share::after {
  left: 8px;
  top: 7px;
  width: 14px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: skewY(-28deg);
}

.smart-nav-icon.bell::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 15px;
  height: 17px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 5px 5px;
}

.smart-nav-icon.bell::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.smart-nav-icon.menu::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor, 0 16px 0 currentColor;
}

.smart-nav-item strong {
  font-size: var(--font-4);
  line-height: 1;
  font-weight: 850;
}

.smart-nav-item.active {
  color: #4bb6ea;
}

.smart-work-page {
  background: #f4f3fa;
}

.work-page-head {
  height: 104px;
  padding: 54px 16px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}

.work-page-head h3 {
  grid-column: 2;
  margin: 0;
  font-size: var(--font-7);
  font-weight: 950;
}

.work-page-head button {
  justify-self: end;
  background: transparent;
  color: #58b8eb;
  font-size: var(--font-6);
  font-weight: 850;
}

.work-menu-grid {
  padding: 24px 4px 84px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 28px;
  column-gap: 4px;
}

.work-menu-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  background: transparent;
  color: #111;
  text-align: center;
}

.work-menu-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  position: relative;
}

.work-menu-icon::before {
  font-size: 28px;
}

.work-menu-icon.bed::before { content: "▰"; color: #6476c4; }
.work-menu-icon.appointment::before { content: "▦"; color: #61a56f; }
.work-menu-icon.radiation::before { content: "☢"; color: #dfaa42; }
.work-menu-icon.anesth::before { content: "▣"; color: #111; }
.work-menu-icon.survey::before { content: "iS"; color: #fff; font-size: 20px; }
.work-menu-icon.survey { background: linear-gradient(135deg, #6847e9, #8e20c8); }
.work-menu-icon.doc::before { content: "▤"; color: #c17d5a; }
.work-menu-icon.ems-duty { background: #fff; }
.work-menu-icon.ems-duty::before {
  content: "";
  width: 33px;
  height: 19px;
  border-radius: 5px 10px 5px 5px;
  background:
    linear-gradient(90deg, transparent 0 36%, #d63b33 36% 48%, transparent 48%),
    linear-gradient(#fff 0 54%, #e8f4ef 54%);
  border: 3px solid #17805b;
  box-shadow: 0 15px 0 -12px #1f2c28, 24px 15px 0 -12px #1f2c28;
}
.work-menu-icon.er-room { background: #fff; }
.work-menu-icon.er-room::before {
  content: "ER";
  color: #c43c32;
  font-size: 21px;
  font-weight: 950;
}
.work-menu-icon.activate-emergency { background: #fff; }
.work-menu-icon.activate-emergency::before {
  content: "☎";
  color: #c43c32;
  font-size: 29px;
  font-weight: 950;
  animation: workShake 0.55s linear infinite;
}
.work-menu-icon.cpr-assist { background: #fff; }
.work-menu-icon.cpr-assist::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #26302c;
  box-shadow: 0 18px 0 2px #17805b;
}
.work-menu-icon.cpr-assist::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 25px;
  height: 5px;
  border-radius: 999px;
  background: #c43c32;
  transform: rotate(-8deg);
}

@keyframes workShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.work-menu-item.ems-app-item .work-menu-icon {
  box-shadow: 0 8px 18px rgba(15, 95, 69, 0.16);
}

.work-menu-item.ems-app-item strong {
  font-size: var(--font-4);
}

.work-menu-item strong {
  max-width: 56px;
  font-size: var(--font-5);
  line-height: 1.14;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact phone chrome based on the real SmartMed screens. */
.smart-hero {
  min-height: 112px;
  padding: 34px 10px 12px;
}

.smart-greeting {
  grid-template-columns: 36px 1fr;
  gap: 8px;
}

.smart-avatar {
  width: 36px;
  height: 36px;
  box-shadow: 0 0 0 3px rgba(49, 150, 224, 0.7);
}

.smart-greeting strong { font-size: 13px; white-space: nowrap; }
.points-pill { margin-top: 4px; padding: 4px 10px; font-size: 11px; }
.points-pill b { width: 15px; height: 15px; }
.hero-tools { top: 34px; right: 8px; gap: 6px; padding: 8px 9px; border-radius: 16px; }
.hero-tools button { width: 22px; height: 22px; border-width: 2px; }
.hero-tools button:first-child::before,
.hero-tools button:last-child::before { inset: 5px; border-width: 2px; }

.smart-content {
  margin-top: -12px;
  padding: 0 8px 66px;
  overflow-y: hidden;
}

.last-clock {
  grid-template-columns: 32px 1fr;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 11px;
  border-radius: 13px;
}

.clock-icon { width: 25px; height: 25px; border-width: 3px; }
.last-clock strong { margin-bottom: 4px; font-size: 12px; white-space: nowrap; }
.last-clock span { font-size: 11px; }
.last-clock small { margin-top: 2px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart-grid { gap: 7px; }
.smart-tile { min-height: 60px; padding: 5px 3px; gap: 4px; border-radius: 10px; }
.smart-tile strong { font-size: 10px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-icon { width: 27px; height: 27px; border-radius: 9px; }
.tile-icon.pin::after { width: 8px; height: 8px; left: 9px; top: 9px; }
.tile-icon.headset::before { font-size: 30px; }
.parking-banner { height: 34px; margin-top: 7px; padding: 8px; border-radius: 8px 8px 0 0; }
.parking-banner strong { font-size: 10px; }
.smart-nav { height: 58px; }
.smart-nav-icon { width: 22px; height: 20px; transform: scale(0.82); }
.smart-nav-item { gap: 0; }
.smart-nav-item strong { max-width: 45px; font-size: 9px; line-height: 1.05; white-space: nowrap; }

.work-page-head { height: 72px; padding: 36px 12px 0; }
.work-page-head h3 { font-size: 14px; white-space: nowrap; }
.work-page-head button { font-size: 12px; }
.work-menu-grid { padding: 12px 5px 68px; row-gap: 16px; column-gap: 3px; }
.work-menu-item { gap: 5px; }
.work-menu-icon { width: 38px; height: 38px; }
.work-menu-item strong,
.work-menu-item.ems-app-item strong {
  max-width: 74px;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-menu-item small {
  max-width: 78px;
  color: #92929a;
  font-size: var(--font-4);
  line-height: 1.14;
  font-weight: 760;
}

.mobile-top {
  height: 35px;
  padding: 8px 10px 0;
  display: grid;
  grid-template-columns: 54px 1fr 42px;
  align-items: center;
  gap: 4px;
  color: #283731;
  font-size: var(--font-4);
  font-weight: 850;
}

.mobile-top > span {
  text-align: left;
}

.back-btn {
  position: absolute;
  left: 8px;
  bottom: 10px;
  z-index: 12;
  width: 34px;
  min-height: 30px;
  min-width: 34px;
  border-radius: 999px;
  padding: 0;
  background: rgba(15, 95, 69, 0.94);
  color: #fff;
  font-size: var(--font-7);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 95, 69, 0.22);
}

.phone-screen:has(.mobile-footer) .back-btn {
  bottom: 78px;
}

.phone-screen:has(.chat-screen) .back-btn {
  bottom: 168px;
}

.phone-screen:has(.smart-home) .back-btn {
  bottom: 80px;
}

.phone-screen:has(.incoming-call-ui) .back-btn,
.phone-screen:has(.outgoing-call-ui) .back-btn {
  bottom: 104px;
}

.mobile-profile {
  height: 58px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2px 12px 8px;
  border-bottom: 1px solid rgba(214, 223, 218, 0.72);
}

.mobile-profile strong,
.mobile-profile span {
  display: block;
}

.mobile-profile strong {
  font-size: var(--font-5);
  line-height: 1.1;
}

.mobile-profile span {
  min-height: 17px;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 800;
}

.mobile-profile.app-title {
  height: 54px;
  padding-bottom: 4px;
}

.mobile-profile.app-title strong {
  color: var(--green-dark);
  font-size: var(--font-6);
}

.mobile-content {
  height: calc(100% - 93px);
  padding: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.mobile-content h3,
.entry-head h3,
.chat-head h3 {
  margin: 0 0 7px;
  font-size: var(--font-7);
  line-height: 1.1;
}

.mobile-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  padding: 10px 12px 12px;
  background: rgba(246, 250, 248, 0.96);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
}

.mobile-btn {
  min-height: 42px;
  border-radius: 13px;
  font-weight: 900;
}

.mobile-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.notification-card,
.standby-card {
  display: grid;
  gap: 7px;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 22px rgba(26, 44, 38, 0.08);
}

.notification-screen {
  height: 100%;
  position: relative;
  padding-bottom: 116px;
  background: var(--screen);
}

.mobile-content.no-profile {
  height: calc(100% - 35px);
  display: grid;
  align-content: center;
}

.notification-card strong {
  font-size: var(--font-6);
  line-height: 1.45;
}

.assignment-screen {
  height: 100%;
  position: relative;
  padding-bottom: 0;
  background: var(--screen);
}

.assignment-content {
  position: absolute;
  top: 35px;
  left: 0;
  right: 0;
  bottom: 62px;
  height: auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 8px 12px 4px;
}

.assignment-screen .mobile-footer {
  padding: 8px 12px 10px;
}

.assignment-hero {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 9px;
}

.assignment-hero strong,
.assignment-hero span {
  display: block;
}

.assignment-hero strong {
  font-size: var(--font-6);
}

.assignment-hero span {
  color: var(--muted);
  font-size: var(--font-4);
  margin-top: 3px;
}

.mobile-shifts {
  margin-bottom: 9px;
}

.mobile-assign-list {
  display: grid;
  gap: 7px;
}

.mobile-assign-row {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px;
  background: #fff;
}

.mobile-assign-row strong,
.mobile-assign-row span {
  display: block;
}

.mobile-assign-row span {
  color: var(--muted);
  font-size: var(--font-4);
  margin-top: 2px;
}

.mobile-name-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.mobile-name-pills button {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef5f1;
  color: var(--ink);
  font-size: var(--font-4);
  font-weight: 900;
}

.mobile-name-pills button.selected {
  background: var(--green);
  color: #fff;
}

.notification-card span,
.notification-card small,
.standby-card small {
  color: var(--muted);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 50px;
}

.home-grid div {
  aspect-ratio: 1;
  border-radius: 15px;
  background: linear-gradient(135deg, #dfe9e3, #b8cbc0);
}

.assign-entry-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  border-radius: 16px;
  background: var(--green);
  color: white;
  font-size: var(--font-6);
  font-weight: 950;
}

.screen-note {
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
}

.standby-card {
  margin-top: 20px;
  text-align: center;
}

.standby-card span {
  color: var(--green-dark);
  font-weight: 950;
}

.standby-card strong {
  font-size: var(--font-7);
}

.ems-home-hero {
  display: grid;
  place-items: center;
  gap: 5px;
  margin: 4px 0 10px;
}

.ambulance-icon {
  width: 86px;
  height: 42px;
  border-radius: 8px 14px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 58%, #bfe7ef 58% 83%, transparent 83%),
    linear-gradient(#fff 0 62%, #dfe8e5 62%);
  border: 3px solid var(--green-dark);
  position: relative;
}

.ambulance-icon span {
  position: absolute;
  left: 9px;
  top: 11px;
  color: #d83c34;
  font-size: 13px;
  font-weight: 950;
}

.ambulance-icon span::after {
  content: "+";
  margin-left: 5px;
  color: #d83c34;
  font-size: 19px;
}

.ambulance-icon::before,
.ambulance-icon::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #26302c;
  box-shadow: inset 0 0 0 5px #fff;
}

.ambulance-icon::before { left: 10px; }
.ambulance-icon::after { right: 10px; }

.ems-status-card {
  margin: 0 0 10px;
  text-align: center;
}

.ems-home-actions {
  display: grid;
  gap: 7px;
}

.ems-home-actions button {
  min-height: 36px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 900;
}

.ems-home-actions button:disabled {
  opacity: 0.45;
}

.activate-btn {
  width: 100%;
  min-height: 72px;
  border-radius: 24px;
  margin-top: 18px;
  background: var(--danger);
  color: white;
  font-size: var(--font-7);
  font-weight: 950;
  box-shadow: 0 16px 30px rgba(196, 60, 50, 0.28);
}

.notice-stack {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.notice {
  border-radius: 10px;
  padding: 8px;
  background: #edf3ef;
  font-size: var(--font-4);
}

.notice strong,
.notice span {
  display: block;
}

.notice.success {
  background: var(--green-soft);
}

.notice.danger {
  background: #fdecea;
}

.incoming-call-ui {
  height: 100%;
  background:
    radial-gradient(circle at 50% 25%, rgba(23,128,91,0.5), transparent 28%),
    linear-gradient(180deg, #0d1714, #1a2521);
  color: white;
  text-align: center;
  padding: 54px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.incoming-call-ui .mobile-profile {
  width: 100%;
  color: rgba(255,255,255,0.95);
  border-bottom: 0;
  margin-bottom: 18px;
}

.incoming-call-ui .mobile-profile span {
  color: rgba(255,255,255,0.7);
}

.call-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  font-weight: 950;
  font-size: var(--font-6);
  margin-bottom: 24px;
  padding: 12px;
  line-height: 1.1;
  animation: callPulse 1.1s ease infinite;
}

@keyframes callPulse {
  50% { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(255,255,255,0.05); }
}

.incoming-call-ui p,
.incoming-call-ui span {
  color: rgba(255,255,255,0.7);
}

.incoming-call-ui h3 {
  font-size: var(--font-7);
  margin: 4px 0;
}

.call-actions {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding-bottom: 14px;
}

.call-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: white;
  font-weight: 900;
}

.call-btn.decline {
  background: var(--danger);
}

.call-btn.answer {
  background: var(--green);
}

.entry-screen,
.review-screen,
.chat-screen,
.phase-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--screen);
}

.entry-head,
.chat-head,
.phase-head {
  padding: 6px 14px 8px;
}

.entry-head p,
.chat-head span,
.phase-head p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-4);
}

.phase-head h3 {
  margin: 0 0 7px;
  font-size: var(--font-7);
  line-height: 1.1;
}

.phase-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 122px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.phase-screen:not(:has(.mobile-footer)) .phase-body {
  padding-bottom: 38px;
}

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

.phase-timer-line {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 900;
}

.phase-timer-line strong {
  display: block;
  margin-top: 2px;
}

.duration-grid div,
.eta-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
}

.duration-grid span,
.eta-box span {
  display: block;
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 900;
}

.duration-grid strong,
.eta-box strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: var(--font-6);
}

.phase-actions,
.vital-list {
  display: grid;
  gap: 8px;
}

.care-grid {
  display: grid;
  gap: 9px;
}

.care-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px;
  background: #fff;
}

.care-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--green-dark);
}

.care-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.care-card button {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef5f1;
  color: var(--ink);
  border: 1px solid #dce5df;
  font-weight: 850;
  font-size: var(--font-4);
}

.danger-soft {
  background: #fdecea;
  color: var(--danger);
}

.quick-status-grid,
.hospital-grid,
.esi-grid,
.notify-grid {
  display: grid;
  gap: 7px;
}

.quick-status-grid {
  grid-template-columns: repeat(2, 1fr);
}

.quick-status-grid button,
.hospital-grid button,
.esi-grid button,
.notify-box button {
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.quick-status-grid button.selected,
.hospital-grid button.selected,
.esi-grid button.selected,
.notify-box button.selected {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.airway-grid {
  display: grid;
  gap: 8px;
}

.airway-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.airway-box strong {
  color: var(--green-dark);
  font-size: var(--font-5);
}

.airway-box span {
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 850;
}

.airway-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.airway-actions button {
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #f8fbf9;
  color: var(--ink);
  font-weight: 900;
  font-size: var(--font-4);
}

.airway-actions button.selected {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.airway-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.airway-detail div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.airway-detail div.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.airway-detail span {
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 900;
}

.airway-detail strong {
  color: var(--green-dark);
  font-size: var(--font-7);
}

.vital-list div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 8px;
}

.vital-list div.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.vital-list span,
.vital-list small {
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 900;
}

.vital-list strong {
  color: var(--green-dark);
  font-size: var(--font-6);
}

.compact-pad .num-key {
  min-height: 45px;
  font-size: var(--font-6);
}

.prearrival-alert-btn {
  background: #c43c32 !important;
  color: #fff !important;
  border-color: #c43c32 !important;
  font-size: var(--font-6);
}

.prearrival-banner {
  border-radius: 12px;
  padding: 12px;
  background: #fdecea;
  border: 1px solid rgba(196, 60, 50, 0.28);
  color: var(--danger);
  font-size: var(--font-7);
  font-weight: 950;
  text-align: center;
}

.notify-grid {
  grid-template-columns: repeat(3, 1fr);
}

.notify-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.notify-box.named strong {
  grid-column: 1 / -1;
  color: var(--green-dark);
}

.notify-box.text-box {
  grid-template-columns: 1fr;
}

.notify-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.notify-mode-grid button {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: var(--font-5);
  font-weight: 900;
}

.notify-mode-grid button.selected,
.hospital-eta-box {
  border-color: rgba(196, 60, 50, 0.38);
  background: #fdecea;
  color: var(--danger);
}

.notify-box textarea {
  min-height: 76px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px;
  font: inherit;
  resize: none;
}

.esi-grid {
  grid-template-columns: 38px repeat(5, 1fr);
  align-items: center;
}

.esi-grid span {
  color: var(--muted);
  font-weight: 950;
}

.hospital-grid {
  grid-template-columns: repeat(2, 1fr);
}

.hn-status-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 7px;
}

.hn-status-card span {
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 900;
}

.hn-status-card strong {
  color: var(--green-dark);
  font-size: var(--font-7);
}

.end-service-summary {
  display: grid;
  gap: 9px;
}

.end-service-summary section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 6px;
}

.end-service-summary section > strong {
  color: var(--green-dark);
  font-size: var(--font-6);
}

.end-service-summary div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: var(--font-4);
}

.end-service-summary span {
  color: var(--muted);
  font-weight: 900;
}

.end-service-summary b {
  color: var(--green-dark);
  font-weight: 950;
  text-align: right;
}

.outgoing-call-ui {
  height: 100%;
  background: linear-gradient(180deg, #10251d, #0b1110);
  color: white;
  text-align: center;
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.outgoing-call-ui .mobile-top {
  width: 100%;
  color: rgba(255,255,255,0.88);
}

.outgoing-call-ui .back-btn {
  color: #fff;
  background: rgba(255,255,255,0.14);
}

.outgoing-call-ui h3 {
  font-size: var(--font-7);
  margin: 6px 0;
}

.outgoing-call-ui p,
.outgoing-call-ui span {
  color: rgba(255,255,255,0.7);
}

.digit-display.hn {
  margin: 0 auto;
  font-size: var(--font-7);
}

.free-hn {
  margin-top: 12px;
}

.fasttrack-confirm {
  border: 1px solid rgba(196,60,50,0.28);
  border-radius: 12px;
  padding: 9px;
  background: #fff5f3;
  display: grid;
  gap: 6px;
}

.fasttrack-confirm strong,
.fasttrack-confirm span {
  display: block;
}

.fasttrack-confirm span {
  color: var(--muted);
  font-size: var(--font-4);
}

.fasttrack-confirm button {
  min-height: 36px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 950;
}

.mileage-form {
  display: grid;
  gap: 9px;
}

.mileage-form label {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
}

.mileage-form span {
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 900;
}

.mileage-form input {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: var(--font-6);
  font-weight: 900;
}

.entry-controls {
  margin-top: auto;
  padding: 10px 12px 42px;
  display: grid;
  gap: 8px;
  max-height: 392px;
  overflow: auto;
}

.entry-screen:has(.list-buttons) .entry-controls {
  margin-top: 0;
  flex: 1;
  min-height: 0;
  max-height: none;
  align-content: start;
  padding-bottom: 42px;
}

.choice-btn {
  min-height: 48px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.choice-btn.selected,
.choice-btn.primary-bottom {
  background: var(--green);
  color: white;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.age-pad .age-enter {
  grid-column: 1 / -1;
  min-height: 34px;
  background: var(--green);
  color: #fff;
}

.age-pad .age-enter:disabled {
  opacity: 0.42;
}

.age-presets,
.age-mode-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.age-mode-actions {
  grid-template-columns: repeat(2, 1fr);
}

.age-presets button,
.age-mode-actions button {
  min-height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 900;
}

.sex-screen .entry-head h3 {
  font-size: 23px;
  color: var(--green-dark);
}

.age-screen .entry-head { padding-bottom: 3px; }
.age-screen .entry-controls { padding-top: 5px; gap: 5px; overflow: hidden; }
.age-screen .age-presets,
.age-screen .age-mode-actions { gap: 4px; margin-bottom: 4px; }
.age-screen .age-presets button,
.age-screen .age-mode-actions button { min-height: 29px; font-size: 11px; }
.age-screen .age-pad { gap: 5px; }
.age-screen .age-pad .num-key { min-height: 43px; border-radius: 11px; }

.num-key {
  min-height: 58px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: var(--font-7);
  font-weight: 950;
}

.num-key.shortcut {
  font-size: var(--font-5);
  color: var(--green-dark);
}

.digit-display {
  width: fit-content;
  min-width: 104px;
  padding: 9px 14px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: var(--font-7);
  font-weight: 950;
}

.digit-display.contact {
  font-size: var(--font-7);
  width: 100%;
  min-width: 0;
  padding: 8px;
}

.digit-display.contact .digit-slots {
  width: 100%;
  gap: 2px;
}

.digit-display.contact .digit-slot {
  width: 18px;
  height: 28px;
}

.age-inline {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.age-inline > span:first-child {
  color: var(--green-dark);
  font-weight: 900;
}

.digit-slots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  vertical-align: middle;
}

.digit-group {
  display: inline-flex;
  gap: 4px;
}

.digit-slot {
  width: 22px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #eef6f1;
  border: 1px solid rgba(23, 128, 91, 0.28);
  color: var(--green-dark);
  font-size: var(--font-6);
  font-weight: 950;
  font-family: var(--app-font);
}

.digit-slot.filled {
  background: #fff;
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(23, 128, 91, 0.15);
}

.digit-slots.large .digit-slot,
.digit-slots.contact-slots .digit-slot,
.digit-slots.hn-slots .digit-slot {
  width: 26px;
  height: 34px;
  font-size: var(--font-7);
}

.digit-display.contact .digit-slots.contact-slots {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 2px;
}

.digit-display.contact .digit-slots.contact-slots .digit-group {
  gap: 2px;
}

.digit-display.contact .digit-slots.contact-slots .digit-slot {
  width: 18px;
  height: 30px;
  border-radius: 7px;
  font-size: var(--font-6);
}

.digit-display.contact .digit-slots.contact-slots .digit-separator {
  width: 7px;
  font-size: var(--font-4);
}

.digit-separator {
  align-self: center;
  color: var(--muted);
  font-size: var(--font-5);
  font-weight: 900;
}

.slot-caption {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--font-4);
  font-weight: 850;
  text-align: center;
}

.cbd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(13, minmax(34px, 1fr));
  grid-auto-flow: column;
  gap: 3px;
  min-height: 100%;
}

.cbd-grid button {
  min-height: 34px;
  height: 100%;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 8px;
  font-weight: 850;
  line-height: 1.05;
  padding: 3px 4px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  text-align: left;
  overflow: hidden;
}

.cbd-grid strong,
.cbd-grid span {
  display: block;
}

.cbd-grid strong {
  color: var(--green-dark);
  font-size: 9px;
  margin-bottom: 0;
  text-align: center;
}

.cbd-grid span {
  white-space: normal;
  overflow: visible;
}

.cbd-head {
  padding: 2px 14px 3px;
}

.cbd-head h3 {
  font-size: var(--font-7);
}

.cbd-controls {
  margin-top: 0;
  flex: 1;
  min-height: 0;
  padding-top: 1px;
  padding-bottom: 36px;
  max-height: none;
  overflow: auto;
  align-content: stretch;
}

.cbd-screen .mobile-profile.app-title {
  height: 38px;
  padding-bottom: 0;
}

.severity-head h3,
.selected-cbd-title {
  font-size: var(--font-7);
  line-height: 1.08;
  font-weight: 950;
}

.selected-cbd-title {
  color: var(--green-dark);
}

.severity-controls {
  margin-top: 0;
  max-height: none;
  padding-top: 4px;
}

.severity-btn {
  min-height: 39px;
  padding: 5px 8px;
  font-size: 10px;
  text-align: left;
  line-height: 1.15;
}

.severity-controls { gap: 4px; overflow: hidden; padding-bottom: 36px; }

.severity-btn.red {
  border-color: rgba(196, 60, 50, 0.42);
  color: #9a261f;
  background: #fff6f5;
}

.severity-btn.yellow {
  border-color: rgba(201, 135, 24, 0.42);
  color: #8b5a0c;
  background: #fff7df;
}

.list-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.equipment-list {
  grid-template-columns: 1fr;
}

.equipment-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.review-screen {
  padding-bottom: 112px;
}

.response-list {
  padding: 0 12px;
  display: grid;
  gap: 7px;
  overflow: auto;
}

.response-list div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 7px;
  align-items: center;
}

.response-list span,
.response-list b {
  display: block;
}

.response-list b {
  color: var(--muted);
  font-size: var(--font-4);
  margin-top: 2px;
}

.response-list em {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: var(--font-4);
  font-style: normal;
  font-weight: 900;
  background: #edf3ef;
  white-space: nowrap;
}

.chat-screen {
  padding-bottom: 154px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
}

.chat-screen .case-summary {
  padding: 0 12px;
  grid-template-columns: repeat(2, 1fr);
}

.chat-timeline {
  padding: 0 12px 10px;
  display: grid;
  gap: 7px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  scroll-behavior: auto;
}

.empty-chat {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
  font-size: var(--font-4);
}

.chat-line {
  border-radius: 10px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: var(--font-4);
  line-height: 1.35;
}

.chat-line.success {
  background: var(--green-soft);
  color: var(--green-dark);
}

.chat-line.danger {
  background: #fdecea;
  color: var(--danger);
}

.chat-line.danger.strong {
  font-weight: 950;
}

.chat-line.case {
  background: #e7f0ff;
  color: #154a87;
}

.chat-line.message,
.chat-line.me {
  background: #fff;
  color: #111;
}

.chat-line span {
  display: block;
  overflow-wrap: anywhere;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 7px;
}

.quick-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-strip button {
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 9px;
  background: #e7f3ed;
  color: var(--green-dark);
  white-space: nowrap;
  font-size: var(--font-4);
  font-weight: 900;
}

.chat-input input {
  min-width: 0;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.chat-input button {
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-weight: 900;
}

/* Phone proportions and interaction polish */
.android-nav {
  height: 34px;
}

.android-nav span,
.android-nav button {
  width: 22px;
  height: 22px;
}

.mobile-footer { bottom: 34px; }
.smart-nav {
  bottom: 34px;
  height: 70px;
  padding: 4px 0 3px;
}

.smart-nav-item {
  grid-template-rows: 29px 14px;
  align-content: center;
  gap: 3px;
}

.smart-nav-icon {
  align-self: center;
  transform: scale(0.9);
}

.smart-nav-item strong {
  align-self: start;
  max-width: 48px;
  font-size: 9px;
  line-height: 1.05;
}

.smart-content { padding-bottom: 78px; }
.work-menu-grid { padding-bottom: 80px; }
.phone-screen:has(.mobile-footer) .back-btn { bottom: 88px; }
.phone-screen:has(.chat-screen) .back-btn { bottom: 176px; }
.phone-screen:has(.smart-home) .back-btn { bottom: 104px; }

/* Clear ambulance artwork in My Work and the EMS landing screen. */
.work-menu-icon.ems-duty::before {
  width: 34px;
  height: 20px;
  border: 2px solid #16785a;
  border-radius: 4px 8px 4px 4px;
  background:
    linear-gradient(90deg, transparent 0 18%, #d43b34 18% 27%, transparent 27%),
    linear-gradient(90deg, #fff 0 55%, #bfe7ef 55% 82%, #fff 82%);
  box-shadow: none;
}

.work-menu-icon.ems-duty::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25312d;
  box-shadow: 19px 0 0 #25312d;
}

.ems-home-hero .ambulance-icon {
  width: 104px;
  height: 50px;
  box-shadow: 0 8px 16px rgba(20, 75, 57, 0.14);
}

/* On-scene screening, repeatable recorded actions, and sequential V/S. */
.scene-screening-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(23, 128, 91, 0.3);
  border-radius: 13px;
  background: #f4fbf7;
}

.scene-screening-card > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.scene-screening-card > div > span { display: flex; gap: 5px; }
.scene-screening-card button {
  min-height: 30px;
  min-width: 48px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
}

.scene-screening-card button.selected { background: var(--green); color: #fff; }
.scene-screening-card button.selected.no { background: #6c7872; }

.care-card button.care-recorded {
  color: #0b583e;
  border-color: rgba(23, 128, 91, 0.56);
  background: #ccebdc;
  box-shadow: inset 0 0 0 1px rgba(23, 128, 91, 0.16);
}

.care-card button.care-flash { animation: careRecordedFlash 0.48s ease-in-out 3; }

@keyframes careRecordedFlash {
  0%, 100% { background: #ccebdc; transform: scale(1); }
  50% { background: #21a66f; color: #fff; transform: scale(1.04); }
}

.sequential-vitals { gap: 5px; }
.sequential-vitals div { min-height: 34px; padding: 5px 8px; }
.vital-screen .phase-head { padding-top: 5px; padding-bottom: 5px; }
.vital-screen .phase-head h3 { margin-bottom: 3px; }
.vital-screen .phase-body { gap: 6px; overflow: hidden; padding-top: 0; padding-bottom: 84px; }
.vital-pad { gap: 5px; }
.vital-pad .num-key { min-height: 40px; border-radius: 11px; }
.vital-pad .enter-key { background: var(--green); color: #fff; }

.eta-entry-display {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(23, 128, 91, 0.28);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.eta-entry-display span { color: var(--muted); font-size: 11px; font-weight: 850; }
.eta-entry-display strong { color: var(--green-dark); font-size: 16px; }
.eta-pad { gap: 6px; }
.eta-pad .num-key { min-height: 44px; }
.eta-pad .enter-key { background: var(--green); color: #fff; }
.eta-pad .enter-key:disabled { opacity: 0.45; }

/* Single-box Fast Track selection and ER confirmation. */
.unified-notify-grid { grid-template-columns: 1fr; }
.fasttrack-all-box { gap: 8px; }
.fasttrack-option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.fasttrack-option-grid button { min-height: 34px; font-size: 11px; }
.fasttrack-all-box textarea {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px;
  resize: none;
  font: inherit;
}
.fasttrack-all-box .send-notify { background: var(--green); color: #fff; }

.live-eta-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(196, 60, 50, 0.25);
  border-radius: 12px;
  background: #fff5f3;
}
.live-eta-card span { color: var(--muted); font-size: 10px; font-weight: 850; }
.live-eta-card strong { color: var(--danger); font-size: 17px; }

.live-eta-card small {
  display: grid;
  gap: 2px;
}

.live-eta-card .eta-arrival-time {
  display: block;
  color: var(--danger);
  font-size: 23px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.live-eta-card .eta-countdown {
  font-size: 18px;
  line-height: 1.05;
}

/* Keep the ER prearrival decision on one phone viewport. */
.phase-screen:has(.hospital-eta-box) .phase-body {
  gap: 6px;
  padding-bottom: 92px;
}

.phase-screen:has(.hospital-eta-box) .notify-mode-grid button {
  min-height: 36px;
}

.phase-screen:has(.hospital-eta-box) .hospital-eta-box {
  gap: 3px;
  padding: 7px 9px;
}

.phase-screen:has(.hospital-eta-box) .fasttrack-all-box {
  gap: 4px;
}

.phase-screen:has(.hospital-eta-box) .fasttrack-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.phase-screen:has(.hospital-eta-box) .fasttrack-option-grid button {
  min-height: 36px;
  padding: 3px;
  font-size: 10px;
}

.phase-screen:has(.hospital-eta-box) .fasttrack-all-box textarea {
  height: 46px;
  min-height: 46px;
}

.phase-screen:has(.hospital-eta-box) .fasttrack-all-box .send-notify {
  min-height: 36px;
}
.fasttrack-confirm-list { display: grid; gap: 5px; }
.fasttrack-plan-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.fasttrack-plan-row > span { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.fasttrack-plan-row button { min-height: 27px; border-radius: 7px; background: #edf3ef; font-size: 9px; font-weight: 900; }
.fasttrack-plan-row button.selected { background: var(--green); color: #fff; }

/*
  Presentation mode keeps one 1600 × 900 composition and scales the complete
  page as a single unit. Internal phone pixels, icons, type and controls no
  longer respond independently to the physical browser width.
*/
@media (max-aspect-ratio: 16 / 9) {
  #app {
    align-items: center;
  }
}

/* v11 mobile refinements: no in-app PSU EMS banner, bottom actions, clear paged CBD. */
.mobile-content {
  height: calc(100% - 35px);
  padding-bottom: 40px;
}

.phone-screen:has(.ems-home-actions) .mobile-content {
  display: flex;
  flex-direction: column;
}

.mobile-content:has(> .phase-actions:last-child) {
  display: flex;
  flex-direction: column;
}

.mobile-content > .phase-actions:last-child {
  width: 100%;
  margin-top: auto;
}

.assignment-content {
  padding-top: 6px;
}

.assignment-screen .mobile-shifts {
  gap: 4px;
  margin-bottom: 5px;
}

.assignment-screen .mobile-shifts button {
  padding: 5px 3px;
}

.assignment-screen .mobile-assign-list {
  gap: 4px;
}

.assignment-screen .mobile-assign-row {
  padding: 5px 6px;
}

.assignment-screen .mobile-name-pills {
  gap: 3px;
  margin-top: 3px;
  flex-wrap: nowrap;
}

.assignment-screen .mobile-name-pills button {
  min-width: 0;
  min-height: 25px;
  padding: 3px 6px;
  font-size: 10px;
  white-space: nowrap;
}

.phone-screen:has(.ems-home-actions) .ems-home-actions {
  margin-top: auto;
}

.phone-screen:has(.ems-home-actions) .activate-btn {
  min-height: 58px;
  margin-top: 8px;
}

.phase-body:has(> .phase-actions:last-child) {
  display: flex;
  flex-direction: column;
}

.phase-body > .phase-actions:last-child {
  width: 100%;
  margin-top: auto;
}

.cbd-controls {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 3px 12px 36px;
}

.cbd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 5px;
  padding-bottom: 5px;
}

.cbd-head h3,
.cbd-head p {
  margin: 0;
}

.cbd-page-list {
  display: grid;
  gap: 4px;
  align-content: start;
}

.cbd-page-list button {
  width: 100%;
  min-height: 37px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.18;
}

.cbd-page-list strong {
  color: var(--green-dark);
  font-size: 12px;
  text-align: center;
}

.cbd-page-list span {
  white-space: normal;
  overflow: visible;
}

.cbd-page-nav {
  min-height: 42px;
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  grid-template-columns: 78px 1fr 78px;
  align-items: center;
  gap: 7px;
}

.cbd-page-nav button {
  min-height: 34px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.cbd-page-nav button:disabled {
  background: #dce4df;
  color: #7d8983;
}

.cbd-page-nav > span {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.cbd-page-nav i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5d0ca;
}

.cbd-page-nav i.active {
  width: 18px;
  border-radius: 999px;
  background: var(--green);
}

/* The active vital is always prominent and remains visible above the keypad. */
.vital-screen .phase-body {
  overflow: hidden;
  gap: 5px;
}

.vital-active-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  padding: 8px 10px;
  border: 2px solid var(--green);
  border-radius: 12px;
  background: #eff9f4;
}

.vital-active-card > span,
.vital-active-card > strong,
.vital-active-card > em {
  grid-column: 1;
}

.vital-active-card > span,
.vital-active-card > em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.vital-active-card > strong {
  color: var(--green-dark);
  font-size: 12px;
}

.vital-active-card > b {
  grid-column: 2;
  grid-row: 1 / 4;
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}

.vital-active-card > b small {
  font-size: 9px;
}

.vital-error {
  padding: 6px 8px;
  border-radius: 9px;
  background: #fde8e5;
  color: #9a261f;
  font-size: 9px;
  font-weight: 900;
}

.vital-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.vital-progress-grid > div {
  min-height: 29px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.vital-progress-grid > div.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.vital-progress-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.vital-progress-grid strong {
  color: var(--green-dark);
  font-size: 11px;
}

.vital-pad .num-key {
  min-height: 35px;
}

/* Keep the lock hint above Android navigation. */
.lock-screen {
  position: relative;
}

.lock-screen .unlock-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  margin: 0;
}

/* Chat rows never stretch; each sender keeps a recognizable color. */
.chat-timeline {
  align-content: start;
  grid-auto-rows: max-content;
}

.chat-line {
  align-self: start;
  min-height: 0;
}

.chat-line.chat-new {
  animation: chatMessageIn 0.16s ease-out;
}

.chat-line.chat-own {
  margin-left: 18px;
  background: #fff;
  border-color: #d7dfda;
  color: #111;
}

.chat-line.chat-role-paramedic { background: #def3e8; border-color: #b9dfcd; color: #124d39; }
.chat-line.chat-role-resident { background: #e5efff; border-color: #c5d8f6; color: #194a82; }
.chat-line.chat-role-driver { background: #fff0d9; border-color: #efd2a7; color: #744a0d; }
.chat-line.chat-role-staff { background: #eee6ff; border-color: #d7c7f5; color: #553487; }
.chat-line.chat-role-nurse { background: #ffe5ed; border-color: #f3c5d3; color: #8a3150; }

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

.live-eta-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.trauma-patient-summary {
  display: grid;
  gap: 4px;
}

.phase-screen:has(.trauma-patient-summary) .phase-body,
.phase-screen:has(.trauma-case-summary) .phase-body {
  padding-bottom: 112px;
  overflow: hidden;
  gap: 6px;
}

.trauma-patient-summary h4 {
  margin: 0 0 2px;
  color: var(--green-dark);
  font-size: 12px;
}

.trauma-patient-summary > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  line-height: 1.25;
}

.trauma-patient-summary span {
  color: var(--muted);
  font-weight: 850;
}

.trauma-patient-summary strong {
  overflow-wrap: anywhere;
}

.trauma-eta-summary {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 11px;
  background: #fff1ef;
  border: 1px solid rgba(196, 60, 50, 0.25);
}

.trauma-eta-summary > span,
.trauma-eta-summary > div {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.trauma-eta-summary > div strong {
  color: var(--danger);
  font-size: 18px;
}

.trauma-arrival-clock {
  color: var(--danger);
  font-size: 25px;
  line-height: 1.05;
  white-space: nowrap;
}

.trauma-case-summary {
  display: grid;
  gap: 4px;
  padding: 5px 2px;
  font-size: 14px;
  line-height: 1.25;
}

.trauma-case-summary p {
  margin: 0;
  overflow-wrap: anywhere;
}

.trauma-case-summary p.summary-spacer {
  margin-top: 5px;
  font-weight: 950;
  color: var(--green-dark);
}

.trauma-eta-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.trauma-eta-summary p + p {
  margin-top: 5px;
}

.trauma-eta-summary p strong {
  color: var(--danger);
  font-size: 19px;
}

.on-scene-timer {
  display: grid;
  place-items: center;
  min-height: 52px;
}

.on-scene-timer strong {
  margin: 0;
  font-size: 22px;
}

.vital-active-card > strong {
  grid-column: 1;
  align-self: center;
}

.vital-active-card > b {
  grid-row: 1;
}

.destination-grid {
  margin-top: auto;
  margin-bottom: auto;
}

.destination-confirmed {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(23, 128, 91, 0.3);
  border-radius: 12px;
  background: #f0f8f4;
  text-align: center;
}

.destination-confirmed span {
  color: var(--muted);
  font-weight: 850;
}

.destination-confirmed strong {
  color: var(--green-dark);
  font-size: 20px;
}

/* Larger, presentation-readable typography inside every mobile app screen. */
.phone-screen {
  --font-4: 14px;
  --font-5: 15px;
  --font-6: 17px;
  --font-7: 19px;
  font-size: 15px;
}

.phone-screen button {
  font-size: max(12px, 0.87em);
  line-height: 1.15;
}

.mobile-top,
.android-nav {
  font-size: 12px;
}

.assignment-screen .mobile-name-pills button {
  font-size: 12px;
}

.cbd-page-list button {
  min-height: 39px;
  font-size: 12px;
  line-height: 1.15;
}

.cbd-page-list strong {
  font-size: 14px;
}

.cbd-page-nav button {
  font-size: 12px;
}

.severity-btn,
.fasttrack-option-grid button {
  font-size: 12px;
}

.severity-controls {
  margin-top: auto;
}

.vital-active-card > span,
.vital-active-card > em,
.vital-error,
.vital-progress-grid span,
.live-eta-card span,
.live-eta-card small,
.trauma-eta-summary > span,
.trauma-eta-summary > div {
  font-size: 11px;
}

.vital-active-card > strong {
  font-size: 14px;
}

.vital-active-card > b {
  font-size: 24px;
}

.vital-progress-grid strong {
  font-size: 13px;
}

.trauma-patient-summary h4 {
  font-size: 14px;
}

.live-eta-card strong {
  font-size: 19px;
}

/* Primary controls sit at the thumb zone above Android navigation. */
.vital-pad,
.eta-pad {
  margin-top: auto;
}

.vital-screen .phase-body,
.phase-body:has(> .number-pad:last-child) {
  display: flex;
  flex-direction: column;
}

.vital-screen .phase-body {
  padding-bottom: 108px;
}

.phase-body:has(> .number-pad:last-child) > .number-pad:last-child {
  width: 100%;
  margin-top: auto;
}

.fasttrack-all-box {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.fasttrack-all-box .send-notify {
  margin-top: auto;
  min-height: 42px;
}
