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

.badge-danger {
    background: rgba(220, 53, 69, .14);
    color: var(--danger);
}
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: normal;
    cursor: pointer;
}
.checkbox-label input { width: auto; margin: 0; }

.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;
}
tr.zeile-aus td { opacity: .6; }

/* ── Werkzeug-Kacheln auf der Startseite ── */
.werkzeug-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.werkzeug-kachel {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem 1.2rem 1.1rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .12s, transform .12s, border-color .12s;
}
.werkzeug-kachel:hover {
    border-color: var(--gima-orange);
    box-shadow: 0 4px 14px rgba(230,66,22,.15);
    transform: translateY(-2px);
}
.werkzeug-zeichen {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(230,66,22,.1);
    color: var(--gima-orange);
    display: flex;
    align-items: center;
    justify-content: center;
}
.werkzeug-zeichen .snav-ic { width: 26px; height: 26px; margin: 0; }
.werkzeug-name { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.02rem; margin-bottom: .2rem; }
.werkzeug-text { font-size: .88rem; color: var(--text-muted); line-height: 1.45; }
.werkzeug-bald { border-style: dashed; box-shadow: none; }
.werkzeug-bald:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* ── PDF zusammenführen ── */
.pdf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
    align-items: start;
}
.pdf-layout > .card { margin-bottom: 0; }
.pdf-hilfe ol { padding-left: 1.2rem; margin: 0; line-height: 1.65; font-size: .9rem; }
.pdf-hilfe li + li { margin-top: .35rem; }
.pdf-hilfe .hinweis {
    margin-top: 1rem;
    padding: .7rem .8rem;
    border-radius: 8px;
    background: var(--surface-2);
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Ablagezone: ein <label>, deshalb ausdrücklich als Block-Container */
.ablagezone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 200px;
    padding: 2rem 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s, min-height .15s;
}
.ablagezone:hover, .ablagezone.drueber {
    border-color: var(--gima-orange);
    background: rgba(230,66,22,.05);
}
.ablagezone.drueber { border-style: solid; }
.ablage-kreis {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(230,66,22,.1);
    color: var(--gima-orange);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .4rem;
}
.ablage-kreis .snav-ic { width: 28px; height: 28px; margin: 0; }
.ablagezone-titel { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--text); }
.ablagezone-unter { font-size: .85rem; color: var(--text-muted); }
.ablage-knopf {
    display: inline-block;
    margin-top: .7rem;
    padding: .45rem 1.1rem;
    border-radius: 6px;
    border: 1px solid var(--gima-orange);
    color: var(--gima-orange);
    background: var(--surface);
    font-weight: 600;
    font-size: .88rem;
}
.ablagezone:hover .ablage-knopf { background: var(--gima-orange); color: #fff; }
.js .ablagezone input[type=file] { display: none; }
.ablagezone input[type=file] { margin-top: .8rem; }
/* Sind schon Dateien in der Liste, wird die Zone zur schmalen Zeile. */
.ablagezone.kompakt {
    flex-direction: row;
    min-height: 0;
    padding: .8rem 1.2rem;
    gap: .9rem;
    text-align: left;
    justify-content: flex-start;
}
.ablagezone.kompakt .ablage-kreis { width: 40px; height: 40px; margin: 0; flex-shrink: 0; }
.ablagezone.kompakt .ablage-kreis .snav-ic { width: 20px; height: 20px; }
.ablagezone.kompakt .ablagezone-titel { font-size: .95rem; }
.ablagezone.kompakt .ablage-knopf { margin: 0 0 0 auto; }

.pdf-summe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .2rem;
    font-size: .86rem;
    color: var(--text-muted);
}
.pdf-summe .zu-viel { color: var(--danger); font-weight: 600; }

.datei-liste { list-style: none; margin: 1rem 0 0; padding: 0; }
.datei-zeile {
    display: grid;
    grid-template-columns: auto 2rem minmax(0, 1fr) 11rem auto;
    gap: .6rem;
    align-items: center;
    padding: .55rem .6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    margin-bottom: .45rem;
}
.datei-zeile.ziehen { opacity: .45; }
.datei-zeile.ziel-oben { box-shadow: 0 -3px 0 var(--gima-orange); }
.datei-zeile.ziel-unten { box-shadow: 0 3px 0 var(--gima-orange); }
.datei-griff { cursor: grab; color: var(--text-subtle); font-size: 1.1rem; user-select: none; padding: 0 .2rem; }
.datei-nr {
    width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: rgba(230,66,22,.12); color: var(--gima-orange);
    font-weight: 600; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
}
.datei-name { min-width: 0; }
.datei-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.datei-name span { font-size: .8rem; color: var(--text-muted); }
.datei-seiten input {
    width: 100%;
    padding: .35rem .5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
}
.datei-knoepfe { display: flex; gap: .25rem; }
.datei-knoepfe button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    width: 2rem; height: 2rem;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
}
.datei-knoepfe button:hover { border-color: var(--gima-orange); color: var(--gima-orange); }
.datei-knoepfe button:disabled { opacity: .35; cursor: default; }

.pdf-optionen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .8rem 1rem;
    align-items: end;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-subtle);
}
.pdf-optionen .form-group { margin-bottom: 0; }
.option-feld {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .62rem .9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-size: .92rem;
    white-space: nowrap;
}
.option-feld:hover { border-color: var(--gima-orange); }
.option-feld input { width: auto; margin: 0; accent-color: var(--gima-orange); }
.pdf-knopfzeile { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.2rem; }
.pdf-knopfzeile .rechts { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
#los { padding-left: 1.4rem; padding-right: 1.4rem; }

@media (max-width: 1000px) {
    .pdf-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .datei-zeile { grid-template-columns: auto minmax(0, 1fr) auto; }
    .datei-griff { display: none; }
    .datei-seiten { grid-column: 1 / -1; order: 5; }
    .pdf-optionen { grid-template-columns: 1fr; }
    .option-feld { white-space: normal; }
    .ablagezone.kompakt .ablage-knopf { display: none; }
    .pdf-knopfzeile .rechts { margin-left: 0; }
}
