/* ============================================
   PULSE VIEW - Compact Rows (Stand-style)
   POLYOM Design System
   ============================================ */

/* === PULSE CONTAINER === */
.pulse-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    height: calc(100vh - 80px);
    padding: 16px 20px;
    max-width: 1920px;
    margin: 0 auto;
    overflow: hidden;
}

/* === PULSE COLUMN === */
.pulse-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.pulse-column:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* === COLUMN HEADER === */
.pulse-column-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    flex-shrink: 0;
}

.pulse-column-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background: rgba(0, 168, 255, 0.15);
    color: #00a8ff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.column-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.column-search {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 7px 12px;
    width: 120px;
    font-size: 0.8125rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.column-search:focus {
    outline: none;
    border-color: #00a8ff;
    background: rgba(0, 168, 255, 0.05);
    width: 160px;
}

.column-search::placeholder {
    color: #5a6478;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8b9bb4;
    padding: 7px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* === CARDS CONTAINER (SCROLLABLE) === */
.pulse-cards {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

/* === PULSE ROW (COMPACT CARD) === */
.pulse-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.15s ease;
    overflow: hidden;
}

.pulse-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Main Row Content */
.pulse-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

/* Icon */
.pulse-row-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pulse-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pulse-row-icon .icon-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), rgba(0, 168, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Title */
.pulse-row-title {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #00a8ff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    transition: color 0.15s ease;
}

.pulse-row-title:hover {
    color: #33bbff;
    text-decoration: underline;
}

/* Prices */
.pulse-row-prices {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.price-yes, .price-no {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-yes {
    color: #4ade94;
}

.price-no {
    color: #f87171;
}

.price-value {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* Trade Button */
.pulse-row-trade {
    background: #00a8ff;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.pulse-row-trade:hover {
    background: #33bbff;
    transform: translateY(-1px);
}

.pulse-row-trade svg {
    width: 10px;
    height: 10px;
}

/* Stats Row */
.pulse-row-stats {
    display: flex;
    gap: 4px;
    padding: 6px 12px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.pulse-row-stats .stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.pulse-row-stats .stat-label {
    font-size: 0.5625rem;
    color: #5a6478;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.pulse-row-stats .stat-value {
    font-size: 0.6875rem;
    color: #8b9bb4;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* === LOADING & EMPTY STATES === */
.pulse-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 12px;
    color: #8b9bb4;
    font-size: 0.8125rem;
}

.pulse-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #5a6478;
    font-size: 0.875rem;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 168, 255, 0.2);
    border-top-color: #00a8ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === LAST UPDATED === */
.pulse-last-updated {
    text-align: right;
    padding: 8px 20px 0;
    font-size: 0.6875rem;
    color: #5a6478;
}

/* === SCROLLBAR === */
.pulse-cards::-webkit-scrollbar {
    width: 4px;
}

.pulse-cards::-webkit-scrollbar-track {
    background: transparent;
}

.pulse-cards::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.pulse-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === FILTER MODAL === */
.filter-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

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

.filter-modal {
    background: linear-gradient(180deg, #1a1d21 0%, #15171a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}

.filter-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 168, 255, 0.03);
}

.filter-modal-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.filter-modal-header h2 span {
    color: #00a8ff;
}

.filter-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-reset-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #8b9bb4;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.filter-reset-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.filter-save-btn {
    background: #00a8ff;
    border: none;
    color: white;
    padding: 8px 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.filter-save-btn:hover {
    background: #33bbff;
    transform: translateY(-1px);
}

.filter-close-btn {
    background: transparent;
    border: none;
    color: #5a6478;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-left: 6px;
    transition: all 0.15s ease;
}

.filter-close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.filter-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 24px;
}

.filter-section h3,
.filter-group h3 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a6478;
    margin: 0 0 12px 0;
}

/* Category Pills */
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8b9bb4;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.15s ease;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.category-pill.active {
    background: rgba(0, 168, 255, 0.15);
    border-color: #00a8ff;
    color: #00a8ff;
}

/* Filter Rows */
.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-pills-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8b9bb4;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.filter-pill.active {
    background: #00a8ff;
    border-color: #00a8ff;
    color: white;
}

.filter-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.filter-inputs span {
    color: #5a6478;
    font-size: 0.75rem;
}

.filter-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-radius: 8px;
    flex: 1;
    max-width: 120px;
    transition: all 0.15s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #00a8ff;
    background: rgba(0, 168, 255, 0.05);
}

.filter-input::placeholder {
    color: #5a6478;
}

.filter-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 10px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
    margin-bottom: 14px;
}

.filter-search-input:focus {
    outline: none;
    border-color: #00a8ff;
    background: rgba(0, 168, 255, 0.05);
}

.filter-search-input::placeholder {
    color: #5a6478;
}

/* Logic Toggle */
.filter-toggle-group {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
}

.filter-toggle-label {
    font-size: 0.75rem;
    color: #8b9bb4;
    font-weight: 500;
}

.logic-toggle-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.logic-toggle-btn {
    background: transparent;
    border: none;
    color: #8b9bb4;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.logic-toggle-btn:hover {
    color: #ffffff;
}

.logic-toggle-btn.active {
    background: #00a8ff;
    color: white;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .pulse-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 12px;
    }
    
    .pulse-column {
        max-height: 500px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .pulse-container {
        padding: 12px;
    }
    
    .pulse-column-header {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .column-search {
        width: 100%;
        order: 3;
    }
    
    .pulse-row-main {
        flex-wrap: wrap;
    }
    
    .pulse-row-title {
        width: calc(100% - 60px);
        order: 1;
    }
    
    .pulse-row-icon {
        order: 0;
    }
    
    .pulse-row-prices {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
    }
    
    .pulse-row-trade {
        order: 3;
        margin-left: auto;
        margin-top: -28px;
    }
    
    .pulse-row-stats {
        flex-wrap: wrap;
    }
    
    .pulse-row-stats .stat {
        flex: 0 0 33.33%;
        margin-bottom: 4px;
    }
    
    .filter-modal {
        width: 95%;
        max-height: 90vh;
    }
}

/* === POSITION STYLES === */
.position-title {
    color: #00a8ff;
    cursor: pointer;
    font-weight: 500;
}

.position-title:hover {
    text-decoration: underline;
}

.trade-btn {
    background: #00a8ff;
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.trade-btn:hover {
    background: #33bbff;
}
