/* ================================================
   SEPA Payments & Dues Styles
   Branding: mpu-amme.de | Stil: Clean Schwarz/Weiß
   ================================================ */

/* ── Tab-Leiste ── */
.tabs-bar {
    display: flex;
    gap: 2px;
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border-radius: 0;
    letter-spacing: 0.1px;
}

.tab-btn:hover { color: var(--color-text-primary); }

.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* ── Übersicht: KPI-Leiste ── */
.pay-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.pay-kpi {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 18px 20px;
    text-align: center;
    transition: box-shadow var(--transition-fast);
}
.pay-kpi:hover { box-shadow: var(--shadow-md); }

.pay-kpi-val {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.pay-kpi-label {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 3px;
}

.pay-kpi.kpi-success .pay-kpi-val { color: var(--color-success); }
.pay-kpi.kpi-danger  .pay-kpi-val { color: var(--color-danger); }
.pay-kpi.kpi-accent  .pay-kpi-val { color: var(--color-accent); }

/* Große Symbol-Badges in den KPI-Karten */
.pay-kpi-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    line-height: 1;
    background: var(--color-bg-secondary);
}
.pay-kpi.kpi-success .pay-kpi-icon { background: var(--color-success-bg); }
.pay-kpi.kpi-danger  .pay-kpi-icon { background: var(--color-danger-bg); }
.pay-kpi.kpi-accent  .pay-kpi-icon { background: var(--color-accent-light); }

/* Aktionsleiste (z. B. „Alle auf Gezahlt") */
.pay-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--spacing-lg);
    margin-top: -8px;
}
.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: #15803d; transform: translateY(-1px); }

/* ── Filter-Leiste ── */
.pay-filter-bar {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    margin-bottom: var(--spacing-md);
    background: var(--color-bg-card);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.pay-filter-bar .search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px 8px 36px;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
}

.pay-filter-bar select {
    padding: 8px 28px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-page);
    cursor: pointer;
    appearance: auto;
    min-width: 130px;
    outline: none;
}
.pay-filter-bar select:focus { border-color: var(--color-accent); }

.pay-result-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    white-space: nowrap;
    margin-left: auto;
}

/* ── Karten-Liste (neue Übersicht) ── */
.pay-plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-plan-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}
.pay-plan-card:hover { box-shadow: var(--shadow-md); }

.ppc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    flex-wrap: wrap;
}
.ppc-header:hover { background: rgba(0,0,0,.015); }

.ppc-client {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
}

.ppc-glow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: box-shadow .3s;
}

