/* public/css/app.css - OPTIMIZED & CLEANED VERSION */

/* ========================================================
   1. GLOBAL VARIABLES (ROOT)
======================================================== */

:root {
    /* WIN (Green) */
    --win-base: rgba(34, 197, 94, 0.18);
    --win-border: rgba(34, 197, 94, 0.9);
    --win-hover: rgba(34, 197, 94, 0.30);
    --win-glow: rgba(34, 197, 94, 0.65);

    /* EVEN (Yellow/Amber) */
    --even-base: rgba(234, 179, 8, 0.14);
    --even-border: rgba(234, 179, 8, 0.85);
    --even-hover: rgba(234, 179, 8, 0.22);
    --even-glow: rgba(234, 179, 8, 0.55);

    /* LOSS (Red) */
    --loss-base: rgba(239, 68, 68, 0.18);
    --loss-border: rgba(239, 68, 68, 0.9);
    --loss-hover: rgba(239, 68, 68, 0.30);
    --loss-glow: rgba(239, 68, 68, 0.65);

    color-scheme: dark;
    --bs-body-color: #dee2e6;
    --bs-body-color-rgb: 222, 226, 230;
    --bs-body-bg: #212529;
    --bs-body-bg-rgb: 33, 37, 41;
    --bs-emphasis-color: #fff;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: rgba(222, 226, 230, 0.75);
    --bs-secondary-color-rgb: 222, 226, 230;
    --bs-secondary-bg: #343a40;
    --bs-secondary-bg-rgb: 52, 58, 64;
    --bs-tertiary-color: rgba(222, 226, 230, 0.5);
    --bs-tertiary-color-rgb: 222, 226, 230;
    --bs-tertiary-bg: #2b3035;
    --bs-tertiary-bg-rgb: 43, 48, 53;
    --bs-primary-text-emphasis: #6ea8fe;
    --bs-secondary-text-emphasis: #a7acb1;
    --bs-success-text-emphasis: #75b798;
    --bs-info-text-emphasis: #6edff6;
    --bs-warning-text-emphasis: #ffda6a;
    --bs-danger-text-emphasis: #ea868f;
    --bs-light-text-emphasis: #f8f9fa;
    --bs-dark-text-emphasis: #dee2e6;
    --bs-primary-bg-subtle: #031633;
    --bs-secondary-bg-subtle: #161719;
    --bs-success-bg-subtle: #051b11;
    --bs-info-bg-subtle: #032830;
    --bs-warning-bg-subtle: #332701;
    --bs-danger-bg-subtle: #2c0b0e;
    --bs-light-bg-subtle: #343a40;
    --bs-dark-bg-subtle: #1a1d20;
    --bs-primary-border-subtle: #084298;
    --bs-secondary-border-subtle: #41464b;
    --bs-success-border-subtle: #0f5132;
    --bs-info-border-subtle: #087990;
    --bs-warning-border-subtle: #997404;
    --bs-danger-border-subtle: #842029;
    --bs-light-border-subtle: #495057;
    --bs-dark-border-subtle: #343a40;
    --bs-heading-color: inherit;
    --bs-link-color: #6ea8fe;
    --bs-link-hover-color: #8bb9fe;
    --bs-link-color-rgb: 110, 168, 254;
    --bs-link-hover-color-rgb: 139, 185, 254;
    --bs-code-color: #e685b5;
    --bs-highlight-color: #dee2e6;
    --bs-highlight-bg: #664d03;
    --bs-border-color: #495057;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
    --bs-form-valid-color: #75b798;
    --bs-form-valid-border-color: #75b798;
    --bs-form-invalid-color: #ea868f;
    --bs-form-invalid-border-color: #ea868f
}

/* ========================================================
   2. GLOBAL / LAYOUT
======================================================== */

@font-face {
    font-family: 'PlayRegular';

    src: url('font/Play-Regular-webfont.eot');
    src: url('font/Play-Regular-webfont.eot?#iefix') format('embedded-opentype'),
        url('font/Play-Regular-webfont.woff') format('woff'),
        url('font/Play-Regular-webfont.ttf') format('truetype'),
        url('font/Play-Regular-webfont.svg#PlayRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PlayBold';
    src: url('font/Play-Bold-webfont.eot');
    src: url('font/Play-Bold-webfont.eot?#iefix') format('embedded-opentype'),
        url('font/Play-Bold-webfont.woff') format('woff'),
        url('font/Play-Bold-webfont.ttf') format('truetype'),
        url('font/Play-Bold-webfont.svg#PlayBold') format('svg');
    font-weight: normal;
    font-style: normal;
}

html,
body {
    height: auto !important;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #0a1223;
    background-attachment: initial;
    background-size: auto;
    background-repeat: repeat;
    -webkit-font-smoothing: antialiased;
    font-family: 'PlayRegular';
}

/* App background wrapper (Solution A: background on wrapper, not body) */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.07), transparent 70%),
        radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.07), transparent 70%),
        #0f172a;
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

.app-content {
    flex: 1 0 auto;
}

/* Footer closes the page visually (no body background bleed) */
.app-footer {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(10, 18, 35, 0.98));
    box-shadow:
        0 0 25px rgba(59, 130, 246, 0.35),
        0 -18px 40px rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.footer-meta {
    color: rgba(226, 232, 240, 0.78);
}

