/* =================================================================
   SELL PAGE STYLES - DARK THEME
   WARNING: DO NOT USE ARABIC CHARACTERS IN THIS CODE
   This file contains styles for the Sell Signals page
   ================================================================= */

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

/* Root Variables - Dark Theme Colors */
:root {
    /* Sell Signal Colors */
    --sell-primary: #ef4444;
    --sell-primary-dark: #dc2626;
    --sell-primary-darker: #b91c1c;
    
    /* Background Colors */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    
    /* Text Colors */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Status Colors */
    --color-profit: #10b981;
    --color-loss: #ef4444;
    --color-warning: #f59e0b;
    --color-neutral: #6b7280;
    
    /* Border Colors */
    --border-primary: rgba(59, 130, 246, 0.2);
    --border-secondary: rgba(59, 130, 246, 0.1);
    
    /* Shadow */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1800px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 20px;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--sell-primary);
    font-weight: 700;
}

.utc-clock {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a,
.nav-links button {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
    cursor: pointer;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links button:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--sell-primary) 0%, var(--sell-primary-dark) 100%);
    color: white;
    font-weight: 600;
    border: 1px solid transparent;
}

/* Refresh Button */
.refresh-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

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

/* TSL Configuration */
.tsl-config {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
}

.tsl-config label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.tsl-config input {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.tsl-config .hint {
    display: none;
}

/* Holding Time control */
.holding-config {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
}

.holding-config label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.holding-config input {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
}

.holding-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--border-secondary);
}

