/* ================================================================
   Quittungen-Modul — Styles
   Separates CSS für Auszahlungsquittungen & Schlüsselübergaben
   ================================================================ */

/* ── Tabs ──────────────────────────────────────────── */
.q-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.q-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 500;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.q-tab:hover {
    color: var(--text);
}
.q-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

/* ── Type Selection Cards ──────────────────────────── */
.q-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Tab Content ───────────────────────────────────── */
.q-tab-content {
    width: 100%;
}
.q-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.q-type-card:hover {
    border-color: #555;
    background: var(--bg-hover);
}
.q-type-card.selected {
    border-color: #fff;
    background: rgba(255, 255, 255, .06);
}
.q-type-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}
.q-type-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.q-type-desc {
    font-size: .78rem;
    color: var(--text-muted);
}

/* ── Form ──────────────────────────────────────────── */
.q-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* ── Signature Section ─────────────────────────────── */
.q-sig-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}
.q-sig-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.q-sig-block label {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.q-sig-canvas-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #e8e8e8;
    overflow: hidden;
    position: relative;
    touch-action: none;
}
.q-sig-canvas-wrap canvas {
    width: 100%;
    height: 120px;
    display: block;
    cursor: crosshair;
    touch-action: none;
}
.q-sig-clear {
    align-self: flex-start;
}
.q-sig-placeholder {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: var(--bg-input);
}
.q-sig-placeholder .btn {
    font-size: 1rem;
    padding: 12px 24px;
}
.q-sig-done {
    color: #22c55e;
    font-size: .95rem;
    font-weight: 600;
}

/* ── Detail View (Modal) ──────────────────────────── */
.q-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.q-detail-row {
    display: flex;
    gap: 12px;
    font-size: .88rem;
    align-items: baseline;
}
.q-detail-label {
    color: var(--text-muted);
    font-size: .8rem;
    min-width: 130px;
    flex-shrink: 0;
}
.q-detail-sig {
    margin-top: 12px;
}
.q-detail-sig label {
    display: block;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.q-detail-sig img {
    max-width: 200px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
    .q-type-cards {
        grid-template-columns: 1fr;
    }
    .q-form {
        width: 100%;
    }
    .q-sig-section {
        grid-template-columns: 1fr;
    }
    .q-sig-canvas-wrap canvas {
        height: 120px;
    }
    .q-detail-row {
        flex-direction: column;
        gap: 2px;
    }
    .q-detail-label {
        min-width: auto;
    }
    .q-tabs {
        width: 100%;
    }
    .q-tab {
        flex: 1;
        text-align: center;
    }
    .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .q-type-card {
        padding: 20px 16px;
    }
    .q-type-icon {
        font-size: 2.2rem;
    }
    .q-type-label {
        font-size: 1.1rem;
    }
}