.container {
    max-width: 1200px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'PlayBold';
}

.modal {
    --bs-modal-bg: rgba(15, 23, 42, 0.9);
}

/* ========================================================
   3. NAVBAR
======================================================== */

.navbar {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.95),
            rgba(15, 23, 42, 0.9)) !important;
    box-shadow:
        0 0 25px rgba(59, 130, 246, 0.45),
        0 18px 40px rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    margin-bottom: 0 !important;
    padding-bottom: 0.2rem;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.06em;
}

.navbar .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler {
    border-color: rgba(148, 163, 184, 0.7);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
}

.navbar-toggler-icon {
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9));
}

/* Navbar-Buttons kompakter */
.navbar .btn {
    font-size: 0.85rem;
    padding-inline: 0.8rem;
}

.navbar-collapse {
    overflow: hidden !important;
}

/* ========================================================
   4. GLASSMORPHISM CARDS (Summary, Tables, General Card)
======================================================== */

.summary-box,
.table-responsive,
.card {
    background: radial-gradient(circle at top left,
            rgba(148, 163, 184, 0.12),
            rgba(15, 23, 42, 0.92));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow:
        0 0 35px rgba(15, 23, 42, 0.95),
        0 18px 50px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.card .summary-box {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.card h5,
.summary-box h5 {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Mobile Tweak - kept the finer mobile definition */
.card,
.summary-box {
    padding: 1rem 1rem !important;
    border-radius: 14px !important;
    font-size: 0.92rem !important;
}

.summary-metrics {
    margin-top: 0.5rem;
}

.summary-metric {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 0.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.summary-metric .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.summary-metric .value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.summary-metric .sub {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ========================================================
   5. PROFIT / LOSS TEXT COLORS
======================================================== */

.profit-pos {
    color: #4ade80 !important;
    /* Neon-Grün */
    font-weight: 600 !important;
}

.profit-even {
    color: #dde419 !important;
    /* Neon-Gelb */
    font-weight: 600 !important;
}

.profit-neg {
    color: #fb7185 !important;
    /* Neon-Rot */
    font-weight: 600 !important;
}

/* ========================================================
   6. TABLE / SORT / PAGINATION
======================================================== */

.table-responsive {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
    overflow-x: auto;
    overflow-y: hidden;
}

.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table-sortable th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    white-space: nowrap;
}

.table-sortable th.sortable::after {
    content: "⇅";
    font-size: 0.7rem;
    opacity: 0.35;
    margin-left: 0.35rem;
}

.table-sortable th.sorted-asc::after {
    content: "▲";
    opacity: 0.8;
}

.table-sortable th.sorted-desc::after {
    content: "▼";
    opacity: 0.8;
}

/* Pagination-UI */
#tradesTableFooter,
#tradesCardsFooter,
#transactionsFooter,
#incomeTableFooter,
#incomeCardsFooter,
#incomeEventsTableFooter,
#incomeEventsCardsFooter {
    font-size: 0.8rem;
}

#tradesTablePagination .page-link,
#tradesCardsPagination .page-link,
#transactionsPagination .page-link,
#incomeTableFooter .page-link,
#incomeCardsFooter .page-link,
#incomeEventsTableFooter .page-link,
#incomeEventsCardsFooter .page-link,
#incomeEventsTablePagination .page-link,
#incomeEventsCardsPagination .page-link {
    border-radius: 999px !important;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
}

#tradesTablePagination .page-item.active .page-link,
#tradesCardsPagination .page-item.active .page-link,
#transactionsPagination .page-item.active .page-link,
#incomeTablePagination .page-item.active .page-link,
#incomeCardsPagination .page-item.active .page-link,
#incomeEventsTablePagination .page-item.active .page-link,
#incomeEventsCardsPagination .page-item.active .page-link {
    background: radial-gradient(circle at 0% 0%, #60a5fa, #1d4ed8);
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.8),
        0 0 26px rgba(37, 99, 235, 0.7);
}

#tradesTablePagination .page-link:hover,
#tradesCardsPagination .page-link:hover,
#transactionsPagination .page-link:hover,
#incomeTablePagination .page-link:hover,
#incomeCardsPagination .page-link:hover,
#incomeEventsTablePagination .page-link:hover,
#incomeEventsCardsPagination .page-link:hover {
    color: #e5e7eb;
}

/* Kleine Buttons in der Tabelle nicht zu fett machen */
.table .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

#tradesTableDesktop tbody tr {
    transition: background .2s ease, box-shadow .2s ease;
}

#tradesTableDesktop tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* ========================================================
   7. TOASTS
======================================================== */

#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
}

.toast {
    border-radius: 0.9rem;
    box-shadow:
        0 0 22px rgba(56, 189, 248, 0.4),
        0 12px 26px rgba(15, 23, 42, 0.95);
}

/* ========================================================
   8. BUTTONS – NEON / ANIMATION
======================================================== */

@keyframes neon-pulse {
    0% {
        box-shadow:
            0 0 8px rgba(56, 189, 248, 0.35),
            0 0 20px rgba(56, 189, 248, 0.2);
    }

    50% {
        box-shadow:
            0 0 16px rgba(56, 189, 248, 0.6),
            0 0 34px rgba(56, 189, 248, 0.35);
    }

    100% {
        box-shadow:
            0 0 8px rgba(56, 189, 248, 0.35),
            0 0 20px rgba(56, 189, 248, 0.2);
    }
}

