.official-logo {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 6px auto 0;
  opacity: 0.88;
}
.brand-logo { display: block; width: 138px; height: 138px; object-fit: contain; }
.home-head .brand-logo { margin: -24px 0 -24px -16px; }
.splash .brand-logo { width: 230px; height: 230px; margin-bottom: -34px; }
.shared-brand { display: flex; justify-content: center; margin: 8px 0 -18px; }
.shared-brand img { width: 190px; height: 190px; object-fit: contain; }

.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; color: #607086; }
.loader { width: 34px; height: 34px; border: 3px solid #d9eef4; border-top-color: #08b99a; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-shell { padding-bottom: 0; }
.auth-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 22px; background: radial-gradient(circle at 50% 0,#dff8f3,transparent 45%),#f8fcff; }
.auth-logo { width: 178px; height: 178px; object-fit: contain; margin: -38px auto -18px; }
.auth-card { background: white; border: 1px solid #e4eaf1; border-radius: 22px; padding: 22px; box-shadow: 0 18px 45px rgba(21,52,85,.11); }
.auth-card h1 { font-size: 23px; text-align: center; margin: 0 0 7px; }
.auth-card > p { text-align: center; color: #607086; margin: 0 0 18px; }
.field textarea,.field select { width: 100%; min-height: 47px; border: 1px solid #e4eaf1; border-radius: 10px; padding: 11px 12px; background: white; font: inherit; }
.field textarea { min-height: 84px; resize: vertical; }
.form-error { min-height: 18px; color: #c83a4d; font-size: 12px; }
.appointment-tip .tip-shield .icon { color: #08b99a; }
.empty { text-align: center; padding: 36px 20px; color: #607086; }
.empty > span .icon,.empty > .icon { font-size: 42px; color: #08b99a; }
.empty h3 { color: #101928; margin-bottom: 6px; }
.empty .primary { margin-top: 12px; min-width: 150px; }
.help-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin: 10px 0 14px;
  border: 1px solid #d9ecf4;
  border-radius: 15px;
  background: linear-gradient(120deg,#f2f9ff,#effdf8);
  color: #405267;
}
.help-card > .icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e0f8ee;
  color: #00865e;
  font-weight: 900;
}
.help-card div { flex: 1; }
.help-card strong,.help-card small { display: block; }
.help-card small { margin-top: 4px; line-height: 1.45; }
.help-card button {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  min-height: 40px;
  background: #075fd2;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
}
.progress-card {
  position: relative;
  overflow: hidden;
  padding: 15px;
  margin: 12px 0;
  border: 1px solid #e4eaf1;
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 28px rgba(21,52,85,.08);
}
.progress-card div { display: flex; justify-content: space-between; gap: 10px; }
.progress-card strong,.progress-card small { display: block; }
.progress-card small { color: #607086; margin-top: 4px; }
.progress-card span { position: absolute; right: 15px; top: 15px; color: #075fd2; font-weight: 900; }
.progress-card i {
  display: block;
  height: 8px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg,#075fd2 var(--pct),#e6eef7 var(--pct));
}
.checklist-card { align-items: center; }
.checklist-card.complete { background: linear-gradient(135deg,#effcf7,#e8f7ff); }
.checklist-card button {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  background: #075fd2;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.record-full { position: relative; padding: 0; overflow: hidden; }
.record-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; padding: 15px; text-align: left; }
.record-main > div { flex: 1; }
.record-main > span { background: #e0f8ee; color: #00865e; border-radius: 7px; padding: 6px 8px; font-size: 10px; }
.record-delete { align-self: stretch; width: 38px; border: 0; border-left: 1px solid #edf0f4; background: #fff; color: #9aa7b5; font-size: 20px; }
.appointment-card { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid #e4eaf1; border-radius: 14px; background: white; box-shadow: 0 8px 28px rgba(21,52,85,.08); }
.calendar-date { width: 56px; height: 58px; border-radius: 12px; display: grid; place-content: center; text-align: center; background: #eaf4ff; color: #075fd2; text-transform: uppercase; font-size: 10px; }
.calendar-date b { display: block; font-size: 22px; }
.appointment-card > div { flex: 1; }
.appointment-card strong,.appointment-card small,.appointment-card em { display: block; }
.appointment-card small { color: #607086; margin: 5px 0; line-height: 1.45; }
.appointment-card em { color: #00a66e; font-size: 11px; font-style: normal; }
.bubble time { display: block; opacity: .65; font-size: 9px; margin-top: 5px; }
.notification p { margin: 4px 0; color: #405267; }
.notification.unread { background: #f0f8ff; }
.logout { color: #b13e52; }
.patient-row.card { padding: 13px; border: 1px solid #e4eaf1; border-radius: 13px; background: white; }
.scope-grid { border: 1px solid #e4eaf1; border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 17px 0; }
.scope-grid legend { font-weight: 700; padding: 0 6px; }
.scope-grid label { font-size: 12px; }
.modal-doctor { text-align: center; color: #075fd2; font-weight: 700; }
.health-stack .list-row { min-height: 76px; }
.identity-card { display: flex; gap: 16px; align-items: center; padding: 20px; margin-bottom: 14px; border-radius: 18px; color: white; background: linear-gradient(125deg,#075fd2,#08b99a); box-shadow: 0 12px 30px rgba(7,95,210,.18); }
.identity-avatar { width: 68px; height: 68px; flex-basis: 68px; font-size: 43px; border: 3px solid rgba(255,255,255,.8); }
.identity-card h2 { margin: 3px 0; font-size: 20px; }
.identity-card p,.identity-card small { margin: 0; opacity: .85; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-grid article { min-height: 114px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 16px; border: 1px solid #e4eaf1; border-radius: 15px; background: white; box-shadow: 0 8px 28px rgba(21,52,85,.08); }
.info-grid .icon { justify-content: start; color: #075fd2; }
.info-grid small,.detail-card small { color: #607086; }
.detail-card { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid #e4eaf1; border-radius: 14px; background: white; }
.detail-card > .icon { width: 40px; height: 40px; border-radius: 50%; background: #eaf4ff; color: #075fd2; }
.detail-card strong,.detail-card small { display: block; }
.detail-card small { margin-top: 4px; }
.record-title-line { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.record-title-line .icon { font-size: 18px; color: #075fd2; }
.attachment-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; color: #075fd2; text-decoration: none; font-size: 11px; font-weight: 700; }
.attachment-link .icon { font-size: 15px; }
.record-view { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; color: #075fd2; font-size: 11px; font-weight: 700; }
.admin-user-row { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.admin-user-row > div:first-child { flex: 1 1 190px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.row-actions button { border: 0; border-radius: 9px; background: #e6f2ff; color: #075db9; padding: 8px 10px; font-size: 11px; min-height: 36px; }
.list-row,.dashboard-card,.profile-card,.row-actions button,.primary,.text-btn { min-height: 44px; }
.field input,.field textarea,.field select { font-size: 16px; }
.file-summary { display: flex; align-items: center; gap: 7px; padding: 10px; border-radius: 10px; background: #f1f7fd; color: #405267; font-size: 12px; }
.security-banner { display: flex; gap: 13px; align-items: center; padding: 16px; border-radius: 15px; background: linear-gradient(125deg,#e8f5ff,#dcfaf1); border: 1px solid #d5eaf1; }
.security-banner > .icon { color: #08a68b; font-size: 30px; }
.security-banner strong,.security-banner small { display: block; }
.security-banner small { margin-top: 4px; color: #607086; line-height: 1.4; }
.timeline { margin: 18px 0 0 10px; border-left: 2px solid #d9e8f2; }
.timeline article { position: relative; padding: 0 0 20px 23px; }
.timeline-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border: 3px solid white; border-radius: 50%; background: #08b99a; box-shadow: 0 0 0 1px #b8dcd7; }
.timeline strong,.timeline small { display: block; }
.timeline small { margin-top: 4px; color: #607086; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-field { padding: 12px; border: 1px dashed #94b9de; border-radius: 12px; background: #f3f9ff; }
.upload-field input { border: 0; padding: 8px 0 2px; height: auto; }
.upload-field small { color: #607086; }
.modal { max-height: 92dvh; overflow-y: auto; }
.offline-banner { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 8px 0 12px; padding: 9px 11px; border: 1px solid #f0d58a; border-radius: 10px; background: #fff8df; color: #715817; font-size: 11px; font-weight: 700; text-align: center; }
.offline-banner .icon { font-size: 15px; }
.install-guide h3 { margin: 18px 0 6px; color: #073b86; }
.install-guide ol { margin: 6px 0; padding-left: 22px; color: #405267; line-height: 1.6; }
.install-success { text-align: center; padding: 16px; }
.install-success > .icon { width: 60px; height: 60px; margin: auto; border-radius: 50%; background: #dff8ef; color: #08a68b; font-size: 30px; }
.install-success p { color: #607086; }
.beta-feedback-fab {
  position: fixed;
  right: max(16px, calc(50% - 198px));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 12;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: linear-gradient(100deg,#075fd2,#08b99a);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(7,95,210,.22);
}
.beta-welcome .security-banner { margin: 16px 0 4px; text-align: left; }
.beta-consent { max-width: 340px; text-align: left; }
button:disabled { opacity: .55; cursor: not-allowed; }
.language-toggle {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(12px, calc(50% - 198px));
  z-index: 30;
  min-height: 38px;
  border: 1px solid #cfe2ee;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255,255,255,.94);
  color: #07386f;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(20,57,91,.08);
}
.language-toggle:focus-visible { outline: 3px solid rgba(8,103,215,.35); outline-offset: 2px; }
@media (display-mode: standalone) {
  body { background: #fff; overscroll-behavior-y: none; }
  .phone { min-height: 100dvh; box-shadow: none; border: 0; border-radius: 0; }
  .screen { padding-top: max(env(safe-area-inset-top), 12px); }
  .bottom-nav { padding-bottom: max(env(safe-area-inset-bottom), 6px); height: calc(76px + env(safe-area-inset-bottom)); }
}
#toast.bad { background: #a53145; }
@media print { .bottom-nav,.topbar,.primary,.record-delete,.privacy { display:none!important; } body { background:white; } .phone { box-shadow:none; max-width:none; } }

html.accessibility-mode,
body.accessibility-mode {
  font-size: 18px;
  color: #08182d;
}

.accessibility-mode .phone {
  max-width: 480px;
  background: #fff;
}

.accessibility-mode .screen {
  padding-left: 24px;
  padding-right: 24px;
}

.accessibility-mode .topbar {
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.accessibility-mode .topbar h1,
.accessibility-mode .home-head h2,
.accessibility-mode .auth-card h1 {
  font-size: 1.5rem;
  line-height: 1.18;
}

.accessibility-mode button,
.accessibility-mode .primary,
.accessibility-mode .text-btn,
.accessibility-mode .icon-btn,
.accessibility-mode .list-row,
.accessibility-mode .dashboard-card,
.accessibility-mode .profile-card,
.accessibility-mode input,
.accessibility-mode select,
.accessibility-mode textarea,
.accessibility-mode .composer input {
  min-height: 48px;
  font-size: 1rem;
}

.accessibility-mode .icon-btn,
.accessibility-mode .row-icon,
.accessibility-mode .detail-card > .icon {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

.accessibility-mode .icon {
  font-size: 1.45rem;
}

.accessibility-mode .dashboard-grid,
.accessibility-mode .stack,
.accessibility-mode .health-stack,
.accessibility-mode .activity-list,
.accessibility-mode .info-grid,
.accessibility-mode .form-grid {
  gap: 16px;
}

.accessibility-mode .dashboard-card,
.accessibility-mode .list-row,
.accessibility-mode .doctor-card,
.accessibility-mode .record,
.accessibility-mode .appointment-card,
.accessibility-mode .notification,
.accessibility-mode .profile-card,
.accessibility-mode .detail-card,
.accessibility-mode .security-banner,
.accessibility-mode .help-card,
.accessibility-mode .checklist-card {
  border-width: 2px;
  border-color: #b9cad9;
}

.accessibility-mode .dashboard-card {
  min-height: 150px;
  padding: 20px;
}

.accessibility-mode .list-row {
  min-height: 84px;
  padding: 16px;
}

.accessibility-mode .row-copy strong,
.accessibility-mode .dashboard-card strong,
.accessibility-mode .record strong,
.accessibility-mode .doctor-card strong,
.accessibility-mode .notification strong {
  font-size: 1rem;
  line-height: 1.28;
}

.accessibility-mode small,
.accessibility-mode .row-copy small,
.accessibility-mode .dashboard-card small,
.accessibility-mode .detail-card small,
.accessibility-mode .timeline small,
.accessibility-mode .field-help,
.accessibility-mode .emergency-note {
  font-size: .88rem;
  color: #2f4258;
  line-height: 1.5;
}

.accessibility-mode .field {
  margin: 22px 0;
}

.accessibility-mode .field span,
.accessibility-mode .scope-grid legend {
  font-size: .98rem;
  font-weight: 800;
  color: #0b2341;
}

.accessibility-mode .field input,
.accessibility-mode .field select {
  height: 56px;
}

.accessibility-mode .field textarea {
  min-height: 124px;
}

.accessibility-mode .bottom-nav {
  height: 94px;
}

.accessibility-mode .bottom-nav button {
  min-height: 64px;
  font-size: .86rem;
}

.accessibility-mode .bottom-nav .icon {
  font-size: 1.55rem;
}

.accessibility-mode .beta-feedback-fab {
  min-height: 52px;
  padding: 0 20px;
  font-size: 1rem;
}

.accessibility-mode .language-toggle {
  min-height: 48px;
  padding: 0 18px;
  font-size: 1rem;
}

.accessibility-mode .modal {
  max-height: 94dvh;
  padding: 24px;
}