/* Summary block replaces old KPI bar */
.ppc-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 110px;
}
.ppc-open-amt {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.ppc-amt-open { color: var(--color-danger); }
.ppc-amt-done { color: var(--color-success); }
.ppc-total-sub {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}
.ppc-progress-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.ppt-slim { height: 4px !important; width: 80px !important; flex: none !important; }

.ppc-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-left: auto;
}
.ppc-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ppc-btn-edit { font-size: 0.72rem !important; padding: 3px 8px !important; }
.ppc-btn-del  { font-size: 0.72rem !important; padding: 3px 7px !important; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.ppc-btn-del:hover { background: #fee2e2; }

.ppc-toggle-chevron {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    transition: transform .2s;
    display: inline-block;
    line-height: 1;
    padding: 2px 4px;
}
.ppc-expanded .ppc-toggle-chevron { transform: rotate(180deg); }

/* Mandate warning inline badge */
.ppc-mandat-warn {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
}

/* Chip area: hidden by default, shown when expanded */
.ppc-chips {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px 12px;
    background: var(--color-bg-page);
    border-top: 1px solid var(--color-border-light);
}
.ppc-expanded .ppc-chips { display: flex; }

/* Urgent filter toggle active state */
.btn-filter-active {
    background: var(--color-accent) !important;
    color: #fff !important;
    border-color: var(--color-accent) !important;
}

/* ── Übersichtstabelle (Legacy, nicht mehr im Tab 1) ── */
.pay-table {
    width: 100%;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pay-table table { width: 100%; border-collapse: collapse; }

.pay-table thead th {
    padding: 10px 16px;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    background: var(--color-bg-page);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    white-space: nowrap;
}
.pay-table thead th:last-child { text-align: center; }
.pay-table thead th.col-right  { text-align: right; }

.pay-table-row {
    cursor: pointer;
    transition: background var(--transition-fast);
}
.pay-table-row:hover   { background: var(--color-bg-card-hover); }
.pay-table-row.expanded { background: #faf8f5; }

.pay-table-row td {
    padding: 15px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.pay-table-row td.col-right  { text-align: right; font-variant-numeric: tabular-nums; }
.pay-table-row td.col-center { text-align: center; }

/* Klienten-Zelle */
.pay-client-cell { display: flex; align-items: center; gap: 10px; }

.pay-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--color-bg-page);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.68rem;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.pay-client-name { font-weight: 600; font-size: 0.9rem; color: var(--color-text-primary); white-space: nowrap; }
.pay-client-sub  { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 2px; }

.pay-raten-info  { font-size: 0.8rem; color: var(--color-text-secondary); white-space: nowrap; font-weight: 500; }
.pay-raten-start { font-size: 0.67rem; color: var(--color-text-muted); font-weight: 600; letter-spacing: 0.3px; }

.pay-amount         { font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-amount-success { color: var(--color-success); }
.pay-amount-danger  { color: var(--color-danger); }
.pay-amount-muted   { color: var(--color-text-muted); }

/* Fortschrittsbalken */
.pay-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
}
.pay-progress-track {
    flex: 1;
    height: 5px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.pay-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease-out;
}
.pay-progress-fill.fill-green  { background: var(--color-success); }
.pay-progress-fill.fill-accent { background: var(--color-accent); }
.pay-progress-fill.fill-full   { background: var(--color-success); }

.pay-progress-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    min-width: 30px;
    text-align: right;
}

/* Nächste-Fälligkeit-Pill */
.pay-next-due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.pay-next-due.due-soon     { background: var(--color-danger-bg);  color: var(--color-danger); }
.pay-next-due.due-upcoming { background: var(--color-warning-bg); color: var(--color-warning); }
.pay-next-due.due-later    { background: var(--color-bg-page);    color: var(--color-text-secondary); }
.pay-next-due.due-done     { background: var(--color-success-bg); color: var(--color-success); }

/* Aufklapp-Pfeil */
.pay-expand-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    font-size: 0.78rem;
}
.pay-table-row:hover .pay-expand-toggle { color: var(--color-accent); background: var(--color-accent-light); }
.pay-expand-toggle.open { transform: rotate(180deg); color: var(--color-accent); }

/* ── Detailbereich (aufgeklappt) ── */
.pay-detail-row { display: none; }
.pay-detail-row.open { display: table-row; }
.pay-detail-row td { padding: 0; border-bottom: 2px solid var(--color-border-light); }

.pay-detail-inner {
    background: var(--color-bg-page);
    padding: 16px 20px 20px;
    animation: fadeIn 0.18s ease;
}

.pay-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.pay-rate-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    background: white;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}
.pay-rate-chip:hover { border-color: var(--color-border); box-shadow: var(--shadow-sm); }

.chip-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    transition: background 0.2s, box-shadow 0.2s;
}

/* ── Compact mini-chips (new design) ── */
.pay-rate-chip-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid var(--color-border-light);
    background: white;
    font-size: 0.7rem;
    cursor: default;
    transition: all .15s;
    position: relative;
}
.pay-rate-chip-mini:hover { border-color: var(--color-border); box-shadow: var(--shadow-sm); }

.chip-mini-mon {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 18px;
    text-align: center;
}

.chip-mini-sel {
    padding: 1px 2px;
    border-radius: 3px;
    border: 1px solid transparent;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    outline: none;
    color: var(--color-text-primary);
    max-width: 72px;
}
.chip-mini-sel:focus { border-color: var(--color-accent); background: white; }

/* Mini-chip status colors */
.pay-rate-chip-mini.chip-gezahlt    { background: rgba(22,163,74,.06);   border-color: rgba(22,163,74,.2); }
.pay-rate-chip-mini.chip-angewiesen { background: rgba(37,99,235,.06);   border-color: rgba(37,99,235,.2); }
.pay-rate-chip-mini.chip-faellig    { background: rgba(217,119,6,.08);   border-color: rgba(217,119,6,.25); }
.pay-rate-chip-mini.chip-ruecklaufer{ background: rgba(220,38,38,.07);   border-color: rgba(220,38,38,.22); }
.pay-rate-chip-mini.chip-future     { background: var(--color-bg-page);  border-color: var(--color-border-light); }
.pay-rate-chip-mini.chip-ausgesetzt { background: var(--color-bg-page);  border-color: var(--color-border-light); }
.pay-rate-chip-mini.chip-ende       { background: var(--color-bg-page);  border-color: var(--color-border); }

