body{
    font-family:'Segoe UI',Tahoma,sans-serif;
    background:linear-gradient(135deg,#1e3c72,#2a5298);
    display:flex;
    justify-content:center;
    padding:20px;
}
.card{
    max-width:1100px;
    width:100%;
    display:flex;
    flex-direction:column;
    gap:18px;
}
.section-card{
    background:white;
    padding:24px;
    border-radius:18px;
    box-shadow:0 20px 40px rgba(0,0,0,0.25);
}
.header-row{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:56px;
}
.header-left{
    position:absolute;
    left:0;
    display:flex;
    align-items:center;
}
.header-right{
    position:absolute;
    right:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    min-width:180px;
}
.header-right .info-toggle{
    width:100%;
    text-align:center;
}
.header-logo{
    height:44px;
    width:auto;
    object-fit:contain;
}
h2{text-align:center;color:#f49600;margin:0;}
.header-controls{
    margin-top:14px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.mode-label{
    font-weight:700;
    color:#1e3c72;
}
.mode-select{
    width:25%;
    min-width:220px;
    max-width:320px;
    margin:0;
    padding:10px 14px;
    border:2px solid #f4c06a;
    border-radius:10px;
    background:#fffaf1;
    color:#1e3c72;
    font-weight:600;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
}
#gehaltPreset.mode-select{
    min-width:0;
}
.info-banner{
    background:#fff7e8;
    border:2px solid #f4c06a;
    border-radius:12px;
    color:#6b4a00;
    overflow:hidden;
}
.info-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    background:#ffe9c2;
}
.info-title{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    font-size:18px;
}
.info-icon{
    font-size:22px;
}
.info-toggle{
    border:none;
    background:#f49600;
    color:white;
    border-radius:8px;
    padding:8px 12px;
    font-weight:600;
    cursor:pointer;
}
.info-body{
    padding:18px 20px;
    font-size:18px;
    line-height:1.5;
}
.info-layout{
    display:flex;
    gap:16px;
    align-items:stretch;
}
.info-summary{
    flex:1 1 60%;
    background:#fff3db;
    border-radius:10px;
    padding:12px 14px;
    font-size:16px;
}
.info-links{
    margin-top:10px;
    display:flex;
    gap:10px;
}
.info-link-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    border-radius:50%;
    background:#f49600;
    color:white;
    text-decoration:none;
    font-size:16px;
}
#finanzausgleichPie{
    flex:0 0 28%;
    min-height:150px;
}
.info-body.hidden{display:none;}
label{font-weight:600;margin-top:15px;display:block;color:#f49600;}
input,select{
    width:100%;
    padding:10px;
    margin-top:6px;
    margin-bottom:12px;
    border-radius:8px;
    border:1px solid #ccc;
}
.number-input-wrap{
    position:relative;
    margin-top:6px;
    margin-bottom:12px;
}
.number-input-wrap input{
    margin-top:0;
    margin-bottom:0;
    text-align:right;
    padding-right:38px;
    box-sizing:border-box;
}
.number-stepper-stack{
    position:absolute;
    top:1px;
    right:1px;
    bottom:1px;
    width:26px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border-left:1px solid #d8d8d8;
    border-radius:0 8px 8px 0;
}
.number-stepper{
    flex:1;
    border:none;
    background:#f6f6f6;
    color:#666;
    padding:0;
    font-size:9px;
    font-weight:600;
    cursor:pointer;
    line-height:1;
}
.number-stepper + .number-stepper{
    border-top:1px solid #d8d8d8;
}
.number-stepper:hover{
    background:#ececec;
    color:#333;
}
.native-like-wrap input{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:textfield;
}
.native-like-stepper{
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.35);
}
#mainContent{
    display:flex;
    gap:20px;
    flex-wrap:nowrap;
}
#inputPanel{
    flex:0 0 calc(30% - 10px);
    max-width:calc(30% - 10px);
    min-width:0;
    padding-right:20px;
    box-sizing:border-box;
}
.input-flow{
    border-left:6px solid transparent;
    border-radius:0;
    padding:6px 12px 10px 12px;
    margin:8px 0 12px;
    background:#fcfdff;
}
.flow-ertragsanteile{ border-left-color:#ef6c00; }
.flow-kommunalsteuer{ border-left-color:#2e7d32; }
.flow-tourismus-ertrags{ border-left-color:#ef6c00; }
.flow-grundsteuer{ border-left-color:#8e24aa; }
#outputPanel{
    flex:0 0 calc(70% - 10px);
    max-width:calc(70% - 10px);
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:20px;
    padding-left:20px;
    border-left:1px solid #ddd;
    box-sizing:border-box;
}
#resultContent{
    background:#f4f6fb;
    padding:20px;
    border-radius:12px;
}
#umlageSection{
    background:#fffaf1;
    border:2px solid #f4c06a;
    border-radius:12px;
    padding:16px;
}
#umlageSlider{
    width:100%;
    box-sizing:border-box;
    margin:10px 0 8px 0;
    display:block;
}
.umlage-preset-buttons{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:8px 0 10px;
}
.umlage-preset-btn{
    border:1px solid #c9d4ea;
    background:#fff;
    color:#1e3c72;
    border-radius:6px;
    padding:5px 8px;
    font-size:12px;
    cursor:pointer;
}
.umlage-preset-btn.active{
    background:#1e3c72;
    color:#fff;
    border-color:#1e3c72;
}
#sankey_chart{
    min-height:350px;
}
#sankeyComparison{
    font-style:italic;
    color:#555;
}
.big-number{
    font-size:24px;
    font-weight:bold;
    color:#1e3c72;
}
.result-mode-einwohner .big-number{ color:#ef6c00; }
.result-mode-normal .big-number{ color:#2e7d32; }
.result-mode-hotel .big-number{ color:#ef6c00; }
.hidden{display:none;}

@media (max-width: 700px){
  .header-row{ min-height:auto; padding-top:8px; }
  .header-left, .header-right{ position:static; }
  .header-row{ flex-direction:column; gap:10px; }
  .header-controls{ flex-direction:column; align-items:stretch; }
  .mode-select{ width:100%; min-width:0; max-width:none; }
  .info-layout{ flex-direction:column; }
  #finanzausgleichPie{ flex:1 1 auto; min-height:180px; }
  #mainContent{ flex-direction:column; flex-wrap:nowrap; }
  #inputPanel,
  #outputPanel{
    flex:1 1 auto;
    max-width:100%;
    width:100%;
    min-width:0;
    padding-left:0;
    padding-right:0;
    border-left:none;
  }
  #sankey_chart{ min-height:260px; }
}
