/* JIMIL BOT Dashboard — Dark Trading Theme */

body {
    background-color: #0a0e17 !important;
    color: #e0e0e0 !important;
    font-family: 'Segoe UI', 'Roboto', monospace;
    font-size: 13px;
}

/* Cards */
.card {
    background-color: #111827 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px !important;
    margin-bottom: 12px;
}

.card-header {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px !important;
    border-bottom: 1px solid #334155 !important;
}

/* PNL colors */
.pnl-positive { color: #22c55e !important; font-weight: 700; }
.pnl-negative { color: #ef4444 !important; font-weight: 700; }
.pnl-neutral  { color: #94a3b8 !important; }

/* Strategy toggles */
.strategy-toggle {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin: 3px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid #334155;
    background: #1e293b;
}
.strategy-toggle.active {
    border-color: #22c55e;
}
.strategy-toggle.inactive {
    border-color: #ef4444;
    opacity: 0.6;
}
.dot-green { color: #22c55e; margin-right: 6px; font-size: 16px; }
.dot-red   { color: #ef4444; margin-right: 6px; font-size: 16px; }

/* Instrument columns */
.instrument-col {
    background-color: #111827;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px;
}
.instrument-header {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #60a5fa;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
    margin-bottom: 8px;
}

/* Journal table */
.journal-table {
    width: 100%;
    font-size: 12px;
}
.journal-table th {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #334155;
}
.journal-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #1e293b;
    vertical-align: top;
}
.journal-table tr:hover {
    background-color: #1e293b;
}

/* Inputs */
.dash-input, .Select-control {
    background-color: #1e293b !important;
    color: #e0e0e0 !important;
    border: 1px solid #334155 !important;
    border-radius: 4px;
}

/* Buttons */
.btn-run {
    background-color: #22c55e !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 8px 20px;
}
.btn-run:hover {
    background-color: #16a34a !important;
}
.btn-reset {
    background-color: #ef4444 !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 8px 20px;
}
.btn-reset:hover {
    background-color: #dc2626 !important;
}

/* Progress bars for gauges */
.bar-gauge-container {
    background: #1e293b;
    border-radius: 6px;
    height: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid #334155;
}
.bar-gauge-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-weight: 700;
    font-size: 13px;
    color: white;
    min-width: 60px;
}
.bar-gauge-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}
.btn-export {
    background-color: #334155 !important;
    border: none !important;
    color: #e0e0e0 !important;
    padding: 8px 20px;
}

/* Header */
.header-bar {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    padding: 10px 20px;
    border-bottom: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
}
.header-pnl {
    font-size: 18px;
    font-weight: 700;
}

/* Scrollable log */
.journal-scroll {
    max-height: 350px;
    overflow-y: auto;
}

/* Legend */
.legend-bar {
    font-size: 10px;
    color: #64748b;
    padding: 4px 8px;
    border-top: 1px solid #1e293b;
}

/* Gauge */
.gauge-container {
    margin: 8px 0;
}

/* ─── Strategy Editor ─── */
.editor-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.editor-grid th {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    padding: 4px 6px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #334155;
    min-width: 70px;
}
.editor-grid td {
    padding: 2px 4px;
    border-bottom: 1px solid #1e293b;
    vertical-align: middle;
}
.editor-grid tr:hover {
    background-color: rgba(30, 41, 59, 0.5);
}
.editor-grid .form-check {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.editor-grid .form-check-input {
    cursor: pointer;
    margin: 0;
}

/* Tab styles for editor */
.nav-tabs .nav-link {
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent !important;
    padding: 6px 16px;
}
.nav-tabs .nav-link.active {
    color: #60a5fa !important;
    background-color: #1e293b !important;
    border-color: #334155 #334155 #1e293b !important;
}
.nav-tabs {
    border-bottom: 1px solid #334155 !important;
}

/* Switch styling in editor — larger */
.form-switch .form-check-input {
    cursor: pointer;
    background-color: #334155;
    border-color: #475569;
}
.form-switch .form-check-input:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}
.editor-switch-lg .form-check-input {
    width: 3em !important;
    height: 1.5em !important;
}

/* Checkbox styling in editor — larger */
.editor-checkbox-lg .form-check-input {
    width: 1.4em !important;
    height: 1.4em !important;
    cursor: pointer;
    border: 2px solid #475569 !important;
}
.editor-checkbox-lg .form-check-input:checked {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
}
