/* Operation Page Styles */

body {
    overflow-x: hidden;
    background-color: #131722;
    margin: 0;
    padding: 0;
}

.app-container {
    background-color: #131722;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.operation-main {
    padding: 0;
    padding-bottom: 20px;
    margin-top: 100px;
    background-color: #131722;
    max-width: 100%;
    width: 100%;
    overflow: visible;
}

/* ===== PAGE LOADING ===== */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #131722;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loading-logo {
    animation: fadeInScale 0.8s ease-out;
}

.loading-logo img {
    height: 60px;
    width: auto;
    filter: brightness(1.2);
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
    border-top-color: rgba(255, 255, 255, 0.8);
}

.spinner-ring:nth-child(2) {
    animation-delay: 0.15s;
    border-top-color: rgba(255, 255, 255, 0.5);
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-ring:nth-child(3) {
    animation-delay: 0.3s;
    border-top-color: rgba(255, 255, 255, 0.3);
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ===== HEADER ===== */
.operation-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #000000;
    display: flex;
    align-items: center;
    padding: 0 20px 0 0;
    border: none;
    border-bottom: none;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    margin: 0;
    box-shadow: none;
    outline: none;
}

.operation-header .header-left {
    display: flex;
    align-items: center;
    padding-left: 16px;
}

.operation-header .header-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.operation-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.operation-header .user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(88, 166, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

.operation-header .user-balance i {
    color: var(--color-primary);
    font-size: 16px;
}

.operation-header .balance-amount {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

.operation-header .balance-toggle {
    color: var(--color-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.operation-header .balance-toggle:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== TRADING CONTAINER (Chart + Symbol Side by Side) ===== */
.operation-trading-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 200px;
    padding: 0;
    overflow: visible;
}

@media screen and (min-width: 768px) {
    .operation-trading-container {
        flex-direction: row;
        height: 350px;
        overflow: visible;
    }

    .chart-side {
        width: 50%;
        flex: 0 0 50%;
    }

    .symbol-side {
        width: 50%;
        flex: 0 0 50%;
        overflow: visible;
    }
}

.chart-side {
    position: relative;
    background: #131722;
    overflow: hidden;
    min-height: 150px;
}

.symbol-side {
    position: relative;
    background: #0a0e14;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* ===== VIDEO BACKGROUND ===== */
.symbol-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.25;
    filter: blur(1px);
}

.symbol-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 20, 0.7) 0%, rgba(28, 33, 40, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

.operation-symbol-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    gap: 16px;
    overflow: visible;
}

/* ===== FULLSCREEN CHART ===== */
.fullscreen-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #131722;
    overflow: hidden;
}

@media screen and (min-width: 768px) {
    .fullscreen-chart-container {
        height: 100%;
    }
}

.fullscreen-chart {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 33, 40, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.3s ease;
}

.chart-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(88, 166, 255, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.chart-loading span {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* ===== SYMBOL INFO ===== */
.operation-symbol-selector {
    width: 100%;
    padding: 16px;
    position: relative;
    z-index: 100;
}

.market-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    margin-bottom: 12px;
    z-index: 100;
}

.dropdown-selected {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.dropdown-selected:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
}

.symbol-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.symbol-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.symbol-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.symbol-code {
    color: var(--color-text-light);
    font-size: 14px;
    font-weight: 700;
}

.symbol-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.symbol-status.online i {
    color: #22c55e;
    font-size: 8px;
    animation: pulse-dot 2s ease-in-out infinite;
}

.dropdown-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    background: var(--color-card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    max-width: 450px;
    width: 90%;
}

.custom-dropdown.active .dropdown-menu {
    max-height: 450px;
    opacity: 1;
    visibility: visible;
}

.dropdown-search {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-search i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.dropdown-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text-light);
    font-size: 14px;
    outline: none;
}

.dropdown-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.dropdown-filters {
    display: flex;
    gap: 6px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    flex-wrap: wrap;
}

.filter-btn {
    flex: 1;
    min-width: calc(25% - 6px);
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: #22c55e;
    color: #ffffff;
    border-color: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.dropdown-list {
    max-height: 340px;
    overflow-y: auto;
}

.dropdown-group-label {
    padding: 10px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.02);
}

.dropdown-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.selected {
    background: rgba(88, 166, 255, 0.2);
}

.operation-symbol-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    background: transparent;
    padding: 12px;
    border-radius: 12px;
}

.price-value {
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.price-change {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.price-change.positive {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.price-change.negative {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.operation-symbol .symbol-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(88, 166, 255, 0.5);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.operation-symbol .symbol-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.operation-symbol .symbol-code {
    color: var(--color-text-light);
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.operation-symbol .symbol-price {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===== OPERATION CONTROL ===== */
.operation-control {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.open-config-btn {
    width: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
    position: relative;
    overflow: hidden;
}

.open-config-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;
}

.open-config-btn:hover::before {
    left: 100%;
}

.open-config-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.6);
}

.open-config-btn:active {
    transform: translateY(-1px);
}

.open-config-btn i {
    font-size: 16px;
}

.open-config-btn.hidden {
    display: none;
}

.stop-operation-main-btn {
    width: 100%;
    background: #ef4444;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stop-operation-main-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.stop-operation-main-btn:active {
    transform: translateY(0);
}

.stop-operation-main-btn i {
    font-size: 16px;
}

.stop-operation-main-btn.hidden {
    display: none;
}

/* ===== CONFIGURATION MODAL ===== */
.config-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.config-modal.hidden {
    display: none;
}

.config-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.config-modal-content {
    position: relative;
    background: #131722;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.config-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.config-modal-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.config-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.config-modal-close i {
    font-size: 18px;
}

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

.config-modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    background: transparent;
}

.cancel-config-btn {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-config-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.config-modal-footer .start-operation-btn {
    flex: 2;
    padding: 14px;
    font-size: 16px;
}

/* ===== CONFIGURATION FORM ===== */
.configuration-form {
    padding: 20px;
    background: #131722;
}

.form-title {
    color: var(--color-text-light);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

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

.form-group label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

/* Info Icon and Tooltip */
.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: all 0.2s ease;
}

.info-icon:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.info-icon i {
    pointer-events: none;
}

.info-icon .tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    width: 320px;
    max-width: 90vw;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    pointer-events: none;
}

.info-icon .tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 15px);
}

/* Mobile support - show on click */
.info-icon .tooltip.show-mobile {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 15px);
}

/* Ajuste para telas pequenas */
@media screen and (max-width: 600px) {
    .info-icon .tooltip {
        width: 280px;
        left: auto;
        right: 0;
        transform: none;
    }

    .info-icon .tooltip::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

.field-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.5;
    margin: 4px 0;
}

.field-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.2px;
    margin: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px 12px 42px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-wrapper select.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px 12px 42px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

.input-wrapper select.form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
}

