/* ============================================================
   Investor Watch – style.css
   1:1 port from original + Tabulator overrides
   ============================================================ */

html.light-init body { background:#f5f3ee; color:#1a1a2e; }

:root {
  --bg:#0a0a0f; --surface:#12121a; --border:#1e1e2e; --accent:#c8a96e; --accent2:#7c6fcd;
  --text:#e8e8f0; --muted:#6b6b80; --owns:#4ade80; --bought:#60a5fa; --watching:#fbbf24;
  --sold:#f87171; --bullish:#34d399; --bearish:#fb7185; --unknown:#94a3b8;
}
body.light {
  --bg:#f5f3ee; --surface:#ede9e0; --border:#d8d0c0; --accent:#8b6914; --accent2:#5040a0;
  --text:#1a1a2e; --muted:#5a5040; --owns:#166534; --bought:#1e40af; --watching:#92400e;
  --sold:#991b1b; --bullish:#065f46; --bearish:#9f1239; --unknown:#475569;
}

* { box-sizing:border-box; margin:0; padding:0; }
body { background:var(--bg); color:var(--text); font-family:Georgia,'Times New Roman',serif; font-size:14px; min-height:100vh; transition:background 0.2s,color 0.2s; }

/* Header */
.header { border-bottom:1px solid var(--border); padding:32px 40px 24px; display:flex; align-items:flex-end; justify-content:space-between; gap:40px; }
.header-left { min-width:0; flex:1; }
.header-left h1 { font-size:36px; font-weight:700; color:var(--accent); letter-spacing:-0.5px; line-height:1; }
.header-left .subtitle { font-family:'Courier New',monospace; font-size:11px; color:var(--muted); margin-top:6px; letter-spacing:2px; text-transform:uppercase; }
.subtitle a { color:var(--accent); text-decoration:none; }
.subtitle a:hover { text-decoration:underline; }
.header-right { text-align:right; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); line-height:1.8; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.header-right-row { display:flex; align-items:center; gap:10px; }
.header-right .count { font-size:28px; font-family:Georgia,serif; color:var(--text); display:block; }
.support-icon-btn { background:transparent; border:1px solid var(--border); color:var(--muted); width:28px; height:28px; border-radius:50%; font-size:13px; cursor:pointer; transition:all 0.2s; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.support-icon-btn:hover { border-color:var(--accent); color:var(--accent); }
.info-btn { background:transparent; border:1px solid var(--border); color:var(--muted); width:28px; height:28px; border-radius:50%; font-family:'Courier New',monospace; font-size:13px; cursor:pointer; transition:all 0.2s; display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; margin-left:8px; text-decoration:none; }
.info-btn:hover { border-color:var(--accent); color:var(--accent); }
.theme-toggle { background:transparent; border:1px solid var(--border); color:var(--muted); padding:7px 14px; font-family:'Courier New',monospace; font-size:11px; border-radius:4px; cursor:pointer; transition:all 0.2s; text-transform:uppercase; letter-spacing:1px; }
.theme-toggle:hover { border-color:var(--accent); color:var(--accent); }

/* Portrait */
.portrait { border-bottom:1px solid var(--border); padding:32px 40px; background:var(--surface); }
.portrait-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:32px; margin-top:20px; }
.portrait-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.portrait-intro { font-size:14px; line-height:1.8; color:var(--text); max-width:900px; }
.portrait-intro strong { color:var(--accent); display:inline !important; font-weight:bold; }
.portrait-label { font-family:'Courier New',monospace; font-size:10px; text-transform:uppercase; letter-spacing:2px; color:var(--muted); margin-bottom:10px; }
.portrait-card { background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:16px 20px; }
.portrait-card p { font-size:13px; line-height:1.7; color:var(--muted); margin:0; }
.portrait-card strong { color:var(--text); font-size:13px; }
.portrait-toggle { font-family:'Courier New',monospace; font-size:11px; color:var(--muted); cursor:pointer; background:none; border:none; padding:0; margin-top:16px; display:block; }
.portrait-toggle:hover { color:var(--accent); }
.portrait-collapsible { overflow:hidden; transition:max-height 0.3s ease; }
.read-more { font-family:'Courier New',monospace; font-size:11px; color:var(--accent); cursor:pointer; background:none; border:none; padding:0; text-decoration:none; display:inline; }
.read-more:hover { text-decoration:underline; }

/* Filters */
.filters { padding:20px 40px; border-bottom:1px solid var(--border); display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; background:var(--surface); }
.filter-group { display:flex; flex-direction:column; gap:4px; }
.filter-group label { font-family:'Courier New',monospace; font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; }
select, input[type="text"] { background:var(--bg); border:1px solid var(--border); color:var(--text); padding:7px 12px; font-family:'Courier New',monospace; font-size:12px; border-radius:4px; outline:none; transition:border-color 0.2s; min-width:140px; }
select:focus, input[type="text"]:focus { border-color:var(--accent); }
input[type="range"] { width:120px; accent-color:var(--accent); cursor:pointer; }
.confidence-label { font-family:'Courier New',monospace; font-size:12px; color:var(--accent); }
.filter-row { display:flex; gap:8px; align-items:center; }
.btn-reset { background:transparent; border:1px solid var(--border); color:var(--muted); padding:7px 16px; font-family:'Courier New',monospace; font-size:11px; border-radius:4px; cursor:pointer; transition:all 0.2s; text-transform:uppercase; letter-spacing:1px; }
.btn-reset:hover { border-color:var(--accent); color:var(--accent); }

/* Tooltip */
.checkbox-filter { display:flex; align-items:center; gap:6px; cursor:pointer; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); user-select:none; }
.checkbox-filter input { width:14px; height:14px; cursor:pointer; accent-color:var(--accent); }
.checkbox-filter:hover { color:var(--text); }
.tooltip-wrap { position:relative; display:inline-flex; align-items:center; }
.tooltip-icon { width:14px; height:14px; border-radius:50%; border:1px solid var(--muted); color:var(--muted); font-size:9px; display:inline-flex; align-items:center; justify-content:center; cursor:help; margin-left:4px; font-family:'Courier New',monospace; flex-shrink:0; }
.tooltip-icon:hover + .tooltip-box, .tooltip-box:hover { display:block; }
.tooltip-box { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:10px 12px; font-family:Georgia,serif; font-size:12px; color:var(--text); line-height:1.6; width:280px; z-index:100; box-shadow:0 4px 16px rgba(0,0,0,0.3); }
.tooltip-box::after { content:''; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:5px solid transparent; border-top-color:var(--border); }