/* Status-Chips legacy (keep for other potential uses) */
.pay-rate-chip.chip-gezahlt    { background: rgba(22, 163, 74, 0.05);  border-color: rgba(22, 163, 74, 0.18); }
.pay-rate-chip.chip-angewiesen { background: rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.18); }
.pay-rate-chip.chip-faellig    { background: rgba(194, 117, 10, 0.05); border-color: rgba(194, 117, 10, 0.18); }
.pay-rate-chip.chip-ruecklaufer{ background: rgba(220, 38, 38, 0.05);  border-color: rgba(220, 38, 38, 0.18); }
.pay-rate-chip.chip-future     { background: var(--color-bg-page); border-color: var(--color-border-light); }
.pay-rate-chip.chip-ausgesetzt { background: var(--color-bg-page); border-color: var(--color-border-light); }
.pay-rate-chip.chip-ende       { background: var(--color-bg-page); border-color: var(--color-border); }

/* ── Legacy-Kompatibilität ── */
.payment-card, #payments-list { display: flex; flex-direction: column; gap: var(--spacing-md); }
.payment-name { font-weight: 600; color: var(--color-text-primary); }
.payment-meta { font-size: 0.72rem; color: var(--color-text-secondary); }
.toggle { transition: transform var(--transition-fast); }
.toggle.open { transform: rotate(180deg); }
.payment-body { display: none; }
.payment-body.open { display: block; }

.rate-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--color-border-light); }
.rate-row:last-child { border-bottom: none; }

.rate-num {
    width: 24px; height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-bg-page);
    color: var(--color-text-secondary);
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-right: var(--spacing-md);
}
.rate-num.start { background: var(--color-accent-light); color: var(--color-accent); }
.rate-date { width: 100px; font-size: 0.875rem; color: var(--color-text-secondary); }
.rate-select { flex: 1; }
.rate-select select { padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid var(--color-border-light); font-size: 12px; font-weight: 600; outline: none; cursor: pointer; background: white; }
.rate-amount { font-weight: 600; font-size: 0.875rem; color: var(--color-text-primary); }

/* ── Fälligkeiten ── */
.dues-filters {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.filter-field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.filter-field select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-page);
    outline: none;
    cursor: pointer;
}
.filter-field select:focus { border-color: var(--color-accent); }

.dues-kpis { display: flex; gap: var(--spacing-md); margin-bottom: var(--spacing-lg); }

