/* ── BMP DataMatrix widget ──────────────────────────────────────────────── */
.med-bmp-dm { display:flex; flex-direction:column; align-items:center; gap:6px; padding:14px 0 4px; }
.med-bmp-dm__label { font-size:10px; font-weight:600; color:#9E9E9E; text-transform:uppercase; letter-spacing:0.5px; }
.med-bmp-dm__canvas { display:block; max-width:min(320px,calc(100vw - 32px)); height:auto; border:1px solid #E0E0E0; border-radius:4px; padding:6px; background:#fff; image-rendering:pixelated; }

/* ═══ RESET & BASE ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #05164D;
  --accent:  #FFAD00;
  --danger:  #F44336;
  --success: #4CAF50;
  --warning: #FF9800;
  --primary-2: #0C2E8A;
  --surface: #FFFFFF;
  --surface-2: #F7F9FF;
  --gray-50: #FAFAFA;
  --gray-100:#F5F5F5;
  --gray-200:#EEEEEE;
  --gray-300:#E0E0E0;
  --gray-500:#9E9E9E;
  --gray-700:#616161;
  --text:    #1A1A1A;
  --radius:  16px;
  --shadow:  0 8px 28px rgba(5,22,77,.10);
  --shadow-soft: 0 3px 12px rgba(5,22,77,.08);
  --tab-h:   60px;
  --header-h:62px;
}

html, body {
  height: 100%;
  font-family: 'Avenir Next', Avenir, 'Segoe UI', Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 480px at 18% -8%, rgba(255,173,0,.13) 0%, transparent 55%),
    radial-gradient(1000px 420px at 92% -20%, rgba(12,46,138,.13) 0%, transparent 58%),
    linear-gradient(180deg, #EEF2FF 0%, #F5F7FC 42%, #F4F6FB 100%);
  color: var(--text);
}

/* ═══ APP SHELL ════════════════════════════════════════════════════════════ */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1360px;
  margin: 0 auto;
  background: transparent;
  position: relative;
}

/* Header */
#app-header {
  height: var(--header-h);
  background: linear-gradient(120deg, #041243 0%, #0B2D86 65%, #113CA9 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  z-index: 10;
}
#app-title { flex: 1; font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.header-back--hidden { display: none; }
.header-back, .header-icon {
  background: transparent; border: none; color: #fff; cursor: pointer;
  font-size: 20px; padding: 6px 8px; border-radius: 6px; line-height: 1;
}
.header-back:hover, .header-icon:hover { background: rgba(255,255,255,.15); }

/* Page container */
#page-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 24px;
}

/* Tab bar */
#tab-bar {
  height: var(--tab-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #DCE3F3;
  display: flex;
  flex-shrink: 0;
  box-shadow: 0 -6px 16px rgba(5,22,77,.09);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: transparent; border: none; cursor: pointer;
  font-size: 10px; color: var(--gray-500); font-family: inherit; padding: 4px 2px;
  transition: color .15s;
}
.tab-btn .tab-icon { font-size: 18px; }
.tab-btn.active { color: var(--primary); font-weight: 600; }
.tab-btn:hover { color: var(--primary); }

/* ═══ CARD ══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #E6EBF8;
  margin-bottom: 18px;
  overflow: hidden;
}
.card-header {
  padding: 14px 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #EEF2FB;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFDFF 100%);
}
.card-title { font-size: 15px; font-weight: 800; color: #0D245F; letter-spacing: .1px; }
.card-body { padding: 12px 18px 18px; }
.card-body--flush { padding: 0; }

/* ═══ BUTTONS ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 11px; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  transition: opacity .15s, background .15s, transform .12s, box-shadow .15s;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn--primary {
  background: linear-gradient(135deg, #05164D 0%, #0D378F 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(5,22,77,.22);
}
.btn--primary:hover:not(:disabled) { opacity: .96; transform: translateY(-1px); }
.btn--outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn--outline:hover:not(:disabled) { background: rgba(5,22,77,.06); }
.btn--outline-warn { background: transparent; border: 1.5px solid var(--warning); color: var(--warning); }
.btn--outline-warn:hover:not(:disabled) { background: rgba(255,152,0,.06); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover:not(:disabled) { opacity: .88; }
.btn--ghost { background: transparent; border: none; color: var(--primary); padding: 6px 10px; font-size: 13px; }
.btn--ghost:hover { background: rgba(5,22,77,.07); border-radius: 6px; }
.btn--small { padding: 5px 10px; font-size: 12px; }
.btn--block { width: 100%; margin-bottom: 8px; }
.btn--fab {
  position: fixed; bottom: calc(var(--tab-h) + 16px); right: 16px;
  width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.25); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.btn--fab:hover { opacity: .9; }

/* ═══ FORM ELEMENTS ═════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.switch-row { display: flex; align-items: center; gap: 10px; color: var(--gray-900); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #D3DBEC; border-radius: 11px;
  font-family: inherit; font-size: 14px; color: var(--text); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #1A4DC6;
  box-shadow: 0 0 0 3px rgba(26,77,198,.12);
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-hint { font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* Radio group */
.radio-group { display: flex; gap: 8px; }
.radio-label {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 13px; padding: 6px 12px; border-radius: 6px; border: 1.5px solid var(--gray-300);
}
.radio-label input { display: none; }
.radio-label.selected { border-color: var(--primary); background: rgba(5,22,77,.06); color: var(--primary); font-weight: 600; }

/* Chips / multi-select */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--gray-300);
  font-size: 13px; cursor: pointer; background: #fff; transition: all .15s;
}
.chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.chips-group-label {
  width: 100%; font-size: 10px; font-weight: 700; color: #9E9E9E;
  text-transform: uppercase; letter-spacing: 0.6px; margin: 8px 0 2px;
}
.chips-group-label:first-child { margin-top: 0; }

/* Joint map circles – tap feedback */
.jmap-joint circle { transition: fill .12s, opacity .12s; }
.jmap-joint:active circle { opacity: 0.6; }

