/* GIMA Kasse – Ergänzungen zu style.css (gemeinsames GIMA-Aussehen) */

.zwei-spalten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
    align-items: start;
}
.zwei-spalten > .card { margin-bottom: 0; }
.zwei-spalten + .card, .zwei-spalten + div { margin-top: 1rem; }

a.stat-card { text-decoration: none; color: inherit; }
a.stat-card:hover { border-color: var(--gima-orange); }
.wert-warn { color: var(--warning); }
.wert-err { color: var(--danger); }

.badge-danger {
    background: rgba(220, 53, 69, .14);
    color: var(--danger);
}

.aktion-zeile {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.aktion-zeile select, .aktion-zeile input[type=text] { flex: 1 1 200px; min-width: 0; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: normal;
    cursor: pointer;
}
.checkbox-label input { width: auto; margin: 0; }

.filter-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .7rem .9rem;
    margin-bottom: 1rem;
}
.filter-bar select, .filter-bar input[type=text] {
    padding: .42rem .6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
}
.filter-bar input[type=text] { min-width: 220px; }

tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--border-subtle); }
tr.zeile-aus td { opacity: .6; }

.blaettern {
    display: flex;
    gap: .8rem;
    align-items: center;
    justify-content: center;
    margin-top: .8rem;
}

.mailtext {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: .9rem;
    line-height: 1.5;
    max-height: 60vh;
    overflow: auto;
    margin: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .8rem 1rem;
}

.kopfzeilen dd { word-break: break-word; font-family: 'Courier New', monospace; font-size: .84rem; }

.ablauf {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    margin: .6rem 0 1rem;
}
.ablauf span {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .6rem;
    font-size: .88rem;
}
.ablauf b { color: var(--gima-orange); }

/* Belegansicht: links die Seiten, rechts die Bearbeitung */
.beleg-raster {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}
.beleg-raster .card { margin-bottom: 1rem; }
@media (max-width: 960px) { .beleg-raster { grid-template-columns: 1fr; } }
.beleg-seite { position: sticky; top: 1rem; }
@media (max-width: 960px) { .beleg-seite { position: static; } }
.seite {
    margin: 0 0 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .6rem;
}
.seite img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
.seite figcaption { font-size: .8rem; margin-top: .4rem; }
.quelle { font-size: .76rem; font-weight: normal; margin-left: .3rem; }
.beleg-seite textarea { width: 100%; font: inherit; }
.filter-bar input[type=date] {
    padding: .36rem .5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
}
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸ "; color: var(--gima-orange); }
details.card[open] > summary::before { content: "▾ "; }

/* Eingangsspiegel */
.spiegel th, .spiegel td { text-align: center; padding: .3rem .25rem; font-size: .8rem; }
.spiegel th { white-space: nowrap; line-height: 1.2; }
.spiegel .spiegel-name { text-align: left; white-space: nowrap; font-size: .86rem; padding-right: .6rem; }
.spiegel th.wochenende, .spiegel td.wochenende { background: var(--border-subtle); }
.spiegel td.spiegel-zelle { min-width: 2.6rem; cursor: default; }
.spiegel td.spiegel-zelle[onclick] { cursor: pointer; }
.spiegel td.spiegel-zelle[onclick]:hover { outline: 2px solid var(--gima-orange); outline-offset: -2px; }
.spiegel td.fehlt { background: rgba(220, 53, 69, .10); }
.sp {
    display: inline-block;
    min-width: 1.15rem;
    padding: 0 .22rem;
    margin: 1px;
    border-radius: 4px;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.35;
}
.sp-k { background: rgba(13, 110, 253, .16); color: #0b5ed7; }
.sp-b { background: rgba(25, 135, 84, .16); color: #157347; }
.sp-c { background: rgba(232, 119, 34, .18); color: #b85a12; }
.sp-u { background: rgba(255, 193, 7, .25); color: #8a6d00; }
[data-theme="dark"] .sp-k { color: #8bb8ff; }
[data-theme="dark"] .sp-b { color: #75d6a3; }
[data-theme="dark"] .sp-c { color: #ffb070; }
[data-theme="dark"] .sp-u { color: #ffd75e; }
.sp-fehlt { color: var(--danger); font-size: .72rem; font-weight: 600; }
.legende { font-size: .8rem; margin: .6rem 0 0; line-height: 1.8; }
