:root{
  --bg:#f4f7f9;
  --surface:#ffffff;
  --surface-2:#f8fafb;
  --text:#17252d;
  --muted:#677780;
  --line:#dce5e9;
  --navy:#12384d;
  --navy-deep:#0b2938;
  --blue:#286d8e;
  --blue-dark:#1d526b;
  --cyan:#58b8c6;
  --cyan-soft:#e9f6f8;
  --ok:#217049;
  --ok-bg:#e8f5ed;
  --warn:#8a5b18;
  --warn-bg:#fff2da;
  --danger:#9d3b37;
  --danger-bg:#fbe9e8;
  --radius:14px;
  --shadow:0 14px 38px rgba(16,48,64,.09);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  background:var(--bg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--blue)}
button,input{font:inherit}
button{cursor:pointer}
.shell{width:min(1120px,calc(100% - 36px));margin:0 auto}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(12px);
}
.nav-row{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:11px;
  color:var(--text);
  text-decoration:none;
  min-width:0;
}
.brand-mark{
  flex:0 0 38px;
  width:38px;height:38px;
  display:grid;place-items:center;
  color:#fff;
  background:linear-gradient(145deg,var(--blue),var(--navy));
  border-radius:10px;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.02em;
}
.brand>span:last-child{display:flex;flex-direction:column;line-height:1.08;min-width:0}
.brand b{font-size:1rem;white-space:nowrap}
.brand small{margin-top:4px;color:var(--muted);font-size:.7rem;font-weight:600}
.nav-actions{display:flex;align-items:center;gap:14px}
.secure-pill{
  display:inline-flex;align-items:center;
  padding:6px 10px;
  border-radius:999px;
  color:var(--blue-dark);
  background:var(--cyan-soft);
  font-size:.76rem;
  font-weight:800;
  white-space:nowrap;
}
.text-button{
  border:0;background:none;padding:7px 0;
  color:var(--muted);font-weight:650;
}
.text-button:hover{color:var(--blue)}

/* Hero */
.hero{
  color:#fff;
  background:
    radial-gradient(circle at 87% 8%,rgba(88,184,198,.20),transparent 32%),
    linear-gradient(125deg,var(--navy-deep),var(--navy) 66%,#1a6275);
}
.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(330px,.82fr);
  gap:58px;
  align-items:center;
  padding:58px 0;
}
.eyebrow{
  color:var(--blue);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:.74rem;
  font-weight:850;
}
.eyebrow.light{color:#91dce5}
.hero h1{
  max-width:760px;
  margin:12px 0 18px;
  color:#fff;
  font-size:clamp(2.35rem,4.4vw,4.35rem);
  line-height:1.03;
  letter-spacing:-.045em;
}
.lead{
  max-width:760px;
  margin:0;
  color:#d3e2e7;
  font-size:1.06rem;
}
.hero-notes{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:25px;
}
.hero-notes span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#d7e8ec;
  font-size:.78rem;
  font-weight:650;
}

