/**
 * MetaTrader Stats - Frontend Widget Styles
 */

/* Base Widget */
.mts-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.mts-widget *,
.mts-widget *::before,
.mts-widget *::after {
    box-sizing: inherit;
}

/* Light Theme */
.mts-widget.mts-light {
    background: #ffffff;
    color: #1d2327;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark Theme */
.mts-widget.mts-dark {
    background: #1e1e2f;
    color: #e0e0e0;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Gaming Theme */
.mts-widget.mts-gaming {
    background: linear-gradient(135deg, #0d0d1a 0%, #15171C 50%, #15171C 100%);
    color: #e0e0e0;
    border: 1px solid #00fff2;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 242, 0.3), 0 0 40px rgba(0, 255, 242, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: 'Rajdhani', 'Orbitron', 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

.mts-widget.mts-gaming::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00fff2, transparent);
    animation: gaming-line 3s linear infinite;
}

@keyframes gaming-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

.mts-gaming .mts-widget-header {
    border-color: rgba(0, 255, 242, 0.3);
    background: rgba(0, 255, 242, 0.05);
}

.mts-gaming .mts-widget-title {
    color: #00fff2;
    text-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.mts-gaming .mts-account-badge {
    background: linear-gradient(135deg, #ff00ff, #00fff2);
    color: #0d0d1a;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Gaming positive/negative colors */
.mts-gaming .mts-positive {
    color: #00ff88 !important;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.mts-gaming .mts-negative {
    color: #ff3366 !important;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

.mts-gaming .mts-buy {
    color: #00d4ff !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.mts-gaming .mts-sell {
    color: #ff6b35 !important;
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

/* Gaming dashboard items */
.mts-gaming .mts-dashboard-grid {
    background: rgba(0, 255, 242, 0.1);
}

.mts-gaming .mts-dashboard-item {
    background: rgba(13, 13, 26, 0.8);
    border: 1px solid rgba(0, 255, 242, 0.2);
    transition: all 0.3s ease;
}

.mts-gaming .mts-dashboard-item:hover {
    background: rgba(0, 255, 242, 0.1);
    border-color: rgba(0, 255, 242, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
}

.mts-gaming .mts-dashboard-item .mts-label {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mts-gaming .mts-dashboard-item .mts-value {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Gaming stats */
.mts-gaming .mts-stat-item,
.mts-gaming .mts-quick-stat,
.mts-gaming .mts-report-stat {
    background: rgba(0, 255, 242, 0.05);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mts-gaming .mts-stat-item:hover,
.mts-gaming .mts-quick-stat:hover,
.mts-gaming .mts-report-stat:hover {
    border-color: rgba(0, 255, 242, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
}

.mts-gaming .mts-stat-label,
.mts-gaming .mts-quick-label,
.mts-gaming .mts-equity-label {
    color: #00fff2 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px !important;
}

.mts-gaming .mts-stat-value,
.mts-gaming .mts-quick-value,
.mts-gaming .mts-equity-value {
    color: #fff;
}

/* Gaming equity stats */
.mts-gaming .mts-equity-stats {
    border-color: rgba(0, 255, 242, 0.3);
    background: rgba(0, 255, 242, 0.05);
}

/* Gaming trades table */
.mts-gaming .mts-trades-table th {
    color: #00fff2;
    border-bottom: 2px solid rgba(0, 255, 242, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mts-gaming .mts-trades-table td {
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.mts-gaming .mts-trades-table tbody tr:hover {
    background: rgba(0, 255, 242, 0.1);
}

/* Gaming positions */
.mts-gaming .mts-position-item {
    background: rgba(0, 255, 242, 0.05);
    border: 1px solid rgba(0, 255, 242, 0.2);
    transition: all 0.3s ease;
}

.mts-gaming .mts-position-item:hover {
    border-color: rgba(0, 255, 242, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
}

.mts-gaming .mts-position-type.mts-buy {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.mts-gaming .mts-position-type.mts-sell {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.5);
}

/* Gaming footer */
.mts-gaming .mts-widget-footer,
.mts-gaming .mts-report-footer {
    border-color: rgba(0, 255, 242, 0.3);
    color: #666;
}

/* Gaming daily profit */
.mts-gaming .mts-period-select {
    background: rgba(0, 255, 242, 0.1);
    border: 1px solid rgba(0, 255, 242, 0.3);
    color: #00fff2;
}

.mts-gaming .mts-period-select:focus {
    border-color: #00fff2;
    box-shadow: 0 0 10px rgba(0, 255, 242, 0.3);
    outline: none;
}

.mts-gaming .mts-daily-summary {
    border-color: rgba(0, 255, 242, 0.3);
    background: rgba(0, 255, 242, 0.05);
}

/* Gaming report */
.mts-gaming .mts-report-header {
    border-color: rgba(0, 255, 242, 0.3);
}

.mts-gaming .mts-report-title {
    color: #00fff2;
    text-shadow: 0 0 10px rgba(0, 255, 242, 0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.mts-gaming .mts-report-subtitle {
    color: #888;
}

.mts-gaming .mts-report-section h4 {
    color: #00fff2;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 255, 242, 0.3);
}

/* Widget Header */
.mts-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid;
}

.mts-light .mts-widget-header {
    border-color: #e0e0e0;
}

.mts-dark .mts-widget-header {
    border-color: #2d2d44;
}

.mts-widget-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.mts-account-badge {
    background: #2271b1;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mts-dark .mts-account-badge {
    background: #4fc3f7;
    color: #1e1e2f;
}

/* Colors */
.mts-positive {
    color: #00a32a !important;
}

.mts-negative {
    color: #d63638 !important;
}

.mts-dark .mts-positive {
    color: #4caf50 !important;
}

.mts-dark .mts-negative {
    color: #f44336 !important;
}

.mts-buy {
    color: #2196f3 !important;
}

.mts-sell {
    color: #f44336 !important;
}

/* Widget Footer */
.mts-widget-footer {
    padding: 10px 20px;
    border-top: 1px solid;
    font-size: 11px;
}

.mts-light .mts-widget-footer {
    border-color: #e0e0e0;
    color: #888;
}

.mts-dark .mts-widget-footer {
    border-color: #2d2d44;
    color: #666;
}

/* Dashboard Widget */
.mts-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
}

.mts-light .mts-dashboard-grid {
    background: #e0e0e0;
}

.mts-dark .mts-dashboard-grid {
    background: #2d2d44;
}

.mts-dashboard-item {
    padding: 20px;
    text-align: center;
}

.mts-light .mts-dashboard-item {
    background: #fff;
}

.mts-dark .mts-dashboard-item {
    background: #1e1e2f;
}

.mts-dashboard-item .mts-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.mts-light .mts-dashboard-item .mts-label {
    color: #666;
}

.mts-dark .mts-dashboard-item .mts-label {
    color: #888;
}

.mts-dashboard-item .mts-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

/* Stats Widget */
.mts-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

@media (min-width: 500px) {
    .mts-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mts-stat-item {
    text-align: center;
}

.mts-stat-item .mts-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.mts-light .mts-stat-item .mts-stat-label {
    color: #666;
}

.mts-dark .mts-stat-item .mts-stat-label {
    color: #888;
}

.mts-stat-item .mts-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

/* Chart Container */
.mts-chart-container {
    padding: 15px;
    position: relative;
}

.mts-chart-container canvas {
    width: 100% !important;
}

/* Equity Stats (under chart) */
.mts-equity-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    border-top: 1px solid;
}

.mts-light .mts-equity-stats {
    border-color: #e0e0e0;
}

.mts-dark .mts-equity-stats {
    border-color: #2d2d44;
}

.mts-equity-stat {
    text-align: center;
}

.mts-equity-stat .mts-equity-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.mts-light .mts-equity-stat .mts-equity-label {
    color: #666;
}

.mts-dark .mts-equity-stat .mts-equity-label {
    color: #888;
}

.mts-equity-stat .mts-equity-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .mts-equity-stats {
        flex-direction: column;
        gap: 15px;
    }

    .mts-equity-stat .mts-equity-value {
        font-size: 16px;
    }
}

/* Daily Profit Widget */
.mts-daily-profit-widget .mts-daily-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mts-daily-profit-widget .mts-widget-title {
    margin: 0;
}

.mts-period-select {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.mts-light .mts-period-select {
    background: #f7f7f7;
    border: 1px solid #ddd;
    color: #333;
}

.mts-dark .mts-period-select {
    background: #252538;
    border: 1px solid #3d3d5c;
    color: #e0e0e0;
}

.mts-daily-summary {
    padding: 12px 20px;
    text-align: right;
    border-top: 1px solid;
}

.mts-light .mts-daily-summary {
    border-color: #e0e0e0;
}

.mts-dark .mts-daily-summary {
    border-color: #2d2d44;
}

.mts-daily-total {
    font-size: 14px;
    font-weight: 600;
}

/* Trades Table */
.mts-trades-table-wrapper {
    overflow-x: auto;
    padding: 0 15px 15px;
}

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

.mts-trades-table th,
.mts-trades-table td {
    padding: 10px 8px;
    text-align: left;
}

.mts-trades-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mts-light .mts-trades-table th {
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.mts-dark .mts-trades-table th {
    color: #888;
    border-bottom: 2px solid #2d2d44;
}

.mts-light .mts-trades-table td {
    border-bottom: 1px solid #f0f0f0;
}

.mts-dark .mts-trades-table td {
    border-bottom: 1px solid #2d2d44;
}

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

/* Positions List */
.mts-positions-list {
    padding: 0 15px 15px;
}

.mts-position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.mts-light .mts-position-item {
    background: #f7f7f7;
}

.mts-dark .mts-position-item {
    background: #252538;
}

.mts-position-item:last-child {
    margin-bottom: 0;
}

.mts-position-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mts-position-symbol {
    font-weight: 700;
    font-size: 15px;
}

.mts-position-type {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.mts-position-type.mts-buy {
    background: rgba(33, 150, 243, 0.15);
}

.mts-position-type.mts-sell {
    background: rgba(244, 67, 54, 0.15);
}

.mts-position-volume {
    font-size: 12px;
    color: #888;
}

.mts-position-details {
    font-size: 12px;
    display: flex;
    gap: 15px;
}

.mts-light .mts-position-details {
    color: #666;
}

.mts-dark .mts-position-details {
    color: #888;
}

.mts-position-profit {
    font-size: 16px;
    font-weight: 700;
}

/* Report Widget */
.mts-report-widget {
    padding: 20px;
}

.mts-report-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid;
}

.mts-light .mts-report-header {
    border-color: #e0e0e0;
}

.mts-dark .mts-report-header {
    border-color: #2d2d44;
}

.mts-report-title {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
}

.mts-report-subtitle {
    margin: 0;
    font-size: 13px;
}

.mts-light .mts-report-subtitle {
    color: #666;
}

.mts-dark .mts-report-subtitle {
    color: #888;
}

/* Report Quick Stats */
.mts-report-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (min-width: 500px) {
    .mts-report-quick-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mts-quick-stat {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
}

.mts-light .mts-quick-stat {
    background: #f7f7f7;
}

.mts-dark .mts-quick-stat {
    background: #252538;
}

.mts-quick-stat .mts-quick-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.mts-light .mts-quick-stat .mts-quick-label {
    color: #666;
}

.mts-dark .mts-quick-stat .mts-quick-label {
    color: #888;
}

.mts-quick-stat .mts-quick-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

/* Report Sections */
.mts-report-section {
    margin-bottom: 25px;
}

.mts-report-section h4 {
    margin: 0 0 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mts-light .mts-report-section h4 {
    color: #333;
}

.mts-dark .mts-report-section h4 {
    color: #ccc;
}

/* Report Stats Grid */
.mts-report-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 600px) {
    .mts-report-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mts-report-stat {
    padding: 12px;
    border-radius: 6px;
}

.mts-light .mts-report-stat {
    background: #f7f7f7;
}

.mts-dark .mts-report-stat {
    background: #252538;
}

.mts-report-stat .label {
    display: block;
    font-size: 11px;
    margin-bottom: 3px;
}

.mts-light .mts-report-stat .label {
    color: #666;
}

.mts-dark .mts-report-stat .label {
    color: #888;
}

.mts-report-stat .value {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

/* Report Footer */
.mts-report-footer {
    text-align: center;
    padding-top: 15px;
    margin-top: 20px;
    border-top: 1px solid;
    font-size: 11px;
}

.mts-light .mts-report-footer {
    border-color: #e0e0e0;
    color: #888;
}

.mts-dark .mts-report-footer {
    border-color: #2d2d44;
    color: #666;
}

/* No Data Message */
.mts-no-data {
    text-align: center;
    padding: 30px;
    font-style: italic;
}

.mts-light .mts-no-data {
    color: #888;
}

.mts-dark .mts-no-data {
    color: #666;
}

/* Error Widget */
.mts-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 8px;
}

.mts-error p {
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mts-widget {
        font-size: 13px;
    }

    .mts-dashboard-item .mts-value,
    .mts-stat-item .mts-stat-value,
    .mts-quick-stat .mts-quick-value {
        font-size: 18px;
    }

    .mts-position-details {
        display: none;
    }

    .mts-trades-table {
        font-size: 12px;
    }
}

/* ==========================================
   MONTHLY EQUITY WIDGET (Myfxbook Style)
   ========================================== */
.mts-monthly-widget {
    background: #f5f5f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mts-mw-header {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(to bottom, #fafafa 0%, #f0f0eb 100%);
}

.mts-mw-title {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
}

.mts-mw-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mts-mw-stat {
    font-size: 12px;
}

.mts-mw-stat-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mts-mw-stat-block .mts-mw-stat-label {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.mts-mw-stat-block .mts-mw-stat-value {
    font-size: 14px;
    font-weight: bold;
}

.mts-mw-stat-label {
    color: #666;
}

.mts-mw-stat-value {
    font-weight: bold;
    margin-left: 4px;
}

.mts-mw-stat-value.positive {
    color: #27ae60;
}

.mts-mw-stat-value.negative {
    color: #e74c3c;
}

.mts-mw-chart {
    background: #f5f5f0;
    border-radius: 4px;
    overflow: hidden;
}

.mts-mw-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 8px 15px;
    font-size: 11px;
    font-weight: 700;
}

.mts-mw-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mts-mw-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.mts-mw-legend-color.gain {
    background: #e74c3c;
}

.mts-mw-legend-color.equity {
    background: #f5a623;
}

.mts-mw-capital {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.mts-mw-capital-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mts-mw-capital-label {
    font-size: 11px;
    color: #666;
}

.mts-mw-capital-value {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.mts-mw-footer {
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #999;
    background: linear-gradient(to bottom, #f0f0eb 0%, #e8e8e3 100%);
}

.mts-mw-updated {
    color: #27ae60;
}

.mts-mw-powered {
    color: #888;
}

/* Equity Line Widget */
.mts-equity-line-widget {
    background: #f5f5f0;
    border-radius: 4px;
    overflow: hidden;
}

.mts-el-chart {
    background: #f5f5f0;
}

/* Monthly table for frontend */
.mts-monthly-table .mts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    border: 1px solid #ddd;
}

.mts-monthly-table .mts-table th,
.mts-monthly-table .mts-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.mts-monthly-table .mts-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.mts-monthly-table .mts-table td.positive {
    color: #27ae60;
    font-weight: 500;
}

.mts-monthly-table .mts-table td.negative {
    color: #e74c3c;
    font-weight: 500;
}

/* Widget Positions Section (for Monthly Equity and Equity Line) */
.mts-widget-positions {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 15px;
    font-size: 12px;
}

.mts-monthly-widget .mts-widget-positions,
.mts-equity-line-widget .mts-widget-positions {
    background: #f9f9f5;
    border-top: 1px solid #e8e8e0;
}

.mts-widget-positions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.mts-positions-title {
    font-weight: 600;
    color: #333;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mts-positions-total {
    font-weight: 700;
    font-size: 13px;
}

.mts-widget-positions-list {
    max-height: 120px;
    overflow-y: auto;
}

.mts-widget-position-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    gap: 8px;
}

.mts-widget-position-row:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

.mts-pos-symbol {
    font-weight: 600;
    color: #333;
    min-width: 70px;
}

.mts-pos-type {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.mts-pos-type.mts-buy {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.mts-pos-type.mts-sell {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.mts-pos-volume {
    color: #666;
    font-size: 11px;
    min-width: 40px;
}

.mts-pos-profit {
    margin-left: auto;
    font-weight: 600;
    font-size: 12px;
}

.mts-pos-profit.mts-positive {
    color: #27ae60;
}

.mts-pos-profit.mts-negative {
    color: #e74c3c;
}

/* Scrollbar styling for positions list */
.mts-widget-positions-list::-webkit-scrollbar {
    width: 4px;
}

.mts-widget-positions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.mts-widget-positions-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.mts-widget-positions-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==========================================
   MARKET BADGES - Box Style (like positions)
   ========================================== */
.mts-market-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 10px 0 !important;
}

/* Badge Box - similar to open positions style */
.mts-badge-box {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 14px !important;
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* All badge spans need inline display */
.mts-badge-box > span {
    display: inline !important;
    white-space: nowrap !important;
}

/* Market name - bold primary */
.mts-bbox-market {
    font-weight: 700 !important;
    color: #fff !important;
    margin-right: 4px !important;
}

/* Strategy tag - colored pill */
.mts-bbox-strategy {
    background: #8b5cf6 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

/* Hours */
.mts-bbox-hours {
    color: #fbbf24 !important;
    font-weight: 500 !important;
}

.mts-bbox-hours-it {
    color: #9ca3af !important;
    font-size: 11px !important;
    margin-left: 2px !important;
}

/* SL - red */
.mts-bbox-sl {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* TP - green */
.mts-bbox-tp {
    color: #22c55e !important;
    font-weight: 600 !important;
}

/* Ops/Day */
.mts-bbox-ops {
    color: #60a5fa !important;
    font-weight: 500 !important;
}

/* Days */
.mts-bbox-days {
    color: #a78bfa !important;
    font-size: 11px !important;
}

/* ==========================================
   Light Theme Badges
   ========================================== */
.mts-light .mts-badge-box {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.mts-light .mts-bbox-market {
    color: #1e293b !important;
}

.mts-light .mts-bbox-hours {
    color: #d97706 !important;
}

.mts-light .mts-bbox-hours-it {
    color: #6b7280 !important;
}

.mts-light .mts-bbox-sl {
    color: #dc2626 !important;
}

.mts-light .mts-bbox-tp {
    color: #16a34a !important;
}

.mts-light .mts-bbox-ops {
    color: #2563eb;
}

.mts-light .mts-bbox-days {
    color: #7c3aed;
}

/* ==========================================
   Gaming Theme Badges
   ========================================== */
.mts-gaming .mts-badge-box {
    background: rgba(0, 255, 242, 0.1) !important;
    border-color: rgba(0, 255, 242, 0.3) !important;
}

.mts-gaming .mts-bbox-market {
    color: #00fff2;
    text-shadow: 0 0 5px rgba(0, 255, 242, 0.5);
}

.mts-gaming .mts-bbox-strategy {
    background: linear-gradient(135deg, #ff00ff, #00fff2);
    color: #0d0d1a;
}

/* ==========================================
   Backend Badges
   ========================================== */
.mts-badges-backend .mts-badge-box {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

.mts-badges-backend .mts-bbox-market {
    color: #1e40af;
}

.mts-badges-backend .mts-bbox-hours {
    color: #b45309;
}

.mts-badges-backend .mts-bbox-hours-it {
    color: #6b7280;
}

.mts-badges-backend .mts-bbox-sl {
    color: #dc2626;
}

.mts-badges-backend .mts-bbox-tp {
    color: #16a34a;
}

.mts-badges-backend .mts-bbox-ops {
    color: #2563eb;
}

.mts-badges-backend .mts-bbox-days {
    color: #7c3aed;
}

/* ==========================================
   Frontend Badges (Default Dark Theme)
   ========================================== */
.mts-badges-frontend .mts-badge-box {
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================
   Rankings Badges (Compact)
   ========================================== */
.mts-badges-rankings {
    margin: 6px 0 0 0;
}

.mts-badges-rankings .mts-badge-box {
    padding: 5px 8px;
    gap: 6px;
    font-size: 11px;
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.mts-badges-rankings .mts-bbox-strategy {
    padding: 1px 6px;
    font-size: 10px;
}

.mts-badges-rankings .mts-bbox-hours-it,
.mts-badges-rankings .mts-bbox-days {
    font-size: 10px;
}

/* Responsive */
@media (max-width: 500px) {
    .mts-badge-box {
        padding: 6px 10px;
        gap: 6px;
        font-size: 11px;
    }
}

/* Rankings badge row integration */
.mts-rank-badges-row,
.mts-strategy-badges-row {
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 600px) {
    .mts-market-badge {
        padding: 6px 10px;
        font-size: 11px;
    }

    .mts-badge-hours {
        flex-basis: 100%;
        margin-top: 4px;
    }
}
