[hidden] { display: none !important; }

:root {
    --bg: #0b0f19;
    --bg-elev: #121829;
    --bg-elev-2: #1a2136;
    --border: #263149;
    --text: #e6ebf5;
    --text-dim: #98a3bd;
    --accent: #5b8cff;
    --accent-2: #7c5bff;
    --danger: #ff5b73;
    --ok: #37d39b;
    --radius: 14px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; font-weight: 650; letter-spacing: -0.01em; }

.brand { display: flex; align-items: center; gap: .55rem; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-size: 1.1rem;
}
.brand h1 { font-size: 1.5rem; margin: 0; }

/* --- Buttons --- */
.btn {
    cursor: pointer; border: 1px solid transparent; border-radius: 10px;
    padding: .6rem 1rem; font-size: .92rem; font-weight: 550; font-family: inherit;
    color: var(--text); background: var(--bg-elev-2); transition: .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-small { padding: .35rem .7rem; font-size: .82rem; }

/* --- Auth --- */
.auth-body {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    position: relative;
    overflow-x: hidden;
    background: #050508 url("/static/img/login-bg.png") center center / cover no-repeat fixed;
}
.auth-shell {
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}
.auth-card {
    background: rgba(12, 14, 20, .82);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.auth-sub { color: rgba(232, 237, 245, .75); margin-top: -.2rem; }
.auth-footer {
    text-align: center;
    color: rgba(232, 237, 245, .65);
    font-size: .8rem;
    margin-top: 1.2rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}
.auth-body .brand h1 { text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }

/* --- Forms --- */
.form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.field { display: grid; gap: .35rem; font-size: .85rem; color: var(--text-dim); }
.field span { font-weight: 500; }
.field input, .field select {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: .7rem .8rem; color: var(--text); font-size: .95rem; font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91,140,255,.2);
}
.field input:disabled { opacity: .55; }
.field em { font-style: normal; color: var(--text-dim); font-weight: 400; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-dim); }