/* WEG card */
.weg-card{
  padding:24px;
  color:var(--text);
  background:rgba(255,255,255,.98);
  border:1px solid rgba(255,255,255,.5);
  border-radius:16px;
  box-shadow:0 22px 60px rgba(3,24,34,.24);
}
.card-kicker,.section-label{
  color:var(--blue);
  text-transform:uppercase;
  letter-spacing:.09em;
  font-size:.72rem;
  font-weight:850;
}
.weg-card h2{
  margin:5px 0 17px;
  font-size:1.55rem;
  letter-spacing:-.025em;
}
.houses{display:grid;gap:9px}
.house{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:12px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:10px;
}
.house-letter{
  width:36px;height:36px;
  display:grid;place-items:center;
  color:#fff;background:var(--blue);
  border-radius:9px;
  font-weight:850;
}
.house-b .house-letter{background:#39867f}
.house-c .house-letter{background:#6c6ba2}
.house b,.house span{display:block}
.house b{font-size:.94rem}
.house span{margin-top:3px;color:var(--muted);font-size:.82rem;line-height:1.4}
.mini-note{
  margin:15px 0 0;
  padding-top:14px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:.76rem;
}

/* Content */
.content-section{padding:48px 0 4px}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:22px;
  margin-bottom:19px;
}
.section-head h2{
  margin:5px 0 0;
  font-size:clamp(1.65rem,2.7vw,2.25rem);
  line-height:1.12;
  letter-spacing:-.032em;
}
.status-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:.74rem;
  font-weight:800;
  white-space:nowrap;
}
.status-neutral{color:#556870;background:#e9eef1}
.status-ok{color:var(--ok);background:var(--ok-bg)}
.status-warn{color:var(--warn);background:var(--warn-bg)}
.status-bad{color:var(--danger);background:var(--danger-bg)}

.workbench{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(275px,.65fr);
  gap:18px;
}
.upload-panel,.test-panel,.result-section{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.upload-panel{padding:19px}
.dropzone{
  min-height:250px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:25px;
  text-align:center;
  background:#fafcfd;
  border:2px dashed #c8d5db;
  border-radius:11px;
  transition:.15s ease;
}
.dropzone:hover,.dropzone.dragging{border-color:var(--cyan);background:#f1fafb}
.dropzone input{display:none}
.upload-circle{
  width:48px;height:48px;
  display:grid;place-items:center;
  margin-bottom:4px;
  color:#fff;background:linear-gradient(145deg,var(--blue),var(--navy));
  border-radius:50%;
  font-size:1.45rem;
}
.dropzone strong{font-size:1.03rem}
.dropzone span,.dropzone small{color:var(--muted)}
.dropzone small{max-width:520px;font-size:.78rem}
.upload-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:15px;
}
.selected-file{min-width:0;color:var(--muted);font-size:.84rem;overflow-wrap:anywhere}
.primary-button,.secondary-button{
  border-radius:8px;
  padding:10px 15px;
  font-weight:780;
}
.primary-button{color:#fff;background:var(--blue);border:1px solid var(--blue-dark)}
.primary-button:hover{background:var(--blue-dark)}
.primary-button:disabled{opacity:.45;cursor:not-allowed}
.secondary-button{width:100%;color:var(--blue-dark);background:#fff;border:1px solid #b8cbd3}
.secondary-button:hover{background:#f4f9fa}
.test-panel{
  padding:22px;
  background:linear-gradient(180deg,#fff,#f6f9fa);
}
.test-panel h3{margin:6px 0 8px;font-size:1.25rem}
.test-panel p{margin:0;color:var(--muted);font-size:.9rem}
.test-panel .secondary-button{margin-top:18px}
.message{margin-top:14px;padding:11px 13px;border-radius:8px;background:var(--danger-bg);color:var(--danger)}

/* Results */
.result-section{margin-top:40px;padding:25px}
.meta-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}
.meta-item{padding:13px;border-right:1px solid var(--line)}
.meta-item:last-child{border-right:0}
.meta-item span,.account-row span{
  display:block;
  color:var(--muted);
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.meta-item strong,.account-row strong{display:block;margin-top:4px;overflow-wrap:anywhere}
.block-title{margin:0 0 11px}
.top-gap{margin-top:26px}
.top-gap-small{margin-top:20px}
.pipeline-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}
.pipeline-step{
  min-height:132px;
  padding:14px;
  background:#f9fbfc;
  border:1px solid var(--line);
  border-radius:9px;
}
.pipeline-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.pipeline-step p{margin:14px 0 0;color:var(--muted);font-size:.83rem}
.result-columns{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:20px;
  margin-top:25px;
}
.normalized-card,.account-card{
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
}
.normalized-section{padding:15px;border-bottom:1px solid var(--line)}
.normalized-section:last-child{border-bottom:0}
.normalized-section h4{margin:0 0 10px;color:var(--blue-dark)}
.normal-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.amount-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.normal-grid .account-row,.amount-grid .account-row{
  padding:10px;
  background:#fafcfd;
  border:1px solid var(--line);
  border-radius:7px;
}
.account-row{padding:13px 14px;border-bottom:1px solid var(--line)}
.account-row:last-child{border-bottom:0}
.positions{display:grid;gap:7px}
.position{
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:10px;
  background:#f8fafb;
  border-radius:7px;
}
.position span{color:var(--muted);font-size:.84rem;text-align:right}
.warnings-list{display:grid;gap:7px}
.warning-item,.ok-item{padding:10px 12px;border-radius:7px;font-size:.84rem}
.warning-item{background:var(--warn-bg);color:var(--warn)}
.ok-item{background:var(--ok-bg);color:var(--ok)}
.json-details{
  margin-top:22px;
  overflow:hidden;
  color:#d8e8ee;background:#0e2633;
  border:1px solid #183e50;
  border-radius:10px;
}
.json-details summary{padding:12px 14px;color:#fff;font-weight:700;cursor:pointer}
.json-details pre{max-height:520px;margin:0;padding:16px;overflow:auto;border-top:1px solid rgba(255,255,255,.1);font-size:.76rem}
.success-box{
  margin-top:17px;
  padding:13px 15px;
  color:#225d42;background:var(--ok-bg);
  border-left:4px solid var(--ok);
}

/* Pipeline band */
.agents-band{
  margin-top:64px;
  padding:55px 0;
  color:#fff;
  background:var(--navy);
}
.agents-band h2{margin:6px 0 22px;color:#fff;font-size:2rem;letter-spacing:-.03em}
.agent-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}
.agent-steps article{
  min-height:170px;
  padding:16px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.12);
  border-radius:9px;
}
.agent-steps article span{color:#93dce5;font-size:.7rem;font-weight:850}
.agent-steps article b{display:block;margin:27px 0 7px}
.agent-steps article p{margin:0;color:#bed3d9;font-size:.83rem}
.agent-steps .active-agent{background:rgba(88,184,198,.14);border-color:#63bac7}

/* Footer + legal */
footer{background:#fff;border-top:1px solid var(--line)}
.footer-row{
  min-height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.footer-row>div{display:flex;flex-direction:column}
.footer-row span{color:var(--muted);font-size:.78rem}
.footer-row nav{display:flex;gap:16px;flex-wrap:wrap}
.footer-row nav a{color:var(--muted);text-decoration:none;font-size:.82rem}
.footer-row nav a:hover{color:var(--blue)}
.legal{max-width:850px;padding:48px 0 72px}
.legal .back{display:inline-block;margin-bottom:20px}
.legal h1{font-size:2.3rem;letter-spacing:-.035em}
.legal h2{margin-top:29px;font-size:1.22rem}
.legal p,.legal li{color:#3e4c53}
.legal-note{padding:12px 14px;background:#fff7e7;border-left:4px solid #d6a646}

/* Login */
.login-body{min-height:100vh;background:linear-gradient(135deg,var(--navy-deep),var(--navy) 58%,#24728a)}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:28px}
.login-card{
  width:min(430px,100%);
  padding:30px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 28px 75px rgba(0,0,0,.24);
}
.login-logo{display:flex;align-items:center;gap:11px;margin-bottom:29px}
.login-mark{
  width:42px;height:42px;
  display:grid;place-items:center;
  color:#fff;background:linear-gradient(145deg,var(--blue),var(--navy));
  border-radius:10px;font-weight:900
}
.login-logo strong,.login-logo span{display:block}
.login-logo span{color:var(--muted);font-size:.73rem}
.login-card h1{margin:5px 0 7px;font-size:1.95rem;letter-spacing:-.03em}
.hint{color:var(--muted)}
.login-card form{display:grid;gap:15px;margin-top:24px}
.login-card label{display:grid;gap:6px;font-size:.84rem;font-weight:700}
.login-card input{
  width:100%;
  padding:11px 12px;
  background:#fff;
  border:1px solid #cbd7dc;
  border-radius:8px;
  outline:none;
}
.login-card input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(40,109,142,.11)}
.login-card .primary-button{width:100%}
.login-note{margin-top:21px;padding:11px 12px;color:var(--muted);background:var(--surface-2);border-radius:8px;font-size:.78rem}
.login-links{display:flex;gap:13px;flex-wrap:wrap;margin-top:16px}
.login-links a{color:var(--muted);font-size:.78rem}
.password-field{position:relative}
.show-password-row{
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  gap:8px!important;
  margin-top:-4px;
  color:var(--muted);
  font-size:.82rem!important;
  font-weight:500!important;
  cursor:pointer;
}
.show-password-row input{width:auto!important;margin:0;accent-color:var(--blue)}

/* Tablet */
@media(max-width:980px){
  .hero-grid{grid-template-columns:1fr;gap:30px;padding:48px 0}
  .hero h1{max-width:820px}
  .weg-card{max-width:720px}
  .workbench,.result-columns{grid-template-columns:1fr}
  .pipeline-grid{grid-template-columns:repeat(2,1fr)}
  .agent-steps{grid-template-columns:repeat(2,1fr)}
  .amount-grid{grid-template-columns:repeat(2,1fr)}
}

/* Phone */
@media(max-width:650px){
  .shell{width:min(100% - 28px,1120px)}
  .site-header{position:static}
  .nav-row{
    min-height:auto;
    padding:12px 0;
    gap:12px;
  }
  .brand-mark{width:34px;height:34px;flex-basis:34px;border-radius:9px}
  .brand b{font-size:.95rem}
  .brand small{font-size:.66rem}
  .nav-actions{gap:10px}
  .secure-pill{
    padding:5px 8px;
    font-size:0;
  }
  .secure-pill::after{
    content:"Geschützt";
    font-size:.7rem;
  }
  .text-button{font-size:.83rem}

  .hero-grid{padding:34px 0 28px;gap:24px}
  .hero h1{
    margin:9px 0 15px;
    font-size:clamp(2.05rem,10.8vw,3rem);
    line-height:1.01;
  }
  .lead{font-size:.96rem;line-height:1.55}
  .hero-notes{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
    margin-top:20px;
  }
  .hero-notes span{
    min-height:42px;
    border-radius:9px;
    padding:7px 9px;
    font-size:.71rem;
  }

  .weg-card{
    padding:18px;
    border-radius:13px;
    box-shadow:none;
  }
  .weg-card h2{font-size:1.3rem;margin-bottom:13px}
  .house{grid-template-columns:36px minmax(0,1fr);padding:10px}
  .house-letter{width:32px;height:32px;border-radius:8px}
  .mini-note{font-size:.72rem}

  .content-section{padding-top:35px}
  .section-head{
    flex-direction:column;
    gap:10px;
    margin-bottom:15px;
  }
  .section-head h2{font-size:1.65rem}
  .status-chip{align-self:flex-start}
  .upload-panel{padding:14px}
  .dropzone{
    min-height:205px;
    padding:20px 13px;
  }
  .dropzone strong{font-size:.96rem}
  .dropzone span{font-size:.84rem}
  .dropzone small{font-size:.73rem}
  .upload-footer{
    flex-direction:column;
    align-items:stretch;
  }
  .primary-button{width:100%}
  .test-panel{padding:18px}
  .result-section{padding:17px;margin-top:30px}
  .meta-grid,.pipeline-grid,.normal-grid,.amount-grid,.agent-steps{grid-template-columns:1fr}
  .meta-item{border-right:0;border-bottom:1px solid var(--line)}
  .meta-item:last-child{border-bottom:0}
  .pipeline-step{min-height:auto}
  .position{flex-direction:column}
  .position span{text-align:left}
  .agents-band{margin-top:45px;padding:42px 0}
  .agents-band h2{font-size:1.65rem}
  .agent-steps article{min-height:auto}
  .agent-steps article b{margin-top:18px}

  .footer-row{
    min-height:auto;
    padding:23px 0;
    flex-direction:column;
    align-items:flex-start;
  }
  .login-shell{padding:16px}
  .login-card{padding:22px;border-radius:13px}
  .legal{padding-top:34px}
  .legal h1{font-size:2rem}
}