/* Pain list – location badges */
.entry-locations { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.entry-loc {
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 8px; white-space: nowrap;
}
.loc--low  { background: rgba(76,175,80,0.15);  color: #2E7D32; }
.loc--mid  { background: rgba(255,152,0,0.15);  color: #E65100; }
.loc--high { background: rgba(244,67,54,0.15);  color: #C62828; }

/* Pain form – intensity buttons */
.pf-intensity-buttons { display: flex; gap: 4px; }
.pf-intensity-btn {
  flex: 1; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 10px 0; min-height: 40px;
  opacity: 0.55; transition: opacity .15s, transform .1s, box-shadow .1s;
}
.pf-intensity-btn--active { opacity: 1; transform: scale(1.08); box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* Pain form – compact type chips */
.pf-chips { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pf-type-group-label {
  font-size: 10px; font-weight: 700; color: #9E9E9E;
  text-transform: uppercase; letter-spacing: 0.6px; margin-top: 8px;
}
.pf-type-group-label:first-child { margin-top: 0; }
.pf-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.pf-type-chip {
  display: inline-block; border: 1.5px solid #BDBDBD; border-radius: 14px;
  padding: 3px 10px; font-size: 12px; font-weight: 500;
  color: #424242; background: white; cursor: pointer; white-space: nowrap;
  transition: background .1s, color .1s, border-color .1s;
}
.pf-type-chip--active { border-color: #05164D; background: #05164D; color: white; }

/* Slider */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--primary); }
.intensity-badge {
  min-width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
}
.intensity--low  { background: var(--success); }
.intensity--mid  { background: var(--warning); }
.intensity--high { background: var(--danger); }

/* Dose grid */
.dose-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.dose-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dose-cell label { font-size: 11px; font-weight: 600; color: var(--gray-700); }
.dose-input {
  width: 100%; text-align: center; padding: 8px 4px; border: 1.5px solid var(--gray-300);
  border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--primary);
  font-family: inherit; background: var(--gray-50); outline: none;
}
.dose-input:focus { border-color: var(--primary); }

/* ═══ TABLES ═════════════════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th {
  background: var(--primary); color: #fff; padding: 8px; text-align: left;
  font-weight: 600; font-size: 11px; border-right: 1px solid rgba(255,255,255,.15);
}
th:last-child { border-right: none; }
td { padding: 8px; border-bottom: 1px solid var(--gray-200); border-right: 1px solid var(--gray-100); vertical-align: middle; }
td:last-child { border-right: none; }
tr:nth-child(even) td { background: var(--gray-50); }
tr:hover td { background: #EEF2FF; }
.td-center { text-align: center; font-weight: 600; color: var(--primary); }
.td-small { font-size: 11px; color: var(--gray-700); white-space: normal; }
.td-actions { text-align: center; white-space: nowrap; width: 44px; }
.td-rhythm { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.med-list-hint { font-size: 12px; color: #9E9E9E; text-align: center; padding: 10px 8px 4px; margin: 0; line-height: 1.6; }
.med-section-label { font-size: 11px; font-weight: 700; color: #757575; text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 4px; padding: 0 2px; }
.med-section-label--inactive { color: #BDBDBD; margin-top: 20px; }
.med-period-btn { background: none; border: 1.5px solid currentColor; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; padding: 0; line-height: 1; }
.med-period-btn--stop  { color: #E53935; }
.med-period-btn--start { color: #43A047; }

.med-form-timeline { display:flex; flex-direction:column; gap:8px; }
.med-form-timeline__row { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid #E7ECF5; border-radius:10px; background:#FAFCFF; }
.med-form-timeline__date { display:inline-flex; align-items:center; justify-content:center; padding:3px 8px; border-radius:999px; font-size:12px; font-weight:600; line-height:1.2; }
.med-form-timeline__date--start { color:#1B5E20; background:#E8F5E9; }
.med-form-timeline__date--end { color:#B71C1C; background:#FFEBEE; }
.med-form-timeline__date--active { color:#0D47A1; background:#E3F2FD; }
.med-form-timeline__arrow { color:#90A4AE; font-size:13px; font-weight:700; }

/* ═══ PAIN ENTRY CARD ═══════════════════════════════════════════════════════ */
.entry-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200); cursor: pointer;
}
.entry-card:last-child { border-bottom: none; }
.entry-card:hover { background: var(--gray-50); }
.entry-info { flex: 1; min-width: 0; }
.entry-date { font-size: 11px; color: var(--gray-500); margin-bottom: 2px; }
.entry-types { font-size: 14px; font-weight: 600; }
.entry-note { font-size: 12px; color: var(--gray-700); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-delete { background: transparent; border: none; cursor: pointer; color: var(--gray-500); font-size: 18px; padding: 4px; }
.entry-delete:hover { color: var(--danger); }
.entry-star { background: transparent; border: none; cursor: pointer; color: var(--gray-400); font-size: 20px; line-height: 1; padding: 4px; align-self: center; }
.entry-star:hover { color: #FFAD00; }
.entry-star--on { color: #FFAD00; }

/* Pain list – Alle / Favoriten tabs */
.pl-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.pl-tab {
  flex: 1; border: 1.5px solid var(--gray-300); border-radius: 999px;
  background: #fff; color: var(--gray-700); font-size: 0.9rem; font-weight: 600;
  padding: 7px 12px; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.pl-tab--active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Pain list – day separator */
.pl-day-sep { display: flex; align-items: center; gap: 10px; padding: 12px 4px 4px; }
.pl-day-sep::before, .pl-day-sep::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.pl-day-sep-label {
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap;
}

/* Pain list – time-window group */
.pl-group {
  margin: 4px 0 8px; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07); overflow: hidden;
}
.pl-group-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px 6px; border-bottom: 1px solid var(--gray-100); }
.pl-group-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pl-group-date { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.4px; }
.pl-group-time { font-size: 14px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.pl-group-count { font-size: 12px; font-weight: 500; color: var(--gray-500); }

/* Pain form – previous-points toggle */
.pf-prev-toggle { background: transparent; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; }

/* Pain-list body thumbnail */
.entry-thumb { display: flex; align-items: center; flex-shrink: 0; padding: 0 6px; }
.entry-thumb__inner { position: relative; border-radius: 5px; overflow: hidden; border: 1px solid var(--gray-200); background: #fff; }
.entry-thumb__img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.entry-thumb__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ═══ PATIENT CARD (dark) ════════════════════════════════════════════════════ */
.patient-card { background: var(--primary); }
.patient-card .card-title { color: #fff; }
.patient-line { color: rgba(255,255,255,.9); font-size: 14px; margin: 3px 0; }
.patient-label { font-weight: 700; color: var(--accent); }

/* ═══ BODY MAP ════════════════════════════════════════════════════════════════ */
.body-map-wrap { position: relative; width: 100%; max-width: 480px; margin: 0 auto; cursor: crosshair; }
.body-map-wrap.readonly { cursor: default; }
.body-map-wrap img { display: block; width: 100%; height: auto; pointer-events: none; border-radius: 8px; }
.body-map-wrap svg.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.body-map-wrap.readonly svg.overlay { pointer-events: none; }
.marker-g { pointer-events: all; cursor: pointer; }
.body-map-labels { display: flex; justify-content: space-around; margin-top: 6px; }
.body-map-label { font-size: 11px; font-weight: 600; color: var(--primary); }
.body-map-hint { font-size: 12px; color: var(--gray-500); text-align: center; margin-top: 6px; }

/* Side-by-side half-views (pain form) */
.body-map-stack { display: flex; flex-direction: row; gap: 8px; width: 100%; }
.body-map-half-wrap { flex: 1; min-width: 0; }
.body-map-wrap-half { position: relative; border-radius: 8px; cursor: crosshair; }
.body-map-half-img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: 0 0; pointer-events: none; }
.body-map-half-img--back { object-position: 100% 0; }
.body-map-wrap-half svg.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ═══ DIAGNOSIS LIST ═══════════════════════════════════════════════════════ */
.diag-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.diag-item:last-child { border-bottom: none; }
.diag-text { flex: 1; font-size: 14px; }
.diag-edit-row { display: flex; gap: 8px; flex: 1; }

/* ═══ EMPTY STATE ════════════════════════════════════════════════════════════ */
.empty { text-align: center; color: var(--gray-500); padding: 40px 20px; font-size: 14px; line-height: 1.8; }

/* ═══ MODAL ══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid #E6EBF8;
  box-shadow: 0 16px 40px rgba(5,22,77,.25);
}
.modal-box p { font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

/* ═══ TOAST ══════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--tab-h) + 20px); left: 50%; transform: translateX(-50%);
  background: #1F293F; color: #fff; border-radius: 10px; padding: 10px 20px;
  font-size: 14px; z-index: 200; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.3);
  transition: opacity .3s;
}

@media (max-width: 900px) {
  #app {
    max-width: 100%;
  }

  #page-container {
    padding: 14px;
  }

  .card {
    margin-bottom: 14px;
  }
}
.toast.hidden { display: none; }

/* ═══ SPINNER ════════════════════════════════════════════════════════════════ */
.spinner-wrap { display: flex; justify-content: center; padding: 40px; }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--gray-200);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ NOTE / WARNING ═══════════════════════════════════════════════════════ */
.note { font-size: 13px; color: var(--gray-700); line-height: 1.6; }
.note--warn { color: #B45309; background: #FEF3C7; border-radius: 6px; padding: 8px 12px; }

/* ═══ RANGE LABELS ═══════════════════════════════════════════════════════════ */
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ═══ EXPORT ════════════════════════════════════════════════════════════════ */
.profile-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.profile-label { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .4px; }
.range-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.range-dates { font-size: 12px; color: var(--gray-500); }
.export-scope { margin-top: 10px; background: #f7f8fc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; }

/* ═══ UTILITIES ══════════════════════════════════════════════════════════════ */
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.error-msg { color: var(--danger); font-size: 13px; text-align: center; margin-top: 8px; }
.version-line { text-align: center; font-size: 12px; color: var(--gray-500); margin-top: 24px; }

/* ═══ HELP / FAQ PAGE ════════════════════════════════════════════════════ */
.help-hero { text-align: center; padding: 28px 16px 16px; }
.help-logo { width: 72px; height: 72px; border-radius: 18px; background: var(--primary); color: #fff; font-size: 36px; font-weight: 800; line-height: 72px; margin: 0 auto 12px; }
.help-app-name { font-size: 24px; font-weight: 700; color: var(--primary); margin: 0 0 2px; }
.help-tagline { font-size: 12px; color: var(--gray-500); margin: 0; font-style: italic; letter-spacing: 0.04em; }
.help-faq { padding: 8px 0 32px; }
.help-card { margin-bottom: 8px; }
.help-question { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 14px 14px; text-align: left; cursor: pointer; font-family: inherit; }
.help-question--open { border-bottom: 1px solid #eee; }
.help-q-icon { font-size: 1.2rem; flex-shrink: 0; }
.help-q-label { flex: 1; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.help-chevron { font-size: 1rem; color: var(--gray-500); flex-shrink: 0; }
.help-answer { padding: 12px 14px 14px 44px; font-size: 0.87rem; line-height: 1.55; color: #555; }

/* ═══ INFO PAGE ═══════════════════════════════════════════════════════════ */
.info-hero { text-align: center; padding: 28px 16px 16px; }
.info-logo { width: 72px; height: 72px; border-radius: 18px; background: var(--primary); color: #fff; font-size: 36px; font-weight: 800; line-height: 72px; margin: 0 auto 12px; }
.info-app-name { font-size: 24px; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.info-version { font-size: 13px; color: var(--gray-500); margin: 0 0 12px; }
.info-description { font-size: 14px; color: #424242; line-height: 1.5; margin: 0; }
.info-publisher-name { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 2px; }
.info-publisher-addr { font-size: 12px; color: var(--gray-500); margin: 0; }
.info-privacy-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.info-privacy-row p { font-size: 13px; color: #424242; line-height: 1.5; margin: 0; flex: 1; }
.info-privacy-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.info-privacy-icon--green { filter: hue-rotate(80deg); }
.info-privacy-icon--neutral { opacity: 0.5; }
.info-disclaimer { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin: 0; font-style: italic; }
.info-tech { font-size: 13px; color: var(--gray-500); margin: 0; }
.info-footer { text-align: center; font-size: 12px; color: #BDBDBD; margin: 16px 0 32px; }
.lang-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-btn { flex:1; min-width:72px; padding:7px 8px; border-radius:20px; border:2px solid var(--primary); background:transparent; color:var(--primary); font-size:13px; font-weight:500; cursor:pointer; text-align:center; }
.lang-btn--active { background:var(--primary); color:#fff; }
input[type=file].hidden-file { display: none; }

.doc-detail-field { display:flex; gap:8px; font-size:0.9rem; padding:3px 0; }
.doc-detail-field strong { color:#888; flex-shrink:0; min-width:110px; font-weight:600; }
.doc-detail-text { font-size:0.9rem; line-height:1.55; white-space:pre-wrap; margin:0; }

/* ═══ LOGIN PAGE ═════════════════════════════════════════════════════════════ */
.login-page { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100vh - 56px); padding:32px 24px; background:var(--primary); }
.login-logo { color:#fff; font-size:2.4rem; font-weight:700; letter-spacing:1px; margin-bottom:6px; }
.login-subtitle { color:rgba(255,255,255,0.75); font-size:0.95rem; margin-bottom:36px; text-align:center; }
.login-card { background:#fff; border-radius:16px; padding:28px 24px; width:100%; max-width:400px; box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.login-card__title { font-size:1.2rem; font-weight:600; color:var(--primary); margin-bottom:20px; text-align:center; }
.login-field { margin-bottom:16px; }
.login-field label { display:block; font-size:0.85rem; font-weight:600; color:#555; margin-bottom:6px; }
.login-field input { width:100%; box-sizing:border-box; padding:10px 14px; border:1.5px solid #ddd; border-radius:8px; font-size:1rem; outline:none; }
.login-field input:focus { border-color:var(--primary); }
.login-error { background:#fff3f3; border:1px solid #f5c6c6; color:#c0392b; border-radius:8px; padding:10px 14px; font-size:0.9rem; margin-bottom:14px; text-align:center; }
.login-error.hidden { display:none; }
.login-info { background:#f2fbf5; border:1px solid #bfe8ca; color:#1f7a37; border-radius:8px; padding:10px 14px; font-size:0.9rem; margin-bottom:14px; text-align:center; }
.login-info.hidden { display:none; }
.login-note { color:#606060; font-size:0.9rem; margin-bottom:16px; text-align:center; }
.login-btn { width:100%; padding:12px; background:var(--primary); color:#fff; border:none; border-radius:8px; font-size:1rem; font-weight:600; cursor:pointer; }
.login-btn:disabled { opacity:0.6; cursor:default; }
.login-forgot { display:block; margin:-2px 0 10px auto; text-align:right; font-size:0.86rem; color:var(--primary); background:none; border:none; cursor:pointer; text-decoration:underline; padding:0; }
.login-toggle { display:block; width:100%; margin-top:14px; text-align:center; font-size:0.9rem; color:var(--primary); background:none; border:none; cursor:pointer; text-decoration:underline; }
.login-admin { display:block; width:100%; margin-top:8px; text-align:center; font-size:0.86rem; color:#666; background:none; border:none; cursor:pointer; text-decoration:underline; }
.login-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.48); display:flex; align-items:center; justify-content:center; padding:20px; z-index:1000; }
.login-modal-overlay.hidden { display:none; }
.login-modal { background:#fff; border-radius:14px; width:100%; max-width:420px; padding:20px; box-shadow:0 10px 36px rgba(0,0,0,.22); }
.login-modal__title { color:var(--primary); font-weight:700; font-size:1.08rem; margin-bottom:8px; }
.login-modal__text { color:#555; font-size:0.9rem; margin-bottom:14px; }
.login-modal__actions { display:flex; justify-content:flex-end; gap:10px; }
.login-modal__btn { border-radius:8px; font-size:0.92rem; font-weight:600; border:none; padding:10px 14px; cursor:pointer; }
.login-modal__btn--ghost { background:#f1f1f1; color:#424242; }
.login-modal__btn--primary { background:var(--primary); color:#fff; }
.user-mgmt-list { display:flex; flex-direction:column; gap:8px; }
.user-mgmt-row { display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--gray-200); border-radius:8px; padding:10px 12px; }
.user-mgmt-row__name { font-size:14px; font-weight:600; color:var(--text); }
.user-mgmt-row__meta { font-size:12px; color:var(--gray-500); margin-top:2px; }
.user-mgmt-row__actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.user-mgmt-badge { display:inline-block; font-size:11px; font-weight:600; color:#fff; background:var(--primary); border-radius:12px; padding:4px 8px; white-space:nowrap; }
.tab-bar--hidden { display: none !important; }
.btn--hidden { display: none !important; }
.btn--danger { background: var(--danger); color: #fff; border: none; border-radius: 8px; padding: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.btn--full { width: 100%; }

/* ═══ EASTER EGG ════════════════════════════════════════════════════════════ */
.info-version--tappable { cursor: default; -webkit-user-select: none; user-select: none; }

.easter-egg-page { position: relative; min-height: calc(100vh - 112px); background: radial-gradient(ellipse at 50% 38%, #0c360c 0%, #001800 40%, #000 80%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; box-sizing: border-box; overflow: hidden; }
.easter-egg-fog { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 32%, rgba(0,160,40,0.12) 0%, transparent 65%); animation: eg-fog 5s ease-in-out infinite alternate; pointer-events: none; will-change: opacity, transform; }
.easter-egg-fog--2 { background: radial-gradient(ellipse at 48% 55%, rgba(0,100,20,0.08) 0%, transparent 55%); animation-duration: 7s; animation-direction: alternate-reverse; }
@keyframes eg-fog { from { opacity:.5; transform:scale(1) translateY(0); } to { opacity:1; transform:scale(1.08) translateY(-8px); } }
.easter-egg-ghost { position: absolute; font-size: 280px; font-weight: 900; color: rgba(0,80,20,0.07); top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; -webkit-user-select: none; user-select: none; letter-spacing: -30px; animation: eg-pulse 6s ease-in-out infinite alternate; will-change: opacity, transform; }
@keyframes eg-pulse { from { opacity:.5; transform:translate(-50%,-50%) scale(1); } to { opacity:1; transform:translate(-50%,-50%) scale(1.05); } }
.easter-egg-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.easter-egg-logo { width: 100px; height: auto; filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(90deg) drop-shadow(0 0 14px rgba(0,200,60,0.8)); animation: eg-float 3.5s ease-in-out infinite; margin-bottom: 20px; will-change: transform; }
@keyframes eg-float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-7px); } }
.easter-egg-app-num { font-size: 10px; letter-spacing: 5px; color: #2a7a2a; text-transform: uppercase; margin-bottom: 2px; }
.easter-egg-author { font-size: 14px; color: #4aaa4a; }
.easter-egg-divider { width: 40px; height: 1px; background: linear-gradient(90deg, transparent, #2a7a2a, transparent); margin: 14px 0; }
.easter-egg-label { font-size: 10px; letter-spacing: 3px; color: #2a7a2a; text-transform: uppercase; margin-bottom: 6px; }
.easter-egg-title { font-size: 20px; font-weight: 700; color: #fff; text-shadow: 0 0 10px rgba(0,220,60,0.9), 0 0 28px rgba(0,180,50,0.6); line-height: 1.3; margin-bottom: 4px; }
.easter-egg-subtitle { font-size: 13px; color: #5ab85a; font-style: italic; }
.easter-egg-link { margin-top: 4px; font-size: 13px; color: #4dff7c; text-decoration: none; border-bottom: 1px solid rgba(77,255,124,0.35); padding-bottom: 2px; }
.easter-egg-disclaimer { margin-top: 20px; font-size: 10px; color: #2a5a2a; line-height: 1.5; max-width: 260px; text-align: center; font-style: italic; }

/* ── Preparation form ────────────────────────────────────────────────────── */
.prep-scale { margin-bottom: 18px; }
.prep-scale-label { display: block; font-size: 13px; color: #212121; margin-bottom: 6px; }
.prep-nrs-buttons { display: flex; gap: 3px; }
.prep-nrs-btn { flex: 1; min-width: 0; padding: 7px 0; border: 1.5px solid #E0E0E0; border-radius: 6px; background: #FAFAFA; color: #616161; font-size: 13px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.prep-nrs-low  { background: #4CAF50; border-color: #4CAF50; color: #fff; font-weight: 700; }
.prep-nrs-mid  { background: #FF9800; border-color: #FF9800; color: #fff; font-weight: 700; }
.prep-nrs-high { background: #F44336; border-color: #F44336; color: #fff; font-weight: 700; }
.prep-nrs-hint-low  { border-color: #4CAF50; border-style: dashed; color: #4CAF50; }
.prep-nrs-hint-mid  { border-color: #FF9800; border-style: dashed; color: #FF9800; }
.prep-nrs-hint-high { border-color: #F44336; border-style: dashed; color: #F44336; }
.prep-scale-labels { display: flex; justify-content: space-between; font-size: 11px; color: #9E9E9E; margin-top: 4px; }
.prep-check-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.prep-check-row input[type="checkbox"] { flex-shrink: 0; margin: 0; cursor: pointer; }
.prep-check-text { font-size: 13px; color: #212121; }
.prep-checkboxes { margin-top: 8px; }

/* ── Vaccination module ──────────────────────────── */
.vac-section-title { font-size: 13px; font-weight: 700; color: #05164D; text-transform: uppercase; letter-spacing: 0.4px; margin: 16px 0 6px; }

.vac-due-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; padding: 12px 14px; border-radius: 10px; border-left: 4px solid currentColor; background: white; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: 8px; }
.vac-due--overdue { color: #D32F2F; background: #FFF5F5; }
.vac-due--urgent  { color: #E53935; background: #FFF8F8; }
.vac-due--soon    { color: #FF8F00; background: #FFFBF0; }
.vac-due--upcoming{ color: #1976D2; background: #F3F8FF; }
.vac-due-card__name   { font-weight: 700; font-size: 14px; grid-column: 1; }
.vac-due-card__vaccine{ font-size: 12px; color: #616161; grid-column: 1; }
.vac-due-card__badge  { font-size: 12px; font-weight: 700; grid-column: 2; grid-row: 1; text-align: right; }
.vac-due-card__date   { font-size: 11px; grid-column: 2; grid-row: 2; text-align: right; color: #9E9E9E; }
.vac-ext-link { justify-self: end; align-self: end; font-size: 11px; font-weight: 600; color: #0a2a7a; text-decoration: underline; }

.vac-disease-group { margin-bottom: 10px; }
.vac-disease-group__header { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px 8px; border-bottom: 1px solid #F5F5F5; }
.vac-disease-group__name  { font-weight: 700; font-size: 14px; color: #05164D; }
.vac-disease-group__stiko { font-size: 10px; color: #9E9E9E; white-space: nowrap; margin-left: 8px; }
.vac-disease-group__stiko--indication { color: #B26A00; }

/* ── Vaccination info nav buttons ──────────────────────────────────────────── */
.vac-info__nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.vac-info__nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: #fff; border: 1px solid #dbe2f1; border-radius: 12px; cursor: pointer; font-family: inherit; box-shadow: 0 1px 3px rgba(5,22,77,.07); }
.vac-info__nav-icon { font-size: 20px; }
.vac-info__nav-label { flex: 1; text-align: left; font-size: 15px; font-weight: 600; color: #05164D; }
.vac-info__nav-chev { color: #BDBDBD; font-size: 20px; }

/* ── Vaccination timeline ──────────────────────────────────────────────────── */
.vac-tl__intro { background: linear-gradient(135deg, #05164D 0%, #0a2a7a 100%); color: #fff; padding: 18px 16px; border-radius: 12px; margin-bottom: 14px; }
.vac-tl__title { margin: 0; font-size: 20px; font-weight: 700; }
.vac-tl__subtitle { margin: 6px 0 0; font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.35; }
.vac-tl__sec { margin-bottom: 18px; }
.vac-tl__section-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #05164D; }
.vac-tl__note { font-size: 14px; color: #5a647d; line-height: 1.4; margin: 0; }
.vac-tl__upcoming-age { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #2b3550; }
.vac-tl__up-card { display: flex; gap: 12px; background: #fff; border-left: 4px solid #FFAD00; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(5,22,77,.08); }
.vac-tl__up-icon { font-size: 22px; }
.vac-tl__up-age { font-weight: 700; color: #05164D; font-size: 15px; }
.vac-tl__items { margin: 6px 0 0; padding-left: 18px; }
.vac-tl__items li { font-size: 13.5px; color: #2b3550; line-height: 1.4; }
.vac-tl__line { padding: 4px 0; }
.vac-tl__now { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px 8px; }
.vac-tl__now-dot { width: 12px; height: 12px; border-radius: 50%; background: #FFAD00; border: 2px solid #fff; box-shadow: 0 0 0 2px #FFAD00; }
.vac-tl__now-label { font-size: 13px; font-weight: 700; color: #B26A00; }
.vac-tl__stage { display: flex; gap: 12px; position: relative; }
.vac-tl__stage-rail { flex: 0 0 40px; display: flex; flex-direction: column; align-items: center; position: relative; }
.vac-tl__stage-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: #d8e0f2; }
.vac-tl__stage:first-child .vac-tl__stage-rail::before { top: 20px; }
.vac-tl__stage:last-child .vac-tl__stage-rail::before { bottom: calc(100% - 40px); }
.vac-tl__stage-icon { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #1565C0; display: flex; align-items: center; justify-content: center; font-size: 19px; box-shadow: 0 1px 4px rgba(5,22,77,.12); }
.vac-tl__stage--past .vac-tl__stage-icon { border-color: #BDBDBD; opacity: .7; }
.vac-tl__stage-body { flex: 1; background: #fff; border-radius: 12px; padding: 10px 14px 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(5,22,77,.07); }
.vac-tl__stage--past .vac-tl__stage-body { opacity: .62; }
.vac-tl__stage-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vac-tl__stage-age { font-weight: 700; color: #05164D; font-size: 15px; }
.vac-tl__stage-tag { font-size: 11px; font-weight: 600; color: #00695C; background: rgba(0,105,92,.1); padding: 2px 8px; border-radius: 10px; }

/* ── Travel vaccinations ───────────────────────────────────────────────────── */
.vac-tr__intro { background: linear-gradient(135deg, #05164D 0%, #0a2a7a 100%); color: #fff; padding: 18px 16px; border-radius: 12px; margin-bottom: 14px; }
.vac-tr__title { margin: 0; font-size: 20px; font-weight: 700; }
.vac-tr__subtitle { margin: 6px 0 0; font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.35; }
.vac-tr__picker { background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(5,22,77,.08); }
.vac-tr__label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #757575; margin-bottom: 4px; }
.vac-tr__select { width: 100%; padding: 9px 8px; border: 1.5px solid var(--gray-300); border-radius: 8px; font-family: inherit; font-size: 15px; font-weight: 600; color: #05164D; background: #fff; }
.vac-tr__result { margin-top: 14px; }
.vac-tr__result-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.vac-tr__country { font-size: 19px; font-weight: 700; color: #05164D; }
.vac-tr__region { font-size: 13px; color: #5a647d; margin-top: 2px; }
.vac-tr__std-note { background: #eaf0fb; border: 1px solid #d4e0f5; border-radius: 10px; padding: 9px 12px; margin: 0 0 12px; font-size: 13px; color: #2b3550; line-height: 1.4; }
.vac-tr__none { font-size: 14px; color: #5a647d; line-height: 1.4; }
.vac-tr__list { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(5,22,77,.08); }
.vac-tr__list-head { display: flex; justify-content: space-between; padding: 8px 14px; background: #05164D; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.vac-tr__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid #eef1f7; }
.vac-tr__vac { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vac-tr__vac-name { font-size: 14.5px; font-weight: 600; color: #05164D; }
.vac-tr__badge { align-self: flex-start; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 9px; }
.vac-tr__badge--man { color: #C62828; background: rgba(198,40,40,.1); }
.vac-tr__badge--std { color: #2E7D32; background: rgba(46,125,50,.1); }
.vac-tr__badge--con { color: #B26A00; background: rgba(178,106,0,.1); }
.vac-tr__lead { font-size: 12.5px; color: #424242; text-align: right; flex-shrink: 0; max-width: 46%; line-height: 1.3; }
.vac-tr__malaria { margin: 12px 0 0; padding: 9px 12px; background: rgba(255,152,0,.08); border-radius: 10px; font-size: 13px; color: #8a4b00; line-height: 1.4; }
.vac-tr__hint { margin: 12px 0 0; font-size: 13.5px; color: #05164D; font-weight: 600; }
.vac-tr__official { display: inline-flex; align-items: center; gap: 5px; margin: 12px 0 0; padding: 8px 12px; background: #fff; border: 1px solid #cdd7ec; border-radius: 10px; font-size: 14px; font-weight: 600; color: #0a2a7a; text-decoration: none; }
.vac-tr__disclaimer { margin: 16px 0 0; font-size: 12px; color: #8a93a8; font-style: italic; line-height: 1.45; }

.vac-dose-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #F5F5F5; cursor: pointer; }
.vac-dose-row:last-child { border-bottom: none; }
.vac-dose-row:hover { background: #F8F9FF; }
.vac-dose-row__num    { font-size: 11px; font-weight: 700; color: #9E9E9E; min-width: 18px; }
.vac-dose-row__date   { font-size: 13px; font-weight: 600; color: #212121; }
.vac-dose-row__vaccine{ font-size: 12px; color: #616161; flex: 1; }
.vac-dose-row__next   { font-size: 11px; color: #1976D2; white-space: nowrap; flex-shrink: 0; }
.vac-dose-row__next--overdue { color: #D32F2F; }
.vac-dose-row .vac-ext-link { margin-left: 8px; }

.vac-dose-toggle { display:inline-flex; align-items:center; justify-content:center; gap:6px; margin:4px auto 10px; padding:4px 10px; border:1px solid #DDE3F0; border-radius:999px; background:#F7F9FF; color:#4A5A83; font-size:11px; font-weight:600; }
.vac-dose-toggle__chevron { font-size:10px; line-height:1; }

.vac-missing-hint { background: #FFF8E1; border: 1px solid #FFE0B2; border-left: 4px solid #FB8C00; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.vac-missing-hint__text { margin: 0; font-size: 12px; color: #6D4C41; }
.vac-missing-hint__list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.vac-missing-hint__chip { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #FFE0B2; color: #8D3F00; font-size: 11px; font-weight: 600; }

.vac-form-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.vac-suggestion-btn { padding: 4px 10px; border-radius: 14px; border: 1.5px solid #BDBDBD; background: white; color: #424242; font-size: 12px; cursor: pointer; }
.vac-suggestion-btn.active { background: #05164D; border-color: #05164D; color: white; }

/* ── Schnelleingabe (Quick Add) ──────────────────── */
.vqa-card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(5,22,77,.10); margin-bottom: 16px; border: 1.5px solid #E8EBF4; overflow: hidden; }
.vqa-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #EEF1FA; border: none; cursor: pointer; font-family: inherit; }
.vqa-header__title { font-size: 13px; font-weight: 700; color: #05164D; }
.vqa-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.vqa-label { display: block; font-size: 10px; font-weight: 700; color: #9E9E9E; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.vqa-input { width: 100%; padding: 7px 9px; border: 1.5px solid #E0E0E0; border-radius: 6px; font-family: inherit; font-size: 13px; color: #212121; background: #FAFAFA; outline: none; }
.vqa-input:focus { border-color: #05164D; background: #fff; }
.vqa-field { display: flex; flex-direction: column; flex: 1; min-width: 90px; }
.vqa-field--name { flex: 2; min-width: 120px; }
.vqa-field--physician { flex: 1.5; }
.vqa-field--notes { flex: 2; }
.vqa-row { display: flex; gap: 8px; flex-wrap: wrap; }
.vqa-diseases { display: flex; flex-direction: column; }
.vqa-disease-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0; }
.vqa-chip { padding: 5px 9px; border-radius: 12px; border: 1.5px solid #BDBDBD; background: #FAFAFA; color: #424242; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.vqa-chip--active { background: #05164D; border-color: #05164D; color: #fff; }
.vqa-save-btn { width: 38px; height: 36px; border-radius: 8px; background: #05164D; color: #fff; border: none; cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.vqa-save-btn:disabled { opacity: 0.4; }
.vqa-error { font-size: 11px; color: #E53935; margin: 3px 0 0; }

/* ── Vaccination info (STIKO schedule by age group) ─────────────────────────── */
.page-header__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vac-info { padding-bottom: 24px; }
.vac-info__intro { background: linear-gradient(135deg, #05164D 0%, #0a2a7a 100%); color: #fff; padding: 18px 16px; border-radius: 12px; margin-bottom: 16px; }
.vac-info__title { margin: 0; font-size: 20px; font-weight: 700; }
.vac-info__subtitle { margin: 6px 0 0; font-size: 13px; line-height: 1.35; color: rgba(255,255,255,.8); }
.vac-info__timeline { padding: 0 2px; }
.vac-age-card { display: flex; gap: 12px; position: relative; }
.vac-age-card__rail { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; position: relative; }
.vac-age-card__rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: #d8e0f2; }
.vac-age-card:first-child .vac-age-card__rail::before { top: 22px; }
.vac-age-card:last-child  .vac-age-card__rail::before { bottom: calc(100% - 44px); }
.vac-age-card__icon { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 2px solid #FFAD00; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 2px 6px rgba(5,22,77,.12); }
.vac-age-card__body { flex: 1; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(5,22,77,.08); }
.vac-age-card__age { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #05164D; }
.vac-age-card__items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.vac-age-card__item { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.35; color: #2b3550; }
.vac-age-card__item::before { content: ''; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: #FFAD00; }
.vac-info__box { background: #eaf0fb; border: 1px solid #d4e0f5; border-radius: 14px; padding: 14px 16px; margin-top: 4px; }
.vac-info__box-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #05164D; }
.vac-info__notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.vac-info__notes li { font-size: 13px; line-height: 1.4; color: #2b3550; }
.vac-info__sources { margin-top: 16px; padding: 0 2px; }
.vac-info__sources-label { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #05164D; }
.vac-info__sources-note { margin: 0 0 10px; font-size: 12.5px; line-height: 1.4; color: #5a647d; }
.vac-info__source-links { display: flex; flex-wrap: wrap; gap: 8px; }
.vac-info__source-link { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; background: #fff; border: 1px solid #cdd7ec; border-radius: 10px; font-size: 13px; font-weight: 600; color: #0a2a7a; text-decoration: none; }
.vac-info__disclaimer { margin: 18px 2px 0; font-size: 11.5px; line-height: 1.45; color: #8a93a8; font-style: italic; }

/* ── Blood pressure ────────────────────────────────────────────────────────── */
.bp-empty { text-align: center; color: #757575; padding: 60px 24px; }
.bp-empty__icon { font-size: 48px; margin-bottom: 12px; }
.bp-warn { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; border-left: 4px solid; }
.bp-warn--red { background: rgba(211,47,47,.1); border-color: #D32F2F; color: #B71C1C; }
.bp-warn--yellow { background: rgba(249,168,37,.12); border-color: #F9A825; color: #8a5a00; }
.bp-warn--blue { background: rgba(0,114,178,.1); border-color: #0072B2; color: #004c77; }
.bp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.bp-card { background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 1px 3px rgba(5,22,77,.08); border-top: 3px solid #1565C0; }
.bp-card--target { border-top-color: #2E7D32; }
.bp-card__label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #757575; }
.bp-card__value { font-size: 21px; font-weight: 700; color: #05164D; line-height: 1.1; }
.bp-card__unit { font-size: 11px; color: #9E9E9E; }
.bp-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.bp-range { display: flex; gap: 4px; flex-wrap: wrap; }
.bp-range__btn { padding: 5px 10px; border-radius: 14px; border: 1.5px solid #cdd7ec; background: #fff; color: #05164D; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.bp-range__btn--active { background: #05164D; border-color: #05164D; color: #fff; }
.bp-pulse-toggle { padding: 5px 12px; border-radius: 14px; border: 1.5px solid #D55E00; background: #fff; color: #D55E00; font-size: 11.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.bp-pulse-toggle--active { background: #D55E00; color: #fff; }
.bp-chart { background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 1px 3px rgba(5,22,77,.08); margin-bottom: 8px; }
.bp-svg { width: 100%; height: auto; display: block; }
.bp-chart__empty { text-align: center; color: #9E9E9E; padding: 30px; font-size: 13px; }
.bp-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 4px 2px; font-size: 11px; color: #555; }
.bp-legend span { display: inline-flex; align-items: center; gap: 4px; }
.bp-legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.bp-legend__shape { color: #777; }
.bp-daypart { display: flex; gap: 8px; margin: 8px 0; }
.bp-daypart__col { flex: 1; background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 1px 3px rgba(5,22,77,.08); }
.bp-daypart__label { font-size: 12.5px; font-weight: 600; color: #05164D; }
.bp-daypart__value { font-size: 18px; font-weight: 700; color: #05164D; }
.bp-daypart__sub { font-size: 11px; color: #9E9E9E; }
.bp-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #05164D; margin: 16px 0 8px; }
.bp-list { display: flex; flex-direction: column; gap: 4px; }
.bp-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: 0 1px 2px rgba(5,22,77,.06); }
.bp-row__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bp-row__bp { font-weight: 700; color: #05164D; font-size: 15px; min-width: 64px; }
.bp-row__pulse { color: #D55E00; font-size: 13px; }
.bp-row__when { margin-left: auto; color: #757575; font-size: 12.5px; }
.bp-disclaimer { margin-top: 16px; font-size: 11.5px; color: #9E9E9E; font-style: italic; line-height: 1.4; }
.bp-category { margin-top: 12px; padding: 8px 12px; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 700; text-align: center; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.bp-chip { padding: 6px 12px; border-radius: 16px; border: 1.5px solid #BDBDBD; background: #FAFAFA; color: #424242; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.bp-chip--active { background: #05164D; border-color: #05164D; color: #fff; }

/* ═══ DOCUMENTS TAB ═══════════════════════════════════════════════════════════ */
.doc-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: #ECEFF5; color: #26418C; font-size: 11px; font-weight: 700;
}
.doc-row { display: flex; align-items: stretch; gap: 8px; padding: 4px 0; }
.doc-row__item {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; cursor: pointer;
}
.doc-row__icon { font-size: 20px; flex-shrink: 0; }
.doc-row__main { min-width: 0; }
.doc-row__main strong { font-size: 14px; color: #1A1A1A; }
.doc-row__meta {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-row__del {
  flex-shrink: 0; width: 42px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #F3D6D6; border-radius: 10px; background: #fff;
  color: #D32F2F; font-size: 17px; cursor: pointer;
}
.doc-row__del:active { background: #FDECEC; }

/* ═══ Lab dashboard ════════════════════════════════════════════════════════ */
.lab-disclaimer {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 0 4px; padding: 10px 12px;
  background: rgba(5, 22, 77, 0.04); border-radius: 10px;
  border: 1px solid rgba(5, 22, 77, 0.08);
}
.lab-disclaimer__icon { font-size: 16px; color: #05164D; opacity: 0.6; flex-shrink: 0; margin-top: 1px; }
.lab-disclaimer__text { font-size: 12px; color: #616161; line-height: 1.5; margin: 0; }

.lab-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 32px 40px; text-align: center; }
.lab-empty__icon { font-size: 52px; opacity: 0.3; margin-bottom: 16px; }
.lab-empty__text { font-size: 16px; font-weight: 600; color: #424242; margin: 0 0 8px; }
.lab-empty__sub { font-size: 13px; color: #9E9E9E; margin: 0; line-height: 1.5; }

/* Group chips */
.lab-chips-row { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lab-chips-row::-webkit-scrollbar { display: none; }
.lab-chip {
  display: flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  border: 1.5px solid #E0E0E0; background: #fff; color: #424242; transition: all 0.15s ease; flex-shrink: 0;
}
.lab-chip--active { background: #05164D; border-color: #05164D; color: #fff; }
.lab-chip--warn { border-color: #FFCDD2; }
.lab-chip--warn.lab-chip--active { background: #05164D; border-color: #05164D; }
.lab-chip__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700;
  background: #F44336; color: #fff;
}
.lab-chip--active .lab-chip__badge { background: rgba(255, 255, 255, 0.25); }

/* View toggle */
.lab-toggle-row { display: flex; justify-content: flex-end; padding: 0 0 8px; }
.lab-toggle { display: flex; background: #E8EAF0; border-radius: 10px; padding: 2px; gap: 2px; }
.lab-toggle__btn { padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #757575; background: transparent; border: none; cursor: pointer; transition: all 0.15s ease; }
.lab-toggle__btn--active { background: #05164D; color: #fff; box-shadow: 0 1px 4px rgba(5, 22, 77, 0.2); }

/* ── Table view ── */
.lab-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.lab-table { min-width: 100%; font-size: 13px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(5, 22, 77, 0.07); background: #fff; }
.lab-table__row { display: flex; border-bottom: 1px solid #F5F5F5; }
.lab-table__row:last-child { border-bottom: none; }
.lab-table__row--head { background: #05164D; }
.lab-table__row--group { background: #F8F9FC; }
.lab-table__group-label { padding: 6px 12px; font-size: 11px; font-weight: 700; color: #05164D; text-transform: uppercase; letter-spacing: 0.5px; }
.lab-table__cell { padding: 8px 10px; display: flex; align-items: center; min-width: 80px; border-right: 1px solid #F0F0F0; box-sizing: border-box; }
.lab-table__cell:last-child { border-right: none; }
.lab-table__cell--param { min-width: 140px; max-width: 140px; flex-direction: column; align-items: flex-start; gap: 1px; }
.lab-table__cell--sticky { position: sticky; left: 0; background: #fff; z-index: 5; box-shadow: 1px 0 4px rgba(0, 0, 0, 0.05); }
.lab-table__row--head .lab-table__cell--sticky { background: #05164D; box-shadow: none; }
.lab-table__cell--date {
  justify-content: center; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.8);
  min-width: 80px; text-align: center; font-family: inherit; background: transparent; border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.lab-table__cell--date:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.lab-table__cell--date-selected { color: #fff; font-weight: 700; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 -3px 0 #FFAD00; }
.lab-table__cell--val { justify-content: center; font-size: 13px; color: #212121; min-width: 80px; }
.lab-table__cell--val-btn { border: none; background: transparent; font-family: inherit; cursor: pointer; transition: background 0.12s ease; }
.lab-table__cell--val-btn:hover { background: rgba(5, 22, 77, 0.06); }
.lab-table__cell--val-selected { background: #EEF3FF; }
.lab-table__cell--abnormal { background: #FFF3E0; color: #E65100; font-weight: 600; }
.lab-table__cell--abnormal.lab-table__cell--val-selected { background: #FFE3C2; }
.lab-table__cell--range-head, .lab-table__cell--scale-head { justify-content: center; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.85); text-align: center; }
.lab-table__cell--range-head { min-width: 92px; }
.lab-table__cell--scale-head { min-width: 150px; }
.lab-table__cell--range { justify-content: center; min-width: 92px; font-size: 12px; color: #424242; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-table__cell--scale { justify-content: center; min-width: 150px; }
.lab-table__param-name { font-size: 13px; font-weight: 600; color: #212121; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.lab-table__param-unit { font-size: 10px; color: #9E9E9E; }
.lab-table__empty { color: #BDBDBD; font-size: 14px; }
.lab-scale-bar { display: block; }
.lab-scale-bar__na { color: #BDBDBD; }

/* ── Charts view: parameter cards ── */
.lab-section { margin-bottom: 4px; }
.lab-section__title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #05164D; text-transform: uppercase; letter-spacing: 0.7px; margin: 12px 0 8px 2px; }
.lab-section__count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(5, 22, 77, 0.08); color: #05164D; font-size: 11px; font-weight: 700; }
.lab-param { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(5, 22, 77, 0.06); padding: 12px 14px; margin-bottom: 10px; }
.lab-param--abnormal { box-shadow: 0 2px 10px rgba(244, 67, 54, 0.12); border: 1px solid #FFCDD2; }
.lab-param__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lab-param__name-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lab-param__name { font-size: 14px; font-weight: 600; color: #212121; }
.lab-param__ref { font-size: 11px; color: #9E9E9E; }
.lab-param__value-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 14px; white-space: nowrap; }
.lab-param__value-pill--normal { background: #E8F5E9; }
.lab-param__value-pill--abnormal { background: #FFEBEE; }
.lab-param__value-num { font-size: 14px; font-weight: 700; }
.lab-param__value-pill--normal .lab-param__value-num { color: #1B5E20; }
.lab-param__value-pill--abnormal .lab-param__value-num { color: #B71C1C; }
.lab-param__trend { font-size: 13px; }
.lab-param__trend--normal { color: #2E7D32; }
.lab-param__trend--abnormal { color: #C62828; }
.lab-param__chart { margin-top: 8px; }
.lab-mini-svg { width: 100%; height: auto; display: block; }
.lab-param__footer { font-size: 11px; color: #9E9E9E; margin-top: 4px; }
.lab-param__single { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.lab-param__single-badge { font-size: 15px; font-weight: 700; padding: 4px 12px; border-radius: 10px; }
.lab-param__single-badge--normal { background: #E8F5E9; color: #1B5E20; }
.lab-param__single-badge--abnormal { background: #FFEBEE; color: #B71C1C; }
.lab-param__single-hint { font-size: 11px; color: #9E9E9E; }

/* ── Chronicle / chart panel ── */
.lab-panel { margin: 12px 0; background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(5, 22, 77, 0.07); overflow: hidden; padding: 12px 14px; }
.lab-panel__title { font-size: 13px; font-weight: 700; color: #05164D; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.lab-panel__empty { margin: 0; font-size: 13px; color: #9E9E9E; padding: 6px 2px; }
.lab-chronicle__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lab-chronicle__title { font-size: 13px; font-weight: 600; color: #05164D; }
.lab-chronicle__select { font-size: 13px; border: 1px solid #E0E0E0; border-radius: 6px; padding: 4px 8px; background: #fff; color: #05164D; max-width: 60%; }
.lab-chart { margin-top: 4px; }
.lab-chart__meta { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #757575; margin-bottom: 2px; }
.lab-chart__ref-label { color: #4CAF50; }
.lab-chart-svg { width: 100%; height: auto; display: block; }
.lab-chart__empty { font-size: 13px; color: #9E9E9E; padding: 12px 2px; margin: 0; }

/* ── Findings ── */
.lab-findings { margin: 12px 0; background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(5, 22, 77, 0.07); overflow: hidden; }
.lab-findings__header { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid #F5F5F5; }
.lab-findings__title { font-size: 13px; font-weight: 700; color: #05164D; text-transform: uppercase; letter-spacing: 0.5px; }
.lab-findings__hint { font-size: 11px; color: #9E9E9E; }
.lab-finding { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #FAFAFA; }
.lab-finding:last-child { border-bottom: none; }
.lab-finding__icon { font-size: 16px; flex-shrink: 0; }
.lab-finding__body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex: 1; }
.lab-finding__name { font-size: 13px; font-weight: 600; color: #212121; }
.lab-finding__val { font-size: 13px; color: #616161; display: flex; align-items: center; gap: 6px; }
.lab-finding__date { font-size: 11px; color: #9E9E9E; }
.lab-finding__date--recent { color: #C62828; text-decoration: underline; text-decoration-color: #C62828; }
.lab-finding__date--mid { color: #E65100; text-decoration: underline; text-decoration-color: #E65100; }
.lab-finding--warn .lab-finding__msg { font-size: 12px; color: #B71C1C; background: #FFEBEE; padding: 1px 7px; border-radius: 10px; font-weight: 500; }
.lab-finding--positive .lab-finding__msg { font-size: 12px; color: #1B5E20; background: #E8F5E9; padding: 1px 7px; border-radius: 10px; font-weight: 500; }

/* Lab document overlay */
.lab-doc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.52); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lab-doc-overlay__panel { width: min(820px, 100%); max-height: calc(100vh - 32px); background: #f5f5f5; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.lab-doc-overlay__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #ECEFF5; }
.lab-doc-overlay__controls { display: flex; align-items: center; gap: 4px; }
.lab-doc-overlay__titles { min-width: 0; }
.lab-doc-overlay__title { font-size: 15px; font-weight: 700; color: #05164D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-doc-overlay__date { font-size: 12px; color: #9E9E9E; }
.lab-doc-overlay__content { padding: 12px; overflow: auto; }
.lab-doc-overlay__empty { min-height: 140px; display: flex; align-items: center; justify-content: center; color: #9E9E9E; }
.lab-doc-overlay__viewer { background: #111; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 14px rgba(0,0,0,.2); }
.lab-doc-overlay__viewer-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #111; }
.lab-doc-overlay__thumbs { margin-top: 10px; display: flex; gap: 8px; overflow-x: auto; }
.lab-doc-overlay__thumb-btn { border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; overflow: hidden; background: #fff; flex: 0 0 auto; }
.lab-doc-overlay__thumb-btn--active { border-color: #05164D; }
.lab-doc-overlay__thumb-img { width: 64px; height: 86px; object-fit: cover; display: block; }
.lab-doc-overlay__fallback-title { font-size: 12px; font-weight: 700; color: #05164D; letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 8px; }
.lab-doc-overlay__lab-table { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #E8EDF6; }
.lab-doc-overlay__lab-head, .lab-doc-overlay__lab-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 8px; align-items: center; padding: 8px 10px; font-size: 12px;
}
.lab-doc-overlay__lab-head { font-weight: 700; color: #607D8B; background: #F8FBFF; }
.lab-doc-overlay__lab-row { border-top: 1px solid #F1F4F8; color: #263238; }
.lab-doc-overlay__lab-row--abnormal { background: #FFF3E0; color: #E65100; font-weight: 600; }

/* ─── Pain history page (ph-*) ────────────────────────────────────────────── */
.pain-list-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.pain-list-history-btn { width: auto; padding: 7px 16px; font-size: 0.88rem; }

.ph-segment-wrap { margin-bottom: 14px; }
.ph-segment-wrap--sub { margin: 2px 0 12px; }
.ph-segment-wrap--sub .ph-segment__btn { padding: 6px 4px; font-size: 0.8rem; }
.ph-segment { display: flex; background: #fff; border-radius: 12px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ph-segment__btn { flex: 1; border: none; background: transparent; padding: 8px 4px; font-size: 0.85rem; font-weight: 600; color: #888; border-radius: 9px; cursor: pointer; }
.ph-segment__btn--active { background: var(--primary); color: #fff; }

.ph-empty { text-align: center; color: #aaa; font-size: 0.95rem; padding: 60px 24px; line-height: 1.5; }

.ph-section { margin: 16px 0 0; }
.ph-section__title { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.ph-section__sub { font-size: 0.8rem; color: #888; margin: 0 0 12px; }

.ph-heatmap { display: flex; justify-content: center; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ph-heatmap__svg { width: 68%; max-width: 320px; height: auto; display: block; }
.ph-heatmap__label { pointer-events: none; -webkit-user-select: none; user-select: none; }

.ph-legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; margin-bottom: 4px; }
.ph-legend__item { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: #555; }
.ph-legend__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ph-legend__dot--low { background: #4CAF50; }
.ph-legend__dot--mid { background: #FF9800; }
.ph-legend__dot--high { background: #F44336; }

.ph-chart-card { background: #fff; border-radius: 14px; padding: 12px 14px 10px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ph-chart-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.ph-chart-card__name { font-size: 0.88rem; font-weight: 700; color: #333; }
.ph-chart-card__meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ph-chart-card__avg { font-size: 0.75rem; color: #2196F3; font-weight: 600; }
.ph-svg { width: 100%; height: auto; display: block; }

.ph-trend { font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 20px; }
.ph-trend--up { background: #FFEBEE; color: #E53935; }
.ph-trend--down { background: #E8F5E9; color: #388E3C; }
.ph-trend--stable { background: #F3F4F6; color: #666; }

.ph-med-marker { cursor: pointer; }

.ph-day { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ph-day__header { background: var(--primary); color: rgba(255,255,255,.9); font-size: 0.78rem; font-weight: 600; padding: 7px 14px; letter-spacing: 0.02em; }
.ph-entry { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
.ph-entry:last-child { border-bottom: none; }
.ph-entry__badge { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.ph-entry__badge--low { background: #4CAF50; }
.ph-entry__badge--mid { background: #FF9800; }
.ph-entry__badge--high { background: #F44336; }
.ph-entry__body { flex: 1; min-width: 0; }
.ph-entry__types { font-size: 0.82rem; color: #555; margin-bottom: 2px; }
.ph-entry__text { font-size: 0.85rem; color: #333; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-entry__time { font-size: 0.75rem; color: #aaa; }

/* ═══ DASHBOARD: overdue warning + quick tiles ════════════════════════════════ */
.dash-page {
  margin: -16px;
  padding: 16px;
  background: radial-gradient(circle at top right, #eceff3 0%, #dce1e7 56%, #d2d7de 100%);
}
.dash-page .card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(78, 85, 96, 0.14);
  box-shadow: 0 8px 18px rgba(34, 39, 46, 0.11);
}

.dash-overdue { background: #ECE7DA; border: 1px solid #BBAE8D; cursor: pointer; }
.dash-overdue__body { display: flex; align-items: center; gap: 10px; }
.dash-overdue__icon { font-size: 20px; flex-shrink: 0; }
.dash-overdue__text { flex: 1; font-size: 14px; font-weight: 600; color: #5E4F2D; }
.dash-overdue__chevron { color: #5E4F2D; font-size: 20px; }

.dash-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dash-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 6px; border: 1px solid #606872; border-radius: 12px;
  background: linear-gradient(180deg, #444b54 0%, #343a42 100%);
  color: #F1F4F7;
  cursor: pointer; font-family: inherit; box-shadow: 0 5px 14px rgba(36, 41, 49, 0.28);
}
.dash-tile:active { opacity: .85; transform: scale(.98); }
.dash-tile__icon { font-size: 24px; line-height: 1; }
.dash-tile__label { font-size: 12px; font-weight: 600; color: #EEF2F6; text-align: center; }

.dash-tile--pain .dash-tile__icon { color: #8bd2ff; }
.dash-tile--medications .dash-tile__icon { color: #7fe6be; }
.dash-tile--lab .dash-tile__icon { color: #b8d8ff; }
.dash-tile--documents .dash-tile__icon { color: #d0c6ff; }
.dash-tile--preparation .dash-tile__icon { color: #ffd98a; }
.dash-tile--vaccination .dash-tile__icon { color: #f5b96c; }

/* ═══ HEALTH RECORD PREVIEW LAYOUT ═══════════════════════════════════════════ */
.hr-layout { display: flex; flex-direction: column; gap: 12px; }
.hr-layout__main { min-width: 0; }
.hr-preview-card { margin-top: 0; }
.hr-preview-hint { font-size: 13px; color: #757575; margin: 2px 0 8px; }
.hr-preview-frame {
  width: 100%;
  height: 62vh;
  min-height: 420px;
  border: 1px solid #E3E8F1;
  border-radius: 10px;
  background: #fff;
  display: none;
}

.hr-generate-btn {
  background: #004225;
  width: clamp(250px, 72%, 360px);
  border-radius: 14px;
  display: block;
  margin: 14px auto 0;
}

.hr-generate-btn:hover:not(:disabled) {
  background: #0b5534;
  opacity: 1;
}

@media (min-width: 1100px) {
  .hr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: start;
    gap: 14px;
  }

  .hr-preview-card {
    position: sticky;
    top: 10px;
  }

  .hr-preview-frame {
    height: 72vh;
    min-height: 560px;
  }
}

/* ═══ ONBOARDING WIZARD ═══════════════════════════════════════════════════════ */
.ob-wrap { padding: 16px; max-width: 480px; margin: 0 auto; }
.ob-progress { height: 6px; background: #ECEFF5; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.ob-progress__fill { height: 100%; background: #FFAD00; transition: width .3s ease; }
.ob-step-label { font-size: 12px; color: #9E9E9E; margin-bottom: 16px; }
.ob-title { font-size: 20px; font-weight: 700; color: #05164D; margin: 0 0 6px; }
.ob-subtitle { font-size: 13px; color: #7B7B7B; margin: 0 0 18px; line-height: 1.4; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 16px; background: #EEF2FB; color: #26418C; font-size: 13px; }
.ob-chip button { border: none; background: none; color: #26418C; font-size: 16px; cursor: pointer; line-height: 1; padding: 0; }
.ob-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.ob-actions .btn { flex: 1; }

/* ═══ DOCUMENT ANALYSIS PROGRESS OVERLAY ══════════════════════════════════════ */
.doc-analyze-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(5, 22, 77, 0.45);
  display: flex; align-items: center; justify-content: center;
}
.doc-analyze-box {
  background: #fff; border-radius: 14px; padding: 24px 22px;
  width: 86%; max-width: 320px; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.doc-analyze-spinner {
  width: 38px; height: 38px; margin: 0 auto 14px;
  border: 4px solid #ECEFF5; border-top-color: #05164D; border-radius: 50%;
  animation: doc-spin 0.8s linear infinite;
}
@keyframes doc-spin { to { transform: rotate(360deg); } }
.doc-analyze-label { font-size: 14px; font-weight: 600; color: #05164D; margin-bottom: 14px; }
.doc-analyze-bar {
  height: 8px; border-radius: 4px; background: #ECEFF5; overflow: hidden; position: relative;
}
.doc-analyze-bar__fill {
  height: 100%; width: 0; border-radius: 4px; background: #FFAD00;
  transition: width 0.4s ease; position: relative; overflow: hidden;
}
.doc-analyze-bar__fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: doc-shimmer 1.1s linear infinite;
}
@keyframes doc-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Lab findings age-group sub-header */
.lab-findings__group {
  font-size: 11px; font-weight: 700; color: #05164D; background: #F8F9FC;
  padding: 6px 14px; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid #F0F0F0;
}

/* Lab table: focused (collapsed) date column toggle */
.lab-table__cell--date-focused { background: #FFAD00 !important; color: #05164D !important; }
.lab-table__date-expand { margin-left: 4px; font-size: 11px; opacity: 0.85; }

/* Blood-pressure chart: pulsing red marker for out-of-range values */
@keyframes bp-pulse-anim { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.bp-pulse { animation: bp-pulse-anim 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .bp-pulse { animation: none; } }

/* ── Vaccination timeline ────────────────────────────────────────────── */
.vac-tl-card { padding: 12px 12px 6px; }
.vac-tl-title { font-size: 14px; font-weight: 600; color: #05164D; margin-bottom: 6px; }
.vac-tl-title .vac-tl-axis { font-size: 11px; font-weight: 400; color: #9E9E9E; margin-left: 6px; }
.vac-tl-svg { width: 100%; height: auto; display: block; }
.vac-tl-hint { color: #9E9E9E; font-size: 13px; padding: 4px 0; }
