/* =========================================
   Risk-BOT Tresor Style - Modern App Design
   Datei: assets/css/tresor-style.css
   Version: 8.1.0 (inkl. B2B-Tabellen & QR-Button Mobile-Fix)
   ========================================= */

:root {
    --rb-bg-dark: #020617;
    --rb-surface-card: #0b1329;
    --rb-surface-card-sub: #070d1e;
    --rb-accent-blue: #38bdf8;
    --rb-accent-green: #25d366;
    --rb-accent-red: #f85149;
    --rb-accent-orange: #f59e0b;
    --rb-border-subtle: rgba(255, 255, 255, 0.08);
    --rb-border-highlight: rgba(56, 189, 248, 0.35);
    --rb-text-main: #f8fafc;
    --rb-text-muted: #94a3b8;
    --rb-radius-lg: 20px;
    --rb-radius-md: 14px;
    --rb-radius-sm: 8px;
    --rb-shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

.rb-wrap { 
    color: var(--rb-text-main); 
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 24px 14px; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased;
}
.rb-wrap *, .rb-wrap *::before, .rb-wrap *::after { 
    box-sizing: border-box; 
    max-width: 100%; 
}

.rb-grid { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr); 
    gap: 28px; 
    align-items: start; 
    margin-top: 15px; 
}

@media (min-width: 960px) {
    .rb-grid-guest { 
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); 
        gap: 40px; 
    }
}

/* =========================================
   App Card Container (Glass & Surface)
   ========================================= */
.rb-card { 
    background: var(--rb-surface-card); 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-lg); 
    padding: 28px; 
    box-shadow: var(--rb-shadow-card); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.rb-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}
.rb-card h3 { 
    color: #fff; 
    margin-top: 0; 
    font-size: 1.25rem; 
    font-weight: 800;
    border-bottom: 1px solid var(--rb-border-subtle); 
    padding-bottom: 14px; 
    margin-bottom: 20px; 
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(56, 189, 248, 0.1); 
    color: var(--rb-accent-blue); 
    border: 1px solid rgba(56, 189, 248, 0.25); 
    padding: 6px 14px; 
    border-radius: 999px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    margin-bottom: 16px; 
}
.rb-badge-dot { 
    width: 8px; 
    height: 8px; 
    background-color: var(--rb-accent-green); 
    border-radius: 50%; 
    box-shadow: 0 0 8px var(--rb-accent-green);
    display: inline-block; 
}

/* =========================================
   Inputs & Buttons (App Feel)
   ========================================= */
.rb-input, 
.rb-wrap input[type="text"], 
.rb-wrap input[type="password"], 
.rb-wrap input[type="email"], 
.rb-wrap input[type="date"], 
.rb-wrap input[type="datetime-local"], 
.rb-wrap input[type="number"], 
.rb-wrap select, 
.rb-wrap textarea {
    width: 100% !important; 
    background: rgba(2, 6, 23, 0.6) !important; 
    border: 1px solid rgba(255, 255, 255, 0.12) !important; 
    color: #fff !important; 
    padding: 13px 15px !important; 
    border-radius: 12px !important; 
    margin-bottom: 14px !important; 
    box-sizing: border-box !important; 
    font-size: 0.92rem !important; 
    font-family: inherit !important; 
    display: block; 
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.rb-input:focus, 
.rb-wrap input:focus, 
.rb-wrap textarea:focus, 
.rb-wrap select:focus {
    border-color: var(--rb-accent-blue) !important; 
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important; 
    outline: none; 
    background: rgba(2, 6, 23, 0.95) !important;
}
.rb-error-border { 
    border-color: var(--rb-accent-red) !important; 
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important; 
    animation: rbShake 0.35s ease-in-out;
}
@keyframes rbShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.rb-btn { 
    background: var(--rb-accent-green); 
    color: #020617 !important; 
    border: none; 
    padding: 14px 22px; 
    border-radius: 12px; 
    font-weight: 800; 
    cursor: pointer; 
    width: 100%; 
    font-size: 0.96rem; 
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; 
    text-decoration: none; 
    display: inline-block; 
    text-align: center; 
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25); 
}
.rb-btn:hover { 
    background: #22c55e; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.38); 
}
.rb-btn:active {
    transform: scale(0.98);
}
.rb-btn-paypal { 
    background: #ffc439 !important; 
    color: #111 !important; 
    margin-top: 4px; 
    box-shadow: 0 8px 24px -6px rgba(255, 196, 57, 0.45); 
}
.rb-btn-paypal:hover { 
    background: #f2ba33 !important; 
}

