/* ArgTradeAI Trading Dashboard Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    background: #1a1a2e;
    color: #eee;
    overflow: hidden;
    height: 100vh;
    font-size: 15px;
}

.app {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #16213e;
    border-right: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #0f3460;
}

.logo h2 {
    color: #e94560;
    font-size: 1.4em;
    margin-bottom: 4px;
}

.version {
    color: #aaa;
    font-size: 0.8em;
}

.nav-items {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    color: #b0b8c4;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(15, 52, 96, 0.5);
    color: #eee;
}

.nav-item.active {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
    border-left-color: #e94560;
}

.icon { font-size: 1.1em; }

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #e94560;
}

/* Cards */
.card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.card h3 {
    color: #e94560;
    margin-bottom: 14px;
    font-size: 1.05em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-label {
    color: #b0b8c4;
    font-size: 0.85em;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #e94560;
    font-size: 1.4em;
    font-weight: bold;
}

/* Forms */
.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

input, select, textarea {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    color: #eee;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #e94560;
}

textarea {
    width: 100%;
    resize: vertical;
    margin-bottom: 10px;
}

select {
    min-width: 160px;
}

/* Buttons */
.btn {
    background: #0f3460;
    color: #eee;
    border: 1px solid #0f3460;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.btn:hover {
    background: #1a4a7a;
}

.btn-primary {
    background: #e94560;
    border-color: #e94560;
}

.btn-primary:hover {
    background: #d63851;
}

.btn-accent {
    background: #0f3460;
    border-color: #e94560;
    color: #e94560;
}

.btn-accent:hover {
    background: rgba(233, 69, 96, 0.15);
}

/* Result Box */
.result-box {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.5;
}

.result-box:empty {
    display: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

th {
    color: #e94560;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td { font-size: 0.95em; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88em;
    font-weight: bold;
}

.badge-ok { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.badge-warn { background: rgba(255, 152, 0, 0.2); color: #ff9800; }
.badge-error { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.badge-info { background: rgba(33, 150, 243, 0.2); color: #2196f3; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1a1a2e; }
::-webkit-scrollbar-thumb { background: #0f3460; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #e94560; }

/* Loading spinner */
.loading::after {
    content: '...';
    animation: dots 1s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Key-Value Table */
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table tr { border-bottom: 1px solid rgba(15, 52, 96, 0.5); }
.kv-table tr:last-child { border-bottom: none; }
.kv-key {
    color: #b0b8c4;
    font-size: 0.92em;
    padding: 8px 12px 8px 0;
    white-space: nowrap;
    width: 40%;
    vertical-align: top;
}
.kv-val {
    color: #eee;
    padding: 8px 0;
    word-break: break-word;
}

/* Service Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.svc-card {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    padding: 12px;
}
.svc-name {
    font-weight: bold;
    font-size: 0.95em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.svc-detail {
    font-size: 0.88em;
    color: #b0b8c4;
    padding: 2px 0;
}
.svc-detail-key { color: #b0b8c4; }

/* Data display */
.data-error {
    color: #f44336;
    display: flex;
    align-items: center;
    gap: 8px;
}
.data-tag {
    display: inline-block;
    background: rgba(15, 52, 96, 0.5);
    border: 1px solid #0f3460;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px;
    font-size: 0.9em;
}
.data-list { display: flex; flex-wrap: wrap; gap: 4px; }

/* Settings Fields */
.settings-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.setting-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(15, 52, 96, 0.3);
}
.setting-row:last-child { border-bottom: none; }
.setting-label {
    min-width: 200px;
    color: #b0b8c4;
    font-size: 0.92em;
    flex-shrink: 0;
}
.setting-input {
    flex: 1;
    min-width: 0;
}
.setting-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.setting-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0f3460;
    border-radius: 12px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: #aaa;
    border-radius: 50%;
    transition: 0.3s;
}
.setting-toggle input:checked + .toggle-slider { background: #e94560; }
.setting-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #fff;
}

/* Responsive */
/* ==================== Dashboard Compact ==================== */
.dash-topbar {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
}
.dash-stats-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.dash-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(15, 52, 96, 0.4);
    border-radius: 4px;
    flex: 1;
    min-width: 120px;
}
.ds-label {
    color: #b0b8c4;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.ds-val {
    color: #eee;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
}
.ds-meta {
    color: #9aa3b0;
    font-size: 0.82em;
}
.dash-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 0.85em;
}

/* Dashboard grid layout */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 12px;
    margin-bottom: 12px;
}
.dash-chart-card {
    padding: 12px !important;
    margin-bottom: 0 !important;
}
.dash-chart-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.dash-chart-header h3 { margin-bottom: 0; font-size: 1em; }
.chart-tf-btns { display: flex; gap: 2px; }
.chart-tf { padding: 3px 10px !important; font-size: 0.82em !important; border-color: #0f3460 !important; }
.chart-tf.active { background: #e94560 !important; border-color: #e94560 !important; color: #fff !important; }
.chart-live-price { font-size: 1.3em; font-weight: bold; margin-left: auto; }
.chart-info { display: flex; padding-top: 4px; color: #c0c8d4; font-size: 0.88em; gap: 16px; }
.chart-indicators { display: flex; gap: 4px; margin-left: auto; }
.chart-ind-btn { padding: 3px 10px !important; font-size: 0.82em !important; border-color: #0f3460 !important; }
.chart-ind-btn.active { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
#price-chart { width: 100%; border-radius: 4px; background: #111827; cursor: crosshair; }
.chart-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    padding-top: 6px;
}
.chart-controls .btn-sm {
    min-width: 32px;
    text-align: center;
    font-size: 0.95em;
    padding: 4px 10px;
    user-select: none;
}

/* Dashboard sidebar */
.dash-sidebar { display: flex; flex-direction: column; gap: 12px; }
.card-compact { padding: 10px 14px !important; margin-bottom: 0 !important; }
.card-compact h3 { font-size: 0.95em; margin-bottom: 8px; }

/* Compact tick display */
.tick-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(15, 52, 96, 0.4);
}
.tick-row:last-child { border-bottom: none; }
.tick-symbol { font-weight: bold; font-size: 0.95em; min-width: 70px; }
.tick-prices { display: flex; gap: 10px; font-size: 0.92em; }
.tick-bid { color: #4caf50; font-weight: bold; }
.tick-ask { color: #f44336; font-weight: bold; }
.tick-spread { color: #9aa3b0; font-size: 0.88em; }

/* Compact account info */
.acc-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.9em; border-bottom: 1px solid rgba(15, 52, 96, 0.2); }
.acc-row:last-child { border-bottom: none; }
.acc-key { color: #b0b8c4; }
.acc-val { color: #ddd; }

/* Compact service list */
.svc-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 0.9em; }
.svc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.svc-dot-ok { background: #4caf50; }
.svc-dot-warn { background: #ff9800; }
.svc-dot-err { background: #f44336; }

/* Position table compact */
table td { vertical-align: middle; }
table tr:hover { background: rgba(15, 52, 96, 0.3); }

@media (max-width: 1000px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-stats-row { gap: 4px; }
    .dash-stat { min-width: 100px; padding: 3px 8px; }
}

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .logo h2 { display: none; }
    .sidebar .version { display: none; }
    .nav-item { padding: 12px; justify-content: center; }
    .nav-item span:not(.icon) { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
    .setting-row { flex-direction: column; align-items: flex-start; }
    .setting-label { min-width: auto; }
}

/* Gold Signal */
.gs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 900px) { .gs-grid { grid-template-columns: 1fr; } }

/* News Feed */
.nf-grid { display: grid; grid-template-columns: 300px 1fr; gap: 12px; }
@media (max-width: 900px) { .nf-grid { grid-template-columns: 1fr; } }
.news-item { border-left: 3px solid #333; transition: border-color 0.2s; }
.news-item:hover { border-left-color: #e94560; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; }
.badge-red { background: #f4433622; color: #f44336; border: 1px solid #f4433644; }
.badge-orange { background: #ff972622; color: #ffa726; border: 1px solid #ff972644; }
.badge-blue { background: #42a5f522; color: #42a5f5; border: 1px solid #42a5f544; }
.badge-gray { background: #66666622; color: #999; border: 1px solid #66666644; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.data-table th { background: #16213e; color: #aaa; padding: 8px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid #333; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid #222; }
.data-table tr:hover { background: #ffffff08; }

/* Loading animation */
.loading { color: #888; padding: 20px; text-align: center; }
.loading::after { content: ''; animation: dots 1.5s steps(3,end) infinite; }
@keyframes dots { 0% { content: '.'; } 33% { content: '..'; } 66% { content: '...'; } }

/* ==================== Regime Classifier ==================== */

/* Top Bar */
.rg-topbar { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.rg-status-card { display: flex; align-items: center; gap: 10px; background: #16213e; border: 1px solid #0f3460; border-radius: 8px; padding: 10px 16px; }
.rg-status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.rg-dot-on { background: #00c853; box-shadow: 0 0 8px #00c85388; }
.rg-dot-off { background: #666; }
.rg-status-info { display: flex; flex-direction: column; }
.rg-status-text { font-weight: 600; font-size: 0.95em; }
.rg-status-sub { color: #aaa; font-size: 0.8em; }

.rg-current { background: #16213e; border: 1px solid #0f3460; border-radius: 8px; padding: 10px 20px; text-align: center; min-width: 180px; }
.rg-current-label { color: #aaa; font-size: 0.75em; text-transform: uppercase; letter-spacing: 1px; }
.rg-current-value { font-size: 1.15em; font-weight: 700; margin-top: 2px; color: #4fc3f7; }

.rg-actions-bar { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.rg-input-sm { width: 110px; padding: 6px 10px; background: #0f3460; border: 1px solid #2a2a5a; border-radius: 6px; color: #eee; font-size: 0.9em; }

/* Pipeline Strip */
.rg-pipeline-strip { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.rg-pipe-chip { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #16213e; border: 1px solid #0f3460; border-radius: 8px; }
.rg-pipe-name { color: #aaa; font-size: 0.85em; }
.rg-pipe-action { font-weight: 700; font-size: 0.85em; padding: 2px 8px; border-radius: 4px; }

/* Sub-Tabs */
.rg-subtabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #0f3460; padding-bottom: 0; }
.rg-subtab { padding: 8px 18px; background: none; border: none; color: #aaa; cursor: pointer; font-size: 0.9em; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.rg-subtab:hover { color: #eee; }
.rg-subtab.active { color: #e94560; border-bottom-color: #e94560; }

.rg-panel { display: none; }
.rg-panel.active { display: block; }

.rg-empty { color: #666; text-align: center; padding: 40px 20px; font-size: 0.95em; }

/* Profile Cards Grid */
.rg-profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }

.rg-card { background: #16213e; border: 1px solid #0f3460; border-radius: 10px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; }
.rg-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(233,69,96,0.1); }
.rg-card-stripe { height: 4px; flex-shrink: 0; }

.rg-card-header-area { min-height: 120px; flex-shrink: 0; }
.rg-std-header-area { min-height: 180px; }
.rg-card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.rg-card-id { font-size: 1.4em; font-weight: 800; color: #4fc3f7; }
.rg-card-name { font-size: 1.0em; font-weight: 600; flex: 1; margin-left: 10px; }
.rg-card-pct { background: #0f3460; padding: 3px 10px; border-radius: 12px; font-size: 0.8em; color: #aaa; }

/* Tags Row */
.rg-tags { display: flex; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; }
.rg-tag { padding: 3px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 600; }
.rg-tag-trend-bull { background: rgba(0,200,83,0.15); color: #00c853; }
.rg-tag-trend-bear { background: rgba(255,82,82,0.15); color: #ff5252; }
.rg-tag-trend-flat { background: rgba(160,160,160,0.15); color: #aaa; }
.rg-tag-vol-high { background: rgba(255,193,7,0.15); color: #ffc107; }
.rg-tag-vol-low { background: rgba(79,195,247,0.15); color: #4fc3f7; }
.rg-tag-mom { background: rgba(171,71,188,0.15); color: #ab47bc; }
.rg-tag-struct { background: rgba(255,167,38,0.15); color: #ffa726; }

/* Feature Bars */
.rg-feats { padding: 0 16px 14px; }
.rg-feat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.rg-feat-label { width: 120px; font-size: 0.78em; color: #aaa; text-align: right; flex-shrink: 0; }
.rg-feat-bar-wrap { flex: 1; height: 14px; background: #0a0e1f; border-radius: 7px; overflow: hidden; position: relative; }
.rg-feat-bar { height: 100%; border-radius: 7px; transition: width 0.4s ease; min-width: 2px; }
.rg-feat-val { width: 52px; font-family: monospace; font-size: 0.78em; text-align: right; color: #ccc; }

/* Matrix Table */
.regime-matrix-table { width: 100%; border-collapse: collapse; }
.regime-matrix-table th, .regime-matrix-table td { padding: 10px 12px; border-bottom: 1px solid #0f3460; font-size: 0.85em; }
.regime-matrix-table th { color: #aaa; font-weight: 500; text-align: center; background: #0f1a30; position: sticky; top: 0; }
.regime-matrix-table td { text-align: center; }
.regime-matrix-table tr:hover td { background: rgba(255,255,255,0.03); }

.regime-legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.regime-legend-item { display: flex; align-items: center; font-size: 0.8em; color: #aaa; }

/* Strategy filter buttons */
.rg-filter-btn { padding: 4px 10px; border: 1px solid #0f3460; border-radius: 4px; background: transparent; color: #aaa; font-size: 0.8em; cursor: pointer; transition: all 0.15s; }
.rg-filter-btn:hover { border-color: #4fc3f7; color: #4fc3f7; }
.rg-filter-btn.active { background: #0f3460; color: #4fc3f7; border-color: #4fc3f7; }

/* Intelligence Grid */
.rg-intel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.rg-intel-card { margin: 0; }
.rg-intel-card-wide { grid-column: 1 / -1; }
.rg-intel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; border-bottom: 1px solid #0f3460; }
.rg-intel-head h3 { margin: 0; font-size: 1em; flex: 1; }
.rg-intel-icon { font-size: 1.3em; color: #4fc3f7; }
.rg-intel-body { padding: 14px 16px; }

/* TF Regime Row */
.rg-tf-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #0f346044; }
.rg-tf-row:last-child { border-bottom: none; }
.rg-tf-label { width: 40px; font-weight: 700; font-size: 0.9em; color: #4fc3f7; text-align: center; }
.rg-tf-regime { flex: 1; font-size: 0.9em; }
.rg-tf-conf { width: 60px; text-align: right; }
.rg-tf-conf-bar { width: 80px; height: 8px; background: #0a0e1f; border-radius: 4px; overflow: hidden; }
.rg-tf-conf-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }

/* Consensus Badge */
.rg-consensus-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-size: 1.1em; font-weight: 700; }
.rg-consensus-bullish { background: rgba(0,200,83,0.12); color: #00c853; border: 1px solid #00c85344; }
.rg-consensus-bearish { background: rgba(255,82,82,0.12); color: #ff5252; border: 1px solid #ff525244; }
.rg-consensus-mixed { background: rgba(255,193,7,0.12); color: #ffc107; border: 1px solid #ffc10744; }
.rg-consensus-detail { font-size: 0.8em; color: #aaa; margin-top: 6px; }

/* Transition Card */
.rg-trans-row { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.rg-trans-label { color: #aaa; font-size: 0.85em; width: 130px; }
.rg-trans-value { font-weight: 600; font-size: 0.95em; }

/* Direction Horizons */
.rg-dir-horizon { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #0f346033; }
.rg-dir-horizon:last-child { border-bottom: none; }
.rg-dir-label { width: 80px; font-size: 0.85em; color: #aaa; }
.rg-dir-arrow { font-size: 1.3em; width: 30px; text-align: center; }
.rg-dir-arrow-buy { color: #00c853; }
.rg-dir-arrow-sell { color: #ff5252; }
.rg-dir-arrow-neutral { color: #666; }
.rg-dir-conf { flex: 1; font-size: 0.85em; }

/* Composite Signal */
.rg-signal-main { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.rg-signal-dir { font-size: 1.8em; font-weight: 800; }
.rg-signal-dir-buy { color: #00c853; }
.rg-signal-dir-sell { color: #ff5252; }
.rg-signal-dir-neutral { color: #666; }
.rg-signal-meter { flex: 1; }
.rg-signal-strength-bar { height: 14px; background: #0a0e1f; border-radius: 7px; overflow: hidden; margin-bottom: 4px; }
.rg-signal-strength-fill { height: 100%; border-radius: 7px; transition: width 0.5s ease; }
.rg-signal-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.rg-signal-meta-item { font-size: 0.85em; }
.rg-signal-meta-label { color: #aaa; }
.rg-signal-meta-value { font-weight: 600; margin-left: 4px; }
.rg-signal-reasoning { margin-top: 10px; padding: 10px; background: #0a0e1f; border-radius: 8px; }
.rg-signal-reasoning li { font-size: 0.82em; color: #aaa; padding: 2px 0; list-style: none; }
.rg-signal-reasoning li::before { content: '\25B8 '; color: #4fc3f7; }

/* Risk badges */
.rg-risk { padding: 3px 10px; border-radius: 6px; font-weight: 700; font-size: 0.82em; }
.rg-risk-low { background: rgba(0,200,83,0.15); color: #00c853; }
.rg-risk-medium { background: rgba(255,193,7,0.15); color: #ffc107; }
.rg-risk-high { background: rgba(255,82,82,0.15); color: #ff5252; }
.rg-risk-extreme { background: rgba(213,0,0,0.2); color: #d50000; }

/* Drift */
.rg-drift-table { width: 100%; border-collapse: collapse; }
.rg-drift-table th, .rg-drift-table td { padding: 8px 10px; border-bottom: 1px solid #0f3460; font-size: 0.85em; }
.rg-drift-table th { color: #aaa; font-weight: 500; text-align: left; }
.rg-drift-ok { color: #00c853; }
.rg-drift-warn { color: #ffc107; }
.rg-drift-crit { color: #ff5252; }

/* Multi-TF Train */
.rg-tf-check { display: flex; align-items: center; gap: 5px; color: #ccc; font-size: 0.9em; cursor: pointer; }
.rg-tf-check input { accent-color: #e94560; }

/* TF Status Table */
.rg-tf-status-table { width: 100%; border-collapse: collapse; }
.rg-tf-status-table th, .rg-tf-status-table td { padding: 8px 12px; border-bottom: 1px solid #0f3460; font-size: 0.85em; text-align: center; }
.rg-tf-status-table th { color: #aaa; font-weight: 500; }

/* Standard Regime Cards */
.rg-std-card { position: relative; }
.rg-action-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid; border-radius: 6px; background: #0a0e1f; }

/* Feature bar midpoint marker */
.rg-feat-mid-mark { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #ffffff15; z-index: 1; }
.rg-feat-bar-wrap { position: relative; }

/* Training stats cards */
.rg-train-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.rg-stat-card { background: #16213e; border: 1px solid #0f3460; border-radius: 10px; padding: 16px 20px; text-align: center; min-width: 120px; flex: 1; }
.rg-stat-value { font-size: 1.5em; font-weight: 800; margin-bottom: 4px; }
.rg-stat-label { font-size: 0.78em; color: #aaa; }

/* Distribution bars */
.rg-dist-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rg-dist-label { width: 180px; font-size: 0.85em; font-weight: 600; flex-shrink: 0; }
.rg-dist-bar-wrap { flex: 1; height: 22px; background: #0a0e1f; border-radius: 6px; overflow: hidden; }
.rg-dist-bar { height: 100%; border-radius: 6px; transition: width 0.5s ease; min-width: 3px; }
.rg-dist-pct { width: 55px; text-align: right; font-family: monospace; font-size: 0.9em; color: #ccc; }

/* Training spinner */
.rg-spinner { width: 20px; height: 20px; border: 3px solid #0f3460; border-top: 3px solid #4fc3f7; border-radius: 50%; animation: rg-spin 0.8s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
    .rg-topbar { flex-direction: column; align-items: stretch; }
    .rg-actions-bar { margin-left: 0; }
    .rg-profiles-grid { grid-template-columns: 1fr; }
    .rg-intel-grid { grid-template-columns: 1fr; }
}

@keyframes lipulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
