/* Company Detail Page CSS - MOBILE OPTIMIZED */

/* Override Bootstrap blue buttons */
.btn-outline-primary {
    color: #1a1a1a !important;
    border-color: #1a1a1a !important;
}

.btn-outline-primary:hover {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
}

.btn-primary {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
}

.btn-primary:hover {
    background-color: #0a0a0a !important;
    border-color: #0a0a0a !important;
}

/* Company Header Section */
.company-header {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.05) 0%, rgba(45, 55, 72, 0.05) 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Financial Statement Cards */
.financial-statement-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-all);
    margin-bottom: 1.5rem;
}

.statement-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
}

/* Statement Tabs Navigation */
.statement-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.statement-tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition-all);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.statement-tab:hover {
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.5);
}

.statement-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Year Range Selector */
.year-range-selector {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-200);
    max-width: 600px;
    margin: 0 auto;
}

.year-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.quick-year-btn {
    border-radius: 0.5rem;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: var(--transition-all);
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
}

.quick-year-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.quick-year-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #f3f4f6;
    border-color: #0a0a0a;
}

/* Financial Tables */
.financial-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.financial-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--gray-200);
}

.financial-table thead th:first-child {
    min-width: 250px;
    position: sticky;
    left: 0;
    z-index: 11;
}

.financial-table tbody tr {
    transition: var(--transition-all);
}

.financial-table tbody tr:hover {
    background: rgba(26, 26, 26, 0.03);
}

.financial-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

.financial-table tbody td:first-child {
    font-weight: 500;
    color: var(--gray-800);
    background: var(--gray-50);
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 1px solid var(--gray-200);
}

.financial-table tbody td.value-cell {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--gray-700);
}

.financial-table tbody td.positive {
    color: var(--success);
}

.financial-table tbody td.negative {
    color: var(--danger);
}

/* Export Menu */
.export-menu {
    position: relative;
    display: inline-block;
}

.export-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    min-width: 200px;
    margin-top: 0.5rem;
    z-index: 1000;
    display: none;
}

.export-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-all);
}

.period-btn:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.period-btn.active {
    background: var(--primary);
    color: white;
}

/* Timeframe Selector */
.timeframe-selector {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 8px;
}

.timeframe-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeframe-btn:hover {
    color: #1f2937;
    background: rgba(255, 255, 255, 0.8);
}