.btn {
    position: relative;
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.02em;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

/* Glow-Schein „unter“ dem Button */
.btn::before {
    content: "";
    position: absolute;
    inset: -40%;
    opacity: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.4), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(94, 234, 212, 0.4), transparent 55%);
    transition: opacity 0.22s ease;
    z-index: -1;
}

/* Hover-Verhalten allgemein */
.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn:hover::before {
    opacity: 1;
}

/* Spezifischer Neon-GLOW pro Farbe */

.btn-primary {
    background: radial-gradient(circle at 0% 0%, #60a5fa, #1d4ed8);
    border: 1px solid rgba(96, 165, 250, 0.95);
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.8),
        0 0 26px rgba(37, 99, 235, 0.7);
}

.btn-primary:hover {
    background: radial-gradient(circle at 100% 0%, #93c5fd, #1d4ed8);
}

/* SUCCESS – Neon Grün */
.btn-success {
    background: radial-gradient(circle at 0% 0%, #6ee7b7, #15803d);
    border: 1px solid rgba(74, 222, 128, 0.95);
    box-shadow:
        0 0 10px rgba(74, 222, 128, 0.8),
        0 0 26px rgba(16, 185, 129, 0.7);
}

.btn-success:hover {
    background: radial-gradient(circle at 100% 0%, #bbf7d0, #15803d);
}

.btn-outline-success {
    border-radius: 999px;
    border-width: 1px;
    box-shadow:
        0 0 10px rgba(74, 222, 128, 0.8),
        0 0 26px rgba(16, 185, 129, 0.7);
}

/* DANGER – Neon Rot */
.btn-danger,
.btn-outline-danger {
    border-radius: 999px;
    border-width: 1px;
    box-shadow:
        0 0 10px rgba(248, 113, 113, 0.85),
        0 0 26px rgba(239, 68, 68, 0.7);
}

.btn-danger {
    background: radial-gradient(circle at 0% 0%, #fb7185, #b91c1c);
    border-color: rgba(248, 113, 113, 0.95);
}

.btn-danger:hover {
    background: radial-gradient(circle at 100% 0%, #fecaca, #b91c1c);
}

/* WARNING – Neon Gelb */
.btn-warning {
    background: radial-gradient(circle at 0% 0%, #fde047, #eab308);
    border: 1px solid rgba(250, 204, 21, 0.95);
    color: #1f2937;
    /* dunkler Text für Kontrast */
    box-shadow:
        0 0 10px rgba(250, 204, 21, 0.85),
        0 0 26px rgba(234, 179, 8, 0.55);
}

.btn-warning:hover {
    background: radial-gradient(circle at 100% 0%, #fef9c3, #eab308);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 24px rgba(250, 204, 21, 0.9),
        0 0 40px rgba(234, 179, 8, 0.8);
}

/* OUTLINE PRIMARY */
.btn-outline-primary {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.85);
    box-shadow:
        0 0 12px rgba(96, 165, 250, 0.7),
        0 0 26px rgba(37, 99, 235, 0.5);
}

.btn-outline-primary:hover {
    background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.15), rgba(15, 23, 42, 0.9));
}

/* Outline Warning */
.btn-outline-warning {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.9);
    box-shadow:
        0 0 12px rgba(250, 204, 21, 0.7),
        0 0 26px rgba(234, 179, 8, 0.5);
}

/* „Neu +“ Button */
#btnNewTrade {
    align-self: flex-start;
}

.btn-edit {
    border-width: 1px;
}

.btn-delete {
    border-width: 1px;
}

.btn-edit:hover,
.btn-delete:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 18px rgba(148, 163, 184, 0.6),
        0 0 32px rgba(15, 23, 42, 0.9);
}

/* ========================================================
   9. FILTER-CHIPS (Ergebnis-Filter)
   - Using the fine-tuned styles from the TJ block.
======================================================== */

.filter-chips .btn {
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    letter-spacing: 0.03em;
    transition: all 0.15s ease-out;
    text-transform: none;
}

.filter-chips .btn.active {
    transform: translateY(-1px);
    color: #0f172a;
    /* dunkler Text auf Glow */
}

/* Alle */
.filter-chips .btn[data-value=""].active {
    background: radial-gradient(circle at 0% 0%, #bfdbfe, #60a5fa);
    box-shadow:
        0 0 12px rgba(96, 165, 250, 0.9),
        0 0 32px rgba(37, 99, 235, 0.8);
}

/* Gewinner */
.filter-chips .btn[data-value="winners"].active {
    background: radial-gradient(circle at 0% 0%, #bbf7d0, #22c55e);
    box-shadow:
        0 0 12px rgba(34, 197, 94, 0.95),
        0 0 32px rgba(22, 163, 74, 0.9);
}

/* Break-Even */
.filter-chips .btn[data-value="break_even"].active {
    background: radial-gradient(circle at 0% 0%, #fef9c3, #eab308);
    box-shadow:
        0 0 12px rgba(234, 179, 8, 0.95),
        0 0 32px rgba(202, 138, 4, 0.9);
}

/* Verlierer */
.filter-chips .btn[data-value="losers"].active {
    background: radial-gradient(circle at 0% 0%, #fecaca, #ef4444);
    box-shadow:
        0 0 12px rgba(248, 113, 113, 0.95),
        0 0 32px rgba(220, 38, 38, 0.9);
}

/* ========================================================
   10. FILTER-ROW / FORM-ELEMENTS
======================================================== */

.mb-3.d-flex.justify-content-between.align-items-center.flex-wrap.gap-2 {
    margin-bottom: 1rem !important;
}

.form-control {
    background-color: rgba(15, 23, 42, 0.9);
}

.input-group .form-control,
.form-select {
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.input-group-text {
    border-radius: 999px 0 0 999px;
    background-color: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.6);
    color: #9ca3af;
}

/* ========================================================
   11. DASHBOARD HEADER / LOGO
======================================================== */

.dashboard-header {
    background: radial-gradient(circle at top left,
            rgba(148, 163, 184, 0.18),
            rgba(15, 23, 42, 0.96));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow:
        0 0 35px rgba(15, 23, 42, 0.95),
        0 18px 50px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    padding: 1.25rem 1.5rem;
}

.dashboard-header h2 {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.dashboard-header p {
    color: #9ca3af;
}

.dashboard-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.45), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.8);
    box-shadow:
        0 0 16px rgba(56, 189, 248, 0.85),
        0 0 32px rgba(56, 189, 248, 0.55);
    position: relative;
    overflow: hidden;
}

.dashboard-logo::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.5), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.45), transparent 55%);
    opacity: 0.35;
    pointer-events: none;
    animation: logo-glow 4s ease-in-out infinite alternate;
}

