:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

.btn-auszahlung {
    font-weight: 700;
    font-size: 1rem;
    padding: 0.625rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px 0 rgba(251, 191, 36, 0.4);
    border: 2px solid #fbbf24;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-auszahlung:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(251, 191, 36, 0.6);
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.btn-auszahlung:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px 0 rgba(251, 191, 36, 0.4);
}

.btn-auszahlung i {
    font-size: 1.125rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .logo-sm {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background-color: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
    color: white;
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--sidebar-active);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background-color: #f8fafc;
}

.main-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.main-body {
    padding: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    height: 100%;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-icon.blue {
    background-color: #dbeafe;
    color: #3b82f6;
}

.stat-card .stat-icon.emerald {
    background-color: #d1fae5;
    color: #10b981;
}

.stat-card .stat-icon.amber {
    background-color: #fef3c7;
    color: #f59e0b;
}

.stat-card .stat-icon.rose {
    background-color: #ffe4e6;
    color: #f43f5e;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.data-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.data-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.data-card-body {
    padding: 0;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom-width: 1px;
    padding: 0.75rem 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.badge-type {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-festgeld {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.badge-tagesgeld {
    background-color: #d1fae5;
    color: #047857;
}

.badge-ipo {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-aktien {
    background-color: #ffe4e6;
    color: #be123c;
}

.badge-treuhand {
    background-color: #cffafe;
    color: #0e7490;
}

.badge-kripto {
    background-color: #fce7f3;
    color: #be185d;
}

.badge-status {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-active {
    background-color: #d1fae5;
    color: #047857;
}

.badge-completed {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-cancelled {
    background-color: #ffe4e6;
    color: #be123c;
}

.badge-admin {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.badge-benutzer {
    background-color: #e0f2fe;
    color: #0369a1;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.dropdown-menu {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

.dropdown-item.text-danger:hover {
    background-color: #fef2f2;
}

.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.625rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.bank-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.bank-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.bank-card .bank-icon {
    width: 48px;
    height: 48px;
    background-color: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.25rem;
}

.investment-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.investment-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

.investment-card .card-top {
    height: 4px;
}

.investment-card .card-top.festgeld { background-color: #3b82f6; }
.investment-card .card-top.tagesgeld { background-color: #10b981; }
.investment-card .card-top.ipo { background-color: #f59e0b; }
.investment-card .card-top.aktien { background-color: #f43f5e; }
.investment-card .card-top.treuhand { background-color: #06b6d4; }
.investment-card .card-top.kripto { background-color: #ec4899; }

.investment-card .card-body {
    padding: 1.25rem;
}

.investment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, #fafafa, #ffffff);
}

.investment-header h6 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.investment-header small {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.investment-header .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.investment-details {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid #f8fafc;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row span {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.detail-row strong {
    font-size: 0.9375rem;
    color: #0f172a;
    font-weight: 600;
}

.detail-row .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

.detail-row .bg-secondary {
    background-color: #64748b !important;
    color: #ffffff !important;
}

.portal-header {
    background: linear-gradient(135deg, var(--sidebar-bg), #334155);
    color: white;
    padding: 1.5rem 0;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.user-profile-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.user-avatar-header {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.user-avatar-header:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6);
}

.user-info {
    line-height: 1.3;
}

.user-name-header {
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.user-email-header {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.portal-header .btn-primary {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portal-header .btn-primary:hover {
    background: white;
    border-color: white;
    color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.portal-header .btn-primary:focus {
    background: white;
    border-color: white;
    color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.portal-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.portal-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.portal-stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.portal-stat-card .stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.portal-stat-card .stat-icon.emerald {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.portal-stat-card .stat-icon.amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.portal-stat-card .stat-icon.rose {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

.portal-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.portal-stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-bar-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.profit-progress-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem;
}

.bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.bonus-badge i {
    color: #f59e0b;
}

.chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.chart-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chart-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.chart-icon.emerald {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chart-icon.amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
}

.chart-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.125rem 0 0 0;
}

.chart-card-body {
    padding: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.section-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.25);
    flex-shrink: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.password-toggle {
    cursor: pointer;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.table-responsive {
    overflow-x: auto;
}

.table code,
.table .text-muted {
    word-break: break-all;
    overflow-wrap: break-word;
}

.account-code {
    font-size: 0.75rem;
    word-break: break-all;
    overflow-wrap: break-word;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    display: block;
    line-height: 1.4;
}

.avatar-initials {
    width: 36px;
    height: 36px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-group .form-select {
    width: auto;
    min-width: 150px;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #20BA5A;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    line-height: 1;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        font-size: 28px;
        bottom: 20px;
        right: 20px;
    }

    .crypto-card {
        margin-bottom: 1rem;
    }

    .crypto-address-display small {
        font-size: 0.65rem !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
    }

    .modal-body .text-muted {
        word-break: break-all;
        overflow-wrap: break-word;
        font-size: 0.8rem;
    }

    .modal-body code {
        font-size: 0.7rem !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
    }

    .modal-body .table {
        font-size: 0.8rem;
    }

    .modal-body .table td,
    .modal-body .table th {
        padding: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .portal-stat-card .stat-value {
        font-size: 1.5rem;
    }

    .portal-stat-card .stat-label {
        font-size: 0.75rem;
    }

    .account-code {
        font-size: 0.65rem !important;
    }

    .investment-card .card-body {
        padding: 1rem;
    }
}

/* Wallet Type Pills */
#wallet-type-tabs {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 12px;
}

#wallet-type-tabs .nav-link {
    color: #64748b;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#wallet-type-tabs .nav-link:hover {
    background: #e2e8f0;
    color: #334155;
}

#wallet-type-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

#wallet-type-tabs .nav-link i {
    font-size: 1.1em;
}