.input-wrapper select.form-select option {
    background: #1a1d2e;
    color: #ffffff;
    padding: 8px;
}

.start-operation-btn {
    width: 100%;
    background: #22c55e;
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.start-operation-btn:hover:not(:disabled) {
    background: #16a34a;
    transform: translateY(-1px);
}

.start-operation-btn:active:not(:disabled) {
    transform: translateY(0);
}

.start-operation-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(34, 197, 94, 0.3);
}

.start-operation-btn i {
    font-size: 20px;
}

/* ===== OPERATION STATUS ===== */
.operation-status {
    padding: 20px 20px 10px 20px;
    background: #131722;
}

.operation-status.hidden {
    display: none;
}

.operation-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.summary-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.summary-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.summary-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    display: block;
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.summary-value.profit {
    color: #22c55e;
}

.summary-value.loss {
    color: #ef4444;
}

/* ===== TRANSACTION QUERY ===== */
.transaction-query {
    padding: 20px;
    background: var(--color-card-bg);
    border-radius: 16px;
    margin: 20px 16px;
    border: 1px solid var(--color-border);
}

.query-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 16px;
    text-align: center;
}

.query-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

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

.query-input-group .input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--color-primary);
    font-size: 16px;
    pointer-events: none;
}

.query-input-group .input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-light);
    font-size: 14px;
    transition: all 0.5s ease;
}

.query-input-group .input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

.query-input-group .input-wrapper input::placeholder {
    color: var(--color-text-muted);
}

.query-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #4a90e2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4);
}

.query-btn:active {
    transform: translateY(0);
}

.query-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

/* Transaction Response */
.transaction-response {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.transaction-response.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes inputPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(88, 166, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0);
    }
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(88, 166, 255, 0.1);
    border-bottom: 1px solid var(--color-border);
}

.response-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0;
}

.close-response-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-response-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.response-content {
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.response-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.response-row:last-child {
    border-bottom: none;
}

.response-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 120px;
}

.response-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-light);
    text-align: right;
    word-break: break-word;
}

.response-value.success {
    color: var(--color-success);
    font-weight: 700;
}

.response-value.error {
    color: var(--color-danger);
    font-weight: 700;
}

.response-value.warning {
    color: #f59e0b;
    font-weight: 700;
}

.response-value.neutral {
    color: var(--color-text-light);
}

.response-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--color-border);
}

.response-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.response-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.json-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #a0d8f1;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 8px;
}

