/* VL3 Frontend – responsives Grundgerüst (ohne JavaScript)
   Umbruchpunkte: <= 1200px (schmalere Seitenleiste), <= 900px (Tablet/Handy: Leiste oben + Navigation unten) */
*,*::before,*::after{box-sizing:border-box}
:root{--green:#38BC7D;--green-dk:#1E9A62;--tint:#E7F6EE;--bg:#F5F6F7;--ink:#16181D;--muted:#6B7280;--line:#E3E5E9;
  --red:#E5484D;--red-tint:#FDECEC;--gray-tile:#EEF0F2;--gray-ic:#8D9096;--ph:#767C86}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#fff;font-family:Inter,system-ui,sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased}
h1,h2,h3,p{margin:0}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{cursor:pointer}
svg{flex:none}
.logo{display:block;width:100%;height:auto;fill:#000;filter:drop-shadow(0 4px 6px rgba(0,0,0,.28)) drop-shadow(0 1px 1.5px rgba(0,0,0,.18))}
/* Logo-Schimmer: ein heller Lichtstreifen läuft langsam (2 s) über das Logo, dann 0,6 s Pause.
   Das ::after liegt genau über dem Logo und ist mit der Logo-Form maskiert, glänzt also nur auf den Buchstaben. */
a:has(> .logo){position:relative;display:block;--shine:rgba(255,255,255,.6)}
a:has(> .logo)::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(110deg,transparent 35%,var(--shine) 50%,transparent 65%) no-repeat;background-size:250% 100%;background-position:150% 0;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 684 223'%3E%3Cpath d='M0 42L71.5 42L188 169.5L250.2 42L303.5 42L218.8 222.8L164 222.8Z'/%3E%3Cpath d='M252 222.8L683.8 222.8L582.8 111.4L683.8 0L444 0L417.2 57.8L558 58.2L510 111.2L558 164.8L334.2 164.8L410.8 0L357 0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 684 223'%3E%3Cpath d='M0 42L71.5 42L188 169.5L250.2 42L303.5 42L218.8 222.8L164 222.8Z'/%3E%3Cpath d='M252 222.8L683.8 222.8L582.8 111.4L683.8 0L444 0L417.2 57.8L558 58.2L510 111.2L558 164.8L334.2 164.8L410.8 0L357 0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  animation:logo-shine 2.6s ease-in-out .5s infinite}
@keyframes logo-shine{0%{background-position:150% 0}77%,100%{background-position:-50% 0}}
@media (prefers-reduced-motion:reduce){a:has(> .logo)::after{animation:none}}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:0 24px;border-radius:12px;border:1px solid transparent;font-weight:600;font-size:16px;white-space:nowrap}
.btn-lg{min-height:60px;border-radius:14px;font-size:18px}
.btn-green{background:var(--green);color:#fff}
.btn-out{background:#fff;border-color:#DEDEE3;color:#121417}
.btn-red{background:var(--red-tint);color:var(--red)}
.pill{min-height:35px;padding:0 20px;border-radius:18px;font-size:14px}

/* ---------- Formularfelder ---------- */
.field label,.label{display:block;font-size:14px;font-weight:500;line-height:20px;margin-bottom:8px}
.input{display:block;width:100%;height:60px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:0 24px;font-size:17px;color:var(--ink)}
.input::placeholder{color:var(--ph);opacity:1}

/* ---------- Anmeldeseiten ---------- */
.auth{display:grid;grid-template-columns:minmax(0,1004fr) minmax(0,916fr);min-height:100vh;min-height:100dvh}
.auth-left{display:flex;align-items:center;justify-content:center;padding:48px;background:linear-gradient(135deg,#48C187 0%,#DEEDE5 100%)}
.auth-left a{display:block;width:min(684px,68%)}
.auth-right{display:flex;flex-direction:column;align-items:center;padding:48px clamp(24px,6.9vw,133px);background:#F7F7F7}
.auth-form{width:100%;max-width:650px;margin:auto 0}
.auth-form h1{font-size:clamp(32px,2.5vw,48px);line-height:1.33;font-weight:700;letter-spacing:-.5px}
.auth-form .field{margin-top:clamp(20px,3vh,32px)}
.auth-form .field label{font-size:16px;line-height:21px;margin-bottom:12px}
.auth-form .input{height:clamp(54px,6.3vh,68px)}
.auth-form .btn{width:100%;min-height:clamp(54px,6.3vh,68px);border-radius:14px;font-size:20px;margin-top:clamp(20px,3vh,32px)}
.auth-link{display:block;margin-top:clamp(20px,3vh,32px);text-align:right;font-size:16px;line-height:21px;font-weight:500;color:var(--green-dk)}
.auth-link + .btn{margin-top:22px}
.auth-foot{margin-top:32px;text-align:center;font-size:16px;line-height:22px;color:var(--muted)}
.auth-foot a{color:var(--green-dk);font-weight:600;margin-left:4px;white-space:nowrap}

/* ---------- App-Rahmen ---------- */
.app{display:grid;grid-template-columns:270px minmax(0,1fr);grid-template-rows:55px minmax(0,1fr);min-height:100vh;min-height:100dvh;background:#fff}
.sb{grid-row:1 / 3;position:sticky;top:0;display:flex;flex-direction:column;height:100vh;height:100dvh;padding:20px 23px 14px;overflow-y:auto}
.sb-logo{display:block;width:137px;margin-left:7px}
.sb-mid{margin-block:auto;padding-top:clamp(0px,8vh,90px)}
.sb-net span{display:block;font-size:13px;line-height:16px;color:var(--muted)}
.sb-net button{display:flex;align-items:center;gap:8px;margin-top:6px;padding:0;border:0;background:none;font-size:22px;line-height:28px;font-weight:700;color:var(--ink)}
.sb-nav{display:flex;flex-direction:column;gap:clamp(10px,3.7vh,40px);margin-top:clamp(20px,4vh,41px)}
.sb-nav a{position:relative;display:flex;align-items:center;gap:16px;height:45px;padding-left:18px;border-radius:12px;font-size:17px;font-weight:500;color:var(--muted)}
.sb-nav a.on{background:var(--tint);color:var(--ink);font-weight:600}
.sb-nav a.on svg{color:var(--green)}
.sb-nav a.on::after{content:"";position:absolute;right:0;top:0;bottom:0;width:6px;background:var(--green);border-radius:0 6px 6px 0}
.sb-user{display:flex;align-items:center;gap:10px;margin:16px -9px 0;padding:8px 9px;border-radius:16px;min-width:0}
.sb-user.on{background:var(--tint)}
.sb-user > span:last-child{min-width:0}
.avatar{flex:none;display:flex;align-items:center;justify-content:center;width:60px;height:60px;border-radius:50%;background:var(--tint);color:var(--green-dk);font-weight:600;font-size:22px}
.sb-user b{display:block;font-size:16px;line-height:20px;font-weight:600}
.sb-user small{display:block;font-size:13px;line-height:18px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.sb-out{display:flex;align-items:center;gap:8px;margin-top:2px;font-size:15px;line-height:20px}
.tb{grid-column:2;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600}
.content{grid-column:2;display:flex;flex-direction:column;min-width:0;padding:38px clamp(16px,2.6vw,43px) 28px;background:var(--bg);border-top-left-radius:28px}
.card{background:#fff;border:1px solid #E9EAEE;border-radius:28px}
.page-head h1{font-size:clamp(28px,2.1vw,40px);line-height:1.2;font-weight:700}
.page-head p{margin-top:6px;font-size:clamp(15px,1vw,18px);line-height:22px;color:var(--muted)}
.actions{display:flex;flex-wrap:wrap;gap:16px 30px}

/* ---------- Overview ---------- */
.ov{padding:clamp(0px,2.9vw,55px) clamp(0px,3vw,58px) 0}
.sec{display:flex;align-items:center;gap:12px;min-height:31px}
.sec i{width:12px;height:12px;border-radius:50%;background:var(--green)}
.sec h2{font-size:26px;line-height:31px;font-weight:700}
.sec em{font-style:normal;margin-left:7px;height:25px;padding:0 12px;border-radius:8px;display:inline-flex;align-items:center;font-size:13px;font-weight:500;background:var(--tint);color:var(--green-dk)}
.sec.off i{background:#9EA1A8}
.sec.off em{background:var(--gray-tile);color:#5B616B}
.grid + .sec{margin-top:clamp(36px,3.5vw,68px)}
.sec + .sec{margin-top:38px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:clamp(20px,2.2vw,41px) clamp(16px,2.5vw,48px);margin-top:32px}
.peer{display:flex;flex-direction:column;padding:16px 24px 18px;background:#fff;border:1px solid #DEDEE3;border-radius:20px;box-shadow:0 4px 14px rgba(20,24,30,.06);min-width:0}
.peer .tile{align-self:center;display:flex;align-items:center;justify-content:center;width:120px;height:120px;border-radius:30px;background:var(--tint);color:var(--green)}
.peer.off .tile{background:var(--gray-tile);color:var(--gray-ic)}
.peer h3{margin-top:22px;font-size:18px;line-height:24px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peer .ip{display:flex;align-items:center;gap:8px;margin-top:18px;font-size:15px;line-height:20px;color:var(--muted)}
.peer .ip i{width:9px;height:9px;border-radius:50%;background:var(--green)}
.peer.off .ip i{background:#9EA1A8}
.peer .row{display:flex;gap:10px;margin-top:23px}
.peer .btn{min-height:39px;padding:0 10px;border-radius:10px;font-size:15px}
.peer .btn-out{flex:12 1 0}
.peer .btn-red{flex:7 1 0}

/* ---------- Add peer ---------- */
.narrow{width:100%;max-width:1083px;margin-inline:auto;padding-top:clamp(0px,3vw,57px)}
.add-card{display:flex;flex-wrap:wrap;align-items:center;gap:32px clamp(24px,4.8vw,93px);margin-top:clamp(28px,3.5vw,67px);padding:clamp(20px,2vw,37px) clamp(20px,1.8vw,33px) clamp(24px,2.7vw,52px)}
.device-tile{flex:none;display:flex;align-items:center;justify-content:center;width:clamp(180px,24vw,350px);aspect-ratio:1;border-radius:28px;background:var(--tint);color:var(--green)}
.device-tile svg{width:65%;height:auto}
.add-form{flex:1 1 280px;min-width:0}
.add-form .input{max-width:300px;height:58px;font-size:16px;padding:0 18px}
.add-form .nr-field{margin-top:20px}
.nr-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.add-form .nr-input{width:110px;max-width:110px;font-variant-numeric:tabular-nums;-moz-appearance:textfield}
.nr-input::-webkit-inner-spin-button,.nr-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.nr-ip{display:inline-flex;align-items:center;gap:8px;height:40px;margin:0;padding:0 14px;border-radius:999px;background:var(--tint);font-size:15px;font-variant-numeric:tabular-nums}
.nr-ip span{font-size:12px;font-weight:600;letter-spacing:.06em;color:var(--green)}
.nr-ip b{font-weight:600;color:var(--ink)}
.kind{margin-top:42px;font-size:14px;line-height:17px}
.access{display:flex;flex-wrap:wrap;align-items:center;gap:12px clamp(24px,7vw,134px);margin-top:20px;font-size:16px;font-weight:500}
.access > div{display:flex;gap:10px}
.end{justify-content:flex-end;margin-top:auto;padding-top:32px}

/* ---------- Network ---------- */
.select{display:flex;align-items:center;justify-content:space-between;width:min(300px,100%);height:60px;padding:0 22px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:18px;font-weight:500;color:var(--ink)}
.net-select{margin-top:clamp(32px,3.3vw,63px)}
.table-card{width:100%;max-width:1350px;margin:24px auto 0;overflow-x:auto}
.nt{width:100%;min-width:500px;border-collapse:collapse;table-layout:fixed}
.nt th{height:93px;padding:0 30px;text-align:left;font-size:14px;font-weight:500;color:var(--muted)}
.nt td{height:79.4px;padding:0 30px;border-top:1px solid #F1F1F4;font-size:16px;color:#3B3F46}
.nt td b{display:block;font-size:16px;line-height:21px;font-weight:600;color:var(--ink)}
.nt td small{display:block;margin-top:2px;font-size:13px;line-height:16px;color:var(--muted)}
.st{display:inline-flex;align-items:center;gap:8px;height:29px;padding:0 14px;border-radius:15px;font-size:13px;font-weight:500}
.st i{width:8px;height:8px;border-radius:50%}
.st.on{background:var(--tint);color:var(--green-dk)}.st.on i{background:var(--green)}
.st.off{background:var(--gray-tile);color:#5B616B}.st.off i{background:#9EA1A8}
.sub-head{margin-top:clamp(32px,3.1vw,60px)}
.sub-head h2{font-size:22px;line-height:27px;font-weight:700}
.sub-head p{margin-top:6px;font-size:14px;line-height:17px;color:var(--muted)}
.net-actions{margin-top:42px;gap:16px 50px}
.net-actions .btn-green{width:250px}.net-actions .btn-red{width:300px}

/* ---------- Settings ---------- */
.inset{padding-left:clamp(0px,.3vw,5px)}
.profile-card{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:28px clamp(28px,3.9vw,75px);max-width:1250px;margin-top:clamp(20px,3vh,48px);padding:clamp(16px,2.2vh,32px) clamp(20px,2.6vw,50px)}
.big-avatar{position:relative;flex:none;display:flex;align-items:center;justify-content:center;width:clamp(120px,min(20.8vw,30vh),400px);aspect-ratio:1;border-radius:50%;background:var(--tint);color:var(--green-dk);font-size:clamp(44px,min(7.8vw,11vh),150px);font-weight:700;letter-spacing:-2px}
.big-avatar button{position:absolute;right:7.8%;bottom:7.8%;display:flex;align-items:center;justify-content:center;width:clamp(40px,14%,56px);aspect-ratio:1;border:0;border-radius:50%;background:var(--green);color:#fff}
.profile-fields{flex:1 1 280px;max-width:600px;min-width:0;display:grid;gap:clamp(12px,2vh,20px)}
.rule{height:1px;margin-top:clamp(20px,3.5vh,50px);background:var(--line)}
.sec-head{margin-top:clamp(16px,2.5vh,35px)}
.sec-head + .between{margin-top:clamp(20px,3vh,48px)}
/* Settings: Security-Bereich und Buttons unten an den Seitenrand schieben */
@media (min-width:901px){
  .inset:has(.profile-card){flex:1;display:flex;flex-direction:column}
  .inset:has(.profile-card) .rule{margin-top:auto}
  .inset:has(.profile-card) .profile-card{margin-bottom:clamp(20px,3.5vh,50px)}
  .inset:has(.profile-card) .between{margin-bottom:30px}
}
/* Profil soll auf niedrigen Laptop-Bildschirmen ohne Scrollen passen */
@media (min-width:901px) and (max-height:760px){
  .content:has(.profile-card){padding-top:24px;padding-bottom:20px}
  .profile-card .input{height:48px}
  .profile-card .field label{margin-bottom:6px}
  .sec-head + .between .btn-lg{min-height:50px}
}
.sec-head h2{font-size:28px;line-height:34px;font-weight:700}
.sec-head p{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:15px;line-height:19px;color:var(--muted)}
.sec-head i{flex:none;width:10px;height:10px;border-radius:50%;background:var(--green)}
.between{justify-content:space-between;margin-top:clamp(32px,3.9vw,74px)}
.between .btn-out{width:350px}.between .btn-green{width:200px}

/* ---------- 404 ---------- */
.nf{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;margin:-17px clamp(-11px,-.6vw,0px) -8px;padding:40px 24px;text-align:center}
.nf .code{font-size:clamp(84px,6.3vw,120px);line-height:1;font-weight:700;color:var(--green);letter-spacing:-2px}
.nf h1{margin-top:20px;font-size:clamp(24px,1.6vw,30px);line-height:1.3;font-weight:700}
.nf p{margin-top:12px;font-size:18px;line-height:26px;color:var(--muted)}
.nf .btn{margin-top:32px;min-height:56px;padding:0 44px;border-radius:14px;font-size:18px}

/* ---------- Dialoge ---------- */
.veil{position:fixed;inset:0;z-index:20;display:flex;justify-content:center;align-items:center;padding:16px;overflow-y:auto;background:rgba(0,0,0,.5)}
.veil.top{align-items:flex-start;padding-top:clamp(16px,5.4vh,58px)}
.modal{position:relative;width:100%;margin:auto 0;background:#fff;border-radius:28px;box-shadow:0 24px 64px rgba(0,0,0,.25)}
.veil.top .modal{margin:0}
.close{flex:none;display:flex;align-items:center;justify-content:center;width:50px;height:50px;border-radius:50%;border:0;background:#F1F2F4;color:#2B2E33}
.small-modal{max-width:600px;padding:25px 27px 35px;display:flex;flex-direction:column;align-items:center;text-align:center}
.small-modal .close{position:absolute;right:28px;top:25px}
.big-ic{display:flex;align-items:center;justify-content:center;width:150px;height:150px;border-radius:36px;background:var(--tint);color:var(--green)}
.small-modal h2{margin-top:23px;font-size:clamp(22px,5.6vw,30px);line-height:1.15;font-weight:700}
.small-modal .sub{max-width:420px;margin-top:8px;font-size:15px;line-height:19px;color:var(--muted)}
.code-row{display:flex;justify-content:center;gap:10px;width:100%;margin-top:28px}
.code-row input{flex:1 1 0;min-width:0;max-width:50px;aspect-ratio:1;border:1px solid #DDE0E4;border-radius:12px;background:#fff;padding:0;text-align:center;font-size:22px}
.code-row input:focus{border:2px solid var(--green);outline:none}
.code-row input:disabled{background:var(--bg)}
.key-field{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:60px;margin-top:28px;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:17px;font-weight:500;text-align:left}
.key-field span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.key-field.words{max-width:510px;font-size:15px;word-spacing:6px}
.key-field button{display:flex;padding:0;border:0;background:none;color:#2B2E33}
.big-modal{max-width:1200px;min-height:min(800px,calc(100vh - 32px));display:flex;flex-direction:column;padding:36px clamp(18px,3.7vw,45px) 23px}
.m-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #EEEFF2}
.m-head .close{margin-top:11px}
.m-head h2{font-size:clamp(26px,2.4vw,36px);line-height:1.22;font-weight:700}
.m-head p{margin-top:6px;font-size:16px;line-height:19px;color:var(--muted)}
.m-body{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:28px clamp(24px,4.4vw,53px);padding:28px clamp(0px,4.4vw,53px)}
.m-device{flex:none;text-align:center}
.m-device p{margin-top:36px;font-size:13px;line-height:17px;color:var(--muted)}
.m-info{flex:1 1 300px;min-width:0;max-width:600px}
.m-info .cap{font-size:14px;line-height:17px;color:var(--muted)}
.m-info h3{font-size:clamp(24px,2vw,30px);line-height:1.2;font-weight:700}
.m-info .addr{margin-top:6px;font-size:18px;line-height:22px;color:var(--muted)}
.m-info .kind{margin-top:60px}
.m-info .access{gap:12px clamp(24px,7vw,139px)}
.chip-t{display:inline-flex;align-items:center;justify-content:center;min-width:100px;height:35px;padding:0 16px;border-radius:18px;background:var(--tint);color:var(--green-dk);font-size:14px;font-weight:600}
.m-info .field{margin-top:8px}
.m-info .field label{font-weight:400;color:var(--muted)}
.logbox{flex:1;display:flex;flex-direction:column;justify-content:flex-end;min-height:220px;margin:12px 0;padding:24px;border-radius:20px;background:var(--bg);font-size:14px;line-height:23px;overflow:auto}
.logbox b{font-weight:600}
.logline{display:flex;flex-wrap:wrap;gap:0 8px}
.m-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 25px}
.m-foot > div{display:flex;flex-wrap:wrap;align-items:center;gap:12px 25px}
.m-foot .btn{min-width:150px}
.m-foot .mid{min-width:180px;min-height:56px;font-size:18px}

/* ---------- <= 1200px: schmalere Seitenleiste ---------- */
@media (max-width:1200px){
  .app{grid-template-columns:230px minmax(0,1fr)}
  .sb{padding-inline:16px}
  .nt th,.nt td{padding:0 20px}
}

/* ---------- <= 900px: Tablet / Handy ---------- */
@media (max-width:900px){
  .auth{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .auth-left{padding:36px 24px}
  .auth-left a{width:min(240px,55%)}
  .auth-right{padding:32px 20px 28px}
  .auth-form{margin:0}

  .app{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr)}
  .sb{grid-row:auto;position:static;flex-direction:row;align-items:center;gap:14px;height:auto;padding:10px 16px;overflow:visible}
  .sb-logo{width:84px;margin-left:0}
  .sb-mid{display:contents}
  .sb-net span{display:none}
  .sb-net button{margin-top:0;font-size:17px;line-height:22px;gap:4px}
  .sb-nav{position:fixed;left:0;right:0;bottom:0;z-index:10;flex-direction:row;gap:6px;margin:0;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
  .sb-nav a{flex:1 1 0;flex-direction:column;justify-content:center;gap:3px;height:54px;padding:0;font-size:12px}
  .sb-nav a.on::after{display:none}
  .sb-user{margin:0 0 0 auto;padding:0;background:none !important}
  .sb-user > span:last-child{display:none}
  .avatar{width:40px;height:40px;font-size:15px}
  .sb-user.on .avatar{outline:2px solid var(--green);outline-offset:2px}
  .sb-out{margin:0;font-size:0;gap:0;padding:8px 0 8px 4px}
  .tb,.content{grid-column:auto}
  .tb{min-height:40px;font-size:16px}
  .content{padding:22px 16px calc(96px + env(safe-area-inset-bottom));border-top-right-radius:22px;border-top-left-radius:22px}
  .app.bare .content{padding-bottom:22px}
  .card{border-radius:22px}

  .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin-top:20px}
  .peer{padding:14px 14px 14px;border-radius:18px}
  .peer .tile{width:88px;height:88px;border-radius:24px}
  .peer .tile svg{width:44px;height:44px}
  .peer h3{margin-top:14px;font-size:16px}
  .peer .ip{margin-top:8px;font-size:14px}
  .peer .row{margin-top:14px;gap:8px}
  .peer .btn{font-size:14px;padding:0 6px}
  .sec h2{font-size:22px}

  .add-card{justify-content:center}
  .add-form .input{max-width:none}
  .add-form .nr-input{max-width:110px}
  .kind{margin-top:28px}
  .end .btn,.between .btn,.net-actions .btn{flex:1 1 140px;width:auto}
  .select{width:100%}
  .nt th{height:60px}.nt td{height:66px}
  .nt th,.nt td{padding:0 16px}
  .profile-card{justify-content:center}
  .profile-fields{flex-basis:100%;max-width:none}
  .rule{margin-top:32px}
  .nf{margin:0;min-height:50vh}

  .modal{border-radius:22px}
  .small-modal{padding:20px 18px 26px}
  .small-modal .close{right:14px;top:14px;width:42px;height:42px}
  .big-ic{width:110px;height:110px;border-radius:28px}
  .big-ic svg{width:60px;height:60px}
  .big-modal{padding-top:22px;min-height:0}
  .m-head .close{margin-top:0;width:42px;height:42px}
  .m-body{justify-content:center;padding-block:20px}
  .m-device .device-tile{width:min(220px,60vw)}
  .m-device p{margin-top:14px}
  .m-info{flex-basis:100%;max-width:none}
  .m-info .kind{margin-top:24px}
  .m-foot .btn,.m-foot > div{flex:1 1 120px;min-width:0}
  .m-foot .mid{min-height:50px;font-size:16px}
}

/* ================= Ergänzungen für die Funktionen (Formulare, Meldungen, Dialoge) ================= */
body{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
.auth,.app{flex:1;min-height:0}
.muted{color:var(--muted)}
.center{text-align:center}
.grow{flex:1;display:flex;flex-direction:column}
.stack{display:grid;gap:16px}
.lead{margin-top:10px;font-size:16px;line-height:1.5;color:var(--muted)}
.hint{margin-top:8px;font-size:13px;line-height:1.45;color:var(--muted)}
:is(a,button,select,.input):focus-visible,.seg input:focus-visible + span,.switch input:focus-visible + .track{outline:3px solid rgba(30,154,98,.6);outline-offset:2px}

/* Fehleranzeige an Feldern */
.err{margin-top:8px;font-size:14px;line-height:1.4;font-weight:500;color:#B3262B}
.field.invalid .input{border-color:var(--red);background:#FFF8F8;box-shadow:0 0 0 3px rgba(229,72,77,.16)}
.alert{display:flex;align-items:flex-start;gap:10px;margin-top:20px;padding:12px 14px;border:1px solid;border-radius:12px;font-size:15px;line-height:1.4;font-weight:500;text-align:left}
.alert.error{background:var(--red-tint);border-color:#F5C2C4;color:#B3262B}
.alert.info{background:#EEF3FB;border-color:#D3DFF2;color:#2B4C7E}
.alert.ok{background:var(--tint);border-color:#BFE6D2;color:#16704A}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn[aria-busy]{position:relative;color:transparent !important}
.btn[aria-busy]::after{content:"";position:absolute;width:20px;height:20px;border:3px solid rgba(120,120,120,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.btn-out[aria-busy]::after{border-top-color:var(--ink)}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.btn[aria-busy]::after{animation-duration:2s}}
.btn-danger{background:#D23B40;color:#fff}
.code-input{text-align:center;font-size:22px;letter-spacing:.45em;font-variant-numeric:tabular-nums;padding-right:0}
.auth-alt{margin-top:20px;text-align:center;font-size:15px;line-height:1.6;color:var(--muted)}
.auth-alt a,.hint a{color:var(--green-dk);font-weight:500}

/* Demo-Hinweis */
.demo{position:sticky;top:0;z-index:15;padding:6px 16px;background:#16181D;color:#fff;font-size:13px;line-height:18px;text-align:center}
body:has(.demo){--top:30px}
.sb{top:var(--top,0px);height:calc(100vh - var(--top,0px));height:calc(100dvh - var(--top,0px))}

/* Auswahlfelder */
select{font:inherit;color:var(--ink);cursor:pointer}
.sb-net select,select.select{appearance:none;-webkit-appearance:none;background-repeat:no-repeat;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2316181D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E")}
.sb-net select{display:block;max-width:100%;margin-top:6px;padding:0 30px 0 0;border:0;border-radius:6px;background-color:transparent;background-position:right center;font-size:22px;line-height:28px;font-weight:700;text-overflow:ellipsis}
select.select{background-color:#fff;background-position:right 18px center;padding-right:52px;text-overflow:ellipsis}
.filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 24px;margin-top:clamp(24px,2.4vw,44px)}
.filters .select{width:min(260px,100%);height:52px;font-size:16px}
.filters .count{margin-left:auto;font-size:14px;color:var(--muted)}
.table-card.wide{max-width:none}
.nt td.muted{color:var(--muted);text-align:center}

/* Karten-Zusätze */
.st.info{background:#EEF3FB;color:#2B4C7E}.st.info i{background:#4A6FA5}
.device-tile.off{background:var(--gray-tile);color:var(--gray-ic)}
.m-info .kind.on{color:var(--green-dk)}
.empty{margin:clamp(24px,6vw,96px) auto;max-width:460px;padding:40px 28px;border:1px dashed #CDD1D7;border-radius:24px;text-align:center}
.empty h2{font-size:22px;line-height:1.3}
.empty p{margin-top:8px;color:var(--muted);line-height:1.5}
.empty .btn{margin-top:20px}

/* Trusted/Untrusted */
.seg{display:flex;gap:10px;border:0;margin:0;padding:0}
.seg label{position:relative}
.seg input{position:absolute;inset:0;opacity:0;cursor:pointer}
.seg span{display:inline-flex;align-items:center;min-height:35px;padding:0 20px;border:1px solid #DEDEE3;border-radius:18px;background:#fff;font-size:14px;font-weight:600}
.seg input:checked + span{background:var(--green);border-color:var(--green);color:#fff}
.trust{display:flex;flex-wrap:wrap;align-items:center;gap:10px 32px;margin-top:22px}
.trust .label{margin:0;font-size:16px}
.switch{display:inline-flex;align-items:center;gap:10px;font-size:15px;font-weight:600;cursor:pointer}
.switch input{position:absolute;width:1px;height:1px;opacity:0}
.track{position:relative;width:46px;height:26px;border-radius:13px;background:#BFC4CB;transition:background .15s}
.track::after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s}
.switch input:checked + .track{background:var(--green-dk)}
.switch input:checked + .track::after{transform:translateX(20px)}
.warn{margin-top:12px;padding:10px 12px;border:1px solid #F5D9AE;border-radius:10px;background:#FFF4E5;color:#7A4300;font-size:14px;line-height:1.4}
.facts{display:grid;grid-template-columns:auto 1fr;gap:12px 28px;margin:22px 0 0;font-size:15px;line-height:1.4}
.facts dt{color:var(--muted)}
.facts dd{margin:0;font-weight:500}

/* Dialoge als <dialog> */
dialog:not([open]){display:none}
dialog.modal{margin:auto;width:calc(100% - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;border:0;color:var(--ink)}
dialog.modal::backdrop{background:rgba(0,0,0,.5)}
dialog.big-modal{min-height:min(720px,calc(100dvh - 32px))}
.s-content{width:100%;margin-top:6px;text-align:left}
.s-content:empty{display:none}
.small-modal .m-foot{width:100%;margin-top:24px}
.small-modal .m-foot:empty{display:none}
.small-modal .m-foot .btn{flex:1 1 120px}
.m-content{flex:1 0 auto;display:flex;flex-direction:column}
dialog.big-modal .m-foot{flex:none;padding-top:12px}
.field.invalid .hint{display:none}
.table-card.wide .nt{min-width:820px}
.table-card.wide .nt td:first-child{white-space:nowrap}
.m-content > .m-body{flex:1}
.m-content > .tf{padding:8px 0 20px}
.m-foot:empty{display:none}
.m-info .field label{font-weight:500;color:var(--ink)}
.m-device p{margin-top:20px}

/* 2FA einrichten: QR-Code an der Stelle der Icon-Kachel, Recovery-Passwörter im Feld wie der Einladungscode */
.qr-tile{flex:none;width:180px;height:180px;padding:8px;border:1px solid var(--line);border-radius:28px;background:#fff}
.qr-tile img{display:block;width:100%;height:100%}
.key-field.recovery{align-items:flex-start;padding:14px}
.key-field.recovery ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 24px;margin:0;padding:0;list-style:none;font-size:15px;font-variant-numeric:tabular-nums}
.small-modal .code-row{margin-top:24px}
.nf .big-ic{margin-bottom:12px}

/* Kurzmeldungen */
#toasts{position:fixed;left:50%;bottom:24px;z-index:40;display:grid;gap:8px;width:max-content;max-width:calc(100% - 32px);transform:translateX(-50%)}
.toast{padding:12px 18px;border-radius:12px;background:#16181D;color:#fff;font-size:15px;line-height:1.4;box-shadow:0 8px 24px rgba(0,0,0,.25)}

@media (max-width:900px){
  .demo{position:static}
  .sb{top:auto;height:auto}
  .sb-net{min-width:0}
  .sb-net select{margin-top:0;font-size:17px;line-height:22px;padding-right:24px;background-size:18px}
  .filters .select{width:100%}
  .filters > div{flex:1 1 160px}
  .filters .count{flex-basis:100%;margin:0}
  #toasts{bottom:calc(84px + env(safe-area-inset-bottom))}
  dialog.big-modal{min-height:0}
}

/* Vor- und Nachname nebeneinander, auf schmalen Handys untereinander */
.name-row{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.name-row .field{min-width:0}
@media (max-width:420px){.name-row{grid-template-columns:1fr}}

/* Dialoge wie im Mockup: kleine Dialoge oben, kein Fokusrahmen um den Dialog selbst */
dialog.modal:focus{outline:none}
dialog.small-modal{margin:clamp(16px,5.4vh,58px) auto auto}
