:root {
  --h5-navy-950: #0b1f33;
  --h5-navy-900: #102a43;
  --h5-navy-800: #183b56;
  --h5-teal-700: #087c7c;
  --h5-teal-600: #0f8b8d;
  --h5-teal-500: #18a6a6;
  --h5-teal-100: #ddf2f2;
  --h5-teal-50: #f1fafa;
  --h5-blue-600: #2f6fed;
  --h5-blue-100: #e8f0ff;
  --h5-page: #f4f7fa;
  --h5-card: #ffffff;
  --h5-subtle: #f8fafb;
  --h5-text: #172b3a;
  --h5-text-2: #5f7280;
  --h5-text-3: #84929d;
  --h5-border: #dce6eb;
  --h5-border-strong: #c7d5dc;
  --h5-success: #147d64;
  --h5-success-bg: #e4f5ef;
  --h5-warning: #a65e00;
  --h5-warning-bg: #fff3df;
  --h5-danger: #b42318;
  --h5-danger-bg: #fdecea;
  --h5-info: #245fcb;
  --h5-info-bg: #e8f0ff;
  --h5-orange: #c76a14;
  --h5-orange-bg: #fff4e7;
  --h5-chart-teal: #0f8b8d;
  --h5-chart-blue: #2f6fed;
  --h5-chart-navy: #183b56;
  --h5-chart-green: #2e8b6d;
  --h5-chart-orange: #d4812f;
  --h5-chart-grid: #e8eef2;
  --h5-shadow-sm: 0 6px 18px rgba(11, 31, 51, 0.06);
  --h5-shadow-md: 0 14px 34px rgba(11, 31, 51, 0.1);
  --h5-radius-sm: 8px;
  --h5-radius-md: 12px;
  --h5-radius-lg: 16px;
  --h5-radius-xl: 20px;
  --h5-space-1: 4px;
  --h5-space-2: 8px;
  --h5-space-3: 12px;
  --h5-space-4: 16px;
  --h5-space-5: 20px;
  --h5-space-6: 24px;
  --h5-space-8: 32px;
  --h5-tab-height: 66px;
  --h5-content-max: 480px;
  --h5-dashboard-max: 720px;
  --h5-motion-fast: 140ms ease;
}

html {
  background: #eaf0f4;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body.h5-v2 {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--h5-page);
  color: var(--h5-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.h5-v2 *,
.h5-v2 *::before,
.h5-v2 *::after {
  box-sizing: border-box;
}

.h5-v2 button,
.h5-v2 input,
.h5-v2 select,
.h5-v2 textarea {
  font: inherit;
}

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

.h5-v2 button {
  appearance: none;
}

.h5-v2 [hidden] {
  display: none !important;
}

.h5-v2 .img-upload-area small {
  display: block;
  margin-top: 5px;
  color: var(--h5-text-3);
  font-size: 12px;
  line-height: 1.45;
}

.h5-v2 .app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--h5-page);
  box-shadow: 0 0 60px rgba(11, 31, 51, 0.08);
}

.h5-v2 .page-main {
  min-height: 100vh;
  padding: 0 16px calc(100px + env(safe-area-inset-bottom));
}

.h5-v2 .page-main.no-tab {
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

.h5-v2 .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.h5-v2 :focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.28);
  outline-offset: 2px;
}

/* Hero and identity */
.h5-v2 .hero {
  position: relative;
  margin: 0 -16px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 76px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 92% 3%, rgba(24, 166, 166, 0.32), transparent 34%),
    linear-gradient(145deg, var(--h5-navy-950), var(--h5-navy-800));
}

.h5-v2 .hero::after {
  content: "";
  position: absolute;
  right: -76px;
  bottom: -102px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.h5-v2 .brand-row,
.h5-v2 .doctor-row,
.h5-v2 .patient-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.h5-v2 .brand-row {
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 24px;
}

.h5-v2 .brand-lockup {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.h5-v2 .brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: rgba(24, 166, 166, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
}

.h5-v2 .secure-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.h5-v2 .doctor-row {
  justify-content: space-between;
  gap: 16px;
}

.h5-v2 .eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.h5-v2 .hero-title {
  margin: 0;
  font-size: 24px;
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.h5-v2 .hero-subtitle {
  max-width: 270px;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.h5-v2 .profile-link {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}

.h5-v2 .patient-profile {
  gap: 14px;
}

.h5-v2 .patient-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 3px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
}

.h5-v2 .patient-copy {
  min-width: 0;
  flex: 1;
}

.h5-v2 .patient-copy .hero-title,
.h5-v2 .patient-copy .hero-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards and sections */
.h5-v2 .lift-card {
  position: relative;
  z-index: 2;
  margin-top: -52px;
}

.h5-v2 .surface-card,
.h5-v2 .dashboard-card,
.h5-v2 .patient-card-v2,
.h5-v2 .service-card {
  background: var(--h5-card);
  border: 1px solid rgba(220, 230, 235, 0.86);
  box-shadow: var(--h5-shadow-sm);
}

.h5-v2 .surface-card,
.h5-v2 .dashboard-card {
  border-radius: var(--h5-radius-xl);
}

.h5-v2 .section {
  margin-top: 24px;
}

.h5-v2 .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.h5-v2 .section-heading h2 {
  margin: 0;
  color: var(--h5-text);
  font-size: 18px;
  font-weight: 680;
  line-height: 1.4;
}

.h5-v2 .section-heading p,
.h5-v2 .section-link {
  margin: 0;
  color: var(--h5-text-3);
  font-size: 12px;
  text-decoration: none;
}

.h5-v2 .section-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
}

/* KPI dashboard */
.h5-v2 .kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 8px;
}

.h5-v2 .kpi-item {
  position: relative;
  min-width: 0;
  padding: 0 10px;
}

.h5-v2 .kpi-item + .kpi-item::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 1px;
  background: var(--h5-border);
}

