.shell.phone-view {
  width: min(430px, 100vw);
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--band);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(32, 42, 53, 0.02), 0 18px 55px rgba(32, 42, 53, 0.18);
}

@media (max-width: 760px) {
  .shell.phone-view {
    width: 100%;
    max-width: none;
    margin: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .shell.phone-view {
    width: min(860px, 100vw);
  }
}

.shell.phone-view .layout {
  display: block;
  min-height: auto;
}

.shell.phone-view .topbar {
  gap: 8px;
  padding: 8px 10px 10px;
}

.shell.phone-view .sidebar {
  border-right: 0;
  border-top: 1px solid rgba(34, 119, 111, 0.16);
  border-bottom: 2px solid rgba(34, 119, 111, 0.22);
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 8px 10px 9px;
  overflow-x: auto;
  background:
    linear-gradient(90deg, rgba(31, 112, 104, 0.13), rgba(63, 111, 159, 0.11), rgba(166, 111, 47, 0.12)),
    #f6faf7;
  backdrop-filter: blur(10px);
}

.shell.phone-view .sidebar::before {
  content: "Unit navigation";
  display: block;
  margin: 0 0 5px 1px;
  color: #47616a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shell.phone-view .facility-navigator {
  min-width: min(260px, calc(100vw - 22px));
  margin: 0 0 7px;
  padding: 7px 9px;
  background: rgba(232, 244, 239, 0.92);
}

.shell.phone-view .facility-navigator label {
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 8px;
}

.shell.phone-view .sidebar-nav {
  display: flex;
  gap: 7px;
  min-width: max-content;
}

.shell.phone-view .nav-button {
  width: auto;
  min-width: 92px;
  min-height: 38px;
  margin-bottom: 0;
  padding: 8px 10px;
  border: 1px solid rgba(63, 111, 159, 0.28);
  background: rgba(255, 253, 249, 0.94);
  color: #263746;
  font-size: 13px;
  font-weight: 720;
  gap: 8px;
  box-shadow: 0 3px 9px rgba(32, 42, 53, 0.06);
}

.shell.phone-view .nav-button.active {
  border-color: rgba(34, 119, 111, 0.68);
  background: linear-gradient(180deg, #fffdf9 0%, #e4f0ec 100%);
  color: #0b6b63;
  box-shadow: inset 0 -4px 0 rgba(34, 119, 111, 0.68), 0 5px 14px rgba(32, 42, 53, 0.13);
}

.shell.phone-view .nav-button span:first-child {
  white-space: nowrap;
}

.shell.phone-view .nav-button.allosight-nav span:first-child {
  min-width: 118px;
}

.shell.phone-view .nav-button.allosight-nav small {
  display: none;
}

.shell.phone-view .nav-button.allosight-nav {
  border-color: rgba(111, 79, 143, 0.42);
  background: linear-gradient(180deg, #f8f0f8 0%, #eaddea 100%);
  color: #5c3a6f;
}

.shell.phone-view .nav-button.allosight-nav.active {
  border-color: rgba(111, 79, 143, 0.7);
  background: linear-gradient(180deg, #fbf5fb 0%, #e6d7e8 100%);
  color: #4f2b66;
  box-shadow: inset 0 -4px 0 rgba(111, 79, 143, 0.62), 0 5px 14px rgba(32, 42, 53, 0.13);
}

.shell.phone-view .main {
  padding: 14px;
  overflow-x: hidden;
}

.shell.phone-view .modal {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 16px);
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 22px);
  overflow: hidden;
}

.shell.phone-view .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}

.shell.phone-view .modal-backdrop {
  align-items: flex-start;
  padding: 8px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.shell.phone-view .modal-head {
  padding: 10px 12px;
}

.shell.phone-view .modal-head h3 {
  font-size: 16px;
  line-height: 1.15;
}

.shell.phone-view .study-intro.compact-acknowledgement {
  gap: 8px;
}

.shell.phone-view .study-intro.compact-acknowledgement h3 {
  font-size: 18px;
  line-height: 1.15;
}

.shell.phone-view .study-intro.compact-acknowledgement p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.3;
}

.shell.phone-view .popia-statement {
  gap: 7px;
  padding: 9px 10px;
  border-left-width: 4px;
}

.shell.phone-view .popia-statement p {
  font-size: 11.5px;
  line-height: 1.25;
}

.shell.phone-view .compact-acknowledgement .checkline {
  margin-top: 8px !important;
  font-size: 12px;
  line-height: 1.25;
}

.shell.phone-view .form-grid label {
  min-width: 0;
}

.shell.phone-view .topbar,
.shell.phone-view .view-header,
.shell.phone-view .panel-head {
  flex-direction: column;
  align-items: stretch;
}

.shell.phone-view .patient-top,
.shell.phone-view .grid.units,
.shell.phone-view .grid.metrics,
.shell.phone-view .grid.two,
.shell.phone-view .details,
.shell.phone-view .form-grid,
.shell.phone-view .settings-row,
.shell.phone-view .split-grid,
.shell.phone-view .guide-hero,
.shell.phone-view .guide-steps {
  grid-template-columns: minmax(0, 1fr);
}

.shell.phone-view .action-item {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 7px;
  padding: 8px;
}

.shell.phone-view .action-list {
  gap: 6px;
  margin-top: 8px;
}

.shell.phone-view .action-text strong {
  font-size: 13px;
  line-height: 1.18;
}

.shell.phone-view .action-text span {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

.shell.phone-view .registry-readiness {
  width: 64px;
  height: 64px;
}

.shell.phone-view .action-meta,
.shell.phone-view .mini-actions {
  justify-content: flex-start;
  gap: 6px;
}

.shell.phone-view .mini-actions .btn {
  width: auto;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

.shell.phone-view .event-item {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}

.shell.phone-view .daily-note-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.shell.phone-view .era-prd-toolbar,
.shell.phone-view .era-prd-item {
  grid-template-columns: 1fr;
}

.shell.phone-view .era-prd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.shell.phone-view .era-prd-code {
  justify-self: start;
  padding: 0 12px;
}

.shell.phone-view .brand {
  align-items: center;
  gap: 8px;
}

.shell.phone-view .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.shell.phone-view .brand-mark svg {
  width: 30px;
  height: 30px;
}

.shell.phone-view .brand h1 {
  font-size: 17px;
}

.shell.phone-view .brand span {
  display: none;
}

.shell.phone-view .topbar > .top-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.shell.phone-view .topbar > .top-actions .top-action-group,
.shell.phone-view .topbar > .top-actions .admin-menu,
.shell.phone-view .topbar > .top-actions .admin-menu summary {
  width: 100%;
}

.shell.phone-view .topbar > .top-actions .top-action-group {
  display: contents;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.shell.phone-view .btn {
  width: 100%;
  min-height: 31px;
  padding: 6px 7px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.12;
  white-space: normal;
}

.shell.phone-view input:not([type="checkbox"]):not([type="radio"]),
.shell.phone-view select,
.shell.phone-view textarea,
.shell.phone-view .input,
.shell.phone-view .select,
.shell.phone-view .textarea {
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.shell.phone-view input[type="date"] {
  min-width: 0;
}

.shell.phone-view .form-save-bottom .btn {
  min-height: 50px;
  padding: 13px 16px;
  font-size: 18px;
  line-height: 1.08;
  border-radius: 9px;
}

.shell.phone-view .topbar > .top-actions .top-action-group.study-tools .btn {
  grid-column: span 2;
}

.shell.phone-view .role-switch {
  display: none;
}

.shell.phone-view .topbar > .top-actions .admin-menu summary {
  min-height: 31px;
}

.shell.phone-view .topbar > .top-actions .admin-menu {
  display: contents;
}

.shell.phone-view .patient-actions,
.shell.phone-view .action-row,
.shell.phone-view .action-row.capture {
  width: 100%;
  justify-items: stretch;
  justify-content: stretch;
}

.shell.phone-view .action-row {
  display: grid;
  grid-template-columns: 1fr;
}

.shell.phone-view .view-actions-stack {
  width: 100%;
}

.shell.phone-view .demo-banner {
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell.phone-view .banner-full {
  display: none;
}

.shell.phone-view .banner-short {
  display: inline;
}

.shell.phone-view .admin-menu-panel {
  position: static;
  grid-column: 1 / -1;
  margin-top: 8px;
}

.shell.phone-view .table-wrap {
  overflow-x: auto;
}

.shell.phone-view table {
  min-width: 640px;
}

.shell.phone-view th,
.shell.phone-view td {
  padding: 7px 8px;
  font-size: 11.5px;
  line-height: 1.18;
}

.shell.phone-view td strong {
  font-size: 12.5px;
}

.shell.phone-view td .subtle {
  font-size: 10.5px;
}

.shell.phone-view .badge {
  min-height: 20px;
  padding: 3px 7px;
  font-size: 10px;
}

.shell.phone-view .panel {
  padding: 12px;
}

.shell.phone-view .section-disclosure > .panel {
  padding: 10px;
}

.shell.phone-view .panel-head {
  gap: 8px;
}

.shell.phone-view .panel-head .btn {
  width: auto;
  justify-self: start;
}

