/* Admin Signals Page Responsive Styles */

/* Ensure everything uses border-box */
* {
    box-sizing: border-box;
}

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Admin Container Modern Layout */
.admin-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Modern Section Container Styles */
.section-card {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 0 auto 1.5rem auto;
    max-width: 1000px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00FF88, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Risk Selector and Leverage Calculator Styles */
.risk-selector {
    width: 100%;
    padding: 0.5rem;
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.risk-selector:focus {
    outline: none;
    border-color: #00FF88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

.leverage-display {
    padding: 0.75rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.leverage-display #calculatedLeverage {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00D4FF;
    font-family: 'JetBrains Mono', monospace;
}

.leverage-display.warning {
    background: rgba(255, 204, 0, 0.05);
    border-color: rgba(255, 204, 0, 0.3);
}

.leverage-display.warning #calculatedLeverage {
    color: #FFCC00;
}

.leverage-display.danger {
    background: rgba(255, 59, 48, 0.05);
    border-color: rgba(255, 59, 48, 0.3);
}

.leverage-display.danger #calculatedLeverage {
    color: #FF3B30;
}

.info-tooltip {
    display: inline-block;
    margin-left: 4px;
    color: rgba(0, 212, 255, 0.6);
    cursor: help;
    font-size: 0.85rem;
}

/* Compact Select and Button Styles */
.compact-select {
    padding: 0.5rem 0.75rem;
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compact-select:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

.compact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 255, 136, 0.08) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: #00D4FF;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compact-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-1px);
}

.refresh-btn {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

.refresh-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
}

/* Active Signals Container */
.active-signals-card {
    max-width: 1200px;
    margin: 0 auto;
}

.signals-container {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

/* Signal Cards Redesign */
.signal-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.signal-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 136, 0.2);
    transform: translateX(2px);
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-pair {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00FF88;
}

.signal-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-futures {
    background: rgba(0, 212, 255, 0.15);
    color: #00D4FF;
}

.badge-spot {
    background: rgba(255, 204, 0, 0.15);
    color: #FFCC00;
}

.signal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.detail-value {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.signal-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn {
    flex: 1;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-update {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00D4FF;
}

.btn-update:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

.btn-close {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.btn-close:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.5);
}

/* Signal Type Specific Fields */
.futures-only,
.spot-only {
    display: none;
    transition: opacity 0.3s ease;
}

.signal-form[data-type="FUTURES"] .futures-only {
    display: flex;
}

.signal-form[data-type="SPOT"] .spot-only {
    display: flex;
}

/* Admin container styling is handled by admin-responsive.css */

/* Admin header specific for signals page */
.admin-header {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-content h1 {
    font-family: 'Orbitron', monospace;
    color: #00FF88;
    font-size: 1.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Glass cards */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    max-width: 1100px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Compact card for Post New Signal */
.glass-card.compact-card {
    max-width: 900px;
    padding: 1.25rem;
    margin: 0 auto 2rem auto;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.6), rgba(30, 30, 35, 0.4));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient animation */
.glass-card.compact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
    animation: subtle-rotate 20s linear infinite;
    pointer-events: none;
}

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

.glass-card:hover {
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow: 0 8px 12px rgba(0, 255, 136, 0.1);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.compact-card .card-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

.card-header h2 {
    color: #00D4FF;
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-card .card-header h2 {
    font-size: 1.1rem;
}

/* Form Styles - Compact & Modern */
.signal-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.compact-card .signal-form {
    gap: 0.6rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: white;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: 100%;
}

.compact-card .form-group input,
.compact-card .form-group select,
.compact-card .form-group textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.08);
}

/* Form Row Responsive - Compact */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.compact-card .form-row {
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-row.triple {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

/* Mobile Responsive - Extra Compact */
@media (max-width: 768px) {
    .glass-card.compact-card {
        max-width: 100%;
        margin: 0 0.5rem 1.5rem 0.5rem;
        padding: 0.75rem;
    }

    .compact-card .card-header h2 {
        font-size: 1rem;
    }

    .form-row.triple {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .signal-type-selector {
        gap: 0.4rem;
    }

    .signal-type-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .compact-card .form-group input,
    .compact-card .form-group select,
    .compact-card .form-group textarea {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    .compact-card .btn-primary,
    .compact-card .secondary-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .glass-card.compact-card {
        border-radius: 8px;
        padding: 0.6rem;
    }

    .compact-card .card-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.4rem;
    }

    .compact-card .signal-form {
        gap: 0.5rem;
    }
}

/* Signal Type Selector - Compact */
.signal-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.compact-card .signal-type-selector {
    margin-bottom: 0.6rem;
}

.signal-type-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
    font-size: 0.8rem;
}

.signal-type-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.15));
    border-color: rgba(0, 255, 136, 0.5);
    color: #00FF88;
}

