/* SignalHub Trading Signals - Frontend Styles */

.signalhub-signals,
.signalhub-signal-detail,
.signalhub-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Table Layout */
.signalhub-layout-table .signals-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.signalhub-layout-table .signals-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.signalhub-layout-table .signals-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signalhub-layout-table .signals-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.signalhub-layout-table .signal-row {
    transition: background-color 0.2s ease;
}

.signalhub-layout-table .signal-row:hover {
    background-color: #f8f9fa;
}

.signalhub-layout-table .signal-row.signal-buy {
    border-left: 4px solid #28a745;
}

.signalhub-layout-table .signal-row.signal-sell {
    border-left: 4px solid #dc3545;
}

.signalhub-layout-table .symbol {
    font-weight: 600;
    font-size: 15px;
}

/* Status Badges */
.signal-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signal-status-published {
    background: #cfe9ff;
    color: #0c5aa0;
}

.signal-status-active {
    background: #cffbf1;
    color: #0f5233;
}

.signal-status-closed {
    background: #e2e3e5;
    color: #383d41;
}

.signal-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.signal-status-cancelled {
    background: #fff3cd;
    color: #856404;
}

/* Side Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-buy {
    background: #d4edda;
    color: #155724;
}

.badge-sell {
    background: #f8d7da;
    color: #721c24;
}

/* P&L Display */
.pnl-value {
    font-weight: 600;
}

.pnl-positive {
    color: #28a745;
}

.pnl-negative {
    color: #dc3545;
}

.pnl-pending {
    color: #6c757d;
}

/* Signal Detail Page */
.signalhub-signal-detail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.signal-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.signal-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.signal-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.signal-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.created-date {
    color: #6c757d;
    font-size: 14px;
}

.signal-content {
    padding: 20px;
}

.signal-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.price-item {
    text-align: center;
}

.price-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.price-item .price {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

.entry-price .price {
    color: #0c5aa0;
}

.tp-price .price {
    color: #28a745;
}

.sl-price .price {
    color: #dc3545;
}

.signal-info,
.signal-execution,
.signal-result {
    margin: 20px 0;
}

.signal-info h3,
.signal-execution h3,
.signal-result h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212529;
}

.info-row,
.execution-info,
.result-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child,
.execution-info:last-child,
.result-info:last-child {
    border-bottom: none;
}

.info-row .label,
.execution-info .label,
.result-info .label {
    font-weight: 600;
    color: #495057;
}

.info-row .value,
.execution-info .value,
.result-info .value {
    color: #212529;
    font-weight: 500;
}

.pnl-display {
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 15px 0;
}

.pnl-display.pnl-positive {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.pnl-display.pnl-negative {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.pnl-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.pnl-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.r-multiple {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
}

.r-multiple .label {
    font-size: 12px;
    text-transform: uppercase;
}

.r-multiple .value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

/* Widget */
.signalhub-widget {
    background: #fff;
}

.signalhub-widget .signals-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.signalhub-widget .signal-item {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.signalhub-widget .signal-item:last-child {
    border-bottom: none;
}

.signalhub-widget .signal-item.signal-buy {
    border-left: 3px solid #28a745;
}

.signalhub-widget .signal-item.signal-sell {
    border-left: 3px solid #dc3545;
}

.signalhub-widget .signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
}

.signalhub-widget .symbol {
    font-size: 14px;
    font-weight: 700;
}

.signalhub-widget .side {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.signalhub-widget .side.buy {
    background: #d4edda;
    color: #155724;
}

.signalhub-widget .side.sell {
    background: #f8d7da;
    color: #721c24;
}

.signalhub-widget .signal-prices {
    font-size: 12px;
    margin: 6px 0;
}

.signalhub-widget .signal-prices span {
    display: block;
    margin: 2px 0;
}

.signalhub-widget .signal-pnl {
    font-size: 12px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

/* Error Messages */
.signalhub-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    color: #721c24;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .signal-header-detail {
        flex-direction: column;
        align-items: flex-start;
    }

    .signal-meta {
        margin-top: 10px;
    }

    .signal-prices {
        grid-template-columns: 1fr;
    }

    .signalhub-layout-table .signals-table {
        font-size: 12px;
    }

    .signalhub-layout-table .signals-table th,
    .signalhub-layout-table .signals-table td {
        padding: 8px 10px;
    }
}