/* --- Alerts --- */
.alert { border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; margin-top: 1rem; }
.alert-error { background: rgba(255,91,115,.12); border: 1px solid rgba(255,91,115,.4); color: #ffb3be; }
.alert-info { background: rgba(91,140,255,.12); border: 1px solid rgba(91,140,255,.35); color: #bcd0ff; }
.alert-ok { background: rgba(55,211,155,.12); border: 1px solid rgba(55,211,155,.4); color: #9ff0d1; }

/* --- Layout --- */
.layout { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.4rem; border-bottom: 1px solid var(--border);
    background: var(--bg-elev); position: sticky; top: 0; z-index: 10;
}
.topbar strong { font-size: 1.1rem; }
.topnav { display: flex; align-items: center; gap: 1rem; }
.navlink { color: var(--text-dim); font-weight: 500; }
.navlink:hover { color: var(--text); }
.who { color: var(--text-dim); font-size: .88rem; }
.inline { margin: 0; }
.chip {
    display: inline-block; padding: .2rem .6rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .03em;
    background: var(--bg-elev-2); border: 1px solid var(--border);
}
.chip-role { color: var(--accent); }

.content {
    flex: 1; display: grid; grid-template-columns: 1fr 320px;
    gap: 1.2rem; padding: 1.4rem; max-width: 1200px; margin: 0 auto; width: 100%;
}
.content-single { grid-template-columns: 1fr; }
.panel {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.4rem;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hint { color: var(--text-dim); font-size: .82rem; margin: .5rem 0 0; }

/* --- Ticker form --- */
.ticker-form { margin-top: 1rem; }
.field-row { display: flex; gap: .6rem; }
.field-row input {
    flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: .75rem .9rem; color: var(--text); font-size: 1rem; font-family: inherit;
}
.field-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }

.result { margin-top: 1.2rem; }
.result-card {
    background: var(--bg-elev-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 1rem 1.1rem;
}
.result-card h4 { margin: 0 0 .3rem; }
.result-card .status { font-size: .78rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }

.panel-side h3 { font-size: 1rem; }
.recent-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.recent-list li {
    background: var(--bg-elev-2); border: 1px solid var(--border);
    border-radius: 9px; padding: .5rem .7rem; font-size: .88rem;
}
.recent-list .muted, .muted { color: var(--text-dim); }

/* --- Table --- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-dim); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* --- Dialog --- */
.dialog {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 0;
    background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow);
    width: min(440px, 92vw);
}
.dialog::backdrop { background: rgba(3,6,15,.6); backdrop-filter: blur(2px); }
.dialog form { padding: 1.5rem; display: grid; gap: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .4rem; }

/* --- Analyse: controls, grafiek, signaal --- */
.content { align-items: start; }
.side { display: grid; gap: 1.2rem; }

.controls { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ticker-field {
    flex: 1; min-width: 220px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; padding: .7rem .9rem; color: var(--text); font-size: 1rem; font-family: inherit;
}
.ticker-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
.tf-select {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: .7rem .6rem; color: var(--text); font-family: inherit;
}

.chart-wrap { position: relative; }
#chart { width: 100%; height: 460px; }
.chart-empty {
    position: absolute; inset: 0; display: grid; place-items: center;
    color: var(--text-dim); font-size: .95rem; pointer-events: none;
}
.source-badge {
    position: absolute; top: 10px; left: 10px; z-index: 5;
    background: rgba(18,24,41,.85); border: 1px solid var(--border); border-radius: 999px;
    padding: .3rem .8rem; font-size: .8rem; font-weight: 600; color: var(--text);
    backdrop-filter: blur(4px);
}
.disclaimer { color: var(--text-dim); font-size: .76rem; margin: .8rem 0 0; }

.legend { margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev-2); }
.legend > summary {
    cursor: pointer; padding: .8rem 1rem; font-weight: 600; color: var(--text);
    list-style: none; user-select: none;
}
.legend > summary::-webkit-details-marker { display: none; }
.legend > summary::before { content: "▸ "; color: var(--accent); }
.legend[open] > summary::before { content: "▾ "; }
.legend[open] > summary { border-bottom: 1px solid var(--border); }
.legend-body { padding: .6rem 1rem 1rem; }
.legend-body h4 { margin: 1rem 0 .4rem; font-size: .82rem; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.legend-body h4:first-child { margin-top: .4rem; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.legend-list li { font-size: .86rem; color: var(--text-dim); line-height: 1.4; padding-left: 1.4rem; position: relative; }
.legend-list b { color: var(--text); }
.legend .dot { position: absolute; left: 0; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; }
.dot-up { background: var(--ok); }
.dot-down { background: var(--danger); }
.dot-vwap { background: #f0b429; }
.dot-entry { background: var(--accent); }
.badge-q {
    position: absolute; left: 0; top: .1rem; width: 1rem; height: 1rem; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border); color: var(--text-dim);
    font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}

.signal-card { display: grid; gap: .6rem; }
.sig-row { display: flex; align-items: center; justify-content: space-between; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; margin-top: .4rem; }
.sig-grid > div { display: flex; flex-direction: column; }
.sig-grid .muted { font-size: .74rem; }
.tag { padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.tag-up { background: rgba(55,211,155,.15); color: var(--ok); }
.tag-down { background: rgba(255,91,115,.15); color: var(--danger); }
.tag-flat { background: rgba(152,163,189,.15); color: var(--text-dim); }
.reasons { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--text-dim); font-size: .82rem; }
.reasons li { margin-bottom: .2rem; }
.balance-line { margin-top: .8rem; color: var(--text-dim); font-size: .9rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.pnl-pos { color: var(--ok); }
.pnl-neg { color: var(--danger); }

/* --- Rapportvenster (modal) --- */
.modal {
    position: fixed; inset: 0; z-index: 100; background: rgba(6, 9, 17, 0.72);
    backdrop-filter: blur(3px); display: grid; place-items: center; padding: 2rem 1rem; overflow-y: auto;
}
.modal-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
    width: min(880px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow);
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); position: sticky; top: 0;
    background: var(--bg-elev); z-index: 2;
}
.modal-actions { display: flex; gap: .5rem; }
.modal-body { padding: 1.4rem; }
.report-header { margin-bottom: 1rem; }
.report-header h2 { margin: 0 0 .3rem; }
.report-sub { color: var(--text-dim); font-size: .9rem; }
.report-chart {
    width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg); display: block; margin-bottom: 1.2rem;
}
.report-text { color: var(--text); line-height: 1.6; font-size: .95rem; }
.report-text h4 { margin: 1.2rem 0 .4rem; color: var(--accent); font-size: .9rem;
    text-transform: uppercase; letter-spacing: .04em; }
.report-text p { margin: .3rem 0; }
.report-text ul { margin: .3rem 0; padding-left: 1.2rem; color: var(--text-dim); }
.report-text .kpi { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .9rem; margin: .4rem 0; }
.report-text .kpi span { color: var(--text-dim); }
.report-text .kpi b { color: var(--text); }

@media print {
    body * { visibility: hidden !important; }
    #report-content, #report-content * { visibility: visible !important; }
    .modal { position: static; background: none; backdrop-filter: none; padding: 0; display: block; overflow: visible; }
    .modal-card { border: none; box-shadow: none; max-height: none; width: 100%; overflow: visible; }
    #report-content { position: absolute; left: 0; top: 0; width: 100%; padding: 0; color: #000; }
    .report-text, .report-text b, .report-header h2, .report-sub { color: #000 !important; }
    .report-text h4 { color: #333 !important; }
    .no-print { display: none !important; }
    .report-chart { border-color: #ccc; }
}

.logs-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logs-filter { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 .4rem; }
.logs-count { font-size: .82rem; margin: 0 0 .8rem; }
.nowrap { white-space: nowrap; }
.log-detail { word-break: break-word; max-width: 360px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: .6rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; background: var(--bg-elev-2);
    border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; }
.stat .muted { font-size: .76rem; }
.stat b { font-size: 1.15rem; }
@media (max-width: 820px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 820px) {
    .content { grid-template-columns: 1fr; }
    .topnav { gap: .6rem; }
    .who { display: none; }
    #chart { height: 360px; }
}

/* ============ Workspace (zijbalk + multi-paneel board) ============ */
.workspace { display: grid; grid-template-columns: 300px 1fr; height: 100vh; overflow: hidden; }

.sidebar {
    background: var(--bg-elev); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: .4rem; padding: 1rem;
    overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; padding: .2rem .2rem .6rem; }
.side-section { border-top: 1px solid var(--border); padding: .9rem 0; }
.side-section:first-of-type { border-top: none; }
.side-section h4 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.side-hint { color: var(--text-dim); font-size: .78rem; margin: 0 0 .6rem; }
.form-section-title { margin: 1.4rem 0 .75rem; font-size: .95rem; color: var(--text); }
.form-section-title:first-of-type { margin-top: 0; }
.field-hint { display: block; margin-top: .25rem; font-size: .75rem; color: var(--text-dim); line-height: 1.35; }
.ticker-list { display: grid; gap: .4rem; margin-bottom: .6rem; }
.side-ticker {
    width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
    padding: .5rem .7rem; color: var(--text); font-size: .9rem; font-family: inherit;
}
.side-ticker:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.2); }
.side-row { display: flex; gap: .5rem; margin-bottom: .5rem; }
.side-row .tf-select { flex: 0 0 auto; }
.side-row .btn { flex: 1; }
.side-wide { width: 100%; margin-bottom: .6rem; }
.watch-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .35rem; }
.watch-list li { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 8px; padding: .4rem .7rem; font-size: .88rem; }

.btn-report {
    background: linear-gradient(135deg, #f0b429, #ff8a3d); color: #1a1206; font-weight: 650;
    display: block; text-align: center;
}
.btn-report:hover { transform: translateY(-1px); }

.side-footer { margin-top: auto; border-top: 1px solid var(--border); padding-top: .8rem; display: grid; gap: .6rem; }
.side-nav { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.side-user { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Board */
.board { position: relative; padding: 1rem; overflow: hidden; display: flex; flex-direction: column; }
.board > .alert { flex: 0 0 auto; }
.board-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--text-dim); }
.board-empty-mark { font-size: 2.4rem; color: var(--accent); margin-bottom: .6rem; }
.board-empty kbd {
    background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 6px;
    padding: .05rem .4rem; font-size: .8rem;
}
.board-grid { flex: 1; display: grid; gap: .8rem; min-height: 0; }

.panel-cell {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
    display: flex; flex-direction: column; overflow: hidden; min-height: 0; position: relative;
    cursor: pointer; transition: border-color .15s ease, transform .12s ease;
}
.panel-cell:hover { border-color: var(--accent); }
.panel-cell-head {
    display: flex; align-items: center; gap: .45rem;
    padding: .45rem .7rem; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.pc-badge { font-weight: 650; font-size: .85rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-live-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    background: var(--ok); box-shadow: 0 0 8px rgba(55,211,155,.75);
    animation: live-pulse 1.6s ease-in-out infinite;
}
.pc-alert-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    background: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, .85);
    animation: alert-pulse 0.85s ease-in-out infinite;
    cursor: pointer;
}
.panel-cell-alert {
    box-shadow: inset 0 0 0 2px rgba(255, 140, 0, .5), 0 0 20px rgba(255, 140, 0, .12);
}
@keyframes alert-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .3; transform: scale(.75); }
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.85); }
}
.live-hint { margin-top: .45rem; font-size: .72rem; line-height: 1.35; }
.pc-tags { display: flex; gap: .35rem; flex-wrap: wrap; flex-shrink: 0; }
.panel-cell-chart { flex: 1; min-height: 0; }
.panel-cell-loading {
    position: absolute; inset: 2.2rem 0 0; display: grid; place-items: center;
    color: var(--text-dim); font-size: .85rem; pointer-events: none;
}
.panel-cell-error { border-color: rgba(255,91,115,.4); }
.panel-cell-msg { padding: .6rem .7rem; color: var(--danger); font-size: .82rem; }

