:root {
    --navy: #5b4312;
    --blue: #d19a16;
    --blue-dark: #a66f00;
    --blue-soft: #fff4cf;
    --green: #19863a;
    --green-soft: #edf9f0;
    --purple: #6b49c8;
    --text: #4a3b1e;
    --muted: #8a7754;
    --line: #eadfbd;
    --panel: rgba(255, 255, 255, 0.95);
    --shadow: 0 12px 34px rgba(117, 84, 16, 0.12);
}

* {
    box-sizing: border-box;
}

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

body {

    margin: 0;

    min-height: 100vh;

    font-family: "Segoe UI", Arial, sans-serif;

    color: var(--text);

    background:

        radial-gradient(circle at 50% -10%, rgba(255, 210, 92, 0.34), transparent 38%),

        radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.92), transparent 30%),

        linear-gradient(180deg, #fff4c7 0, #fffaf0 38%, #fff6d8 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(210, 154, 20, 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(232, 205, 142, 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(255, 250, 235, 0.96));
}

.hero-panel::after {
    content: "";
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -92px;
    height: 150px;
    border-radius: 50%;
    background: rgba(224, 170, 48, 0.12);
    box-shadow: 0 -20px 60px rgba(210, 154, 20, 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: #6e5a2f;
    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 #eadfbd;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(117, 84, 16, 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(76, 58, 20, 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: #5b4312;
}

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

.gauge-kg-mark {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -50%);
    color: #5b4312;
    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, #5b4312, #b9820f);
    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: #b9820f;
    box-shadow: 0 2px 8px rgba(0,0,0,.36);
}

.gauge-readout {
    position: absolute;
    z-index: 7;
    inset: 0;
    pointer-events: none;
}

.gauge-percent {
    position: absolute;
    left: 50%;
    top: 33%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    color: #5b4312;
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    text-align: center;
}

.gauge-caption {
    position: absolute;
    left: 50%;
    top: 69%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: #6a5120;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.gauge-detail {
    color: #6a5120;
    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: #8f805f;
    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 #eadfbd;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdf7, #fff4cf);
    color: #6a5120;
    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(117, 84, 16, 0.12);
}

.nav-button.active {
    border-color: #b9820f;
    background: linear-gradient(135deg, #b9820f, #e0ad35);
    color: #fffdf7;
    box-shadow: 0 8px 20px rgba(166, 111, 0, 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 #e4d4a6;
    border-radius: 10px;
    background: #fffaf0;
    color: #6a5120;
    font-weight: 700;
    text-decoration: none;
}

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

.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: #fff4d6;
    color: #7a6740;
    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: #7d6b47;
    font-size: 12px;
    font-weight: 700;
}

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

.chart-controls select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(209, 154, 22, 0.12);
}

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

.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 #eee3c5;
    text-align: right;
}

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

.auswertung-tabelle th {
    color: #6a552b;
    background: #fff8e8;
    font-size: 13px;
    font-weight: 800;
}

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

.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: #7a6843;
    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;
    }
}