.h5-v2 .kpi-label {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--h5-text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-v2 .kpi-value {
  display: flex;
  gap: 3px;
  align-items: baseline;
  color: var(--h5-navy-950);
  font-size: 26px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.h5-v2 .kpi-unit {
  color: var(--h5-text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.h5-v2 .dashboard-card {
  padding: 16px;
}

.h5-v2 .dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.h5-v2 .dashboard-title {
  margin: 0;
  color: var(--h5-text);
  font-size: 14px;
  font-weight: 650;
}

.h5-v2 .dashboard-note {
  color: var(--h5-text-3);
  font-size: 11px;
}

.h5-v2 .distribution-bar {
  display: flex;
  width: 100%;
  height: 9px;
  gap: 3px;
  overflow: hidden;
  background: var(--h5-subtle);
  border-radius: 999px;
}

.h5-v2 .distribution-segment {
  min-width: 8px;
  border-radius: 999px;
}

.h5-v2 .distribution-segment.is-teal { background: var(--h5-teal-500); }
.h5-v2 .distribution-segment.is-blue { background: var(--h5-blue-600); }
.h5-v2 .distribution-segment.is-green { background: #51ad91; }
.h5-v2 .distribution-segment.is-amber { background: #d99a3d; }

.h5-v2 .legend-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.h5-v2 .legend-item {
  min-width: 0;
  color: var(--h5-text-2);
  font-size: 11px;
}

.h5-v2 .legend-item strong {
  display: block;
  margin-top: 1px;
  color: var(--h5-text);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.h5-v2 .legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 1px;
}

/* Patient home */
.h5-v2 .patient-status-card {
  padding: 18px;
}

.h5-v2 .status-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.h5-v2 .status-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--h5-text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.h5-v2 .status-main {
  margin: 0;
  color: var(--h5-navy-950);
  font-size: 18px;
  font-weight: 680;
}

.h5-v2 .status-orb {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--h5-teal-700);
  background: var(--h5-teal-100);
  border-radius: 14px;
}

.h5-v2 .status-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--h5-border);
}

.h5-v2 .status-meta-item {
  min-width: 0;
}

.h5-v2 .status-meta-label {
  display: block;
  margin-bottom: 2px;
  color: var(--h5-text-3);
  font-size: 11px;
}

.h5-v2 .status-meta-value {
  display: block;
  overflow: hidden;
  color: var(--h5-text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-v2 .service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.h5-v2 .service-card {
  position: relative;
  min-height: 142px;
  padding: 16px;
  overflow: hidden;
  color: var(--h5-text);
  text-decoration: none;
  border-radius: var(--h5-radius-lg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.h5-v2 .service-card:active {
  transform: scale(0.985);
}

.h5-v2 .service-card.is-primary {
  grid-column: 1 / -1;
  min-height: 156px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.2), transparent 23%),
    linear-gradient(135deg, var(--h5-teal-700), var(--h5-teal-500));
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(15, 139, 141, 0.2);
}

.h5-v2 .service-card.is-wide {
  grid-column: 1 / -1;
  min-height: 104px;
}

.h5-v2 .service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--h5-teal-700);
  background: var(--h5-teal-50);
  border-radius: 13px;
}

.h5-v2 .service-card.is-primary .service-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.h5-v2 .service-title {
  display: block;
  font-size: 17px;
  font-weight: 680;
  line-height: 1.4;
}

.h5-v2 .service-desc {
  display: block;
  max-width: 76%;
  margin-top: 4px;
  color: var(--h5-text-3);
  font-size: 12px;
  line-height: 1.5;
}

.h5-v2 .service-card.is-primary .service-desc {
  color: rgba(255, 255, 255, 0.74);
}

.h5-v2 .service-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: currentColor;
  opacity: 0.58;
}

/* Search and patient records */
.h5-v2 .search-shell {
  position: relative;
  margin-bottom: 14px;
}

.h5-v2 .search-shell .fa {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--h5-text-3);
  transform: translateY(-50%);
}

.h5-v2 .search-input-v2 {
  width: 100%;
  height: 48px;
  padding: 0 42px;
  color: var(--h5-text);
  background: var(--h5-card);
  border: 1px solid var(--h5-border);
  border-radius: 14px;
  outline: none;
  box-shadow: 0 3px 12px rgba(11, 31, 51, 0.03);
}

.h5-v2 .search-input-v2::placeholder {
  color: #9aa8b2;
}

.h5-v2 .search-input-v2:focus {
  border-color: var(--h5-teal-500);
  box-shadow: 0 0 0 3px rgba(24, 166, 166, 0.12);
}

.h5-v2 .clear-search {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--h5-text-3);
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

.h5-v2 .patient-list-v2 {
  display: grid;
  gap: 12px;
}

.h5-v2 .patient-card-v2 {
  padding: 16px;
  border-radius: var(--h5-radius-lg);
}

.h5-v2 .patient-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.h5-v2 .patient-identity {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
}

.h5-v2 .patient-initial {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--h5-teal-700);
  font-size: 16px;
  font-weight: 700;
  background: var(--h5-teal-50);
  border: 1px solid var(--h5-teal-100);
  border-radius: 13px;
}

