:root {
  --teal:      #2C7A7B;
  --teal-dark: #1A5253;
  --teal-light:#E8F4F4;
  --green:     #16A34A;
  --green-bg:  #DCFCE7;
  --amber:     #D97706;
  --amber-bg:  #FEF9C3;
  --red:       #DC2626;
  --red-bg:    #FEE2E2;
  --border:    #E2EAEA;
  --label-bg:  #F5F9F9;
  --page-bg:   #ECF3F3;
  --text:      #1A2929;
  --muted:     #5A7070;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
body { font-family:var(--font); background:var(--page-bg); color:var(--text); min-height:100vh; padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)); }

/* Header */
.header { background:var(--teal-dark); padding:18px 16px 0; padding-top:calc(18px + env(safe-area-inset-top,0px)); }
.header h1 { color:#fff; font-size:21px; font-weight:700; letter-spacing:-0.3px; }
.header h1 .brand-accent { color:#8FE3D9; }
.header p  { color:rgba(255,255,255,0.65); font-size:13px; margin-top:3px; }

/* Tabs */
.tabs { display:flex; gap:8px; padding:12px 16px 14px; background:var(--teal-dark); }
.tab { flex:1; padding:10px 8px; border-radius:9px; border:none; font-size:14px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; background:rgba(255,255,255,0.15); color:rgba(255,255,255,0.7); transition:background 0.15s, color 0.15s, transform 0.12s; }
.tab.active { background:#fff; color:var(--teal-dark); }
.tab.tab-hold-arming { transform:scale(.985); box-shadow:inset 0 0 0 2px rgba(143,227,217,.75); }
.tab:active { opacity:0.8; }
.vanskelig-lbl { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin-bottom:7px; }
.card-badge { font-size:18px; color:#fff; margin-right:8px; font-weight:700; }
.add-card-wrap { display:flex; flex-direction:column; align-items:center; padding:14px 0 6px; }
.add-card-btn { width:50px; height:50px; border-radius:50%; background:#10B981; border:none; color:#fff; font-size:30px; font-weight:300; cursor:pointer; line-height:1; touch-action:manipulation; box-shadow:0 2px 8px rgba(16,185,129,0.35); }
.add-card-btn:active { background:#059669; }
.add-card-lbl { font-size:12px; color:#10B981; font-weight:600; margin-top:5px; }
.remove-card-btn { width:100%; padding:11px; border:none; border-top:1px solid var(--border); background:none; color:#EF4444; font-size:13px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.remove-card-btn:active { background:#FEF2F2; }
.copy-card-btn { width:100%; padding:11px 14px; border:none; border-top:1px solid var(--border); background:#F0F8F8; color:var(--teal-dark); font-size:13px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.copy-card-btn:active { background:#DDEEEE; }

/* Toolbar */
.toolbar { background:#fff; border-bottom:1px solid var(--border); padding:9px 12px; display:flex; gap:7px; align-items:center; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.toolbar button { flex-shrink:0; padding:8px 13px; border-radius:8px; border:1.5px solid var(--border); background:#fff; color:var(--teal-dark); font-size:13px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; white-space:nowrap; transition:background .1s,transform .1s; }
.toolbar button:active,.toolbar button.toolbar-tapping { background:var(--teal-light); transform:scale(.97); }
#sync-btn.sync-running { background:var(--teal-light); border-color:#A8D1D1; }
#sync-btn.sync-running::after { content:'…'; }
#sync-btn { position:relative; overflow:visible; }
#sync-btn.sync-attention { border-color:#DC2626; }
#sync-btn.sync-attention::before {
  content:'!'; position:absolute; top:-7px; right:-7px; z-index:2;
  display:flex; align-items:center; justify-content:center;
  width:18px; height:18px; border:2px solid #fff; border-radius:50%;
  background:#DC2626; color:#fff; box-shadow:0 1px 4px rgba(127,29,29,.35);
  font:800 12px/1 var(--font); pointer-events:none;
}

.reset-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:998; align-items:center; justify-content:center; padding:24px; }
.reset-modal.open { display:flex; }
.reset-dialog { background:#fff; border-radius:16px; padding:24px 20px; width:100%; max-width:320px; box-shadow:0 8px 32px rgba(0,0,0,0.18); }
.reset-title { font-size:17px; font-weight:700; color:var(--text); margin-bottom:8px; }
.reset-body  { font-size:14px; color:var(--muted); line-height:1.5; margin-bottom:20px; }
.reset-btns  { display:flex; flex-direction:column; gap:10px; }
.reset-btn-all    { padding:14px; border-radius:10px; border:none; background:var(--red); color:#fff; font-size:15px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.reset-btn-cancel { padding:14px; border-radius:10px; border:1.5px solid var(--border); background:#fff; color:var(--muted); font-size:15px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.move-list-confirm { padding:14px; border-radius:10px; border:none; background:var(--teal); color:#fff; font-size:15px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.move-list-confirm:disabled { opacity:.55; cursor:default; }
.move-list-warning { display:none; margin:-7px 0 16px; padding:11px 12px; border:1.5px solid #F3B65B; border-radius:10px; background:#FFF7E6; color:#704500; font-size:12.5px; line-height:1.45; }
.move-list-warning strong { display:block; margin-bottom:3px; color:#8A2C18; }
.backup-dialog { max-width:420px; max-height:90vh; overflow-y:auto; }
.backup-summary { margin:0 0 14px; padding:10px 12px; border-radius:10px; background:#eef4f4; color:var(--teal-dark); font-size:12.5px; line-height:1.5; }
.backup-privacy { margin:0 0 14px; padding:11px 12px; border-radius:10px; background:#FFF8E8; border:1px solid #F3CE77; color:#7A4A00; font-size:12.5px; line-height:1.5; }
.backup-step { display:flex; gap:10px; align-items:flex-start; margin:0 0 10px; color:var(--text); font-size:13px; line-height:1.45; }
.backup-step b { display:flex; align-items:center; justify-content:center; flex:0 0 24px; height:24px; border-radius:50%; background:var(--teal); color:#fff; font-size:12px; }
.backup-btn { width:100%; padding:14px; border-radius:10px; border:none; font-size:15px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.backup-btn:disabled { opacity:.55; cursor:default; }
.backup-save { background:var(--teal); color:#fff; }
.backup-load { background:#eef4f4; color:var(--teal-dark); border:1.5px solid #bfd7d7; }
.backup-status { min-height:18px; margin-top:12px; color:var(--muted); font-size:12.5px; line-height:1.45; text-align:center; overflow-wrap:anywhere; }
.sync-dialog { max-width:520px; max-height:92vh; overflow-y:auto; }
.sync-intro { margin:0 0 14px; color:var(--muted); font-size:13px; line-height:1.55; }
.sync-private { margin:0 0 14px; padding:11px 12px; border-radius:10px; background:#F2FAFA; border:1px solid #B7DADA; color:var(--teal-dark); font-size:12.5px; line-height:1.5; }
.sync-section { margin-top:13px; padding-top:13px; border-top:1px solid var(--border); }
.sync-label { display:block; margin:0 0 6px; color:var(--text); font-size:12.5px; font-weight:800; }
.sync-input { width:100%; padding:12px; border:1.5px solid var(--border); border-radius:10px; background:#fff; color:var(--text); font:14px var(--font); }
.sync-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:10px; }
.sync-action { width:100%; min-height:44px; padding:11px 10px; border:1.5px solid #BFD7D7; border-radius:10px; background:#EEF6F6; color:var(--teal-dark); font:700 13px var(--font); cursor:pointer; touch-action:manipulation; transition:transform .1s,filter .1s; }
.sync-action.primary { background:var(--teal); border-color:var(--teal); color:#fff; }
.sync-action:active { transform:scale(.98); filter:brightness(.94); }
.sync-action.danger { background:#fff; border-color:#FCA5A5; color:#B91C1C; }
.sync-action:disabled { opacity:.52; cursor:default; }
.sync-meta { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:4px 0 7px; color:var(--text); }
.sync-state-text { font-size:14px; font-weight:800; }
.sync-status { min-height:20px; margin:12px 0 0; color:var(--muted); font-size:12.5px; line-height:1.48; text-align:center; overflow-wrap:anywhere; }
.sync-status.error { color:#B91C1C; }
.sync-status.good { color:#166534; }
.sync-pair { display:none; margin-top:13px; padding:13px; border:1px solid #C8E1E1; border-radius:12px; background:#F8FCFC; text-align:center; }
.sync-pair.open { display:block; }
.sync-pair canvas { display:block; width:min(100%,300px); height:auto; margin:4px auto 10px; background:#fff; border-radius:9px; }
.sync-pair-note { color:var(--muted); font-size:11.5px; line-height:1.45; }
.sync-conflict { display:none; margin-top:13px; padding:12px; border:1px solid #F0B95D; border-radius:11px; background:#FFF8E8; color:#704600; font-size:12.5px; line-height:1.5; }
.sync-conflict.open { display:block; }
.sync-conflict strong { display:block; margin-bottom:4px; }
.sync-conflict .sync-grid { margin-top:10px; }
.sync-hidden { display:none !important; }
body.patient-mode #sync-btn,
body.patient-mode #sync-modal { display:none !important; }
.flash { position:fixed; bottom:90px; left:50%; transform:translateX(-50%) translateY(12px); background:rgba(30,30,30,0.88); color:#fff; font-size:14px; font-weight:600; padding:10px 20px; border-radius:22px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity 0.22s, transform 0.22s; z-index:999; }
.flash.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Cards */
.cards { padding:10px 10px 4px; display:flex; flex-direction:column; gap:10px; }
.card { background:#fff; border-radius:13px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,0.09); }
.card-name { background:var(--teal); display:flex; align-items:center; min-height:46px; cursor:pointer; }
.drag-handle { padding:0 2px 0 12px; display:flex; align-items:center; color:rgba(255,255,255,0.6); font-size:19px; line-height:1; cursor:grab; touch-action:none; flex-shrink:0; user-select:none; -webkit-user-select:none; }
.drag-handle:active { cursor:grabbing; color:rgba(255,255,255,0.9); }
.opf-icon { padding:0 2px 0 12px; display:flex; align-items:center; font-size:17px; line-height:1; flex-shrink:0; user-select:none; -webkit-user-select:none; }
.card.dragging { opacity:0.92; box-shadow:0 10px 28px rgba(0,0,0,0.32); position:relative; z-index:50; }
.card.dragging .card-name { background:var(--teal-dark); }
.card-opf > .card-name { background:#2B7FE0; min-height:46px; padding:0 0 0 0; }
.card-opf > .card-name:active { background:#2070cc; }
.card-title { flex:1; color:#fff; font-size:15px; font-weight:700; padding:0 14px 0 6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.name-section { border-bottom:1px solid var(--border); }
.name-input { width:100%; border:none; outline:none; font-size:15px; font-weight:600; font-family:var(--font); color:var(--text); padding:12px 14px; background:#fff; -webkit-appearance:none; }
.chevron { width:8px; height:8px; border-right:2px solid rgba(255,255,255,0.65); border-bottom:2px solid rgba(255,255,255,0.65); transform:rotate(45deg); margin-right:14px; margin-left:4px; flex-shrink:0; transition:transform 0.2s; }
.card.open .chevron { transform:rotate(-135deg); margin-top:4px; }
.card-body { display:none; }
.card.open .card-body { display:block; }
.note-btn { position:relative; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; min-width:42px; margin:0; padding:0; border:1.5px solid #c8dede; border-radius:10px; background:#fff; color:var(--teal-dark); font-size:19px; line-height:1; cursor:pointer; touch-action:manipulation; }
.note-btn:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.note-dot { display:none; position:absolute; top:-4px; right:-4px; width:11px; height:11px; border:2px solid #fff; border-radius:50%; background:#E07A2E; }
.note-btn.has-note .note-dot { display:block; }
.hold-note-btn { width:44px; height:44px; min-width:44px; min-height:44px; justify-self:center; font-size:20px; }
.note-sheet { max-width:560px; }
.pdf-sheet { max-width:460px; }
.pdf-status { min-height:20px; margin:2px 2px 12px; color:var(--muted); font-size:13px; line-height:1.45; }
.pdf-status.err { color:#B03A2E; }
.pdf-actions { display:flex; flex-direction:column; gap:9px; }
.pdf-btn { width:100%; min-height:48px; padding:12px 14px; border-radius:10px; font:700 15px var(--font); cursor:pointer; touch-action:manipulation; }
.pdf-btn-primary { border:none; background:var(--teal); color:#fff; }
.pdf-btn-primary:disabled { opacity:.55; cursor:default; }
.pdf-btn-secondary { border:1.5px solid var(--border); background:#fff; color:var(--teal-dark); }
.pdf-btn-secondary:disabled { opacity:.55; cursor:default; }
.clinical-note-text { width:100%; min-height:118px; padding:11px 12px; border:1.5px solid var(--border); border-radius:9px; background:#fff; color:var(--text); font:14px/1.5 var(--font); resize:vertical; outline:none; -webkit-appearance:none; }
.clinical-note-text:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(44,122,123,.1); }
.clinical-note-help { margin-top:7px; color:var(--muted); font-size:11px; line-height:1.4; }

html.modal-open, body.modal-open { overflow:hidden !important; height:100%; overscroll-behavior:none; }
/* Udskriftsvisning som lag i appen (erstatter det gamle nye vindue, der ikke kunne lukkes i iOS-appen) */
.print-view { position:fixed; top:0; right:0; bottom:0; left:0; z-index:1001; background:#fff; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.pv-bar { position:-webkit-sticky; position:sticky; top:0; z-index:5; display:flex; gap:10px; align-items:center; justify-content:space-between;
  padding:calc(10px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) 10px calc(12px + env(safe-area-inset-left,0px));
  background:rgba(255,255,255,0.96); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); border-bottom:1px solid #dbe8e8; box-shadow:0 2px 10px rgba(26,82,83,0.08); }
.pv-btn { min-height:48px; padding:0 18px; border-radius:11px; font-family:var(--font); font-size:16px; font-weight:700; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.pv-luk { background:#fff; color:var(--teal-dark); border:2px solid var(--teal); flex:0 0 auto; }
.pv-luk:active { background:var(--teal-light); }
.pv-print { background:var(--teal); color:#fff; border:none; box-shadow:0 2px 8px rgba(44,122,123,0.28); flex:1 1 auto; max-width:340px; }
.pv-print:active { background:var(--teal-dark); }
.pv-host { display:block; }
@media print {
  html, body, html.modal-open, body.modal-open { overflow:visible !important; height:auto !important; min-height:0 !important; background:#fff !important; padding:0 !important; margin:0 !important; }
  body.print-view-open > *:not(#print-view) { display:none !important; }
  body.print-view-open #print-view { position:static !important; overflow:visible !important; height:auto !important; z-index:auto; }
  body.print-view-open .pv-bar { display:none !important; }
}
.patient-transfer-btn, .patient-reminder-btn { display:none; }
body.patient-mode .patient-transfer-btn,
body.patient-mode .patient-reminder-btn { display:block; }
body.patient-mode .toolbar { justify-content:center; overflow:visible; }
body.patient-mode .toolbar > button { flex:1; max-width:230px; }
.patient-transfer-intro { margin:0 0 12px; padding:11px 12px; border-radius:10px; background:#F3FAFA; border:1px solid #C8E1E1; color:var(--teal-dark); font-size:12.5px; line-height:1.5; text-align:left; }
.patient-transfer-help { margin-top:11px; color:var(--muted); font-size:11.5px; line-height:1.5; text-align:left; }
.patient-empty { margin:20px 0 8px; padding:24px 18px; border:1px solid #C8E1E1; border-radius:15px; background:#fff; text-align:center; box-shadow:0 3px 14px rgba(12,78,78,.07); }
.patient-empty-icon { width:58px; height:58px; margin:0 auto 13px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--teal-light); color:var(--teal-dark); font-size:29px; }
.patient-empty-title { color:var(--text); font-size:19px; font-weight:800; }
.patient-empty-text { max-width:430px; margin:8px auto 17px; color:var(--muted); font-size:13px; line-height:1.55; }
.patient-scan-btn { width:100%; max-width:360px; min-height:50px; padding:13px 18px; border:0; border-radius:11px; background:var(--teal); color:#fff; font:800 15px var(--font); cursor:pointer; touch-action:manipulation; }
.patient-scan-btn:active { background:var(--teal-dark); }
.patient-retry-btn { display:block; width:100%; margin-top:12px; padding:12px; border:0; border-radius:10px; background:var(--teal); color:#fff; font:800 14px var(--font); cursor:pointer; touch-action:manipulation; }
.returned-response { margin:10px 14px 13px; padding:11px 12px; border:1px solid #B9D8D8; border-radius:10px; background:#F3FAFA; color:var(--text); }
.returned-response-title { color:var(--teal-dark); font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:.55px; margin-bottom:7px; }
.returned-response-row { font-size:13px; line-height:1.5; }
.returned-response-note { margin-top:7px; padding-top:7px; border-top:1px solid #D5E8E8; font-size:13px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.returned-followup { background:#fff; border:1px solid #B9D8D8; border-radius:13px; padding:14px; box-shadow:0 1px 4px rgba(0,0,0,0.09); }
.returned-followup-compact { padding:9px 11px; }
.returned-followup-title { color:var(--teal-dark); font-size:14px; font-weight:800; margin-bottom:8px; }
.returned-followup-row { font-size:13px; line-height:1.6; }
.hist-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:998; align-items:center; justify-content:center; padding:10px; }
.hist-modal.open { display:flex; }
.hist-sheet { background:#fff; border-radius:16px; width:100%; max-width:640px; max-height:90vh; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,0.28); overflow:hidden; }
.hist-head { padding:14px 16px 11px; border-bottom:1px solid var(--border); flex-shrink:0; }
.hist-title { font-size:16px; font-weight:700; color:var(--text); }
.hist-sub { font-size:12px; color:var(--muted); margin-top:3px; line-height:1.45; }
.hist-body { padding:14px 12px; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; }
.hist-empty { text-align:center; color:var(--muted); font-size:13px; line-height:1.6; padding:24px 12px; }
.hist-foot { padding:10px 14px 14px; border-top:1px solid var(--border); display:flex; gap:8px; flex-shrink:0; }
.hist-fbtn { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; border:none; }
.hist-close { background:var(--teal); color:#fff; }
.hist-del { background:#fff; color:#B91C1C; border:1.5px solid #FCA5A5; flex:0 0 46px; font-size:16px; }
.session-progress { display:flex; gap:5px; margin-top:10px; }
.session-progress span { height:5px; flex:1; border-radius:99px; background:#DDEAEA; }
.session-progress span.on { background:var(--teal); }
.session-note { margin-bottom:12px; padding:11px 12px; border:1px solid #C8E1E1; border-radius:10px; background:#F4FAFA; color:var(--teal-dark); font-size:12.5px; line-height:1.5; }
.session-note strong { display:block; margin-bottom:3px; }
.session-question { margin:15px 0 8px; color:var(--text); font-size:15px; font-weight:800; line-height:1.35; }
.session-help { margin:-3px 0 9px; color:var(--muted); font-size:12px; line-height:1.45; }
.session-pain-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:5px; }
.session-pain-grid .pb { height:42px; }
.session-choice-row { display:flex; gap:7px; }
.session-choice { flex:1; min-height:45px; padding:9px 5px; border:1.5px solid #B9D8D8; border-radius:9px; background:#fff; color:var(--teal-dark); font:700 12px var(--font); cursor:pointer; }
.session-choice.on { border-color:var(--teal); background:var(--teal); color:#fff; }
.nextday-choice-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.nextday-choice-row .session-choice.mid { grid-column:1/-1; }
.nextday-reminder { margin:12px 14px; padding:12px; border:1.5px solid #B9D8D8; border-radius:12px; background:#F4FAFA; color:var(--teal-dark); }
.nextday-reminder.pending { border-width:2px; box-shadow:0 2px 10px rgba(26,82,83,.10); }
.nextday-kicker { margin-bottom:5px; font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.45px; }
.nextday-question { margin-bottom:9px; color:var(--text); font-size:14px; font-weight:800; line-height:1.4; }
.nextday-help { margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.nextday-header-badge { flex:0 0 auto; margin-right:8px; padding:4px 7px; border-radius:99px; background:#fff; color:#1E63AE; font-size:10px; font-weight:850; white-space:nowrap; }
.session-exercises { display:flex; flex-direction:column; gap:7px; margin-top:8px; }
.session-exercise-pick { display:flex; align-items:center; gap:10px; width:100%; min-height:51px; padding:9px 11px; border:1.5px solid var(--border); border-radius:10px; background:#fff; color:var(--text); text-align:left; font:700 13px var(--font); cursor:pointer; }
.session-exercise-pick.on { border-color:var(--teal); background:#F0F8F8; }
.session-check { width:23px; height:23px; flex:0 0 23px; border:1.5px solid #A9C5C5; border-radius:6px; display:flex; align-items:center; justify-content:center; color:#fff; background:#fff; }
.session-exercise-pick.on .session-check { background:var(--teal); border-color:var(--teal); }
.session-exercise-log { margin:10px 0 15px; padding:12px; border:1px solid var(--border); border-radius:12px; background:#FBFDFD; }
.session-exercise-name { margin-bottom:3px; color:var(--text); font-size:15px; font-weight:800; }
.session-current-dose { margin-bottom:9px; color:var(--muted); font-size:11.5px; line-height:1.4; }
.session-own-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.session-own-field label { display:block; margin-bottom:4px; color:var(--muted); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.35px; }
.session-own-field input { width:100%; min-height:42px; border:1.5px solid #C8DEDE; border-radius:8px; padding:8px 9px; background:#fff; color:var(--text); font:700 14px var(--font); outline:none; }
.session-own-field input:focus { border-color:var(--teal); }
.session-actions { display:flex; gap:8px; margin-top:16px; }
.session-action { flex:1; min-height:46px; padding:10px; border:1.5px solid var(--border); border-radius:10px; background:#fff; color:var(--teal-dark); font:800 13px var(--font); cursor:pointer; }
.session-action.primary { border-color:var(--teal); background:var(--teal); color:#fff; }
.session-action:disabled { opacity:.45; cursor:default; }
.session-saved { padding:22px 12px; text-align:center; }
.session-saved-icon { width:58px; height:58px; margin:0 auto 12px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#E8F4F4; color:var(--teal-dark); font-size:28px; }
.session-saved h3 { margin:0 0 8px; color:var(--text); font-size:19px; }
.session-saved p { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.patient-exercise-log { margin:10px 14px 13px; padding:10px 11px; border:1px solid #C8E1E1; border-radius:10px; background:#F4FAFA; }
.patient-exercise-log button { width:100%; min-height:42px; border:1.5px solid #B9D8D8; border-radius:9px; background:#fff; color:var(--teal-dark); font:750 13px var(--font); cursor:pointer; }
.patient-exercise-log-status { margin-bottom:7px; color:var(--muted); font-size:11.5px; line-height:1.4; }
.opf-neutral { margin:12px 14px; padding:11px 12px; border:1px solid #C8E1E1; border-radius:10px; background:#F4FAFA; color:var(--teal-dark); font-size:12.5px; line-height:1.5; }
.opf-actions { display:flex; gap:8px; padding:0 14px 13px; }
.opf-action { flex:1; min-height:45px; padding:10px; border:1.5px solid #B9D8D8; border-radius:10px; background:#fff; color:var(--teal-dark); font:800 13px var(--font); cursor:pointer; }
.opf-action.primary { border-color:var(--teal); background:var(--teal); color:#fff; }
.reminder-settings { margin:0 14px 13px; border:1px solid #C8E1E1; border-radius:11px; background:#fff; overflow:hidden; }
.reminder-settings summary { display:flex; align-items:center; justify-content:space-between; min-height:48px; padding:10px 12px; color:var(--teal-dark); cursor:pointer; list-style:none; }
.reminder-settings summary::-webkit-details-marker { display:none; }
.reminder-settings summary::after { content:'＋'; flex:0 0 auto; margin-left:8px; font-size:17px; }
.reminder-settings[open] summary::after { content:'−'; }
.reminder-settings summary span { display:flex; flex-direction:column; gap:2px; }
.reminder-settings summary strong { font-size:13px; }
.reminder-settings summary small { color:var(--muted); font-size:10.5px; font-weight:650; }
.reminder-body { padding:12px; border-top:1px solid var(--border); }
.reminder-intro { margin:0 0 11px; color:var(--muted); font-size:12px; line-height:1.48; }
.reminder-unavailable { padding:10px 11px; border-radius:9px; background:#FFF8E8; border:1px solid #F2D18A; color:#76500B; font-size:12px; line-height:1.48; }
.reminder-primary { width:100%; min-height:44px; padding:10px; border:0; border-radius:9px; background:var(--teal); color:#fff; font:800 13px var(--font); cursor:pointer; }
.reminder-switch { display:flex; align-items:flex-start; gap:9px; padding:4px 0 9px; color:var(--text); cursor:pointer; }
.reminder-switch input { width:20px; height:20px; flex:0 0 20px; margin-top:1px; accent-color:var(--teal); }
.reminder-switch span { display:flex; flex-direction:column; gap:2px; }
.reminder-switch strong { font-size:12.5px; line-height:1.35; }
.reminder-switch small { color:var(--muted); font-size:10.5px; line-height:1.4; }
.reminder-tabs { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin:0 0 11px; }
.reminder-tab { min-height:38px; padding:7px 4px; border:1.5px solid #C8DEDE; border-radius:9px; background:#fff; color:var(--muted); font:750 11.5px var(--font); cursor:pointer; }
.reminder-tab.on { border-color:var(--teal); background:var(--teal); color:#fff; }
.reminder-othertab { margin:2px 0 0; padding:7px 9px; border-radius:8px; background:#F4FAFA; color:var(--muted); font-size:10.5px; line-height:1.45; }
.reminder-separator { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.reminder-private { margin-top:10px; }
.reminder-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin:2px 0 9px; }
.reminder-day { min-width:0; min-height:34px; padding:5px 1px; border:1.5px solid #C8DEDE; border-radius:8px; background:#fff; color:var(--muted); font:750 10px var(--font); cursor:pointer; }
.reminder-day.on { border-color:var(--teal); background:var(--teal); color:#fff; }
.reminder-time { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:11.5px; font-weight:700; }
.reminder-time input { min-height:39px; padding:7px 8px; border:1.5px solid #C8DEDE; border-radius:8px; background:#fff; color:var(--text); font:750 13px var(--font); }
.reminder-secondary-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:8px; }
.reminder-secondary-row button { min-height:40px; padding:8px; border:1.5px solid #B9D8D8; border-radius:9px; background:#fff; color:var(--teal-dark); font:750 11.5px var(--font); cursor:pointer; }
.reminder-secondary-row button.danger { border-color:#F2BBBB; color:#B91C1C; }
.reminder-message { margin-top:9px; padding:9px 10px; border-radius:8px; background:#EEF6F6; color:var(--teal-dark); font-size:11px; line-height:1.45; }
.reminder-message.good { background:#F0FAF2; color:#166534; }
.reminder-message.error { background:#FEF2F2; color:#991B1B; }
.reminder-privacy { margin:10px 0 0; color:var(--muted); font-size:10px; line-height:1.48; }
.reminder-modal-body .reminder-settings { margin:0; border:0; border-radius:0; background:transparent; overflow:visible; }
.reminder-modal-body .reminder-settings > summary { display:none; }
.reminder-modal-body .reminder-body { padding:0; border-top:0; }
.reminder-sheet { max-width:560px; }
.overview-disclaimer { margin-bottom:12px; padding:11px 12px; border:1px solid #C8E1E1; border-radius:10px; background:#F4FAFA; color:var(--teal-dark); font-size:12px; line-height:1.5; }
.overview-chart { margin-bottom:14px; padding:9px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.overview-chart-note { margin:3px 0 8px; color:var(--muted); font-size:11px; line-height:1.4; }
.overview-chart-meta { display:flex; align-items:flex-start; gap:8px; margin-bottom:8px; }
.overview-chart-meta .overview-chart-note { flex:1; margin:3px 0 0; }
.overview-chart-jump { flex:0 0 auto; padding:6px 8px; border:1px solid #B9D8D8; border-radius:8px; background:#fff; color:var(--teal-dark); font:800 10.5px var(--font); cursor:pointer; }
.overview-chart-scroll { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; padding-bottom:2px; }
.overview-details { margin-top:2px; border:1px solid var(--border); border-radius:10px; background:#fff; overflow:hidden; }
.overview-details summary { padding:12px; color:var(--teal-dark); font-size:13px; font-weight:800; cursor:pointer; list-style:none; }
.overview-details summary::-webkit-details-marker { display:none; }
.overview-details summary::after { content:'＋'; float:right; font-size:16px; line-height:1; }
.overview-details[open] summary::after { content:'−'; }
.overview-details-body { padding:0 9px 1px; border-top:1px solid var(--border); }
.overview-details-note { margin:9px 3px; color:var(--muted); font-size:11px; line-height:1.45; }
.overview-session { margin-bottom:9px; padding:11px 12px; border:1px solid var(--border); border-radius:10px; background:#FBFDFD; }
.overview-session-head { display:flex; justify-content:space-between; gap:10px; color:var(--text); font-size:13px; font-weight:800; }
.overview-exercise { margin-top:8px; padding-top:8px; border-top:1px solid #DDEAEA; color:var(--text); font-size:12px; line-height:1.55; }
.overview-own { margin-top:5px; color:var(--teal-dark); font-weight:700; }
@media (max-width:420px){ .session-pain-grid { grid-template-columns:repeat(4,1fr); } }
.prog-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:998; align-items:center; justify-content:center; padding:10px; }
.prog-modal.open { display:flex; }
.prog-sheet { background:#fff; border-radius:16px; width:100%; max-width:640px; height:88vh; max-height:88vh; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,0.28); overflow:hidden; }
.prog-head { padding:13px 15px 11px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ov-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:1060; align-items:center; justify-content:center; padding:10px; }
.ov-modal.open { display:flex; }
.ov-sheet { background:#fff; border-radius:16px; width:100%; max-width:560px; max-height:92vh; display:flex; flex-direction:column; box-shadow:0 12px 40px rgba(0,0,0,0.3); overflow:hidden; }
.ov-head { padding:14px 16px 11px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ov-title { font-size:16.5px; font-weight:700; color:var(--text); }
.ov-sub { font-size:12.5px; color:var(--muted); margin-top:4px; line-height:1.45; }
.ov-body { padding:14px; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; text-align:center; }
.ov-valg { display:flex; gap:9px; margin-bottom:14px; }
.ov-vbtn { flex:1; padding:14px 8px; border-radius:11px; border:1.5px solid var(--border); background:#fbfdfd; color:var(--text); font-size:14.5px; font-weight:700; font-family:var(--font); cursor:pointer; }
.ov-vbtn .sm { display:block; font-weight:400; font-size:11.5px; color:var(--muted); margin-top:3px; }
.ov-server-btn { width:100%; margin-top:12px; padding:10px 12px; border-radius:10px; border:1px dashed #9AB8B8; background:#f5fafa; color:var(--teal-dark); font-size:12px; font-weight:700; font-family:var(--font); cursor:pointer; }
.ov-server-btn .sm { display:block; margin-top:2px; color:var(--muted); font-size:10.5px; font-weight:400; }
.ov-server-btn:disabled { opacity:.65; cursor:default; }
.ov-canvas { width:100%; max-width:min(92vw, 78vh); aspect-ratio:1; background:#fff; border:1px solid var(--border); border-radius:10px; }
/* Fuld skærm: koden fylder alt, hvilket gør hvert modul markant større
   i kameraets billede — den mest effektive måde at få hastighed på. */
body.qr-fuld .ov-modal { padding:0; background:#000; }
body.qr-fuld .ov-sheet { max-width:none; width:100vw; height:100vh; max-height:100vh; border-radius:0; background:#000; }
body.qr-fuld .ov-head, body.qr-fuld .ov-note,
body.qr-fuld .ov-valg, body.qr-fuld #ov-send-status,
body.qr-fuld .qr-del-btn { display:none !important; }
body.qr-fuld .ov-body { padding:0; display:flex; align-items:center; justify-content:center; }
body.qr-fuld .ov-canvas { max-width:min(100vw, 100vh); border:none; border-radius:0; }
body.qr-fuld .ov-foot { position:fixed; bottom:0; left:0; right:0; background:rgba(0,0,0,.55); border:none; padding:8px 12px; }
body.qr-fuld .ov-fbtn { background:rgba(255,255,255,.15); color:#fff; border:none; }
.qr-fuld-btn { width:100%; margin-top:8px; padding:11px; border-radius:10px; border:1.5px solid var(--teal); background:var(--teal); color:#fff; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; }
.qr-del-btn { width:100%; margin-top:9px; padding:13px 11px; border-radius:10px; border:none; background:#16A34A; color:#fff; font-size:14px; font-weight:800; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.qr-del-btn:active { background:#15803D; }
.ov-video { width:100%; max-width:460px; border-radius:10px; background:#000; }
.ov-status { font-size:13px; color:var(--muted); margin-top:10px; min-height:18px; }
.ov-bar-ramme { height:8px; background:var(--border); border-radius:5px; overflow:hidden; margin-top:9px; }
.ov-bar { height:100%; width:0%; background:var(--teal); transition:width .2s; }
.qr-stats { margin-top:10px; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.qr-stat { display:flex; justify-content:space-between; align-items:center; padding:7px 12px; font-size:13px; border-bottom:1px solid var(--border); }
.qr-stat:last-child { border-bottom:none; }
.qr-stat span { color:var(--muted); }
.qr-stat b { color:var(--text); font-size:14px; }
.ov-note { font-size:11.5px; color:var(--muted); line-height:1.5; margin-top:12px; text-align:left; background:#f7fafa; border:1px solid var(--border); border-radius:9px; padding:10px 12px; }
.ov-foot { padding:10px 14px 14px; border-top:1px solid var(--border); display:flex; gap:8px; flex-shrink:0; }
.ov-fbtn { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; border:none; }
.ov-luk { background:#fff; color:var(--muted); border:1.5px solid var(--border); }
.dest-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:1050; align-items:center; justify-content:center; padding:14px; }
.dest-modal.open { display:flex; }
.dest-dialog { background:#fff; border-radius:16px; width:100%; max-width:400px; max-height:80vh; display:flex; flex-direction:column; box-shadow:0 12px 40px rgba(0,0,0,0.3); overflow:hidden; }
.dest-head { padding:18px 18px 12px; }
.dest-title { font-size:16.5px; font-weight:700; color:var(--text); }
.dest-sub { font-size:12.5px; color:var(--muted); margin-top:4px; }
.dest-body { padding:0 14px 6px; overflow-y:auto; }
.dest-btn { width:100%; text-align:left; padding:13px 14px; margin-bottom:8px; border-radius:11px; border:1.5px solid var(--border); background:#fbfdfd; color:var(--text); font-size:14.5px; font-weight:700; font-family:var(--font); cursor:pointer; }
.dest-btn .sm { display:block; font-weight:400; font-size:11.5px; color:var(--muted); margin-top:2px; }
.dest-btn.ny { background:#eef4f4; border-style:dashed; color:var(--teal-dark); }
.dest-sep { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; padding:6px 2px 6px; }
.dest-foot { padding:6px 14px 14px; }
.dest-cancel { width:100%; padding:12px; border-radius:10px; border:1.5px solid var(--border); background:#fff; color:var(--muted); font-size:14px; font-weight:600; font-family:var(--font); cursor:pointer; }
.hold-membership-summary { margin-bottom:10px; padding:10px 12px; border:1px solid #CFE6E6; border-radius:10px; background:#F2FAFA; color:var(--teal-dark); font-size:12.5px; line-height:1.45; }
.hold-membership-modes { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:12px; }
.hold-membership-mode { min-height:58px; padding:9px 10px; border:1.5px solid var(--border); border-radius:10px; background:#FBFDFD; color:var(--text); font:700 13px var(--font); text-align:left; cursor:pointer; }
.hold-membership-mode small { display:block; margin-top:3px; color:var(--muted); font-size:10.5px; font-weight:500; line-height:1.3; }
.hold-membership-mode.on { border-color:var(--teal); background:var(--teal-light); color:var(--teal-dark); }
.hold-membership-source { width:100%; margin:0 0 10px; padding:10px 11px; border:1.5px solid var(--border); border-radius:9px; background:#fff; color:var(--text); font:600 13px var(--font); }
.hold-membership-label { padding:1px 2px 7px; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.35px; text-transform:uppercase; }
.prog-back { display:flex; align-items:center; gap:7px; width:100%; padding:9px 11px; margin-bottom:9px; border-radius:10px; border:1.5px solid var(--border); background:#f4f9f9; color:var(--teal-dark); font-size:13.5px; font-weight:700; font-family:var(--font); cursor:pointer; }
.prog-folder { display:flex; align-items:center; gap:8px; padding:12px; border:1.5px solid var(--border); border-radius:11px; margin-bottom:8px; background:#fbfdfd; }
.prog-fname { flex:1; min-width:0; cursor:pointer; }
.prog-fname .n { font-size:14.5px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prog-fname .m { font-size:11.5px; color:var(--muted); margin-top:2px; }
.prog-tabs { display:flex; gap:6px; margin-top:10px; }
.prog-tab { flex:1; padding:8px 6px; border-radius:9px; border:1.5px solid var(--border); background:#fbfdfd; color:var(--muted); font-size:13px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.prog-tab.on { background:var(--teal); border-color:var(--teal); color:#fff; }
.prog-tab .cnt { font-weight:400; opacity:0.85; }
.prog-search { width:100%; margin-top:9px; padding:10px 12px; border:1.5px solid var(--border); border-radius:9px; font-size:14px; font-family:var(--font); color:var(--text); background:#fbfdfd; -webkit-appearance:none; }
.prog-search:focus { outline:none; border-color:var(--teal); background:#fff; }
.prog-title { font-size:16px; font-weight:700; color:var(--text); }
.prog-sub { font-size:12px; color:var(--muted); margin-top:3px; }
.prog-body { padding:10px 12px; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; }
.prog-item { display:flex; align-items:center; gap:8px; padding:11px 12px; border:1.5px solid var(--border); border-radius:11px; margin-bottom:8px; background:#fbfdfd; }
.prog-info { flex:1; min-width:0; cursor:pointer; }
.prog-name { font-size:14.5px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prog-meta { font-size:11.5px; color:var(--muted); margin-top:2px; }
.prog-act { width:38px; height:38px; border-radius:9px; border:1.5px solid var(--border); background:#fff; font-size:15px; cursor:pointer; flex-shrink:0; }
.prog-act.membership { width:44px; color:var(--teal-dark); font-size:11px; font-weight:800; }
.prog-act.del { color:#B91C1C; border-color:#FCA5A5; }
.prog-empty { text-align:center; color:var(--muted); font-size:13px; line-height:1.6; padding:26px 12px; }
.prog-foot { padding:10px 14px 14px; border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:8px; flex-shrink:0; }
.prog-aktiv { margin-top:9px; padding:8px 11px; border-radius:9px; background:#eef4f4; border:1px solid #cfe6e6; color:var(--teal-dark); font-size:12px; line-height:1.45; }
.prog-fbtn { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; border:none; }
.prog-save { background:var(--teal); color:#fff; }
.prog-close { background:#fff; color:var(--muted); border:1.5px solid var(--border); }
.pin-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:1100; align-items:center; justify-content:center; padding:16px; }
.pin-modal.open { display:flex; }
.pin-dialog { background:#fff; border-radius:16px; padding:22px 20px 18px; width:100%; max-width:330px; box-shadow:0 12px 40px rgba(0,0,0,0.3); }
.pin-title { font-size:17px; font-weight:700; color:var(--text); text-align:center; }
.pin-sub { font-size:12.5px; color:var(--muted); text-align:center; margin-top:5px; }
.pin-dots { display:flex; gap:11px; justify-content:center; margin:18px 0 20px; }
.pin-dot { width:14px; height:14px; border-radius:50%; border:2px solid var(--border); }
.pin-dot.on { background:var(--teal); border-color:var(--teal); }
.pin-dot.err { background:#EF4444; border-color:#EF4444; }
.pin-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.pin-key { padding:16px 0; border-radius:11px; border:1.5px solid var(--border); background:#fbfdfd; color:var(--text); font-size:21px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.pin-key:active { background:var(--teal-light); }
.pin-key.blank { border:none; background:transparent; cursor:default; }
.gdpr-modal { display:none; position:fixed; inset:0; width:100%; height:100%; background:rgba(0,0,0,0.68); z-index:1200; align-items:center; justify-content:center; padding:14px; }
.gdpr-modal.open { display:flex; }
.gdpr-dialog { background:#fff; border-radius:16px; width:100%; max-width:560px; max-height:94vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 14px 46px rgba(0,0,0,0.34); }
.gdpr-head { padding:18px 18px 12px; border-bottom:1px solid var(--border); }
.gdpr-title { margin:0; font-size:18px; font-weight:800; color:var(--text); }
.gdpr-sub { margin:5px 0 0; color:var(--muted); font-size:12.5px; line-height:1.5; }
.gdpr-body { padding:12px 16px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.gdpr-doc-link { display:flex; align-items:center; justify-content:center; width:100%; padding:11px 12px; margin-bottom:11px; border:1.5px solid var(--teal); border-radius:10px; background:#F2FAFA; color:var(--teal-dark); font-size:13.5px; font-weight:800; text-decoration:none; }
.gdpr-points { margin:0; padding:0; list-style:none; counter-reset:gdpr-point; }
.gdpr-point { position:relative; padding:9px 9px 9px 38px; border-bottom:1px solid #E7EFEF; color:var(--text); font-size:12.3px; line-height:1.47; counter-increment:gdpr-point; }
.gdpr-point::before { content:counter(gdpr-point); position:absolute; left:5px; top:9px; width:23px; height:23px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#E8F4F4; color:var(--teal-dark); font-size:11px; font-weight:800; }
.gdpr-check { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid #E7EFEF; color:var(--text); font-size:12.5px; line-height:1.48; cursor:pointer; }
.gdpr-check:last-of-type { border-bottom:none; }
.gdpr-check input { width:21px; height:21px; margin:1px 0 0; flex:0 0 21px; accent-color:var(--teal); }
.gdpr-accept-all { margin-top:11px; padding:11px 12px; border:1.5px solid #B7DADA; border-radius:10px; background:#F2FAFA; font-weight:800; }
.gdpr-note { margin:11px 0 0; padding:10px 11px; border-radius:9px; background:#F5F7F7; color:var(--muted); font-size:11.5px; line-height:1.45; }
.gdpr-foot { padding:12px 16px 16px; border-top:1px solid var(--border); }
.gdpr-accept { width:100%; padding:13px; border:0; border-radius:10px; background:var(--teal); color:#fff; font:800 14px var(--font); cursor:pointer; }
.gdpr-accept:disabled { background:#AABBBB; color:#F5F8F8; cursor:not-allowed; }
body.patient-mode #gdpr-modal { display:none !important; }
.guide-gdpr-box { margin:12px 0; padding:11px 12px; border:1.5px solid #B7DADA; border-radius:10px; background:#F2FAFA; font-size:12.5px; line-height:1.5; }
.guide-gdpr-box a { color:var(--teal-dark); font-weight:800; }
body.gate-pending { overflow:hidden; }
body.gate-pending > * { visibility:hidden; }
body.gate-pending > #pin-modal,
body.gate-pending > #gdpr-modal,
body.gate-pending > script { visibility:visible; }
.lock-btn { padding:0 12px; background:transparent; border:none; font-size:17px; cursor:pointer; touch-action:manipulation; flex-shrink:0; opacity:0.75; }
.lock-btn.on { opacity:1; }
.active-bar { display:flex; align-items:center; justify-content:center; gap:10px; min-height:33px; background:#eef4f4; color:var(--teal-dark); font-size:12.5px; text-align:center; padding:6px 12px; border-bottom:1px solid var(--border); cursor:pointer; }
.active-bar-text { flex:0 1 auto; min-width:0; padding:2px 0; line-height:1.4; overflow-wrap:anywhere; }
.hold-bar { display:none; grid-template-columns:46px minmax(0,1fr) 46px auto; gap:7px; align-items:center; padding:8px 10px; background:#eef4f4; border-bottom:1px solid var(--border); }
.hold-nav,.hold-current,.hold-list-btn { min-height:44px; border:1.5px solid #c8dede; border-radius:9px; background:#fff; color:var(--teal-dark); font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.hold-nav { padding:0; font-size:25px; line-height:1; }
.hold-nav:disabled { opacity:.35; cursor:default; }
.hold-current { min-width:0; padding:5px 10px; text-align:left; }
.hold-current strong,.hold-current span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hold-current strong { color:var(--text); font-size:13.5px; }
.hold-current span { margin-top:2px; color:var(--muted); font-size:11.5px; }
.hold-bar.has-note { grid-template-columns:46px minmax(0,1fr) 44px 46px auto; }
.hold-list-btn { display:flex; align-items:center; gap:6px; padding:0 12px; font-size:12.5px; font-weight:700; white-space:nowrap; }
.hold-folder-head { display:flex; align-items:stretch; gap:7px; margin-bottom:9px; }
.hold-folder-head .prog-back { min-width:0; margin-bottom:0; }
.hold-start-btn { flex:0 0 auto; min-height:42px; padding:8px 12px; border:1.5px solid var(--teal); border-radius:10px; background:var(--teal); color:#fff; font:700 13px var(--font); cursor:pointer; touch-action:manipulation; white-space:nowrap; }
.hold-modal { display:none; position:fixed; inset:0; z-index:1050; background:rgba(0,0,0,.48); align-items:flex-end; justify-content:center; }
.hold-modal.open { display:flex; }
.hold-sheet { width:100%; max-height:82vh; display:flex; flex-direction:column; overflow:hidden; border-radius:16px 16px 0 0; background:#fff; box-shadow:0 -10px 32px rgba(0,0,0,.24); }
.hold-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:15px 16px 12px; border-bottom:1px solid var(--border); }
.hold-title { color:var(--text); font-size:17px; font-weight:800; }
.hold-sub { margin-top:3px; color:var(--muted); font-size:12px; }
.hold-close { width:44px; height:44px; flex:0 0 44px; border:0; border-radius:9px; background:transparent; color:var(--muted); font:400 27px var(--font); cursor:pointer; }
.hold-people { padding:9px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.hold-person { width:100%; min-height:54px; display:grid; grid-template-columns:34px minmax(0,1fr) 24px; align-items:center; gap:8px; padding:6px 9px; border:0; border-radius:9px; background:transparent; color:var(--text); text-align:left; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.hold-person.on { background:var(--teal-light); color:var(--teal-dark); }
.hold-person:disabled { opacity:.58; cursor:default; }
.hold-person-num { color:var(--muted); text-align:center; font-size:12px; }
.hold-person-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:750; }
.hold-person-meta { display:block; margin-top:2px; color:var(--muted); font-size:11.5px; font-weight:500; }
.hold-person-check { color:var(--teal); font-size:18px; font-weight:800; text-align:center; }
.hold-status { min-height:18px; padding:0 14px 8px; color:var(--muted); font-size:12px; text-align:center; }
.hold-foot { padding:10px 12px 14px; border-top:1px solid var(--border); }
.hold-end { width:100%; min-height:46px; border:1.5px solid var(--border); border-radius:10px; background:#fff; color:var(--muted); font:700 13px var(--font); cursor:pointer; }
body.locked .active-bar,body.locked .hold-bar { display:none !important; }
@media (max-width:520px){
  .hold-bar { grid-template-columns:44px minmax(0,1fr) 44px 44px; padding-left:7px; padding-right:7px; }
  .hold-bar.has-note { grid-template-columns:44px minmax(0,1fr) 44px 44px 44px; }
  .hold-list-btn { justify-content:center; padding:0; font-size:17px; }
  .hold-list-btn span { display:none; }
  .hold-folder-head { flex-wrap:wrap; }
  .hold-folder-head .prog-back,.hold-start-btn { width:100%; }
}
@media (min-width:840px){
  .hold-modal { align-items:stretch; justify-content:flex-end; }
  .hold-sheet { width:340px; max-height:none; height:100%; border-radius:16px 0 0 16px; box-shadow:-10px 0 32px rgba(0,0,0,.24); }
}
.patient-banner { display:none; background:#E8F4F4; color:var(--teal-dark); font-size:12px; font-weight:700; text-align:center; padding:7px 12px; border-bottom:1px solid #C8E1E1; }
body.patient-mode .patient-banner { display:block; }
body.patient-mode .ai-modal, body.patient-mode #pick-aibtn { display:none !important; }
body.locked #prog-btn,
body.locked #guide-btn,
body.locked #sync-btn,
body.locked #reset-btn,
body.locked .drag-handle,
body.locked .cam-btn,
body.locked .lib-btn,
body.locked .ai-btn,
body.locked .copy-card-btn,
body.locked .add-card-wrap,
body.locked .remove-card-btn,
body.locked .field-row .stepper button,
body.locked #modal-del,
body.locked #modal-add,
body.locked #modal-save { display:none !important; }
body.locked .name-input,
body.locked .desc-txt { pointer-events:none; background:transparent; }
body.locked .field-row .stepper { border-color:transparent; background:transparent; }
body.locked .field-row .stepper input { pointer-events:none; background:transparent; }
body.locked .field-row .stepper input { text-align:left; font-weight:700; pointer-events:none; }
body.locked .card-title { padding-left:14px; }
body.locked .stepper input { border-left:none; border-right:none; width:auto; min-width:52px; }
.lib-btn { width:40px; height:46px; background:transparent; border:none; font-size:19px; cursor:pointer; touch-action:manipulation; flex-shrink:0; display:flex; align-items:center; justify-content:center; opacity:0.6; }
.lib-btn:active { opacity:1; }
.ai-btn { width:38px; height:46px; background:transparent; border:none; color:#fff; font-size:18px; cursor:pointer; touch-action:manipulation; flex-shrink:0; display:flex; align-items:center; justify-content:center; opacity:0.78; }
.ai-btn:active { opacity:1; transform:scale(0.88); }
.pick-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:997; align-items:center; justify-content:center; padding:10px; }
.pick-modal.open { display:flex; }
.pick-sheet { background:#fff; border-radius:16px; width:100%; max-width:640px; height:92vh; max-height:92vh; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,0.28); overflow:hidden; }
.pick-head { padding:13px 15px 9px; border-bottom:1px solid var(--border); flex-shrink:0; }
.pick-title { font-size:16px; font-weight:700; color:var(--text); }
.pick-sub { font-size:12px; color:var(--muted); margin-top:3px; line-height:1.45; }
.shared-tools { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:9px; padding:8px; border:1px solid #CDE1E1; border-radius:10px; background:#F3F9F9; }
.shared-btn { padding:7px 10px; border-radius:8px; border:1.5px solid var(--teal); background:#fff; color:var(--teal-dark); font:700 12px var(--font); cursor:pointer; touch-action:manipulation; }
.shared-btn.primary { background:var(--teal); color:#fff; }
.shared-btn:disabled { opacity:.55; cursor:default; }
.shared-status { flex:1 1 100%; min-height:15px; color:var(--muted); font-size:11px; line-height:1.35; }
.pick-search { width:100%; margin-top:9px; padding:10px 12px; border:1.5px solid var(--border); border-radius:9px; font-size:14px; font-family:var(--font); color:var(--text); background:#fbfdfd; -webkit-appearance:none; }
.pick-search:focus { outline:none; border-color:var(--teal); background:#fff; }
.pick-chips { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.pick-cats { display:flex; flex-wrap:wrap; gap:5px; }
.pick-cat { padding:5px 12px; border-radius:14px; border:1.5px solid var(--border); background:#eef4f4; color:var(--text); font-size:12px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.pick-cat.open { background:var(--teal); border-color:var(--teal); color:#fff; }
.pick-cat .cnt { font-weight:400; opacity:0.85; }
.pick-grp-chips { display:flex; flex-wrap:wrap; gap:5px; padding:2px 0 0 2px; }
.pick-active { border-top:1px solid var(--border); padding-top:7px; margin-top:2px; }
.pick-chip { padding:5px 11px; border-radius:14px; border:1.5px solid var(--border); background:#fbfdfd; color:var(--muted); font-size:12px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.pick-chip.on { background:var(--teal); border-color:var(--teal); color:#fff; }
.pick-chip { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.pick-chip-del { background:#FEF2F2; border-color:#FCA5A5; color:#991B1B; }
.pick-taglist { position:absolute; left:0; right:0; bottom:0; display:flex; gap:2px; padding:2px; pointer-events:none; }
.pick-tagbadge { background:rgba(44,122,123,0.9); color:#fff; font-size:8.5px; padding:1.5px 5px; border-radius:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:48%; }
.pick-tag { position:absolute; top:3px; left:3px; width:21px; height:21px; border-radius:50%; background:rgba(0,0,0,0.55); color:#fff; border:none; font-size:11px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.pick-body { padding:11px 12px; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; }
.pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:7px; }
.pick-item { position:relative; -webkit-touch-callout:none; user-select:none; -webkit-user-select:none; height:104px; border-radius:9px; overflow:hidden; border:1.5px solid var(--border); background:#f4f9f9; cursor:pointer; padding:0; }
.pick-item.sel { border:3px solid var(--teal); }
.pick-check { position:absolute; top:4px; left:4px; width:21px; height:21px; border-radius:50%; background:var(--teal); color:#fff; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 4px rgba(0,0,0,0.3); }
.pick-item img { width:100%; height:100%; object-fit:contain; background:#fff; display:block; pointer-events:none; -webkit-user-drag:none; -webkit-touch-callout:none; }
.pick-cap { position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,0.55); color:#fff; font-size:9.5px; padding:3px 4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shared-badge { position:absolute; top:30px; right:4px; min-width:23px; height:21px; padding:0 5px; border-radius:11px; display:flex; align-items:center; justify-content:center; background:#2563EB; color:#fff; font-size:10px; font-weight:800; box-shadow:0 1px 4px rgba(0,0,0,.28); }
.zoom-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.86); z-index:1000; align-items:center; justify-content:center; flex-direction:column; padding:14px; }
.zoom-modal.open { display:flex; }
.zoom-img { max-width:96vw; max-height:66vh; -webkit-user-drag:none; -webkit-touch-callout:none; object-fit:contain; border-radius:10px; background:#fff; }
.zoom-meta { color:#fff; text-align:center; margin-top:12px; max-width:92vw; }
.zoom-name { font-size:16px; font-weight:700; }
.zoom-tags { font-size:12px; color:rgba(255,255,255,0.7); margin-top:4px; }
.zoom-bar { display:flex; gap:9px; margin-top:16px; }
.zoom-btn { padding:12px 22px; border-radius:10px; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; border:none; }
.zoom-pick { background:var(--teal); color:#fff; }
.zoom-unpick { background:#fff; color:var(--teal); border:2px solid var(--teal); }
.zoom-x { position:absolute; top:12px; right:14px; width:46px; height:46px; border-radius:50%; background:rgba(255,255,255,0.18); color:#fff; border:none; font-size:28px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.zoom-hint { color:rgba(255,255,255,0.55); font-size:12px; margin-top:14px; }
.pick-del { position:absolute; top:3px; right:3px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,0.6); color:#fff; border:none; font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.pick-empty { text-align:center; color:var(--muted); font-size:13px; line-height:1.6; padding:26px 10px; }
.pick-foot { padding:10px 14px 13px; border-top:1px solid var(--border); display:flex; gap:8px; flex-shrink:0; }
#pick-cambtn, #pick-aibtn { flex:0 0 54px; font-size:19px; }
.pick-fbtn { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; font-family:var(--font); cursor:pointer; border:none; }
.pick-add { background:var(--teal); color:#fff; }
.pick-close { background:#fff; color:var(--muted); border:1.5px solid var(--border); }
.cam-btn { width:46px; height:46px; background:transparent; border:none; font-size:22px; cursor:pointer; touch-action:manipulation; flex-shrink:0; display:flex; align-items:center; justify-content:center; opacity:0.65; }
.cam-btn:active { opacity:1; transform:scale(0.88); }
.thumb-btn { width:46px; height:46px; background:transparent; border:none; padding:5px; cursor:pointer; touch-action:manipulation; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.thumb-btn img { width:44px; height:34px; border-radius:7px; object-fit:contain; background:#fff; border:2px solid rgba(255,255,255,0.65); }

/* AI-genereret øvelsesillustration */
.ai-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.58); z-index:1002; align-items:center; justify-content:center; padding:10px; }
.ai-modal.open { display:flex; }
.ai-sheet { width:100%; max-width:620px; max-height:94vh; background:#fff; border-radius:16px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 12px 44px rgba(0,0,0,0.3); }
.ai-head { padding:14px 16px 11px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ai-title { font-size:17px; font-weight:750; color:var(--text); }
.ai-sub { margin-top:4px; color:var(--muted); font-size:12.5px; line-height:1.45; }
.ai-body { padding:14px 15px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.ai-label { display:block; margin:0 0 5px; color:var(--teal-dark); font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.45px; }
.ai-input, .ai-textarea { width:100%; border:1.5px solid var(--border); border-radius:10px; background:#fbfdfd; color:var(--text); font:14px var(--font); padding:10px 12px; outline:none; -webkit-appearance:none; }
.ai-input:focus, .ai-textarea:focus { border-color:var(--teal); background:#fff; }
.ai-textarea { min-height:112px; resize:vertical; line-height:1.5; }
.ai-field { margin-bottom:12px; }
.ai-layout { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.ai-layout-btn { padding:10px 7px; border-radius:9px; border:1.5px solid var(--border); background:#fff; color:var(--muted); font:650 13px var(--font); cursor:pointer; }
.ai-layout-btn.on { background:var(--teal-light); border-color:var(--teal); color:var(--teal-dark); }
.ai-note { margin:10px 0 0; padding:9px 11px; border-radius:9px; background:#F5F9F9; color:var(--muted); font-size:11.5px; line-height:1.45; }
.ai-code-row { margin:10px 0 0; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11.5px; }
.ai-code-btn { flex-shrink:0; border:none; background:transparent; color:var(--teal); font:700 11.5px var(--font); padding:5px; cursor:pointer; }
.ai-preview { display:none; margin-top:13px; border:1.5px solid var(--border); border-radius:12px; background:#F5F9F9; overflow:hidden; min-height:170px; align-items:center; justify-content:center; }
.ai-preview.show { display:flex; }
.ai-preview img { display:block; width:100%; max-height:360px; object-fit:contain; background:#fff; }
.ai-spinner { width:34px; height:34px; border:4px solid #D7E8E8; border-top-color:var(--teal); border-radius:50%; animation:ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform:rotate(360deg); } }
.ai-status { min-height:18px; margin-top:9px; text-align:center; color:var(--muted); font-size:12px; line-height:1.45; }
.ai-status.err { color:#B91C1C; }
.ai-foot { padding:10px 14px calc(12px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:8px; flex-shrink:0; }
.ai-fbtn { flex:1 1 145px; min-height:44px; border-radius:10px; border:none; padding:10px 11px; font:700 13px var(--font); cursor:pointer; touch-action:manipulation; }
.ai-primary { background:var(--teal); color:#fff; }
.ai-secondary { background:#E8F4F4; color:var(--teal-dark); border:1.5px solid #BFD7D7; }
.ai-close { flex:0 1 92px; background:#fff; color:var(--muted); border:1.5px solid var(--border); }
.ai-fbtn:disabled { opacity:.5; cursor:default; }
.ai-cost-sheet { max-width:480px; }
.ai-cost-body { color:var(--text); font-size:14px; line-height:1.55; }
.ai-cost-body p { margin:13px 1px 0; }
.ai-cost-box { padding:13px 14px; border:1.5px solid #F1C56A; border-radius:11px; background:#FFF8E6; color:#6F4A00; }
.ai-cost-box strong { display:block; margin-bottom:3px; font-size:16px; }
.ai-cost-box span { display:block; font-size:12px; line-height:1.45; }
.variant-card-action { width:100%; margin:0 0 14px; padding:12px; border:1.5px solid #BFD7D7; border-radius:11px; background:#E8F4F4; color:var(--teal-dark); font:700 13px var(--font); cursor:pointer; text-align:left; }
.variant-card-action:active { transform:scale(.99); }
.variant-options { display:grid; gap:8px; margin:10px 0; }
.variant-option { width:100%; padding:12px; border:1.5px solid var(--border); border-radius:11px; background:#fff; color:var(--text); font:14px var(--font); text-align:left; cursor:pointer; }
.variant-option.on { border-color:var(--teal); background:var(--teal-light); }
.variant-option small { display:block; margin-top:4px; color:var(--muted); line-height:1.35; }
.variant-step { font-size:13px; font-weight:700; color:var(--teal-dark); margin:12px 0 6px; }
.variant-back { border:0; background:transparent; color:var(--teal-dark); font:700 13px var(--font); padding:10px 0; cursor:pointer; }
.variant-history { margin:0 0 14px; padding:10px 12px; background:#F7FAFA; border:1px solid var(--border); border-radius:10px; color:var(--text); font-size:12px; line-height:1.45; }
.variant-history summary { font-weight:700; cursor:pointer; }
.variant-history-entry { padding:10px 0 4px; border-top:1px solid var(--border); white-space:pre-wrap; }
.variant-image { width:100%; max-height:240px; object-fit:contain; border:1.5px solid var(--border); border-radius:11px; background:#fff; margin-top:8px; }
.variant-image-note { margin:8px 0; font-size:12px; color:var(--muted); line-height:1.45; }
.pick-more { grid-column:1/-1; padding:12px 0 4px; text-align:center; }
.pick-more button { min-width:180px; padding:11px 16px; border:1.5px solid var(--teal); border-radius:10px; background:#fff; color:var(--teal-dark); font:700 13px var(--font); cursor:pointer; }

/* Fælles valgsvinduer: deling af biblioteksøvelser og kopiering mellem lister */
.select-modal { display:none; position:fixed; inset:0; width:100%; height:100%; background:rgba(0,0,0,.6); z-index:1070; align-items:center; justify-content:center; padding:10px; }
.select-modal.open { display:flex; }
.select-sheet { width:100%; max-width:580px; max-height:92vh; background:#fff; border-radius:16px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 12px 42px rgba(0,0,0,.3); }
.select-head { padding:14px 16px 11px; border-bottom:1px solid var(--border); }
.select-title { font-size:17px; font-weight:750; color:var(--text); }
.select-sub { margin-top:4px; color:var(--muted); font-size:12.5px; line-height:1.45; }
.select-warning { margin-top:10px; padding:11px 12px; border:1.5px solid #F3B65B; border-radius:10px; background:#FFF7E6; color:#704500; font-size:12.5px; line-height:1.45; }
.select-warning strong { display:block; color:#8A2C18; font-size:13.5px; margin-bottom:3px; }
.select-confirm { display:flex; gap:9px; align-items:flex-start; margin-top:9px; color:#513500; font-size:12.5px; font-weight:650; line-height:1.4; }
.select-confirm input { width:20px; height:20px; flex:0 0 20px; accent-color:var(--teal); }
.select-body { padding:10px 12px; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; }
.select-empty { padding:28px 12px; text-align:center; color:var(--muted); font-size:13px; line-height:1.55; }
.select-row { display:flex; align-items:center; gap:10px; width:100%; min-height:68px; padding:8px 9px; margin-bottom:7px; border:1.5px solid var(--border); border-radius:11px; background:#FBFDFD; cursor:pointer; text-align:left; }
.select-row.on { border-color:var(--teal); background:#ECF8F7; }
.select-check { width:24px; height:24px; flex:0 0 24px; border:1.5px solid #B6CCCC; border-radius:7px; display:flex; align-items:center; justify-content:center; background:#fff; color:#fff; font-size:15px; font-weight:800; }
.select-row.on .select-check { background:var(--teal); border-color:var(--teal); }
.select-thumb { width:64px; height:48px; flex:0 0 64px; object-fit:contain; border-radius:7px; background:#fff; border:1px solid var(--border); }
.select-meta { min-width:0; flex:1; }
.select-name { color:var(--text); font-size:13.5px; font-weight:750; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.select-detail { margin-top:3px; color:var(--muted); font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.select-foot { padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:8px; }
.select-fbtn { flex:1 1 120px; min-height:43px; padding:10px; border-radius:10px; border:none; font:700 13px var(--font); cursor:pointer; }
.select-fbtn.primary { background:var(--teal); color:#fff; }
.select-fbtn.secondary { background:#EDF6F6; color:var(--teal-dark); border:1.5px solid #C5DCDC; }
.select-fbtn.close { flex:0 1 88px; background:#fff; color:var(--muted); border:1.5px solid var(--border); }
.select-fbtn:disabled { opacity:.5; cursor:default; }
.select-progress { flex:1 1 100%; min-height:17px; text-align:center; color:var(--muted); font-size:12px; line-height:1.4; }

.desc-section { padding:9px 14px 10px; background:#F0F7F7; border-bottom:1px solid var(--border); }
.desc-lbl { font-size:11px; font-weight:700; color:var(--teal-dark); text-transform:uppercase; letter-spacing:0.6px; margin-bottom:5px; opacity:0.7; }
.desc-txt { width:100%; border:1.5px solid #C8DEDE; border-radius:8px; padding:8px 11px; font-size:13.5px; font-family:var(--font); color:var(--text); background:#fff; outline:none; resize:none; min-height:52px; line-height:1.5; -webkit-appearance:none; }
.desc-txt:focus { border-color:var(--teal); }
.desc-readonly { width:100%; border:1.5px solid #C8DEDE; border-radius:8px; padding:10px 12px; font-size:15px; font-family:var(--font); color:var(--text); background:#fff; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; min-height:48px; }
.desc-empty { color:var(--muted); font-style:italic; }

.fields { border-bottom:1px solid var(--border); }
.field-row { display:flex; align-items:center; padding:0 14px; height:48px; border-bottom:1px solid var(--border); }
.field-row:last-child { border-bottom:none; }
.field-lbl { font-size:14px; color:var(--muted); font-weight:500; flex:1; }
/* Patientens egne justeringer (kun patienttilstand) */
.pj-fields { padding:10px 12px 12px; border-bottom:1px solid var(--border); }
.pj-hint { font-size:12.5px; color:var(--muted); margin:0 2px 8px; line-height:1.35; }
.pj-grid { display:grid; grid-template-columns:1fr; gap:8px; }
@media (min-width:640px) { .pj-grid { grid-template-columns:1fr 1fr; } }
.pj-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:62px; padding:7px 8px 7px 12px; border:1.5px solid var(--border); border-radius:12px; background:#fff; }
.pj-row.pj-adjusted { border-color:#E3C26F; background:#FFFBF1; }
.pj-info { min-width:0; flex:1; }
.pj-lbl { font-size:14.5px; font-weight:600; color:var(--text); display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.pj-mark { display:inline-block; font-size:11px; font-weight:700; color:#7A5300; background:#FBE9C2; border-radius:999px; padding:2px 8px; letter-spacing:.2px; }
.pj-orig { font-size:12px; color:var(--muted); margin-top:2px; line-height:1.3; }
.pj-ctrl { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.pj-btn { width:48px; height:48px; border-radius:12px; border:none; background:var(--teal-light); color:var(--teal-dark); font-size:26px; font-weight:600; line-height:1; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:center; padding:0; font-family:var(--font); }
.pj-btn:active { background:#cfe6e6; transform:scale(.96); }
.pj-btn:disabled { opacity:.35; cursor:default; transform:none; }
.pj-val { min-width:66px; text-align:center; font-size:19px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.pj-unit { font-size:13px; font-weight:600; color:var(--muted); }
.pj-text { font-size:15px; min-width:0; max-width:150px; overflow-wrap:anywhere; }
.pj-reset { display:block; margin:10px auto 0; min-height:44px; padding:0 16px; border-radius:10px; border:1.5px solid var(--border); background:#fff; color:var(--teal-dark); font-size:14px; font-weight:600; cursor:pointer; font-family:var(--font); touch-action:manipulation; }
.pj-reset:active { background:var(--teal-light); }
.stepper { display:flex; align-items:center; border:1.5px solid var(--border); border-radius:9px; overflow:hidden; }
.stepper button { width:38px; height:38px; border:none; background:var(--label-bg); color:var(--teal-dark); font-size:20px; font-weight:300; cursor:pointer; touch-action:manipulation; user-select:none; font-family:var(--font); line-height:1; display:flex; align-items:center; justify-content:center; }
.stepper button:active { background:var(--teal-light); }
.stepper input { width:58px; height:38px; border:none; border-left:1.5px solid var(--border); border-right:1.5px solid var(--border); text-align:center; font-size:15px; font-weight:600; font-family:var(--font); color:var(--text); background:#fff; outline:none; -webkit-appearance:none; padding:0; }

.pb { height:42px; border-radius:8px; border:1.5px solid; font-size:14px; font-weight:700; cursor:pointer; touch-action:manipulation; user-select:none; font-family:var(--font); display:flex; align-items:center; justify-content:center; transition:transform 0.08s; }
.pb:active { transform:scale(0.91); }
.pb.low { background:#fff; color:var(--teal-dark); border-color:#B9D8D8; }
.pb.low.sel { background:var(--teal); color:#fff; border-color:var(--teal); }

.note-txt { width:100%; border:1.5px solid var(--border); border-radius:8px; padding:9px 11px; font-size:14px; font-family:var(--font); color:var(--text); background:#fff; outline:none; resize:none; min-height:62px; line-height:1.5; -webkit-appearance:none; }
.note-txt:focus { border-color:var(--teal); }


.photo-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.92); z-index:999; flex-direction:column; align-items:center; justify-content:center; padding:20px; padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)); }
.photo-modal.open { display:flex; }
.modal-wrap { position:relative; width:100%; max-width:420px; }
.modal-img { width:100%; max-height:62vh; border-radius:12px; object-fit:contain; display:block; }
.modal-arrow { position:absolute; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; border:2px solid rgba(255,255,255,0.9); background:rgba(20,20,20,0.62); color:#fff; font-size:30px; font-weight:700; line-height:1; cursor:pointer; touch-action:manipulation; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 10px rgba(0,0,0,0.45); -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px); }
.modal-arrow:active { background:rgba(20,20,20,0.85); transform:translateY(-50%) scale(0.92); }
.modal-arrow.left  { left:8px; }
.modal-arrow.right { right:8px; }
.modal-dots { display:flex; gap:7px; justify-content:center; margin:12px 0 4px; }
.modal-dot  { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.35); transition:background 0.2s; }
.modal-dot.on { background:#fff; }
.modal-actions { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; justify-content:center; }
.modal-btn { padding:12px 22px; border-radius:11px; border:none; font-size:14px; font-weight:600; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.modal-btn.del   { background:var(--red); color:#fff; }
.modal-btn.add   { background:var(--teal); color:#fff; }
.modal-btn.close { background:rgba(255,255,255,0.14); color:#fff; }
.photo-count { position:absolute; bottom:5px; right:5px; background:rgba(0,0,0,0.6); color:#fff; font-size:9px; font-weight:700; border-radius:4px; padding:1px 4px; pointer-events:none; }
.thumb-btn { position:relative; }


.footer { padding:10px 16px 6px; font-size:11.5px; color:#9CA3AF; text-align:center; line-height:1.6; font-style:italic; }
.footer-copy { font-style:normal; font-size:10.5px; color:#B6BEC7; }
body.patient-mode .footer-guide { display:none; }
.guide-modal { display:none; position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.55); z-index:998; align-items:center; justify-content:center; padding:24px; }
.guide-modal.open { display:flex; }
.guide-dialog { background:#fff; border-radius:16px; padding:24px 20px; width:100%; max-width:340px; max-height:82vh; overflow-y:auto; box-shadow:0 8px 32px rgba(0,0,0,0.18); }
.guide-title { font-size:17px; font-weight:700; color:var(--text); margin-bottom:14px; }
.guide-body { font-size:13.5px; color:var(--text); line-height:1.6; }
.guide-body p { margin-bottom:10px; }
.guide-body strong { color:var(--teal-dark); }
.guide-close { width:100%; margin-top:16px; padding:13px; border-radius:10px; border:none; background:var(--teal); color:#fff; font-size:15px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
#cam-in, #lib-in, #libcam-in, #backup-in { display:none; }

/* Store skærme: appen samles i en centreret kolonne i stedet for at strække sig */
@media (min-width:840px){
  html { background:#dde9e9; }
  body { max-width:900px; margin:0 auto; min-height:100vh;
         box-shadow:0 0 0 1px rgba(0,0,0,0.05), 0 8px 34px rgba(0,0,0,0.10); }
  .cards { padding:14px 14px 6px; gap:12px; }
  .pick-sheet { max-width:700px; }
}
/* Rigtige computerskærme: lidt bredere endnu */
@media (min-width:1280px){
  body { max-width:1020px; }
  .cards { padding:16px 16px 8px; gap:14px; }
  .pick-sheet { max-width:820px; }
}
/* ── PDF-programmer pr. patient og holddeltager (2.23/2.24) ── */
.pdf-front { display:flex; flex-direction:column; gap:8px; padding:12px 12px 0; max-width:900px; margin:0 auto; }
.pdf-front-head { font-size:12px; font-weight:800; color:var(--teal-dark); text-transform:uppercase; letter-spacing:.04em; padding:2px 4px 0; }
.pdf-tile { display:flex; align-items:center; gap:12px; background:#fff; border:1.5px solid var(--border); border-left:5px solid #C2410C; border-radius:13px; padding:9px 10px 9px 9px; box-shadow:0 1px 4px rgba(0,0,0,0.09); cursor:pointer; touch-action:manipulation; }
.pdf-tile:active { background:var(--teal-light); }
.pdf-thumb { width:52px; height:66px; flex-shrink:0; border-radius:6px; overflow:hidden; background:#FFF1EA; border:1px solid #F3D3C2; display:flex; align-items:center; justify-content:center; }
.pdf-thumb img { width:100%; height:100%; object-fit:cover; object-position:top; display:block; }
.pdf-thumb span { font-size:13px; font-weight:800; color:#C2410C; }
.pdf-tile-info { flex:1; min-width:0; }
.pdf-tile-title { font-size:15px; font-weight:700; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pdf-tile-meta { font-size:12px; color:var(--muted); margin-top:3px; display:flex; align-items:center; gap:6px; }
.pdf-badge { background:#C2410C; color:#fff; font-size:10px; font-weight:800; border-radius:5px; padding:1px 5px; letter-spacing:.03em; }
.pdf-tile-open { font-size:12px; color:var(--teal); font-weight:700; margin-top:4px; }
.pdf-tile-acts { display:flex; gap:6px; flex-shrink:0; }
.pdf-add-btn { width:100%; padding:10px 12px; border-radius:12px; border:1.5px dashed #9BC4C4; background:#F4F9F9; color:var(--teal-dark); font-size:13.5px; font-weight:700; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.pdf-add-btn:active { background:var(--teal-light); }
.pdf-folder-sec { display:flex; flex-direction:column; gap:8px; margin-bottom:9px; }
.pdf-folder-sec .prog-back { margin-bottom:0; background:#eef4f4; border-style:dashed; }
body.pdfv-open { overflow:hidden; }
.pdfv { position:fixed; inset:0; z-index:4000; background:#3A4747; display:none; flex-direction:column; }
.pdfv.open { display:flex; }
.pdfv-top { display:flex; align-items:center; gap:10px; padding:calc(8px + env(safe-area-inset-top)) 10px 8px; background:var(--teal-dark); color:#fff; }
.pdfv-close { background:#fff; color:var(--teal-dark); border:none; border-radius:10px; padding:9px 13px; font-size:14px; font-weight:800; font-family:var(--font); cursor:pointer; flex-shrink:0; }
.pdfv-title { flex:1; min-width:0; font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pdfv-page { font-size:12.5px; opacity:.85; flex-shrink:0; }
.pdfv-scroll { flex:1; overflow:auto; -webkit-overflow-scrolling:touch; touch-action:pan-x pan-y; overscroll-behavior:contain; position:relative; }
.pdfv-pages { display:flex; flex-direction:column; align-items:center; gap:10px; padding:10px 8px 18px; width:max-content; min-width:100%; }
.pdfv-pg { background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.35); flex-shrink:0; }
.pdfv-pg canvas { width:100%; height:100%; display:block; }
.pdfv-status { color:#fff; text-align:center; padding:40px 20px; font-size:15px; }
.pdfv-bar { display:flex; justify-content:center; gap:10px; padding:8px 10px calc(8px + env(safe-area-inset-bottom)); background:var(--teal-dark); }
.pdfv-bar button { min-width:52px; height:42px; border-radius:10px; border:none; background:#fff; color:var(--teal-dark); font-size:22px; font-weight:800; font-family:var(--font); cursor:pointer; touch-action:manipulation; }
.pdfv-bar .pdfv-fit { font-size:14px; min-width:76px; }
