    .matrix-container {
        overflow-x: auto;
        overflow-y: auto;
        max-height: 70vh;
        max-width: 100%;
        position: relative;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        background: white;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    }
    
    /* Custom scrollbar styling */
    .matrix-container::-webkit-scrollbar {
        height: 12px;
        width: 12px;
    }
    
    .matrix-container::-webkit-scrollbar-track {
        background: #f8f9fa;
        border-radius: 6px;
        margin: 2px;
    }
    
    .matrix-container::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
        border-radius: 6px;
        border: 2px solid #f8f9fa;
    }
    
    .matrix-container::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, var(--primary-color-dark), #1e3a8a);
    }
    
    .matrix-container::-webkit-scrollbar-corner {
        background: #f8f9fa;
    }
    
    .matrix-table-card {
        border: none;
        box-shadow: var(--shadow-lg);
        border-radius: var(--border-radius);
    }
    
    .matrix-table-card .card-header {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        border-bottom: none;
        padding: 1rem 1.5rem;
    }
    
    .matrix-table {
        width: 100%;
        min-width: 800px;
        margin-bottom: 0;
        font-size: 0.8rem;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: auto;
    }
    
    .matrix-table th {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        font-weight: 600;
        text-align: center;
        vertical-align: middle;
        border: none;
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        position: sticky;
        top: 0;
        z-index: 10;
        width: 110px;
        min-width: 90px;
        max-width: 130px;
    }
    
    .matrix-table th::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.3);
    }
    
    .matrix-table th.goal-header {
        background: linear-gradient(135deg, var(--dark-color), #334155);
        text-align: left;
        width: 220px;
        min-width: 180px;
        max-width: 260px;
        padding: 0.75rem 0.75rem;
        position: sticky;
        left: 0;
        top: 0;
        z-index: 20;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    .matrix-table td {
        vertical-align: middle;
        border: 1px solid var(--border-color);
        padding: 0.6rem 0.4rem;
        text-align: center;
        position: relative;
    }
    
    .goal-cell {
        background: linear-gradient(135deg, var(--light-color), #f1f5f9);
        text-align: left;
        font-weight: 500;
        width: 250px;
        min-width: 200px;
        max-width: 300px;
        padding: 1.25rem 1rem;
        border-left: 4px solid var(--primary-color);
        position: sticky;
        left: 0;
        z-index: 10;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .goal-cell:hover {
        background: linear-gradient(135deg, #e8f0f8, #dde8f2);
        border-left-color: var(--primary-color-dark);
        box-shadow: 2px 0 6px rgba(0,0,0,0.15);
        transform: translateX(2px);
    }
    
    .goal-cell:hover .goal-title {
        color: var(--primary-color-dark);
    }
    
    .goal-title {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
        color: var(--dark-color);
    }
    
    .goal-info {
        font-size: 0.72rem;
        color: var(--secondary-color);
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }
    
    .goal-info::before {
        content: '•';
        color: var(--primary-color);
        font-weight: bold;
    }
    
    .target-input {
        border: 1px solid transparent;
        background: rgba(255, 255, 255, 0.8);
        text-align: center;
        width: 100%;
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.3s ease;
        color: var(--dark-color);
    }
    
    .target-input:hover {
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--border-color);
    }
    
    .target-input:focus {
        background-color: white;
        border: 2px solid var(--primary-color);
        outline: none;
        box-shadow: 0 0 0 4px #b8941f
        transform: scale(1.02);
    }
    
    .target-cell {
        position: relative;
        padding: 0;
        width: 120px;
        min-width: 100px;
        max-width: 150px;
    }
    
    .target-cell.has-value {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
        border-left: 3px solid var(--success-color);
    }
    
    .target-cell.empty {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
        border-left: 3px solid var(--danger-color);
    }
    
    .target-cell.has-value .target-input {
        color: var(--success-color);
        font-weight: 600;
        background-color: rgba(16, 185, 129, 0.05);
        border-color: var(--success-color);
    }
    
    .target-input:not(:placeholder-shown) {
        background-color: rgba(16, 185, 129, 0.05);
        border-color: var(--success-color);
        color: var(--success-color);
        font-weight: 600;
    }
    
    .target-cell.empty .target-input::placeholder {
        color: var(--danger-color);
        opacity: 0.7;
    }
    
    .target-cell-container {
        display: flex;
        align-items: center;
        position: relative;
        margin-bottom: 0.3rem;
    }
    
    /* Result Input Styles */
    .result-input-container {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }
    
    .result-input {
        border: 1px solid transparent;
        background: rgba(255, 255, 255, 0.8);
        text-align: center;
        width: 100%;
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.3s ease;
        color: var(--info-color);
    }
    
    .result-input:hover {
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--info-color);
    }
    
    .result-input:focus {
        background-color: white;
        border: 2px solid var(--info-color);
        outline: none;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        transform: scale(1.02);
    }
    
    .result-input:not(:placeholder-shown) {
        background-color: rgba(59, 130, 246, 0.05);
        border-color: var(--info-color);
        color: var(--info-color);
        font-weight: 600;
    }
    
    .result-saving-indicator {
        position: absolute;
        right: 0.3rem;
        top: 0.4rem;
        color: var(--info-color);
        font-size: 0.7rem;
        display: none;
    }
    
    .result-input-container.saving .result-saving-indicator {
        display: block;
    }
    
    .result-details {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.2rem;
        font-size: 0.6rem;
        margin-top: 0.1rem;
    }
    
    .result-target-info {
        color: var(--secondary-color);
        background: rgba(255, 255, 255, 0.8);
        padding: 0.1rem 0.2rem;
        border-radius: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }
    
    .result-percentage {
        font-weight: bold;
        padding: 0.1rem 0.2rem;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.9);
        white-space: nowrap;
    }
    
    .result-percentage.success {
        color: #059669;
    }
    
    .result-percentage.warning {
        color: #d97706;
    }
    
    .result-percentage.danger {
        color: #dc2626;
    }
    
    .completed-goal-cell .result-input {
        background: rgba(59, 130, 246, 0.1);
        border-color: var(--info-color);
        color: var(--info-color);
        font-weight: 600;
    }
    
    /* Hierarchical structure styles */
    
    /* Operation header styles */
    .operation-header {
        background-color: #f8f9fa !important;
    }
    
    .operation-header-cell {
        background: linear-gradient(135deg, #6c757d, #495057) !important;
        color: white !important;
        font-weight: bold;
        padding: 15px 20px !important;
        border: none !important;
        position: sticky;
        left: 0;
        z-index: 15;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    .operation-header-content {
        display: flex;
        align-items: center;
        font-size: 1.1rem;
    }
    
    .operation-header-content i {
        font-size: 1.2rem;
    }
    
    /* Department header styles */
    .department-header {
        background-color: #e9ecef !important;
    }
    
    .department-header-cell {
        background: linear-gradient(135deg, #adb5bd, #868e96) !important;
        color: white !important;
        font-weight: 600;
        padding: 12px 25px !important;
        border: none !important;
        font-size: 0.95rem;
        position: sticky;
        left: 0;
        z-index: 12;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    .department-header-content {
        display: flex;
        align-items: center;
    }
    
    .department-header-content i {
        font-size: 1rem;
    }
    
    .department-header-content .badge {
        font-size: 0.75rem;
    }
    
    /* Goal row styles */
    .goal-row {
        background-color: white;
    }
    
    .goal-row:hover {
        background-color: #f8f9fa;
    }
    
    .goal-row .goal-cell {
        padding-left: 35px !important;
        border-left: 4px solid #e9ecef;
    }
    
    /* Bulk prediction button styling */
    .bulk-predict-btn {
        border: none;
        background: transparent;
        color: var(--primary-color);
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        transition: all 0.2s ease;
    }
    
    .bulk-predict-btn:hover {
        opacity: 1 !important;
        background: var(--primary-color);
        color: white;
        transform: scale(1.05);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .bulk-predict-btn.loading {
        opacity: 1 !important;
        color: var(--warning-color);
    }
    
    .bulk-predict-btn.loading i {
        animation: spin 1s linear infinite;
    }
    
    .goal-row:hover .bulk-predict-btn {
        opacity: 1;
    }
    
    /* Completed Goal Cells */
    .completed-goal-cell {
        background: linear-gradient(135deg, #e0f2fe, #b3e5fc) !important;
        border: 2px solid #0288d1 !important;
        position: relative;
        padding: 0.4rem !important;
    }
    
    .completed-goal-container {
        position: relative;
        height: 100%;
        display: grid;
        grid-template-areas: 
            "target badge"
            "result result"
            "percentage .";
        grid-template-rows: auto 1fr auto;
        grid-template-columns: 1fr auto;
        min-height: 70px;
        padding: 2px;
        gap: 2px;
    }
    
    .completed-goal-result {
        grid-area: result;
        font-size: 1rem;
        font-weight: bold;
        color: #0277bd;
        text-align: center;
        line-height: 1.1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2px;
    }
    
    .completed-goal-details {
        display: contents;
    }
    
    .completed-goal-target {
        grid-area: target;
        color: #6b7280;
        font-size: 0.55rem;
        background: rgba(255, 255, 255, 0.8);
        padding: 1px 2px;
        border-radius: 2px;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .completed-goal-percentage {
        grid-area: percentage;
        font-weight: bold;
        font-size: 0.55rem;
        padding: 1px 2px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.9);
        line-height: 1;
        white-space: nowrap;
        align-self: end;
    }
    
    .completed-goal-percentage.success {
        color: #059669;
        background: rgba(16, 185, 129, 0.1);
    }
    
    .completed-goal-percentage.warning {
        color: #d97706;
        background: rgba(217, 119, 6, 0.1);
    }
    
    .completed-goal-percentage.danger {
        color: #dc2626;
        background: rgba(220, 38, 38, 0.1);
    }
    
    .completed-goal-badge {
        grid-area: badge;
        color: #0288d1;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    /* Add subtle borders between sections */
    .operation-header + .department-header .department-header-cell {
        border-top: 2px solid #dee2e6;
    }
    
    .department-header + .goal-row .goal-cell,
    .department-header + .goal-row .target-cell {
        border-top: 1px solid #e9ecef;
    }
    
    .suggest-btn {
        position: absolute;
        right: 2px;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        color: var(--warning-color);
        font-size: 0.8rem;
        opacity: 0;
        transition: opacity 0.2s ease;
        cursor: pointer;
        z-index: 10;
    }
    
    .target-cell:hover .suggest-btn {
        opacity: 1;
    }
    
    .suggest-btn:hover {
        color: var(--primary-color);
        transform: translateY(-50%) scale(1.1);
    }
    
    .suggest-btn.loading {
        opacity: 1;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        from { transform: translateY(-50%) rotate(0deg); }
        to { transform: translateY(-50%) rotate(360deg); }
    }
    
    .saving-indicator {
        position: absolute;
        top: 2px;
        right: 2px;
        color: var(--warning-color);
        font-size: 0.7rem;
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .saving-indicator.show {
        opacity: 1;
    }
    
    .stat-card {
        border: none;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
        background: white;
    }
    
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--secondary-color);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .time-navigation {
        background: linear-gradient(135deg, #f8fafc, #e2e8f0);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
    }
    
    .time-navigation .btn {
        min-width: 140px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .time-navigation .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
    
    .current-period {
        font-weight: 600;
        color: var(--primary-color);
    }
    
    .navigation-hint {
        font-size: 0.8rem;
        color: var(--secondary-color);
        font-style: italic;
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
        .matrix-container {
            max-height: 60vh;
        }
        
        .matrix-table {
            min-width: 600px;
            font-size: 0.8rem;
        }
        
        .matrix-table th {
            padding: 0.75rem 0.5rem;
            font-size: 0.75rem;
        }
        
        .matrix-table td {
            padding: 0.4rem 0.2rem;
        }
        
        .goal-cell {
            padding: 1rem 0.75rem;
        }
        
        .goal-title {
            font-size: 0.8rem;
        }
        
        .goal-info {
            font-size: 0.7rem;
        }
        
        .target-input {
            padding: 0.4rem 0.2rem;
            font-size: 0.75rem;
        }
        
        .stat-number {
            font-size: 1.5rem;
        }
        
        .stat-icon i {
            font-size: 1.5rem !important;
        }
        
        .stat-icon {
            font-size: 1.5rem;
        }
        
        /* Responsive completed goals */
        .completed-goal-container {
            min-height: 60px;
        }
        
        .completed-goal-result {
            font-size: 0.85rem;
        }
        
        .completed-goal-target {
            font-size: 0.5rem;
        }
        
        .completed-goal-percentage {
            font-size: 0.5rem;
        }
        
        .completed-goal-badge {
            font-size: 0.6rem;
        }
    }
    
    @media (max-width: 576px) {
        .time-navigation .btn {
            min-width: 100px;
            font-size: 0.8rem;
            padding: 0.5rem 0.75rem;
        }
        
        .current-period {
            font-size: 1rem;
        }
        
        .navigation-hint {
            font-size: 0.7rem;
        }
    }
