:root {
    --bg: #f5f5f4;
    --surface: #ffffff;
    --text: #1c1917;
    --muted: #57534e;
    --border: #d6d3d1;
    --accent: #1d4ed8;
    --ok-bg: #dcfce7;
    --error-bg: #fee2e2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--accent); }

.topbar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: .6rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 600; text-decoration: none; color: var(--text); }
.topbar .mainnav { display: flex; gap: 1rem; flex: 1; }
.topbar .session { color: var(--muted); }
.topbar .tenant { font-weight: 600; }

.content { padding: 1rem; max-width: 1200px; margin: 0 auto; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}
.narrow { max-width: 420px; margin: 2rem auto; }

label { display: block; margin: .75rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea {
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
}
button, .button {
    display: inline-block;
    margin-top: 1rem;
    padding: .45rem 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--border); }

.flash { padding: .6rem .8rem; border-radius: 4px; margin-bottom: 1rem; }
.flash-success { background: var(--ok-bg); }
.flash-error { background: var(--error-bg); }

.form-card { max-width: 640px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.button-row { display: flex; gap: 1rem; align-items: baseline; }
.button-row .button { margin-top: 0; }
td.actions { text-align: right; white-space: nowrap; }
button.danger { background: #b91c1c; }

.muted { color: var(--muted); }
section { margin: 2rem 0; }
.contact-card { margin: .75rem 0; }
.contact-card h3 { margin: 0 0 .25rem; }
table.channels td { padding: .25rem .6rem; }
form.inline { display: inline; }
button.link { margin: 0 0 0 .75rem; padding: 0; background: none; color: var(--accent); text-decoration: underline; }
details.add { margin-top: .75rem; }
details.add summary { cursor: pointer; color: var(--accent); }
.actions-row { margin: .5rem 0 0; }

.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.images figure { margin: 0; }
.images img { display: block; width: 100%; height: 180px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; }
.images figcaption { font-size: .9em; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 9rem; }
.gig-form fieldset { margin: 1rem 0; border: 1px solid var(--border); border-radius: 4px; }
.collection-item { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; padding: .25rem 0; border-bottom: 1px dashed var(--border); }
.collection-item > div { display: flex; gap: .75rem; flex-wrap: wrap; }
.autocomplete { position: relative; }
.autocomplete-results { position: absolute; z-index: 10; left: 0; right: 0; margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; max-height: 16rem; overflow-y: auto; }
.autocomplete-results li { padding: 0; }
.autocomplete-results li.muted { padding: .4rem .6rem; }
.autocomplete-results button { display: block; width: 100%; margin: 0; padding: .4rem .6rem; text-align: left; background: none; color: var(--text); border-radius: 0; }
.autocomplete-results button:hover, .autocomplete-results button:focus { background: var(--bg); }
.filter { margin-left: auto; }
/* Plakatstatus: Farben wie Legacy (Bootstrap 4: danger, warning, success, info, secondary, success; Nachbestellung mediumpurple) */
.poster-status { display: inline-block; padding: .1rem .5rem; border-radius: 3px; color: #fff; text-decoration: none; font-size: .9em; white-space: nowrap; }
.poster-status-1 { background: #dc3545; }
.poster-status-2 { background: #ffc107; color: #212529; }
.poster-status-3 { background: #28a745; }
.poster-status-4 { background: #17a2b8; }
.poster-status-5 { background: #6c757d; }
.poster-status-6 { background: #28a745; }
.poster-status-7 { background: mediumpurple; }
table.poster-orders .status-switch select { padding: .2rem .3rem; }
table.poster-orders .status-switch button { padding: .2rem .6rem; }
.notice { padding: .6rem .8rem; border-radius: 4px; background: #eff6ff; border: 1px solid #bfdbfe; }
.filter-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.filter-form label { margin: 0; }
.filter-form .filter { margin-left: 0; margin-right: auto; }
.status-switch { display: inline-flex; gap: .5rem; align-items: center; }
.status-switch label { margin: 0; }
.status-switch button { margin-top: 0; }
.card.version { margin: .75rem 0; }
.priority-3 { color: #b45309; font-weight: 600; }
.priority-4 { color: #b91c1c; font-weight: 700; }
.gema-0 { color: #b45309; }
.gema-1 { color: #15803d; }
.gema-2 { color: #b91c1c; }
input[type=date], input[type=time], input[type=file],
input[type=number], select { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 4px; font: inherit; }