.error-message {
    color: var(--color-danger);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ===== OPERATION HISTORY ===== */
.operation-history {
    padding: 10px 20px 20px 20px;
    background: #131722;
    margin-top: 0;
}

.operation-history.hidden {
    display: none;
}

.history-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-title i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

.history-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.history-table thead {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-table th {
    padding: 14px 16px;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

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

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-table td {
    padding: 14px 16px;
    color: #ffffff;
    font-size: 13px;
}

.history-table td.time {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.history-table td.type {
    font-weight: 600;
}

.history-table td.type.call {
    color: #22c55e;
}

.history-table td.type.put {
    color: #ef4444;
}

.history-table td.asset {
    font-weight: 500;
    color: #ffffff;
}

.history-table td.ref {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.history-table td.price {
    font-weight: 500;
    color: #ffffff;
}

.history-table td.result {
    font-weight: 600;
    font-size: 14px;
}

.history-table td.result.win {
    color: #22c55e;
}

.history-table td.result.loss {
    color: #ef4444;
}

.history-table td.result.pending {
    color: rgba(255, 255, 255, 0.6);
}

.history-table td.result .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
}

.history-table td.result.win .badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.history-table td.result.loss .badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.history-table td.result.pending .badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

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

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.history-empty i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
}

.history-empty p {
    font-size: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
}

.history-empty.hidden {
    display: none;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-card-bg);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}

.toast.warning {
    border-color: rgba(245, 158, 11, 0.5);
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.5);
}

.toast-icon {
    font-size: 20px;
    color: var(--color-success);
}

.toast.error .toast-icon {
    color: var(--color-danger);
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    color: var(--color-text-light);
    font-size: 14px;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 767px) {
    .operation-symbol .symbol-icon {
        width: 64px;
        height: 64px;
    }

    .operation-symbol .symbol-code {
        font-size: 22px;
    }

    .operation-symbol .symbol-price {
        font-size: 18px;
    }

    .operation-symbol-content {
        padding: 30px 16px;
        gap: 24px;
    }

    .operation-control {
        max-width: 100%;
    }

    .open-config-btn,
    .stop-operation-main-btn {
        font-size: 16px;
        padding: 16px 20px;
    }
}

@media screen and (min-width: 600px) {
    .app-container {
        max-width: 100%;
        margin: 0 auto;
    }

    .operation-header {
        max-width: 100%;
    }
}

@media screen and (min-width: 1024px) {
    .app-container {
        max-width: none;
        margin-left: 250px;
        margin-right: 0;
    }

    .operation-trading-container {
        height: 400px;
    }

    .chart-side {
        width: 50%;
        flex: 0 0 50%;
    }

    .symbol-side {
        width: 50%;
        flex: 0 0 50%;
    }

    .operation-header {
        max-width: 100%;
        height: 70px;
        padding: 0 30px;
    }

    .operation-main {
        padding: 0;
    }

    .configuration-form {
        padding: 30px;
    }

    .form-grid {
        gap: 20px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .config-modal-body .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .input-wrapper input,
    .input-wrapper select.form-select {
        padding: 14px 14px 14px 40px;
        font-size: 15px;
    }

    .field-description {
        font-size: 13px;
    }

    .field-subtitle {
        font-size: 12px;
    }

    .start-operation-btn {
        padding: 20px;
        font-size: 20px;
    }

    .operation-symbol .symbol-icon {
        width: 56px;
        height: 56px;
    }

    .operation-symbol .symbol-code {
        font-size: 18px;
    }

    .operation-symbol .symbol-price {
        font-size: 16px;
    }

    .open-config-btn,
    .stop-operation-main-btn {
        font-size: 15px;
        padding: 14px 18px;
    }

    .open-config-btn i,
    .stop-operation-main-btn i {
        font-size: 18px;
    }
}

@media screen and (min-width: 1440px) {
    .operation-trading-container {
        height: 350px;
    }

    .chart-side {
        width: 50%;
        flex: 0 0 50%;
    }

    .symbol-side {
        width: 50%;
        flex: 0 0 50%;
    }
}

/* ===== TRAINING MODAL ===== */
.training-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.training-modal.hidden {
    display: none;
}

.training-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.training-modal-content {
    position: relative;
    background: #131722;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    padding: 40px 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
    text-align: center;
}

.training-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.training-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.training-modal-close i {
    font-size: 16px;
}

.training-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.training-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.training-icon i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.6);
}

.training-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.training-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.training-submessage {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ===== LOGOUT MODAL ===== */
.logout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.logout-modal.hidden {
    display: none;
}

.logout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.logout-modal-content {
    position: relative;
    background: #131722;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
    text-align: center;
}

.logout-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.logout-modal-close i {
    font-size: 16px;
}

.logout-modal-body {
    padding: 40px 30px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logout-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logout-icon i {
    font-size: 36px;
    color: #ef4444;
}

.logout-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.logout-warning {
    color: #fbbf24;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.logout-warning i {
    font-size: 16px;
}

.logout-modal-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 12px;
}

.logout-cancel-btn {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.logout-confirm-btn {
    flex: 1;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-confirm-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.logout-confirm-btn:active {
    transform: translateY(0);
}