.h5-v2 .patient-name-v2 {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: var(--h5-navy-950);
  font-size: 17px;
  font-weight: 680;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-v2 .patient-time-v2 {
  display: block;
  margin-top: 2px;
  color: var(--h5-text-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.h5-v2 .status-chip {
  display: inline-flex;
  min-height: 26px;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px 9px;
  color: var(--h5-text-2);
  font-size: 11px;
  font-weight: 650;
  background: #eef3f6;
  border-radius: 999px;
}

.h5-v2 .status-chip.is-pending,
.h5-v2 .status-chip.is-transfer {
  color: var(--h5-warning);
  background: var(--h5-warning-bg);
}

.h5-v2 .status-chip.is-waiting {
  color: #245fcb;
  background: var(--h5-blue-100);
}

.h5-v2 .status-chip.is-complete,
.h5-v2 .status-chip.is-recorded {
  color: var(--h5-success);
  background: var(--h5-success-bg);
}

.h5-v2 .status-chip.is-rejected {
  color: var(--h5-danger);
  background: var(--h5-danger-bg);
}

.h5-v2 .record-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid #edf2f4;
}

.h5-v2 .record-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  color: var(--h5-text-2);
  font-size: 12px;
}

.h5-v2 .record-label {
  color: var(--h5-text-3);
}

.h5-v2 .record-value {
  min-width: 0;
  overflow: hidden;
  color: var(--h5-text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-v2 .contact-tile {
  display: flex;
  width: 100%;
  min-height: 56px;
  gap: 11px;
  align-items: center;
  margin-top: 12px;
  padding: 9px 11px;
  text-align: left;
  color: var(--h5-navy-950);
  background: linear-gradient(90deg, var(--h5-teal-50), #f8fcfc);
  border: 1px solid var(--h5-teal-100);
  border-radius: 14px;
  cursor: pointer;
}

.h5-v2 .contact-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: var(--h5-teal-600);
  border-radius: 12px;
  box-shadow: 0 7px 14px rgba(15, 139, 141, 0.18);
}

.h5-v2 .contact-copy {
  min-width: 0;
  flex: 1;
}

.h5-v2 .contact-title {
  display: block;
  font-size: 13px;
  font-weight: 680;
}

.h5-v2 .contact-subtitle {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--h5-text-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-v2 .contact-arrow {
  color: var(--h5-teal-700);
  font-size: 12px;
}

.h5-v2 .card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.h5-v2 .btn-v2 {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  gap: 7px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: var(--h5-text-2);
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--h5-border-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.h5-v2 .btn-v2:active {
  transform: scale(0.98);
}

.h5-v2 .btn-v2.is-primary {
  color: #fff;
  background: var(--h5-teal-600);
  border-color: var(--h5-teal-600);
}

.h5-v2 .btn-v2.is-blue {
  color: #fff;
  background: var(--h5-blue-600);
  border-color: var(--h5-blue-600);
}

.h5-v2 .btn-v2.is-danger {
  color: var(--h5-danger);
  background: #fff;
  border-color: #f2c6c2;
}

.h5-v2 .btn-v2.is-quiet {
  color: var(--h5-teal-700);
  background: var(--h5-teal-50);
  border-color: var(--h5-teal-100);
}

.h5-v2 .btn-v2[disabled],
.h5-v2 .btn-v2.is-loading {
  pointer-events: none;
  opacity: 0.55;
}

/* Empty and error states */
.h5-v2 .empty-state {
  padding: 38px 22px;
  text-align: center;
  background: var(--h5-card);
  border: 1px dashed var(--h5-border-strong);
  border-radius: var(--h5-radius-lg);
}

.h5-v2 .empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--h5-teal-700);
  background: var(--h5-teal-50);
  border-radius: 15px;
}

.h5-v2 .empty-title {
  margin: 0;
  color: var(--h5-text);
  font-size: 15px;
  font-weight: 650;
}

.h5-v2 .empty-desc {
  max-width: 270px;
  margin: 5px auto 0;
  color: var(--h5-text-3);
  font-size: 12px;
}

/* Floating action */
.h5-v2 .fab-v2 {
  position: fixed;
  right: max(20px, calc((100vw - 480px) / 2 + 20px));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background: var(--h5-teal-600);
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 17px;
  box-shadow: 0 12px 24px rgba(15, 139, 141, 0.28);
}

/* Navigation */
.h5-v2 .tab-bar-v2 {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  max-width: 480px;
  min-height: calc(66px + env(safe-area-inset-bottom));
  align-items: flex-start;
  margin: 0 auto;
  padding: 7px 6px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(220, 230, 235, 0.9);
  box-shadow: 0 -10px 30px rgba(11, 31, 51, 0.06);
  backdrop-filter: blur(16px);
}

.h5-v2 .tab-link-v2 {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex: 1 1 20%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--h5-text-3);
  font-size: 10px;
  line-height: 1.3;
  text-decoration: none;
}

.h5-v2 .tab-link-v2 .fa {
  margin-bottom: 4px;
  font-size: 19px;
}

.h5-v2 .tab-link-v2.is-active {
  color: var(--h5-teal-700);
  font-weight: 650;
}

/* Modal, form and feedback */
.h5-v2 .modal-overlay-v2 {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(5, 22, 36, 0.62);
  backdrop-filter: blur(4px);
}

.h5-v2 .modal-panel-v2 {
  width: 100%;
  max-width: 448px;
  max-height: min(86vh, 720px);
  padding: 20px;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(5, 22, 36, 0.28);
  animation: h5-sheet-in 180ms ease-out;
}

@keyframes h5-sheet-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.h5-v2 .modal-handle {
  width: 38px;
  height: 4px;
  margin: -7px auto 15px;
  background: #d9e2e7;
  border-radius: 999px;
}

.h5-v2 .modal-head-v2 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.h5-v2 .modal-title-v2 {
  margin: 0;
  color: var(--h5-navy-950);
  font-size: 19px;
  font-weight: 700;
}

.h5-v2 .modal-desc-v2 {
  margin: 3px 0 0;
  color: var(--h5-text-3);
  font-size: 12px;
}

.h5-v2 .modal-close-v2 {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  place-items: center;
  color: var(--h5-text-2);
  background: var(--h5-subtle);
  border: 0;
  border-radius: 12px;
}

.h5-v2 .form-grid-v2 {
  display: grid;
  gap: 14px;
}

.h5-v2 .form-field-v2 label,
.h5-v2 .info-field-v2 .info-label-v2 {
  display: block;
  margin-bottom: 6px;
  color: var(--h5-text-2);
  font-size: 12px;
  font-weight: 600;
}

.h5-v2 .input-v2 {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--h5-text);
  background: #fff;
  border: 1px solid var(--h5-border-strong);
  border-radius: 12px;
  outline: none;
}

.h5-v2 textarea.input-v2 {
  min-height: 88px;
  resize: vertical;
}

.h5-v2 .input-v2:focus {
  border-color: var(--h5-teal-500);
  box-shadow: 0 0 0 3px rgba(24, 166, 166, 0.12);
}

.h5-v2 .info-value-v2 {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--h5-text);
  background: var(--h5-subtle);
  border: 1px solid #edf2f4;
  border-radius: 12px;
  word-break: break-word;
}