/* =========================================
   Wizard & Indicator
   ========================================= */
.rb-wizard-step, .rb-dynamic-fields { 
    display: none; 
    animation: rbSlideFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}
.rb-wizard-step.active, .rb-dynamic-fields.active { 
    display: block; 
}
@keyframes rbSlideFade { 
    from { opacity: 0; transform: translateY(12px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.rb-step-indicator { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 32px; 
    position: relative; 
    padding: 0 10px; 
}
.rb-step-dot { 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    background: #0f172a; 
    color: var(--rb-text-muted); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 800; 
    font-size: 0.9rem; 
    z-index: 2; 
    position: relative; 
    border: 2px solid rgba(255, 255, 255, 0.1); 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    box-shadow: 0 0 0 5px var(--rb-surface-card); 
}
.rb-step-dot.active { 
    background: var(--rb-accent-blue); 
    color: #020617; 
    border-color: var(--rb-accent-blue); 
    box-shadow: 0 0 0 5px var(--rb-surface-card), 0 0 18px rgba(56, 189, 248, 0.55); 
    transform: scale(1.08); 
}
.rb-step-dot.completed { 
    background: var(--rb-accent-green); 
    color: #020617; 
    border-color: var(--rb-accent-green); 
}
.rb-step-line { 
    position: absolute; 
    top: 19px; 
    left: 28px; 
    right: 28px; 
    height: 3px; 
    background: rgba(255, 255, 255, 0.08); 
    z-index: 1; 
    border-radius: 2px; 
}
.rb-step-line-fill { 
    position: absolute; 
    top: 0; 
    left: 0; 
    height: 100%; 
    background: linear-gradient(90deg, var(--rb-accent-blue), var(--rb-accent-green)); 
    width: 0%; 
    transition: width 0.4s ease; 
    border-radius: 2px; 
}

.rb-wizard-nav { 
    display: flex; 
    justify-content: space-between; 
    gap: 14px; 
    margin-top: 28px; 
    border-top: 1px solid var(--rb-border-subtle); 
    padding-top: 24px; 
}
.rb-wizard-nav button { 
    flex: 1; 
    padding: 15px; 
    border-radius: 12px; 
    font-weight: 800; 
    font-size: 0.98rem; 
    border: none; 
    cursor: pointer; 
    transition: all 0.2s ease; 
}
.rb-wizard-nav button:active { 
    transform: scale(0.98); 
}
.rb-btn-next { 
    background: var(--rb-accent-blue); 
    color: #020617; 
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25); 
}
.rb-btn-next:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.4); 
}
.rb-btn-prev { 
    background: rgba(255, 255, 255, 0.06); 
    color: var(--rb-text-muted); 
    border: 1px solid var(--rb-border-subtle); 
}
.rb-btn-prev:hover { 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
}
.rb-btn-submit { 
    background: var(--rb-accent-green); 
    color: #020617; 
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.3); 
}
.rb-btn-submit:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 26px rgba(37, 211, 102, 0.45); 
}

