/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0084ED;
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-header: #0f0f0f;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --border-color: #1a1a1a;
    --hover-bg: #151515;
    --shadow-glow: rgba(0, 132, 237, 0.3);
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
}

/* Modern Scrollbar Styles */
/* Webkit browsers (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 132, 237, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 132, 237, 0.6);
    box-shadow: 0 0 8px rgba(0, 132, 237, 0.4);
}

::-webkit-scrollbar-thumb:active {
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(0, 132, 237, 0.6);
}

/* Scrollbar for containers with light background */
.trades-table-container,
.config-modal-body,
.asset-select,
select {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 132, 237, 0.4) transparent;
}

.trades-table-container::-webkit-scrollbar,
.config-modal-body::-webkit-scrollbar,
.asset-select::-webkit-scrollbar,
select::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.trades-table-container::-webkit-scrollbar-thumb,
.config-modal-body::-webkit-scrollbar-thumb,
.asset-select::-webkit-scrollbar-thumb,
select::-webkit-scrollbar-thumb {
    background: rgba(0, 132, 237, 0.4);
    border-radius: 6px;
}

.trades-table-container::-webkit-scrollbar-thumb:hover,
.config-modal-body::-webkit-scrollbar-thumb:hover,
.asset-select::-webkit-scrollbar-thumb:hover,
select::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 132, 237, 0.7);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 132, 237, 0.3) transparent;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.header-logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 132, 237, 0.3));
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Balance Container */
.balance-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    width: 100%;
    justify-content: flex-end;
}

.balance-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-type-select {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text-white);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23ffffff' d='M4 6L1 3h6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px;
    padding-right: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wallet-type-select:hover {
    border-color: var(--primary-color);
}

.wallet-type-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 132, 237, 0.2);
}

.wallet-type-select option {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 5px;
}

.balance-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* User Menu */
.user-menu {
    position: relative;
}

.avatar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.avatar-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 132, 237, 0.4);
}

.avatar-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #00a0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 132, 237, 0.3);
    box-shadow: 0 0 10px rgba(0, 132, 237, 0.2);
}

.avatar-initials {
    color: var(--text-white);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 132, 237, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-header);
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #00a0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(0, 132, 237, 0.3);
}

.dropdown-initials {
    color: var(--text-white);
    font-weight: 600;
    font-size: 18px;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.dropdown-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    font-size: 13px;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--text-white);
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Top Section: Chart and Asset Info */
.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 132, 237, 0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.chart-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.timeframe-select {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-white);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.timeframe-select:hover {
    border-color: var(--primary-color);
}

.timeframe-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.1);
}

.chart-wrapper {
    width: 100%;
    flex: 1;
    min-height: 400px;
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
    z-index: 1;
}

.chart-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Asset Info Card */
.asset-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 132, 237, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.asset-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.asset-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.asset-search {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
}

.asset-search::placeholder {
    color: var(--text-gray);
    opacity: 0.7;
}

.asset-search:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.1);
}

.asset-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.2);
}

.asset-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.filter-btn {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-white);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: capitalize;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #00a0ff);
    border-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(0, 132, 237, 0.3);
}

.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 132, 237, 0.3);
}

.asset-select {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.asset-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.1);
}

.asset-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.2);
}

.asset-select option {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 10px;
}

.price-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connecting {
    background: #ffa500;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.connected {
    background: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.status-indicator.disconnected {
    background: #ff4444;
}

.status-indicator.error {
    background: #ff4444;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-text {
    font-size: 13px;
    color: var(--text-gray);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.asset-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.asset-main {
    text-align: center;
    padding: 15px 0;
}

.asset-price-label {
    display: block;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-price-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.asset-price-value.price-change {
    animation: priceUpdate 0.5s ease;
}

.asset-price-value.price-change.up {
    color: #00ff00;
}

.asset-price-value.price-change.down {
    color: #ff4444;
}

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

.asset-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.asset-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--bg-header);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.asset-detail-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
}

.asset-detail-value.asset-price-high {
    color: #00ff00;
}

.asset-detail-value.asset-price-low {
    color: #ff4444;
}

/* Start Operation Button */
.start-operation-btn {
    background: linear-gradient(135deg, var(--primary-color), #00a0ff);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 132, 237, 0.3),
                0 0 20px rgba(0, 132, 237, 0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    margin-top: 15px;
}

.start-operation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.start-operation-btn:hover::before {
    left: 100%;
}

.start-operation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 237, 0.4),
                0 0 30px rgba(0, 132, 237, 0.2);
}

.start-operation-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 132, 237, 0.3);
}

