/* ============================================================
   portfolio_market_index.css
   Market Index tab styling
   ============================================================ */

/* ─── Layout ─────────────────────────────────────────────── */
.mi-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .mi-layout { grid-template-columns: 1fr; }
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.mi-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* Signaal card */
.mi-signal-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 1rem;
}

.mi-signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mi-signal-label { font-size: 0.75rem; color: #555; text-transform: uppercase; letter-spacing: 0.05em; }

.mi-score-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.mi-score-value { font-size: 2rem; font-weight: 700; color: #fff; }
.mi-score-max   { font-size: 0.9rem; color: #555; }

.mi-score-bar {
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.mi-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mi-metric {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mi-metric span  { font-size: 0.68rem; color: #555; }
.mi-metric strong{ font-size: 0.85rem; color: #ccc; }

.mi-updated { font-size: 0.7rem; color: #444; }

/* Settings card */
.mi-settings-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 1rem;
}

.mi-settings-title { margin: 0 0 0.25rem; font-size: 0.9rem; color: #ccc; }
.mi-settings-hint  { margin: 0 0 1rem; font-size: 0.75rem; color: #555; }

.mi-form { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }

.mi-form-row { display: flex; flex-direction: column; gap: 0.2rem; }

.mi-form-row label {
    font-size: 0.7rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mi-form-row input {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #eee;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}
.mi-form-row input:focus { outline: none; border-color: #00a854; }

.mi-settings-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mi-save-status         { font-size: 0.8rem; }
.mi-save-status--ok     { color: #00d46a; }
.mi-save-status--error  { color: #ff6b6b; }

/* ─── Knoppen ─────────────────────────────────────────────── */
.mi-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.15s;
}
.mi-btn:hover:not(:disabled) { opacity: 0.85; }
.mi-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mi-btn--primary   { background: #00a854; color: #fff; }
.mi-btn--secondary { background: #1a1a1a; color: #aaa; border: 1px solid #2a2a2a; }

/* ─── Geen signaal staat ──────────────────────────────────── */
.mi-no-signal {
    background: #0d0d0d;
    border: 1px dashed #2a2a2a;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.mi-no-signal-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.mi-no-signal h3   { margin: 0 0 0.5rem; color: #aaa; font-size: 1rem; }
.mi-no-signal p    { margin: 0 0 1rem; color: #555; font-size: 0.85rem; line-height: 1.5; }

.mi-thresholds {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mi-threshold {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    border: 1px solid;
}

.mi-threshold--early     { background: #2a2410; color: #ffd700; border-color: #8a6d00; }
.mi-threshold--confirmed { background: #0d2a1a; color: #00d46a; border-color: #00a854; }
.mi-threshold--strong    { background: #0a1a0a; color: #00ff6a; border-color: #00ff6a; }

/* ─── Pakket sectie ───────────────────────────────────────── */
.mi-package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mi-package-header h3 { margin: 0; font-size: 0.95rem; color: #ccc; }
.mi-package-hint      { font-size: 0.78rem; color: #555; margin: 0 0 1rem; }

/* Pakket tabel */
.mi-package-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

.mi-pkg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.mi-pkg-table th {
    text-align: left;
    color: #555;
    font-size: 0.68rem;
    text-transform: uppercase;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid #222;
    white-space: nowrap;
}

.mi-pkg-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #191919;
    color: #ccc;
}

.mi-pkg-table tfoot td {
    border-top: 1px solid #2a2a2a;
    border-bottom: none;
    color: #eee;
}

.mi-pkg-table tr:hover td { background: #141414; }

.mi-td-num   { color: #555; width: 24px; }
.mi-td-right { text-align: right; font-variant-numeric: tabular-nums; }
.mi-td-dim   { color: #666; font-size: 0.75rem; }
.mi-val--green { color: #00d46a !important; }
.mi-val--red   { color: #ff4d4d !important; }

/* ─── Trade resultaat ─────────────────────────────────────── */
.mi-trade-result {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.mi-trade-result--ok    { background: #0d2a1a; border: 1px solid #00a854; color: #00d46a; }
.mi-trade-result--error { background: #2a0d0d; border: 1px solid #a84400; color: #ff6b6b; }

.mi-result-link {
    color: #00d46a;
    text-decoration: underline;
    font-size: 0.82rem;
    display: inline-block;
    margin-top: 0.3rem;
}

/* ─── Geschiedenis ────────────────────────────────────────── */
.mi-history { border-top: 1px solid #1a1a1a; padding-top: 1rem; }
.mi-history-title { margin: 0 0 0.75rem; font-size: 0.85rem; color: #555; }

.mi-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #141414;
}

.mi-history-item-left { display: flex; gap: 0.6rem; align-items: center; }
.mi-history-status    { font-size: 1rem; }
.mi-history-name      { font-size: 0.82rem; color: #ccc; }
.mi-history-meta      { font-size: 0.72rem; color: #555; margin-top: 0.1rem; }
.mi-history-pnl       { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mi-history-empty     { color: #444; font-size: 0.82rem; }