/* Tooltips */
.rb-form-label { 
    font-size: 0.86rem; 
    color: #cbd5e1; 
    display: flex; 
    align-items: center; 
    margin-bottom: 7px; 
    font-weight: 600; 
}
.rb-help-btn { 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    width: 19px; 
    height: 19px; 
    background: rgba(56, 189, 248, 0.15); 
    color: var(--rb-accent-blue); 
    border-radius: 50%; 
    font-size: 11px; 
    font-weight: bold; 
    cursor: help; 
    margin-left: 8px; 
    position: relative; 
}
.rb-help-btn .rb-tooltip { 
    visibility: hidden; 
    width: 260px; 
    background: rgba(11, 19, 41, 0.98); 
    backdrop-filter: blur(10px); 
    color: #f8fafc; 
    border-radius: 12px; 
    padding: 12px 14px; 
    position: absolute; 
    z-index: 100; 
    bottom: 135%; 
    left: 50%; 
    transform: translateX(-50%) translateY(8px); 
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); 
    opacity: 0; 
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); 
    font-size: 0.78rem; 
    font-weight: 500; 
    border: 1px solid rgba(56, 189, 248, 0.35); 
    line-height: 1.45; 
    white-space: normal; 
}
.rb-help-btn .rb-tooltip::after { 
    content: ""; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    margin-left: -6px; 
    border-width: 6px; 
    border-style: solid; 
    border-color: rgba(56, 189, 248, 0.35) transparent transparent transparent; 
}
.rb-help-btn:hover .rb-tooltip { 
    visibility: visible; 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
}

.rb-dynamic-fields { 
    background: rgba(2, 6, 23, 0.45); 
    padding: 22px; 
    border-radius: var(--rb-radius-md); 
    border: 1px solid var(--rb-border-subtle); 
    margin-bottom: 18px; 
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.25);
}

/* =========================================
   Dashboard (TopBar, KPIs, Kacheln)
   ========================================= */
.rb-dash-topbar { 
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.95) 100%); 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-lg); 
    padding: 18px 24px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 16px; 
    margin-bottom: 22px; 
    box-shadow: var(--rb-shadow-card);
}

.rb-dash-kpi-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); 
    gap: 14px; 
    margin-bottom: 24px; 
}
.rb-kpi-card { 
    background: var(--rb-surface-card); 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-md); 
    padding: 16px 18px; 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    cursor: pointer; 
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; 
}
.rb-kpi-card:hover { 
    border-color: var(--rb-border-highlight); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px -6px rgba(0,0,0,0.5);
}
.rb-kpi-card:active { 
    transform: scale(0.98); 
}
.rb-kpi-icon { 
    width: 48px; 
    height: 48px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.4rem; 
    flex-shrink: 0; 
}
.rb-kpi-val { 
    font-size: 1.35rem; 
    font-weight: 800; 
    color: #fff; 
    line-height: 1.1; 
}
.rb-kpi-label { 
    font-size: 0.78rem; 
    color: var(--rb-text-muted); 
    margin-top: 3px; 
    font-weight: 600; 
}

.rb-tab-panel { 
    display: none; 
}
.rb-tab-panel.active { 
    display: block; 
    animation: rbFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); 
}
@keyframes rbFadeIn { 
    from { opacity: 0; transform: translateY(6px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Kacheln (Verträge / Ordner) */
.rb-kacheln-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); 
    gap: 18px; 
    margin-top: 18px; 
}
.rb-kachel { 
    background: var(--rb-surface-card-sub); 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-md); 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.rb-kachel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.rb-kachel-title { 
    font-weight: 800; 
    color: #fff; 
    font-size: 1.05rem; 
    margin: 0 0 6px 0; 
}
.rb-kachel-meta { 
    font-size: 0.84rem; 
    color: var(--rb-text-muted); 
    margin-bottom: 12px; 
    line-height: 1.55; 
}

.rb-kachel-actions { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px; 
    margin-top: 18px; 
    border-top: 1px solid var(--rb-border-subtle); 
    padding-top: 16px; 
}
.rb-kachel-actions a { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    background: rgba(255, 255, 255, 0.04); 
    color: var(--rb-text-main); 
    text-decoration: none; 
    padding: 10px 8px; 
    border-radius: 10px; 
    font-size: 0.82rem; 
    font-weight: 700; 
    transition: all 0.15s ease; 
    border: 1px solid rgba(255, 255, 255, 0.08); 
}
.rb-kachel-actions a:hover { 
    background: rgba(255, 255, 255, 0.09); 
    transform: translateY(-1px); 
}
.rb-kachel-actions a:active { 
    transform: scale(0.97); 
}
.rb-kachel-actions a.btn-schaden { 
    grid-column: 1 / -1; 
    background: rgba(248, 81, 73, 0.12); 
    color: var(--rb-accent-red); 
    border-color: rgba(248, 81, 73, 0.35); 
    font-size: 0.95rem; 
    padding: 13px; 
    font-weight: 800; 
}
.rb-kachel-actions a.btn-schaden:hover { 
    background: rgba(248, 81, 73, 0.22); 
}
.rb-kachel-actions a.btn-edit { 
    background: rgba(56, 189, 248, 0.1); 
    color: var(--rb-accent-blue); 
    border-color: rgba(56, 189, 248, 0.3); 
}
.rb-kachel-actions a.btn-edit:hover { 
    background: rgba(56, 189, 248, 0.2); 
}
.rb-kachel-actions a.btn-del { 
    background: rgba(239, 68, 68, 0.04); 
    color: #ef4444; 
    border-color: transparent; 
}
.rb-kachel-actions a.btn-del:hover { 
    background: rgba(239, 68, 68, 0.12); 
}

.rb-ampel { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 0.76rem; 
    font-weight: 700; 
    padding: 5px 10px; 
    border-radius: 99px; 
    margin-top: 8px; 
    border: 1px solid var(--rb-border-subtle); 
}
.rb-ampel-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    flex-shrink: 0; 
}