.start-operation-btn:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 132, 237, 0.3),
                0 0 0 3px rgba(0, 132, 237, 0.3);
}

/* Botão quando operação está rodando */
.start-operation-btn.operation-running {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4),
                0 0 20px rgba(220, 53, 69, 0.2);
    animation: pulse-operation-running 2s infinite;
}

.start-operation-btn.operation-running::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.start-operation-btn.operation-running:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5),
                0 0 30px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.start-operation-btn.operation-running:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
}

.start-operation-btn.operation-running:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4),
                0 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Animação de pulso para operação rodando */
@keyframes pulse-operation-running {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4),
                    0 0 20px rgba(220, 53, 69, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6),
                    0 0 30px rgba(220, 53, 69, 0.3);
    }
}

.btn-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-text {
    font-size: 16px;
}

/* Bottom Section */
/* Status Section */
.status-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 30px;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 25px rgba(0, 132, 237, 0.3);
}

.status-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-header);
    flex-shrink: 0;
}

.status-icon {
    font-size: 20px;
    animation: pulse 2s infinite;
}

/* Status: Pendente */
.status-card.status-pendente .status-icon {
    color: #ffa500;
}

.status-card.status-pendente {
    border-left: 4px solid #ffa500;
}

/* Status: Rodando */
.status-card.status-rodando .status-icon {
    color: #00ff88;
    animation: pulse 1.5s infinite;
}

.status-card.status-rodando {
    border-left: 4px solid #00ff88;
    box-shadow: 0 4px 25px rgba(0, 255, 136, 0.2);
}

/* Status: Pausado */
.status-card.status-pausado .status-icon {
    color: #ff4444;
}

.status-card.status-pausado {
    border-left: 4px solid #ff4444;
}

/* Status: Erro */
.status-card.status-erro .status-icon {
    color: #ff0000;
}

.status-card.status-erro {
    border-left: 4px solid #ff0000;
}

.status-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-label {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    text-transform: capitalize;
}

.status-timestamp {
    font-size: 12px;
    color: var(--text-gray);
    white-space: nowrap;
    text-align: right;
}

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

/* Status Progress Container */
.status-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 30px;
    background: var(--bg-header);
    border-radius: 0 0 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mostrar container para todos os status exceto pausado */
.status-card:not(.status-pausado) .status-progress-container {
    opacity: 1;
}

.status-progress-line {
    position: relative;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    border-radius: 2px;
}

