/* === NUI: Vergrößertes Layout (ca. +33%) === */
/* Vorher evtl. #000 — jetzt transparent */
html, body {
  background: transparent !important;
}
/* === NUI: Vergrößertes Layout (ca. +66% Gesamt) === */

/* === Tooltip für Tabellen-Header: zentriert & sauber positioniert === */
.has-tip{
  position: relative;
  cursor: help;
  user-select: none;
  overflow: visible;                 /* wichtig in <th> */
  z-index: 1;                        /* über Nachbarzellen */
}
.nfs-table thead th{ overflow: visible; }  /* falls Tabellen-Defaults clippen */

.has-tip .abbr{
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  opacity: .95;
}

/* Tooltip-Bubble: exakt 2 Zeilen, kein Wortumbruch */
.has-tip:hover::after,
.has-tip:focus-within::after,
.has-tip:focus::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  /* keine feste max-width → darf so breit sein wie nötig */
  width: auto;
  max-width: none;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.4;
  white-space: pre;          /* <- nur \n respektieren, KEIN automatischer Umbruch */
  word-break: normal;
  overflow-wrap: normal;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  pointer-events: none;
  z-index: 50;
}

/* Pfeil bleibt zentriert */
.has-tip:hover::before,
.has-tip:focus-within::before,
.has-tip:focus::before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--panel);
  filter: drop-shadow(0 -1px 0 rgba(255,255,255,.08));
  z-index: 51;
}

/* leichtes Glas, wenn verfügbar */
@supports (backdrop-filter: blur(6px)){
  .has-tip:hover::after,
  .has-tip:focus-within::after,
  .has-tip:focus::after{
    background: color-mix(in oklab, var(--panel) 92%, transparent);
    backdrop-filter: blur(6px);
  }
}

/* optional: größere UI-Versionen (deine +66 %) etwas größer darstellen */
@media (min-width: 2000px){
  .has-tip:hover::after{ font-size: 14px; padding: 12px 14px; }
}

:root{
  --accent:#9bd24c;
  --accent2:#e63946;
  --bg0:#000000;
  --panel:rgba(18,22,28,.86);
  --line:rgba(255,255,255,.08);
  --txt:#eaf1e7;
  --muted:#aab79a;
}
*{box-sizing:border-box}
html,body{
  height:100%;
  margin:0;
  background:#000;
  color:var(--txt);
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  overflow:hidden;
}
.hidden{display:none}

#frame{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Canvas und Szenen */
canvas#bg{
  position:absolute;
  width:2120px;
  height:1200px;
  border-radius:26px;
  box-shadow:0 22px 100px rgba(0,0,0,.9);
}
.scene{
  position:absolute;
  width:2120px;
  height:1200px;
  border-radius:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
}
.scene.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
  transition:opacity .25s ease, transform .25s ease;
}

/* CONNECTING */
.connecting-text{
  position:absolute;
  left:100px;
  top:42px;
  font-weight:900;
  letter-spacing:.06em;
  color:var(--accent);
  text-shadow:0 2px 0 #001,-1px 0 0 #001;
  font-size:32px;
  animation:pulse 1.2s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:.6}50%{opacity:1}}
.dots{
  position:absolute;
  left:100px;
  right:100px;
  bottom:60px;
  height:16px;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:32px;
  gap:12px;
}
.dots>i{
  display:block;
  width:30px;
  height:16px;
  background:var(--accent);
  border-radius:3px;
  opacity:.25;
}

/* LOGIN V2 */
.login-v2{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:46px;
  transform:translateY(10px);
  opacity:0;
  animation:loginIn .45s ease .2s forwards;
}
@keyframes loginIn{to{opacity:1; transform:translateY(0)}}

.login-v2 .badge{
  width:260px;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 0 10px rgba(155,210,76,.25));
  opacity:0;
  transform:scale(.96);
  animation:badgeIn .5s ease .15s forwards;
}
@keyframes badgeIn{to{opacity:1; transform:scale(1)}}

.dept{
  font-weight:900;
  letter-spacing:.6em;
  color:#9bd24c;
  text-align:center;
  text-transform:uppercase;
  font-size:45px;
  text-shadow:0 2px 0 #001;
  opacity:0;
  animation:fadeIn .35s .25s forwards;
}
@keyframes fadeIn{to{opacity:1}}

.login-box{
  width:1340px;
  border:22px solid #9bd24c;
  border-radius:10px;
  padding:60px 70px;
  background:rgba(0,0,0,.0);
  box-shadow:0 18px 70px rgba(0,0,0,.35) inset;
  opacity:0;
  transform:translateY(12px);
  animation:boxIn .45s .35s forwards;
}
@keyframes boxIn{to{opacity:1; transform:translateY(0)}}

