/* ==========================================================================
   tp-pane — Abgegrenzter Arbeitsbereich mit Kopf, Scroll-Rumpf und Fuß
   --------------------------------------------------------------------------
   Dasselbe Prinzip wie der Dialog, eine Ebene tiefer: nebeneinanderliegende
   Werkzeugbereiche (Export | Import), deren Aktionen sichtbar bleiben,
   während der Inhalt scrollt.

     .tp-pane-grid
       └── .tp-pane
             ├── .tp-pane__head  (__title, __sub, Aktion rechts)
             ├── .tp-pane__body  (scrollt)
             └── .tp-pane__foot
   ========================================================================== */

.tp-pane-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tp-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
    overflow: hidden;
}

/* ── Kopf ────────────────────────────────────────────────────────────────── */

.tp-pane__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 12px 15px 10px;
    border-bottom: 1px solid var(--border-soft);
}

.tp-pane__title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-1);
}

.tp-pane__sub {
    margin: 1px 0 0;
    font-size: 11.5px;
    color: var(--text-3);
}

/* ── Rumpf ───────────────────────────────────────────────────────────────── */

.tp-pane__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 13px 15px;
}

/* Das Haupt-Textfeld eines Panes füllt die Resthöhe. */
.tp-pane__fill {
    flex: 1;
    min-height: 180px;
}

/* ── Fuß ─────────────────────────────────────────────────────────────────── */

.tp-pane__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    padding: 11px 15px;
    border-top: 1px solid var(--border);
}

/* ── Ergebnis-/Hinweisblock innerhalb eines Panes ────────────────────────── */

.tp-pane__notice {
    flex-shrink: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.tp-pane__meta {
    flex-shrink: 0;
    margin: 0;
    font-size: 11.5px;
    color: var(--text-3);
}

@media (max-width: 980px) {
    .tp-pane-grid {
        grid-template-columns: minmax(0, 1fr);
        overflow-y: auto;
    }

    /* Ohne feste Höhe würden gestapelte Panes auf ihre Mindesthöhe fallen. */
    .tp-pane {
        min-height: 340px;
    }
}
