/* ltrade/http/static/styles.css */
/* STATUS: V5.21 (FULL RESTORE + Multi-View) */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* SCROLLBARS (Dunkel) */
/* Custom Scrollbar for Sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #111827; 
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #374151; 
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* =========================================================================
   TABLE SKIN — SSOT (Design-Direktive 2026-06-09)
   „sparsam & transparent — Blaustich blendet in Schwarz".
   Flächen über dem fast-schwarzen Body (gray-950) niedrig-deckend halten,
   damit der blaustichige Tailwind-Cool-Gray in Schwarz verschwindet.
   KEINE deckenden Panel-/Header-Bänder, KEIN backdrop-filter: blur.
   Trennung via Haarlinien statt gefüllter Flächen.
   Beide Haupttabellen (Active-Monitor + Portfolio-View) nutzen diese Klassen.
   ========================================================================= */
.lt-table {
    width: 100%;
    border-collapse: collapse;
    /* table-layout: fixed → Spaltenbreiten kommen aus <colgroup>/th-Breiten,
       nicht aus dem Zellinhalt. Macht content-visibility auf Zeilen (s.u.)
       sicher: off-screen-Zeilen beeinflussen die Spaltenbreite nicht. */
    table-layout: fixed;
    background: transparent;            /* kein opakes Panel */
}
.lt-thead {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: rgba(17, 24, 39, 0.55);  /* gray-900, dezent — KEIN blur */
}
.lt-th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #6b7280;                     /* gray-500 */
    padding: 8px 12px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.6);  /* gray-800 Haarlinie */
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.lt-th:hover { color: #e5e7eb; }
.lt-row {
    background-color: rgba(31, 41, 55, 0.20);  /* gray-800/20 — Blaustich → Schwarz */
    border-bottom: 1px solid rgba(31, 41, 55, 0.30);
    transition: background-color 0.15s;
    /* WP3 — native Virtualisierung: off-screen-Zeilen werden nicht
       gelayoutet/gepaintet. Sicher dank table-layout: fixed. */
    content-visibility: auto;
    contain-intrinsic-size: auto 52px;  /* Platzhalterhöhe für Scrollbar-Stabilität */
}
.lt-row:hover { background-color: rgba(31, 41, 55, 0.50); }
.lt-td {
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 0.8rem;
    overflow: hidden;                   /* fixed-layout: Inhalt nicht überlaufen lassen */
}
.lt-tfoot {
    background-color: rgba(17, 24, 39, 0.40);  /* gray-900/40 dezent */
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    font-weight: 600;
}
/* WP3 — content-visibility-Utility für Tabellen, deren Zeilen ihr eigenes
   Styling behalten (z.B. Active-Monitor-tr mit Tailwind-Klassen). */
.lt-cv {
    content-visibility: auto;
    contain-intrinsic-size: auto 52px;
}

/* --- RICH GRID SYSTEM --- */

/* Gemeinsame Basis für Header und Zeilen - EXAKTE Ausrichtung */
.asset-header, .asset-grid-row {
	display: grid;
    /* 1. Asset (1.4fr)
       2. Portfolio + Broker Mode (1.0fr)
       3. Sales Physics kompakt (1.6fr)
       4. Strategy (1.3fr)
       5. Return (1.0fr)
       6. Entwicklung Gesamt (0.8fr)
       6b. Entwicklung Heute (0.8fr)
       7. Signal/Actions (2.0fr)
    */
    grid-template-columns: 1.4fr 1.0fr 1.6fr 1.3fr 1.0fr 0.8fr 0.8fr 2.0fr;
    align-items: center;
    padding: 8px 16px;
    gap: 10px;
}
/* Header-spezifisches Styling */
.asset-header {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #6b7280; /* gray-500 */
    border-bottom: 1px solid #1f2937; /* gray-800 */
    background-color: rgba(17, 24, 39, 0.5); /* gray-900/50 */
}
/* Zeilen-spezifisches Styling */
.asset-grid-row {
    background-color: rgba(31, 41, 55, 0.2); /* gray-800/20 */
    border: 1px solid rgba(55, 65, 81, 0.3);
    border-radius: 6px;
    transition: all 0.2s;
}

.asset-grid-row:hover {
    background-color: rgba(31, 41, 55, 0.6);
    border-color: rgba(59, 130, 246, 0.3); /* blue-500/30 */
}




/* Text & Labels */
.asset-symbol { font-weight: 700; color: #f3f4f6; font-size: 0.95rem; }
.asset-name { color: #60a5fa; font-size: 0.75rem; font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- BUTTONS & BADGES --- */

/* Aktiver Status (RUNNING) */
.badge-active {
    background-color: rgba(16, 185, 129, 0.1); /* Emerald-500 mit 10% Opazität */
    color: #10b981;
    border: 1px solid #10b981;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-active:hover {
    background-color: #10b981;
    color: #064e3b; /* Dunkelgrün bei Hover */
}

/* Inaktiver Status (PAUSED) */
.badge-off {
    background-color: #111827; /* Gray-900 */
    color: #6b7280; /* Gray-500 */
    border: 1px solid #374151; /* Gray-700 */
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-off:hover {
    background-color: #374151;
    color: white;
}

/* Adopt Button (Klein & Cyberpunk-Style) - NEU */
.btn-adopt {
    font-size: 9px;
    font-weight: 800;
    color: #3b82f6; /* Blue-500 */
    border: 1px solid rgba(59, 130, 246, 0.4);
    background-color: rgba(59, 130, 246, 0.1);
    padding: 2px 5px;
    border-radius: 2px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.btn-adopt:hover {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* --- UTILS --- */
.pos { color: #10b981; font-weight: 700; }
.neg { color: #ef4444; font-weight: 700; }
.hidden { display: none !important; }

/* Modal & Overlays */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

/* --- NEU: MULTI VIEW EXTENSIONS --- */

/* Custom Scrollbar für die Checkbox-Liste (kleiner als Standard) */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 2px; }

/* Checkbox Liste im Sidebar */
#pf-checkbox-list input[type="checkbox"] {
    background-color: #374151; 
    border-color: #4b5563;
}
#pf-checkbox-list div:hover {
    background-color: #1f2937;
}

/* Animation für das Einblenden der Multi-View Area */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ============================================================ */
/* HELP SYSTEM                                                   */
/* ============================================================ */

/* TOC */
.help-toc-section { padding: 0 8px 8px 8px; }
.help-toc-section-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b5563;
    padding: 8px 8px 4px 8px;
}
.help-toc-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    font-size: 12px;
    color: #9ca3af;
    border-radius: 5px;
    cursor: pointer;
    background: none;
    border: none;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.help-toc-item:hover { background: #1f2937; color: #e5e7eb; }
.help-toc-item--active { background: #1e3a5f; color: #60a5fa !important; }

/* Article */
.help-article { max-width: 700px; color: #d1d5db; font-size: 13px; line-height: 1.7; }
.help-article h2 {
    font-size: 18px; font-weight: 700; color: #f9fafb;
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid #374151;
}
.help-article h3 {
    font-size: 13px; font-weight: 700; color: #e5e7eb;
    margin-top: 20px; margin-bottom: 8px; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.help-article p { margin-bottom: 10px; }
.help-article ul, .help-article ol { padding-left: 20px; margin-bottom: 10px; }
.help-article li { margin-bottom: 4px; }
.help-article code {
    background: #1f2937; color: #93c5fd;
    padding: 1px 5px; border-radius: 3px;
    font-family: monospace; font-size: 12px;
}
.help-article pre {
    background: #111827; border: 1px solid #374151;
    border-radius: 6px; padding: 12px 14px;
    overflow-x: auto; margin-bottom: 12px;
}
.help-article pre code {
    background: none; color: #86efac;
    padding: 0; font-size: 12px; line-height: 1.6;
}
.help-article table {
    width: 100%; border-collapse: collapse;
    margin-bottom: 14px; font-size: 12px;
}
.help-article th {
    background: #1f2937; color: #9ca3af;
    padding: 6px 10px; text-align: left;
    font-size: 11px; text-transform: uppercase;
    border-bottom: 1px solid #374151;
}
.help-article td {
    padding: 6px 10px; border-bottom: 1px solid #1f2937;
    vertical-align: top;
}
.help-article tr:hover td { background: #1a2234; }
.help-warning {
    background: rgba(234,179,8,0.08); border-left: 3px solid #ca8a04;
    padding: 10px 14px; border-radius: 0 5px 5px 0;
    color: #fbbf24; margin: 12px 0; font-size: 12px;
}
.help-info {
    background: rgba(59,130,246,0.08); border-left: 3px solid #3b82f6;
    padding: 10px 14px; border-radius: 0 5px 5px 0;
    color: #93c5fd; margin: 12px 0; font-size: 12px;
}
.help-empty { color: #4b5563; font-size: 12px; padding: 12px; }

/* Quick-link buttons on welcome screen */
.help-quicklinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.help-quicklinks button {
    background: #1f2937; border: 1px solid #374151;
    color: #9ca3af; padding: 7px 14px; border-radius: 6px;
    font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.help-quicklinks button:hover {
    background: #2563eb; border-color: #3b82f6; color: #fff;
}