:root {
  --bg: #eef3f7;
  --bg-soft: #f7fafc;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --border: #dce5ef;
  --line: #e8eef5;
  --text: #0f1726;
  --text-soft: #3b4a61;
  --muted: #6b7a90;
  --primary: #0e7490;
  --primary-strong: #155e75;
  --primary-soft: #e1f4fb;
  --accent: #f59e0b;
  --danger: #be123c;
  --danger-soft: #ffe6ee;
  --success: #0f766e;
  --success-soft: #dcfce7;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-1: 0 6px 18px rgba(9, 30, 66, 0.08);
  --shadow-2: 0 12px 28px rgba(9, 30, 66, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body,
input,
button,
textarea,
select {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

body {
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at -10% -10%, #d6eef9 0%, transparent 56%),
    radial-gradient(900px 500px at 110% -5%, #fef3d0 0%, transparent 58%),
    linear-gradient(180deg, #eef3f7 0%, #f7fafc 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

*:focus-visible {
  outline: 2px solid rgba(14, 116, 144, 0.5);
  outline-offset: 2px;
}

.icon-svg {
  display: inline-block;
  vertical-align: middle;
  color: inherit;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-svg.icon-fill {
  fill: currentColor;
  stroke: none;
}

.device {
  position: relative;
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #edf3f9 100%);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.status-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: calc(54px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 16px 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-bar-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  z-index: 2;
}

.status-bar-time {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 14px;
}

.status-bar-notch {
  width: 68px;
  height: 6px;
  border-radius: 999px;
  background: #d7e1ec;
}

.screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page {
  min-height: 100%;
  padding-bottom: calc(92px + var(--safe-bottom));
  animation: fade-in 280ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--line);
}

.header-branded {
  background: linear-gradient(105deg, rgba(14, 116, 144, 0.08), rgba(245, 158, 11, 0.09));
}

.brand-name {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-title {
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.icon-chevron {
  margin-right: 2px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.icon-btn:hover {
  border-color: #c6d4e2;
  background: #f9fbff;
}

.icon-btn:active {
  transform: scale(0.96);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 8px 18px rgba(14, 116, 144, 0.25);
}

.btn-outline {
  color: var(--text-soft);
  background: #fff;
  border-color: var(--border);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(145deg, #e11d48 0%, var(--danger) 100%);
}

.btn-sm {
  width: auto;
  min-height: 34px;
  font-size: 13px;
  padding: 6px 10px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.field input,
.search-wrap input,
.form-content select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.field input::placeholder,
.search-wrap input::placeholder {
  color: #8a97ab;
}

.tab-placeholder {
  color: var(--muted);
  font-size: 14px;
}

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

/* Login */

#page-login .screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 22px;
}

.bg-graphic {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-graphic-login .bg-circle,
.bg-graphic-dashboard .bg-shape {
  position: absolute;
  border-radius: 999px;
}

.bg-graphic-login .bg-circle-1 {
  width: 280px;
  height: 280px;
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.22), rgba(14, 116, 144, 0));
}

.bg-graphic-login .bg-circle-2 {
  width: 200px;
  height: 200px;
  left: -100px;
  bottom: 120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0));
}

.bg-graphic-login .bg-circle-3 {
  width: 120px;
  height: 120px;
  right: 20px;
  bottom: 60px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.16), rgba(14, 116, 144, 0));
}

.bg-pattern-crosses,
.bg-pattern-dots {
  position: absolute;
  inset: 0;
  opacity: 0.18;
}

.bg-pattern-crosses {
  background-image: linear-gradient(transparent 95%, rgba(14, 116, 144, 0.15) 95%), linear-gradient(90deg, transparent 95%, rgba(14, 116, 144, 0.15) 95%);
  background-size: 24px 24px;
}

.login-logo,
.login-title,
.login-sub,
#page-login .field,
#page-login .btn,
.login-footer,
.login-tagline {
  position: relative;
  z-index: 2;
}

.login-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  border-radius: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--primary) 0%, #083344 100%);
  box-shadow: 0 16px 30px rgba(8, 51, 68, 0.33);
}

.login-logo-text {
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 27px;
  font-weight: 700;
}

.login-logo-cross {
  position: absolute;
  width: 28px;
  height: 28px;
  right: 8px;
  bottom: 8px;
}

.login-title {
  margin: 0;
  text-align: center;
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 32px;
  font-weight: 600;
}

.login-sub {
  margin: 6px 0 22px;
  text-align: center;
  color: var(--muted);
}

.login-footer {
  margin-top: 16px;
  text-align: center;
}

.login-footer a {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
}

.login-tagline {
  margin-top: 16px;
  text-align: center;
  color: #6f7e94;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Dashboard */

.bg-graphic-dashboard .bg-shape-1 {
  width: 220px;
  height: 220px;
  top: -85px;
  right: -65px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.18), rgba(14, 116, 144, 0));
}

.bg-graphic-dashboard .bg-shape-2 {
  width: 150px;
  height: 150px;
  bottom: 180px;
  left: -80px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0));
}

