:root{
  --forest:#0B3D2E;
  --turf:#1F6F4A;
  --white:#FFFFFF;
  --ink:#121815;
  --chalk:#F4F6F3;
  --line:#DCE3DD;
  --shadow:0 1px 2px rgba(11,61,46,.06),0 10px 32px rgba(11,61,46,.1);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  background:
    radial-gradient(circle at top left,rgba(31,111,74,.11),transparent 34rem),
    var(--chalk);
  color:var(--ink);
  font-family:'Manrope',sans-serif;
  -webkit-font-smoothing:antialiased;
}
.portal-shell{max-width:980px;margin:0 auto;padding:52px 22px 34px}
.portal-head{text-align:center;max-width:650px;margin:0 auto 34px}
.portal-logo{
  width:116px;
  height:116px;
  object-fit:contain;
  display:block;
  margin:0 auto 20px;
  padding:8px;
  border-radius:50%;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}
.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:var(--turf);font-weight:800;margin-bottom:5px}
h1{font-size:32px;line-height:1.15;margin:0}
.portal-head p{margin:10px 0 0;color:#728077;font-size:14px;line-height:1.6}
.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.tool-card{
  display:flex;
  gap:16px;
  min-width:0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:var(--shadow);
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.tool-card:hover,.tool-card:focus-visible{
  transform:translateY(-3px);
  border-color:rgba(31,111,74,.42);
  box-shadow:0 14px 34px rgba(11,61,46,.14);
  outline:none;
}
.tool-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:var(--forest);
  color:#fff;
  font-size:19px;
  font-weight:800;
}
.tool-content{min-width:0}
.tool-kicker{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--turf);font-weight:800}
h2{font-size:20px;margin:4px 0 7px}
.tool-card p{margin:0;color:#728077;font-size:13px;line-height:1.55}
.tool-link{display:inline-flex;margin-top:16px;color:var(--forest);font-size:13px;font-weight:800}
footer{text-align:center;color:#849087;font-size:11.5px;margin-top:28px;line-height:1.5}
@media(max-width:720px){
  .portal-shell{padding:34px 16px 26px}
  .tool-grid{grid-template-columns:1fr}
  h1{font-size:27px}
}
@media(max-width:420px){
  .tool-card{padding:18px;gap:12px}
  .tool-icon{width:42px;height:42px;flex-basis:42px}
}


/* Light / Dark Mode */
.portal-theme-row{display:flex;justify-content:flex-end;margin-bottom:12px}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink);font:800 12px 'Manrope',sans-serif;cursor:pointer;box-shadow:var(--shadow)}
.theme-toggle:hover{border-color:var(--turf)}
html[data-theme="light"] .theme-for-dark,html[data-theme="dark"] .theme-for-light{display:none!important}
html[data-theme="dark"]{--forest:#0B3D2E;--turf:#52BE83;--white:#17231E;--ink:#ECF4EF;--chalk:#0B1310;--line:#304239;--shadow:0 1px 2px rgba(0,0,0,.25),0 10px 32px rgba(0,0,0,.3)}
html[data-theme="dark"] body{background:radial-gradient(circle at top left,rgba(82,190,131,.09),transparent 34rem),var(--chalk);color:var(--ink)}
html[data-theme="dark"] .tool-card{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .portal-head p,html[data-theme="dark"] .tool-card p,html[data-theme="dark"] footer{color:#A5B5AC}
html[data-theme="dark"] .tool-link{color:#75D29E}
html[data-theme="dark"] .portal-logo{background:#fff}


/* TESIVO Abrechnung – Vorschau ohne Zugriff */
.tool-title-row{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.tool-title-row h2{
  margin-right:auto;
}

.tool-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(196,138,46,.12);
  border:1px solid rgba(196,138,46,.28);
  color:#8A5A13;
  font-size:10px;
  font-weight:800;
  letter-spacing:.3px;
  white-space:nowrap;
}

.tool-card-disabled{
  cursor:not-allowed;
  opacity:.78;
  box-shadow:none;
  background:rgba(255,255,255,.72);
}

.tool-card-disabled:hover,
.tool-card-disabled:focus-visible{
  transform:none;
  border-color:var(--line);
  box-shadow:none;
}

.tool-card-disabled .tool-icon{
  background:#728077;
}

.tool-link-disabled{
  color:#728077;
}

html[data-theme="dark"] .tool-card-disabled{
  background:rgba(23,35,30,.78);
}

html[data-theme="dark"] .tool-status{
  color:#F0C36A;
  background:rgba(196,138,46,.12);
  border-color:rgba(240,195,106,.28);
}

html[data-theme="dark"] .tool-link-disabled{
  color:#A5B5AC;
}


/* ===================== Zentrale Anmeldung ===================== */
button,input{font:inherit}
.portal-loading{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#728077;
  font-size:14px;
}
.portal-spinner{
  width:30px;
  height:30px;
  margin-right:11px;
  border:3px solid var(--line);
  border-top-color:var(--turf);
  border-radius:50%;
  animation:portal-spin .75s linear infinite;
}
@keyframes portal-spin{to{transform:rotate(360deg)}}

.portal-login-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.portal-login-box{
  width:100%;
  max-width:430px;
}
.portal-login-theme{
  display:flex;
  justify-content:flex-end;
  margin-bottom:12px;
}
.portal-login-head{
  text-align:center;
}
.portal-login-head .portal-logo{
  width:112px;
  height:112px;
  margin-bottom:18px;
}
.portal-login-head h1{
  font-size:24px;
}
.portal-login-head p{
  margin:7px 0 24px;
  color:#728077;
  font-size:13.5px;
}
.portal-card{
  padding:20px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--white);
  box-shadow:var(--shadow);
}
.portal-card label{
  display:block;
  margin:14px 0 6px;
  color:#4B5A51;
  font-size:12.5px;
  font-weight:700;
}
.portal-card label:first-child{margin-top:0}
.portal-card input{
  display:block;
  width:100%;
  min-width:0;
  padding:11px 12px;
  border:1.5px solid var(--line);
  border-radius:10px;
  background:var(--white);
  color:var(--ink);
  font-size:14.5px;
}
.portal-card input:focus{
  outline:2px solid var(--turf);
  outline-offset:1px;
}
.portal-login-button{
  width:100%;
  margin-top:18px;
  padding:11px 18px;
  border:0;
  border-radius:10px;
  background:var(--forest);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.portal-login-button:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.portal-auth-error{
  display:none;
  margin-top:12px;
  padding:10px 12px;
  border:1px solid rgba(180,72,58,.25);
  border-radius:10px;
  background:#FBECEA;
  color:#B4483A;
  font-size:13px;
}
.portal-auth-error.show{display:block}
.portal-login-help{
  margin:14px 0 0;
  color:#728077;
  font-size:12px;
  line-height:1.55;
}
.portal-login-help a{
  color:var(--forest);
  font-weight:700;
}
.portal-legal-links{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:14px;
  color:#728077;
  font-size:12px;
}
.portal-legal-links a{
  color:var(--forest);
  font-weight:700;
}

.portal-userbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.portal-userinfo{
  min-width:0;
}
.portal-userinfo strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.portal-userinfo span{
  display:block;
  margin-top:2px;
  color:#728077;
  font-size:11px;
}
.portal-user-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.portal-signout{
  min-height:38px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--white);
  color:var(--ink);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.portal-signout:hover{border-color:var(--turf)}

.tool-card-locked{
  cursor:not-allowed;
  opacity:.64;
  box-shadow:none;
}
.tool-card-locked:hover,
.tool-card-locked:focus-visible{
  transform:none;
  border-color:var(--line);
  box-shadow:none;
}
.tool-card-locked .tool-icon{background:#728077}
.tool-access-note{
  display:inline-flex;
  margin-top:16px;
  color:#728077;
  font-size:12px;
  font-weight:800;
}

/* TESIVO Prävention – Dashboard-Kachel "In Entwicklung" */
.tool-card-soon{
  cursor:not-allowed;
  box-shadow:none;
}
.tool-card-soon:hover,
.tool-card-soon:focus-visible{
  transform:none;
  border-color:var(--line);
  box-shadow:none;
}
.tool-badge-soon{
  display:inline-flex;
  align-items:center;
  margin-top:16px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(196,138,46,.14);
  color:#9B6500;
  font-size:11px;
  font-weight:800;
  letter-spacing:.2px;
}
html[data-theme="dark"] .tool-badge-soon{
  background:rgba(196,138,46,.2);
  color:#E3B563;
}
.portal-toast{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:100;
  max-width:calc(100vw - 32px);
  padding:11px 17px;
  border-radius:10px;
  background:#121815;
  color:#fff;
  text-align:center;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transform:translateX(-50%);
  transition:opacity .2s ease;
}
.portal-toast.show{opacity:1}

html[data-theme="dark"] .portal-login-head p,
html[data-theme="dark"] .portal-login-help,
html[data-theme="dark"] .portal-userinfo span,
html[data-theme="dark"] .tool-access-note{
  color:#A5B5AC;
}
html[data-theme="dark"] .portal-card label{color:#C6D2CB}
html[data-theme="dark"] .portal-auth-error{
  background:rgba(180,72,58,.14);
  color:#F0A89F;
}
html[data-theme="dark"] .portal-login-button{
  background:#1F6F4A;
}
html[data-theme="dark"] .portal-login-help a,
html[data-theme="dark"] .portal-legal-links a{
  color:#75D29E;
}

@media(max-width:620px){
  .portal-userbar{
    align-items:flex-start;
  }
  .portal-user-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .portal-user-actions .theme-toggle,
  .portal-signout{
    justify-content:center;
    min-height:36px;
    padding:7px 10px;
  }
}


/* ===================== Zentrale Profileinstellungen ===================== */
.portal-profile-button{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--white);
  color:var(--forest);
  cursor:pointer;
}
.portal-profile-button:hover,
.portal-profile-button:focus-visible{
  border-color:var(--turf);
  outline:none;
}
.portal-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:120;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:28px 16px;
  overflow-y:auto;
  background:rgba(5,20,14,.58);
}
.portal-profile-modal{
  width:min(620px,100%);
  margin:auto;
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--white);
  box-shadow:0 24px 60px rgba(5,20,14,.22);
}
.portal-profile-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.portal-profile-head h2{
  margin:3px 0 0;
  font-size:22px;
}
.portal-close-button{
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--white);
  color:var(--ink);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.portal-profile-summary{
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 0;
  padding:14px;
  border-radius:14px;
  background:rgba(31,111,74,.06);
  border:1px solid rgba(31,111,74,.14);
}
.portal-profile-avatar{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--forest);
  color:#fff;
}
.portal-profile-summary strong,
.portal-profile-summary span,
.portal-profile-summary small{
  display:block;
}
.portal-profile-summary span{
  margin-top:2px;
  color:#728077;
  font-size:12px;
}
.portal-profile-summary small{
  margin-top:5px;
  color:var(--turf);
  font-weight:800;
}
.portal-settings-section{
  margin-top:12px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
}
.portal-settings-title{
  font-size:13px;
  font-weight:800;
}
.portal-settings-section p{
  margin:5px 0 12px;
  color:#728077;
  font-size:12px;
  line-height:1.5;
}
.portal-settings-section label{
  display:block;
  margin:12px 0 6px;
  font-size:12px;
  font-weight:800;
}
.portal-settings-section input{
  width:100%;
  min-width:0;
  padding:11px 12px;
  border:1.5px solid var(--line);
  border-radius:10px;
  background:var(--white);
  color:var(--ink);
  font:inherit;
}
.portal-settings-section input:focus{
  outline:2px solid var(--turf);
  outline-offset:1px;
}
.portal-password-button{
  margin-top:14px;
}
.portal-password-message{
  display:none;
  margin-top:10px;
  padding:9px 11px;
  border-radius:10px;
  font-size:12px;
}
.portal-password-message.show{display:block}
.portal-password-message.error{
  background:#FBECEA;
  color:#B4483A;
}
.portal-password-message.ok{
  background:#E8F3EC;
  color:var(--turf);
}
.portal-session-section{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.portal-session-section p{margin-bottom:0}
html[data-theme="dark"] .portal-profile-summary{
  background:rgba(82,190,131,.08);
  border-color:rgba(82,190,131,.18);
}
html[data-theme="dark"] .portal-profile-summary span,
html[data-theme="dark"] .portal-settings-section p{
  color:#A5B5AC;
}
html[data-theme="dark"] .portal-password-message.error{
  background:rgba(180,72,58,.14);
  color:#F0A89F;
}
html[data-theme="dark"] .portal-password-message.ok{
  background:rgba(82,190,131,.12);
  color:#75D29E;
}
@media(max-width:620px){
  .portal-user-actions{flex-direction:row}
  .portal-session-section{align-items:flex-start;flex-direction:column}
  .portal-session-section .portal-signout{width:100%}
}

.portal-useridentity{min-width:0;display:flex;align-items:center;gap:10px}
.portal-tool-section{margin-top:28px}.portal-tool-section+.portal-tool-section{margin-top:34px}
.portal-tool-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.portal-tool-section-head h2{margin:3px 0;font-size:19px}.portal-tool-section-head p{margin:0;color:#728077;font-size:12px;line-height:1.5}
.portal-tool-count{flex:0 0 auto;min-width:34px;height:30px;display:inline-flex;align-items:center;justify-content:center;padding:0 9px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--forest);font-size:11px;font-weight:800}
.portal-tool-section-locked{padding-top:24px;border-top:1px solid var(--line)}
.portal-help-email{display:inline-flex;padding:10px 12px;border:1px solid rgba(31,111,74,.22);border-radius:10px;background:rgba(31,111,74,.07);color:var(--forest);font-size:13px;font-weight:800;text-decoration:none;overflow-wrap:anywhere}
.portal-help-modal{width:min(520px,100%)}
html[data-theme="dark"] .portal-tool-section-head p{color:#A5B5AC}
html[data-theme="dark"] .portal-help-email{background:rgba(82,190,131,.10);border-color:rgba(82,190,131,.20);color:#75D29E}


/* Hilfe-Center: E-Mail + WhatsApp */
.portal-help-options{display:grid;gap:9px;margin-top:10px}
.portal-help-contact{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid rgba(31,111,74,.22);border-radius:11px;background:rgba(31,111,74,.06);color:var(--forest);text-decoration:none;transition:border-color .15s,transform .15s,background .15s}
.portal-help-contact:hover{border-color:var(--turf);background:rgba(31,111,74,.10);transform:translateY(-1px)}
.portal-help-contact-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:50%;background:var(--forest);color:#fff;font-size:16px;font-weight:800}
.portal-help-contact span:last-child{min-width:0;display:grid;gap:2px}
.portal-help-contact b{font-size:13px}
.portal-help-contact small{color:#728077;font-size:11px;overflow-wrap:anywhere}
html[data-theme="dark"] .portal-help-contact{background:rgba(82,190,131,.08);border-color:rgba(82,190,131,.20);color:#75D29E}
html[data-theme="dark"] .portal-help-contact small{color:#A5B5AC}

/* ============================================================
   TESIVO STARTSEITE – SPLIT HERO
   ============================================================ */
.portal-home-v3{width:100%;max-width:none;min-height:100vh;margin:0;padding:0 0 38px;background:var(--white)}
.portal-v3-nav{width:100%;background:var(--white);border-bottom:1px solid var(--line);padding-top:env(safe-area-inset-top)}
.portal-v3-nav-inner{width:min(1240px,100%);min-height:76px;margin:0 auto;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.portal-v3-brand{min-width:0;display:flex;align-items:center;gap:11px}
.portal-v3-brand img{width:48px;height:48px;flex:0 0 48px;object-fit:contain;padding:4px;border-radius:50%;background:#fff;border:1px solid var(--line);box-shadow:0 3px 12px rgba(11,61,46,.08)}
.portal-v3-brand strong,.portal-v3-brand span{display:block}
.portal-v3-brand strong{color:var(--ink);font-size:14px;line-height:1.2}
.portal-v3-brand span{margin-top:3px;color:#728077;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.7px}

.portal-v3-profile{min-width:0;display:flex;align-items:center;gap:10px;padding:5px 6px 5px 12px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink);cursor:pointer}
.portal-v3-profile:hover,.portal-v3-profile:focus-visible{border-color:var(--turf);outline:none}
.portal-v3-profile-copy{min-width:0;text-align:right}
.portal-v3-profile-copy small,.portal-v3-profile-copy strong{display:block;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.portal-v3-profile-copy small{color:#728077;font-size:9px}
.portal-v3-profile-copy strong{margin-top:1px;font-size:10.5px}
.portal-v3-profile-icon{width:34px;height:34px;flex:0 0 34px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--forest);color:#fff}
.portal-v3-profile-icon svg{width:17px;height:17px}

.portal-v3-actions{display:flex;align-items:center;gap:8px}
.portal-v3-logout{width:42px;height:42px;flex:0 0 42px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:50%;background:var(--white);color:var(--forest);cursor:pointer}
.portal-v3-logout:hover,.portal-v3-logout:focus-visible{border-color:var(--turf);outline:none}

.portal-v3-hero-wrap{width:min(1240px,100%);margin:0 auto;padding:24px 24px 30px}
.portal-v3-hero{min-height:390px;display:grid;grid-template-columns:.88fr 1.12fr;overflow:hidden;border-radius:28px;background:var(--forest);box-shadow:0 18px 52px rgba(11,61,46,.15)}
.portal-v3-hero-copy{padding:46px 42px;display:flex;flex-direction:column;justify-content:center;color:#fff}
.portal-v3-kicker{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:1.5px;opacity:.72}
.portal-v3-hero h1{margin:10px 0 14px;color:#fff;font-size:48px;line-height:1.02;letter-spacing:-1.5px}
.portal-v3-hero p{max-width:420px;margin:0;color:rgba(255,255,255,.86);font-size:14px;line-height:1.6}
.portal-v3-hero-image{min-width:0;min-height:100%;position:relative;background:linear-gradient(135deg,#10233E 0%,#2467D1 100%)}

.portal-v3-content{width:min(1240px,100%);margin:0 auto;padding:0 24px 28px}
.portal-home-v3 .portal-tool-section{margin-top:4px}
.portal-home-v3 .portal-tool-section+.portal-tool-section{margin-top:38px}
.portal-home-v3 .portal-tool-section-head{margin-bottom:14px}
.portal-home-v3 .portal-tool-section-head h2{margin:3px 0 4px;font-size:26px;letter-spacing:-.4px}
.portal-home-v3 .portal-tool-section-head p{font-size:11.5px}
.portal-home-v3 .portal-tool-count{min-width:34px;height:30px;background:var(--white)}
.portal-home-v3 .tool-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}

.portal-home-v3 .portal-v3-tool-card{min-height:180px;position:relative;display:block;padding:17px;border-radius:16px;box-shadow:none}
.portal-home-v3 a.portal-v3-tool-card:hover,.portal-home-v3 a.portal-v3-tool-card:focus-visible{transform:translateY(-2px);box-shadow:0 12px 28px rgba(11,61,46,.09)}
.portal-home-v3 .portal-v3-tool-icon{width:44px;height:44px;margin-bottom:17px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:rgba(31,111,74,.10);color:var(--turf)}
.portal-home-v3 .portal-v3-tool-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.portal-home-v3 .tool-kicker{font-size:9px}
.portal-home-v3 .tool-card h2{margin:5px 0 7px;font-size:15px;line-height:1.25}
.portal-home-v3 .tool-card p{font-size:10.5px;line-height:1.5}
.portal-home-v3 .tool-link,.portal-home-v3 .tool-access-note{margin-top:14px;font-size:10.5px}
.portal-home-v3 .tool-card-locked{opacity:.58;background:rgba(255,255,255,.76)}
.portal-home-v3 .tool-card-locked .portal-v3-tool-icon{background:rgba(114,128,119,.10);color:#728077}
.portal-home-v3 .tool-card-soon{opacity:.8;background:rgba(255,255,255,.86)}
.portal-home-v3 .tool-badge-soon{margin-top:13px;font-size:10px}
.portal-home-v3 .portal-tool-section-locked{padding-top:30px}
.portal-v3-footer{width:min(1240px,calc(100% - 48px));margin:0 auto;padding-top:4px;color:#849087;text-align:center;font-size:11px}

html[data-theme="dark"] .portal-home-v3,html[data-theme="dark"] .portal-v3-nav{background:var(--white)}
html[data-theme="dark"] .portal-v3-brand span,html[data-theme="dark"] .portal-v3-profile-copy small,html[data-theme="dark"] .portal-home-v3 .portal-tool-section-head p{color:#A5B5AC}
html[data-theme="dark"] .portal-v3-profile-icon{background:#1F6F4A}
html[data-theme="dark"] .portal-v3-hero{background:#102D22}
html[data-theme="dark"] .portal-home-v3 .portal-v3-tool-icon{background:rgba(82,190,131,.11);color:#75D29E}
html[data-theme="dark"] .portal-home-v3 .tool-card-locked{background:rgba(23,35,30,.72)}
html[data-theme="dark"] .portal-home-v3 .tool-card-soon{background:rgba(23,35,30,.8)}

@media(max-width:1000px){
  .portal-home-v3 .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-v3-hero{grid-template-columns:1fr}
  .portal-v3-hero-copy{min-height:250px;padding:36px 30px}
  .portal-v3-hero-image{min-height:270px}
}
@media(max-width:620px){
  .portal-v3-nav-inner{min-height:68px;padding:8px 14px}
  .portal-v3-brand img{width:44px;height:44px;flex-basis:44px}
  .portal-v3-brand span{display:none}
  .portal-v3-profile{padding-left:5px}
  .portal-v3-profile-copy{display:none}
  .portal-v3-hero-wrap{padding:12px 14px 23px}
  .portal-v3-hero{min-height:0;border-radius:20px}
  .portal-v3-hero-copy{min-height:220px;padding:29px 22px}
  .portal-v3-hero h1{font-size:36px;letter-spacing:-1px}
  .portal-v3-hero-image{min-height:210px;background-position:center}
  .portal-v3-content{padding:0 14px 90px}
  .portal-home-v3 .portal-tool-section-head{align-items:flex-start}
  .portal-home-v3 .portal-tool-section-head h2{font-size:22px}
  .portal-home-v3 .tool-grid{grid-template-columns:1fr}
  .portal-home-v3 .portal-v3-tool-card{min-height:0;display:grid;grid-template-columns:44px 1fr;gap:0 13px;align-items:start;padding:15px}
  .portal-home-v3 .portal-v3-tool-icon{grid-row:1 / span 4;margin-bottom:0}
  .portal-home-v3 .tool-content{grid-column:2}
  .portal-home-v3 .tool-link,.portal-home-v3 .tool-access-note{margin-top:10px}
  .portal-v3-footer{width:calc(100% - 28px)}
}


/* ============================================================
   TESIVO ZENTRALE ANMELDUNG – SPLIT HERO
   ============================================================ */

.portal-login-v4{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(430px,.95fr);
  background:var(--white);
}

.portal-login-v4-hero{
  min-height:100vh;
  position:relative;
  overflow:hidden;
  background:var(--forest);
}

.portal-login-v4-photo,
.portal-login-v4-overlay{
  position:absolute;
  inset:0;
}

.portal-login-v4-photo{
  background:url("assets/tesivo-vereinsportal-hero.webp") center/cover no-repeat;
  transform:scale(1.01);
}

.portal-login-v4-overlay{
  background:
    linear-gradient(180deg,rgba(5,28,20,.18),rgba(5,28,20,.70)),
    linear-gradient(90deg,rgba(5,28,20,.45),rgba(5,28,20,.08));
}

.portal-login-v4-hero-content{
  position:absolute;
  left:clamp(28px,5vw,76px);
  right:clamp(28px,5vw,76px);
  bottom:clamp(34px,7vh,82px);
  z-index:2;
  max-width:650px;
  color:#fff;
}

.portal-login-v4-badge{
  display:inline-flex;
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(255,255,255,.10);
  font-size:9px;
  font-weight:900;
  letter-spacing:1.4px;
}

.portal-login-v4-hero h1{
  margin:14px 0 14px;
  color:#fff;
  font-size:clamp(40px,5vw,66px);
  line-height:.98;
  letter-spacing:-2px;
}

.portal-login-v4-hero p{
  max-width:580px;
  margin:0;
  color:rgba(255,255,255,.88);
  font-size:14px;
  line-height:1.65;
}

.portal-login-v4-trust{
  display:flex;
  flex-wrap:wrap;
  gap:9px 18px;
  margin-top:24px;
}

.portal-login-v4-trust span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:rgba(255,255,255,.84);
  font-size:10.5px;
  font-weight:800;
}

.portal-login-icon{
  display:block;
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.portal-login-v4-panel{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:34px clamp(22px,4vw,62px);
  background:var(--white);
}

.portal-login-v4-panel-inner{
  width:min(490px,100%);
}

.portal-login-v4-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:52px;
}

.portal-login-v4-brand{
  display:flex;
  align-items:center;
  gap:11px;
}

.portal-login-v4-brand img{
  width:50px;
  height:50px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:50%;
  background:#fff;
}

.portal-login-v4-brand strong,
.portal-login-v4-brand span{
  display:block;
}

.portal-login-v4-brand strong{
  font-size:14px;
}

.portal-login-v4-brand span{
  margin-top:3px;
  color:#728077;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.7px;
}

.portal-login-v4-theme{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--white);
  color:var(--ink);
  cursor:pointer;
}

.portal-login-v4-copy h2{
  margin:4px 0 7px;
  font-size:32px;
  letter-spacing:-.7px;
}

.portal-login-v4-copy p{
  margin:0 0 20px;
  color:#728077;
  font-size:12.5px;
  line-height:1.55;
}

.portal-login-v4-card{
  padding:22px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--white);
  box-shadow:0 16px 45px rgba(11,61,46,.09);
}

.portal-login-v4-card label{
  display:block;
  margin:14px 0 6px;
  color:#4B5A51;
  font-size:11.5px;
  font-weight:800;
}

.portal-login-v4-card label:first-child{
  margin-top:0;
}

.portal-login-v4-card input{
  width:100%;
  min-height:45px;
  padding:11px 12px;
  border:1.5px solid var(--line);
  border-radius:11px;
  background:var(--white);
  color:var(--ink);
  font-size:14px;
}

.portal-login-v4-card input:focus{
  border-color:var(--turf);
  outline:0;
  box-shadow:0 0 0 3px rgba(31,111,74,.10);
}

.portal-login-v4-label-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
}

.portal-login-v4-label-row label{
  margin:0 0 6px;
}

.portal-login-v4-text-button{
  margin:0 0 6px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--turf);
  font-size:10.5px;
  font-weight:800;
  cursor:pointer;
}

.portal-password-field{
  position:relative;
}

.portal-password-field input{
  padding-right:48px;
}

.portal-password-toggle{
  position:absolute;
  top:50%;
  right:6px;
  width:36px;
  height:36px;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#728077;
  cursor:pointer;
}

.portal-password-toggle:hover{
  background:rgba(31,111,74,.07);
  color:var(--forest);
}

.portal-login-v4-submit{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
}

.portal-login-v4-submit .portal-login-icon{
  width:16px;
  height:16px;
}

.portal-login-v4-divider{
  height:1px;
  margin:20px 0;
  background:var(--line);
}

.portal-recovery[hidden]{
  display:none!important;
}

.portal-recovery-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.portal-recovery-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(31,111,74,.09);
  color:var(--turf);
}

.portal-recovery-head strong{
  display:block;
  font-size:12px;
}

.portal-recovery-head p{
  margin:3px 0 0;
  color:#728077;
  font-size:10.5px;
  line-height:1.45;
}

.portal-login-v4-secondary{
  width:100%;
  min-height:42px;
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--white);
  color:var(--forest);
  font-weight:800;
  cursor:pointer;
}

.portal-recovery-message{
  display:none;
  margin-top:10px;
  padding:9px 10px;
  border-radius:9px;
  font-size:11px;
  line-height:1.45;
}

.portal-recovery-message.ok{
  display:block;
  background:#E8F3EC;
  color:#1F6F4A;
}

.portal-recovery-message.error{
  display:block;
  background:#FBECEA;
  color:#B4483A;
}

.portal-login-v4-access{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:11px;
  margin-top:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(31,111,74,.035);
}

.portal-login-v4-access-icon{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:var(--forest);
  color:#fff;
}

.portal-login-v4-access-copy strong{
  display:block;
  font-size:12px;
}

.portal-login-v4-access-copy p{
  margin:3px 0 10px;
  color:#728077;
  font-size:10.5px;
  line-height:1.5;
}

.portal-login-v4-contact-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.portal-login-v4-contact-actions a{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:34px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--white);
  color:var(--forest);
  text-decoration:none;
  font-size:10px;
  font-weight:800;
}

.portal-login-v4-contact-actions .portal-login-icon{
  width:14px;
  height:14px;
}

.portal-login-v4-note{
  margin-top:14px;
  color:#849087;
  text-align:center;
  font-size:9.5px;
  line-height:1.45;
}

.portal-v3-footer{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px 12px;
}

.portal-v3-footer-links{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.portal-v3-footer-links a{
  color:var(--forest);
  font-weight:700;
  text-decoration:none;
}

/* Dark Mode */
html[data-theme="dark"] .portal-login-v4-panel,
html[data-theme="dark"] .portal-login-v4-card,
html[data-theme="dark"] .portal-login-v4-theme,
html[data-theme="dark"] .portal-login-v4-secondary,
html[data-theme="dark"] .portal-login-v4-contact-actions a{
  background:var(--white);
}

html[data-theme="dark"] .portal-login-v4-brand span,
html[data-theme="dark"] .portal-login-v4-copy p,
html[data-theme="dark"] .portal-recovery-head p,
html[data-theme="dark"] .portal-login-v4-access-copy p{
  color:#A5B5AC;
}

html[data-theme="dark"] .portal-login-v4-card label{
  color:#C6D2CB;
}

/* Tablet / Smartphone */
@media(max-width:900px){
  .portal-login-v4{
    grid-template-columns:1fr;
  }

  .portal-login-v4-hero{
    min-height:320px;
  }

  .portal-login-v4-panel{
    min-height:auto;
    padding:24px 18px 44px;
  }

  .portal-login-v4-top{
    margin-bottom:28px;
  }
}

@media(max-width:600px){
  .portal-login-v4-hero{
    min-height:265px;
  }

  .portal-login-v4-hero-content{
    left:20px;
    right:20px;
    bottom:24px;
  }

  .portal-login-v4-hero h1{
    font-size:34px;
    letter-spacing:-1px;
  }

  .portal-login-v4-hero p{
    font-size:11.5px;
  }

  .portal-login-v4-trust{
    margin-top:15px;
  }

  .portal-login-v4-panel{
    padding:18px 14px 34px;
  }

  .portal-login-v4-brand img{
    width:44px;
    height:44px;
  }

  .portal-login-v4-brand span{
    display:none;
  }

  .portal-login-v4-copy h2{
    font-size:27px;
  }

  .portal-login-v4-card{
    padding:17px;
  }

  .portal-login-v4-contact-actions a{
    flex:1 1 135px;
    justify-content:center;
  }
}