.timeframe-btn.active {
    background: white;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Table Container */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* MOBILE RESPONSIVE - CRITICAL FIXES */
@media (max-width: 768px) {
    /* Company Header - Mobile Layout */
    .company-header {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .company-header h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .symbol-badge {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.75rem !important;
    }
    
    .sector-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    .company-header .d-flex.gap-3 {
        gap: 0.5rem !important;
    }
    
    .company-header .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Statement Tabs - Horizontal Scroll on Mobile */
    .statement-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0.3rem;
        padding: 0.4rem;
        margin-bottom: 1rem;
        flex-wrap: nowrap;
        scrollbar-width: none; /* Firefox */
    }
    
    .statement-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .statement-tab {
        flex: 0 0 auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
        white-space: nowrap;
        gap: 0.3rem;
        min-width: fit-content;
    }
    
    .statement-tab i {
        font-size: 0.85rem;
    }
    
    /* Year Controls - Smaller and Horizontal */
    .year-range-selector {
        padding: 1rem;
    }
    
    .year-quick-actions {
        gap: 0.3rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .year-quick-actions::-webkit-scrollbar {
        display: none;
    }
    
    .quick-year-btn {
        flex: 0 0 auto;
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
        white-space: nowrap;
    }
    
    /* Financial Tables - REMOVE STICKY, SMALLER TEXT */
    .financial-table {
        font-size: 0.65rem;
    }
    
    .financial-table thead th {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
        position: static !important; /* Remove sticky on mobile */
        min-width: 80px;
    }
    
    .financial-table thead th:first-child {
        position: static !important; /* Remove sticky on mobile */
        min-width: 120px;
    }
    
    .financial-table tbody td {
        padding: 0.5rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .financial-table tbody td:first-child {
        position: static !important; /* CRITICAL: Remove sticky on mobile */
        background: transparent;
        border-right: none;
        font-weight: 500;
        min-width: 120px;
    }
    
    /* Statement Header */
    .statement-header {
        padding: 0.75rem;
    }
    
    .statement-header h5 {
        font-size: 0.85rem;
    }
    
    .statement-header .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Export Menu on Mobile */
    .export-menu .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Period Selector */
    .period-selector {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .period-selector::-webkit-scrollbar {
        display: none;
    }
    
    .period-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }
    
    /* Timeframe Selector */
    .timeframe-selector {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .timeframe-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }
    
    /* Chart Controls */
    .chart-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .chart-title h4 {
        font-size: 0.95rem;
    }
    
    .chart-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - even smaller text */
    .company-header h1 {
        font-size: 0.95rem !important;
    }
    
    .financial-table {
        font-size: 0.6rem;
    }
    
    .financial-table thead th,
    .financial-table tbody td {
        padding: 0.4rem 0.3rem;
        font-size: 0.6rem;
    }
    
    .statement-tab {
        font-size: 0.65rem;
        padding: 0.4rem 0.6rem;
    }
    
    .quick-year-btn {
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }
}

/* Add this to company-detail.css - REFINED COMPANY HEADER STYLES */

/* Company Header Container */
.company-header-refined {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Top Bar: Back Button + Export */
.company-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #f3f4f6;
    color: #1a1a1a;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #e5e7eb;
    color: #0a0a0a;
    transform: translateX(-2px);
}

.btn-back i {
    font-size: 0.875rem;
}

/* Export Button */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-export:hover {
    background: #0a0a0a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}

.btn-export i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.btn-export.active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Export Dropdown */
.export-menu {
    position: relative;
}

.export-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    min-width: 220px;
    z-index: 1000;
    display: none;
    animation: slideDown 0.2s ease;
}

.export-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.export-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    padding: 0.5rem 0.75rem 0.25rem;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    text-align: left;
    color: #1f2937;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.export-option:hover {
    background: #f3f4f6;
}

.export-option i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.export-option span {
    flex: 1;
}

.export-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Company Info Card */
.company-info-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Symbol Badge */
.company-symbol-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
    color: white;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* Company Name */
.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

/* Company Details */
.company-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.company-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.company-detail-item i {
    font-size: 0.875rem;
    color: #6b7280;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .company-header-refined {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    .company-header-top {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    /* Smaller Buttons on Mobile */
    .btn-back,
    .btn-export {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .btn-back i,
    .btn-export i {
        font-size: 0.75rem;
    }
    
    /* Hide text on very small screens */
    .btn-back span,
    .btn-export span {
        display: inline;
    }
    
    /* Symbol Badge */
    .company-symbol-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
    
    /* Company Name */
    .company-name {
        font-size: 1.1rem;
    }
    
    /* Company Details */
    .company-details {
        gap: 0.5rem;
    }
    
    .company-detail-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .company-detail-item i {
        font-size: 0.75rem;
    }
    
    /* Export Dropdown */
    .export-dropdown {
        min-width: 200px;
    }
    
    .export-section-title {
        font-size: 0.65rem;
        padding: 0.4rem 0.6rem 0.2rem;
    }
    
    .export-option {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .export-option i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .company-header-refined {
        padding: 0.875rem;
    }
    
    /* Even smaller on tiny screens */
    .btn-back span {
        display: none; /* Show only icon */
    }
    
    .btn-export span {
        font-size: 0.7rem;
    }
    
    .company-name {
        font-size: 1rem;
    }
    
    .company-symbol-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    .company-detail-item {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}


/* COMPLETE FIX for year buttons - matching page font sizes */

/* Base button styles - harmonized with page */
.quick-year-btn {
    border-radius: 0.5rem;
    font-size: 0.875rem;  /* Same as other buttons on page */
    padding: 0.5rem 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid #1a1a1a;
    color: #1a1a1a !important;
    background: white;
    font-weight: 500;
}

/* Normal hover state (not active) */
.quick-year-btn:hover:not(.active) {
    background: #f3f4f6;
    border-color: #0a0a0a;
    color: #0a0a0a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active state (selected button) */
.quick-year-btn.active {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
}

/* Active button hover - keep white text and black background */
.quick-year-btn.active:hover {
    background: #0a0a0a !important;
    border-color: #0a0a0a !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Override Bootstrap styles with higher specificity */
.btn.quick-year-btn,
.btn-outline-primary.quick-year-btn,
.btn-primary.quick-year-btn {
    font-size: 0.875rem !important;
    font-weight: 500;
}

.btn.quick-year-btn.active,
.btn-outline-primary.quick-year-btn.active,
.btn-primary.quick-year-btn.active {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
}


.btn.quick-year-btn.active:hover {
    background: #0a0a0a !important;
    border-color: #0a0a0a !important;
    color: white !important;
}
/* Mobile - smaller font sizes to match mobile design */
@media (max-width: 768px) {
    .quick-year-btn {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .quick-year-btn {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.6rem;
    }
}

/* Ensure statement tabs match same font size */
.statement-tab {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .statement-tab {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .statement-tab {
        font-size: 0.65rem;
    }
}

/* Harmonize export button with same font size */
.btn-export {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .btn-export {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .btn-export {
        font-size: 0.7rem;
    }
}

/* Harmonize back button */
.btn-back {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .btn-back {
        font-size: 0.75rem;
    }
}

/* Add to company-detail.css - STOCK TABLE COLOR SCHEME FIX */

/* Stock Table Container */
.stock-data-controls {
    margin-bottom: 1rem;
}

/* Stock Table Base Styles */
.stock-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Stock Table Header - Green Theme */
.stock-table thead th {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #065f46;
    text-align: right;
    border-bottom: 2px solid #6ee7b7;
    white-space: nowrap;
}

.stock-table thead th:first-child {
    text-align: left;
}

/* Stock Table Body */
.stock-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.stock-table tbody tr:hover {
    background: #f9fafb;
}

.stock-table tbody tr:last-child {
    border-bottom: none;
}

.stock-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: #1f2937;
}

.stock-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: #374151;
    font-family: 'Inter', sans-serif;
}

/* Price Change Colors - GREEN for positive, RED for negative */
.stock-table tbody td.price-up,
.stock-table tbody td.positive-change,
.stock-table tbody td[style*="color: green"],
.stock-table .text-success {
    color: #059669 !important;
    font-weight: 600;
}

.stock-table tbody td.price-down,
.stock-table tbody td.negative-change,
.stock-table tbody td[style*="color: red"],
.stock-table .text-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Green up arrow symbol */
.stock-table tbody td.price-up::before,
.stock-table .positive-change::before {
    content: "▲ ";
    font-size: 0.7rem;
}

/* Red down arrow symbol */
.stock-table tbody td.price-down::before,
.stock-table .negative-change::before {
    content: "▼ ";
    font-size: 0.7rem;
}

/* Specific styling for Close price column when it's green/red */
.stock-table tbody td:nth-child(5) {
    font-weight: 600;
}

/* Change column styling */
.stock-table tbody td:last-child {
    font-weight: 600;
}

/* Period Selector Buttons - harmonize with rest of page */
.period-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.period-btn.active {
    background: #1a1a1a;
    color: white;
}

/* MOBILE RESPONSIVE - Critical fixes */
@media (max-width: 768px) {
    /* Make table scrollable horizontally */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Smaller fonts on mobile */
    .stock-table {
        font-size: 0.7rem;
    }
    
    .stock-table thead th {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .stock-table tbody td {
        padding: 0.5rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .stock-table tbody td:first-child {
        min-width: 90px;
        font-size: 0.65rem;
    }
    
    /* Period buttons */
    .period-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }
    
    /* Arrows smaller on mobile */
    .stock-table tbody td.price-up::before,
    .stock-table .positive-change::before,
    .stock-table tbody td.price-down::before,
    .stock-table .negative-change::before {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    /* Even smaller on tiny screens */
    .stock-table {
        font-size: 0.65rem;
    }
    
    .stock-table thead th,
    .stock-table tbody td {
        padding: 0.4rem 0.3rem;
        font-size: 0.6rem;
    }
    
    .stock-table tbody td:first-child {
        min-width: 80px;
        font-size: 0.6rem;
    }
    
    .period-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* Loading and Error States */
#stock-table-loading,
#stock-table-error {
    padding: 2rem;
    text-align: center;
}

#stock-table-loading .spinner-border {
    color: #10b981;
}

#stock-table-error {
    color: #dc2626;
}

/* COMPLETE YEAR BUTTON SIZE FIX - Match rest of page */

/* Override all possible Bootstrap and custom styles */
.quick-year-btn,
button.quick-year-btn,
.btn.quick-year-btn,
.year-quick-actions .btn,
.year-quick-actions button {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 0.875rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
    border: 1px solid #1a1a1a !important;
    line-height: 1.4 !important;
}

/* Default state */
.quick-year-btn {
    color: #1a1a1a !important;
    background: white !important;
}

/* Hover state (not active) */
.quick-year-btn:hover:not(.active) {
    background: #f3f4f6 !important;
    border-color: #0a0a0a !important;
    color: #0a0a0a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active state */
.quick-year-btn.active {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: white !important;
}

/* Active hover state */
.quick-year-btn.active:hover {
    background: #0a0a0a !important;
    border-color: #0a0a0a !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Container adjustments */
.year-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Match statement tabs font size */
.statement-tab {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Match table header font size */
.financial-table thead th {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
}

/* Match export and back buttons */
.btn-export,
.btn-back {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Match period selector buttons */
.period-btn {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .quick-year-btn,
    button.quick-year-btn,
    .btn.quick-year-btn,
    .year-quick-actions .btn,
    .year-quick-actions button {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    .statement-tab {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    .financial-table thead th {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    .btn-export,
    .btn-back,
    .period-btn {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 480px) {
    .quick-year-btn,
    button.quick-year-btn,
    .btn.quick-year-btn,
    .year-quick-actions .btn,
    .year-quick-actions button {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.6rem !important;
        line-height: 1.2 !important;
    }
    
    .statement-tab {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }
    
    .financial-table thead th {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }
    
    .btn-export,
    .btn-back,
    .period-btn {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }
}

/* Add to company-detail.css - BLACK text, GRAY background for account column */

/* Desktop - Account column with black text and gray background */
.financial-table tbody tr td:first-child,
.financial-statement-card .financial-table tbody tr td:first-child,
table.financial-table tbody tr td:first-child {
    color: #1a1a1a !important;  /* Solid black text */
    font-weight: 500;
    background: #f3f4f6 !important;  /* Light gray background */
}

/* Desktop sticky positioning */
@media (min-width: 769px) {
    .financial-table tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 5;
        border-right: 1px solid #e5e7eb;
    }
}

/* Mobile - remove sticky but keep gray background and black text */
@media (max-width: 768px) {
    .financial-table tbody tr td:first-child,
    .financial-statement-card .financial-table tbody tr td:first-child,
    table.financial-table tbody tr td:first-child {
        position: static !important;
        background: #f3f4f6 !important;  /* Keep gray background on mobile */
        border-right: none !important;
        color: #1a1a1a !important;  /* Keep black text on mobile */
        font-weight: 500;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .financial-table tbody tr td:first-child,
    .financial-statement-card .financial-table tbody tr td:first-child,
    table.financial-table tbody tr td:first-child {
        min-width: 120px;
        font-size: 0.65rem;
        color: #1a1a1a !important;  /* Black text */
        background: #f3f4f6 !important;  /* Gray background */
    }
}