.kpi-chip {
    flex: 1;
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.kpi-chip-val   { font-size: 1.35rem; font-weight: 700; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.kpi-chip-label { font-size: 0.67rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; font-weight: 600; }

/* Fälligkeiten-Gruppen */
.dues-group {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dues-group-header {
    background: var(--color-bg-page);
    padding: 10px var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
}

.dues-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.badge-today  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-soon   { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-later  { background: var(--color-bg-secondary); color: var(--color-text-secondary); }

.dues-sum { font-weight: 700; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }

.dues-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition-fast);
}
.dues-item:last-child { border-bottom: none; }
.dues-item:hover { background: var(--color-bg-card-hover); }
.dues-item.start-rate { background: #faf8f5; }

.dues-name   { font-weight: 600; font-size: 0.875rem; }
.dues-info   { font-size: 0.72rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.dues-amount { font-weight: 700; font-variant-numeric: tabular-nums; }

.rate-num-mini {
    display: inline-block;
    padding: 1px 6px;
    background: var(--color-bg-page);
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}
.rate-num-mini.start { background: var(--color-accent-light); color: var(--color-accent); }

.dues-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    justify-content: flex-end;
}

.btn-sepa { background: #1a1a1a; color: white; }
.btn-sepa:hover { background: #000; box-shadow: 0 4px 14px rgba(0,0,0,0.22); }

/* ── Monatsübersicht ── */
.monthly-selector { margin-bottom: var(--spacing-lg); display: flex; align-items: center; gap: 12px; }
.monthly-selector label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.monthly-selector input { padding: 8px 12px; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: white; font-size: 0.875rem; outline: none; }
.monthly-selector input:focus { border-color: var(--color-accent); }

.monthly-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.monthly-kpi {
    background: var(--color-bg-card);
    padding: 14px var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.monthly-kpi.kpi-wide  { grid-column: span 2; }
.monthly-kpi.kpi-green .monthly-kpi-val { color: var(--color-success); }
.monthly-kpi.kpi-red   .monthly-kpi-val { color: var(--color-danger); }

.monthly-kpi-val   { font-size: 1.2rem; font-weight: 700; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.monthly-kpi-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); font-weight: 700; }

.progress-section {
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}
.progress-header  { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 10px; font-size: 0.875rem; }
.progress-track   { height: 8px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--color-accent); border-radius: var(--radius-full); transition: width 1s ease-out; }

.monthly-details { background: var(--color-bg-card); border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); overflow: hidden; }
.details-header  { padding: 14px var(--spacing-md); font-weight: 600; border-bottom: 1px solid var(--color-border); background: var(--color-bg-page); font-size: 0.875rem; }

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
    animation: slideInRight 0.25s ease forwards;
    opacity: 0;
    transition: background var(--transition-fast);
}
.detail-item:hover  { background: var(--color-bg-card-hover); }
.detail-name        { font-weight: 600; font-size: 0.875rem; }
.detail-date        { font-size: 0.72rem; color: var(--color-text-secondary); margin-top: 2px; }
.detail-type        { color: var(--color-accent); font-weight: 600; }
.detail-amount      { font-weight: 600; margin-right: 12px; font-variant-numeric: tabular-nums; }
.detail-right       { display: flex; align-items: center; gap: 10px; }

/* ── Dashboard-Erweiterungen ── */
.pay-summary { padding: 4px 0; }
.pay-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--color-border-light); font-size: 0.875rem; }
.pay-row:last-of-type { border-bottom: none; margin-bottom: 12px; }
.pay-val   { font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-green { color: var(--color-success); }
.pay-red   { color: var(--color-danger); }

.compact               { display: flex; align-items: center; gap: 12px; }
.compact .progress-track { height: 5px; flex: 1; }
.progress-pct { font-size: 0.72rem; font-weight: 600; }

.status-ok   { color: var(--color-success); font-weight: 600; }
.gcal-synced { color: #1E40AF; background: #DBEAFE; padding: 3px 8px; border-radius: 4px; display: inline-block; font-size: 0.72rem; margin-top: 8px; }

/* ── Import ── */
.import-textarea { width: 100%; font-family: 'Courier New', monospace; font-size: 0.75rem; padding: 12px; background: #141414; color: #e5e0d8; border-radius: var(--radius-md); border: 1px solid #2a2a2a; }
.import-success  { padding: 12px 16px; background: var(--color-success-bg); color: var(--color-success); border-radius: var(--radius-md); margin-top: 16px; font-weight: 600; border-left: 3px solid var(--color-success); }
.import-error    { padding: 12px 16px; background: var(--color-danger-bg);  color: var(--color-danger);  border-radius: var(--radius-md); margin-top: 16px; font-weight: 600; border-left: 3px solid var(--color-danger); }

/* ── Statistik Tab ── */
.stats-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.stats-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.1px;
}

.stats-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stats-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .dues-filters  { flex-direction: column; }
    .dues-actions  { flex-direction: column; }
    .monthly-kpis  { grid-template-columns: 1fr 1fr; }
    .stats-two-col { grid-template-columns: 1fr; }
    .pay-kpi-bar   { grid-template-columns: 1fr 1fr; }
}

/* ── Animationen ── */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* === Leuchten-Reihe v1 — 2026-05-06 === */
/* Additive Darstellung. Aktivierung: Klasse `view-leuchten` auf der Liste.
   Rollback: Klasse entfernen → Chips zurück. */

.ppc-leuchten { display: none; }
.view-leuchten .ppc-chips    { display: none; }
.view-leuchten .ppc-leuchten {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 5px;
    row-gap: 6px;
    padding: 12px 16px 14px;
    background: var(--color-bg-page, #faf8f5);
    border-top: 1px solid var(--color-border-light, #f0ece5);
}
.view-leuchten .ppc-expanded .ppc-leuchten { display: flex; }

/* Wrap fungiert als Klick-Target. Das eingebettete <select> liegt
   transparent darüber und löst den bestehenden Status-Wechsel aus. */
.leuchte-wrap {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .12s ease;
}
.leuchte-wrap:hover { transform: scale(1.3); }
/* Marker: Rate mit angesetztem Wiedereinzug */
.leuchte-wrap.has-wiedereinzug::after {
    content: '↻';
    position: absolute;
    top: -7px;
    right: -6px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-warning);
    pointer-events: none;
}
/* Fälligkeit: Wiedereinzug hervorheben */
.dues-item.wiedereinzug { background: rgba(194, 117, 10, 0.06); }

.leuchte {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #C9C2B5;
    box-shadow: 0 0 4px rgba(201, 194, 181, 0.25);
    transition: background .15s, box-shadow .15s, border-color .15s;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.leuchte-sel {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    /* Normale Schrift behalten, damit das native Dropdown-Menü
       die Optionen lesbar darstellt – der <select> selbst bleibt
       durch opacity:0 unsichtbar. */
    font-size: 0.85rem;
    color: #1c1c1c;
    font-family: inherit;
}
.leuchte-sel option {
    font-size: 0.85rem;
    color: #1c1c1c;
    background: #fff;
    padding: 4px 8px;
}
.leuchte-sel:focus { outline: none; }
.leuchte-sel:focus + * + .leuchte,
.leuchte-wrap:focus-within .leuchte { outline: 2px solid #1c1c1c; outline-offset: 2px; }

/* Status-Farben (Spec) */
.leuchte-wrap.chip-gezahlt    .leuchte { background: #2D9D5F; box-shadow: 0 0 4px rgba(45, 157, 95, 0.45); }
.leuchte-wrap.chip-angewiesen .leuchte { background: #3B82C4; box-shadow: 0 0 4px rgba(59, 130, 196, 0.45); }
.leuchte-wrap.chip-faellig    .leuchte { background: #E8B339; box-shadow: 0 0 4px rgba(232, 179, 57, 0.45); }
.leuchte-wrap.chip-future     .leuchte { background: #E8B339; box-shadow: 0 0 4px rgba(232, 179, 57, 0.45); }
.leuchte-wrap.chip-ruecklaufer .leuchte { background: #D64545; box-shadow: 0 0 4px rgba(214, 69, 69, 0.55); }
.leuchte-wrap.chip-ausgesetzt .leuchte {
    background: transparent;
    border: 1px dashed #9A9485;
    box-shadow: none;
}
.leuchte-wrap.chip-ende       .leuchte {
    background: #C9C2B5;
    box-shadow: none;
    opacity: 0.55;
}

/* Hover: stärkerer Glow */
.leuchte-wrap:hover.chip-gezahlt    .leuchte { box-shadow: 0 0 8px rgba(45, 157, 95, 0.7); }
.leuchte-wrap:hover.chip-angewiesen .leuchte { box-shadow: 0 0 8px rgba(59, 130, 196, 0.7); }
.leuchte-wrap:hover.chip-faellig    .leuchte,
.leuchte-wrap:hover.chip-future     .leuchte { box-shadow: 0 0 8px rgba(232, 179, 57, 0.7); }
.leuchte-wrap:hover.chip-ruecklaufer .leuchte { box-shadow: 0 0 8px rgba(214, 69, 69, 0.8); }

/* Trenner zwischen Startrate und regulären Raten */
.leuchten-trenner {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #C9C2B5;
    margin: 0 5px;
    flex: 0 0 auto;
}

/* Markierung der "Extra"-Leuchten (Rückläufer am Ende) – dezent abgesetzt */
.leuchte-wrap.is-extra::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px dashed rgba(214, 69, 69, 0.45);
    border-radius: 50%;
    pointer-events: none;
}

/* Tooltip: JS-gesteuert auf <body> – verhindert Clipping durch overflow:hidden
   der umgebenden Karte. Element wird einmal lazy erzeugt. */
#leuchte-tip {
    position: fixed;
    background: #1B2A4A;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.35;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: pre;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 9999;
    font-variant-numeric: tabular-nums;
    display: none;
    max-width: 280px;
}
/* === /Leuchten-Reihe v1 === */
