/* Modernes, kontrastreiches B2B-Design ohne externe Webfonts */
:root {
    --bg-main: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #334155;
    --border-color: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --danger: #ef4444;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.header {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--accent-primary);
    color: #93c5fd;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 620px;
    margin: 0 auto;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 0.6rem;
    color: #e2e8f0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.choice-btn {
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 0.75rem;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 76px;
}

.choice-btn:hover {
    border-color: #60a5fa;
    background: #3b4d66;
}

.choice-btn.active {
    border-color: #3b82f6;
    background: rgba(37, 99, 235, 0.15);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.choice-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.choice-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.value-display {
    font-size: 1.05rem;
    font-weight: 700;
    color: #60a5fa;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-surface-elevated);
    outline: none;
    cursor: pointer;
}

.num-input {
    width: 86px;
    padding: 0.5rem;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
}

.num-input:focus,
.text-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.text-input {
    width: 100%;
    padding: 0.65rem;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.checkbox-group {
    margin-top: 1.25rem;
    margin-bottom: 1.75rem;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.92rem;
    color: #cbd5e1;
    user-select: none;
}

.toggle-container input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease-in-out;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #94a3b8;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent-primary);
    color: #93c5fd;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(37, 99, 235, 0.15);
}

.error-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Ergebnisbereich */
.result-headline {
    font-size: 1.45rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
    text-align: center;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 0.75rem;
    text-align: center;
}

.kpi-box.highlight {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
}

.kpi-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.kpi-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.kpi-box.highlight .kpi-value {
    color: #34d399;
}

.kpi-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.notice-box {
    background: rgba(51, 65, 85, 0.6);
    border-left: 3px solid #60a5fa;
    padding: 0.85rem 1.1rem;
    border-radius: 4px;
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 1.75rem;
    line-height: 1.45;
}

.section-title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.recs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rec-card {
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.rec-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.rec-cost {
    font-size: 0.85rem;
    color: #93c5fd;
    font-weight: 600;
}

.rec-benefit {
    font-size: 0.92rem;
    color: #e2e8f0;
}

.rec-dsgvo {
    font-size: 0.82rem;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.rec-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.disclosure-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rec-link-btn {
    display: inline-block;
    background: var(--accent-primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
}

.rec-link-btn:hover {
    background: var(--accent-hover);
}

.feedback-card {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    text-align: center;
}

.feedback-card h4 {
    font-size: 0.98rem;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feedback-msg {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #34d399;
}

.footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(71, 85, 105, 0.4);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 0.4rem;
}

.footer a:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Mobile Optimierung */
@media (max-width: 640px) {
    .header {
        padding: 1.5rem 0 1rem;
    }

    h1 {
        font-size: 1.45rem;
    }

    .choice-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .card {
        padding: 1.25rem;
    }

    .kpi-grid-4 {
        grid-template-columns: 1fr;
    }

    .admin-auth-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Pflichtseiten (Impressum / Datenschutz) & Admin-Dashboard */
.legal-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.back-link {
    margin-bottom: 1rem;
}

.back-link a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

.legal-card h1 {
    margin-bottom: 1.25rem;
}

.legal-card h2 {
    font-size: 1.08rem;
    color: #93c5fd;
    margin-top: 1.35rem;
    margin-bottom: 0.4rem;
}

.legal-card p {
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.legal-note {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-auth-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.admin-input-wrap {
    flex: 2;
}

.admin-select-wrap {
    flex: 1;
}

.admin-btn-wrap {
    flex: 1;
}

.admin-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.kpi-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.target-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.target-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid var(--accent-emerald);
}

.target-pending {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    border: 1px solid var(--accent-primary);
}

.target-warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid var(--accent-amber);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.comment-list {
    list-style: none;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-list li {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    color: #e2e8f0;
}
