:root {
    --navy: #082f55;
    --blue: #1177c9;
    --blue-dark: #0a5da4;
    --blue-soft: #eaf6ff;
    --green: #19863a;
    --green-soft: #edf9f0;
    --purple: #6b49c8;
    --text: #17344d;
    --muted: #6d8294;
    --line: #dce8f1;
    --panel: rgba(255, 255, 255, 0.95);
    --shadow: 0 12px 34px rgba(23, 72, 105, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #eef8fc;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, rgba(112, 204, 242, 0.34), transparent 38%),
        radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.92), transparent 30%),
        linear-gradient(180deg, #e8f7fd 0, #f5fbfe 38%, #eef7fb 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 250px;
    pointer-events: none;
    opacity: 0.42;
    background:
        radial-gradient(ellipse at 20% 68%, rgba(255, 255, 255, 0.95) 0 2%, transparent 3%),
        radial-gradient(ellipse at 45% 50%, rgba(255, 255, 255, 0.78) 0 1.5%, transparent 2.5%),
        radial-gradient(ellipse at 74% 70%, rgba(255, 255, 255, 0.75) 0 2%, transparent 3%),
        repeating-radial-gradient(ellipse at 50% 100%, rgba(29, 143, 202, 0.18) 0 3px, transparent 4px 22px);
}

button,
select {
    font: inherit;
}

button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 30px;
}

.hero-panel,
.content-card,
.dashboard-nav,
.site-footer {
    border: 1px solid rgba(191, 218, 235, 0.85);
    box-shadow: var(--shadow);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 28px 34px 22px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 252, 255, 0.96));
}

.hero-panel::after {
    content: "";
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -92px;
    height: 150px;
    border-radius: 50%;
    background: rgba(80, 183, 229, 0.12);
    box-shadow: 0 -20px 60px rgba(51, 162, 216, 0.12);
    pointer-events: none;
}

.hero-topline {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.hero-topline h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.hero-topline p {
    margin: 10px 0 0;
    color: #3f617d;
    font-size: clamp(16px, 1.8vw, 21px);
}

.hero-date {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 220px;
    color: var(--navy);
    text-align: right;
}

.hero-date strong {
    font-size: 16px;
}

.hero-date span {
    font-size: 15px;
}

.hero-date em {
    margin-top: 12px;
    color: var(--blue-dark);
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 700;
    transform: rotate(-5deg);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 390px) minmax(220px, 1fr);
    align-items: center;
    gap: 34px;
    margin-top: 18px;
}

.stat-card {
    min-height: 190px;
    padding: 24px 22px;
    border: 1px solid #d7e7f1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(19, 77, 116, 0.11);
    text-align: center;
}

.stat-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 6px;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-card-inflow .stat-icon,
.stat-card-inflow .stat-value {
    color: var(--green);
}

.stat-card-use .stat-icon,
.stat-card-use .stat-value {
    color: var(--blue-dark);
}

.stat-label {
    color: var(--navy);
    font-size: 20px;
    font-weight: 700;
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.stat-value strong {
    font-size: clamp(35px, 4vw, 47px);
    line-height: 1;
}

.stat-value span {
    font-size: 20px;
    font-weight: 700;
}

.stat-note {
    margin-top: 13px;
    color: var(--muted);
    font-size: 14px;
}

.gauge-card {
    display: flex;
    justify-content: center;
}

.gauge {
    width: min(360px, 100%);
    aspect-ratio: 1;
    padding: 13px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f8fafb 0%, #acb8c1 46%, #f7fafc 56%, #7c8992 100%);
    box-shadow:
        0 18px 30px rgba(20, 48, 66, 0.24),
        inset 0 0 0 2px rgba(255,255,255,.78);
}

.gauge-face {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 52%, #ffffff 0 55%, transparent 56%),
        conic-gradient(
            from 225deg,
            #e31313 0deg 54deg,
            #ff6e00 54deg 108deg,
            #f7cf00 108deg 162deg,
            #95ca00 162deg 216deg,
            #1aa323 216deg 270deg,
            #eef3f6 270deg 360deg
        );
    box-shadow:
        inset 0 0 0 9px #f8fbfc,
        inset 0 0 18px rgba(42, 61, 75, 0.14);
}

.gauge-face::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px solid rgba(105, 128, 143, 0.25);
    pointer-events: none;
}

.gauge-tick {
    position: absolute;
    z-index: 3;
    left: calc(50% - 1px);
    bottom: 50%;
    width: 2px;
    height: 43%;
    transform: rotate(var(--tick-angle));
    transform-origin: 50% 100%;
    pointer-events: none;
}

.gauge-tick::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 6px;
    background: #173a5b;
}

.gauge-tick-major::before {
    width: 3px;
    height: 12px;
    margin-left: -0.5px;
    background: #173a5b;
}

.gauge-kg-mark {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -50%);
    color: #173a5b;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    pointer-events: none;
}

.gauge-needle {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform: rotate(var(--needle-angle));
    transform-origin: center center;
}