.h5-v2 .modal-actions-v2 {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.h5-v2 .contact-detail-card {
  padding: 18px;
  text-align: center;
  background: linear-gradient(145deg, var(--h5-teal-50), #fff);
  border: 1px solid var(--h5-teal-100);
  border-radius: 16px;
}

.h5-v2 .contact-detail-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  place-items: center;
  color: #fff;
  background: var(--h5-teal-600);
  border-radius: 15px;
}

.h5-v2 .contact-detail-name {
  margin: 0;
  color: var(--h5-text-2);
  font-size: 13px;
}

.h5-v2 .contact-detail-phone {
  min-height: 35px;
  margin: 3px 0 0;
  color: var(--h5-navy-950);
  font-size: 23px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.h5-v2 .contact-privacy {
  margin: 10px 0 0;
  color: var(--h5-text-3);
  font-size: 11px;
  text-align: center;
}

.h5-v2 .toast-v2 {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  z-index: 2000;
  display: flex;
  width: calc(100% - 40px);
  max-width: 420px;
  min-height: 48px;
  gap: 9px;
  align-items: center;
  padding: 11px 14px;
  color: #fff;
  background: rgba(11, 31, 51, 0.96);
  border-radius: 14px;
  box-shadow: var(--h5-shadow-md);
  transform: translate(-50%, -16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.h5-v2 .toast-v2.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.h5-v2 .toast-v2.is-error { background: rgba(143, 35, 27, 0.97); }
.h5-v2 .toast-v2.is-success { background: rgba(15, 111, 88, 0.97); }

.h5-v2 .confirm-copy-v2 {
  margin: 0;
  color: var(--h5-text-2);
  font-size: 14px;
  line-height: 1.7;
}

@media (min-width: 440px) {
  .h5-v2 .modal-overlay-v2 {
    align-items: center;
  }
}

@media (max-width: 359px) {
  .h5-v2 .page-main { padding-right: 12px; padding-left: 12px; }
  .h5-v2 .hero { margin-right: -12px; margin-left: -12px; padding-right: 16px; padding-left: 16px; }
  .h5-v2 .kpi-grid { padding-right: 3px; padding-left: 3px; }
  .h5-v2 .kpi-item { padding: 0 7px; }
  .h5-v2 .kpi-value { font-size: 23px; }
  .h5-v2 .card-actions { flex-wrap: wrap; }
  .h5-v2 .card-actions .btn-v2 { min-width: calc(50% - 4px); }
}

@media (prefers-reduced-motion: reduce) {
  .h5-v2 *,
  .h5-v2 *::before,
  .h5-v2 *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Legacy-page bridge
 * These rules apply the V2 design system to the remaining ThinkPHP templates
 * while their business markup and routes stay intact.
 */
body.h5-legacy {
  background:
    linear-gradient(180deg, rgba(11, 31, 51, 0.035), transparent 180px),
    var(--h5-page);
}

.h5-legacy .container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 60px rgba(11, 31, 51, 0.08);
}

.h5-legacy .content {
  padding: 16px !important;
  background: transparent !important;
}

.h5-legacy .legacy-topbar {
  position: sticky;
  top: 0;
  z-index: 85;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: calc(54px + env(safe-area-inset-top));
  align-items: end;
  padding: env(safe-area-inset-top) 8px 5px;
  color: var(--h5-navy-950);
  background: rgba(244, 247, 250, 0.94);
  border-bottom: 1px solid rgba(220, 230, 235, 0.82);
  backdrop-filter: blur(16px);
}

.h5-legacy .legacy-topbar-title {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 680;
  line-height: 44px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-legacy .legacy-back {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--h5-navy-950);
  font-size: 20px;
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.h5-legacy .radio-option {
  min-height: 44px;
  padding: 0 6px;
}

.h5-legacy .legacy-page-intro {
  margin: 4px 0 16px;
}

.h5-legacy .legacy-page-intro h1,
.h5-legacy .legacy-page-intro h2 {
  margin: 0;
  color: var(--h5-navy-950);
  font-size: 22px;
  font-weight: 720;
  line-height: 1.4;
}

.h5-legacy .legacy-page-intro p {
  margin: 4px 0 0;
  color: var(--h5-text-3);
  font-size: 12px;
}

/* Legacy cards and detail sections */
.h5-legacy .section,
.h5-legacy .form-card,
.h5-legacy .result-card,
.h5-legacy .record-card,
.h5-legacy .record-item,
.h5-legacy .survey-item,
.h5-legacy .patient-card,
.h5-legacy .pwd-section,
.h5-legacy .info-list,
.h5-legacy .menu-list {
  background: var(--h5-card);
  border: 1px solid rgba(220, 230, 235, 0.9);
  border-radius: var(--h5-radius-lg);
  box-shadow: var(--h5-shadow-sm);
}

.h5-legacy .section {
  margin: 0 0 14px;
  padding: 18px 16px;
}

.h5-legacy .section-title,
.h5-legacy .result-title {
  position: relative;
  margin: 0 0 13px;
  padding: 0 0 10px 12px;
  color: var(--h5-navy-950);
  font-size: 17px;
  font-weight: 680;
  line-height: 1.45;
  border-bottom: 1px solid #edf2f4;
}

.h5-legacy .section-title::before,
.h5-legacy .result-title::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 15px;
  left: 0;
  width: 3px;
  background: var(--h5-teal-500);
  border-radius: 999px;
}

.h5-legacy .detail-row,
.h5-legacy .info-row,
.h5-legacy .info-line,
.h5-legacy .form-row,
.h5-legacy .info-item,
.h5-legacy .pwd-row,
.h5-legacy .patient-info-line {
  min-height: 48px;
  padding: 11px 0;
  color: var(--h5-text);
  font-size: 14px;
  border-bottom-color: #edf2f4;
}

.h5-legacy .detail-label,
.h5-legacy .info-label,
.h5-legacy .form-label,
.h5-legacy .pwd-label {
  min-width: 82px;
  color: var(--h5-text-2);
  font-size: 13px;
  font-weight: 580;
}

.h5-legacy .detail-value,
.h5-legacy .info-value,
.h5-legacy .info-content,
.h5-legacy .info-text,
.h5-legacy .form-value {
  color: var(--h5-text);
  font-size: 14px;
  line-height: 1.65;
}

.h5-legacy .detail-value,
.h5-legacy .info-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.h5-legacy .result-card,
.h5-legacy .record-card,
.h5-legacy .patient-card {
  margin: 0 0 12px;
  padding: 16px;
}

.h5-legacy .result-info,
.h5-legacy .record-info {
  gap: 4px;
  margin-bottom: 12px;
}

.h5-legacy .patient-header,
.h5-legacy .record-header {
  margin-bottom: 11px;
  color: var(--h5-navy-950);
}

.h5-legacy .patient-header,
.h5-legacy .patient-name-text,
.h5-legacy .patient-name {
  font-size: 17px;
  font-weight: 680;
}

.h5-legacy .patient-time,
.h5-legacy .record-date,
.h5-legacy .survey-time {
  color: var(--h5-text-3);
  font-size: 12px;
}

.h5-legacy .detail-btn,
.h5-legacy .action-btn,
.h5-legacy .btn-blue {
  display: inline-flex;
  width: auto;
  min-width: 88px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  color: #fff;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  background: var(--h5-teal-600);
  border: 1px solid var(--h5-teal-600);
  border-radius: 11px;
  box-shadow: none;
}

.h5-legacy .detail-btn {
  float: none;
  margin-left: auto;
  color: var(--h5-teal-700);
  background: var(--h5-teal-50);
  border-color: var(--h5-teal-100);
}

.h5-legacy .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 13px;
}

.h5-legacy .status-pending,
.h5-legacy .status-waiting,
.h5-legacy .status-rejected {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 650;
  border-radius: 999px;
}

.h5-legacy .status-pending {
  color: var(--h5-success);
  background: var(--h5-success-bg);
}

.h5-legacy .status-waiting {
  color: var(--h5-warning);
  background: var(--h5-warning-bg);
}

.h5-legacy .status-rejected {
  color: var(--h5-danger);
  background: var(--h5-danger-bg);
}

/* Forms */
.h5-legacy .form-card,
.h5-legacy .pwd-section,
.h5-legacy .info-list {
  margin: 0 0 14px;
  padding: 4px 16px;
  overflow: hidden;
}

.h5-legacy .detail-input,
.h5-legacy .form-input-inline,
.h5-legacy .form-input,
.h5-legacy .info-input,
.h5-legacy .pwd-input,
.h5-legacy .login-input {
  min-height: 44px;
  color: var(--h5-text);
  font-size: 15px;
  background: transparent;
  border-color: var(--h5-border-strong);
  outline: none;
}

.h5-legacy .detail-input:focus,
.h5-legacy .form-input-inline:focus,
.h5-legacy .form-input:focus,
.h5-legacy .info-input:focus,
.h5-legacy .pwd-input:focus,
.h5-legacy .login-input:focus {
  border-color: var(--h5-teal-500);
}

.h5-legacy input[readonly],
.h5-legacy textarea[readonly] {
  color: var(--h5-text-2);
}

.h5-legacy .detail-textarea,
.h5-legacy textarea.form-input {
  min-height: 96px;
  padding: 12px;
  color: var(--h5-text);
  background: #fff;
  border: 1px solid var(--h5-border-strong);
  border-radius: 12px;
  outline: none;
}

.h5-legacy .detail-textarea:focus,
.h5-legacy textarea.form-input:focus {
  border-color: var(--h5-teal-500);
  box-shadow: 0 0 0 3px rgba(24, 166, 166, 0.12);
}

.h5-legacy .btn-primary,
.h5-legacy .submit-btn,
.h5-legacy .save-btn {
  width: 100%;
  min-height: 48px;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  background: var(--h5-teal-600);
  border: 1px solid var(--h5-teal-600);
  border-radius: 13px;
  box-shadow: 0 10px 20px rgba(15, 139, 141, 0.18);
}

.h5-legacy .btn-secondary {
  width: 100%;
  min-height: 48px;
  color: var(--h5-teal-700);
  background: #fff;
  border: 1px solid var(--h5-teal-500);
  border-radius: 13px;
}

.h5-legacy .btn-primary[disabled],
.h5-legacy .submit-btn[disabled],
.h5-legacy .save-btn[disabled] {
  pointer-events: none;
  opacity: 0.56;
}

.h5-legacy .submit-container,
.h5-legacy .submit-area,
.h5-legacy .save-btn-container,
.h5-legacy .save-btn-area {
  padding: 14px 0 calc(28px + env(safe-area-inset-bottom));
}

.h5-legacy .img-upload-area {
  min-height: 96px;
  padding: 22px 16px;
  color: var(--h5-teal-700);
  background: var(--h5-teal-50);
  border: 1.5px dashed #9bcfcf;
  border-radius: 14px;
}

.h5-legacy .img-preview-list,
.h5-legacy .report-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.h5-legacy .img-preview-item img,
.h5-legacy .report-img {
  border: 1px solid var(--h5-border);
  border-radius: 10px;
}

/* Doctor headers, metrics and bottom navigation */
.h5-legacy .doctor-header {
  padding: calc(28px + env(safe-area-inset-top)) 20px 34px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 3%, rgba(24, 166, 166, 0.32), transparent 34%),
    linear-gradient(145deg, var(--h5-navy-950), var(--h5-navy-800));
  border-radius: 0 0 22px 22px;
}

.h5-legacy .doctor-name {
  margin: 0;
  font-size: 23px;
  font-weight: 680;
}

.h5-legacy .hospital-name {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.h5-legacy .user-icon-btn {
  width: 42px;
  height: 42px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
}

.h5-legacy .stats-container {
  margin: -18px 16px 16px;
  padding: 18px 8px;
  background: #fff;
  border: 1px solid rgba(220, 230, 235, 0.88);
  border-radius: 18px;
  box-shadow: var(--h5-shadow-md);
}

.h5-legacy .stat-item {
  position: relative;
  min-width: 0;
  padding: 0 8px;
}

.h5-legacy .stat-item + .stat-item::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: var(--h5-border);
}

.h5-legacy .stat-label {
  margin-bottom: 3px;
  overflow: hidden;
  color: var(--h5-text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-legacy .stat-value {
  color: var(--h5-navy-950);
  font-size: 25px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.h5-legacy .stat-unit {
  color: var(--h5-text-3);
  font-size: 10px;
}

.h5-legacy .tab-bar {
  right: 0;
  left: 0;
  width: 100%;
  max-width: 480px;
  height: auto;
  min-height: calc(66px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 7px 6px env(safe-area-inset-bottom);
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(220, 230, 235, 0.9);
  box-shadow: 0 -10px 30px rgba(11, 31, 51, 0.06);
  backdrop-filter: blur(16px);
}

.h5-legacy .tab-item {
  min-width: 0;
  min-height: 52px;
  color: var(--h5-text-3);
  font-size: 10px;
  line-height: 1.3;
}

.h5-legacy .tab-item.active {
  color: var(--h5-teal-700);
  font-weight: 650;
}

.h5-legacy .tab-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  object-fit: contain;
  filter: saturate(0.1);
  opacity: 0.62;
}

.h5-legacy .tab-item.active .tab-icon {
  filter: none;
  opacity: 1;
}

/* Legacy search and lists */
.h5-legacy .search-box {
  position: relative;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--h5-border);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(11, 31, 51, 0.03);
}

.h5-legacy .search-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.42 !important;
}

.h5-legacy .search-input {
  min-height: 46px;
  color: var(--h5-text);
  font-size: 14px;
}

.h5-legacy .legacy-empty {
  padding: 36px 20px;
  color: var(--h5-text-3);
  font-size: 13px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--h5-border-strong);
  border-radius: 16px;
}

.h5-legacy .legacy-empty .fa {
  display: block;
  margin-bottom: 10px;
  color: var(--h5-teal-600);
  font-size: 26px;
}

/* Legacy modal bridge */
.h5-legacy .modal-overlay {
  align-items: flex-end;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(5, 22, 36, 0.62);
  backdrop-filter: blur(4px);
}

.h5-legacy .modal-overlay[style*="display: block"] {
  display: flex !important;
}

.h5-legacy .modal-content {
  width: 100%;
  max-width: 448px;
  max-height: 86vh;
  padding: 20px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(5, 22, 36, 0.28);
}

.h5-legacy .modal-title {
  margin-bottom: 18px;
  color: var(--h5-navy-950);
  font-size: 19px;
  font-weight: 700;
}

.h5-legacy .modal-content .form-group {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 44px;
  align-items: start;
  margin-bottom: 10px;
}

.h5-legacy .modal-content .form-label {
  width: auto;
  padding-top: 9px;
}

.h5-legacy .modal-content .form-input {
  width: 100%;
}

/* Login */
.h5-legacy.h5-login {
  background:
    radial-gradient(circle at 86% 12%, rgba(24, 166, 166, 0.34), transparent 28%),
    linear-gradient(155deg, var(--h5-navy-950), var(--h5-navy-800));
}

.h5-legacy.h5-login .container,
.h5-legacy.h5-login .content {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding-bottom: 0;
  background: transparent !important;
}

.h5-legacy.h5-login .content {
  width: 100%;
}

.h5-legacy .login-container {
  width: 100%;
  margin: 32px 0;
  padding: 30px 22px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(5, 22, 36, 0.24);
}

.h5-legacy .welcome-title {
  margin-bottom: 6px;
  color: var(--h5-navy-950);
  font-size: 26px;
  font-weight: 720;
}

.h5-legacy .welcome-subtitle {
  margin-bottom: 32px;
  color: var(--h5-text-3);
  font-size: 13px;
}

.h5-legacy .input-group {
  margin-bottom: 21px;
}

.h5-legacy .input-label {
  margin-bottom: 7px;
  color: var(--h5-text-2);
  font-size: 13px;
  font-weight: 600;
}

.h5-legacy .label-icon img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  opacity: 0.55;
}

.h5-legacy .login-input {
  padding: 0 2px;
  border-bottom: 1px solid var(--h5-border-strong);
}

.h5-legacy .password-shell {
  position: relative;
  min-width: 0;
  flex: 1;
}

.h5-legacy .password-shell .login-input,
.h5-legacy .password-shell .pwd-input {
  padding-right: 44px;
}

.h5-legacy .password-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--h5-text-3);
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