.logo-initials {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.logo-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.8;
}

@keyframes logo-glow {
    0% {
        transform: translate3d(-4px, -2px, 0);
        opacity: 0.3;
    }

    50% {
        transform: translate3d(4px, 2px, 0);
        opacity: 0.6;
    }

    100% {
        transform: translate3d(-2px, 0, 0);
        opacity: 0.4;
    }
}

/* NAVBAR-LOGO an Website-Stil anpassen
   – gleiche Optik wie .dashboard-logo, nur etwas kompakter */

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;

    font-family: 'PlayBold';
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;

    background: radial-gradient(circle at 0% 0%,
            rgba(56, 189, 248, 0.45),
            rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.8);
    box-shadow:
        0 0 12px rgba(56, 189, 248, 0.85),
        0 0 26px rgba(56, 189, 248, 0.55);

    position: relative;
    overflow: hidden;
}

/* Glow-Overlay wie bei .dashboard-logo */
.navbar-brand::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.5), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.45), transparent 55%);
    opacity: 0.35;
    pointer-events: none;
    animation: logo-glow 4s ease-in-out infinite alternate;
    z-index: -1;
}

/* Falls du ein Bild im Logo hast, etwas kleiner + Glow */
.navbar-brand img {
    height: 26px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.9));
}

/* ========================================================
   12. PROFIT-BAR UNDER NAVBAR
======================================================== */

#profit-bar {
    height: 4px;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    top: 0;
}

#profit-bar,
#profit-bar-active,
.profit-bar-active,
.profit-bar-positive,
.profit-bar-negative,
.profit-bar-neutral {
    margin: 0 !important;
    padding: 0 !important;
}

/* versteckte Variante */
.profit-bar-hidden {
    display: none;
}

/* aktive Bar – Grundstruktur */
.profit-bar-active {
    display: block;
}

/* Keyframes für „laufende“ Neon-Linie */
@keyframes profit-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* POSITIVER PROFIT – Neon-Grün/Türkis */
.profit-bar-positive {
    background: linear-gradient(90deg,
            rgba(74, 222, 128, 0.05),
            rgba(74, 222, 128, 0.9),
            rgba(45, 212, 191, 0.9),
            rgba(59, 130, 246, 0.7),
            rgba(45, 212, 191, 0.9),
            rgba(74, 222, 128, 0.9),
            rgba(74, 222, 128, 0.05));
    background-size: 200% 100%;
    animation: profit-flow 2.8s linear infinite;
    box-shadow:
        0 0 18px rgba(34, 197, 94, 0.9),
        0 0 36px rgba(45, 212, 191, 0.8);
}

/* BREAK-EVEN – Gelbe Linie */
.profit-bar-break-even {
    background: linear-gradient(90deg,
            rgba(250, 204, 21, 0.05),
            /* helles Gelb */
            rgba(250, 204, 21, 0.95),
            /* kräftiges Gelb */
            rgba(234, 179, 8, 0.95),
            /* Gold */
            rgba(249, 115, 22, 0.85),
            /* leichtes Orange */
            rgba(234, 179, 8, 0.95),
            rgba(250, 204, 21, 0.95),
            rgba(250, 204, 21, 0.05));
    background-size: 200% 100%;
    animation: profit-flow 3.2s linear infinite;
    box-shadow:
        0 0 18px rgba(250, 204, 21, 0.85),
        0 0 36px rgba(249, 115, 22, 0.70);
}

/* NEGATIVER PROFIT – Neon-Rot/Pink */
.profit-bar-negative {
    background: linear-gradient(90deg,
            rgba(248, 113, 113, 0.05),
            rgba(249, 115, 129, 0.9),
            rgba(244, 63, 94, 0.9),
            rgba(190, 24, 93, 0.85),
            rgba(244, 63, 94, 0.9),
            rgba(249, 115, 129, 0.9),
            rgba(248, 113, 113, 0.05));
    background-size: 200% 100%;
    animation: profit-flow 2.8s linear infinite;
    box-shadow:
        0 0 18px rgba(248, 113, 113, 0.9),
        0 0 36px rgba(244, 63, 94, 0.8);
}