/* Stats + Sort */
.stats-bar { padding:12px 40px; border-bottom:1px solid var(--border); display:flex; gap:24px; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); align-items:center; }
.stats-bar strong { color:var(--text); font-size:14px; }
.sort-bar { padding:10px 40px; display:flex; gap:6px; align-items:center; border-bottom:1px solid var(--border); }
.sort-bar span { font-family:'Courier New',monospace; font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; margin-right:4px; }
.sort-btn { background:transparent; border:1px solid var(--border); color:var(--muted); padding:4px 12px; font-family:'Courier New',monospace; font-size:11px; border-radius:3px; cursor:pointer; transition:all 0.15s; }
.sort-btn:hover, .sort-btn.active { border-color:var(--accent); color:var(--accent); background:rgba(200,169,110,0.08); }

/* Table wrap */
.table-wrap { padding:0 40px 40px; overflow-x:auto; }

/* Date badges */
.date-explicit { color:var(--accent); font-family:'Courier New',monospace; font-size:12px; }
.date-context  { color:#a08060; font-family:'Courier New',monospace; font-size:12px; }
.date-fallback { color:var(--muted); font-family:'Courier New',monospace; font-size:12px; }
.date-badge { font-size:9px; padding:1px 5px; border-radius:2px; margin-top:3px; display:inline-block; text-transform:uppercase; letter-spacing:0.5px; cursor:help; font-family:'Courier New',monospace; }
.badge-explicit { background:rgba(200,169,110,0.15); color:var(--accent); }
.badge-context  { background:rgba(160,128,96,0.15); color:#a08060; }
.badge-fallback { background:rgba(107,107,128,0.15); color:var(--muted); }

/* Batch badges */
.batch-badge { display:inline-block; font-family:'Courier New',monospace; font-size:9px; text-transform:uppercase; letter-spacing:0.5px; padding:2px 6px; border-radius:2px; margin-bottom:4px; cursor:help; }
.batch-13f      { background:rgba(200,169,110,0.15); color:var(--accent); border:1px solid rgba(200,169,110,0.3); }
.batch-investor { background:rgba(100,200,150,0.15); color:#5cb88a; border:1px solid rgba(100,200,150,0.3); }
.batch-3rdparty { background:rgba(150,150,150,0.1); color:var(--muted); border:1px solid var(--border); }

/* Type badges */
.type-badge, .typ-owns, .typ-bought, .typ-watching, .typ-sold,
.typ-increased, .typ-decreased, .typ-bullish, .typ-bearish, .typ-unknown {
  display:inline-block; padding:2px 8px; border-radius:3px;
  font-family:'Courier New',monospace; font-size:11px; font-weight:500; white-space:nowrap;
}
.typ-owns     { background:rgba(74,222,128,0.12);  color:var(--owns);     border:1px solid rgba(74,222,128,0.2);  }
.typ-bought   { background:rgba(96,165,250,0.12);  color:var(--bought);   border:1px solid rgba(96,165,250,0.2);  }
.typ-watching { background:rgba(251,191,36,0.12);  color:var(--watching); border:1px solid rgba(251,191,36,0.2);  }
.typ-sold     { background:rgba(248,113,113,0.12); color:var(--sold);     border:1px solid rgba(248,113,113,0.2); }
.typ-increased{ background:rgba(74,222,128,0.12);  color:var(--owns);     border:1px solid rgba(74,222,128,0.2);  }
.typ-decreased{ background:rgba(248,113,113,0.12); color:var(--sold);     border:1px solid rgba(248,113,113,0.2); }
.typ-bullish  { background:rgba(52,211,153,0.12);  color:var(--bullish);  border:1px solid rgba(52,211,153,0.2);  }
.typ-bearish  { background:rgba(251,113,133,0.12); color:var(--bearish);  border:1px solid rgba(251,113,133,0.2); }
.typ-unknown  { background:rgba(148,163,184,0.12); color:var(--unknown);  border:1px solid rgba(148,163,184,0.2); }

/* Cell helpers */
.company-null  { color:var(--muted); font-style:italic; font-weight:normal; }
.market-cell   { font-family:'Courier New',monospace; font-size:12px; color:var(--muted); white-space:nowrap; }
.quote-cell    { font-style:italic; color:var(--muted); font-size:12px; max-width:220px; }
.context-cell  { font-size:12px; color:#9090a8; max-width:260px; font-family:Georgia,serif; }
body.light .context-cell { color:#606070; }
.confidence-cell { font-family:'Courier New',monospace; font-size:12px; white-space:nowrap; }
.confidence-bar  { width:60px; height:3px; background:var(--border); border-radius:2px; margin-top:4px; overflow:hidden; }
.confidence-fill { height:100%; border-radius:2px; background:var(--accent); }
.video-cell-link { color:var(--accent); text-decoration:none; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:12px; font-family:Georgia,serif; }
.video-cell-link:hover { text-decoration:underline; }
.channel { color:var(--muted); font-size:11px; margin-top:2px; font-family:'Courier New',monospace; }

/* Overlays */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:200; align-items:center; justify-content:center; }
.overlay.open { display:flex; }
body.light .overlay { background:rgba(0,0,0,0.5); }
.overlay-box { background:var(--surface); border:1px solid var(--border); border-radius:8px; max-width:680px; width:90%; max-height:80vh; overflow-y:auto; padding:40px; position:relative; }
.overlay-box h2 { font-size:22px; font-weight:700; color:var(--accent); margin-bottom:24px; }
.overlay-box h3 { font-family:'Courier New',monospace; font-size:11px; text-transform:uppercase; letter-spacing:2px; color:var(--muted); margin:24px 0 10px; }
.overlay-box p  { font-size:13px; line-height:1.7; color:var(--text); margin-bottom:8px; }
.overlay-box ul { padding-left:20px; margin-bottom:8px; }
.overlay-box li { font-size:13px; line-height:1.7; color:var(--text); margin-bottom:4px; }
.overlay-close  { position:absolute; top:16px; right:20px; background:transparent; border:none; color:var(--muted); font-size:22px; cursor:pointer; line-height:1; }
.overlay-close:hover { color:var(--text); }
.disclaimer-box { background:rgba(200,169,110,0.08); border:1px solid rgba(200,169,110,0.2); border-radius:4px; padding:12px 16px; margin-top:16px; }
.disclaimer-box p { color:var(--accent) !important; font-size:12px !important; }

/* Support popup */
.support-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:300; align-items:center; justify-content:center; }
.support-overlay.open { display:flex; }
.support-box { background:var(--surface); border:1px solid var(--border); border-radius:12px; max-width:420px; width:90%; padding:36px; position:relative; text-align:center; }
.support-box h2 { font-size:20px; font-weight:700; color:var(--accent); margin-bottom:12px; }
.support-box p  { font-size:13px; line-height:1.7; color:var(--muted); margin-bottom:20px; }
.support-btn    { display:inline-block; background:var(--accent); color:#000; font-family:'Courier New',monospace; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px; padding:12px 28px; border-radius:6px; text-decoration:none; transition:opacity 0.2s; }
.support-btn:hover { opacity:0.85; }
.support-later  { display:block; margin-top:14px; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); cursor:pointer; background:none; border:none; text-decoration:underline; width:100%; text-align:center; }
.support-later:hover { color:var(--text); }

/* Cookie banner */
.cookie-banner { display:block; border-bottom:1px solid var(--border); background:var(--surface); transition:opacity 0.4s ease; }
html.hide-cookie #cookie-banner { display:none !important; }
.cookie-banner-inner { padding:16px 40px; display:flex; align-items:center; justify-content:center; gap:24px; text-align:center; }
.cookie-banner p   { margin:0; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); line-height:1.7; }
.cookie-banner a   { color:var(--accent); text-decoration:none; }
.cookie-banner a:hover { text-decoration:underline; }
.cookie-btn { background:transparent; border:1px solid var(--border); color:var(--muted); padding:5px 14px; font-family:'Courier New',monospace; font-size:11px; border-radius:4px; cursor:pointer; white-space:nowrap; transition:all 0.2s; text-transform:uppercase; letter-spacing:1px; flex-shrink:0; }
.cookie-btn:hover { border-color:var(--accent); color:var(--accent); }

/* Footer */
.footer { border-top:1px solid var(--border); padding:20px 40px; text-align:center; font-family:'Courier New',monospace; font-size:11px; color:var(--muted); }
.footer a { color:var(--accent); text-decoration:none; cursor:pointer; }
.footer a:hover { text-decoration:underline; }

/* ============================================================
   Tabulator – aggressiv überschreiben
   Keine vertikalen Linien, kein eigenes Styling
   ============================================================ */
.tabulator {
  background:var(--bg) !important;
  border:none !important;
  font-family:Georgia,'Times New Roman',serif !important;
  font-size:14px !important;
  color:var(--text) !important;
  margin-top:20px !important;
}
.tabulator-header {
  background:var(--surface) !important;
  border-top:none !important;
  border-bottom:1px solid var(--border) !important;
}
.tabulator-col {
  background:var(--surface) !important;
  border-right:none !important;
  border-left:none !important;
  font-family:'Courier New',monospace !important;
  font-size:10px !important;
  text-transform:uppercase !important;
  letter-spacing:1.5px !important;
  color:var(--muted) !important;
  padding:10px 12px !important;
}
.tabulator-col:hover { background:var(--surface) !important; }
.tabulator-col-title { color:var(--muted) !important; }
.tabulator-col .tabulator-col-sorter { display:none !important; }
.tabulator-row {
  background:var(--bg) !important;
  border-bottom:1px solid var(--border) !important;
  border-top:none !important;
  transition:background 0.15s !important;
}
.tabulator-row:hover { background:#141420 !important; }
body.light .tabulator-row:hover { background:rgba(0,0,0,0.02) !important; }
.tabulator-row.tabulator-selected { background:var(--bg) !important; }
.tabulator-cell {
  border-right:none !important;
  border-left:none !important;
  border-top:none !important;
  padding:12px 12px !important;
  vertical-align:top !important;
  color:var(--text) !important;
  font-size:13px !important;
  font-family:Georgia,'Times New Roman',serif !important;
  line-height:1.5 !important;
}
.tabulator-footer {
  background:var(--surface) !important;
  border-top:1px solid var(--border) !important;
  border-bottom:none !important;
  font-family:'Courier New',monospace !important;
  font-size:11px !important;
  color:var(--muted) !important;
  padding:8px 12px !important;
}
.tabulator-footer .tabulator-page-counter { color:var(--muted) !important; font-family:'Courier New',monospace !important; font-size:11px !important; }
.tabulator-footer .tabulator-page-size { background:var(--bg) !important; border:1px solid var(--border) !important; color:var(--text) !important; font-family:'Courier New',monospace !important; font-size:11px !important; border-radius:4px !important; padding:3px 6px !important; }
.tabulator-page {
  background:transparent !important;
  border:1px solid var(--border) !important;
  color:var(--muted) !important;
  font-family:'Courier New',monospace !important;
  font-size:11px !important;
  border-radius:3px !important;
  padding:4px 10px !important;
  margin:0 2px !important;
  transition:all 0.15s !important;
}
.tabulator-page:hover, .tabulator-page.active {
  border-color:var(--accent) !important;
  color:var(--accent) !important;
  background:rgba(200,169,110,0.08) !important;
}
.tabulator-page[disabled] { opacity:0.3 !important; cursor:default !important; }
.tabulator-placeholder { padding:60px !important; }
.tabulator-placeholder span { font-family:'Courier New',monospace !important; font-size:13px !important; color:var(--muted) !important; }

/* Responsive */
@media (max-width:768px) {
  .portrait { padding:24px 20px; }
  .portrait-grid { grid-template-columns:1fr; gap:16px; }
  .header { flex-direction:column; align-items:flex-start; gap:12px; padding:24px 20px 16px; }
  .header-right { text-align:left; align-items:flex-start; }
  .filters { padding:16px 20px; gap:10px; }
  .filter-group { min-width:calc(50% - 5px); }
  select, input[type="text"] { min-width:unset; width:100%; }
  .stats-bar { padding:10px 20px; flex-wrap:wrap; gap:12px; }
  .sort-bar { padding:8px 20px; flex-wrap:wrap; }
  .table-wrap { padding:0 20px 40px; }
  .footer { padding:16px 20px; }
  .overlay-box { padding:24px; }
  .cookie-banner-inner { flex-direction:column; padding:14px 20px; gap:10px; }
}
