:root {
    color-scheme: light;
    --bg: #f6f3ee;
    --surface: #ffffff;
    --text: #232323;
    --muted: #66615b;
    --line: #ddd7ce;
    --accent: #27645b;
    --accent-dark: #18463f;
    --danger: #9d2c2c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 40px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--accent-dark);
    font-weight: 750;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

nav a,
.button {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 650;
}

main {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 24px clamp(16px, 4vw, 40px) 48px;
}

h1,
h2 {
    margin: 0;
    line-height: 1.1;
}

h1 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h2 {
    font-size: 1.15rem;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.auth {
    width: min(420px, 100%);
    margin: 40px auto;
}

.auth h1 {
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

input,
select,
textarea,
button {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 120px;
    border: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 7px;
    padding: 10px 14px;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.wide {
    grid-column: 1 / -1;
}

.hidden {
    display: none;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.86rem;
}

tr:last-child td {
    border-bottom: 0;
}

tr.colleague-volker td:first-child {
    border-left: 6px solid #3b82f6;
}

tr.colleague-jochen td:first-child {
    border-left: 6px solid #10b981;
}

tr.colleague-christian td:first-child {
    border-left: 6px solid #f59e0b;
}

tr.colleague-default td:first-child {
    border-left: 6px solid #9ca3af;
}

.muted {
    display: block;
    color: var(--muted);
    font-size: 0.9em;
}

.empty {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.error {
    color: var(--danger);
    font-weight: 700;
}

.stats,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat span {
    color: var(--muted);
    font-weight: 700;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 2.4rem;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: end;
}

.stacked-form,
.simple-list {
    display: grid;
    gap: 12px;
}

.simple-list {
    padding-left: 18px;
}

@media (max-width: 720px) {
    .topbar,
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
    }

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

    .inline-form {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    button,
    .button {
        width: 100%;
    }
}