/* Profiles and surveys */
.h5-legacy .avatar-section,
.h5-legacy .profile-header {
  margin: 0 0 14px;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 80% 18%, rgba(24, 166, 166, 0.14), transparent 32%),
    #fff;
  border: 1px solid var(--h5-border);
  border-radius: 18px;
  box-shadow: var(--h5-shadow-sm);
}

.h5-legacy .avatar-large,
.h5-legacy .avatar-img {
  width: 88px;
  height: 88px;
  padding: 3px;
  object-fit: cover;
  background: var(--h5-teal-50);
  border: 1px solid var(--h5-teal-100);
  border-radius: 26px;
}

.h5-legacy .menu-list {
  margin: 0 16px;
  overflow: hidden;
}

.h5-legacy .menu-item {
  min-height: 58px;
  padding: 13px 16px;
  color: var(--h5-text);
  border-bottom-color: #edf2f4;
}

.h5-legacy .menu-icon-img {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  object-fit: contain;
}

.h5-legacy .menu-text {
  font-size: 14px;
  font-weight: 580;
}

.h5-legacy .menu-arrow,
.h5-legacy .info-arrow {
  width: 15px;
  height: 15px;
  opacity: 0.45;
}

.h5-legacy .survey-item {
  margin-bottom: 14px;
  overflow: hidden;
}