/* Fullscreen overlay */
.fs-overlay {
    position: fixed; inset: 0; z-index: 90; background: var(--bg);
    display: flex; flex-direction: column;
}
.fs-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.fs-title .source-badge { position: static; }
.fs-actions { display: flex; gap: .5rem; }
.fs-body { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.fs-chart-wrap { position: relative; min-height: 0; padding: .6rem; }
#fs-chart { width: 100%; height: 100%; }
.fs-side { border-left: 1px solid var(--border); overflow-y: auto; padding: 1rem; display: grid; gap: 1rem; align-content: start; }

@media (max-width: 900px) {
    .workspace { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .sidebar { border-right: none; border-bottom: 1px solid var(--border); }
    .board { height: auto; }
    .board-grid { grid-template-columns: 1fr !important; grid-template-rows: none !important; }
    .panel-cell { height: 320px; }
    .fs-body { grid-template-columns: 1fr; }
    .fs-side { border-left: none; border-top: 1px solid var(--border); }
}

/* ============ Betrouwbaarheidsrapport ============ */
.report-page { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1.4rem 3rem; }
.report-hero {
    background: linear-gradient(135deg, rgba(91,140,255,.16), rgba(124,91,255,.14));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.4rem;
}
.report-hero h1 { font-size: 1.7rem; }
.report-hero p { color: var(--text-dim); margin: .3rem 0 0; max-width: 60ch; }
.grand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 820px) { .grand-grid { grid-template-columns: 1fr 1fr; } }

.class-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.3rem; margin-bottom: 1.2rem;
}
.class-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.class-card-head h2 { margin: 0; font-size: 1.2rem; }
.class-metrics { display: flex; gap: .5rem; flex-wrap: wrap; }
.metric-pill {
    display: inline-flex; flex-direction: column; align-items: flex-start;
    background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; padding: .4rem .7rem;
}
.metric-pill span { font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.metric-pill b { font-size: 1rem; }
.pos { color: var(--ok); } .neg { color: var(--danger); }

.tf-block { margin-top: 1rem; }
.tf-block h3 { font-size: .95rem; margin: 0 0 .5rem; color: var(--text-dim); }
.rbar { height: 8px; border-radius: 999px; background: var(--bg-elev-2); overflow: hidden; margin: .2rem 0 .1rem; }
.rbar > i { display: block; height: 100%; }
.rbar-up { background: var(--ok); } .rbar-down { background: var(--danger); }
.rrow { display: grid; grid-template-columns: 90px 1fr 70px 60px; gap: .6rem; align-items: center; font-size: .84rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.rrow:last-child { border-bottom: none; }
.rrow .sym { font-weight: 650; }
.rrow .muted { color: var(--text-dim); }
.report-disclaimer { color: var(--text-dim); font-size: .8rem; margin-top: 1.5rem; }
.report-back { display: inline-block; margin-bottom: 1rem; color: var(--text-dim); }

/* Indicatoren: toggle-knoppen + aparte diagnoses */
.toggle-group { display: grid; gap: .45rem; }
.btn-toggle {
    background: var(--bg-elev-2); border-color: var(--border); text-align: left;
    font-weight: 600; position: relative; padding-left: 2.2rem;
}
.btn-toggle::before {
    content: ""; position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
    width: .55rem; height: .55rem; border-radius: 50%; border: 2px solid var(--text-dim);
}
.btn-toggle.is-active { border-color: var(--accent); background: rgba(91,140,255,.12); }
.btn-toggle.is-active::before { background: var(--accent); border-color: var(--accent); }
#toggle-mf.is-active { border-color: var(--ok); background: rgba(55,211,155,.1); }
#toggle-mf.is-active::before { background: var(--ok); border-color: var(--ok); }
#toggle-fib.is-active { border-color: #c084fc; background: rgba(192,132,252,.12); }
#toggle-fib.is-active::before { background: #c084fc; border-color: #c084fc; }

.diag-mf, .diag-fib {
    margin-top: .75rem; padding: .85rem .95rem; border-radius: 10px; border: 1px solid;
}
.diag-mf-pos { border-color: rgba(55,211,155,.55); background: rgba(55,211,155,.1); color: var(--ok); }
.diag-mf-pos .diag-title { color: var(--ok); }
.diag-mf-neg { border-color: rgba(255,91,115,.55); background: rgba(255,91,115,.1); color: var(--danger); }
.diag-mf-neg .diag-title { color: var(--danger); }
.diag-mf-neutral { border-color: rgba(152,163,189,.45); background: rgba(152,163,189,.08); color: var(--text-dim); }
.diag-mf-neutral .diag-title { color: var(--text-dim); }
.diag-fib { border-color: rgba(192,132,252,.45); background: rgba(192,132,252,.1); color: #e4ccff; }
.diag-title { margin: 0 0 .45rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.diag-fib .diag-title { color: #c084fc; }
.diag-lead { margin: 0 0 .5rem; font-size: .9rem; line-height: 1.45; }
.diag-list { margin: 0; padding-left: 1.1rem; font-size: .84rem; line-height: 1.4; }
.diag-list li { margin-bottom: .25rem; }
.fib-mini { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; align-items: center; }
.fib-pill {
    font-size: .72rem; padding: .15rem .45rem; border-radius: 999px;
    background: rgba(192,132,252,.18); border: 1px solid rgba(192,132,252,.35);
}

.fib-levels-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    color: #c084fc; margin: .6rem 0 .35rem; font-weight: 650;
}
.fib-levels-head {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    font-size: .78rem; margin-bottom: .4rem; color: var(--text-dim);
}
.fib-arrow { color: #c084fc; }
.fib-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .35rem; }
.fib-table th, .fib-table td { text-align: left; padding: .25rem .4rem; border-bottom: 1px solid rgba(192,132,252,.2); }
.fib-table th { color: #c084fc; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.fib-table-compact { font-size: .72rem; }
.fib-table-compact td, .fib-table-compact th { padding: .15rem .3rem; }
.fib-row-emph td { color: #e4ccff; font-weight: 600; }
.panel-cell-fib {
    flex: 0 0 auto; padding: .35rem .55rem .5rem; border-top: 1px solid rgba(192,132,252,.25);
    background: rgba(192,132,252,.06); max-height: 140px; overflow-y: auto;
}
.diag-fib .fib-table td { color: #e4ccff; }
.diag-fib .fib-levels-head { color: #d4b8f0; }
.fib-table-report { margin: .5rem 0; }

.report-diag { margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid; }
.report-diag h4 { margin-top: 0; }
.report-diag-mf-pos { border-color: rgba(55,211,155,.45); background: rgba(55,211,155,.08); color: #1a6b4a; }
.report-diag-mf-pos h4 { color: var(--ok) !important; }
.report-diag-mf-neg { border-color: rgba(255,91,115,.45); background: rgba(255,91,115,.08); color: #8b2030; }
.report-diag-mf-neg h4 { color: var(--danger) !important; }
.report-diag-mf-neutral { border-color: rgba(152,163,189,.4); background: rgba(152,163,189,.08); color: #4a5568; }
.report-diag-mf-neutral h4 { color: var(--text-dim) !important; }
.report-diag-fib { border-color: rgba(192,132,252,.4); background: rgba(192,132,252,.08); color: #5b3480; }
.report-diag-fib h4 { color: #7c3aed !important; }
.diag-note { font-size: .78rem; opacity: .85; margin-top: .6rem; margin-bottom: 0; }
@media print {
    .report-diag-mf, .report-diag-fib { color: #222 !important; background: #f5f5f5 !important; border-color: #ccc !important; }
    .report-diag-mf h4, .report-diag-fib h4 { color: #333 !important; }
}

/* Toasts */
.toast-stack { position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; display: grid; gap: .5rem; max-width: min(360px, 92vw); pointer-events: none; }
.toast { pointer-events: auto; padding: .65rem .85rem; border-radius: 10px; font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: toast-in .2s ease; }
.toast-ok { background: rgba(55,211,155,.95); color: #0a2e22; }
.toast-err { background: rgba(255,91,115,.95); color: #fff; }
.toast-info { background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Alert popover */
.alert-popover { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 1rem; }
.alert-popover-card { background: var(--bg-elev); border: 1px solid rgba(255,140,0,.5); border-radius: 12px; padding: 1rem; max-width: 420px; width: 100%; box-shadow: 0 12px 40px rgba(255,140,0,.15); }
.alert-popover-actions { display: flex; gap: .5rem; margin-top: .8rem; }

/* Screener results */
.screener-results { margin-top: .6rem; font-size: .78rem; max-height: 220px; overflow-y: auto; }
.screener-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.screener-row b { font-size: .8rem; }
.screener-meta { color: var(--text-dim); font-size: .72rem; }

/* Paper badge on card */
.pc-paper { font-size: .65rem; font-weight: 700; padding: .1rem .35rem; border-radius: 6px; background: rgba(91,140,255,.2); color: #8ab4ff; flex-shrink: 0; }
.pc-age { font-size: .65rem; color: var(--text-dim); flex-shrink: 0; white-space: nowrap; }

/* Mobile sidebar */
.sidebar-toggle { display: none; position: fixed; top: .6rem; left: .6rem; z-index: 100; }
@media (max-width: 900px) {
    .sidebar-toggle { display: inline-flex; }
    .workspace .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 88vw); z-index: 200; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 24px rgba(0,0,0,.4); }
    .workspace.sidebar-open .sidebar { transform: none; }
    .workspace.sidebar-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }
    .board { padding-top: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pc-live-dot, .pc-alert-dot { animation: none; }
    .toast { animation: none; }
}

.panel-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.analyze-progress { font-size: .72rem; color: var(--text-dim); margin-top: .35rem; min-height: 1rem; }