/* =========================================
   Chat Messenger Style
   ========================================= */
.rb-chat-window { 
    background: #04091a; 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-md); 
    padding: 20px; 
    max-height: 440px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    margin-bottom: 16px; 
}
.rb-chat-bubble { 
    max-width: 82%; 
    padding: 12px 16px; 
    border-radius: 16px; 
    font-size: 0.88rem; 
    line-height: 1.5; 
}
.rb-chat-bubble.user { 
    align-self: flex-end; 
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(56, 189, 248, 0.12)); 
    border: 1px solid rgba(56, 189, 248, 0.35); 
    color: #f8fafc; 
    border-bottom-right-radius: 4px; 
}
.rb-chat-bubble.admin { 
    align-self: flex-start; 
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.18), rgba(37, 211, 102, 0.08)); 
    border: 1px solid rgba(37, 211, 102, 0.35); 
    color: #f8fafc; 
    border-bottom-left-radius: 4px; 
}
.rb-chat-meta { 
    font-size: 0.72rem; 
    color: var(--rb-text-muted); 
    margin-bottom: 5px; 
    font-weight: 700; 
}
.rb-chat-attachment { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    margin-top: 8px; 
    background: rgba(255, 255, 255, 0.08); 
    color: var(--rb-accent-blue) !important; 
    padding: 6px 12px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-size: 0.8rem; 
    font-weight: 700; 
    border: 1px solid rgba(56, 189, 248, 0.3); 
}

/* =========================================
   Sidebar & Shell Layout
   ========================================= */
.rb-member-shell { 
    display: grid; 
    grid-template-columns: 248px minmax(0, 1fr); 
    gap: 24px; 
    align-items: start; 
}
.rb-sidebar { 
    position: sticky; 
    top: 24px; 
    background: linear-gradient(180deg, var(--rb-surface-card) 0%, #050a17 100%); 
    border: 1px solid var(--rb-border-subtle); 
    border-radius: var(--rb-radius-lg); 
    padding: 18px 12px; 
    box-shadow: var(--rb-shadow-card); 
}
.rb-sidebar-brand { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 6px 8px 18px; 
    border-bottom: 1px solid var(--rb-border-subtle); 
    color: #fff; 
}
.rb-sidebar-brand strong { 
    display: block; 
    font-size: 1rem; 
    letter-spacing: -0.01em; 
}
.rb-sidebar-brand small { 
    display: block; 
    color: var(--rb-text-muted); 
    font-size: 0.7rem; 
    margin-top: 2px; 
}
.rb-sidebar-mark { 
    width: 36px; 
    height: 36px; 
    display: grid; 
    place-items: center; 
    border-radius: 10px; 
    color: #020617; 
    background: linear-gradient(135deg, var(--rb-accent-green), var(--rb-accent-blue)); 
    font-weight: 900; 
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3); 
}
.rb-sidebar-label { 
    padding: 18px 10px 8px; 
    color: #64748b; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    font-size: 0.68rem; 
    font-weight: 800; 
}
.rb-sidebar-nav { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    margin: 0; 
    padding: 0; 
}
.rb-sidebar-nav .rb-tab-btn { 
    width: 100%; 
    justify-content: flex-start; 
    border: 1px solid transparent; 
    background: transparent; 
    padding: 12px 14px; 
    text-align: left; 
    border-radius: 12px; 
    color: var(--rb-text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.rb-sidebar-nav .rb-tab-btn:hover { 
    background: rgba(255, 255, 255, 0.04); 
    color: #fff;
}
.rb-sidebar-nav .rb-tab-btn:active { 
    transform: scale(0.98); 
}
.rb-sidebar-nav .rb-tab-btn.active { 
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.04)); 
    border-color: rgba(56, 189, 248, 0.32); 
    color: var(--rb-accent-blue);
    box-shadow: inset 3px 0 var(--rb-accent-blue); 
}
.rb-sidebar-nav .rb-tab-badge { 
    margin-left: auto; 
    background: var(--rb-accent-orange); 
    color: #020617; 
    font-size: 0.7rem; 
    font-weight: 800; 
    padding: 2px 7px; 
    border-radius: 99px; 
}