.h5-legacy .survey-image {
  height: 156px;
  background: linear-gradient(135deg, var(--h5-teal-50), var(--h5-blue-100));
}

.h5-legacy .survey-placeholder {
  display: flex;
  gap: 9px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--h5-teal-700);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.h5-legacy .survey-placeholder .fa {
  font-size: 34px;
}

.h5-legacy .survey-info {
  padding: 14px 16px 16px;
}

.h5-legacy .survey-title {
  margin-bottom: 4px;
  color: var(--h5-navy-950);
  font-size: 16px;
  font-weight: 680;
}

.h5-legacy .picker-mask {
  background: rgba(5, 22, 36, 0.62);
  backdrop-filter: blur(4px);
}

.h5-legacy .picker-popup {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 22px 22px 0 0;
}

.h5-legacy .picker-header span.confirm,
.h5-legacy .picker-item.selected {
  color: var(--h5-teal-700);
}

.h5-legacy .profile-note,
.h5-legacy .form-assist {
  margin: 10px 0 0;
  color: var(--h5-text-3);
  font-size: 12px;
  line-height: 1.6;
}

.h5-legacy .password-strength {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 10px 0 0 92px;
}

.h5-legacy .password-strength span {
  height: 4px;
  background: var(--h5-border);
  border-radius: 999px;
}

.h5-legacy .password-strength[data-level="1"] span:nth-child(1) { background: var(--h5-danger); }
.h5-legacy .password-strength[data-level="2"] span:nth-child(-n+2) { background: #d99a3d; }
.h5-legacy .password-strength[data-level="3"] span { background: var(--h5-success); }

@media (min-width: 440px) {
  .h5-legacy .modal-overlay {
    align-items: center;
  }
}

@media (max-width: 359px) {
  .h5-legacy .content { padding: 12px !important; }
  .h5-legacy .stats-container { margin-right: 12px; margin-left: 12px; }
  .h5-legacy .stat-value { font-size: 22px; }
  .h5-legacy .action-btn { min-width: calc(50% - 4px); }
  .h5-legacy .modal-content .form-group { grid-template-columns: 76px minmax(0, 1fr); }
}
