:root{
  --brand:#0CB8B6;
  --brand-dark:#089b99;
  --brand-soft:#85DBDA;
  --brand-pale:#BCE8F0;
  --accent:#FCDB68;
  --danger:#FF6A6A;
  --ink:#202B34;
  --muted:#666666;
  --line:#DCE7EA;
  --panel:#FFFFFF;
  --panel-soft:#F7FBFC;
  --bg:#EEF8F9;
  --bg-2:#F9FCFC;
  --shadow-sm:0 8px 24px rgba(32,43,52,.06);
  --shadow-md:0 18px 40px rgba(32,43,52,.10);
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:14px;
  --bottom-nav-h:82px;
}

*{
  box-sizing:border-box;
}

html{
  height:100%;
  -webkit-text-size-adjust:100%;
}

body{
  min-height:100%;
  margin:0;
  font-family:"Montserrat", Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at top right, rgba(133,219,218,.35), transparent 30%),
    radial-gradient(circle at bottom left, rgba(188,232,240,.45), transparent 35%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

button{
  font:inherit;
}

.app-body{
  min-height:100vh;
}

.app-body--welcome{
  overflow:hidden;
}

.welcome-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 18px;
}

.welcome-card{
  position:relative;
  width:100%;
  max-width:440px;
  min-height:calc(100vh - 48px);
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(16px);
  border:1px solid rgba(12,184,182,.12);
  border-radius:32px;
  box-shadow:var(--shadow-md);
  padding:24px 22px 20px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
}

.welcome-card::before{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  top:-60px;
  right:-40px;
  background:linear-gradient(135deg, rgba(12,184,182,.22), rgba(122,209,226,.08));
  clip-path:polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  transform:rotate(14deg);
}

.welcome-card::after{
  content:"";
  position:absolute;
  width:140px;
  height:140px;
  bottom:-48px;
  left:-32px;
  background:linear-gradient(135deg, rgba(252,219,104,.30), rgba(252,219,104,.12));
  clip-path:polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  transform:rotate(-14deg);
}

.welcome-brand{
  position:relative;
  z-index:1;
  text-align:center;
  margin-bottom:12px;
}

.welcome-logo{
  font-size:40px;
  line-height:1;
  font-weight:700;
  color:var(--brand);
  text-transform:lowercase;
}

.welcome-wordmark{
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
  font-weight:400;
}

.welcome-hero{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:24px;
  flex:1;
}

.welcome-illustration-wrap{
  width:100%;
  max-width:none;
  display:block;
  margin:0 auto;
}

.welcome-illustration{
  width:100%;
  height:auto;
  object-fit:contain;
}

.welcome-copy{
  text-align:center;
}

.welcome-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(12,184,182,.10);
  color:var(--brand-dark);
  font-size:13px;
  font-weight:600;
  margin-bottom:14px;
}

.welcome-title{
  margin:0 0 12px;
  font-size:32px;
  line-height:1.1;
  font-weight:700;
  color:var(--ink);
}

.welcome-text{
  margin:0;
  font-size:16px;
  line-height:1.5;
  color:var(--muted);
}

.welcome-actions{
  position:relative;
  z-index:1;
  margin-top:24px;
}

.btn{
  border-radius:16px;
  font-weight:600;
  border:none;
  box-shadow:none !important;
}

.btn-brand{
  background:linear-gradient(135deg, var(--brand), #19c7c4);
  color:#fff;
  padding:14px 18px;
}

.btn-brand:hover,
.btn-brand:focus{
  background:linear-gradient(135deg, var(--brand-dark), var(--brand));
  color:#fff;
}

.btn-ghost{
  background:#fff;
  color:var(--ink);
  border:1px solid rgba(12,184,182,.18);
}

.btn-ghost:hover,
.btn-ghost:focus{
  background:rgba(12,184,182,.08);
  color:var(--brand-dark);
  border-color:rgba(12,184,182,.28);
}

.app-shell{
  min-height:100vh;
  max-width:480px;
  margin:0 auto;
  background:transparent;
  position:relative;
}

.app-topbar{
  position:sticky;
  top:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 18px 14px;
  background:rgba(238,248,249,.88);
  backdrop-filter:blur(14px);
}

.app-topbar__brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.app-topbar__logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(12,184,182,.14), rgba(122,209,226,.18));
  color:var(--brand);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:700;
  text-transform:lowercase;
  flex-shrink:0;
}

.app-topbar__title{
  font-size:18px;
  font-weight:700;
  line-height:1.1;
}

.app-topbar__subtitle{
  font-size:13px;
  color:var(--muted);
  line-height:1.2;
}

.app-main{
  padding:0 18px 24px;
}

