/* ========== VARIAVEIS E RESET - PALETA VERDE NATURAL CLARA ========== */
:root {
    --primary-color: #3a5441;
    --secondary-color: #5c7a52;
    --success-color: #8bc34a;
    --danger-color: #e57373;
    --marsala-color: #722f37;
    --warning-color: #ffb74d;
    --info-color: #4dd0e1;
    --dark-color: #2e3a2f;
    --light-color: #f8faf8;
    --muted-color: #7a8471;
    --border-color: #e8ede8;
    --gradient-primary: linear-gradient(135deg, #5c7a52 0%, #3a5441 100%);
    --gradient-light: linear-gradient(135deg, #f8faf8 0%, #f3f7f3 100%);
    --gradient-success: linear-gradient(135deg, #8bc34a 0%, #7cb342 100%);
    --gradient-danger: linear-gradient(135deg, #e57373 0%, #d32f2f 100%);
    --gradient-marsala: linear-gradient(135deg, #722f37 0%, #5a242a 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(58, 84, 65, 0.06);
    --shadow: 0 0.25rem 0.5rem rgba(58, 84, 65, 0.08);
    --shadow-lg: 0 0.5rem 1rem rgba(58, 84, 65, 0.12);
}

body {
    background: var(--gradient-light);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 20px;
    color: var(--dark-color);
}

.bg-premium {
    background: var(--gradient-primary) !important;
}

/* ========== BOTOES PREMIUM ========== */
.btn-premium {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background: var(--gradient-success);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 84, 65, 0.3);
    color: white;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: var(--gradient-primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: white;
    margin-bottom: 1.5rem;
    padding: 1.5rem !important;
}

.hero-section.inactive {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark-color);
    border: 2px solid #dee2e6;
}

.hero-section .btn {
    box-shadow: var(--shadow-sm);
    border: none;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.hero-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ========== CARDS DE ESTATISTICAS ========== */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.success:hover {
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.2);
    border-color: var(--success-color);
}

.stat-card.marsala:hover {
    box-shadow: 0 8px 25px rgba(114, 47, 55, 0.15);
    border-color: var(--marsala-color);
}

.stat-card.warning:hover {
    box-shadow: 0 8px 25px rgba(255, 183, 77, 0.2);
    border-color: var(--warning-color);
}

.stat-card.info:hover {
    box-shadow: 0 8px 25px rgba(77, 208, 225, 0.2);
    border-color: var(--info-color);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 500;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.08;
    position: absolute;
    top: 8px;
    right: 12px;
}

.stat-card.success .stat-value { color: var(--success-color); }
.stat-card.marsala .stat-value { color: var(--marsala-color); }
.stat-card.warning .stat-value { color: var(--warning-color); }
.stat-card.info .stat-value { color: var(--muted-color); }

/* ========== SISTEMA DE ABAS ========== */
.dashboard-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.dashboard-tabs .nav-tabs {
    background: #fafbfc;
    border-bottom: none;
    padding: 0.25rem;
}

.dashboard-tabs .nav-link {
    border: none;
    border-radius: 8px;
    margin: 0 0.15rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dashboard-tabs .nav-link:hover {
    background: rgba(108, 117, 125, 0.08);
    color: var(--secondary-color);
}

.dashboard-tabs .nav-link.active {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-content {
    padding: 1.5rem;
}

/* ========== PERFIL DROPDOWN ========== */
.profile-dropdown .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 15px;
    overflow: hidden;
}

.profile-dropdown .dropdown-toggle {
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.profile-dropdown .dropdown-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========== CONTROLES DO BOT ========== */
.bot-controls {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: var(--success-color);
}

.status-indicator.inactive {
    background: var(--danger-color);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ========== TABELA DE OPERACOES ========== */
.operations-table {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.operations-table .table {
    margin: 0;
}

.operations-table .table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
}

.operations-table .table tbody tr:hover {
    background: rgba(13, 110, 253, 0.05);
}

.scroll-tabela {
    max-height: 450px;
    overflow-y: auto;
}

.scroll-tabela::-webkit-scrollbar {
    width: 6px;
}

.scroll-tabela::-webkit-scrollbar-track {
    background: var(--light-color);
}

.scroll-tabela::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ========== CONFIGURACOES RAPIDAS ========== */
.quick-settings {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.quick-settings .form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.quick-settings .form-control,
.quick-settings .form-select {
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.quick-settings .form-control:focus,
.quick-settings .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* ========== ANIMACOES ========== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== CORES MARSALA PARA LOSSES ========== */
.bg-marsala {
    background-color: var(--marsala-color) !important;
    color: white !important;
}

.text-marsala {
    color: var(--marsala-color) !important;
}

.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }

/* ========== POSITION MONITOR ========== */
.position-monitor {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.status-header {
    background: linear-gradient(135deg, #f8faf8 0%, #f3f7f3 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.position-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.position-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.position-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.card-icon.long { background: var(--gradient-success); }
.card-icon.short { background: var(--gradient-danger); }

.card-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.price-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.card-label {
    font-size: 0.85rem;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ========== EMPTY STATE ========== */
.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseWave 3s infinite;
}

.pulse-circle.delay-1 {
    animation-delay: 0.5s;
    background: var(--gradient-success);
    width: 60px;
    height: 60px;
}

.pulse-circle.delay-2 {
    animation-delay: 1s;
    background: var(--gradient-danger);
    width: 80px;
    height: 80px;
}

@keyframes pulseWave {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.2); }
}

.empty-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-description {
    color: var(--muted-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.empty-stats {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.empty-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ========== LOGIN PAGE ========== */
.login-card {
    background: rgba(248, 250, 248, 0.95);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.btn-login-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-login-primary:hover {
    background: var(--gradient-success);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

.btn-google {
    background: #3cb624;
    border-color: #23c531;
    color: white;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #5ef15e;
    transform: translateY(-2px);
    color: white;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
}

.divider span {
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .hero-title { font-size: 1.5rem; }
    .hero-section { padding: 1rem !important; }
    .stat-card { margin-bottom: 1rem; }
    .dashboard-tabs .nav-link { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
    .tab-content { padding: 1rem; }
    body { padding-top: 10px; }
    .position-monitor { padding: 1rem; }
}