/* NEUTRAL / 0 – Blaue Linie */
.profit-bar-neutral {
    background: linear-gradient(90deg,
            rgba(59, 130, 246, 0.05),
            rgba(59, 130, 246, 0.9),
            rgba(37, 99, 235, 0.9),
            rgba(56, 189, 248, 0.85),
            rgba(37, 99, 235, 0.9),
            rgba(59, 130, 246, 0.9),
            rgba(59, 130, 246, 0.05));
    background-size: 200% 100%;
    animation: profit-flow 3.2s linear infinite;
    box-shadow:
        0 0 18px rgba(59, 130, 246, 0.85),
        0 0 36px rgba(56, 189, 248, 0.7);
}

/* ========================================================
   13. TRADE ROW / CARD HIGHLIGHTS (WIN/LOSS/EVEN)
   - Uses the fine-tuned styles from the TJ block.
======================================================== */

/* Smooth transition for Table ↔ Cards view */
.trades-view {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
}

/* Active state (shown) */
.trades-view.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================
   13b. INCOME VIEW TRANSITIONS (match Trades)
   - Income uses the same fade/slide transition logic as Trades.
======================================================== */

/* Smooth transition for Income view switches */
.income-view,
.income-events-subview {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
}

/* Active state (shown) */
.income-view.active,
.income-events-subview.active {
    opacity: 1;
    transform: translateY(0);
}

/* Bootstrap-Table-Zellen im Trades-Table transparent, damit die Zeilen-Gradients sichtbar sind */
#tradesTable>tbody>tr>* {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Desktop: Table Rows */
/* Basis */
.trade-row {
    transition:
        background 0.15s ease-out,
        box-shadow 0.15s ease-out,
        border-color 0.12s ease-out;
    border-left: 4px solid transparent;
}

/* WIN */
.trade-row-win {
    background-color: var(--win-base);
    /* statt linear-gradient */
    border-left-color: var(--win-border);
}

.trade-row-win:hover {
    background-color: var(--win-hover);
    box-shadow:
        0 0 12px var(--win-glow),
        0 0 24px var(--win-glow);
}

/* LOSS */
.trade-row-loss {
    background-color: var(--loss-base);
    border-left-color: var(--loss-border);
}

.trade-row-loss:hover {
    background-color: var(--loss-hover);
    box-shadow:
        0 0 12px var(--loss-glow),
        0 0 24px var(--loss-glow);
}

/* EVEN */
.trade-row-even {
    background-color: var(--even-base);
    border-left-color: var(--even-border);
}

.trade-row-even:hover {
    background-color: var(--even-hover);
    box-shadow:
        0 0 12px var(--even-glow),
        0 0 24px var(--even-glow);
}

/* Sell-Events (Teilverkäufe) unterhalb eines Trades */
.trade-sell-row {
    opacity: 0.9;
}

.trade-sell-row td {
    font-size: 0.9em;
}

/* Mobile: Trade Cards */
.trades-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trade-card {
    background: radial-gradient(circle at top left,
            rgba(148, 163, 184, 0.18),
            rgba(15, 23, 42, 0.96));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.85);
    padding: 0.75rem 0.9rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.15s ease-out;
    margin-bottom: 10px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.trade-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 18px rgba(56, 189, 248, 0.20),
        0 0 42px rgba(56, 189, 248, 0.10);
}

.trade-card-header {
    margin-bottom: 0.5rem;
}

.trade-card-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

/* Card-Header: Trade-Edit/Delete rechts neben dem Startdatum (ohne Kollision/Wrap) */
.trade-card-date-top {
    flex-wrap: nowrap;
}

.trade-card-actions {
    flex: 0 0 auto;
    white-space: nowrap;
}