.holding-toggle label:not(.switch) {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

/* Auto Sell Toggles Container */
.auto-sell-toggles {
    display: flex;
    gap: 12px;
}

.auto-sell-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auto-sell-toggle-item:hover {
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.auto-sell-toggle-item.stop-price-toggle {
    border-left: 2px solid var(--color-warning);
}

.auto-sell-toggle-item.target-trend-toggle {
    border-left: 2px solid var(--sell-primary);
}

.auto-sell-toggle-item label:not(.switch) {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #64748B;
    transition: 0.4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-profit);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Last Update */
.last-update {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 4px;
    border: 1px solid var(--border-primary);
    white-space: nowrap;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 15px 12px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    border: 1px solid var(--border-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.summary-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-item:hover::before {
    opacity: 1;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.summary-value.profit {
    color: var(--color-profit);
}

.summary-value.loss {
    color: var(--color-loss);
}

.summary-value.neutral {
    color: var(--color-neutral);
}

.summary-value.potential {
    color: #7c3aed;
}

.summary-value.missed {
    color: var(--color-warning);
}

.summary-subtext {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}

/* Content Area */
#content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-secondary);
    overflow: hidden;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Info Message */
.info-message {
    text-align: center;
    padding: 40px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.info-message h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.info-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.info-message a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.info-message a:hover {
    text-decoration: underline;
}

/* Table Styles */
.crypto-table {
    width: 100%;
    border-collapse: collapse;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(239, 68, 68, 0.15);
    border-bottom: 2px solid var(--sell-primary);
}

th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    color: var(--text-primary);
    vertical-align: middle;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-secondary);
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
    height: 60px;
}

tbody tr {
    transition: all 0.2s ease;
    height: 60px;
}

tbody tr:hover {
    background: rgba(239, 68, 68, 0.05);
}

/* Matched Row */
.matched-row {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--sell-primary);
}

/* Stop Triggered */
.stop-triggered {
    background: rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--sell-primary-dark);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        background: rgba(239, 68, 68, 0.15);
    }
    50% {
        background: rgba(239, 68, 68, 0.25);
    }
}

.stop-triggered-price {
    color: var(--sell-primary-dark);
    font-weight: 700;
    background: rgba(220, 38, 38, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Target Sell Triggered - Row alert removed as per user request */
/* .target-sell-triggered {
    background: rgba(220, 38, 38, 0.25);
    border-left: 4px solid var(--sell-primary-darker);
    animation: pulse-target 1.5s infinite;
}

@keyframes pulse-target {
    0%, 100% {
        background: rgba(220, 38, 38, 0.2);
    }
    50% {
        background: rgba(220, 38, 38, 0.35);
    }
} */

.holding-blocked {
    /* Blur effect removed - rows remain fully visible when HT is active */
    background: rgba(251, 191, 36, 0.05);
}

/* Symbol Link */
.symbol-link {
    color: var(--sell-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.symbol-link:hover {
    color: var(--sell-primary-dark);
    text-decoration: underline;
    transform: translateX(2px);
}

/* Positive/Negative Values */
.positive {
    color: var(--color-profit);
    font-weight: 600;
}

.negative {
    color: var(--color-loss);
    font-weight: 600;
}

/* Special Cell Styles */
.time-cell {
    height: 60px !important;
    max-height: 60px !important;
    vertical-align: middle !important;
    padding: 10px 8px !important;
    line-height: 1.2 !important;
    overflow: hidden;
}

.max-price {
    font-weight: 600;
    color: #8b5cf6;
}

.max-gain {
    font-weight: 600;
    color: var(--color-warning);
}

.cvd-cell {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cvd-cell.cvd-na {
    color: var(--text-secondary);
    font-weight: 500;
}

.cvd-cell .cvd-empty {
    opacity: 0.6;
}

.tsl-cell {
    font-weight: 600;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.holding-time {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 4px;
    text-align: center;
    padding: 4px 6px;
    display: inline-block;
}

.holding-time.holding-wait {
    color: var(--color-warning);
    background: rgba(251, 191, 36, 0.1);
}

.holding-time.holding-ready {
    color: var(--color-profit);
    background: rgba(16, 185, 129, 0.1);
}

/* Sell Button */
.sell-btn {
    background: var(--sell-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.sell-btn:hover {
    background: var(--sell-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Target Sell Button */
.target-sell-btn {
    background: var(--sell-primary-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s;
    animation: pulse-urgent 2s infinite;
    text-transform: uppercase;
    border: 2px solid var(--sell-primary-darker);
}

.target-sell-btn:hover {
    background: var(--sell-primary-darker);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

@keyframes pulse-urgent {
    0%, 100% {
        background: var(--sell-primary-dark);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        background: var(--sell-primary-darker);
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

/* Signal Indicators */
.indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    min-width: 60px;
}

.indicator.signal-buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-profit);
    border-left: 3px solid var(--color-profit);
}

.indicator.signal-sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--sell-primary);
    border-left: 3px solid var(--sell-primary);
}

.indicator.signal-sell.target-urgent {
    background: rgba(220, 38, 38, 0.25);
    color: var(--sell-primary-darker);
    border-left: 3px solid var(--sell-primary-darker);
    animation: pulse-indicator 1.5s infinite;
    font-weight: 700;
}

@keyframes pulse-indicator {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.indicator.signal-neutral {
    background: rgba(107, 114, 128, 0.15);
    color: var(--color-neutral);
    border-left: 3px solid var(--color-neutral);
}

/* Badge Styles */
.badge-sell {
    background: var(--sell-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-hold {
    background: var(--color-neutral);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-primary);
}

.modal-header {
    background: linear-gradient(135deg, var(--sell-primary) 0%, var(--sell-primary-dark) 100%);
    color: white;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 16px 16px 0 0;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--sell-primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:disabled {
    background: rgba(71, 85, 105, 0.3);
    cursor: not-allowed;
    color: var(--text-muted);
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-secondary);
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.modal-btn-confirm {
    background: var(--sell-primary);
    color: white;
}

.modal-btn-confirm:hover {
    background: var(--sell-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.modal-btn-cancel {
    background: rgba(71, 85, 105, 0.5);
    color: var(--text-primary);
    border: 1px solid rgba(71, 85, 105, 0.8);
}

.modal-btn-cancel:hover {
    background: rgba(71, 85, 105, 0.7);
}

.modal-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Toast Notification */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .results-summary {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        padding: 15px;
    }

    .summary-item {
        padding: 12px 8px;
    }

    .summary-value {
        font-size: 1.2rem;
    }

    .header-controls {
        gap: 10px;
    }

    .auto-sell-toggles {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 12px 15px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .utc-clock {
        font-size: 1.1rem;
        padding: 5px 10px;
    }

    .header-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .results-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .nav-links {
        gap: 6px;
        width: 100%;
    }

    .nav-links a,
    .nav-links button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 8px 5px;
    }

    .modal-content {
        width: 95%;
        padding: 0;
    }

    .tsl-config {
        width: 100%;
        justify-content: space-between;
    }

    .auto-sell-toggles {
        width: 100%;
        justify-content: space-between;
    }

    .auto-sell-toggle-item {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }

    .utc-clock {
        font-size: 1rem;
    }

    th, td {
        padding: 6px 3px;
        font-size: 0.7rem;
    }
}
