/* Table Styles for Portfolio and Transactions */
.shares-breakdown-section,
.transaction-history-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 0px;
    padding: 0;
    margin-bottom: 40px;
    box-shadow: 
        inset 0 1px 1px var(--glass-highlight),
        0 10px 40px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

/* Subtle indicator for horizontal scrolling on mobile */
@media (max-width: 768px) {
    .shares-breakdown-section::after,
    .transaction-history-section::after {
        content: 'Swipe for more →';
        position: sticky;
        left: 0;
        right: 0;
        bottom: 0;
        display: block;
        width: 100%;
        text-align: center;
        font-size: 10px;
        color: var(--accent-gold);
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        padding: 10px 0;
        z-index: 5;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-weight: 800;
        pointer-events: none;
    }
    
    .shares-breakdown-section,
    .transaction-history-section {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 0;
        max-width: calc(100vw - 30px);
    }
    table {
        min-width: 700px; /* Ensure content doesn't squash */
    }
    table td, table th {
        white-space: nowrap;
    }
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.live-indicator {
    font-size: 0.75em;
    color: var(--success-green);
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-ring 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(.33); }
    80%, 100% { opacity: 0; }
}

.shares-breakdown-section:hover,
.transaction-history-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    color: var(--text-dark);
}

table thead {
    border-bottom: 2px solid var(--accent-gold);
}

table th {
    background-color: var(--table-header-bg);
    font-weight: bold;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 0.9em;
}

table tbody tr:hover {
    background-color: var(--soft-grey);
}

table .gain {
    color: var(--success-green);
    font-weight: bold;
}

table .loss {
    color: var(--error-red);
    font-weight: bold;
}

/* Responsive adjustments for tables */
@media (max-width: 768px) {
    table th, table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
}