.bg-graphic-dashboard .bg-shape-3 {
  width: 110px;
  height: 110px;
  right: 8px;
  bottom: 75px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.15), rgba(14, 116, 144, 0));
}

.bg-pattern-dots {
  background-image: radial-gradient(circle, rgba(14, 116, 144, 0.35) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
}

.dashboard-content {
  position: relative;
  z-index: 2;
  padding: 18px 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.stat-card.highlight {
  border-color: rgba(14, 116, 144, 0.4);
  background: linear-gradient(160deg, #ffffff 0%, #e8f7fd 100%);
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-card .label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.stat-card .value {
  margin-top: 3px;
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-title {
  margin: 0 0 10px;
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.quick-action .icon-svg-wrap {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action .icon-svg-wrap .icon-svg {
  fill: currentColor;
  stroke: none;
}

.quick-action .text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.quick-action .arrow {
  color: #8ca0b8;
}

.recent-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.recent-item:last-child {
  border-bottom: 0;
}

.recent-item .name {
  font-weight: 600;
}

.recent-item .meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.recent-item .badge {
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(15, 118, 110, 0.2);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

/* Lists */

.list-toolbar {
  padding: 14px 16px;
}

.search-wrap {
  position: relative;
}

.search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a99ad;
  pointer-events: none;
}

.search-wrap input {
  padding-left: 39px;
}

.filter-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  padding: 6px 12px;
}

.chip.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.list-content,
.treatment-plan-list-content,
.requisitions-content,
.more-content,
.notifications-content,
.forgot-content,
.treatment-detail-content,
.req-detail-content,
.lab-report-content {
  padding: 0 16px 16px;
}

.list-item,
.tp-list-item,
.req-list-item,
.more-item,
.notifications-item,
.plan-sheet-item,
.form-section,
.treatment-detail-patient,
.treatment-sheet-block,
.lab-report-patient-card,
.lab-report-service-card,
.req-detail-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.list-item,
.tp-list-item,
.req-list-item {
  display: block;
  margin-bottom: 11px;
  padding: 14px;
}

.list-item .row1,
.req-row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.list-item .name,
.tp-list-item .tp-patient,
.req-list-item .req-code {
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.list-item .id,
.list-item .row2,
.tp-meta,
.req-meta,
.req-patient,
.notifications-item .time,
.p-meta,
.lab-report-invoice {
  color: var(--muted);
  font-size: 13px;
}

.list-item .status,
.req-status {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
}

.list-item .status.admitted {
  color: var(--primary-strong);
  background: #dff3f9;
}

.list-item .status.discharged {
  color: #5f6e82;
  background: #e8edf3;
}

.req-status.pending {
  color: #8a5300;
  background: #ffefca;
}

.req-status.sent {
  color: var(--primary-strong);
  background: #ddf1fa;
}

.req-status.completed {
  color: var(--success);
  background: var(--success-soft);
}

.list-item-actions {
  margin-top: 8px;
}

.plans-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
}

/* Treatment plans */

.treatment-plans-header,
.prescription-patient-bar {
  margin: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #ffffff 0%, #ecf8ff 100%);
  padding: 12px 14px;
}

.treatment-plans-header .patient-name,
.prescription-patient-bar .p-name,
.lab-report-patient-name {
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.treatment-plans-header .patient-meta {
  font-size: 13px;
  color: var(--muted);
}

.treatment-plans-actions,
.treatment-detail-actions,
.prescription-actions-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 14px;
}

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

.plan-sheet-list {
  padding: 0 16px 16px;
}

.plan-sheet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.plan-date {
  font-weight: 600;
}

.plan-id {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.plan-action {
  min-width: 62px;
  text-align: center;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
  background: var(--primary);
}

.treatment-detail-patient {
  padding: 12px;
  margin-bottom: 12px;
}

.treatment-detail-patient .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 6px;
}

.treatment-detail-patient .row:last-child {
  margin-bottom: 0;
}

.treatment-detail-patient .label {
  color: var(--muted);
}

.treatment-sheet-block {
  overflow: hidden;
}

.sheet-head,
.req-detail-table th,
.lab-report-service-header {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  font-weight: 700;
}

.sheet-head,
.lab-report-service-header {
  padding: 10px 12px;
  font-size: 13px;
}

.treatment-sheet-table,
.req-detail-table,
.lab-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.treatment-sheet-table th,
.treatment-sheet-table td,
.req-detail-table th,
.req-detail-table td,
.lab-report-table th,
.lab-report-table td {
  border: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
}

.treatment-sheet-table th,
.lab-report-table th {
  background: #ecf7fd;
  color: var(--primary-strong);
}

.medicine-row td {
  background: #f7fbfe;
}

/* Requisition detail */

.req-detail-header {
  padding: 14px;
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 12px;
  background: linear-gradient(125deg, var(--primary-strong) 0%, var(--primary) 60%, #0ea5a3 100%);
}

.req-detail-title {
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.req-detail-row {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.95;
}

/* Prescription */

.prescription-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.prescription-grid-main {
  padding: 0 16px;
}

.prescription-section-label {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.prescription-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prescription-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.prescription-tab.active {
  border-color: rgba(14, 116, 144, 0.5);
  background: var(--primary-soft);
}

.prescription-tab-text {
  min-width: 0;
}

.prescription-tab-label {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

.prescription-tab-desc {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prescription-tab-arrow {
  color: #8092a7;
  font-size: 17px;
}

.prescription-tab-panes {
  margin: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.prescription-tab-pane {
  display: none;
  padding: 10px;
}

.prescription-tab-pane.active {
  display: block;
}

.pane-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  --pane-cols: 2;
}

.pane-grid-row {
  display: grid;
  grid-template-columns: repeat(var(--pane-cols), minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  font-size: 12px;
  align-items: center;
}

.pane-grid-row:last-of-type {
  border-bottom: 0;
}

.pane-grid-row.pane-grid-head {
  font-weight: 700;
  color: var(--primary-strong);
  background: #edf8fd;
  border-radius: 10px 10px 0 0;
}

.pane-grid-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-grid-add {
  margin-top: 8px;
  margin-left: 8px;
}

.pane-grid-history {
  --pane-cols: 5;
}

.pane-grid-inquiry,
.pane-grid-gp,
.pane-grid-systemic,
.pane-grid-diet,
.pane-grid-instructions {
  --pane-cols: 2;
}

.pane-grid-diagnosis,
.pane-grid-lab,
.pane-grid-radiology {
  --pane-cols: 3;
}

.pane-grid-treatment {
  --pane-cols: 4;
}

.prescription-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

/* Lab report */

.lab-report-patient-card {
  margin-bottom: 11px;
  padding: 12px;
}

.lab-report-export {
  margin-bottom: 11px;
}

.lab-report-service-card {
  overflow: hidden;
  margin-bottom: 11px;
}

.service-sub {
  opacity: 0.88;
  font-size: 11px;
  font-weight: 500;
}

.col-reading {
  text-align: center;
}

.col-param {
  font-weight: 600;
}

/* More and notifications */

.more-item,
.notifications-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  padding: 12px;
}

.more-item-icon {
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.logout-btn {
  border-color: #f4c3d0;
  color: var(--danger);
  background: #fff7fa;
}

.logout-btn .more-item-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.arrow,
.icon-arrow {
  color: #8da1b8;
}

/* Overlay and tab bar */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 23, 41, 0.42);
  backdrop-filter: blur(4px);
}

.overlay.visible {
  display: flex;
}

.overlay-sheet {
  width: min(100%, 440px);
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px;
  box-shadow: 0 -10px 22px rgba(11, 23, 41, 0.2);
}

.overlay-sheet h3 {
  margin: 0 0 8px;
  font-family: "Outfit", "Source Sans 3", sans-serif;
  font-size: 20px;
}

.overlay-close {
  margin-top: 10px;
}

.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(72px + var(--safe-bottom));
  padding: 8px 6px calc(8px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.tab {
  flex: 1;
  text-decoration: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
}

.tab .tab-icon {
  width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab.active {
  color: var(--primary);
}

body.show-login #main-tab-bar,
body.show-form #main-tab-bar,
body.show-treatment-plans #main-tab-bar,
body.show-treatment-plan-detail #main-tab-bar,
body.show-treatment-plan-list #main-tab-bar,
body.show-requisitions #main-tab-bar,
body.show-requisition-detail #main-tab-bar,
body.show-prescription #main-tab-bar,
body.show-lab-report #main-tab-bar,
body.show-notifications #main-tab-bar,
body.show-forgot-password #main-tab-bar {
  display: none;
}

/* Desktop and mobile tuning */

@media (max-width: 480px) {
  .device {
    width: 100%;
    box-shadow: none;
  }

  .header-title {
    font-size: 20px;
  }

  .card-grid {
    gap: 10px;
  }

  .stat-card .value {
    font-size: 24px;
  }

  .prescription-tabs {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  body {
    padding: 26px 0;
  }

  .device {
    min-height: calc(100vh - 52px);
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}