.trade-card-instrument {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

.trade-card-body {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.5rem 0;
    margin: 0.25rem 0 0.4rem;
}

.trade-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.trade-card-row .label {
    color: #9ca3af;
}

.trade-card-row .value {
    font-weight: 500;
}

.trade-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.trade-card-footer .btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.empty-state-box,
.trade-card-empty,
.income-empty-state {
    padding: 0.8rem 0.8rem;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 0.8rem;
    border: 1px dashed rgba(148, 163, 184, 0.5);
}

.empty-state-box {
    display: block;
    width: 100%;
}


/* Mobile Card Win/Loss/Even Overrides */

.trade-card-win {
    background: radial-gradient(circle at top left, var(--win-base), rgba(15, 23, 42, 0.96));
    border-color: var(--win-border);
}

.trade-card-win:hover {
    box-shadow:
        0 0 16px var(--win-glow),
        0 0 32px var(--win-glow);
    transform: translateY(-1px);
}

.trade-card-loss {
    background: radial-gradient(circle at top left, var(--loss-base), rgba(15, 23, 42, 0.96));
    border-color: var(--loss-border);
}

.trade-card-loss:hover {
    box-shadow:
        0 0 16px var(--loss-glow),
        0 0 32px var(--loss-glow);
    transform: translateY(-1px);
}

.trade-card-even {
    background: radial-gradient(circle at top left, var(--even-base), rgba(15, 23, 42, 0.96));
    border-color: var(--even-border);
}

.trade-card-even:hover {
    box-shadow:
        0 0 16px var(--even-glow),
        0 0 30px var(--even-glow);
    transform: translateY(-1px);
}


/* ========================================================
   14. LANGUAGE TOGGLE (DE / EN)
======================================================== */

.lang-toggle {
    border-radius: 999px;
    padding: 2px;
    background: radial-gradient(circle at top left,
            rgba(15, 23, 42, 0.95),
            rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    min-width: 38px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    color: #e5e7eb;
    text-decoration: none;
    transition: 0.2s ease;
}

.lang-pill:first-child {
    margin-right: 2px;
}

.lang-pill:hover {
    background: rgba(30, 64, 175, 0.45);
    color: #f9fafb;
}

.lang-pill.active {
    background: radial-gradient(circle at 30% 0%,
            rgba(56, 189, 248, 0.9),
            rgba(37, 99, 235, 0.95));
    color: #f9fafb;
    box-shadow:
        0 0 10px rgba(56, 189, 248, 0.7),
        0 0 18px rgba(56, 189, 248, 0.45);
    border-color: transparent;
}

/* ========================================================
   15. RANGE CARD
======================================================== */

#customRangeWrapper {
    position: absolute;
    z-index: 99999;
}

.custom-range-card {
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    background: radial-gradient(circle at top left,
            rgba(148, 163, 184, 0.16),
            rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.custom-range-panel.show {
    display: block;
}

/* Read-only Range-Anzeige im TU-Style */
.tu-range-pill {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Pseudo-Select für Custom-Range */
.tu-custom-range-display {
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

/* kleines Pfeilchen rechts, wie beim Select */
.tu-custom-range-display::after {
    content: "▾";
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

.tu-custom-range-display:hover {
    border-color: rgba(96, 165, 250, 0.9);
    box-shadow:
        0 0 8px rgba(96, 165, 250, 0.55),
        0 0 18px rgba(37, 99, 235, 0.55);
}

/* =========================================================
   16. FLATPICKR – Trading Unity Dark Neon Style (CLEAN VERSION)
========================================================= */

/* --- Hauptcontainer --- */
.flatpickr-calendar {
    background: radial-gradient(circle at top left,
            rgba(30, 64, 175, 0.22),
            rgba(15, 23, 42, 0.98)) !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(148, 163, 184, 0.85) !important;
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.95),
        0 0 26px rgba(56, 189, 248, 0.7) !important;
    color: #e5e7eb !important;
}

/* --- Header (Monat/Jahr) --- */
.flatpickr-months {
    background: rgba(15, 23, 42, 0.95) !important;
    border-radius: 0.75rem !important;
    padding: 0.25rem 0.4rem !important;
    margin-bottom: 0.35rem !important;
}

.flatpickr-current-month {
    font-weight: 600 !important;
    color: #e5e7eb !important;
}

.flatpickr-current-month .cur-month,
.flatpickr-current-month .cur-year {
    font-size: 0.95rem !important;
}

/* --- Monats-Pfeile (links/rechts) --- */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #93c5fd !important;
    stroke: #93c5fd !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #60a5fa !important;
    stroke: #60a5fa !important;
}

/* --- Wochentage --- */
.flatpickr-weekday {
    color: #9ca3af !important;
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Tageszellen --- */
.flatpickr-day {
    background: rgba(15, 23, 42, 0.4) !important;
    color: #e5e7eb !important;
    border-radius: 0.55rem !important;
    border: 1px solid transparent !important;
}

/* Hover */
.flatpickr-day:hover:not(.disabled):not(.prevMonthDay):not(.nextMonthDay) {
    background: rgba(30, 64, 175, 0.55) !important;
    border-color: rgba(96, 165, 250, 0.9) !important;
}

/* Heute */
.flatpickr-day.today:not(.selected) {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: #60a5fa !important;
    color: #bfdbfe !important;
}

/* Ausgewählt */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.inRange.selected,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: radial-gradient(circle at 0% 0%, #60a5fa, #1d4ed8) !important;
    border-color: rgba(96, 165, 250, 0.95) !important;
    color: #0f172a !important;
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.8),
        0 0 24px rgba(37, 99, 235, 0.75);
}

/* Range-Mitte */
.flatpickr-day.inRange {
    background: rgba(37, 99, 235, 0.28) !important;
    border-color: rgba(37, 99, 235, 0.45) !important;
    color: #e5e7eb !important;
}

/* Disabled */
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: rgba(148, 163, 184, 0.4) !important;
    background: transparent !important;
    border-color: transparent !important;
}

/* --- Time / Footer (falls aktiv) --- */
.flatpickr-time,
.flatpickr-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: rgba(15, 23, 42, 0.9) !important;
}

/* =========================================================
   YEAR SPINNER – Pfeile in Neon-Blau
========================================================= */

/* Grund-Buttons */
.flatpickr-calendar .numInputWrapper span.arrowUp,
.flatpickr-calendar .numInputWrapper span.arrowDown {
    background: rgba(15, 23, 42, 0.9) !important;
    border-radius: 4px;
}

/* Dreiecke → Blau */
.flatpickr-calendar .numInputWrapper span.arrowUp:after,
.flatpickr-calendar .numInputWrapper span.arrowDown:after {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
}

/* Up */
.flatpickr-calendar .numInputWrapper span.arrowUp:after {
    border-bottom-color: #93c5fd !important;
}

/* Down */
.flatpickr-calendar .numInputWrapper span.arrowDown:after {
    border-top-color: #93c5fd !important;
}

/* Hover Up */
.flatpickr-calendar .numInputWrapper span.arrowUp:hover:after {
    border-bottom-color: #60a5fa !important;
}

/* Hover Down */
.flatpickr-calendar .numInputWrapper span.arrowDown:hover:after {
    border-top-color: #60a5fa !important;
}

/* Hover Background */
.flatpickr-calendar .numInputWrapper span.arrowUp:hover,
.flatpickr-calendar .numInputWrapper span.arrowDown:hover {
    background: rgba(56, 189, 248, 0.25) !important;
}

/* TU User Autocomplete */
.tu-userpicker {
    position: relative;
}

.tu-userpicker-inputwrap {
    position: relative;
    display: flex;
    align-items: center;
}

.tu-userpicker-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .7;
    /* vorher .75 / .7 -> vereinheitlicht */
    font-size: 12px;
    pointer-events: none;
}

.tu-userpicker-input {
    padding-left: 30px !important;
    padding-right: 38px !important;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.tu-userpicker-input::placeholder {
    color: rgba(229, 231, 235, .55);
}

.tu-userpicker-input:focus {
    border-color: rgba(96, 165, 250, 0.9);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.55), 0 0 18px rgba(37, 99, 235, 0.55);
}

.tu-userpicker-clear {
    position: absolute;
    right: 6px;
    /* vorher 6px / 8px -> nimm 6px wie im ersten Block */
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, .06);
    color: #e5e7eb;
    opacity: .95;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.tu-userpicker-clear:hover {
    background: rgba(255, 255, 255, .10);
}

.tu-userpicker-menu {
    position: absolute;
    z-index: 2000;
    /* wichtiger als 50 -> bleibt */
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    /* aus dem 2. Block (sauberer als margin-top) */
    max-height: 280px;
    overflow-y: auto;
    background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 14px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.85), 0 0 26px rgba(56, 189, 248, 0.35);
    backdrop-filter: blur(10px);
    display: none;
    overflow: hidden;
    /* aus dem 1. Block */
}

