/* ============================================================
   DPSG Leiterbereich – Frontend Styles
   Farben nach DPSG Corporate Design (Stand Juli 2014)
   Primär-Blau: #003056  |  Akzent-Rot: #810a1a
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --dpsg-blue:      #003056;
    --dpsg-blue-mid:  #004070;
    --dpsg-red:       #810a1a;
    --dpsg-green:     #00823c;
    --dpsg-beige:     #ecdfcb;
    --dpsg-beige-mid: #c7bdad;
    --dpsg-text:      #1a1a2e;
    --dpsg-muted:     #64748b;
    --dpsg-border:    #e2e8f0;
    --dpsg-bg:        #f8fafc;
    --radius:         6px;
    --shadow:         0 2px 12px rgba(0,48,86,.10);
}

/* ── Standalone page wrapper (template override) ────────────── */
.dpsg-lb-standalone-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    box-sizing: border-box;
}

/* ── Login ──────────────────────────────────────────────────── */
.dpsg-lb-login {
    max-width: 440px;
    margin: 40px auto;
    font-family: Calibri, Arial, sans-serif;
}

.dpsg-lb-login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 28px rgba(0,48,86,.18);
    overflow: hidden;
}

.dpsg-lb-login-header {
    background: var(--dpsg-blue);
    color: #fff;
    padding: 32px 28px 28px;
    text-align: center;
}

.dpsg-lb-lily {
    display: block;
    margin-bottom: 10px;
    line-height: 1;
    text-align: center;
}

.dpsg-lb-lily .dpsg-lb-lilie-img {
    height: 52px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Weiß auf dunklem Hintergrund */
.dpsg-lb-login-header .dpsg-lb-lilie-img,
.dpsg-lb-dash-header  .dpsg-lb-lilie-img {
    filter: brightness(0) invert(1);
}

.dpsg-lb-login-header h2 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.dpsg-lb-login-header p {
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}

.dpsg-lb-form {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dpsg-lb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dpsg-lb-field label {
    font-weight: 600;
    font-size: 14px;
    color: var(--dpsg-blue);
}

.dpsg-lb-field input[type="text"],
.dpsg-lb-field input[type="password"] {
    padding: 11px 13px;
    border: 1.5px solid var(--dpsg-border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}

.dpsg-lb-field input:focus {
    outline: none;
    border-color: var(--dpsg-blue);
    box-shadow: 0 0 0 3px rgba(0,48,86,.12);
}

/* ── Buttons ────────────────────────────────────────────────── */
.dpsg-lb-btn {
    background: var(--dpsg-blue);
    color: #fff !important;
    border: none;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background .2s, transform .1s;
    font-family: inherit;
    line-height: 1.4;
}

.dpsg-lb-btn:hover {
    background: var(--dpsg-blue-mid);
    transform: translateY(-1px);
}

.dpsg-lb-btn:active {
    transform: translateY(0);
}

.dpsg-lb-btn-outline {
    background: transparent;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,.6);
    font-size: 13px;
    padding: 8px 16px;
    font-weight: 600;
}

.dpsg-lb-btn-outline:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
}

.dpsg-lb-forgot {
    text-align: center;
    font-size: 13px;
    color: var(--dpsg-red);
    text-decoration: none;
}

.dpsg-lb-forgot:hover {
    text-decoration: underline;
}

/* Already-logged-in block */
.dpsg-lb-login-already {
    text-align: center;
    background: #fff;
    border: 1px solid var(--dpsg-border);
    border-top: 3px solid var(--dpsg-blue);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 440px;
    margin: 40px auto;
}

.dpsg-lb-login-already .dpsg-lb-lily {
    color: var(--dpsg-blue);
    margin-bottom: 12px;
}

.dpsg-lb-logout-link {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--dpsg-muted);
}