.gauge-needle span {
    position: absolute;
    left: -5px;
    top: -118px;
    width: 10px;
    height: 126px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(90deg, #082f55, #176daf);
    clip-path: polygon(50% 0, 100% 88%, 74% 100%, 26% 100%, 0 88%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.gauge-hub {
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border: 5px solid #f5f8fa;
    border-radius: 50%;
    background: #0d629e;
    box-shadow: 0 2px 8px rgba(0,0,0,.36);
}

.gauge-readout {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 67%;
    width: 180px;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-percent {
    position: relative;
    top: -75px;
    color: #0c3154;
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
}

.gauge-caption {
    margin-top: 4px;
    color: #1f425e;
    font-size: 15px;
    font-weight: 700;
}

.gauge-detail {
    color: #1b3e5c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.gauge-limit {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.last-update {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: #738798;
    text-align: center;
    font-size: 13px;
}

.dashboard-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 66px;
    border: 1px solid #dceaf3;
    border-radius: 12px;
    background: linear-gradient(180deg, #f9fcfe, #edf6fb);
    color: #174568;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(23, 86, 127, 0.12);
}

.nav-button.active {
    border-color: #0f6db7;
    background: linear-gradient(135deg, #0e6db8, #2188d5);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 106, 177, 0.25);
}

.nav-symbol {
    margin-right: 7px;
    font-size: 22px;
    vertical-align: -1px;
}


.detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 6px 0 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy);
}

.detail-topbar strong {
    font-size: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #cfe0eb;
    border-radius: 10px;
    background: #f7fbfd;
    color: #174568;
    font-weight: 700;
    text-decoration: none;
}

.back-button:hover {
    background: #edf6fb;
}

.overview-page .dashboard-nav {
    margin-bottom: 10px;
}

.content-card {
    display: none;
    padding: 26px 28px 30px;
    border-radius: 18px;
    background: var(--panel);
}

.content-card.active {
    display: block;
}

.section-heading-row,
.table-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.section-heading-row h2,
.table-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(24px, 3vw, 32px);
}

.table-heading > span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf5fa;
    color: #557086;
    font-size: 13px;
    font-weight: 700;
}

.chart-controls {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chart-controls label {
    display: grid;
    gap: 5px;
}

.chart-controls label > span {
    color: #60788b;
    font-size: 12px;
    font-weight: 700;
}

.chart-controls select {
    min-width: 160px;
    padding: 10px 36px 10px 12px;
    border: 1px solid #cddde8;
    border-radius: 10px;
    background: #fff;
    color: #23445e;
    outline: none;
}

.chart-controls select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(17, 119, 201, 0.1);
}

.chart-summary {
    margin: -4px 0 14px;
    padding: 10px 13px;
    border-radius: 10px;
    background: #f2f8fc;
    color: #49657b;
}

.chart-summary strong {
    color: var(--navy);
}

.chart-wrap {
    height: 430px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.auswertung-tabelle {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.auswertung-tabelle th,
.auswertung-tabelle td {
    padding: 13px 14px;
    border-bottom: 1px solid #e1ebf2;
    text-align: right;
}

.auswertung-tabelle th:first-child,
.auswertung-tabelle td:first-child {
    text-align: left;
}

.auswertung-tabelle th {
    color: #36556e;
    background: #f3f8fb;
    font-size: 13px;
    font-weight: 800;
}

.auswertung-tabelle tbody tr:hover {
    background: #f8fcff;
}

.value-inflow {
    color: var(--green);
    font-weight: 700;
}

.value-use {
    color: var(--blue-dark);
    font-weight: 700;
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    margin-top: 18px;
    padding: 20px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: #587186;
    font-size: 13px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand .drop {
    color: var(--blue);
    font-size: 28px;
    line-height: 1;
}

.footer-brand strong,
.footer-brand span {
    display: block;
}

.footer-brand strong {
    color: var(--navy);
    font-size: 16px;
}

.footer-message {
    color: var(--green);
    font-weight: 700;
}

.footer-update {
    text-align: right;
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr 330px 1fr;
        gap: 18px;
    }

    .stat-card {
        padding-inline: 14px;
    }

    .dashboard-nav {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer {
        grid-template-columns: 1fr 1fr;
    }

    .footer-message {
        display: none;
    }
}

@media (max-width: 780px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .hero-panel {
        padding: 22px 18px 18px;
    }

    .hero-topline {
        align-items: flex-start;
    }

    .hero-date em {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gauge-card {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .stat-card {
        min-height: 160px;
    }

    .dashboard-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .chart-controls {
        width: 100%;
    }

    .chart-controls label {
        flex: 1;
    }

    .chart-controls select {
        width: 100%;
        min-width: 0;
    }

    .chart-wrap {
        height: 360px;
    }
}

@media (max-width: 520px) {
    .hero-topline {
        flex-direction: column;
        gap: 12px;
    }

    .hero-date {
        min-width: 0;
        justify-items: start;
        text-align: left;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gauge-card,
    .stat-card {
        grid-column: auto;
    }

    .gauge {
        width: min(310px, 92vw);
    }

    .gauge-needle span {
        top: -100px;
        height: 108px;
    }

    .stat-card {
        min-height: 0;
    }

    .dashboard-nav {
        grid-template-columns: 1fr;
    }

    .nav-button {
        min-height: 54px;
    }

    .content-card {
        padding: 20px 16px 24px;
    }

    .chart-controls {
        flex-direction: column;
    }

    .chart-controls label {
        width: 100%;
    }

    .chart-wrap {
        height: 310px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-update {
        text-align: left;
    }
}
