:root {
    --akzent: #8a5a2b;
    --bg: #f7f5f2;
    --karte: #ffffff;
    --rand: #e3ddd5;
    --text: #2b2b2b;
    --fehler: #b3261e;
}

* { box-sizing: border-box; }

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

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: var(--karte);
    border-bottom: 1px solid var(--rand);
}
.topbar .logo { font-weight: 600; }
.topbar .user { font-size: 0.9rem; color: #666; }
.topbar a { color: var(--akzent); }

main { max-width: 720px; margin: 1.5rem auto; padding: 0 1rem; }

.karte {
    background: var(--karte);
    border: 1px solid var(--rand);
    border-radius: 10px;
    padding: 1.5rem;
}

h1 { margin-top: 0; font-size: 1.4rem; }

.kopfzeile { display: flex; justify-content: space-between; align-items: center; }

form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
input, select {
    padding: 0.6rem;
    border: 1px solid var(--rand);
    border-radius: 6px;
    font-size: 1rem;
}

button {
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 6px;
    background: var(--akzent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

a.button {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    background: var(--akzent);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
}

.fehler { color: var(--fehler); font-weight: 500; }
.erfolg { color: #1a7d34; font-weight: 500; }
.leer { color: #888; }

/* Beleg-Ansicht: Bild links, Felder rechts */
.beleg-spalten { display: flex; gap: 1.5rem; align-items: flex-start; margin-top: 1rem; }
.beleg-bild, .beleg-felder { flex: 1; min-width: 0; }
.beleg-bild { display: flex; flex-direction: column; gap: 0.5rem; position: sticky; top: 1rem; }
.beleg-felder { display: flex; flex-direction: column; gap: 1rem; }
#vorschau { max-width: 100%; border: 1px solid var(--rand); border-radius: 8px; }
@media (max-width: 680px) { .beleg-spalten { flex-direction: column; } .beleg-bild { position: static; } }

.filter { flex-direction: row; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.filter label { font-size: 0.85rem; }
button.klein { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.liste form { margin: 0; }
main { max-width: 960px; }

.liste { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.liste th, .liste td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--rand); }
.liste th { font-size: 0.85rem; color: #666; }