.login-box .row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:55px;
  line-height:1.2;
  padding:24px 18px;
}
.login-box .row span{
  color:#9bd24c;
  font-weight:800;
  letter-spacing:.1em;
}
.login-box .row strong{
  color:#9bd24c;
  font-weight:900;
  letter-spacing:.06em;
}

.signing{
  margin-top:10px;
  font-size:44px;
  color:#9bd24c;
  font-weight:900;
  letter-spacing:.18em;
  opacity:0;
  animation:fadeIn .35s .55s forwards;
}

/* SEARCH CARD */
.search-card{
  width:940px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  padding:30px;
  backdrop-filter:blur(10px);
  opacity:0;
  transform:translateY(10px);
  animation:cardIn .35s .2s forwards;
}
@keyframes cardIn{to{opacity:1;transform:translateY(0)}}
.search-card .label{
  font-weight:700;
  margin-bottom:18px;
  font-size:26px;
}
.scanner{position:relative;height:260px;border-radius:16px;background:rgba(255,255,255,.03);overflow:hidden;border:1px solid var(--line);}
.mini{margin-top:12px;color:var(--muted);font-size:17px}

/* PROFILE PANEL */
.panel{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:26px;
  width:1660px;
  height:860px;
  background:rgba(0,0,0,.2);
}
.menu{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.menu button{
  padding:16px 22px;
  background:rgba(0,0,0,.4);
  color:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  text-align:left;
  cursor:pointer;
  font-size:20px;
}
.menu button.active{
  background:rgba(155,210,76,.15);
  border-color:rgba(155,210,76,.35);
}
.content{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  padding:26px;
}
.tab{display:none}
.tab.show{display:block;animation:fadeIn .2s ease forwards}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.kv{
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:12px;
  padding:18px;
  font-size:20px;
}
.kv span{
  display:block;
  color:var(--muted);
  font-size:15px;
}
table{width:100%;border-collapse:collapse;font-size:19px}
th,td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:left;
}

/* NFS TABLE STYLE */
.nfs-table{
  table-layout:fixed;
}
.nfs-table th, .nfs-table td{
  border-bottom:1px solid rgba(255,255,255,.05)!important;
  padding:20px 22px!important;
}
.nfs-table tbody tr:hover td{
  background:rgba(155,210,76,0.08);
  transition:background .18s ease;
}
.nfs-table tbody tr:hover td:first-child::after{
  content:'';
  position:absolute;
  left:0; top:0; bottom:0;
  width:5px;
  background:#9bd24c;
}
.nfs-table tbody tr.total td{
  font-weight:900;
  letter-spacing:.06em;
  color:#cfe9a3;
  border-top:2px solid rgba(155,210,76,.35)!important;
  background:linear-gradient(180deg, rgba(155,210,76,.10), rgba(155,210,76,.04));
}
.nfs-table .col-num{
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum";
}

/* --- Scrollbares Tab-Layout --- */
.content{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  padding:26px;
  display:flex;            /* neu */
  flex-direction:column;   /* neu */
  overflow:hidden;         /* neu */
}
.tab{
  display:none;
  flex:1 1 auto;           /* neu: Tab füllt den Content */
  height:100%;             /* neu */
  overflow:hidden;         /* neu */
}
.tab.show{display:block;animation:fadeIn .2s ease forwards}

/* Der eigentliche Scroll-Wrapper für Tabellen */
.table-wrap{
  height:100%;
  overflow:auto;           /* ← Autoscroll */
  padding-right:8px;       /* etwas Luft neben der Scrollbar */
}

/* Sticky Header für alle NFS-Tabellen */
.nfs-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  backdrop-filter: blur(4px);
}

/* Verhindert horizontales Überlaufen */
.nfs-table th, .nfs-table td{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:1px; /* zusammen mit nowrap+ellipsis: Zellen werden sauber gekappt */
}

/* Scrollbarer Bereich */
.table-wrap {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* Sticky Header */
.nfs-table thead th {
  position: sticky;
  top: 0;
  z-index: 5; /* höher als tbody-Zellen */
  background: rgba(15, 18, 23, 0.95); /* halbtransparent, passt zum Darktheme */
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Optionale: Schatteneffekt beim Scroll */
.table-wrap::after {
  content: "";
  position: sticky;
  top: 0;
  height: 8px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
  display: block;
  z-index: 6;
  pointer-events: none;
}