/* ── Alerts ─────────────────────────────────────────────────── */
.dpsg-lb-alert {
    padding: 13px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.dpsg-lb-alert-error {
    background: #fef2f2;
    color: var(--dpsg-red);
    border: 1px solid #fecaca;
}

.dpsg-lb-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.dpsg-lb-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ── Dashboard ──────────────────────────────────────────────── */
.dpsg-lb-dashboard {
    font-family: Calibri, Arial, sans-serif;
    color: var(--dpsg-text);
}

.dpsg-lb-dash-header {
    background: var(--dpsg-blue);
    color: #fff;
    padding: 22px 28px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.dpsg-lb-dash-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.dpsg-lb-dash-title .dpsg-lb-lily {
    display: inline;
    margin: 0;
    line-height: 1;
    text-align: left;
}

.dpsg-lb-dash-title .dpsg-lb-lily .dpsg-lb-lilie-img {
    height: 46px;
    width: auto;
    display: inline;
    vertical-align: middle;
    margin: 0;
}

.dpsg-lb-dash-title h2 {
    margin: 0 0 2px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.dpsg-lb-dash-title p {
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.dpsg-lb-tabs {
    display: flex;
    gap: 2px;
    background: #002244;
    padding: 0 20px;
    border-radius: 0;
    margin-bottom: 24px;
}

.dpsg-lb-tab {
    background: none;
    border: none;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
    font-family: inherit;
}

.dpsg-lb-tab:hover {
    color: #fff;
}

.dpsg-lb-tab.active {
    color: #fff;
    border-bottom-color: var(--dpsg-beige);
}

/* ── Tab content ────────────────────────────────────────────── */
.dpsg-lb-tab-content {
    display: none;
}

.dpsg-lb-tab-content.active {
    display: block;
}

/* ── Stats ──────────────────────────────────────────────────── */
.dpsg-lb-stats {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.dpsg-lb-stat-card {
    background: #fff;
    border: 1px solid var(--dpsg-border);
    border-left: 3px solid var(--dpsg-blue);
    border-radius: 8px;
    padding: 16px 18px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 12px rgba(0,48,86,.06);
    transition: transform .15s, box-shadow .15s;
}

.dpsg-lb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0,48,86,.14);
}

.dpsg-lb-stat-card .stat-num {
    font-size: 30px;
    font-weight: 800;
    color: var(--dpsg-blue);
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
}

.dpsg-lb-stat-card .stat-label {
    font-size: 11px;
    color: var(--dpsg-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Filter bar ─────────────────────────────────────────────── */
.dpsg-lb-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dpsg-lb-filter-bar input,
.dpsg-lb-filter-bar select {
    padding: 9px 12px;
    border: 1.5px solid var(--dpsg-border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.dpsg-lb-filter-bar input {
    flex: 1;
    min-width: 200px;
}

.dpsg-lb-filter-bar input:focus,
.dpsg-lb-filter-bar select:focus {
    outline: none;
    border-color: var(--dpsg-blue);
}

/* ── Data table ─────────────────────────────────────────────── */
.dpsg-lb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.dpsg-lb-muted {
    color: var(--dpsg-muted);
}

.dpsg-lb-age {
    text-align: center;
    width: 60px;
    color: var(--dpsg-muted);
    font-variant-numeric: tabular-nums;
}

.dpsg-lb-birthdate {
    white-space: nowrap;
    width: 100px;
    color: var(--dpsg-muted);
    font-variant-numeric: tabular-nums;
}

.dpsg-ev-ext {
    font-size: 11px;
    opacity: .6;
}

.dpsg-lb-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 14px;
}

.dpsg-lb-table thead tr {
    background: var(--dpsg-blue);
    color: #fff;
}

.dpsg-th-sort {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.dpsg-th-sort::after {
    content: ' ⇅';
    opacity: .35;
    font-size: 11px;
}

.dpsg-th-sort.sort-asc::after  { content: ' ↑'; opacity: .9; }
.dpsg-th-sort.sort-desc::after { content: ' ↓'; opacity: .9; }

.dpsg-th-sort:hover { background: var(--dpsg-blue-mid); }

.dpsg-lb-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.dpsg-lb-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--dpsg-border);
    color: var(--dpsg-text);
}

.dpsg-lb-table tbody tr:last-child td {
    border-bottom: none;
}

.dpsg-lb-table tbody tr:hover td {
    background: var(--dpsg-bg);
}

.dpsg-lb-table tbody tr.dpsg-row-leiter td {
    background: #f0f2f5;
}

.dpsg-lb-table tbody tr.dpsg-row-leiter:hover td {
    background: #e8eaee;
}

/* ── Badges ─────────────────────────────────────────────────── */
.dpsg-lb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dpsg-badge-blue   { background: #dbeafe; color: #1e40af; }
.dpsg-badge-green  { background: #dcfce7; color: #166534; }
.dpsg-badge-yellow { background: #fef9c3; color: #854d0e; }
.dpsg-badge-orange { background: #ffedd5; color: #9a3412; }
.dpsg-badge-gray   { background: #f3f4f6; color: #374151; }
.dpsg-badge-red    { background: #fee2e2; color: #991b1b; }
.dpsg-zuschuss-badge { cursor: pointer; user-select: none; transition: opacity .15s; }
.dpsg-zuschuss-badge:hover { opacity: .75; }
.dpsg-payment-badge  { cursor: pointer; user-select: none; transition: opacity .15s; }
.dpsg-payment-badge:hover  { opacity: .75; }

/* ── Loading spinner ────────────────────────────────────────── */
.dpsg-lb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 20px;
    color: var(--dpsg-muted);
    font-size: 15px;
}

.dpsg-lb-loading span {
    display: block;
    width: 38px;
    height: 38px;
    border: 3px solid var(--dpsg-border);
    border-top-color: var(--dpsg-blue);
    border-radius: 50%;
    animation: dpsg-spin .7s linear infinite;
}

@keyframes dpsg-spin { to { transform: rotate(360deg); } }

/* ── Empty / error states ───────────────────────────────────── */
.dpsg-lb-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--dpsg-muted);
    background: #fff;
    border-radius: var(--radius);
    border: 1.5px dashed var(--dpsg-border);
    font-size: 15px;
}

.dpsg-lb-error-msg {
    background: #fef2f2;
    color: var(--dpsg-red);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 14px;
}

/* ── Row count ──────────────────────────────────────────────── */
.dpsg-fn-row-count {
    text-align: right;
    font-size: 12px;
    color: var(--dpsg-muted);
    margin-top: 8px;
}

/* ── Cache note ─────────────────────────────────────────────── */
.dpsg-lb-cache-note {
    margin-top: 18px;
    font-size: 12px;
    color: var(--dpsg-muted);
    text-align: right;
}

.dpsg-lb-cache-note a {
    color: var(--dpsg-blue);
}

/* ── Stufe badge (in header) ─────────────────────────────────── */
.dpsg-lb-stufe-badge {
    background: rgba(255,255,255,.2);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ── Section title ──────────────────────────────────────────── */
.dpsg-lb-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dpsg-muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dpsg-lb-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--dpsg-blue);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Stats: main row (total + gender) ───────────────────────── */
.dpsg-lb-stats-main {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 14px;
}

/* ── Stats: stufen row – same column width as main ───────────── */
.dpsg-lb-stats-stufen {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 28px;
}

/* ── Accent colors: left border + number color ───────────────── */
.dpsg-lb-stat-card.accent-blue   { border-left-color: #2563eb; }
.dpsg-lb-stat-card.accent-blue .stat-num { color: #2563eb; }
.dpsg-lb-stat-card.accent-red    { border-left-color: var(--dpsg-red); }
.dpsg-lb-stat-card.accent-red .stat-num { color: var(--dpsg-red); }
.dpsg-lb-stat-card.accent-green  { border-left-color: var(--dpsg-green); }
.dpsg-lb-stat-card.accent-green .stat-num { color: var(--dpsg-green); }
.dpsg-lb-stat-card.accent-purple { border-left-color: #7c3aed; }
.dpsg-lb-stat-card.accent-purple .stat-num { color: #7c3aed; }

/* ── DPSG Stufenfarben (Corporate Design) ────────────────────── */
/* Wölflinge: Orange */
.dpsg-lb-stat-card.accent-woelflinge { border-left-color: #e4610f; }
.dpsg-lb-stat-card.accent-woelflinge .stat-num { color: #e4610f; }
/* Jungpfadfinder: Blau */
.dpsg-lb-stat-card.accent-juffis { border-left-color: #004f9f; }
.dpsg-lb-stat-card.accent-juffis .stat-num { color: #004f9f; }
/* Pfadfinder: Grün */
.dpsg-lb-stat-card.accent-pfadis { border-left-color: var(--dpsg-green); }
.dpsg-lb-stat-card.accent-pfadis .stat-num { color: var(--dpsg-green); }
/* Rover: Rot */
.dpsg-lb-stat-card.accent-rover { border-left-color: var(--dpsg-red); }
.dpsg-lb-stat-card.accent-rover .stat-num { color: var(--dpsg-red); }

/* ── Function navigation ─────────────────────────────────────── */
.dpsg-lb-funktion-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.dpsg-lb-funktion-btn {
    background: #fff;
    border: 1.5px solid var(--dpsg-border);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dpsg-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dpsg-lb-funktion-btn:hover {
    border-color: var(--dpsg-blue);
    color: var(--dpsg-blue);
}

.dpsg-lb-funktion-btn.active {
    background: var(--dpsg-blue);
    border-color: var(--dpsg-blue);
    color: #fff;
}

.dpsg-lb-fn-count {
    background: rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.dpsg-lb-funktion-btn:not(.active) .dpsg-lb-fn-count {
    background: var(--dpsg-border);
    color: var(--dpsg-text);
}

/* ── Function panels ─────────────────────────────────────────── */
.dpsg-lb-funktion-panel { display: none; }
.dpsg-lb-funktion-panel.active { display: block; }

/* ── Event list: clickable rows ─────────────────────────────── */
#dpsg-ev-table tbody tr.dpsg-ev-clickable {
    cursor: pointer;
}
#dpsg-ev-table tbody tr.dpsg-ev-clickable:hover td {
    background: rgba(0, 48, 86, .05);
}
.dpsg-ev-arrow {
    text-align: center;
    width: 28px;
    color: var(--dpsg-muted);
    font-size: 18px;
    font-weight: 700;
}

/* ── Event detail view ──────────────────────────────────────── */
.dpsg-lb-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px solid var(--dpsg-border);
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dpsg-blue);
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 16px;
    transition: background .15s, border-color .15s;
}
.dpsg-lb-back-btn:hover {
    background: var(--dpsg-bg);
    border-color: var(--dpsg-blue);
}
.dpsg-lb-event-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dpsg-blue);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dpsg-border);
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Ensure plugin content is always visible above theme navigation overlays */
.dpsg-lb-login,
.dpsg-lb-dashboard {
    position: relative;
    z-index: 10;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
}

/* Force all Elementor ancestor containers visible when they wrap our content.
   :has() is supported in all modern mobile browsers (iOS 15.4+, Chrome 105+). */
.elementor-section:has(.dpsg-lb-login),
.elementor-section:has(.dpsg-lb-dashboard),
.elementor-column:has(.dpsg-lb-login),
.elementor-column:has(.dpsg-lb-dashboard),
.elementor-widget:has(.dpsg-lb-login),
.elementor-widget:has(.dpsg-lb-dashboard),
.elementor-widget-wrap:has(.dpsg-lb-login),
.elementor-widget-wrap:has(.dpsg-lb-dashboard),
.elementor-widget-container:has(.dpsg-lb-login),
.elementor-widget-container:has(.dpsg-lb-dashboard),
.e-con:has(.dpsg-lb-login),
.e-con:has(.dpsg-lb-dashboard),
.e-con-inner:has(.dpsg-lb-login),
.e-con-inner:has(.dpsg-lb-dashboard) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .dpsg-lb-login {
        margin: 16px auto;
        padding: 0 12px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    .dpsg-lb-login-card {
        border-radius: 8px;
    }

    .dpsg-lb-login-header {
        padding: 24px 20px 20px;
    }

    .dpsg-lb-login-header h2 {
        font-size: 22px;
    }

    .dpsg-lb-form {
        padding: 20px 18px;
        gap: 14px;
    }

    .dpsg-lb-btn {
        width: 100%;
        padding: 14px 22px;
        font-size: 16px;
    }

    .dpsg-lb-login-already {
        margin: 16px auto;
        padding: 24px 18px;
    }

    .dpsg-lb-dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 16px;
        border-radius: 0;
    }

    .dpsg-lb-dash-header .dpsg-lb-btn {
        width: auto;
        align-self: flex-start;
    }

/* ── Stufenguthaben cards ───────────────────────────────────── */
.dpsg-lb-konto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 4px 0 8px;
}
.dpsg-lb-konto-card {
    background: #fff;
    border: 1px solid var(--dpsg-border);
    border-left: 5px solid var(--dpsg-blue);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dpsg-lb-konto-card.accent-woelflinge { border-left-color: #e4610f; }
.dpsg-lb-konto-card.accent-juffis     { border-left-color: #004f9f; }
.dpsg-lb-konto-card.accent-pfadis     { border-left-color: var(--dpsg-green); }
.dpsg-lb-konto-card.accent-rover      { border-left-color: var(--dpsg-red); }
.dpsg-lb-konto-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--dpsg-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.dpsg-lb-konto-amount { line-height: 1; }
.dpsg-lb-konto-balance {
    font-size: 30px;
    font-weight: 700;
    color: var(--dpsg-text);
    font-variant-numeric: tabular-nums;
}
.dpsg-lb-konto-card.accent-woelflinge .dpsg-lb-konto-balance { color: #e4610f; }
.dpsg-lb-konto-card.accent-juffis .dpsg-lb-konto-balance     { color: #004f9f; }
.dpsg-lb-konto-card.accent-pfadis .dpsg-lb-konto-balance     { color: var(--dpsg-green); }
.dpsg-lb-konto-card.accent-rover .dpsg-lb-konto-balance      { color: var(--dpsg-red); }
.dpsg-lb-konto-na    { font-size: 28px; color: var(--dpsg-muted); }
.dpsg-lb-konto-error { font-size: 13px; color: var(--dpsg-red); }
.dpsg-lb-konto-stand { font-size: 13px; color: var(--dpsg-muted); margin: 0 0 14px; }

.dpsg-lb-konto-clickable {
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.dpsg-lb-konto-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
}
.dpsg-lb-konto-clickable.dpsg-lb-konto-active {
    box-shadow: 0 0 0 2px var(--dpsg-blue);
}
.dpsg-lb-konto-hint {
    font-size: 11px;
    color: var(--dpsg-muted);
    margin-top: 4px;
    opacity: .65;
}

.dpsg-lb-konto-detail {
    background: #fff;
    border: 1px solid var(--dpsg-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}
.dpsg-lb-konto-detail-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px;
    font-size: 15px;
    gap: 16px;
}
.dpsg-lb-konto-detail-header > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
}
.dpsg-lb-konto-detail-close {
    cursor: pointer;
    color: var(--dpsg-muted);
    background: #f3f4f6;
    border: 1px solid var(--dpsg-border);
    border-radius: 20px;
    font-size: 12px;
    line-height: 1;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    transition: background .15s, color .15s, border-color .15s;
}
.dpsg-lb-konto-detail-close:hover {
    background: var(--dpsg-blue);
    color: #fff;
    border-color: var(--dpsg-blue);
}

.dpsg-lb-tx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dpsg-lb-tx-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--dpsg-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 12px 8px 0;
    border-bottom: 1px solid var(--dpsg-border);
}
.dpsg-lb-tx-table thead th:last-child { text-align: right; padding-right: 0; }
.dpsg-lb-tx-table tbody td {
    padding: 9px 12px 9px 0;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}
.dpsg-lb-tx-table tbody td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.dpsg-lb-tx-date { color: var(--dpsg-muted) !important; white-space: nowrap !important; font-size: 12px !important; }
.dpsg-lb-tx-start td { font-weight: 700; color: var(--dpsg-blue) !important; }
.dpsg-lb-tx-total {
    text-align: right;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--dpsg-border);
    font-size: 14px;
}

/* ── Group assignment UI (spans, not buttons – avoids theme overrides) ── */
.dpsg-assign-group-btn {
    display: inline;
    font-size: 11px;
    color: var(--dpsg-muted);
    font-family: Calibri, Arial, sans-serif;
    cursor: pointer;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 3px;
    opacity: 0.65;
    user-select: none;
    transition: opacity .15s, color .15s, background .15s;
}
.dpsg-assign-group-btn:hover {
    opacity: 1;
    color: var(--dpsg-blue);
    background: rgba(0,48,86,.07);
}
.dpsg-assign-group-sel {
    font-size: 12px !important;
    font-family: Calibri, Arial, sans-serif !important;
    padding: 2px 4px !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.3 !important;
    border: 1px solid var(--dpsg-border) !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: var(--dpsg-text) !important;
    vertical-align: middle !important;
    outline: none !important;
    box-shadow: none !important;
    max-width: 130px !important;
    width: auto !important;
}
.dpsg-assign-group-sel:focus { border-color: var(--dpsg-blue) !important; }
.dpsg-assign-group-save,
.dpsg-assign-group-cancel {
    display: inline;
    font-size: 14px;
    cursor: pointer;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 2px;
    user-select: none;
    transition: background .15s;
}
.dpsg-assign-group-save   { color: var(--dpsg-green); }
.dpsg-assign-group-cancel { color: var(--dpsg-red); }
.dpsg-assign-group-save:hover   { background: rgba(0,130,60,.12); }
.dpsg-assign-group-cancel:hover { background: rgba(129,10,26,.12); }

    .dpsg-lb-tabs        { overflow-x: auto; flex-wrap: nowrap; padding: 0 12px; }
    .dpsg-lb-tab         { white-space: nowrap; padding: 12px 14px; font-size: 13px; }
    .dpsg-lb-stats       { grid-template-columns: 1fr 1fr; }
    .dpsg-lb-stats-main,
    .dpsg-lb-stats-stufen { grid-template-columns: 1fr 1fr; }
    .dpsg-lb-table       { font-size: 13px; }
    .dpsg-lb-table th,
    .dpsg-lb-table td    { padding: 9px 10px; }
    .dpsg-lb-funktion-nav { gap: 4px; }
    .dpsg-lb-funktion-btn { font-size: 12px; padding: 6px 12px; }
}