.status-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Status Progress Points */
.status-progress-points {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.status-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

/* Ocultar ponto Pausado por padrão (só aparece quando status for pausado) */
.status-point[data-status="pausado"] {
    display: none;
}

/* Mostrar ponto Pausado quando status for pausado */
.status-card.status-pausado .status-point[data-status="pausado"] {
    display: flex;
}

.status-point-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.status-point-label {
    font-size: 10px;
    color: var(--text-gray);
    text-align: center;
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Ponto ativo (preenchido) */
.status-point.active .status-point-dot {
    background: #00ff88;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    transform: scale(1.2);
}

.status-point.active .status-point-label {
    color: #00ff88;
    font-weight: 600;
}

/* Ponto atual (piscando) */
.status-point.current .status-point-dot {
    background: #00ff88;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    animation: pointPulse 1.5s ease-in-out infinite;
}

.status-point.current .status-point-label {
    color: #00ff88;
    font-weight: 700;
}

@keyframes pointPulse {
    0%, 100% {
        transform: scale(1.2);
        opacity: 1;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.8;
    }
}

@keyframes progressMove {
    0% {
        left: -40%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.bottom-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.balance-profit-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.balance-card,
.profit-loss-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 132, 237, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-card-label,
.profit-loss-label {
    font-size: 14px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.balance-card-value,
.profit-loss-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.profit-loss-value.positive {
    color: #00ff00;
}

.profit-loss-value.negative {
    color: #ff4444;
}

.profit-loss-value.neutral {
    color: var(--text-gray);
}

/* Trades Table */
.trades-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 132, 237, 0.1);
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trades-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trades-table-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.delete-trades-btn {
    background: transparent;
    border: 1px solid #ff4444;
    border-radius: 8px;
    color: #ff4444;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    min-width: 40px;
    height: 36px;
}

.delete-trades-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff6666;
    color: #ff6666;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.delete-trades-btn:active {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(0.95);
}

.delete-trades-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.delete-trades-btn i {
    font-size: 16px;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.trades-table thead {
    background: var(--bg-header);
}

.trades-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.trades-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.trades-table tbody tr:hover {
    background: var(--hover-bg);
}

.trades-table tbody tr:last-child {
    border-bottom: none;
}

.trades-table td {
    padding: 15px 20px;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
}

.trades-table tbody td:first-child {
    color: var(--text-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.trades-table tbody td:last-child.positive {
    color: #00ff00;
    font-weight: 600;
}

.trades-table tbody td:last-child.negative {
    color: #ff4444;
    font-weight: 600;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: var(--text-gray);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 5px;
}

.pagination-page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
}

.pagination-page-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
    font-weight: 600;
}

.pagination-ellipsis {
    color: var(--text-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

/* Footer */
.main-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 50px 0 80px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 5px;
}

.footer-description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.footer-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 5px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links li a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 132, 237, 0.3);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.footer-copyright {
    color: var(--text-gray);
    font-size: 13px;
}

/* Responsividade */
@media (max-width: 1024px) {
    .top-section {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        min-height: 400px;
        height: 400px;
    }
    
    .asset-info-card {
        height: auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 20px;
    }
    
    .header-logo {
        height: 35px;
    }
    
    .header-right {
        gap: 15px;
    }
    
    .deposit-header-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .status-section {
        padding: 0 15px;
        margin-bottom: 20px;
    }
    
    .status-card {
        padding: 15px 20px;
        gap: 60px;
        flex-wrap: wrap;
    }
    
    .status-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .status-icon {
        font-size: 16px;
    }
    
    .status-content {
        flex: 1;
        min-width: 150px;
    }
    
    .status-value {
        font-size: 16px;
    }
    
    .status-timestamp {
        width: 100%;
        text-align: left;
        font-size: 11px;
        margin-top: 5px;
    }
    
    .status-progress-container {
        padding: 15px 20px;
    }
    
    .status-progress-points {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .status-point {
        min-width: 60px;
    }
    
    .status-point-label {
        font-size: 9px;
    }
    
    .balance-container {
        padding-right: 15px;
    }
    
    .balance-header {
        gap: 8px;
    }
    
    .balance-label {
        font-size: 11px;
    }
    
    .wallet-type-select {
        font-size: 10px;
        padding: 3px 6px;
        padding-right: 18px;
    }
    
    .balance-value {
        font-size: 16px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    .avatar-initials {
        font-size: 14px;
    }
    
    .dropdown-menu {
        min-width: 260px;
        right: -10px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .top-section {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .chart-container,
    .asset-info-card {
        padding: 20px;
    }
    
    .chart-wrapper {
        min-height: 320px;
        height: 320px;
    }
    
    .asset-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .price-status {
        margin-top: 0;
    }
    
    .asset-price-value {
        font-size: 28px;
    }
    
    
    .start-operation-btn {
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 12px;
    }
    
    .balance-profit-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .balance-card-value,
    .profit-loss-value {
        font-size: 28px;
    }
    
    .trades-table-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    .trades-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .delete-trades-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 12px;
    }
    
    .pagination-page-btn {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 12px;
    }
    
    .trades-table {
        font-size: 12px;
    }
    
    .trades-table th,
    .trades-table td {
        padding: 12px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .main-footer {
        padding-bottom: calc(75px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .balance-container {
        padding-right: 10px;
    }
    
    .balance-header {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .wallet-type-select {
        font-size: 9px;
        padding: 2px 5px;
        padding-right: 16px;
    }
    
    .balance-value {
        font-size: 14px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .deposit-header-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .deposit-header-btn span {
        display: none;
    }
    
    .dropdown-menu {
        min-width: 240px;
        right: -20px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .top-section {
        gap: 15px;
    }
    
    .chart-container,
    .asset-info-card {
        padding: 15px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chart-title {
        font-size: 18px;
    }
    
    .chart-wrapper {
        min-height: 280px;
        height: 280px;
    }
    
    .asset-price-value {
        font-size: 24px;
    }
    
    .start-operation-btn {
        padding: 12px 16px;
        font-size: 13px;
        margin-top: 10px;
    }
    
    .btn-text {
        font-size: 14px;
    }
    
    .asset-details {
        gap: 10px;
    }
    
    .asset-detail-item {
        padding: 10px;
    }
    
    .balance-card,
    .profit-loss-card {
        padding: 20px;
    }
    
    .balance-card-value,
    .profit-loss-value {
        font-size: 24px;
    }
    
    .trades-table {
        font-size: 11px;
    }
    
    .trades-table th,
    .trades-table td {
        padding: 10px 12px;
    }
    
    .main-footer {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* Modal de Configuração de Operação */
.config-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.config-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.config-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(0, 132, 237, 0.2);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.config-modal-overlay.active .config-modal-content {
    transform: scale(1) translateY(0);
}

.config-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-header);
    border-radius: 16px 16px 0 0;
}

.config-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.config-modal-close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.config-modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-white);
}

.config-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Alinhar Valor de Entrada e Meta de Lucro na mesma altura no desktop */
.form-group:nth-child(1),
.form-group:nth-child(2) {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 8px;
}

.form-group:nth-child(1) .field-description,
.form-group:nth-child(2) .field-description {
    min-height: 36px;
    display: flex;
    align-items: flex-start;
}

/* Alinhar Stop Loss e Expiração na mesma altura no desktop */
.form-group:nth-child(3),
.form-group:nth-child(4) {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 8px;
}

.form-group:nth-child(3) .field-description,
.form-group:nth-child(4) .field-description {
    min-height: 36px;
    display: flex;
    align-items: flex-start;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-description,
.field-subtitle {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0;
}

.field-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--primary-color);
}

.info-icon .fas {
    font-size: 14px;
}

.info-icon .tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    width: 280px;
    font-size: 11px;
    color: var(--text-gray);
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .fas {
    position: absolute;
    left: 16px;
    color: var(--text-gray);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input,
.input-wrapper .form-select {
    width: 100%;
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    color: var(--text-white);
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

.input-wrapper input:focus,
.input-wrapper .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 237, 0.2);
}

.input-wrapper .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    cursor: pointer;
}

.input-wrapper .form-select:hover {
    border-color: var(--primary-color);
}

.input-wrapper .form-select option {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 10px;
}

.config-modal-footer {
    display: flex;
    gap: 15px;
    padding: 25px 30px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-header);
    border-radius: 0 0 16px 16px;
}

.cancel-config-btn,
.start-operation-modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cancel-config-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-white);
}

.cancel-config-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.start-operation-modal-btn {
    background: linear-gradient(135deg, var(--primary-color), #00a0ff);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(0, 132, 237, 0.3);
}

.start-operation-modal-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 237, 0.4);
}

.start-operation-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.start-operation-modal-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 132, 237, 0.3);
}

/* Botão Parar Operação - estilo vermelho/destaque */
.start-operation-modal-btn.stop-operation {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    animation: pulse-stop 2s infinite;
}

.start-operation-modal-btn.stop-operation:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.start-operation-modal-btn.stop-operation:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Animação de pulso para botão de parar */
@keyframes pulse-stop {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6);
    }
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .config-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .config-modal-header {
        padding: 20px;
    }
    
    .config-modal-title {
        font-size: 18px;
    }
    
    .config-modal-body {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Remover alinhamento específico no mobile */
    .form-group:nth-child(1),
    .form-group:nth-child(2),
    .form-group:nth-child(3),
    .form-group:nth-child(4) {
        display: flex;
        grid-template-rows: none;
    }
    
    .form-group:nth-child(1) .field-description,
    .form-group:nth-child(2) .field-description,
    .form-group:nth-child(3) .field-description,
    .form-group:nth-child(4) .field-description {
        min-height: auto;
        display: block;
    }
    
    .config-modal-footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .cancel-config-btn,
    .start-operation-modal-btn {
        width: 100%;
    }
    
    .info-icon .tooltip {
        width: 240px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .config-modal-header {
        padding: 15px;
    }
    
    .config-modal-title {
        font-size: 16px;
    }
    
    .config-modal-body {
        padding: 15px;
    }
    
    .form-grid {
        gap: 12px;
    }
    
    .config-modal-footer {
        padding: 15px;
    }
    
    .info-icon .tooltip {
        width: 200px;
        left: auto;
        right: 0;
        transform: none;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

