/* Estilos Base Padronizados do Sistema Blaze Dashboard */
:root {
    --bg-dark: #0f1923;
    --bg-panel: #1a242d;
    --bg-header: #1a242d;
    --border-color: #2c3e50;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-red: #f12c4c;
    --accent-white: #ffffff;
    --accent-black: #262f3c;
    --accent-gold: #ffd700;
    --accent-blue: #00d2ff;
    --accent-jonbet: #00ff88; /* Mantendo para compatibilidade */
    
    /* Cores das Pedras Blaze */
    --color-red: #f12c4c;
    --color-black: #262f3c;
    --color-white: #ffffff;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
}

html { overflow-x: hidden; }

body { 
    background-color: var(--bg-dark);
    color: var(--text-primary); 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    padding: 0; 
    overflow-y: auto; 
    min-height: 100vh; 
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Dashboard Layout Rules */
.dashboard-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.panel-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 16px;
    flex-grow: 1;
    overflow: visible;
    scrollbar-width: thin;
}

@keyframes dash {
  from { stroke-dashoffset: var(--dashLen); }
  to { stroke-dashoffset: 0; }
}

.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 3px; }

/* Removendo estilos antigos conflitantes */
.main-header { display: none; }

h1 { 
    margin: 0; 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--text-primary); 
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Classes Utilitárias */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.p-10 { padding: 10px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); font-size: 0.75rem; }
.text-bold { font-weight: 700; }
.text-uppercase { text-transform: uppercase; }
.text-accent { color: var(--accent-jonbet); }
.w-100 { width: 100%; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }

/* Botões e Controles */
.btn-back { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 6px 12px; 
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text-secondary); 
    text-decoration: none; 
    border-radius: var(--radius-sm); 
    font-size: 0.8rem; 
    border: 1px solid var(--border-color); 
    transition: all 0.2s ease; 
    font-weight: 600;
}
.btn-back:hover { 
    background: #374151; 
    border-color: var(--text-secondary); 
    color: #fff; 
}

.btn-icon-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-icon-sm:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--text-secondary);
}

.control-group { 
    background: var(--bg-panel);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* Switch Toggle Refined */
.switch { position: relative; display: inline-block; width: 32px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { 
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; 
    background-color: #374151; 
    transition: .3s; border-radius: 10px; 
}
.slider:before { 
    position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; 
    background-color: white; transition: .3s; border-radius: 50%; 
}
input:checked + .slider { background-color: var(--accent-red); }
input:checked + .slider:before { transform: translateX(14px); }

/* Grid System */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
}

/* Card Design Moderno */
.stat-card { 
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-sm); 
    padding: 15px; 
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.stat-card:hover { 
    border-color: #374151; 
}

.stat-title { 
    height: 32px;
    background-color: #212b36;
    margin: -15px -15px 15px -15px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px 4px 0 0;
}

.stat-title i { color: var(--accent-red); margin-right: 6px; }

/* Componentes Internos dos Cards */
.result-stats-container {
    display: flex; 
    justify-content: space-around; 
    background: var(--bg-dark); 
    padding: 12px; 
    border-radius: var(--radius-sm); 
    margin-bottom: 12px; 
    border: 1px solid var(--border-color);
}

.result-stat-item { text-align: center; position: relative; flex: 1; }
.result-stat-item:not(:last-child)::after {
    content: ''; position: absolute; right: 0; top: 15%; height: 70%; width: 1px; background: var(--border-color);
}

.stat-value-lg { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.stat-value-md { font-size: 1rem; font-weight: 700; }
.text-win { color: #10b981 !important; }
.text-loss { color: var(--accent-red) !important; }
.text-white { color: #fff !important; }

/* Botões de Filtro */
.filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color); 
    color: var(--text-secondary);
    padding: 4px 10px; 
    border-radius: 4px; 
    cursor: pointer;
    font-size: 0.75rem; 
    transition: all 0.2s;
    font-weight: 600;
}
.filter-btn:hover {
    background: #374151;
    color: #fff;
}
.filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Selects e Inputs */
select {
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px; 
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.2s;
}
select:focus { border-color: var(--accent); }
select option { background: #1a1a1a; }

/* Barras de Progresso e Indicadores */
.color-bar-container { display: flex; height: 18px; border-radius: 4px; overflow: hidden; margin-top: 15px; background: #222; }
.color-bar { height: 100%; transition: width 0.5s ease; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; }
.bg-red { background-color: var(--color-red); color: #fff; }
.bg-black { background-color: var(--color-black); color: #fff; border-right: 1px solid #333; }
.bg-white { background-color: var(--color-white); color: #000; }

/* Numbers Grid */
.numbers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; }
.number-box { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    padding: 8px 4px; 
    text-align: center; 
    transition: all 0.2s;
}
.number-box:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.08); }
.number-box.hot { border-color: var(--accent-jonbet); box-shadow: 0 0 8px rgba(0, 255, 136, 0.1); }
.number-box.cold { border-color: var(--accent-red); opacity: 0.8; }

.n-val { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; display: block; }
.n-red { color: var(--color-red); }
.n-black { color: #a1a1aa; }
.n-white { color: #fff; }

/* Estilos de Botões Padronizados Blaze */
.btn-primary-blaze {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary-blaze:hover {
    background-color: #d11f3d;
    color: white;
}

.btn-secondary-blaze {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary-blaze:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-success-blaze {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-success-blaze:hover {
    background-color: #059669;
}

/* Form Controls Padronizados */
.form-control-dark {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.form-control-dark:focus {
    border-color: var(--accent-red);
    background-color: var(--bg-dark);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Status Pills Padronizados */
.status-pill {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-pill.pending { background-color: #374151; color: #9ca3af; }
.status-pill.rolling { background-color: #f59e0b; color: #fff; }
.status-pill.complete { background-color: #10b981; color: #fff; }

/* Tabs Padronizadas */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

/* Estilos de IA e Predição Padronizados */
.prediction-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.prediction-bubble.red { background-color: var(--color-red); color: white; }
.prediction-bubble.black { background-color: var(--color-black); color: white; border: 1px solid #4b5563; }
.prediction-bubble.white { background-color: var(--color-white); color: black; }

/* Helper Classes do Sistema */
.text-xxs { font-size: 0.65rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.fw-bold { font-weight: 700; }
.tracking-wide { letter-spacing: 0.025em; }

/* Botão Flutuante */
.fab-save {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--panel-bg);
    border: 1px solid var(--accent-jonbet);
    border-radius: 50%;
    color: var(--accent-jonbet);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}
.fab-save:hover {
    transform: scale(1.1);
    background: var(--accent-jonbet);
    color: #000;
    box-shadow: 0 0 25px var(--accent-jonbet-glow);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease-out forwards; }

/* Responsividade */
@media (max-width: 768px) {
    body { padding: 10px; }
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .result-stats-container { gap: 5px; }
    .stat-value-lg { font-size: 1.0rem; }
    .filter-buttons { justify-content: flex-start; overflow-x: auto; padding-bottom: 5px; }
    .filter-btn { white-space: nowrap; }
}