.tu-userpicker-menu.open {
    display: block;
}

.tu-userpicker-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    /* war 13px vs .95rem -> fix auf 13px */
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 12px;
    /* aus dem 2. Block, schadet nicht */
}

.tu-userpicker-item:nth-child(even) {
    background: rgba(255, 255, 255, .04);
}

.tu-userpicker-item:hover {
    background: rgba(56, 189, 248, .12);
}

.tu-userpicker-sm .tu-userpicker-item {
    padding: 9px 10px;
}


/* ========================================================
   17. MOBILE OPTIMIZED (<= 576px)
======================================================== */

@media (max-width: 576px) {

    /* ============ Navbar & Header ============ */

    /* Collapsing-Bereich als "Card" */
    #mainNavbar {
        margin-top: 0.75rem;
    }

    #mainNavbar>.d-flex {
        background: radial-gradient(circle at top left,
                rgba(148, 163, 184, 0.16),
                rgba(15, 23, 42, 0.96));
        border-radius: 1.2rem;
        padding: 0.9rem 1rem 1.1rem;
        box-shadow:
            0 0 20px rgba(15, 23, 42, 0.9),
            0 0 28px rgba(15, 23, 42, 0.9);
        gap: 0.75rem;
    }

    /* Sprache zentrieren, bisschen Luft */
    #mainNavbar .lang-toggle {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.25rem;
    }

    /* "Angemeldet als..." zentrieren */
    #mainNavbar .navbar-text {
        text-align: center;
        width: 100%;
    }

    /* Buttons: volle Breite, Neon-Pill, kein Bootstrap-Klotz */
    #mainNavbar .btn {
        width: 100%;
        border-radius: 999px;
        font-weight: 600;
        padding-block: 0.55rem;
        border: none;
        box-shadow: 0 0 14px rgba(15, 23, 42, 0.9);
    }

    /* ============ Trading-Form Bar / Filter ============ */

    /* Aufgeräumte Filter-Leiste (Desktop + Mobile) */
    .trades-toolbar {
        background: rgba(15, 23, 42, 0.72);
        border: 1px solid rgba(148, 163, 184, 0.25);
        border-radius: 18px;
        padding: 0.9rem 1rem;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    }

    .trades-toolbar .form-label {
        font-size: 0.8rem;
        opacity: 0.9;
    }

    .trades-toolbar .btn {
        border-radius: 999px;
    }

    .trades-toolbar {
        display: flex;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.55rem !important;
        margin-bottom: 1.2rem !important;
    }

    .trades-toolbar .form-control,
    .trades-toolbar .form-select {
        border-radius: 14px !important;
        padding: 0.55rem 0.8rem !important;
        font-size: 0.9rem !important;
    }

    .trades-toolbar .input-group {
        width: 100%;
    }

    /* ============ Dashboard Header ============ */

    .dashboard-header {
        padding: 0.9rem 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 14px !important;
    }

    .dashboard-header h2 {
        font-size: 1.25rem !important;
    }

    .dashboard-header p {
        font-size: 0.8rem !important;
        margin-top: 0.3rem !important;
        line-height: 1.2rem !important;
    }

    .dashboard-logo {
        transform: scale(0.85);
    }

    /* ============ Summary Box (Details kept from duplicate block) ============ */

    .summary-box {
        padding: 1rem 1rem !important;
        border-radius: 14px !important;
        font-size: 0.92rem !important;
    }

    .summary-metric {
        background: rgba(15, 23, 42, 0.9);
        border-radius: 0.9rem;
        padding: 0.75rem 0.85rem;
        border: 1px solid rgba(148, 163, 184, 0.4);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    }

    .summary-metric .label {
        font-size: 0.75rem;
    }

    .summary-metric .value {
        font-size: 1.1rem;
    }

    .summary-metric .sub {
        font-size: 0.78rem;
    }

    /* ============ Tabelle ============ */

    .table-responsive {
        border-radius: 12px !important;
    }

    .table td,
    .table th {
        font-size: 0.77rem !important;
        padding: 0.5rem 0.4rem !important;
    }

    /* ============ Trades: aufräumen/strukturieren ============ */
    .trades-page {
        max-width: 1200px;
        margin-inline: auto;
    }

    .trades-page h4 {
        letter-spacing: 0.02em;
    }

    /* Filter-Chips: weniger „Glow“, klarere Active States */
    .trades-page .filter-chips .btn,
    .trades-page .status-chips .btn {
        border-radius: 999px;
        padding: 0.35rem 0.75rem;
        font-weight: 600;
    }

    .trades-page .filter-chips .btn.active,
    .trades-page .status-chips .btn.active {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 18px rgba(0, 0, 0, 0.25);
    }

    /* Summary-Grid: gleichmäßige Kacheln */
    .trades-page .summary-metric {
        min-height: 104px;
    }

    /* Tabelle: Header deutlicher, Zeilen ruhiger */
    .trades-page .table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(6px);
    }

    .trades-page .table tbody tr:hover {
        background: rgba(59, 130, 246, 0.08);
    }

    .table .btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