/* =========================================
   B2B-Tabellen & QR-Aushang-Buttons
   ========================================= */
.rb-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.88rem;
}
.rb-wrap th,
.rb-wrap td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--rb-border-subtle);
}
.rb-wrap th {
    color: var(--rb-text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(2, 6, 23, 0.4);
}
.rb-wrap button[onclick*="rbOpenQrPoster"] {
    transition: all 0.18s ease;
}
.rb-wrap button[onclick*="rbOpenQrPoster"]:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    transform: translateY(-1px);
}

/* =========================================
   Mobile-Optimierungen (App-Style)
   ========================================= */
@media (max-width: 959px) {
    .rb-member-shell { 
        display: block; 
    }
    .rb-sidebar { 
        position: static; 
        padding: 10px; 
        margin-bottom: 18px; 
        border-radius: var(--rb-radius-md); 
    }
    .rb-sidebar-brand, .rb-sidebar-label { 
        display: none; 
    }
    .rb-sidebar-nav { 
        flex-direction: row; 
        overflow-x: auto; 
        gap: 8px; 
        padding-bottom: 4px; 
        scrollbar-width: none; 
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    .rb-sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .rb-sidebar-nav .rb-tab-btn { 
        width: auto; 
        flex: 0 0 auto; 
        justify-content: center; 
        padding: 10px 15px; 
        border-radius: 99px; 
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--rb-border-subtle);
    }
    .rb-sidebar-nav .rb-tab-btn.active { 
        background: var(--rb-accent-blue);
        color: #020617;
        box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
        border-color: var(--rb-accent-blue);
    }
    .rb-dash-topbar { 
        border-radius: var(--rb-radius-md); 
        padding: 16px; 
    }
}

@media (max-width: 768px) {
    /* Verhindert, dass B2B-Rechnungstabellen oder Objektlisten auf dem Handy über den Rand ragen */
    .rb-wrap table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* QR-Code-Button auf dem Smartphone sauber in voller Breite unter dem Link-Kopieren-Button stapeln */
    .rb-wrap button[onclick*="rbOpenQrPoster"] {
        margin-left: 0 !important;
        margin-top: 8px !important;
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        padding: 11px 14px !important;
    }

    /* Verhindert ungewolltes Hineinzoomen auf iPhone/iOS beim Antippen von Eingabefeldern */
    .rb-input, 
    .rb-wrap input[type="text"], 
    .rb-wrap input[type="password"], 
    .rb-wrap input[type="email"], 
    .rb-wrap input[type="date"], 
    .rb-wrap input[type="datetime-local"], 
    .rb-wrap input[type="number"], 
    .rb-wrap select, 
    .rb-wrap textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 560px) {
    .rb-wrap { 
        padding: 10px 8px; 
    }
    .rb-card { 
        padding: 18px 14px; 
        border-radius: var(--rb-radius-md); 
    }
    .rb-dash-kpi-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
        gap: 10px; 
    }
    .rb-kpi-card { 
        padding: 12px 10px; 
        gap: 10px; 
        min-height: 74px; 
    }
    .rb-kpi-icon { 
        width: 36px; 
        height: 36px; 
        font-size: 1.15rem; 
        border-radius: 10px; 
    }
    .rb-kpi-val { 
        font-size: 1.05rem; 
    }
    .rb-kpi-label { 
        font-size: 0.68rem; 
    }
    .rb-dash-topbar > div:last-child { 
        width: 100%; 
        display: flex;
        gap: 8px;
    }
    .rb-dash-topbar > div:last-child a { 
        flex: 1; 
        text-align: center; 
        padding: 10px 8px !important; 
        font-size: 0.78rem !important; 
    }
    .rb-kacheln-grid { 
        grid-template-columns: 1fr; 
    }
    .rb-chat-bubble { 
        max-width: 90%; 
    }
    .rb-wizard-nav { 
        flex-direction: column; 
    }
    .rb-kachel-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Risk-BOT Tresor v9.0 – Modern App Redesign & Billing UI
   ========================================= */
