/* ==========================================
   ROBE IA - ESTILOS GLOBALES (Versión completa)
   ========================================== */

:root {
    --robe-black: #0a0e17;
    --robe-dark: #111827;
    --robe-panel: #16202e;
    --robe-red: #ff5252;
    --robe-green: #00e676;
    --robe-yellow: #ffd700;
    --robe-blue: #64b5f6;
    --robe-gray: #9ca3af;
    --border-color: #1f2a3a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--robe-black);
    color: #e0e0e0;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--robe-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
}
.plant-logo {
    height: 40px;
    width: auto;
}
.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--robe-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-link-btn {
    background: none;
    border: none;
    color: var(--robe-gray);
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}
.nav-link-btn.active, .nav-link-btn:hover {
    background: #1e2a3a;
    color: white;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--robe-dark);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-link {
    background: none;
    border: none;
    color: var(--robe-gray);
    padding: 12px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
}
.mobile-link.active, .mobile-link:hover {
    color: white;
}

/* ==========================================
   TABLAS Y CONTENEDORES
   ========================================== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-content.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.section-spacing {
    margin-top: 3rem;
    margin-bottom: 3rem;
}
.max-w-700 { max-width: 700px; margin-left: auto; margin-right: auto; }

/* ==========================================
   PANELES Y TARJETAS
   ========================================== */
.panel-card {
    background: var(--robe-dark);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.panel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.panel-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}
.panel-card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.metric-box {
    background: #0f1722;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.metric-label {
    font-size: 0.8rem;
    color: var(--robe-gray);
    margin-bottom: 8px;
}
.value-display {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Share Tech Mono', monospace;
}
.font-mono {
    font-family: 'Share Tech Mono', monospace;
}
.text-positive { color: var(--robe-green); }
.text-negative { color: var(--robe-red); }
.text-neutral { color: var(--robe-yellow); }
.text-white-50 { color: rgba(255,255,255,0.5); }

/* ==========================================
   BOTONES
   ========================================== */
.btn-main-action {
    background: var(--robe-red);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary-action {
    background: #1e2a3a;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-secondary-action:hover {
    background: #2a3a4a;
}
.sync-live {
    background: #1a2533;
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-block;
    font-size: 0.8rem;
    color: var(--robe-gray);
}

/* ==========================================
   TERMINAL
   ========================================== */
.terminal-panel {
    background: #0a0e17;
    border: 1px solid #2a3a4a;
    border-radius: 12px;
    overflow: hidden;
}
.terminal-header {
    background: #111827;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #2a3a4a;
}
.terminal-title {
    color: #888;
    font-family: monospace;
}
.terminal-dots {
    display: flex;
    gap: 8px;
}
.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }
.terminal-body {
    padding: 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    min-height: 150px;
    max-height: 200px;
    overflow-y: auto;
}

/* ==========================================
   KELLY SELECTOR
   ========================================== */
.kelly-selector {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}
.k-btn {
    background: #1e2a3a;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
}
.k-btn.active-cons { background: #1e2a3a; border: 2px solid var(--robe-green); }
.k-btn.active-mod { background: #1e2a3a; border: 2px solid var(--robe-yellow); }
.k-btn.active-arr { background: #1e2a3a; border: 2px solid var(--robe-red); }
.k-val {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 8px;
}
.result-display-box {
    background: #0a0e17;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.final-stake-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: monospace;
}
.g-label {
    font-size: 0.8rem;
    color: var(--robe-gray);
    margin-bottom: 4px;
    display: block;
}
.g-input {
    background: #0a0e17;
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 8px;
    color: white;
    width: 100%;
}
.kelly-warning-box {
    background: #1a1a2e;
    border-left: 4px solid var(--robe-yellow);
    padding: 12px;
    margin-bottom: 16px;
    display: none;
}

/* ==========================================
   MONTE CARLO
   ========================================== */
.mc-chart-wrapper {
    height: 300px;
    margin: 20px 0;
}
.btn-lg-padding {
    padding: 14px;
}

/* ==========================================
   CHECKLIST
   ========================================== */
.checklist-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}
.checklist-item i {
    width: 24px;
}

/* ==========================================
   CHAT WIDGET
   ========================================== */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--robe-dark);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: all 0.3s;
}
.chat-closed { height: 52px; overflow: hidden; }
.chat-open { height: 480px; }
.chat-header {
    background: #1a2533;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    border-radius: 16px 16px 0 0;
}
.chat-body {
    height: calc(100% - 52px);
    display: flex;
    flex-direction: column;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 85%;
}
.bot-message {
    background: #1e2a3a;
    align-self: flex-start;
}
.user-message {
    background: var(--robe-blue);
    align-self: flex-end;
}
.chat-input-area {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--border-color);
}
.chat-input {
    flex: 1;
    background: #0a0e17;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    color: white;
}
.btn-chat-send {
    background: none;
    border: none;
    color: var(--robe-blue);
    margin-left: 8px;
    cursor: pointer;
}

/* ==========================================
   DESCARGA
   ========================================== */
.download-btn {
    background: #1e2a3a;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.download-btn:hover {
    background: #2a3a4a;
}
.empty-state {
    text-align: center;
    padding: 30px;
    color: #888;
}

/* ==========================================
   ALERTAS CASH OUT
   ========================================== */
#cash-out-alerts-container .list-group-item {
    background-color: #1a2533 !important;
    border-left: 4px solid #ff9800;
}
#cash-out-alerts-container .text-warning {
    color: #ff9800 !important;
}

/* ==========================================
   TABLA PICKS DEL DÍA
   ========================================== */
#daily-picks-table th {
    background-color: #0f1722;
    color: #b0b0b0;
}
#daily-picks-table td {
    vertical-align: middle;
}
.badge.bg-warning {
    background-color: #ffd700 !important;
    color: #1a1a1a !important;
}
.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer-legal {
    background: var(--robe-dark);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}
.footer-header {
    display: block;
    margin-bottom: 12px;
    color: white;
}
.footer-link {
    background: none;
    border: none;
    color: var(--robe-gray);
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 0.8rem;
}
.footer-link:hover {
    color: white;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .mobile-toggle { display: block; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .picks-table { font-size: 12px; }
    .app-container { padding: 15px; }
    .kelly-selector { flex-direction: column; }
    #chat-widget { width: 280px; right: 10px; bottom: 10px; }
}