/* === PERFORMANCE VIEW NEON CARD === */

/* Chart Fade-In */
#tradesPerformanceWrapper canvas {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .55s ease, transform .55s ease;
}

#tradesPerformanceWrapper.active canvas {
    opacity: 1;
    transform: translateY(0);
}

#tradesPerformanceWrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml;utf8,<svg ... noise texture ...></svg>");
    opacity: .035;
}

/* =========================
   Income: Asset-Picker
   ========================= */
.income-asset-picker {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px;
    max-height: 180px;
    overflow: auto;
    background: rgba(0, 0, 0, 0.12);
}

/* =========================
   Admin: Charts
   (Chart.js needs an explicit height)
   ========================= */
.admin-chart-box {
    position: relative;
    width: 100%;
}

.admin-chart-box-320 {
    height: 320px;
}

.admin-chart-box-360 {
    height: 360px;
}


.income-asset-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
}

.income-asset-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.income-asset-item input {
    margin-top: 0;
}

.income-asset-name {
    display: inline-block;
    line-height: 1.2;
}

@media (max-width: 575px) {
    .income-asset-picker {
        max-height: 220px;
    }
}

/* test */


/* Income: Asset-Picker Toolbar + Empty + Highlight */
.income-asset-picker-toolbar .btn {
    padding: 2px 10px;
}

.income-asset-empty {
    padding: 8px 6px;
}

.income-asset-name mark {
    padding: 0 2px;
    border-radius: 4px;
}


/* Income: New Entry Box (Asset + Monate) */
.income-new-entry-box {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.10);
}

.income-new-entry-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.income-new-entry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 992px) {
    .income-new-entry-grid {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }
}

.income-new-entry-months .row {
    --bs-gutter-x: .5rem;
    --bs-gutter-y: .5rem;
}

/* Legal */

.legal-prose h2{
  letter-spacing: .2px;
}

.legal-prose a{
  text-decoration: none;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
}

.legal-prose a:hover{
  border-bottom-style: solid;
}

.legal-page{
  margin: 0 auto;
  padding: 1.25rem;
  line-height: 1.75;
}

.legal-page h1{
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

.legal-page h2{
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: .5rem;
}

.legal-page h3{
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: .35rem;
  font-weight: 600;
}

.legal-page p{
  margin-bottom: 1rem;
}

.legal-page ul{
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-page li{
  margin-bottom: .35rem;
}

.legal-meta{
  color: var(--bs-secondary-color);
  font-size: .95rem;
  margin-bottom: 1.25rem;
}

.legal-card{
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}


.legal-card .card-body{
  padding: 2.25rem 2.5rem;
}

@media (max-width: 576px){
  .legal-card .card-body{
    padding: 1.5rem 1.25rem;
  }
}

.legal-address{
  font-style: normal;
  margin: .75rem 0 1.25rem 0;
}

.legal-shout{
  font-weight: 700;
}

.to-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;

  width: 44px;
  height: 44px;
  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.14),
      rgba(255,255,255,0.04)
    );

  color: #e6f0ff;
  border: 1px solid rgba(255,255,255,0.18);

  backdrop-filter: blur(10px);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.18);

  font-size: 18px;
  line-height: 1;
  cursor: pointer;

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.to-top-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top-btn:hover {
  box-shadow:
    0 10px 28px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

@media (max-width: 576px) {
  .to-top-btn {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}