.hd27-app{--bd:#dfe5e8;--bg:#ffffff;--soft:#f7fafb;--text:#1f2933;--muted:#61717d;--green:#137333;--red:#b3261e;--blue:#0b57d0;font-size:14px}
.hd27-card{background:var(--bg);border:1px solid var(--bd);padding:20px;margin:16px 0;border-radius:16px;box-shadow:0 4px 12px rgba(16,24,40,.04)}
.hd27-import-status{margin-top:10px;font-weight:600}
.hd27-import-debug{white-space:pre-wrap;background:#f6f7f7;padding:10px;border:1px solid #ddd;max-height:220px;overflow:auto}
.hd27-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;flex-wrap:wrap;background:linear-gradient(135deg,#f8fbff 0%,#f2f7f6 100%);border:1px solid var(--bd);padding:16px;border-radius:16px;margin:16px 0}
.hd27-toolbar-left,.hd27-toolbar-right{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.hd27-field{display:flex;flex-direction:column;gap:6px}
.hd27-field label{font-size:12px;font-weight:700;color:var(--muted)}
.hd27-field select{min-width:160px;font-size:13px}

.hd27-hero{background:linear-gradient(135deg,#0f172a 0%,#143b57 100%);color:#fff;border-radius:20px;padding:24px 22px;margin:16px 0}
.hd27-hero h1{margin:0 0 4px 0;font-size:28px;line-height:1.1;color:#fff}
.hd27-hero p{margin:0;color:rgba(255,255,255,.82);font-size:14px}
.hd27-hero-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.hd27-compare-badge{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);font-weight:700;font-size:13px}
.hd27-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-top:18px}
.hd27-kpi{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:18px;padding:16px;text-align:left;color:#fff}
.hd27-kpi-button{cursor:pointer}
.hd27-kpi-title{font-weight:700;font-size:13px;color:rgba(255,255,255,.85)}
.hd27-kpi-value{font-size:26px;line-height:1.1;margin-top:10px;font-weight:800}
.hd27-kpi-delta{margin-top:10px;font-size:12px}
.hd27-kpi-delta.pos{color:#9df0b0}.hd27-kpi-delta.neg{color:#ffb0a9}.hd27-kpi-delta.neutral{color:#d7e5f3}

.hd27-flow{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap}
.hd27-flow-card{flex:1 1 170px;background:var(--soft);border:1px solid var(--bd);border-radius:16px;padding:14px}
.hd27-flow-card.income{background:#eef8ef}.hd27-flow-card.expense{background:#fdf3f2}.hd27-flow-card.pos{background:#edf7ef}.hd27-flow-card.neg{background:#fdf1f0}
.hd27-flow-label{font-size:12px;color:var(--muted);font-weight:700}
.hd27-flow-value{font-size:22px;font-weight:800;margin-top:8px}
.hd27-flow-arrow{display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:#9aa9b5;padding:0 2px}

.hd27-grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}
.hd27-summary-pair{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-top:1px solid #eef2f4;font-size:13px}
.hd27-summary-pair:first-of-type{border-top:none;padding-top:0}

.hd27-table-wrap{overflow:auto;width:100%}
.hd27-table{width:100%;border-collapse:collapse;min-width:860px;font-size:13px}
.hd27-table th,.hd27-table td{padding:9px 10px;border-bottom:1px solid #edf1f2;vertical-align:top}
.hd27-table th{font-weight:800;background:#f8fafb;text-align:left;color:#33424d}
.hd27-table td.num,.hd27-table th.num{text-align:right;white-space:nowrap}
.hd27-table td.hh,.hd27-table th.hh{white-space:nowrap;width:145px}
.hd27-table td.art,.hd27-table th.art{white-space:nowrap;width:100px}
.hd27-table td.bez,.hd27-table th.bez{min-width:300px}
.hd27-table-wide{min-width:1080px}

.hd27-chart-wrap{position:relative;height:300px}
.hd27-list{display:flex;flex-direction:column;gap:8px}
.hd27-list-item{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #eef2f4}
.hd27-list-item:first-child{border-top:none;padding-top:0}
.hd27-list-title{font-weight:700;font-size:13px}
.hd27-list-sub{font-size:12px;color:var(--muted)}
.hd27-list-value{font-weight:800;font-size:13px}

.hd27-note{margin:0 0 10px;color:var(--muted);font-size:13px}
.hd27-badge{display:inline-block;margin-bottom:12px;padding:8px 12px;border-radius:999px;font-weight:800;font-size:13px}
.hd27-badge.pos{background:#e6f4ea;color:var(--green)}.hd27-badge.neg{background:#fce8e6;color:var(--red)}
.hd27-progress{margin:0 0 16px 0}
.hd27-progress-label{font-weight:700;margin-bottom:8px;font-size:13px}
.hd27-progress-bar{height:12px;background:#eef3f5;border-radius:999px;overflow:hidden}
.hd27-progress-fill{height:100%;border-radius:999px}
.hd27-progress-fill.pos{background:linear-gradient(90deg,#3fb950 0%,#137333 100%)}
.hd27-progress-fill.neg{background:linear-gradient(90deg,#ff9d94 0%,#b3261e 100%)}
.hd27-progress-value{margin-top:8px;font-weight:700;font-size:13px}
.hd27-app .pos{color:var(--green)}.hd27-app .neg{color:var(--red)}

@media (max-width: 900px){
  .hd27-table{min-width:760px}
  .hd27-kpi-value,.hd27-flow-value{font-size:22px}
  .hd27-hero h1{font-size:24px}
}

.hd27-grid-3{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:16px}
.hd27-metric-card,.hd27-subcard{background:var(--soft);border:1px solid var(--bd);border-radius:16px;padding:14px}
.hd27-subcard .hd27-table{min-width:620px}
.hd27-delete-year-btn{color:#b3261e !important}

.hd27-app .warn{color:#b26a00}
.hd27-badge.warn{background:#fff4db;color:#b26a00}
.hd27-progress-fill.warn{background:linear-gradient(90deg,#ffd36a 0%,#b26a00 100%)}
.hd27-ampel-card.pos{background:#eef8ef}
.hd27-ampel-card.warn{background:#fff8e8}
.hd27-ampel-card.neg{background:#fdf1f0}
.hd27-ampel-card .hd27-flow-value{font-size:24px}

.hd27-admin-warning {
  border-left: 4px solid #b32d2e;
  margin-top: 12px;
}

.hd27-subcard h3{margin:0 0 12px;font-size:18px}
.hd27-flow-vertical{flex-direction:column}
.hd27-flow-vertical .hd27-flow-card{flex:0 0 auto}
.hd27-mini-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;background:#eef3f5;color:#41505c}
.hd27-mini-badge.pos{background:#e6f4ea;color:#137333}
.hd27-mini-badge.neg{background:#fce8e6;color:#b3261e}
.hd27-mini-badge.neutral{background:#eef3f5;color:#41505c}

.hd27-grid-4{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.hd27-mini-badge{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;background:#eef3f5;color:#33424d}
.hd27-mini-badge.pos{background:#e6f4ea;color:#137333}.hd27-mini-badge.neg{background:#fce8e6;color:#b3261e}.hd27-mini-badge.neutral{background:#eef3f5;color:#33424d}.hd27-mini-badge.warn{background:#fff4db;color:#b26a00}
.hd27-summary-pair strong{word-break:break-word;text-align:right}

.hd27-hero, .hd27-hero * { color: #fff; }
.hd27-hero h1, .hd27-hero p, .hd27-hero .hd27-kpi-title, .hd27-hero .hd27-kpi-value, .hd27-hero .hd27-kpi-delta, .hd27-hero .hd27-compare-badge { color: #fff !important; }
.hd27-kpi-button{appearance:none;-webkit-appearance:none;background:rgba(255,255,255,.08)}
.hd27-kpi-button:focus{outline:2px solid rgba(255,255,255,.45);outline-offset:2px}
.hd27-kpi-button:hover{background:rgba(255,255,255,.12)}

.hd27-hero-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:18px}
.hd27-hero-section{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);border-radius:18px;padding:16px}
.hd27-hero-section-title{font-size:14px;font-weight:800;color:#fff;margin-bottom:12px}
.hd27-hero-section-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hd27-hero-metric{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px}
.hd27-hero-metric-label{font-size:12px;font-weight:700;color:rgba(255,255,255,.8)}
.hd27-hero-metric-value{font-size:24px;font-weight:800;line-height:1.1;margin-top:8px;color:#fff}
@media (max-width: 900px){.hd27-hero-section-grid{grid-template-columns:1fr}}
