:root {
    /* Die neuen modernisierten Farben */
    --bg: #0f172a; /* Dunkelblau-Schwarz */
    --panel: rgba(30, 41, 59, 0.7); /* Glass-Panel */
    --card: rgba(30, 41, 59, 0.5); /* Glass-Card */
    --muted: rgba(255, 255, 255, 0.05); /* Dezente Abhebung */
    --txt: #f8fafc; /* Fast Weiß */
    --sub: #94a3b8; /* Blaugrau für Nebentexte */
    --acc: #2ecc71; /* Electric Green */
    --acc-2: #27ae60; /* Dunkleres Grün */
    --good: #2ecc71;
    --warn: #f59e0b;
    --bad: #ef4444;
    --br: 14px;
    --shadow: 0 8px 25px rgba(0,0,0,0.3);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg); /* Dark Background */
    color: var(--txt);
    font: 15px/1.5 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
}

a {
    color: var(--acc);
}

.wrap {
    max-width: 1200px;
    margin: 36px auto;
    padding: 0 18px;
}

header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--primary);
}
    .logo img {
        height: 35px;
        border-radius: 8px;
    }
.title {
    font-size: clamp(22px,3.2vw,34px);
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--primary);
}

.subtitle {
    color: var(--sub);
    font-size: 13px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Angepasste Border-Farbe */
    border-radius: var(--br);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.grid {
    gap: 16px;
}

    .grid.cols-2 {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .grid.cols-3 {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

.controls {
    padding: 16px;
}

    .controls .row {
        display: grid;
        grid-template-columns: repeat(6,minmax(0,1fr));
        gap: 10px;
        align-items: end;
    }

label {
    font-size: 12px;
    color: var(--sub);
    display: block;
    margin: 0 0 6px;
}

input, select, button, textarea {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Dunklere Border */
    background: rgba(15, 23, 42, 0.5); /* Dunkle Inputs */
    color: var(--txt);
    outline: none;
}

    input::placeholder {
        color: #64748b;
    }

button {
    cursor: pointer;
    transition: .18s transform ease, .18s background-color ease, .18s box-shadow ease;
}

    button:hover {
        transform: translateY(-1px);
    }

.btn {
    background: linear-gradient(180deg, var(--acc), var(--acc-2));
    border: none;
    color: #0f172a; /* Dunkler Text auf hellem Grün */
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
}

    .btn.secondary {
        background: rgba(255, 255, 255, 0.05);
        color: var(--txt);
    }

    .btn.ghost {
        background: transparent;
        border: 1px dashed rgba(255, 255, 255, 0.2);
        color: var(--sub);
    }

    .btn.warn {
        background: linear-gradient(180deg, var(--warn), #d97706);
        color: #fff;
    }

.bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.searchbar {
    display: flex;
    gap: 10px;
    align-items: end;
}

footer {
    background: var(--panel);
    color: var(--sub);
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

    .footer-links a {
        color: var(--sub);
    }

        .footer-links a:hover {
            color: var(--acc);
        }

.copy {
    text-align: center;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

thead th, tbody td {
    text-align: left;
    padding: 10px 12px;
}

thead th {
    font-size: 12px;
    color: var(--sub);
    user-select: none;
    cursor: pointer;
}

tbody tr {
    background: var(--muted);
    border-radius: 14px;
    transition: background 0.2s ease;
}

    tbody tr:hover {
        background: rgba(46, 204, 113, 0.1); /* Dezentes Grün beim Hover */
    }

    tbody tr td:first-child {
        border-top-left-radius: 14px;
        border-bottom-left-radius: 14px;
    }

    tbody tr td:last-child {
        border-top-right-radius: 14px;
        border-bottom-right-radius: 14px;
    }

    tbody tr td {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

        tbody tr td:first-child {
            border-left: 1px solid rgba(255, 255, 255, 0.05);
        }

        tbody tr td:last-child {
            border-right: 1px solid rgba(255, 255, 255, 0.05);
        }

.num {
    text-align: right;
    white-space: nowrap;
}

.del {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sub);
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
}

.totals {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
    margin-top: 8px;
}

.pill {
    background: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
}

    .pill .big {
        font-weight: 800;
        font-size: 20px;
        color: var(--acc); /* Zahlen in Akzentfarbe */
    }

.good {
    color: var(--good);
}

.bad {
    color: var(--bad);
}

.muted {
    color: var(--sub);
}

.hint {
    font-size: 12px;
    color: var(--sub);
}

.charts {
    padding: 16px;
    display: grid;
    gap: 16px;
}

.chart-card {
    width: 100%;
    max-width: 600px; /* oder was Sinn macht */
    height: 300px; /* fixe Höhe */
    margin: 0 auto;
}

    .chart-card canvas {
        width: 100% !important;
        height: 100% !important;
    }

canvas {
    width: 100%;
    height: 300px;
}

.footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--sub);
}

.file {
    position: relative;
    display: inline-block;
}

    .file input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

@media (max-width:768px) {
    .controls .row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .grid.cols-2, .grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .totals {
        grid-template-columns: 1fr 1fr;
    }

    thead {
        display: none;
    }

    table, tbody, tr, td {
        display: block;
        width: 100%;
    }

        tbody tr {
            margin: 10px 0;
        }

        tbody td {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            align-items: center;
        }

            tbody td::before {
                content: attr(data-label);
                color: var(--sub);
                font-weight: 600;
            }

    .num {
        text-align: left;
    }

    canvas {
        height: 240px;
    }
}

@media (max-width:480px) {
    input, select, button {
        font-size: 14px;
        padding: 12px;
    }

    .btn {
        min-height: 44px;
    }
}

/* Desktop: Tabelle */
.table-view {
    display: table;
}

.accordion-view {
    display: none;
}

/* Mobile */
@media (max-width: 960px) {
    .table-view {
        display: none;
    }

    .accordion-view {
        display: block;
    }

    .accordion-item {
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-bottom: 8px;
        padding: 8px 12px;
        background: rgba(30, 41, 59, 0.8);
    }

    .accordion-header {
        display: flex;
        justify-content: space-between;
        cursor: pointer;
        font-weight: bold;
    }

    .accordion-content {
        display: none;
        padding-top: 6px;
    }

        .accordion-content.active {
            display: block;
        }
}

.affiliate-link {
    text-decoration: none;
    background: rgba(16, 185, 129, 0.15); /* Dezentes Grün */
    color: #10b981;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .affiliate-link:hover {
        background: #10b981;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    }
.device-img {
    width: 160px; /* passende Thumbnail-Größe */
    
    object-fit: contain; /* Bild passt sich schön an */
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px; /* optional für abgerundete Ecken */
}