/* Template Chips */
.templates-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.02);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 12px;
}

.template-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.template-chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.template-chip:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00FF88;
    transform: translateY(-2px);
}

/* Buttons - Compact & Modern */
.btn-primary {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #00FF88 0%, #00D4FF 100%);
    color: #0A0A0B;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 200px;
    margin: 0.5rem auto 0;
}

.compact-card .btn-primary {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    max-width: 160px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.25);
}

.secondary-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-card .secondary-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00FF88;
}

/* Active Signals Table */
.signals-table {
    width: 100%;
    overflow-x: auto;
}

.signals-table table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.signals-table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    text-align: left;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.signals-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.signals-table tr:hover td {
    background: rgba(0, 255, 136, 0.05);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: #00FF88;
}

.status-badge.win {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-badge.loss {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

/* Mobile Card View for Signals */
.signal-cards {
    display: none;
    gap: 1rem;
}

.signal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.signal-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 136, 0.3);
}

.signal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.signal-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.signal-card-label {
    color: rgba(255, 255, 255, 0.5);
}

.signal-card-value {
    color: white;
    font-weight: 500;
}

/* Responsive Active Signals */
@media (max-width: 768px) {
    .header-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .compact-select {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .compact-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .btn-text {
        display: none;
    }

    .signal-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .signal-actions {
        flex-wrap: wrap;
    }

    .action-btn {
        min-width: calc(50% - 0.25rem);
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .signal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .signal-pair {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .active-signals-card {
        padding: 1rem;
    }

    .signal-item {
        padding: 0.75rem;
    }

    .signal-details {
        grid-template-columns: 1fr;
    }

    .action-btn {
        width: 100%;
    }

    .detail-label {
        font-size: 0.7rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }
}

/* Responsive Breakpoints */

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
    }

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

    .signal-type-selector {
        flex-direction: column;
    }

    .signal-type-btn {
        width: 100%;
    }
}

/* Mobile - Below 768px */
@media (max-width: 768px) {
    /* Reset container margin on mobile */
    .admin-container {
        margin-left: 0;
    }

    /* Header adjustments */
    .admin-header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    /* Glass cards */
    .glass-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    /* Form adjustments */
    .signal-form {
        gap: 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Templates */
    .template-chips {
        gap: 0.4rem;
    }

    .template-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Hide table, show cards on mobile */
    .signals-table {
        display: none;
    }

    .signal-cards {
        display: flex;
        flex-direction: column;
    }

    /* Buttons */
    .btn-primary,
    .secondary-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile - Below 480px */
@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.25rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions button {
        width: 100%;
    }

    .templates-section {
        padding: 0.75rem;
    }

    .template-chips {
        gap: 0.3rem;
    }

    .template-chip {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .signal-card {
        padding: 1rem;
    }

    .signal-card-row {
        font-size: 0.85rem;
    }
}

/* Landscape Mode */
@media (max-width: 896px) and (orientation: landscape) {
    .admin-header {
        padding: 0.75rem 1rem;
    }

    .header-content h1 {
        font-size: 1.25rem;
    }

    .glass-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .signal-type-selector {
        flex-direction: row;
    }

    .template-chips {
        max-height: 80px;
        overflow-y: auto;
    }
}

/* Large Screens */
@media (min-width: 1440px) {
    .admin-container {
        max-width: 1600px;
        margin: 0 auto;
    }

    .glass-card {
        padding: 2rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row.triple {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-top-color: #00FF88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scrollbar Styling */
.signals-table::-webkit-scrollbar {
    height: 8px;
}

.signals-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.signals-table::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

.signals-table::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Ticker Dropdown - Compact & Modern */
.ticker-selector-wrapper {
    position: relative;
}

.ticker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(15, 15, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.compact-card .ticker-dropdown {
    max-height: 200px;
    font-size: 0.8rem;
}

.ticker-category {
    padding: 0.4rem 0.6rem;
    background: rgba(0, 255, 136, 0.08);
    color: rgba(0, 255, 136, 0.8);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.compact-card .ticker-item {
    padding: 0.4rem 0.5rem;
}

.ticker-item:hover {
    background: rgba(0, 255, 136, 0.08);
    padding-left: 0.8rem;
}

.ticker-symbol {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.85rem;
}

.compact-card .ticker-symbol {
    font-size: 0.78rem;
}

.ticker-price {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.compact-card .ticker-price {
    font-size: 0.75rem;
}

.ticker-change {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.ticker-change.positive {
    color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
}

.ticker-change.negative {
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.1);
}

.ticker-search-info {
    padding: 0.5rem 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

/* Ticker dropdown scrollbar */
.ticker-dropdown::-webkit-scrollbar {
    width: 4px;
}

.ticker-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.ticker-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 2px;
}

.ticker-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Draft Management Styles */
.drafts-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.draft-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.draft-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateX(4px);
}

.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.draft-title {
    font-weight: 600;
    color: #00D4FF;
    font-size: 0.9rem;
}

.draft-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.draft-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.draft-detail {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.draft-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.draft-btn {
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.draft-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.draft-btn.use {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

.draft-btn.delete {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.draft-manager-btn {
    transition: all 0.2s ease;
}

.draft-manager-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(0, 255, 136, 0.3) !important;
    color: #00FF88 !important;
}

/* Performance Analytics Styles */
.analytics-card {
    position: relative;
}

.analytics-select {
    padding: 0.4rem 0.8rem;
    background: rgba(20, 20, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analytics-select option {
    background: rgba(20, 20, 25, 0.98);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
}

.analytics-select:hover {
    background: rgba(30, 30, 35, 0.9);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

.analytics-select:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(30, 30, 35, 0.95);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 0.5rem;
    max-width: 100%;
}

.analytics-stat {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.analytics-stat:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.3rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #00FF88, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.stat-trend {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    display: none;
}

.stat-trend.positive {
    display: block;
    color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
}

.stat-trend.negative {
    display: block;
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.1);
}

/* Specific stat colors */
#winRate .stat-number {
    background: linear-gradient(135deg, #00FF88, #00FF88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#avgRR .stat-number {
    background: linear-gradient(135deg, #00D4FF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#totalSignals .stat-number {
    background: linear-gradient(135deg, #FFCC00, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#avgPnL .stat-number {
    background: linear-gradient(135deg, #9333EA, #C084FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Top Pairs Section */
.top-pairs-section {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.top-pairs-container {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pair-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pair-chip:hover {
    background: rgba(0, 255, 136, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 255, 136, 0.2);
}

.pair-symbol {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.pair-winrate {
    color: #00FF88;
    font-weight: 700;
    font-size: 0.7rem;
}

.pair-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
}

.loading-indicator {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    padding: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .analytics-stat {
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }
}

/* Bulk Operations Styles */
.bulk-operations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    padding: 1rem 0.5rem;
    max-width: 100%;
}

.bulk-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem 0.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.bulk-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bulk-icon {
    font-size: 1.2rem;
}

.bulk-text {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Bulk button variants */
.bulk-btn.success {
    border-color: rgba(0, 255, 136, 0.2);
}

.bulk-btn.success:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.4);
    color: #00FF88;
}

.bulk-btn.danger {
    border-color: rgba(255, 59, 48, 0.2);
}

.bulk-btn.danger:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.4);
    color: #FF3B30;
}

.bulk-btn.info {
    border-color: rgba(0, 212, 255, 0.2);
}

.bulk-btn.info:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00D4FF;
}

.bulk-btn.export {
    border-color: rgba(255, 204, 0, 0.2);
}

.bulk-btn.export:hover {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.4);
    color: #FFCC00;
}

/* Responsive for bulk operations */
@media (max-width: 640px) {
    .bulk-operations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .bulk-btn {
        padding: 0.6rem 0.4rem;
        font-size: 0.7rem;
    }

    .bulk-icon {
        font-size: 1rem;
    }
}

/* Update Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.98), rgba(30, 30, 35, 0.95));
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content.large-modal {
    max-width: 900px;
    max-height: 85vh;
}

/* Signal Details Container */
.signal-details-container {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.signal-details-grid {
    display: grid;
    gap: 1.5rem;
}

.detail-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
}

.detail-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00D4FF;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.detail-value {
    color: #FFFFFF;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.detail-value.profit {
    color: #00FF88;
}

.detail-value.loss {
    color: #FF3B30;
}

.signal-update-item {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.update-type {
    background: rgba(0, 212, 255, 0.1);
    color: #00D4FF;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.update-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Status badges for signal details modal */
.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00D4FF;
}

.status-badge.closed {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.status-badge.won {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

.status-badge.lost {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

/* Telegram Messages Container */
.telegram-messages-container {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.telegram-message-card {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.05) 0%, rgba(0, 136, 204, 0.02) 100%);
    border: 1px solid rgba(0, 136, 204, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.telegram-message-card:hover {
    background: rgba(0, 136, 204, 0.08);
    border-color: rgba(0, 136, 204, 0.4);
    transform: translateY(-2px);
}

.telegram-channel-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.telegram-channel-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0088CC, #00A3E0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.telegram-channel-name {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
}

.telegram-channel-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.2rem;
}

.telegram-message-info {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.telegram-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
}

.telegram-info-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.telegram-info-value {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.telegram-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.1) 0%, rgba(0, 136, 204, 0.15) 100%);
    border: 1px solid rgba(0, 136, 204, 0.3);
    border-radius: 8px;
    color: #00A3E0;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.telegram-link-button:hover {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}

.no-telegram-messages {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-telegram-messages-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-telegram-messages-text {
    font-size: 1rem;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #00FF88;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

#updateForm {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

#updateForm .form-group {
    margin-bottom: 1.25rem;
}

#updateForm label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

#updateForm select,
#updateForm input,
#updateForm textarea {
    width: 100%;
    padding: 0.75rem;
    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.9);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#updateForm select:focus,
#updateForm input:focus,
#updateForm textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

#updateForm textarea {
    resize: vertical;
    min-height: 80px;
}

#updateFields {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    min-height: 60px;
}

#updateForm .form-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#updateForm .primary-btn,
#updateForm .secondary-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#updateForm .primary-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 212, 255, 0.2));
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

#updateForm .primary-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 212, 255, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

#updateForm .secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

#updateForm .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments for update modal */
@media (max-width: 768px) {
    .modal {
        padding: 0;
    }

    .modal-content {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-header {
        padding: 1rem;
    }

    #updateForm {
        padding: 1rem;
    }

    #updateForm .form-row {
        flex-direction: column;
    }

    #updateForm .primary-btn,
    #updateForm .secondary-btn {
        width: 100%;
    }
}

/* Update History Button */
.update-history-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    color: #00D4FF;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.update-history-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.update-icon {
    font-size: 0.9rem;
}

.update-count {
    background: rgba(0, 212, 255, 0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.latest-update {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
}

/* Signal History Section - Compact Card Design */
.history-signal-item {
    background: rgba(20, 20, 25, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.history-signal-item:hover {
    background: rgba(25, 25, 30, 0.5);
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.history-signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-signal-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-signal-pair {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
}

.history-signal-type {
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.history-signal-type.badge-futures {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.history-signal-type.badge-spot {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: #8A2BE2;
}

.history-signal-direction {
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
}

.history-signal-direction.long {
    background: rgba(0, 255, 136, 0.05);
    color: #00FF88;
}

.history-signal-direction.short {
    background: rgba(255, 59, 48, 0.05);
    color: #FF3B30;
}

.history-signal-leverage {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    color: #FFD700;
    font-size: 0.8rem;
    font-weight: 600;
}

.history-signal-status {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.history-signal-details {
    margin-bottom: 0.75rem;
}

.history-detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.history-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-detail-item .detail-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-detail-item .detail-value {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.history-pnl-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.pnl-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.pnl-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.pnl-value.profit {
    color: #00FF88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.pnl-value.loss {
    color: #FF3B30;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}

.history-meta-row {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item.confidence-high {
    color: #00FF88;
}

.meta-item.confidence-medium {
    color: #FFD700;
}

.meta-item.confidence-low {
    color: #FF9500;
}

.history-signal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-action-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.history-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
}

.history-action-btn.btn-view {
    border-color: rgba(0, 212, 255, 0.3);
    color: #00D4FF;
}

.history-action-btn.btn-view:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

.history-action-btn.btn-update {
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.history-action-btn.btn-update:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.history-action-btn.btn-close {
    border-color: rgba(255, 149, 0, 0.3);
    color: #FF9500;
}

.history-action-btn.btn-close:hover {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.5);
}

.history-action-btn.btn-delete {
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.history-action-btn.btn-delete:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.5);
}

/* Update History Modal */
.update-history-modal {
    max-width: 700px;
    width: 90%;
}

.update-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.update-history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.update-history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 136, 0.2);
}

.update-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.update-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    color: #00FF88;
    font-size: 0.8rem;
    font-weight: 600;
}

.update-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.update-history-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.update-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
}

.update-details {
    padding: 0.5rem;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid rgba(0, 212, 255, 0.3);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.update-user {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-style: italic;
}

/* Winners Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.winners-modal {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.98), rgba(30, 30, 35, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .winners-modal {
    transform: scale(1);
}

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

.modal-header h3 {
    color: #00FF88;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FF3B30;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.winners-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.winner-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.winner-card:hover {
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 136, 0.2);
}

.winner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.winner-direction {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.winner-direction.long {
    background: rgba(0, 255, 136, 0.2);
    color: #00FF88;
}

.winner-direction.short {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

.winner-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.winner-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.winner-prices {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.price-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-item .label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.price-item .value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.winner-profit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profit-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
}

.profit-value {
    color: #00FF88;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.winner-footer {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rr-ratio {
    color: #00D4FF;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 2rem;
    font-size: 0.9rem;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .winners-modal {
        width: 95%;
        max-height: 90vh;
    }

    .winners-list {
        grid-template-columns: 1fr;
    }

    .modal-header h3 {
        font-size: 1rem;
    }
}

/* Current price display */
#currentPriceDisplay {
    margin-top: 0.4rem;
}

.compact-card #currentPriceDisplay > div {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem;
}

.compact-card #currentPriceDisplay strong {
    font-size: 0.9rem !important;
}

/* Print Styles */
@media print {
    .mobile-menu-toggle,
    .admin-nav,
    .header-actions,
    .template-chips,
    .btn-primary,
    .secondary-btn {
        display: none !important;
    }

    .admin-container {
        margin-left: 0;
    }

    .glass-card {
        background: white;
        color: black;
        border: 1px solid black;
    }
}