.rb-kpi-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(7, 13, 30, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.rb-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 14px 28px -10px rgba(56, 189, 248, 0.22);
}
.rb-kpi-accent {
    border-color: rgba(37, 211, 102, 0.28);
}

.rb-offer-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin: 18px 0 22px 0;
}
.rb-offer-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(11, 19, 41, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 14px;
    padding: 14px 16px;
}
.rb-offer-pill strong { display: block; color: #f8fafc; font-size: 0.92rem; }
.rb-offer-pill span { display: block; color: #94a3b8; font-size: 0.76rem; margin-top: 2px; }

.rb-pay-btn {
    background: #25d366;
    color: #020617;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.rb-pay-btn:hover { transform: scale(1.03); filter: brightness(1.08); }
.rb-pay-btn-orange { background: #f59e0b; color: #020617; }

.rb-mini-pay-btn {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    margin-left: 6px;
}
.rb-mini-pay-btn:hover { background: rgba(56, 189, 248, 0.24); }

.rb-orders-list { display: flex; flex-direction: column; gap: 10px; }
.rb-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.rb-badge-ok { font-size: 0.75rem; color: #25d366; font-weight: 700; }
.rb-badge-warn { font-size: 0.75rem; color: #f59e0b; font-weight: 700; }
.rb-badge-muted { font-size: 0.75rem; color: #94a3b8; }

/* Checkout Modal */
.rb-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.rb-modal-card {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    background: #0b1329;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 24px;
    color: #f8fafc;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}
.rb-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rb-modal-kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #38bdf8; font-weight: 800; }
.rb-modal-head h3 { margin: 4px 0 0 0; font-size: 1.2rem; color: #fff; }
.rb-modal-close { background: rgba(255,255,255,0.08); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.rb-checkout-desc { color: #cbd5e1; font-size: 0.88rem; margin: 12px 0 16px 0; line-height: 1.5; }
.rb-checkout-price-box {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(2, 6, 23, 0.8); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 12px 16px; margin-bottom: 14px;
}
.rb-checkout-price-box strong { font-size: 1.35rem; color: #25d366; }
.rb-modal-label { display: block; font-size: 0.8rem; color: #94a3b8; margin-bottom: 6px; }
.rb-modal-textarea {
    width: 100%; background: #020617; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 10px 12px; color: #fff; font-size: 0.88rem; margin-bottom: 14px;
}
.rb-modal-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; color: #cbd5e1; margin-bottom: 16px; cursor: pointer; }
.rb-pay-methods { display: flex; gap: 12px; margin-bottom: 16px; }
.rb-pay-methods label {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 700; font-size: 0.88rem;
}
.rb-bank-submit {
    width: 100%; justify-content: center; align-items: center;
    background: #38bdf8; color: #020617; border: none; border-radius: 12px;
    padding: 12px 16px; font-weight: 800; font-size: 0.92rem; cursor: pointer;
}
.rb-checkout-feedback { margin-top: 12px; font-size: 0.85rem; line-height: 1.5; }
.rb-fb-ok { background: rgba(37,211,102,0.12); border: 1px solid rgba(37,211,102,0.4); color: #86efac; padding: 12px; border-radius: 10px; }
.rb-fb-err { background: rgba(248,81,73,0.12); border: 1px solid rgba(248,81,73,0.4); color: #fca5a5; padding: 12px; border-radius: 10px; }

/* Mobile Bottom App-Bar */
.rb-mobile-bottom-nav { display: none; }
@media (max-width: 959px) {
    .rb-wrap { padding-bottom: 86px; }
    .rb-mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        background: rgba(2, 6, 23, 0.96);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 9999;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        justify-content: space-around;
    }
    .rb-mobile-bottom-nav button {
        background: none; border: none; color: #94a3b8;
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        font-size: 1.15rem; cursor: pointer; padding: 4px 8px;
    }
    .rb-mobile-bottom-nav button small { font-size: 0.65rem; font-weight: 700; }
    .rb-mobile-bottom-nav .rb-mbn-primary {
        background: #25d366; color: #020617; border-radius: 12px; padding: 6px 14px;
    }
}


/* ============================================================================
 * RISK-BOT 10.0 – MODERN APP-DASHBOARD & COMMUNITY BENTO STYLE
 * ============================================================================ */
.rb-app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0b1222;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 16px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45);
}
.rb-app-brand-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rb-app-logo-badge { font-size: 1.25rem; }
.rb-app-brand-name { color: #f8fafc; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.rb-app-live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #4ade80;
    font-size: 0.75rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
}
.rb-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #25d366; display: inline-block; }
.rb-app-user-actions { display: flex; align-items: center; gap: 10px; }
.rb-app-icon-btn {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.rb-app-avatar-btn {
    width: 38px; height: 38px; border-radius: 50%; padding: 0; overflow: hidden;
    border: 2px solid #38bdf8; background: #1e293b; color: #38bdf8; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rb-app-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.rb-app-shell-v10 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 18px;
    align-items: start;
}
.rb-app-shell-v10 .rb-main { order: 1; min-width: 0; }
.rb-app-shell-v10 .rb-app-sidebar-right {
    order: 2;
    background: #0b1222;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 20px;
}
.rb-app-sidebar-right .rb-sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
.rb-app-sidebar-right .rb-tab-btn {
    width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
    background: transparent; color: #cbd5e1; border: 1px solid transparent;
    font-size: 0.86rem; font-weight: 600; cursor: pointer; text-decoration: none;
    display: block; transition: all 0.18s ease;
}
.rb-app-sidebar-right .rb-tab-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.rb-app-sidebar-right .rb-tab-btn.active {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
    color: #fff; font-weight: 700;
}
.rb-logout-nav-btn { color: #f87171 !important; margin-top: 6px; border-top: 1px solid rgba(255,255,255,0.07) !important; border-radius: 0 0 10px 10px !important; padding-top: 12px !important; }

.rb-sidebar-profile-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.rb-sidebar-profile-card:hover { transform: translateY(-2px); border-color: #38bdf8; }
.rb-spc-avatar, .rb-spc-avatar-fallback {
    width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px;
    border: 2px solid #38bdf8; object-fit: cover;
    display: flex; align-items: center; justify-content: center;
    background: #1e293b; color: #38bdf8; font-weight: 800;
}
.rb-sidebar-profile-card strong { display: block; color: #f8fafc; font-size: 0.88rem; margin-bottom: 4px; }
.rb-sidebar-profile-card p { margin: 0; color: #94a3b8; font-size: 0.74rem; line-height: 1.4; }

.rb-bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.rb-bento-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}
.rb-bento-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rb-bento-head h3 { margin: 0; font-size: 0.98rem; color: #f8fafc; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rb-bento-sub { font-size: 0.78rem; color: #94a3b8; font-weight: 500; }
.rb-bento-more {
    background: transparent; border: none; color: #38bdf8; font-size: 0.78rem;
    font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.rb-bento-more:hover { background: rgba(56, 189, 248, 0.1); }

.rb-policy-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rb-policy-tile {
    border-radius: 12px; padding: 12px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(30, 41, 59, 0.65);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.rb-policy-tile:hover { transform: translateY(-2px); border-color: rgba(56,189,248,0.45); }
.rb-tile-cyan { background: linear-gradient(135deg, rgba(14,116,144,0.32), rgba(15,23,42,0.85)); }
.rb-tile-rose { background: linear-gradient(135deg, rgba(159,18,57,0.28), rgba(15,23,42,0.85)); }
.rb-tile-blue { background: linear-gradient(135deg, rgba(30,64,175,0.32), rgba(15,23,42,0.85)); }
.rb-tile-emerald { background: linear-gradient(135deg, rgba(6,95,70,0.35), rgba(15,23,42,0.85)); }
.rb-pt-title { color: #f8fafc; font-weight: 800; font-size: 0.86rem; margin-bottom: 2px; }
.rb-pt-sub { color: #94a3b8; font-size: 0.74rem; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pt-footer { font-size: 0.72rem; color: #cbd5e1; display: flex; align-items: center; gap: 6px; }
.rb-ampel-dot { width: 8px; height: 8px; border-radius: 50%; background: #25d366; display: inline-block; }
.rb-policy-empty {
    grid-column: 1 / -1; padding: 20px; text-align: center; border-radius: 12px;
    border: 1px dashed rgba(56,189,248,0.35); cursor: pointer; color: #cbd5e1;
}
.rb-policy-empty strong { display: block; color: #38bdf8; margin-bottom: 4px; }

.rb-ai-preview-box {
    background: #020617; border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.rb-ai-bubble-user {
    align-self: flex-end; background: #0284c7; color: #fff;
    padding: 8px 12px; border-radius: 12px 12px 2px 12px; font-size: 0.78rem; max-width: 85%;
}
.rb-ai-bubble-bot {
    align-self: flex-start; background: #1e293b; color: #e2e8f0;
    padding: 8px 12px; border-radius: 12px 12px 12px 2px; font-size: 0.78rem; max-width: 92%; line-height: 1.4;
}
.rb-ai-quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rb-ai-sec-btn {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: #e2e8f0; padding: 9px 10px; border-radius: 10px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.rb-ai-sec-btn:hover { background: rgba(255,255,255,0.12); }
.rb-ai-primary-btn {
    width: 100%; background: #25d366; color: #020617; border: none;
    padding: 11px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 800; cursor: pointer;
}
.rb-ai-primary-btn:hover { filter: brightness(1.06); }

.rb-vault-folder-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rb-folder-chip {
    position: relative; background: rgba(30,41,59,0.65); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer;
}
.rb-folder-chip:hover { border-color: rgba(56,189,248,0.4); }
.rb-folder-ico { font-size: 1.5rem; margin-bottom: 4px; }
.rb-folder-chip span:last-child { display: block; font-size: 0.74rem; color: #cbd5e1; font-weight: 600; }
.rb-folder-badge {
    position: absolute; top: 6px; right: 6px; color: #020617;
    font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 999px;
}
.rb-vault-drop-hint {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 12px; padding: 18px 12px; text-align: center;
    color: #94a3b8; font-size: 0.8rem; cursor: pointer; background: rgba(2,6,23,0.4);
}
.rb-vault-drop-hint:hover { border-color: #38bdf8; color: #e2e8f0; }

.rb-news-pill {
    background: rgba(239, 68, 68, 0.16); color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
}
.rb-news-feed { display: flex; flex-direction: column; gap: 10px; }
.rb-news-item {
    display: block; text-decoration: none;
    background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 11px 13px; transition: border-color 0.15s ease;
}
.rb-news-item:hover { border-color: #38bdf8; }
.rb-news-item strong { display: block; color: #f8fafc; font-size: 0.82rem; line-height: 1.35; margin-bottom: 4px; }
.rb-news-item small { color: #94a3b8; font-size: 0.72rem; }

@media (max-width: 960px) {
    .rb-app-shell-v10 { grid-template-columns: 1fr; }
    .rb-app-shell-v10 .rb-app-sidebar-right { display: none; }
    .rb-bento-grid { grid-template-columns: 1fr; }
}