.app-main--with-bottomnav{
  padding-bottom:calc(var(--bottom-nav-h) + 20px);
}

.app-panel{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(12,184,182,.10);
  border-radius:24px;
  box-shadow:var(--shadow-sm);
  padding:18px;
}

.app-panel--soft{
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,251,252,.96));
}

.patient-card{
  display:flex;
  align-items:center;
  gap:14px;
}

.patient-card__avatar{
  width:52px;
  height:52px;
  border-radius:18px;
  background:linear-gradient(135deg, var(--brand), #19c7c4);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:18px;
  flex-shrink:0;
}

.patient-card__content{
  min-width:0;
}

.patient-card__name{
  font-size:18px;
  font-weight:700;
  line-height:1.2;
}

.patient-card__meta{
  margin-top:3px;
  font-size:13px;
  color:var(--muted);
}

.app-section{
  margin-top:6px;
}

.section-head{
  margin-bottom:14px;
}

.section-title{
  margin:0 0 4px;
  font-size:24px;
  font-weight:700;
  line-height:1.15;
}

.section-text{
  font-size:14px;
  color:var(--muted);
  line-height:1.4;
}

.services-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.service-tile{
  min-height:154px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(12,184,182,.12);
  border-radius:24px;
  box-shadow:var(--shadow-sm);
  padding:18px 16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.service-tile:active{
  transform:scale(.98);
}

.service-tile:hover{
  border-color:rgba(12,184,182,.22);
  box-shadow:0 16px 30px rgba(32,43,52,.10);
}

.service-tile__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.service-tile__icon{
  width:46px;
  height:46px;
  border-radius:16px;
  background:rgba(12,184,182,.10);
  color:var(--brand);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  flex-shrink:0;
}

.service-tile__status{
  font-size:11px;
  font-weight:600;
  color:var(--muted);
  text-align:right;
}

.service-tile__body{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.service-tile__title{
  margin:0;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  color:var(--ink);
}

.service-tile__text{
  margin:0;
  font-size:13px;
  line-height:1.4;
  color:var(--muted);
}

.service-tile__footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:12px;
  font-weight:600;
  color:var(--brand-dark);
}

.service-tile__arrow{
  font-size:18px;
  line-height:1;
}

.app-bottomnav{
  position:fixed;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:100%;
  max-width:480px;
  height:var(--bottom-nav-h);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(18px);
  border-top:1px solid rgba(12,184,182,.14);
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  padding:8px 10px max(10px, env(safe-area-inset-bottom));
  z-index:120;
}

.app-bottomnav__item{
  background:transparent;
  border:none;
  border-radius:16px;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:12px;
  font-weight:600;
}

.app-bottomnav__item--active{
  color:var(--brand-dark);
  background:rgba(12,184,182,.08);
}

.app-bottomnav__icon{
  font-size:18px;
  line-height:1;
}

.app-bottomnav__label{
  line-height:1;
}

.app-modal{
  border:none;
  border-radius:24px;
  overflow:hidden;
}

.app-modal-icon{
  width:56px;
  height:56px;
  border-radius:18px;
  margin:0 auto 14px;
  background:rgba(255,106,106,.14);
  color:var(--danger);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  font-weight:700;
}

.app-modal-title{
  margin:0 0 10px;
  font-size:22px;
  font-weight:700;
}

.app-modal-text{
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.5;
}

.app-loading{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:180px;
  color:var(--muted);
  font-size:14px;
}

.app-empty{
  background:rgba(255,255,255,.8);
  border:1px dashed rgba(12,184,182,.22);
  border-radius:20px;
  padding:22px 18px;
  text-align:center;
  color:var(--muted);
  font-size:14px;
}

@media (max-width:360px){
  .welcome-title{
    font-size:28px;
  }

  .services-grid{
    gap:12px;
  }

  .service-tile{
    min-height:146px;
    padding:16px 14px;
  }
}

.service-back-btn{
  width:40px;
  height:40px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(12,184,182,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ink);
  font-size:20px;
  flex-shrink:0;
}

.service-hero{
  display:flex;
  align-items:center;
  gap:14px;
}

.service-hero__icon{
  width:56px;
  height:56px;
  border-radius:18px;
  background:rgba(12,184,182,.10);
  color:var(--brand);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  flex-shrink:0;
}

.section-title--sm{
  font-size:20px;
}

.status-box{
  border-radius:18px;
  padding:14px 16px;
  font-size:14px;
  font-weight:600;
}

.status-box--info{
  background:rgba(188,232,240,.28);
  color:var(--ink);
}

.status-box--success{
  background:rgba(12,184,182,.12);
  color:var(--brand-dark);
}

.status-box--warning{
  background:rgba(252,219,104,.22);
  color:#856404;
}

.status-box--danger{
  background:rgba(255,106,106,.14);
  color:#842029;
}

.booking-patient__label{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.booking-patient__name{
  font-size:20px;
  font-weight:700;
  margin-top:4px;
}

.booking-patient__meta{
  margin-top:4px;
  font-size:14px;
  color:var(--muted);
}

.slot-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.slot-card{
  width:100%;
  border:none;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(12,184,182,.12);
  border-radius:22px;
  padding:16px;
  text-align:left;
  box-shadow:var(--shadow-sm);
}

.slot-card.is-active{
  border-color:var(--brand);
  box-shadow:0 0 0 .2rem rgba(12,184,182,.14);
}

.slot-card__day{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.slot-card__time{
  margin-top:6px;
  font-size:20px;
  font-weight:700;
  color:var(--ink);
}

.slot-card__sub{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
}

.selected-slot{
  border:1px solid rgba(12,184,182,.16);
  border-radius:20px;
  padding:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,252,.96));
}

.selected-slot__meta{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.selected-slot__value{
  margin-top:8px;
  font-size:19px;
  font-weight:700;
}

.app-bottomnav__item{
  cursor:pointer;
}

.option-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.option-card{
  width:100%;
  border:none;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(12,184,182,.12);
  border-radius:22px;
  padding:16px;
  text-align:left;
  box-shadow:var(--shadow-sm);
}

.option-card.is-active{
  border-color:var(--brand);
  box-shadow:0 0 0 .2rem rgba(12,184,182,.14);
}

.option-card__title{
  font-size:16px;
  font-weight:700;
  color:var(--ink);
}

.option-card__sub{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
}

.search-field-wrap{
  position:relative;
}

.app-input{
  width:100%;
  border:1px solid rgba(12,184,182,.16);
  border-radius:16px;
  padding:14px 16px;
  font-size:15px;
  color:var(--ink);
  background:#fff;
  outline:none;
  box-shadow:none;
}

.app-input:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 .2rem rgba(12,184,182,.12);
}

.search-results{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:50;
  background:#fff;
  border:1px solid rgba(12,184,182,.14);
  border-radius:18px;
  box-shadow:0 18px 32px rgba(32,43,52,.10);
  overflow:hidden;
}

.search-result-item{
  width:100%;
  border:none;
  background:#fff;
  text-align:left;
  padding:14px 16px;
  border-bottom:1px solid rgba(12,184,182,.08);
}

.search-result-item:last-child{
  border-bottom:none;
}

.search-result-item:hover{
  background:rgba(12,184,182,.06);
}

.search-result-item__title{
  font-size:15px;
  font-weight:700;
  color:var(--ink);
}

.search-result-item__meta{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
}

.rezept-card{
  background:#fff;
  border-radius:20px;
  padding:16px;
  margin-bottom:12px;
  box-shadow:0 10px 20px rgba(0,0,0,.05);
}

.rezept-title{
  font-weight:700;
  font-size:16px;
}

.rezept-meta{
  font-size:13px;
  color:var(--muted);
}

.qr-box{
  text-align:center;
  margin-top:16px;
}

.qr-box img{
  width:180px;
}

.med-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(12,184,182,.12);
  margin-bottom:8px;
}

.med-remove{
  border:none;
  background:none;
  color:#FF6A6A;
  font-weight:700;
}

.eml-card{
  background:#fff;
  border-radius:18px;
  padding:14px;
  margin-bottom:10px;
  border:1px solid rgba(12,184,182,.12);
}

.eml-title{
  font-weight:700;
  font-size:15px;
}

.eml-meta{
  font-size:13px;
  color:var(--muted);
}

.doc-card{
  background:#fff;
  border-radius:18px;
  padding:14px;
  margin-bottom:12px;
  border:1px solid rgba(12,184,182,.12);
}

.doc-title{
  font-weight:700;
}

.doc-content{
  font-size:14px;
  margin-top:8px;
}

.doc-actions{
  margin-top:12px;
}

.scan-card{
  background:#fff;
  border-radius:16px;
  padding:12px;
  margin-bottom:10px;
  border:1px solid rgba(12,184,182,.12);
}

.scan-img{
  width:100%;
  border-radius:12px;
  margin-bottom:8px;
}

/* SPLASH OVERLAY */

.welcome-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
  background:linear-gradient(180deg,#E8FAFA,#FFFFFF);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.welcome-overlay-image{
  width:100%;
  max-width:520px; /* ~75% größer als üblich */
  animation:fadeInScale 0.8s ease;
}

@keyframes fadeInScale{
  from{
    opacity:0;
    transform:scale(0.9);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}