:root {
    --accent: #8d1f2d;
    --accent-dark: #611420;
    --bg: #f5f6f8;
    --text: #1c222b;
    --muted: #6f7a88;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f8f9fc 0%, #eef1f6 100%);
    color: var(--text);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dce2ec;
    padding: 12px 20px;
    position: sticky;
    top: 0;
}

.topbar nav a {
    margin-left: 14px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

.brand { font-weight: 700; color: var(--accent-dark); }
.container { max-width: 1100px; margin: 20px auto; padding: 0 12px; }
.card {
    background: #fff;
    border: 1px solid #dce2ec;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

h1, h2, h3 { margin-top: 0; }

input, select, textarea, button {
    width: 100%;
    padding: 10px;
    margin: 4px 0 12px;
    border-radius: 8px;
    border: 1px solid #cad3df;
    font-size: 14px;
}

button {
    background: var(--accent);
    border: 0;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

button.secondary { background: #4f5d71; }
button.warn { background: #ad5500; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border-bottom: 1px solid #e1e7ef; padding: 10px; text-align: left; vertical-align: top; }
th { background: #f7f9fc; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.flash { padding: 10px; border-radius: 8px; margin-bottom: 10px; }
.flash.success { background: #dcfce7; color: #14532d; }
.flash.error { background: #fee2e2; color: #7f1d1d; }
.flash.info { background: #dbeafe; color: #1e3a8a; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.neu { background: #dbeafe; }
.badge.kontaktiert { background: #fef3c7; }
.badge.kommt { background: #dcfce7; }
.badge.abgesagt { background: #fee2e2; }
.badge.nicht_erreichbar { background: #e5e7eb; }

.muted { color: var(--muted); font-size: 13px; }
.footer { text-align: center; color: var(--muted); padding: 24px 0; }
.welcome { color: var(--muted); }

@media (max-width: 860px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .topbar nav a { margin-left: 0; margin-right: 10px; }

    .table-wrap { overflow: visible; }
    table, thead, tbody, th, td, tr { display: block; width: 100%; }
    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    tr {
        border: 1px solid #dce2ec;
        border-radius: 10px;
        padding: 8px;
        margin-bottom: 10px;
        background: #fff;
    }
    td {
        border: 0;
        border-bottom: 1px solid #eef2f7;
        padding: 8px 6px;
    }
    td:last-child { border-bottom: 0; }
    td::before {
        content: attr(data-label);
        display: block;
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 3px;
        font-weight: 600;
    }
}
